Commodity name multi-dimensional fusion matching scoring method and system
Patent Information
- Application Number
- CN202611213274.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-16
AI Technical Summary
但在查询文本远长于候选标准名称的典型场景下,Jaccard相似度的分母(并集大小)会变得过大,导致即使候选标准名称被查询文本完全覆盖,其得分也可能非常低,从而使得正确的短名称候选被错误地排在后面
1、本发明通过引入长度比例因子,动态地组合Jaccard相似度和候选覆盖度,有效解决了在查询文本远长于候选标准名称时传统相似度算法得分失真的问题,使得短而精的正确候选也能获得合理的评分,提高了匹配的召回率和排序的准确性。
Smart Images

Figure CN122925602A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of e-commerce and information retrieval technology, specifically to a multi-dimensional fusion matching and scoring method and system for product names, particularly a method for asymmetric text similarity and multi-dimensional fusion scoring of product names for B2B procurement scenarios, and especially an intelligent matching and scoring method for non-standard product descriptions and standard product names in B2B procurement scenarios. Background Technology
[0002] In e-commerce platforms, especially in business-to-business (B2B) procurement scenarios, product matching is a core and challenging task. The query text entered by procurement personnel is often lengthy and unstructured, potentially mixing multiple fields such as brand, model, category, color, and specifications. In contrast, the product names stored in the product database are often standardized, relatively concise candidate names. This "asymmetry" between query text and candidate names makes accurate matching difficult.
[0003] In existing technologies, there are several main categories of methods for solving this type of problem. The first category is traditional methods based on keyword matching, such as using fuzzy queries (SQL LIKE) in databases or inverted indexes in search engines for retrieval. These methods heavily rely on literal inclusion relationships and are ineffective in handling abbreviations of models, brand aliases, and mixed Chinese and English text, easily missing correct matches. The second category is vector semantic matching methods based on deep learning. This method maps text to a high-dimensional vector space and calculates semantic similarity, enabling it to identify products that are literally different but have similar meanings. However, its drawback is that it is not sensitive enough to product attributes that require precise differentiation, such as model number, color, and capacity, and may rate semantically similar products with completely different key specifications as highly matched, leading to purchasing errors.
[0004] The third type of method uses N-gram Jaccard similarity to measure text overlap. However, in typical scenarios where the query text is much longer than the candidate standard name, the denominator (union size) of the Jaccard similarity becomes too large. This results in a very low score even if the candidate standard name is completely covered by the query text, causing the correct short name candidate to be incorrectly ranked lower. Although the above solutions can be easily combined, without adaptive adjustment for text length differences, consideration of candidate coverage, and hard constraints on key attributes, existing technologies still commonly suffer from the problem of "semantically similar but incorrect SKU" candidates being ranked higher, or "correct candidates with shorter standard names" having low scores. This increases the manual verification burden on procurement personnel and reduces procurement efficiency. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a multi-dimensional fusion matching scoring method and system for product names.
[0006] A multi-dimensional fusion matching scoring method for product names provided by the present invention includes the following steps: Obtain the query text and candidate standard names, and perform word segmentation on the query text and candidate standard names, and classify the segmented tokens into one of a number of preset attribute categories; Based on the length ratio of the query text and the candidate standard name, the first text similarity index and the second text similarity index are dynamically combined to calculate an asymmetric text similarity score. The asymmetric text similarity score is fused with the score signal of at least one other dimension to obtain a preliminary fused score; Based on the attribute category of the Token, a set of preset product attribute rules are applied to process the preliminary fusion score. The processing includes correcting the score of the preliminary fusion score or determining that the candidate standard name is a mismatch. The score obtained after score correction is truncated to the preset interval [0, 1] to obtain the final matching score.
[0007] Preferably, the candidate standard names that are not determined to be mismatched by the product attribute rules are sorted from high to low according to the final matching score, and the candidate standard name with the highest final matching score is taken as the first matching candidate, and the candidate standard name with the second highest final matching score is taken as the second matching candidate. When the final matching score of the first matching candidate is not lower than the preset confirmation threshold, and the difference between the final matching score of the first matching candidate and the final matching score of the second matching candidate is not lower than the preset difference threshold, the standard product identifier, standard product name, final matching score and matching basis corresponding to the first matching candidate are output as the product matching result; otherwise, the first matching candidate is marked as pending manual confirmation.
[0008] Preferably, the step of classifying the token into one of a set of preset attribute categories includes: Based on the preset dictionary and regular expression rules, the tokens after word segmentation are classified into one of the five preset categories according to the priority order of model, specification, brand, variant, and product.
[0009] Preferably, the first text similarity index is Jaccard similarity, and the second text similarity index is candidate coverage. The step of dynamically combining the first text similarity index and the second text similarity index includes: A mixed similarity is obtained by dynamically weighting the Jaccard similarity and the candidate coverage using a length scaling factor. The length scaling factor is determined based on the size of the N-gram set of the query text and the N-gram set of the candidate standard name, and is equal to the smaller of the two sizes divided by the larger of the two sizes.
[0010] Preferably, the step of calculating an asymmetric text similarity score includes: Calculate the mixed similarity of character-level bigrams and character-level trigrams separately, and then take the average value; The asymmetric text similarity score is obtained by multiplying the obtained average value by a short candidate penalty factor based on the number of characters in the candidate standard name.
[0011] Preferably, the score signal of the at least one other dimension includes: a score from a deterministic recall channel and a semantic similarity score from a vector model; The fusion is a weighted fusion of the asymmetric text similarity score, the deterministic recall channel score, and the semantic similarity score.
[0012] Preferably, the step of applying a set of preset product attribute rules to process the preliminary fusion score includes: When both the query text and the candidate standard name contain a token with a model attribute, and the model attribute is an exact match or an equivalent match, the preliminary fusion score is deducted as a score correction.
[0013] Preferably, the fraction correction further includes: When both the query text and the candidate standard name contain a token with a model attribute, and the accuracy of the model attribute meets a preset requirement or the model attribute is equivalently matched, the preliminary fusion score is increased.
[0014] Preferably, the step of applying a set of preset product attribute rules to process the preliminary fusion score includes: When the color attribute or product family attribute of the query text conflicts with the candidate standard name, the candidate standard name is determined to be a mismatch.
[0015] Preferably, the calculation formula for the dynamic weighted combination is: ; in, Represents character-level n-gram syntax; Represents the mixed similarity of character-level n-gram syntax; Jaccard similarity is used to represent character-level n-gram syntax. Indicates the candidate coverage of character-level n-gram syntax; The length scaling factor for character-level n-gram syntax; The calculation formula is: ; The calculation formula is: ; The calculation formula is: ; Where Q is the set of N-grams for query text in character-level n-gram syntax; C is the set of N-grams for candidate standard names in character-level n-gram syntax; |Q∩C| represents the size of the intersection of set Q and set C, |Q∪C| represents the size of the union of set Q and set C; |Q| represents the size of set Q; |C| represents the size of set C; The short candidate penalty factor is The calculation formula is as follows: ; in, The normalized number of characters in the candidate standard name.
[0016] The present invention also provides a multi-dimensional fusion matching and scoring system for product names, comprising: one or more processors, a memory communicatively connected to the one or more processors, and instructions stored in the memory; when the instructions are executed, the one or more processors perform the following steps: Obtain the query text and candidate standard names, and perform word segmentation on the query text and candidate standard names, and classify the segmented tokens into one of a number of preset attribute categories; Based on the length ratio of the query text and the candidate standard name, the first text similarity index and the second text similarity index are dynamically combined to calculate an asymmetric text similarity score. The asymmetric text similarity score is fused with the score signal of at least one other dimension to obtain a preliminary fused score; Based on the attribute category of the Token, a set of preset product attribute rules are applied to process the preliminary fusion score. The processing includes correcting the score of the preliminary fusion score or determining that the candidate standard name is a mismatch. The score obtained after score correction is truncated to the preset interval [0, 1] to obtain the final matching score.
[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention introduces a length scaling factor to dynamically combine Jaccard similarity and candidate coverage, effectively solving the problem of score distortion in traditional similarity algorithms when the query text is much longer than the candidate standard name. This allows short and precise correct candidates to also obtain reasonable scores, improving the recall rate of matching and the accuracy of ranking.
[0018] 2. This invention constructs a multi-dimensional comprehensive scoring system by integrating asymmetric text similarity, deterministic recall score and vector semantic score. This system can simultaneously utilize the accuracy of literal matching, the generalization of semantic matching and the targeted text coverage, making the scoring results more robust and reliable.
[0019] 3. By setting product attribute rules based on key attributes such as model, color, and product family, this invention can effectively post-process the initial fusion score. In particular, it directly identifies candidates with clearly conflicting attributes as mismatches and significantly deducts points from candidates with mismatched models, greatly reducing the situation of "superficial matching but fundamentally different" mismatches and significantly improving the accuracy of the final result.
[0020] 4. The scoring process of this invention is clear and explainable. The final score is formed by the fusion of multiple quantifiable dimensions, and the processing logic of the attribute rules is clear. This makes it easy for procurement personnel to understand the matching results and conduct manual audits, and provides a clear basis for the subsequent iterative optimization of the model. Attached Figure Description
[0021] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating a multi-dimensional fusion matching and scoring method for product names, provided as an embodiment of the present invention.
[0022] Figure 2 This is a schematic diagram of the process for calculating asymmetric text similarity scores in one embodiment of the present invention.
[0023] Figure 3 This is a schematic diagram illustrating the process of applying product attribute rules in one embodiment of the present invention.
[0024] Figure 4 This is a schematic diagram of the functional modules of a multi-dimensional fusion matching and scoring system for product names provided in an embodiment of the present invention.
[0025] Figure 5 This is a schematic diagram of the complete processing flow from text input to candidate sorting.
[0026] Figure 6 This is a schematic diagram illustrating the detailed calculation process for asymmetric N-gram similarity.
[0027] Figure 7 This is a diagram illustrating the execution order of product attribute rules.
[0028] Figure 8 This is a schematic diagram of the output interface for the final matching results.
[0029] The diagram shows: Text preprocessing module 10; N-gram similarity module 20; channel fusion module 30; attribute constraint module 40; final score output module 50; processor 90; memory 91. Detailed Implementation
[0030] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0031] In the description of this invention, it should be understood that the term "query text" refers to descriptive text about a desired product input by a user (e.g., a procurement officer on a B2B procurement platform). This text is typically long, irregularly formatted, and may contain a mix of information such as brand, model, and specifications. The term "candidate standard name" refers to a relatively standardized and concise product name existing in the product database, used to match the query text. The term "attribute category" refers to the classification of segmented text fragments (Tokens) according to preset rules, such as model, brand, and color. These categories form the basis for subsequent precise matching and rule-based judgment. The term "asymmetric text similarity score" is a text similarity score that comprehensively considers the literal overlap between the query text and the candidate standard name, as well as the degree to which the candidate standard name is covered, aiming to solve the problem of score distortion when the lengths of the two are severely disproportionate. The term "product attribute rule" is a set of token-based attribute categories that correct the initially calculated score or directly determine whether a match has occurred, ensuring the correctness of key product attributes.
[0032] In e-commerce procurement scenarios such as B2B (business-to-business), product name matching faces unique challenges. The query text entered by procurement personnel is often lengthy and unstructured, such as "Schneider circuit breaker 3PC32 molded case," while the candidate standard names in the backend product database may be very concise, such as "Schneider C32 circuit breaker." Traditional text similarity algorithms, such as Jaccard similarity, can lead to an excessively large denominator due to the presence of many words in the query text that are not present in the candidate standard names, thus unreasonably lowering the score of correct matches. Furthermore, for industrial products and electronic components, accurate matching of key attributes such as model and specifications is crucial; even a slight difference can lead to procurement errors. This invention addresses these problems by proposing a multi-stage, multi-dimensional scoring method. It solves the length imbalance problem by introducing asymmetric similarity calculation, improves the robustness of matching by fusing multiple signal sources, and ensures the accuracy of key information through rules based on product attributes, thereby achieving more accurate and reliable product matching scoring.
[0033] Example 1 like Figure 1 The present embodiment provides an overall process for a multi-dimensional fusion matching scoring method for product names, which is applied to computer devices, such as servers or personal computers. First, in step S101, the system acquires the query text input by the user and one or more candidate standard names from a product database. Next, in step S102, the acquired text is preprocessed and Token classified. This step includes operations such as full-width / half-width character normalization, case unification, and delimiter unification, and the segmented Tokens are assigned to preset attribute categories. Subsequently, in step S103, an asymmetric text similarity score is calculated. This score aims to objectively assess the true similarity between texts of varying lengths. In step S104, the asymmetric text similarity score calculated in the previous step is fused with score signals from other dimensions to obtain a preliminary fusion score, thereby comprehensively utilizing information from different matching dimensions. Then, in step S105, a set of preset product attribute rules are applied to process the preliminary fusion score. This may include adding or subtracting corrections to the score, or directly identifying candidates as mismatches when serious conflicts are found. Finally, in step S106, the processed final matching score is output, which can be used to sort multiple candidate criterion names and provide the user with the most relevant matching results.
[0034] The final matching score is used to perform product matching: The computer system sorts the candidate standard products that are not identified as mismatched by the product attribute rules according to the final matching score from high to low, and takes the candidate with the highest score as the first matching candidate; when the final matching score of the first matching candidate is not lower than the preset confirmation threshold, and the difference between its score and the second highest candidate is not lower than the preset difference threshold, the standard product identifier, standard product name, final matching score and matching basis of the candidate are output as the product matching result; otherwise, it is marked as pending manual confirmation.
[0035] Based on the above scheme, step S102, which involves text preprocessing and token classification, can be implemented more specifically. In addition to conventional text normalization operations, the preprocessing stage can also include mapping brand aliases and model equivalents. For example, grouping "HP" and "HP" into the same brand entity, and grouping "CF287A" and "87A" into the same model entity under the printing consumables category. After preprocessing and tokenization, each token needs to be assigned to a main category. To ensure accurate identification of key information, this embodiment adopts a priority-based classification strategy. Specifically, the system will judge each token according to the priority order of model, specification, brand, variant, and product. For example, if a token simultaneously matches the model pattern (e.g., alphanumeric) and the product definition (e.g., "circuit breaker"), it will be preferentially classified as "model". This priority-based classification method ensures that information such as model, which plays a decisive role in the uniqueness of a product, can be accurately captured, providing a reliable foundation for subsequent attribute rule judgments.
[0036] like Figure 2 As shown, step S103, which calculates the asymmetric text similarity score, can be further refined. In step S201, the system first generates N-gram sets for the preprocessed query text and candidate standard names, such as character-level bigram and trigram sets, denoted as query N-gram set Q and candidate N-gram set C, respectively. To avoid generating meaningless cross-word features, N-gram generation is performed by uniformly separating tokens with spaces, not between tokens. Next, in step S202, the first text similarity index, namely the Jaccard similarity J(Q,C), is calculated using the following formula: Where |Q∩C| represents the size of the intersection of the two sets, and |Q∪C| represents the size of the union of the two sets. Jaccard similarity can effectively measure the overall overlap between two sets. However, using Jaccard similarity alone has problems when the query text is much longer than the candidate standard name. Therefore, in step S203, the system also calculates a second text similarity index, namely the candidate coverage (Coverage(Q,C), which is calculated as follows: , where |C| is the size of the candidate N-gram set. Candidate coverage reflects the extent to which candidate criterion names are “covered” or “contained” by the query text, and this metric is crucial for identifying “short candidates” that match exactly in “long queries”.
[0037] To dynamically combine the advantages of Jaccard similarity and candidate coverage, in steps S204 and S205, this embodiment introduces a length scaling factor α, which is used to dynamically weight the two indicators. The formula for calculating the length scaling factor α is: Where |Q| and |C| are the sizes of the query N-gram set and the candidate N-gram set, respectively. When the lengths of the query text and the candidate standard names (measured by the size of the N-gram set) are similar, α approaches 1, and the combination formula focuses more on Jaccard similarity; when the lengths differ significantly, α approaches 0, and the combination formula focuses more on candidate coverage. The formula for dynamic weighted combination is: This adaptive weighting method allows similarity calculation to intelligently adapt to text pairs of different lengths, significantly improving the rationality and accuracy of the scoring.
[0038] As a preferred implementation, in order to capture text features at different granularities, the above-mentioned asymmetric similarity calculation process can be performed independently for bigrams and trigrams, respectively, to obtain a bigram hybrid similarity. A similarity to a ternary grammar Subsequently, in step S206, the two scores are averaged to obtain a score that integrates information from different N-gram granularities. Furthermore, to suppress extremely short candidates that receive high scores simply because they contain one or two common words, this embodiment introduces a short candidate penalty factor. In step S207, the aforementioned average score is multiplied by this penalty factor. The formula for calculating the short candidate penalty factor is: ,in, This is the number of characters in the candidate standard name after normalization, removal of spaces and punctuation; 5.0 is a configurable length threshold. This design effectively penalizes candidates with insufficient content and information, ensuring that the winning matches are those with sufficient discriminative power.
[0039] After calculating the asymmetric text similarity score, it needs to be fused with scores from other dimensions to obtain a more comprehensive preliminary fused score. The at least one other dimension score signal can include scores from the deterministic recall channel and semantic similarity scores from the vector model. Deterministic recall channel scores are typically based on precise rule matching; for example, a score of 1.0 is given when the product code or barcode is completely matched, and a score of 0.85 is given when both the brand and model are matched. This type of score signal has high precision but limited coverage. The semantic similarity score from the vector model calculates the semantic distance between texts using a deep learning model, enabling the identification of synonyms, near-synonyms, and word order reversals, thus compensating for the shortcomings of literal matching. These scores are fused using a weighted formula, for example: Preliminary fused score = 0.20 × Deterministic recall channel score + 0.50 × Asymmetric text similarity score + 0.30 × Semantic similarity score. The weighting coefficients (e.g., 0.20, 0.50, 0.30) can be adjusted according to the characteristics of different product categories, but overall, asymmetric text similarity scores are given a higher weight to ensure that key literal information such as model number and brand plays a dominant role in the final score. This multi-dimensional fusion approach allows the scoring model to utilize the determinism of exact matching while also taking into account the similarity of literal features and the semantic relevance, thus obtaining a more robust and accurate evaluation than a single dimension.
[0040] like Figure 3As shown, the preliminary fusion score cannot be directly used as the final result and still needs to be processed by product attribute rules. This is a crucial step in ensuring the accuracy of B2B procurement. This processing step includes score correction of the preliminary fusion score, or directly identifying the candidate standard name as a mismatch when a serious conflict is detected. For example, in step S301, the system first determines whether the product family conflicts. If the query text explicitly points to "toner cartridge" while the candidate standard name is "ink cartridge", then the two product families conflict, and the system identifies the candidate as a mismatch in step S302 and terminates its subsequent processing. Similarly, in step S303, the system determines whether the color attribute conflicts. If the query text specifies "black" while the candidate is "red", and the two are not related in the preset color mapping table, then in step S304, the candidate is also identified as a mismatch. This "one-vote veto" hard constraint mechanism can effectively intercept candidates that are highly similar in text or semantics but have completely wrong core attributes, avoiding serious procurement errors. For candidates that are not identified as mismatches, the product attribute rules will also perform score correction. In step S305, the system will determine the matching relationship of the model attribute. When both the query text and the candidate standard name contain tokens with model attributes, but these tokens do not match (e.g., the query is for "87A" while the candidate is "88A"), and they do not belong to the preset equivalent model group, the system will determine that the model does not match and deduct points from the preliminary fusion score in step S306, for example, deducting 0.35 points. Conversely, when the model attributes of the query text and the candidate standard name are completely consistent after normalization (exact match), or can be mapped to each other in the preset model equivalence library (equivalent match), the system will add points to the preliminary fusion score in step S306, for example, adding 0.15 points. This significant reward for key attribute matching ensures that candidates containing the correct model can stand out. After all scores are corrected, in step S307, the final score will be truncated to the preset [0, 1] interval to ensure the standardization of the scoring.
[0041] To more clearly describe the technical solution of the present invention, the following description is provided in conjunction with a simplified embodiment. Assume an application scenario of matching "circuit breaker". The query text input by the user is: "Schneider circuit breaker 3P C32". The system selects a candidate standard name: "Schneider 3P C63 circuit breaker". First, the system acquires these two texts, performs word segmentation and Token classification, classifies "Schneider" into the brand attribute category, "circuit breaker" into the product attribute category, and both "C32" and "C63" into the model attribute category. Next, the system calculates an asymmetric text similarity score. For example, since most words are matched, the score is 0.6. Then, the system fuses this score with score signals of other dimensions (such as a recall score with a value of 0.8) to obtain a preliminary fusion score. Subsequently, the system applies commodity attribute rules for processing. In this step, the system detects that the model Token "C32" in the query text does not match the model Token "C63" in the candidate standard name, and therefore performs a score correction operation (for example, deducting points) on the preliminary fusion score. Finally, the system outputs the final matching score after correction and truncation. This simplified embodiment fully demonstrates the five core steps of text acquisition and classification, asymmetric similarity calculation, score fusion, rule application processing, and final score output.
[0042] In the following, the calculation process and rule application involved in the present invention are described in detail through a more specific embodiment. Assume the query text input by the user is "Zhitong 87A CF287A toner cartridge with chip black 9000 pages", and the candidate standard name is "Zhitong toner cartridge 87A black". First, the system performs word segmentation and Token classification on the query text. According to the aforementioned priority rule, "87A" and "CF287A" are identified as Tokens of the model attribute (assuming the two are associated in the equivalence library), "toner cartridge" is identified as a Token of the product attribute, "black" is identified as a Token of the variant attribute, "9000 pages" is identified as a Token of the specification attribute, and "Zhitong" is identified as a Token of the brand attribute. This classification process embodies the step of classifying into the main category according to priority.
[0043] Next, the asymmetric text similarity score is calculated. Taking bigram as an example, assume that after calculation, the length scaling factor α calculated from the size ratio of the query N-gram set Q2 and the candidate N-gram set C2 is 0.18, the Jaccard similarity J(Q2, C2) is 0.12, and the candidate coverage Coverage(Q2, C2) is 0.56. Then the mixed similarity of the bigram is: . Similarly, taking trigram syntax as an example, assuming the calculated length scaling factor α is 0.16, the Jaccard similarity J(Q3, C3) is 0.08, and the candidate coverage Coverage(Q3, C3) is 0.50, the hybrid similarity of the trigram syntax is: . These two calculation processes detail the steps of dynamically combining the Jaccard similarity and the candidate coverage. After obtaining the hybrid similarities of the bigram and trigram syntax, the average of the two is taken. Meanwhile, assuming the number of characters in the candidate standard name "Zhitong Toner Cartridge 87A Black" is greater than 5, so the short candidate penalty factor is 1.0. The final asymmetric text similarity score is: . This step embodies the procedure of combining multi-granular syntax and applying the short candidate penalty factor.
[0044] After the asymmetric text similarity score is calculated to be about 0.457, the process proceeds to the multi-dimensional fusion stage. Assume that the score obtained through the deterministic recall channel (for example, brand + model alias hit) is 0.85, and the semantic similarity score calculated by the vector model is 0.72. The preset weights (0.2, 0.5, 0.3) are used for weighted fusion to obtain a preliminary fusion score: . This process fully demonstrates the steps of performing weighted fusion on the asymmetric text similarity score, the deterministic recall score and the semantic similarity score.
[0045] The obtained preliminary fusion score of 0.615 further needs to be processed through commodity attribute rules. The system checks various attributes: the product families (both are "toner cartridge") are consistent, adding 0.03 points; the colors (both are "black") are consistent, adding 0.05 points; the models ("87A" / "CF287A" in the query text and "87A" of the candidate) are equivalently matched, which belongs to model equivalent matching, adding 0.15 points. These point-adding operations embody the feature of adding points for exact or equivalent model matching as recited in claim 7. The final score is corrected to: . For comparison, if another candidate standard name is "Zhitong Toner Cartridge 88A Black", at the attribute rule processing stage, the system will detect that the models do not match ("87A" vs. "88A"), and at this time, a point deduction process will be performed on the preliminary fusion score of this candidate, for example, 0.35 points are deducted, so that its final score is significantly reduced, which embodies the step of deducting points for model mismatch.
[0046] Furthermore, the case where a candidate is determined as a non-matching item due to attribute conflict is illustrated through the following embodiment. If the candidate standard name is "Zhitong Toner Cartridge 87A Red", although its text and semantic similarity may be very high, when applying the commodity attribute rule, the system detects that the color attribute of the query text is "black", while the color attribute of the candidate is "red", there is no intersection between the two color sets and no preset approximate color mapping exists. Therefore, the system directly determines the candidate as a non-matching item, which will not obtain a final score nor appear in the final sorted list. This process clearly demonstrates the steps of determining a non-matching item due to a clear conflict in color attributes.
[0047] To fully demonstrate the end-to-end workflow of a preferred embodiment of the present invention, the description is connected in series again by taking "printing consumables" as an example. When the user inputs the query text "Zhitong 87A CF287A Toner Cartridge with Chip Black 9000 Pages", the system performs matching scoring for the candidate standard name "Zhitong Toner Cartridge 87A Black". First, through text preprocessing and token classification, key attributes such as model, product, and color are accurately identified. Next, through asymmetric similarity calculation combining bigram and trigram, and considering the short candidate penalty, an asymmetric text similarity score that can objectively reflect the literal matching degree is obtained, which is about 0.457. Subsequently, this score is weighted and fused with the deterministic recall score (0.85) and the vector semantic score (0.72) to obtain a comprehensive preliminary fusion score of about 0.615. Finally, commodity attribute rules are applied to perform a series of bonus corrections on the preliminary fusion score based on consistent product family, consistent color, and equivalent model matching, and a corrected score of 0.845 is obtained. After the score is truncated in the [0, 1] interval, it is output as the final matching score of 0.845. The entire workflow works synergistically to ensure that the scoring takes into account both the macroscopic and microscopic features of the text, integrates semantic information, and is finally checked by strict attribute rules, achieving high-precision matching.
[0048] The present invention further provides a multi-dimensional fusion matching and scoring system for commodity names. The multi-dimensional fusion matching and scoring system for commodity names can be implemented by executing the process steps of the multi-dimensional fusion matching and scoring method for commodity names, that is, those skilled in the art can regard the multi-dimensional fusion matching and scoring method for commodity names as a preferred embodiment of the multi-dimensional fusion matching and scoring system for commodity names.
[0049] The above method may be implemented by a multi-dimensional fusion matching and scoring system for commodity names. Such as Figure 4The system can be a server, an embedded system, or any computer device with computing capabilities. The system includes one or more processors 90 and instructions stored in processor-accessible memory 91. When these instructions are executed by the processor 90, a series of functional modules are implemented to complete the aforementioned method. These modules include: a text preprocessing module 10, used to acquire query text and candidate standard names, and perform word segmentation and token classification on them; an N-gram similarity module 20, used to dynamically combine Jaccard similarity and candidate coverage based on text length ratio to calculate an asymmetric text similarity score; a channel score fusion module 30, used to fuse the score output by the N-gram similarity module 20 with score signals from other dimensions to obtain a preliminary fused score; an attribute constraint module 40, used to apply product attribute rules to correct the preliminary fused score or identify it as a mismatch based on the attribute category of the token; and a final score output module 50, used to output the corrected and truncated score as the final matching score. These modules work together through an internal data interface to efficiently complete the entire process from raw text input to final score output. The complete processing flow, asymmetric similarity refinement flow, attribute rule execution order, and result output interface are as follows: Figures 5 to 8 As shown.
[0050] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. This computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc. Therefore, this embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, can implement the scoring method for product matching as described in any of the foregoing embodiments. This form allows the technical solution of this embodiment to be easily deployed on various computing devices, exhibiting good versatility and portability.
[0051] Example 2 Those skilled in the art can understand this embodiment as a more specific description of Embodiment 1.
[0052] In B2B procurement platforms, procurement personnel often input compressed descriptions using multiple fields such as "brand, model, category, color, specifications, and page number," while the names in standard product databases are usually shorter and more standardized. This type of input differs from searches in ordinary consumer e-commerce; errors in just a few fields such as model, color, capacity, and compatible models can lead to incorrect procurement items.
[0053] Existing technologies typically employ three types of solutions: The first type uses SQL fuzzy queries or inverted index recall, relying on literal inclusion relationships and struggling to handle model abbreviations, brand aliases, and mixed Chinese and English spellings; the second type uses vector semantic matching, which can identify semantically similar product names but lacks the ability to distinguish precise attributes such as model, color, and specifications; the third type uses traditional N-gram Jaccard similarity, which suffers from an excessively large denominator when the query text is much longer than the candidate standard name, easily underestimating the correct candidate. These solutions can also be used in simple concatenation, but without length adaptation, candidate coverage, and hard attribute constraints, problems such as "semantically similar but incorrect SKU" candidates ranking high, or "correct candidates with shorter standard names" scoring low, will still arise, requiring procurement personnel to perform extensive manual verification.
[0054] This embodiment provides a product name matching and scoring method for B2B procurement scenarios. The specific technical problem to be solved is: in B2B procurement product matching, when the query description length, field completeness and standard name length are inconsistent, how to retain the distinguishing ability of precise attributes such as model and color, while avoiding the underestimation of correct candidates due to excessively long queries in traditional Jaccard.
[0055] This embodiment provides a product name matching and scoring method for B2B procurement scenarios, including the following steps: preprocessing the text of the query product description and candidate standard product names; calculating the text similarity reflecting the degree of literal overlap between the two and the coverage of candidate names; fusing the text similarity with at least one recall channel score and at least one semantic similarity score to obtain a fusion score; excluding candidates or correcting scores based on product attribute constraints; and outputting the final matching score of the candidate products.
[0056] Furthermore, the dynamic mixing formula is as follows: ,in, Represents set similarity. α represents the candidate coverage, and α represents the length adjustment factor determined by the query set size and the candidate set size.
[0057] Furthermore, dynamic hybrid similarity is calculated for both bigram and trigram sets, and text similarity is determined based on the scores at both granularities.
[0058] Furthermore, when candidate names are too short, [the following is introduced]. As a penalty factor, LC is the number of characters in the normalized candidate standard name.
[0059] Furthermore, the fusion score is obtained by weighting the deterministic recall channel score, N-gram text similarity, and vector semantic similarity, with each score first normalized to the range of 0 to 1.
[0060] Furthermore, product attribute constraints include product family constraints, color constraints, and model constraints; candidates are excluded when there is a clear conflict between product families or colors; positive corrections are made when the model is exactly, equivalent, or includes a match; and negative corrections are made when both have models but do not satisfy an exact, equivalent, or include relationship.
[0061] Furthermore, color constraints represent multi-colored products as color sets and determine whether colors conflict based on standard color sets and approximate color mappings.
[0062] Furthermore, the preprocessed tokens are categorized into product keywords, brand keywords, model keywords, variant keywords, and specification keywords, with model keywords taking precedence over specification keywords, brand keywords, variant keywords, and product keywords in determining the main category.
[0063] Furthermore, the final score is truncated to the interval between 0 and 1; if a candidate is hit by any exclusion class constraint, it will not be included in the final sort.
[0064] Furthermore, model constraints are applied based on the query model set and the candidate model set. Positive corrections are applied when there is an exact or equivalent intersection, and negative corrections are applied when both model sets are not empty and there is no exact, equivalent, or inclusion relationship.
[0065] This embodiment also provides a product name matching and scoring system, including a text preprocessing module, an N-gram similarity module, a channel fusion module, an attribute constraint module, and a final score output module. Each module is used to execute the above-described method.
[0066] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores a program, and the program is executed by the processor to implement the above-described method.
[0067] This embodiment also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the above-described method.
[0068] The technical solution of this embodiment will be described in detail below.
[0069] This embodiment presents a product name asymmetric text similarity and multi-dimensional fusion scoring method for B2B procurement scenarios, comprising the following steps: Step 1: Query text preprocessing and token classification.
[0070] The system first performs unified preprocessing on the query text and candidate standard names, including unifying full-width and half-width characters, case, delimiters, common units, simplified / traditional characters, and mapping Chinese and English aliases. During word segmentation, it retains continuous Chinese segments, continuous English letter segments, continuous number segments, mixed alphanumeric segments, and specification segments with units.
[0071] Tokens are categorized according to the rules in the table below. When the same token matches multiple rules, the main category is determined in the order of "model keyword, specification keyword, brand keyword, variant keyword, product keyword", while the sub-category labels are reserved for manual interpretation.
[0072] Table 1 Token Classification Rules
[0073] Brand aliases and model equivalence rules use a maintainable mapping table. For example, "HP" and "HP" are grouped as the same brand; "CF287A" and "87A" can be grouped as the same model in the printing consumables category. When Chinese and English are mixed, alias mapping is performed first, and then similarity calculation is performed.
[0074] The brand dictionary and model equivalence database in the above table are constructed according to the process of "data collection, normalization, equivalence grouping, manual review, and release loading". Brand data can be collected from valid brand master data, brand Chinese and English names, manufacturer information, and historical manual confirmation records; the system normalizes capitalization, full-width and half-width characters, spaces, and separators, mapping approved aliases to unique standard brand identifiers, and words with multiple brands are not considered definitive hits. Model data can be collected from manufacturer model catalogs, standard product model fields, and historically confirmed same-product mappings; the system first unifies letter capitalization and connectors, and then only groups the full model, abbreviation, or industry common name into the same equivalence group when the brand, product family, and key specifications are consistent, forming a two-way mapping. New or conflicting mappings are released according to version and validity status after manual review, and only currently valid and unambiguous mappings are loaded during matching.
[0075] Step 2: Asymmetric N-gram similarity calculation.
[0076] Character-level binary grammar sets and character-level ternary grammar sets are generated for the preprocessed query text and candidate standard names, respectively. Before generation, aliases, units, and case are normalized, and unit characters are retained; tokens are connected by uniform spaces, and n-grams are generated without crossing spaces to avoid misspelling the brand end and model beginning as new features. The generated results are deduplicated by set. Let the n-gram set of query text be Qn, and the n-gram set of candidate standard names be Cn; the binary grammars are Q2 and C2, and the ternary grammars are Q3 and C3. Equations (1) to (4) are calculated for n=2 and n=3 respectively; where Q, C, J, Coverage, α, and S all have the same subscript n, which represent the set or calculation result under the corresponding n-gram.
[0077] (1) (2) (3) (4) (5) The binary and trigram scores are calculated independently using equations (1) to (4) to obtain the binary and trigram scores, respectively. The average of these scores is then multiplied by the short candidate penalty factor to obtain the text similarity score. In equation (5), L... C This indicates the number of characters in the candidate standard name after normalization and removal of spaces and punctuation. The size of the n-gram set is no longer used to avoid confusion between the short candidate penalty and the n-gram set variable. When Qn or Cn is an empty set, Sn of this granularity is directly set to 0, and equations (1) to (4) are no longer executed to avoid the denominator being 0. Candidate coverage is used to solve the problem of low set similarity when long queries match short standard names; short candidate penalty is used to suppress extremely short candidate names with only one or two common words.
[0078] Step 3: Multidimensional fusion scoring.
[0079] (6) in, These are the deterministic recall channel score, the text similarity score from step two, and the vector semantic similarity score, respectively. N-gram text has a higher weight to ensure that model, category, and keyword facet information play a major role in the ranking.
[0080] In Equation (6), 0.20, 0.50, and 0.30 are the initial recommendation weights for the printing consumables and office supplies samples. The logic for their values is as follows: deterministic recall is used to retain precise hit signals, text similarity is used to dominate model and category differences, and vector semantics is used to supplement aliases and word order variations. In actual application implementation, these parameters can be configured as adjustable parameters according to category, but the normalization range for all three types of signals is 0 to 1.
[0081] Table 2 Normalization Rules
[0082] The values of 1.00, 0.85, 0.75, and 0.60 listed in Table 2 are not arbitrary subjective settings. In a preferred embodiment, the system performs stratified sampling from historical products by product category to form a labeled product set containing code or barcode hits, brand and model hits, model alias hits, general keyword recalls, and easily confused negative samples. On the calibration set, a grid search is performed on candidate score combinations that maintain the above confidence order. On the independent validation set, the optimal or near-optimal score combination is selected under the evaluation objective, with the first matching candidate accuracy and automatic confirmation precision as the primary objectives, and candidate recall and key attribute mismatch rates as constraints. The values in Table 2 are the initial recommended values obtained from the sampled products of printing consumables and office supplies. When applied to other categories or when the sample distribution changes, the same process can be used to recalculate and configure according to the version.
[0083] In a preferred embodiment, the vector model uses the text-embedding-v4 vector model, encoding the normalized query text and candidate standard names into 1024-dimensional text vectors; other Chinese or multilingual text vector models can also be used. The selection criteria for alternative models include: the query and candidate sides use the same model and vector dimensions and are compatible with the vector index; the first matching candidate accuracy, candidate recall, and key attribute mismatch rate on the same labeled product set meet preset indicators; single and batch inference latency, call cost, input length, and service stability meet deployment requirements; the model version and interface can be fixed and support caching, failure rollback, and auditing. When changing models, the new model should be used to regenerate candidate vectors and rebuild or update the vector index; vectors generated by different models should not be mixed and compared.
[0084] Step 4: Hard constraints and score adjustments.
[0085] Hard constraints are applied in the following order: exclusion constraints first, strong attribute modifications second, and ordinary scoring last. If a candidate is excluded, it will not proceed to the next scoring stage.
[0086] Product family hard constraint: Product families are determined based on product category, product entity name, and usage term. Queries and candidates that clearly belong to different product families are directly excluded; if the product families are the same and not empty, an additional 0.03 points are added.
[0087] Color hard constraints: Colors are normalized to a standard color set; multi-colored items are compared using an unordered color set; similar colors can be merged using a preset mapping, such as "gray" and "silver gray" can be merged into similar colors. Items with distinct colors on both sides and no overlap in their color sets are directly excluded; items with identical colors or similar mappings receive an additional 0.05 points.
[0088] Model type strong constraints: Exact model matching means that the models are completely identical after normalization; equivalent model matching means that the model matches the equivalent mapping table; inclusion matching means that the model of one party is a complete and continuous substring of the model of the other party without changing the product family. Exact or equivalent matching adds 0.15 points, inclusion matching adds 0.05 points; if both parties have models and the above relationships are not satisfied, deduct 0.35 points.
[0089] Models are processed by set. When the query model set and the candidate model set have an exact or equivalent intersection, the matching model is given priority in scoring. If the query has additional models but these additional models belong to the same equivalence group as the matched models, it is not considered a conflict. If both model sets are not empty and there is no exact, equivalent, or inclusion relationship, it is considered a model conflict and points are deducted. When multiple model rules are triggered simultaneously, exclusion of product families and color rules takes priority, followed by the highest reliable matching relationship in the model set, and unmatched models are retained in the explanation information.
[0090] (7) In formula (7), This represents the final matching score after attribute rule correction and truncation. It is a dimensionless number and its value ranges from 0 to 1. The preliminary fusion score obtained from expression (6); The value represents the color attribute correction. It is +0.05 when the color is consistent or hits a similar color mapping, and 0 when the color is missing or cannot be recognized. When the color is clearly conflicting, the candidate is directly excluded and not entered into equation (7). This represents the model attribute correction amount. It is +0.15 when the model is exactly or equivalently matched, +0.05 when it is a partial match, -0.35 when both have models but they do not match, and 0 when the model is missing or cannot be recognized. The product family correction is +0.03 when the product families are consistent and not empty, and 0 when the product families are missing or cannot be identified. When there is a clear conflict between product families, the candidate is directly excluded and not included in equation (7). min and max together truncate the result of the sum of the corrections to the interval between 0 and 1. All the above corrections are dimensionless and can be configured by category according to the sample calibration process described in Table 3.
[0091] Step 5: Normalize the final score.
[0092] The scores after hard constraint correction are truncated to the interval between 0 and 1 to obtain the final matching score. If a candidate is excluded by any hard constraint, it will not be included in the final ranking.
[0093] Table 3 Parameter Basis and Adaptation Range
[0094] This embodiment uses both Jaccard and candidate coverage, and also uses length ratio. Dynamically adjust the weights of the two. This embodiment performs layered fusion of text similarity, recall channel level and semantic vector score, instead of relying solely on SQL or vectors. In this embodiment, color, model and product family are taken as interpretable hard constraints, so as to prevent candidates with high semantic similarity but errors in key attributes from entering the top of the ranking.
[0095] This embodiment reduces score distortion when a long query matches a short standard name. This embodiment improves the false match interception capability in scenarios with differences in models, colors and product families. The output score of this embodiment is composed of multiple interpretable signals, which facilitates subsequent manual confirmation and audit.
[0096] Embodiment 3 A person skilled in the art may understand this embodiment as a more specific description of Embodiment 1 and Embodiment 2.
[0097] This embodiment takes the compressed matching of printing consumable names as an example. The user inputs "Zhitong 87A CF287A toner cartridge with chip black 9000 pages", and the candidate standard name is "Zhitong toner cartridge 87A black". The system performs word segmentation to obtain model keywords "87A, CF287A", product keyword "toner cartridge", variant keyword "black", and specification keyword "9000 pages".
[0098] At the bigram granularity, assuming that the length adjustment factor, set similarity and candidate coverage are 0.18, 0.12 and 0.56 respectively, then .
[0099] At the trigram granularity, assuming that the length adjustment factor, set similarity and candidate coverage are 0.16, 0.08 and 0.50 respectively, then .
[0100] When the candidate length does not trigger the short name penalty, the text similarity is: .
[0101] If the SQL channel score is 0.85 and the vector semantic score is 0.72 (the 0.72 is a normalized score in the 0 to 1 range), then: . Add 0.05 for color match, add 0.15 for exact model match, add 0.03 for consistent product family, the corrected score is 0.8445, approximately 0.845, which is truncated to the 0 to 1 range and used as the final candidate score.
[0102] The above calculation of the final candidate score can be expressed as: .
[0103] The following example illustrates the exclusion of color conflict candidates: If the candidate standard name is "Zhitong Toner Cartridge 87A Red", although the text similarity and vector semantic score may be high, the query color set is "black" and the candidate color set is "red". The two have no intersection and there is no approximate color mapping. The system directly excludes the candidate in the hard color constraint stage and does not enter the final sorting.
[0104] This invention provides a product name asymmetric text similarity and multi-dimensional fusion scoring method for B2B procurement scenarios. It solves the problems of score distortion and mismatch of key attributes when matching short standard names with long queries by dynamically mixing candidate coverage and Jaccard, fusing three types of signals: recall channel / N-gram / vector, and hard constraint correction of color, model, and product family.
[0105] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, enabling the system and its various devices, modules, and units to function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered both software modules implementing the method and structures within the hardware component.
[0106] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A multi-dimensional fusion matching and scoring method for product names, characterized in that, Includes the following steps: Obtain the query text and candidate standard names, and perform word segmentation on the query text and candidate standard names, and classify the segmented tokens into one of a number of preset attribute categories; Based on the length ratio of the query text and the candidate standard name, the first text similarity index and the second text similarity index are dynamically combined to calculate an asymmetric text similarity score. The asymmetric text similarity score is fused with the score signal of at least one other dimension to obtain a preliminary fused score; Based on the attribute category of the Token, a set of preset product attribute rules are applied to process the preliminary fusion score. The processing includes correcting the score of the preliminary fusion score or determining that the candidate standard name is a mismatch. The score obtained after score correction is truncated to the preset interval [0, 1] to obtain the final matching score.
2. The product name multi-dimensional fusion matching scoring method according to claim 1, characterized in that, The step of classifying the token into one of a set of preset attribute categories includes: Based on the preset dictionary and regular expression rules, the tokens after word segmentation are classified into one of the five preset categories according to the priority order of model, specification, brand, variant, and product.
3. The product name multi-dimensional fusion matching scoring method according to claim 1, characterized in that, The first text similarity metric is Jaccard similarity, and the second text similarity metric is candidate coverage. The step of dynamically combining the first text similarity index and the second text similarity index includes: A mixed similarity is obtained by dynamically weighting the Jaccard similarity and the candidate coverage using a length scaling factor. The length scaling factor is determined based on the size of the N-gram set of the query text and the N-gram set of the candidate standard name, and is equal to the smaller of the two sizes divided by the larger of the two sizes.
4. The product name multi-dimensional fusion matching scoring method according to claim 3, characterized in that, The steps for calculating an asymmetric text similarity score include: Calculate the mixed similarity of character-level bigrams and character-level trigrams separately, and then take the average value; The asymmetric text similarity score is obtained by multiplying the obtained average value by a short candidate penalty factor based on the number of characters in the candidate standard name.
5. The multi-dimensional fusion matching and scoring method for product names according to claim 1, characterized in that, The score signal of at least one other dimension includes: the score from the deterministic recall channel and the semantic similarity score from the vector model; The fusion is a weighted fusion of the asymmetric text similarity score, the deterministic recall channel score, and the semantic similarity score.
6. The product name multi-dimensional fusion matching scoring method according to claim 1, characterized in that, The step of applying a set of preset product attribute rules to process the preliminary fusion score includes: When both the query text and the candidate standard name contain a token with a model attribute, and the model attribute does not match, the preliminary fusion score is deducted as a score correction.
7. The product name multi-dimensional fusion matching scoring method according to claim 6, characterized in that, The score correction further includes: When both the query text and the candidate standard name contain a token with a model attribute, and the model attribute is an exact match or an equivalent match, the preliminary fusion score is increased.
8. The product name multi-dimensional fusion matching scoring method according to claim 1, characterized in that, The step of applying a set of preset product attribute rules to process the preliminary fusion score includes: When the color attribute or product family attribute of the query text conflicts with the candidate standard name, the candidate standard name is determined to be a mismatch.
9. The product name multi-dimensional fusion matching scoring method according to claim 4, characterized in that, The calculation formula for the dynamic weighted combination is as follows: ; in, Represents character-level n-gram syntax; Represents the mixed similarity of character-level n-gram syntax; Jaccard similarity is used to represent character-level n-gram syntax. Indicates the candidate coverage of character-level n-gram syntax; The length scaling factor for character-level n-gram syntax; The calculation formula is: ; The calculation formula is: ; The calculation formula is: ; Where Q is the set of N-grams for query text in character-level n-gram syntax; C is the set of N-grams for candidate standard names in character-level n-gram syntax; |Q∩C| represents the size of the intersection of set Q and set C, |Q∪C| represents the size of the union of set Q and set C; |Q| represents the size of set Q; |C| represents the size of set C; The short candidate penalty factor is The calculation formula is as follows: ; in, The normalized number of characters in the candidate standard name.
10. A multi-dimensional fusion matching and scoring system for product names, characterized in that, include: One or more processors; and instructions stored in the memory of the one or more processors, which, when executed, cause the one or more processors to perform the following steps: Obtain the query text and candidate standard names, and perform word segmentation on the query text and candidate standard names, and classify the segmented tokens into one of a number of preset attribute categories; Based on the length ratio of the query text and the candidate standard name, the first text similarity index and the second text similarity index are dynamically combined to calculate an asymmetric text similarity score. The asymmetric text similarity score is fused with the score signal of at least one other dimension to obtain a preliminary fused score; Based on the attribute category of the Token, a set of preset product attribute rules are applied to process the preliminary fusion score. The processing includes correcting the score of the preliminary fusion score or determining that the candidate standard name is a mismatch. The score obtained after score correction is truncated to the preset interval [0, 1] to obtain the final matching score.