A commodity classification method and system based on attribute rule mapping
Patent Information
- Application Number
- CN202610724855.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-05-25
AI Technical Summary
这类方法存在显著缺陷:首先,自然语言描述具有多样性和复杂性,同一商品特性可能以多种词汇或句式表达,基于固定关键词的规则难以覆盖所有情况,导致召回率低且规则维护成本高昂;其次,不同数据来源对商品属性的描述缺乏统一标准,例如“颜色”可能被表述为“色彩”、“色号”,属性值“红色”也可能写作“猩红”,这种表述差异直接造成归类不一致或错误;再者,现有方法通常缺乏对商品描述深层次语义的理解与结构化提取能力,无法将非结构化文本转化为可供精确匹配的标准化属性组合,从而难以支撑复杂、精细的归类规则体系
通过四个核心步骤的紧密协同,有效解决了背景技术中指出的问题,实现了商品归类的自动化、精准化与标准化。首先,步骤S1接收并解析商品名称与商品自然语言描述得到商品描述文本,为后续处理提供了统一的文本输入源,确保了处理对象的完整性。紧接着,步骤S2从商品描述文本中提取以属性名与属性值组合形式存在的属性信息,该步骤通过识别描述中表征商品特性的文本片段并解析为结构化数据,实现了从非结构化自然语言到机器可处理的关键属性对的转化,这是克服传统关键词匹配局限性、深度理解商品语义的基础。
Smart Images

Figure CN122264909B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer information processing technology, and in particular to a product classification method and system based on attribute rule mapping. Background Technology
[0002] In the fields of product management and e-commerce, accurate and efficient automated classification of massive amounts of goods is fundamental to key business operations such as supply chain management, inventory optimization, intelligent recommendation, and tax calculation. Currently, most mainstream product classification methods rely on manual experience to set keyword rules or simple text matching based on product titles. These methods have significant drawbacks: First, natural language descriptions are diverse and complex; the same product characteristic may be expressed in multiple words or sentence structures, making it difficult for rules based on fixed keywords to cover all situations, resulting in low recall rates and high rule maintenance costs. Second, different data sources lack unified standards for describing product attributes; for example, "color" may be described as "color" or "color code," and the attribute value "red" may be written as "scarlet." Such differences in expression directly lead to inconsistencies or errors in classification. Third, existing methods typically lack the ability to understand and structurally extract the deep semantics of product descriptions, failing to transform unstructured text into standardized attribute combinations that can be accurately matched, thus making it difficult to support complex and sophisticated classification rule systems.
[0003] Therefore, there is an urgent need for a product classification method that can automatically understand the natural language description of products, intelligently extract and standardize key attributes, and perform accurate rule mapping based on standardized attributes, in order to solve the problems of low classification accuracy, poor consistency, insufficient automation and weak system adaptability in existing technologies. Summary of the Invention
[0004] To address the aforementioned problems in the existing technology, the first aspect of this invention proposes a product classification method based on attribute rule mapping, comprising: S1. Based on the product name and natural language description, receive and parse the product name and natural language description to obtain the product description text; S2. Based on the product description text, extract attribute information that exists in the form of a combination of attribute names and attribute values from the product description text to obtain attribute information; wherein, S2 includes: S21. Based on the product description text, use a pre-trained semantic model to identify text fragments that represent product characteristics in the product description text, and obtain text fragments; S22. Based on the text fragment, parse the text fragment to determine the attribute name and the corresponding attribute value of the text fragment, and obtain the attribute name and attribute value; S23. Based on the attribute name and attribute value, combine the attribute name and attribute value to obtain the attribute information; S3. Based on the attribute information, standardize the attribute names and normalize the attribute values to obtain the processed attribute information; wherein, S3 includes: S31. Based on attribute information, obtain a predefined set of standardized attribute names and a set of allowed attribute values corresponding to each standardized attribute name; S32. Based on the attribute names in the attribute information and the set of standardized attribute names, map the attribute names in the attribute information to the corresponding standardized attribute names in the set of standardized attribute names to obtain the mapped attribute names; S33. Based on the mapped attribute name, the corresponding attribute value in the attribute information, and the set of allowed attribute values, normalize the attribute values to obtain normalized attribute values. S34. Based on the mapped attribute names and normalized attribute values, combine the mapped attribute names and normalized attribute values to generate processed attribute information; S4. Match the processed attribute information with a preset lookup table. The lookup table defines the correspondence between attribute information combinations and classification identifiers to obtain the product's classification identifier.
[0005] Compared with the prior art, the beneficial effects of the present invention are as follows: Through the close collaboration of four core steps, the problems pointed out in the background technology are effectively solved, achieving automation, accuracy, and standardization of product classification. First, step S1 receives and parses the product name and natural language description to obtain the product description text, providing a unified text input source for subsequent processing and ensuring the integrity of the processed objects. Next, step S2 extracts attribute information in the form of attribute name and attribute value combinations from the product description text. This step identifies and parses text fragments representing product characteristics in the description into structured data, realizing the transformation from unstructured natural language to machine-processable key attribute pairs. This is the foundation for overcoming the limitations of traditional keyword matching and deeply understanding product semantics.
[0006] Next, step S3 standardizes and normalizes the extracted attribute information. This is done by mapping attribute names to predefined standardized attribute names and normalizing attribute values based on a set of allowed attribute values, unifying the diverse and varied original attributes into a standardized format. This step is crucial, as it eliminates ambiguity and inconsistency caused by different description methods, generating standardized and clean processed attribute information, laying a solid foundation for subsequent accurate matching. Finally, step S4 matches the processed attribute information with a pre-defined lookup table, which defines the correspondence between attribute information combinations and classification identifiers, thereby directly outputting the product's classification identifier. The entire process forms a closed loop: steps S2 and S3 together complete the "understanding" and "cleaning" of the original descriptions, outputting highly standardized attribute combinations; step S4 then uses these standardized attributes to perform "judgment," achieving accurate classification. Each step is interconnected, and their synergistic effect is as follows: S1 ensures input uniformity, S2 achieves semantic parsing and structural extraction, S3 ensures data standardization and consistency, and S4 completes rule-based accurate mapping. Overall, this method significantly improves the accuracy and efficiency of product classification, reduces reliance on human experience, and enhances the system's ability to handle diverse and non-standard product descriptions. Attached Figure Description
[0007] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0008] Figure 1 The diagram shown is a flowchart illustrating a product classification method based on attribute rule mapping according to an embodiment of the present invention. Figure 2 The diagram shown is a structural schematic of a commodity classification system based on attribute rule mapping provided in an embodiment of the present invention. Detailed Implementation
[0009] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0010] The specific embodiments of the present invention will be described below.
[0011] Example 1 like Figure 1 As shown, the first aspect of this invention proposes a product classification method based on attribute rule mapping, comprising: S1. Based on the product name and natural language description, receive and parse the product name and natural language description to obtain the product description text; S2. Based on the product description text, extract attribute information that exists in the form of a combination of attribute names and attribute values from the product description text to obtain attribute information; wherein, S2 includes: S21. Based on the product description text, use a pre-trained semantic model to identify text fragments that represent product characteristics in the product description text, and obtain text fragments; S22. Based on the text fragment, parse the text fragment to determine the attribute name and the corresponding attribute value of the text fragment, and obtain the attribute name and attribute value; S23. Based on the attribute name and attribute value, combine the attribute name and attribute value to obtain the attribute information; S3. Based on the attribute information, standardize the attribute names and normalize the attribute values to obtain the processed attribute information; wherein, S3 includes: S31. Based on attribute information, obtain a predefined set of standardized attribute names and a set of allowed attribute values corresponding to each standardized attribute name; S32. Based on the attribute names in the attribute information and the set of standardized attribute names, map the attribute names in the attribute information to the corresponding standardized attribute names in the set of standardized attribute names to obtain the mapped attribute names; S33. Based on the mapped attribute name, the corresponding attribute value in the attribute information, and the set of allowed attribute values, normalize the attribute values to obtain normalized attribute values. S34. Based on the mapped attribute names and normalized attribute values, combine the mapped attribute names and normalized attribute values to generate processed attribute information; S4. Match the processed attribute information with a preset lookup table. The lookup table defines the correspondence between attribute information combinations and classification identifiers to obtain the product's classification identifier.
[0012] Specifically, a product classification method based on attribute rule mapping begins with the reception and parsing of raw product information. This step aims to integrate fragmented information into a unified text unit for subsequent analysis. The system receives the input product name and natural language description. The product name is usually a concise and general term, while the natural language description is a more detailed and colloquial supplement, such as user reviews, product introductions provided by suppliers, or title extensions. The text receiving and parsing module merges these texts from different sources and potentially varying formats, and performs basic text preprocessing operations, such as removing irrelevant special characters and merging redundant spaces, to form a complete and coherent product description text. This "product description text" is a single string containing all input information; it is the sole input source for all subsequent advanced semantic processing operations. Its generation ensures the preservation of product information integrity, avoiding contextual fragmentation or information loss that may occur when processing multiple independent inputs, thus laying a solid foundation for building a unified analysis pipeline.
[0013] Next, the system needs to identify and extract key information representing product characteristics from continuous natural language text; this is the purpose of the attribute information extraction step. The core of this step is to use a pre-trained semantic model to understand the deeper meaning of the text. A "pre-trained semantic model" typically refers to a deep learning model pre-trained on a large-scale general corpus, such as BERT or its variants based on the Transformer architecture. These models can map words in text to a high-dimensional semantic space, thereby understanding the specific meaning of words in context. In this method, the model is used to scan the entire product description text, identifying text fragments related to the product's physical characteristics, functions, and materials. For example, for the text "a waterproof backpack with a lightweight magnesium alloy frame," the model understands that "lightweight magnesium alloy frame" describes the "material" and "structural" characteristics, "waterproof" describes the "functional" characteristic, and "backpack" describes the "category" characteristic. These identified text fragments are initially extracted as candidate attribute information carriers.
[0014] After obtaining candidate text fragments, they need to be structured and parsed to obtain explicit attribute name and attribute value pairs. This is a process of converting natural language fragments into machine-readable key-value pairs. The system determines the standardized attribute name and its specific value for each fragment by analyzing the syntactic structure and semantic roles of the text fragments, or by matching using a predefined attribute name pattern library. For example, for the fragment "lightweight magnesium alloy frame", the system can parse the attribute name as "main material" and the attribute value as "magnesium alloy"; for the fragment "waterproof", it can parse the attribute name as "waterproof performance" and the attribute value as "yes". This parsing process relies on the encoding of domain knowledge and may combine rule templates with machine learning models to ensure accurate extraction of structured "attribute names" and "attribute values" from diverse expressions. Finally, the system combines these parsed attribute names and attribute values to form an initial set of attribute information, for example, represented as {"main material": "magnesium alloy", "waterproof performance": "yes", "category": "backpack"}, thus completing the conversion from unstructured text to structured attribute data.
[0015] However, directly extracted attribute information often suffers from inconsistent representation, necessitating standardization and normalization. This step introduces two key concepts: the "standardized attribute name set" and the "allowed attribute value set." The "standardized attribute name set" is a predefined, finite, and standardized list of attribute dimensions, such as {"material", "color", "function", "size"}, representing all attribute categories relevant to the classification system. The "allowed attribute value set" is a list of acceptable standard values defined for each standardized attribute name; for example, for "color," the set might be {"red", "white", "blue", "black"}. During processing, the system first maps the extracted attribute name (e.g., "main material") to the most matching item in the standardized attribute name set (e.g., "material"). This process is called attribute name standardization. Next, for the original attribute value corresponding to the standardized attribute name (e.g., "magnesium alloy"), the system checks whether it already exists in the "allowed attribute value set." If an attribute exists, it is used directly; if it does not exist, semantic similarity is calculated, and a standard value that is semantically closest is found in the allowed set for replacement. For example, "space gray" is normalized to "gray". This process is called attribute value normalization. After this processing, all attribute information is unified into the preset standard system, generating clean and unambiguous processed attribute information.
[0016] Finally, the classification decision is made by matching the processed attribute information against a pre-defined lookup table. This "pre-defined lookup table" is a knowledge base or rule base that explicitly defines the product classification identifiers corresponding to different combinations of standardized attribute information. Classification identifiers can be classification codes, category names, or other forms of classification labels. The matching process involves searching this lookup table to see if a record exists whose defined attribute combination is completely consistent with the processed attribute information of the current product or satisfies certain matching rules. Once a match is found, the classification identifier associated with that record is output as the result. For example, if the processed attribute information is {"Material": "Plastic", "Main Use": "Liquid Container", "Capacity": "500ml"}, the corresponding classification identifier in the lookup table is "Water Bottle". This step links standardized data with explicit business rules, achieving a leap from data to decision.
[0017] This method constructs a complete automated classification pipeline through the four steps described above. First, text integration ensures information integrity. Then, a deep learning model overcomes the limitations of surface-level text, deeply understanding and extracting structured attribute pairs. Next, a forced standardization and normalization process thoroughly cleans the data, eliminating interference from diverse expressions and generating high-quality, unified attribute representations. Finally, a clearly defined rule base (reference table) is used to accurately match this clean data, yielding reliable classification conclusions. These four steps are interconnected and work synergistically: without accurate and in-depth information extraction, subsequent processing is futile; without thorough standardization, rule matching will be highly unstable due to data noise; and without a pre-defined rule base, all previous processing will fail to lead to the final classification goal. This method systematically solves the core problem of inaccurate and inconsistent classification caused by the diversity and non-standardization of natural language descriptions, achieving highly accurate, consistent, and automated product classification.
[0018] In some implementations, S21 includes: S211. Based on the product description text, input the product description text into the named entity recognition model to obtain the model output fragment output by the named entity recognition model; S212. Based on the model output fragments, determine the text fragments in the model output fragments that belong to the preset attribute category words, and obtain the preset attribute category word fragments; S213. Based on the preset attribute category vocabulary fragments, the preset attribute category vocabulary fragments are used as text fragments representing the characteristics of the product to obtain text fragments.
[0019] Specifically, Named Entity Recognition (NER) is a classic technique in Natural Language Processing (NLP). Its purpose is to identify entities with specific meanings in text, such as names of people, places, organizations, and product attributes specific to a particular context. In practice, this requires building or selecting a NER model suitable for the product domain. This is typically achieved through the following steps: First, a large amount of historical product description text is collected as training corpus. Then, professionals annotate this text, labeling words describing product characteristics such as material, color, function, and brand as corresponding entity types. For example, "pure cotton" is labeled as a MATERIAL entity, and "Bluetooth 5.0" as a FUNCTION entity. Using this labeled data, a sequence labeling model, such as one based on BiLSTM-CRF or BERT, can be trained. This model becomes the embodiment of the "pre-trained semantic model" in this stage, specifically designed to identify product attribute entities.
[0020] When new product description text needs processing, the system inputs it into this named entity recognition model. The model analyzes the text word by word and outputs a label for each word or phrase, thus marking all fragments in the text that are considered "entities." These model output fragments may include various types of entities, such as the brand name "Apple," the material "stainless steel," the color "rose gold," and the technical term "OLED screen." However, not all identified entities are directly equivalent to the "attributes" required for product classification. For example, "free shipping" might be identified as a service entity, but it is unrelated to the physical attributes of the product itself. Therefore, directly using the model output fragments as text fragments is not accurate enough.
[0021] To further focus on classification-related characteristics, the system introduces a "preset attribute category vocabulary." This vocabulary is a carefully designed list containing typical keywords or phrases for various dimensions relevant to product classification (such as material, color, function, size, etc.). It is not a simple list of synonyms, but rather represents the core cognitive dimensions of the classification system. The system compares and filters all model output fragments from the named entity recognition model against this preset attribute category vocabulary. The judgment logic is: if the semantics expressed by a model output fragment are highly relevant to or belong to a subset of words under a certain attribute category in the vocabulary, then the fragment is determined to belong to the preset attribute category vocabulary fragment. For example, the fragment "OLED" identified by the model is highly semantically relevant to keywords (such as "LCD," "AMOLED") under the "screen type" category in the vocabulary, so "OLED" is retained as a valid fragment. The fragment "free shipping" cannot be associated with any core attribute category and is therefore filtered out. This process ensures that the final retained text fragments have clear semantic orientation related to the inherent attributes of the product.
[0022] Finally, the pre-defined attribute category vocabulary fragments retained through the above screening mechanism are formally identified as the "text fragments" to be output in step S21. These fragments undergo double verification: first, the named entity recognition model confirms from a syntactic and semantic perspective that they are meaningful independent conceptual units in the text; second, the pre-defined attribute category vocabulary confirms from a business logic perspective that they are the core attribute carriers of interest for classification. This method combines the broad recognition capability of statistical models with the precise focusing capability of domain knowledge. This embodiment provides a stable and reproducible technical path for extracting attribute-related fragments from free text. It reduces reliance on fixed sentence structures or simple keyword matching and can more effectively handle colloquial and varied product descriptions, such as identifying the functional fragment "clear photos" from "photos are exceptionally clear." This significantly improves the robustness and accuracy of the attribute information extraction step, providing a more reliable foundation for subsequently generating correct attribute names and attribute value combinations, and is one of the key guarantees that the entire classification method can handle complex real-world data.
[0023] In some implementations, S33 includes: S331. Based on the attribute value corresponding to the mapped attribute name and the set of allowed attribute values, determine whether the attribute value exists in the set of allowed attribute values, and obtain the determination result; S332. If the judgment result is that it exists, then retain the attribute value and obtain the attribute value to be combined; S333. If the judgment result is that it does not exist, then based on the semantic similarity calculation between the attribute value and each element in the set of allowed attribute values, select the element with the closest semantics from the set of allowed attribute values to replace the attribute value, and obtain the attribute value to be combined.
[0024] In attribute information processing, normalizing attribute values is a core step in ensuring data consistency. This embodiment details the intelligent processing method when an attribute value is not within the standard set. Specifically, before performing normalization, the system has already standardized attribute names; that is, each attribute name is mapped to a standardized attribute name (e.g., "color"). For each standardized attribute name, the system maintains a corresponding "set of allowed attribute values," which is a closed, predefined list of standard values. For example, the allowed set for "color" is {"red", "white", "blue", "black"}. The system first performs a direct judgment: checking whether the original attribute value (e.g., "burgundy" or "crimson") extracted from the text and preliminarily parsed directly exists in the set of allowed attribute values. This "judgment result" is a Boolean value that determines the subsequent processing branch.
[0025] If the judgment result is "existent," meaning the attribute value "red" is already within the allowed set, this indicates that the user's description happens to use standard terminology. In this case, the system does not need to perform any transformation and directly retains the original attribute value as the "attribute value to be combined." This path has the highest processing efficiency and is suitable for routine situations that heavily utilize standard terminology.
[0026] If the result is "not found," it means the user's description used non-standard, personalized, or more granular vocabulary, such as "burgundy," "auntie red," or "Burgundy red." Simply discarding these values would result in information loss, while forcibly assigning them to a random standard value would lead to errors. In this case, the system initiates a semantic understanding-based conversion process. Its core is calculating the "semantic similarity" between the non-standard attribute value and each standard value in the set of allowed attribute values. Semantic similarity calculation is typically implemented using word vector models. Word vector models (such as Word2Vec, GloVe, or state-of-the-art context-based models) can map words to a high-dimensional vector space where semantically similar words have closer vector distances. The system will pre-train or load a pre-trained word vector model using a large-scale corpus.
[0027] During computation, the system converts non-standard attribute values (such as "burgundy") and each candidate value in the allowed set ("red", "white", etc.) into corresponding word vectors. Then, it measures the semantic similarity between the vectors by calculating the cosine similarity, which ranges from -1 to 1, with values closer to 1 indicating greater semantic similarity. The system iterates through the entire set of allowed attribute values to find the standard value with the highest cosine similarity to the "burgundy" vector. Assuming the calculation shows that "red" has the highest similarity to "burgundy," significantly higher than "white," "blue," etc., the system will determine "red" as the semantically closest element.
[0028] Finally, the system uses the selected standard value "red" to replace the original non-standard value "burgundy," and outputs "red" as the final "attribute value to be combined" for subsequent generation of processed attribute information. This embodiment establishes a two-stage, intelligent attribute value processing channel. The first stage ensures efficiency in handling common cases by quickly finding matching standard values. The second stage provides a scientific and flexible solution for handling non-standard, long-tail descriptions by introducing semantic similarity calculation. This method is no longer a mechanical string matching, but truly understands the meaning of words, thus correctly handling synonyms (such as "laptop" and "notebook computer"), near-synonyms (such as "extra-large" and "enlarged"), and even words at different levels of abstraction (such as "deep sea blue" and "blue"). This greatly enhances the system's adaptability and generalization ability, enabling the classification system to produce stable and standardized attribute data even when facing ever-changing market description language, fundamentally ensuring the accuracy and reliability of subsequent rule matching. This is a key technical detail that makes this method practical.
[0029] In some implementations, S4 includes: S41. Input the processed attribute information into the first-level mapping module. The first-level mapping module performs mapping based on the first lookup table to obtain at least one pre-classification identifier. S42. Based on at least one pre-classification identifier and processed attribute information, input at least one pre-classification identifier and processed attribute information into the secondary mapping module. The secondary mapping module performs mapping based on the second lookup table to obtain the classification identifier of the product.
[0030] This embodiment proposes a hierarchical mapping architecture that decomposes the matching process into two stages, handled by a first-level mapping module and a second-level mapping module, respectively, using a first lookup table and a second lookup table. The core idea of this design is to simulate the human "coarse-to-fine" classification thinking to improve the overall mapping efficiency and accuracy.
[0031] In practice, the first-level mapping module plays the role of "coarse classification" or "scope limitation." Its primary lookup table stores mapping rules between relatively broad product categories and a set of key attributes. These rules may rely on only a few core attributes. For example, a rule might be defined as: if the attribute information contains {"main use": "for liquids", "portability": "yes"}, then its pre-classification identifier is "water container category". When the processed attribute information is input, the first-level mapping module searches and matches it in the primary lookup table. Upon successful matching, its output "at least one pre-classification identifier" is typically one or several broad category labels, such as "clothing," "electronic devices," or "kitchenware," or more specific but still broad category identifiers, such as "tops" or "audio equipment." The key function of this step is to quickly locate one or several candidate regions within the vast product space, thereby limiting subsequent fine-grained matching to a smaller scope and avoiding inefficient global searches across the entire rule base.
[0032] Next, the secondary mapping module performs "refined classification" or "precise discrimination" within the narrowed candidate range. It takes the pre-classification identifier output by the primary mapping module and the complete processed attribute information as input. The second lookup table it relies on has a different structure than the first lookup table; it is hierarchical and typically uses the pre-classification identifier as the index key. Each pre-classification identifier (e.g., "top") is associated with a set of more refined and stringent further mapping rules. These rules define how to subdivide the broad category of "top" into "T-shirt," "shirt," "sweater," "jacket," etc., based on more specific attribute combinations. The secondary mapping module verifies all the refinement rules under the pre-classification identifier based on all the attribute information of the current product. For example, for the pre-classification identifier "top," there might be a rule requiring that {"sleeve length": "long sleeve," "collar type": "collared," "front opening method": "buttoned"} be simultaneously satisfied to be classified as a "shirt." The system will perform logical judgment to find the refined rule that satisfies all conditions.
[0033] Ultimately, the secondary mapping module outputs the most specific sub-identifier that satisfies all conditions, serving as the final "classification identifier" for the product. If no rules are fully satisfied under a pre-classification identifier, or if rules are satisfied under multiple pre-classification identifiers, the system can make a final decision based on a preset conflict resolution strategy (such as selecting the one with the highest priority or the highest attribute matching degree). This two-level mapping implementation in this embodiment brings multiple benefits by modularly decomposing complex matching problems. In terms of performance, it rapidly filters through primary mapping, significantly reducing the number of rules that secondary mapping needs to scan, thus improving system processing speed. In terms of accuracy, it separates the management of broad rules and fine-grained rules, allowing for more focused and complex formulation of fine-grained rules without worrying about affecting the efficiency of broad category matching, thereby supporting more accurate and fine-grained classification. In terms of maintainability, this structure is clear, concise, and easy to extend; when adding a new sub-category, only rules need to be added under the corresponding parent pre-classification identifier, without modifying the first lookup table or rules of other unrelated categories. This design significantly enhances the scalability, manageability, and ability to handle complex classification systems of the entire classification system, enabling it to adapt to the massive and dynamically growing product classification needs of e-commerce platforms.
[0034] In some implementations, S41 includes: S411. Based on the processed attribute information, find the attribute information combination that completely matches the processed attribute information in the first lookup table; S412. If a perfectly matching combination of attribute information is found, the corresponding pre-classification identifier in the first lookup table is output to obtain the pre-classification identifier; S413. If no completely matching attribute information combination is found, the associated pre-classification identifier is retrieved as output based on the partial matching relationship between the processed attribute information and the attribute information combination in the first lookup table, thus obtaining the pre-classification identifier.
[0035] In practice, after the processed attribute information is sent to the first-level mapping module, the module first attempts to perform a "complete match" search. Here, "complete match" is a strict definition; it requires that in the first lookup table, there exists an attribute information combination record where all attribute names and their corresponding values must be completely identical to the attribute names and values in the input processed attribute information. Furthermore, the input information is generally not allowed to contain any additional attributes. For example, if the input information is {Material: Ceramic, Use: Drinking, With Handle: Yes}, and the first lookup table happens to contain a rule whose attribute information combination is defined as {Material: Ceramic, Use: Drinking, With Handle: Yes}, and it is associated with the pre-classification identifier "Mug", then the system will immediately determine that the complete match is successful and output "Mug" as the pre-classification identifier. Complete matching is the most efficient and deterministic matching method, providing a fast track for standard situations where rules are clear and information is complete.
[0036] However, product descriptions may be incomplete, or the rules in the first lookup table may be inclusive. When a perfect match fails, the system will not directly return no results, but will initiate a "partial match" retrieval. This "partial match relationship" needs to be explicitly defined. A common and reasonable definition is: the processed attribute information combination of the input is a "subset" of a certain attribute information combination in the table. That is, there exists a rule in the table whose defined attribute combination includes all attribute names and values in the input information, but may also define other additional attribute conditions. For example, the input information is {energy type: electricity, main function: refrigeration}. There may not be two completely identical attribute combinations in the first lookup table, but there is a rule {energy type: electricity, main function: refrigeration, placement method: upright}, with the association identifier "refrigerator". In this case, the core features of the input (electric drive, refrigeration function) are completely covered by this "refrigerator" rule, and the input information is a subset of the rule's conditions. The system will retrieve all table records that have this "subset" relationship and include their associated pre-classification identifiers (such as "refrigerator", "air conditioner" etc.) as candidate outputs.
[0037] This implementation endows the first-level mapping module with strong fault tolerance and reasoning capabilities. Complete matching ensures accuracy and efficiency under ideal conditions, forming the cornerstone of system performance. Partial matching, as an important supplementary mechanism, allows the system to make reasonable inferences and classify products into potentially correct categories even when information is incomplete (e.g., the user hasn't described the "placement method") or the rule base is designed to "meet the core conditions." This enables the system to handle a wider range of real-world scenarios, such as brief descriptions of secondhand goods or clickbait product information. By combining these two matching strategies, the first-level mapping module maximizes its probability of successfully generating pre-classification labels, providing rich and high-quality input candidates for the second-level mapping module. This avoids the entire classification process being interrupted in the early stages due to missing minor attributes, ensuring the smoothness and practicality of the entire hierarchical mapping system in real-world application environments. This is a key design feature for improving the overall system success rate and user experience.
[0038] In some implementations, S42 includes: S421. Based on at least one pre-classification identifier, query the second lookup table; S422. Based on the query results, obtain the further mapping conditions corresponding to each pre-classification identifier in the second lookup table. The further mapping conditions are defined by attribute information. S423. Based on the processed attribute information, verify whether the further mapping conditions are met, and obtain the verification result; S424. Based on the verification results, determine the pre-classification identifier that meets the conditions from at least one pre-classification identifier, and use it as the classification identifier of the product.
[0039] This embodiment further refines the workflow of the secondary mapping module, defining how to determine the final unique classification identifier from multiple pre-classification identifiers using a second lookup table and "further mapping conditions." This process begins with "querying the second lookup table based on at least one pre-classification identifier." The core of this "query" operation is using each pre-classification identifier passed from the primary mapping module as a retrieval key. The second lookup table is typically organized hierarchically or in groups, either physically or logically. For example, it could be a relational database table with a field for "pre-classification identifier," where each different pre-classification identifier value is associated with multiple rows; or it could be an in-memory dictionary structure with pre-classification identifier strings as keys and a list of values. When the system inputs one or more pre-classification identifiers (such as "shoes" or "sports equipment"), the query operation locates and retrieves all entries corresponding to these identifiers in the second lookup table. These entries collectively constitute a set of refined classification rules for the current candidate category.
[0040] After a successful query, the system proceeds to the stage of "obtaining further mapping conditions corresponding to each pre-classification identifier in the second lookup table." "Further mapping conditions" are the core concept here; they are not simply category labels, but rather one or more logically defined judgment rules based on attribute information. Specifically, each further mapping condition can be expressed as a conditional expression or rule body, which clearly specifies the specific constraints that the processed attribute information of the product must meet to be classified into a more detailed category (i.e., the final classification identifier) under that pre-classification identifier. These constraints are usually manifested as limitations on specific attribute names and their values. For example, for the pre-classification identifier "shoes," one further mapping condition might be expressed as: IF (the attribute value of the attribute name "sole material" equals "rubber") AND (the attribute value of the attribute name "applicable scenario" equals "sports") THEN Classification identifier: "sports shoes." Another condition might be: IF (the attribute value of the attribute name "upper material" equals "leather") AND (the attribute value of the attribute name "heel height" is greater than "5 cm") THEN Classification identifier: "women's high heels." Obtaining these conditions means fully loading these implicit or explicit stored logical rules into memory to prepare for subsequent verification.
[0041] The next crucial step is the verification process: "Based on the processed attribute information, verify whether the further mapping conditions are met." Verification is a logical reasoning process that evaluates each condition individually. The system iterates through all further mapping conditions related to the current pre-classification identifier, obtained from the second lookup table. For each condition, the system checks whether the complete "processed attribute information" (i.e., the standardized and normalized set of attribute key-value pairs) of the current product makes the logical result of the condition expression "true." This typically involves checking if the attribute name required by the condition exists in the attribute information, and whether its corresponding attribute value conforms to the value or value range specified in the condition. For example, for the condition "sports shoes" mentioned above, the verification process checks whether the processed attribute information contains the attribute names "sole material" and "applicable scenario," and whether their values are exactly "rubber" and "sports," respectively. If all condition items match, the condition is met; if any item does not match, the condition is not met. The system records the verification result of "met" or "not met" for each condition under each pre-classification identifier.
[0042] Finally, the system "determines the pre-classification identifier that meets the conditions from at least one pre-classification identifier based on the verification results, and uses it as the product's classification identifier." This is a decision-making step. The decision logic needs to handle multiple situations: Ideally, among all input pre-classification identifiers, there is exactly one identifier for which exactly one further mapping condition is fully satisfied, then the final sub-identifier pointed to by that condition (such as "sports shoes") is directly determined as the output. However, there may be more complex situations, such as multiple conditions being satisfied under one pre-classification identifier, or conditions being satisfied under multiple different pre-classification identifiers. In this case, a pre-set conflict resolution strategy is needed. A common strategy is "specificity priority," that is, selecting the result with more and more specific condition constraints; or, priority weights can be set for different conditions. Through this standardized query, retrieval, verification, and decision-making process, the secondary mapping module can systematically converge a broad range of category candidates to a precise final classification based on strict attribute rules. This embodiment transforms the fine-grained classification process from fuzzy similarity judgments to clear, rule-based logical satisfaction verification, greatly improving the accuracy, objectivity, and interpretability of classification. It ensures that even when faced with products with complex attributes that may simultaneously meet the characteristics of multiple major categories, the system can make a unique and reasonable judgment based on clear, predefined knowledge rules. This is the core guarantee for achieving high-precision automated classification.
[0043] In some implementations, after S4, the following is also included: S5. Based on the product's classification identifier and the processed attribute information used for matching, the classification identifier and the processed attribute information are associated and stored to obtain the associated storage result; S6. When a verification request for a categorized product is received, the corresponding categorization identifier and processed attribute information are retrieved from the associated storage results based on the product identifier in the verification request.
[0044] After completing the product classification process, this embodiment introduces a subsequent data persistence and traceability mechanism, which forms the foundation for the maintainability and auditability of the entire classification system. This mechanism begins in step S5, and its goal is to "associate and store the classification identifier with the processed attribute information." "Associated storage" here does not simply mean storing two data items side-by-side in a file or database, but rather establishing a robust, reversibly searchable logical binding relationship. When the system successfully generates a classification identifier for a product (e.g., "LCD TV - 55-inch"), it is necessarily accompanied by complete evidence for reaching that conclusion—namely, the "processed attribute information" (e.g., {"Display Technology": "LCD", "Screen Size": "55-inch", "Resolution": "4K"}). Associated storage means that a data structure or record needs to be created in the storage medium so that both data items can be retrieved simultaneously and without error, and ideally, the causal relationship between them should be clearly recorded. One of the most direct implementations is to create a record in the database table containing three core fields: a "product identifier" (such as a product SKU or task ID) that uniquely identifies the categorization event or the product itself, a categorization identifier field, and a field for storing processed attribute information (which can be stored as a JSON string or a serialized object). In this way, the product identifier or categorization task ID serves as the primary key or index, linking the categorization result to the attribute data it is based on.
[0045] The technical benefits of this associative storage are twofold: First, it endows the classification results with "interpretability." The classification decision is no longer a black-box output; the specific standardized attributes upon which it is based are clearly recorded. When business personnel or the quality control system question "why this product is classified as category A instead of category B," they can directly retrieve the stored processed attribute information and manually verify it against a pre-set checklist. This quickly pinpoints whether the problem lies in the attribute extraction or standardization stage, or in the rule definition itself, greatly facilitating system debugging, optimization, and trust establishment. Second, these massive amounts of accurately labeled (classification identifiers) structured attribute information pairs (processed attribute information) constitute extremely valuable training data assets. They can be used for continuous iterative optimization of the attribute extraction model or for discovering new, potential classification rules through data mining, enabling the system to self-evolve.
[0046] Based on the aforementioned storage infrastructure, this embodiment further defines an active verification mechanism in step S6: "When a verification request for a categorized product is received, the system retrieves and outputs the corresponding categorization identifier and processed attribute information from the associated storage results based on the product identifier in the verification request." Here, the "verification request" is a clear service call, and its input parameters must include a "product identifier" that can accurately locate a historical storage record. This identifier must be strictly consistent with the identifier used in step S5, such as the same product ID or categorization task serial number. After receiving the request, the system performs a retrieval "based on the product identifier in the verification request," which is essentially an efficient database query operation. The system uses the product identifier as the query key to search in the database table or index storing the associated results. Since the product identifier is usually a primary key or indexed, this retrieval operation can be completed in a very short time, achieving near real-time response. Once a unique storage record is located, the system "retrieves" the contents of the "categorization identifier" and "processed attribute information" fields stored in that record from the associated storage results. Finally, "output the corresponding classification identifier and processed attribute information" means returning this data to the requester, which may be displayed to the administrator on the front-end interface or passed to another auditing system for analysis.
[0047] This embodiment constructs a complete "data closed loop" and "quality assurance" system for the automated classification system. Step S5's systematic archiving completely solidifies the "input (original description) - intermediate process (standardized attributes) - output (classification identifier)" of each classification decision, forming an immutable operation log and knowledge accumulation. This not only meets the compliance requirements of business operation traceability but also provides a data foundation for system performance monitoring and continuous optimization. Step S6 provides a convenient and efficient standardized interface for accessing this knowledge base, making the classification decision-making process transparent, auditable, and traceable. This transforms the entire method from a simple classification algorithm into a stable and reliable service with production system characteristics. It ensures that any classification operation can be traced and reviewed during long-term, large-scale operation, enabling rapid response to business changes, correction of system deviations, and continuous improvement of classification accuracy based on real data, fundamentally enhancing the practical value and robustness of the entire system.
[0048] In some implementations, S5 includes: S51. Generate a unique tracking identifier for the product based on its classification identifier and processed attribute information; S52. Based on the unique tracking identifier, classification identifier, and processed attribute information, establish the association between the unique tracking identifier, classification identifier, and processed attribute information; S53. Based on the association relationship, perform storage operations to obtain the associated storage result.
[0049] This embodiment delves into the key engineering implementation details of the stored procedure, particularly how to ensure the accuracy and uniqueness of associations and the efficiency of subsequent retrieval. Its core innovation lies in introducing and utilizing a "unique tracking identifier." The process begins with step S51: "Generate a unique tracking identifier for the product based on the product's classification identifier and the processed attribute information used for matching." The fundamental purpose of generating this "unique tracking identifier" is to create a globally unique and reproducible label for "this specific classification decision." Directly using the product ID may not be sufficient, as the same product may be classified multiple times due to description updates; while using only timestamps may lead to conflicts. A widely adopted and reliable implementation method in distributed systems is to use a cryptographic hash function, such as the SHA-256 algorithm. Specifically, the system concatenates the "classification identifier" string and the normalized string representation of the "processed attribute information" (e.g., converting attribute key-value pairs into a standard JSON string after lexicographical order of key names) to form a string representing the complete information of this decision. Then, the SHA-256 hash function is applied to this string to calculate a fixed-length (e.g., 256-bit) hash value. This hash value is the "unique tracking identifier." The properties of hash functions guarantee that: as long as there are any slight differences in the input information (classification identifier and attribute information), the output hash value will change drastically and unpredictably, thus ensuring the uniqueness of the identifier; at the same time, the same input will always produce the same output, ensuring the deterministic nature of repeated generation.
[0050] After generating the unique trace identifier, step S52, "establishing the association between the unique trace identifier, the classification identifier, and the processed attribute information," refers to establishing a link structure centered on the unique trace identifier within the physical or logical model of data storage. A typical and efficient approach is to design a database table where the "unique trace identifier" field is set as the primary key. This table contains at least three fields: unique_trace_id (primary key, storing the hash value), classification_label (storing the classification identifier), and processed_attributes (storing the processed attribute information in CLOB, TEXT, or JSON format). When an insert operation is performed, the system writes these three values as a record to this table. Through this design, the unique trace identifier is no longer an ordinary data field, but becomes an "address pointer" or "digital fingerprint" for accurately and quickly locating this complete classification record throughout the entire storage system. The classification identifier and the processed attribute information, as data content, are tightly bound to this pointer, and the three constitute an inseparable storage unit.
[0051] Finally, step S53, "Based on the association, perform a storage operation to obtain the associated storage result," is a specific persistence action. The system securely writes the complete record, containing a unique tracking identifier (primary key), a classification identifier, and processed attribute information, into the persistent storage engine via a database INSERT operation. To ensure data consistency, this operation should be performed under the protection of database transactions, ensuring that either the entire record is successfully written or a complete rollback occurs in the event of a failure, avoiding inconsistent data states (e.g., only the identifier is written, but attribute information is lost). After the storage operation is successful, this associated record officially becomes part of the "associated storage result."
[0052] This implementation cleverly solves several key problems in large-scale data storage by introducing a unique tracking identifier generated by a hash function. First, it provides absolute uniqueness, completely avoiding the possibility of identifier conflicts due to unexpected reasons for different classification decision records. Second, the database table design using the hash value as the primary key makes queries based on this identifier extremely efficient, which is crucial for rapid verification responses. Furthermore, this structure decouples data (classification identifier and attribute information) from its unique identifier, resulting in a clear, standardized storage model that is easy to maintain, back up, and scale in a distributed manner.
[0053] In some implementations, the pre-defined lookup table is constructed through the following steps: Collect historical product classification records based on historical product description texts and confirmed historical classification identifiers; Based on the historical product description text, S2 to S3 are executed sequentially on the historical product description text to generate historical processed attribute information. Based on historical processed attribute information and historical classification identifiers, the historical processed attribute information is associated with the corresponding historical classification identifiers to form an initial set of correspondences; Based on the initial set of correspondences, conflict detection and resolution are performed on the initial set of correspondences to form a pre-defined lookup table.
[0054] This embodiment provides a path for automatically generating classification rules from historical experience data, solving the core problems of rule base initialization and continuous optimization. The method begins with the collection of raw materials: "Collecting historical product classification records based on historical product description text and confirmed historical classification identifiers." Here, "historical product description text" refers to existing product text descriptions, and "confirmed historical classification identifiers" refer to product classification labels that have been manually reviewed, confirmed by the business system, or from authoritative sources and deemed correct. Each pair of such text and identifier constitutes a reliable historical knowledge record. These records can be obtained from the enterprise's order database, the review logs of the product management backend, or third-party standard product libraries. A large number of such records constitute the training sample set for rule learning.
[0055] However, these historical records are raw, unstructured text-to-tag correspondences that cannot be directly used for attribute-based rule matching. Therefore, the next step is to standardize these texts in a manner consistent with the online classification process: "Based on historical product description text, execute S2 to S3 sequentially on the historical product description text to generate historically processed attribute information." This means that the system needs to call the already developed attribute information extraction and processing modules, using the exact same logic and model configuration, to process each historical product description text. For example, a historical description "304 stainless steel thermos cup 500ml", after S2 extraction, might yield {"Material": "Stainless steel", "Function": "Insulation", "Category": "Cup", "Capacity": "500ml"}. After S3 standardization, "304 stainless steel" might be mapped to "stainless steel", and "500ml" normalized to "500 milliliters", ultimately generating standardized "historically processed attribute information", such as {"Main material": "Stainless steel", "Insulation performance": "Yes", "Product type": "Water cup", "Capacity": "500 milliliters"}. This process transforms unstructured historical experience into structured data representations that are isomorphic to the goods to be processed in the future.
[0056] At this point, the system possesses a large amount of structured paired data of "historically processed attribute information" and "historically categorized identifiers." The step of "associating the historically processed attribute information with its corresponding historical categorized identifier to form an initial set of correspondences" is a natural operation. This "association" can be simply understood as saving each pair of data as a candidate mapping rule. The initial set of correspondences can be viewed as a list, where each item contains two parts: an attribute information combination (i.e., historically processed attribute information) and a categorized identifier. For example, a record might be: Attribute combination: {"Main material": "Solid wood", "Purpose": "Seating", "Whether it has a backrest": "Yes"}, Categorized identifier: "Chair". Directly collecting all such pairs forms a large but potentially redundant and contradictory rudimentary rule base.
[0057] Using this initial set directly is unreliable because it inevitably contains a large number of conflicts and noise. Therefore, the final step is: "Based on the initial set of correspondences, perform conflict detection and resolution on the initial set of correspondences to form a pre-defined lookup table." "Conflict detection" refers to discovering records that have the same or highly similar attribute information combinations (under a certain similarity metric) but correspond to different historical classification labels. For example, it might be found that the attribute combination {"Screen type": "touchscreen", "Portability": "Yes"} corresponds to both "tablet computer" and "large-screen smartphone". Conflicts can arise for various reasons, such as historical labeling errors, cross-category products, or incomplete attribute information extraction (e.g., missing the crucial attribute "screen size"). After a conflict is detected, "resolution processing" is required.
[0058] The resolution strategy needs to be predefined, for example: 1) Frequency priority: Select the historical classification identifier that appears most frequently. 2) Authoritative source priority: Prioritize identifiers from more reliable data sources (such as a manual review database). 3) Attribute coverage priority: In the conflict group, select the identifier corresponding to the record with more detailed attribute information combinations and more attributes. 4) Manual intervention: For high-frequency or important conflict patterns, submit to experts for adjudication. After resolution, for each unique or agreed attribute information combination, retain its final determined classification identifier and formally add it to the "pre-defined lookup table". For records that cannot be determined after resolution or whose attribute combinations are too ambiguous, they can be discarded or marked as pending rules.
[0059] This construction method implements an inductive and cleansing process from specific cases to general rules. It fully leverages the implicit knowledge in existing business data and ensures consistency between the generated rules and the online system's processing logic through standardized preprocessing procedures. Automated processing makes it possible to mine rules from massive amounts of historical data, greatly reducing the cost of manually compiling all rules. The conflict detection and resolution steps are crucial to ensuring the high quality, internal consistency, and practicality of the generated lookup table; they remove noise from errors and contradictions, extracting reliable classification knowledge. This not only provides an efficient system cold start solution but, more importantly, establishes a sustainable optimization loop: new classification records generated during system operation and manually confirmed can be continuously fed back into this process as new "historical records" for incremental updates or periodic reconstruction of the lookup table, thus enabling the entire classification system to continuously learn from data and evolve.
[0060] Example 2 like Figure 2 As shown, in a second aspect, the present invention proposes a product classification system based on attribute rule mapping. The system adopts a product classification method based on attribute rule mapping proposed in any of the above embodiments, and the system includes: The text receiving and parsing module is used to perform step S1. Based on the product name and the product natural language description, it receives and parses the product name and the product natural language description to obtain the product description text; The attribute information extraction module is used to execute step S2. Based on the product description text, it extracts attribute information that exists in the form of a combination of attribute name and attribute value from the product description text to obtain attribute information; wherein, S2 includes: S21. Based on the product description text, use a pre-trained semantic model to identify text fragments that represent product characteristics in the product description text, and obtain text fragments; S22. Based on the text fragment, parse the text fragment to determine the attribute name and the corresponding attribute value of the text fragment, and obtain the attribute name and attribute value; S23. Based on the attribute name and attribute value, combine the attribute name and attribute value to obtain the attribute information; The attribute information processing module is used to execute step S3. Based on the attribute information, the attribute names in the attribute information are standardized and the attribute values are normalized to obtain the processed attribute information; wherein, S3 includes: S31. Based on attribute information, obtain a predefined set of standardized attribute names and a set of allowed attribute values corresponding to each standardized attribute name; S32. Based on the attribute names in the attribute information and the set of standardized attribute names, map the attribute names in the attribute information to the corresponding standardized attribute names in the set of standardized attribute names to obtain the mapped attribute names; S33. Based on the mapped attribute name, the corresponding attribute value in the attribute information, and the set of allowed attribute values, normalize the attribute values to obtain normalized attribute values. S34. Based on the mapped attribute names and normalized attribute values, combine the mapped attribute names and normalized attribute values to generate processed attribute information; The attribute matching and classification module is used to perform step S4. Based on the processed attribute information, the processed attribute information is matched with a preset lookup table. The lookup table defines the correspondence between attribute information combinations and classification identifiers to obtain the classification identifier of the product.
[0061] This system corresponds to the method provided in Example 1, and will not be described in detail here.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.
Claims
1. A product classification method based on attribute rule mapping, characterized in that, include: S1. Based on the product name and natural language description, receive and parse the product name and natural language description to obtain the product description text; S2. Based on the product description text, extract attribute information that exists in the form of a combination of attribute names and attribute values from the product description text to obtain attribute information; wherein, S2 includes: S21. Based on the product description text, use a pre-trained semantic model to identify text fragments that represent product characteristics in the product description text, and obtain text fragments; S22. Based on the text fragment, parse the text fragment to determine the attribute name and the corresponding attribute value of the text fragment, and obtain the attribute name and attribute value; S23. Based on the attribute name and attribute value, combine the attribute name and attribute value to obtain the attribute information; S3. Based on the attribute information, standardize the attribute names and normalize the attribute values to obtain the processed attribute information; wherein, S3 includes: S31. Based on attribute information, obtain a predefined set of standardized attribute names and a set of allowed attribute values for each standardized attribute name; S32. Based on the attribute names in the attribute information and the set of standardized attribute names, map the attribute names in the attribute information to the corresponding standardized attribute names in the set of standardized attribute names to obtain the mapped attribute names; S33. Based on the mapped attribute name, the corresponding attribute value in the attribute information, and the set of allowed attribute values, normalize the attribute values to obtain normalized attribute values. S34. Based on the mapped attribute names and normalized attribute values, combine the mapped attribute names and normalized attribute values to generate processed attribute information; S4. Match the processed attribute information with a preset lookup table. The lookup table defines the correspondence between attribute information combinations and classification identifiers to obtain the product's classification identifier. S21 includes: S211. Based on the product description text, input the product description text into the named entity recognition model to obtain the model output fragment output by the named entity recognition model; S212. Based on the model output fragments, determine the text fragments in the model output fragments that belong to the preset attribute category words, and obtain the preset attribute category word fragments; S213. Based on the preset attribute category vocabulary fragments, the preset attribute category vocabulary fragments are used as text fragments representing the characteristics of the product to obtain text fragments; S4 includes: S41. Input the processed attribute information into the first-level mapping module. The first-level mapping module performs mapping based on the first lookup table to obtain at least one pre-classification identifier. S42. Based on at least one pre-classification identifier and processed attribute information, input at least one pre-classification identifier and processed attribute information into the secondary mapping module. The secondary mapping module performs mapping based on the second lookup table to obtain the classification identifier of the product.
2. The product classification method based on attribute rule mapping according to claim 1, characterized in that, S33 includes: S331. Based on the attribute value corresponding to the mapped attribute name and the set of allowed attribute values, determine whether the attribute value exists in the set of allowed attribute values, and obtain the determination result; S332. If the judgment result is that it exists, then retain the attribute value and obtain the attribute value to be combined; S333. If the judgment result is that it does not exist, then based on the semantic similarity calculation between the attribute value and each element in the set of allowed attribute values, select the element with the closest semantics from the set of allowed attribute values to replace the attribute value, and obtain the attribute value to be combined.
3. The product classification method based on attribute rule mapping according to claim 1, characterized in that, S41 includes: S411. Based on the processed attribute information, find the attribute information combination that completely matches the processed attribute information in the first lookup table; S412. If a perfectly matching combination of attribute information is found, the corresponding pre-classification identifier in the first lookup table is output to obtain the pre-classification identifier; S413. If no completely matching attribute information combination is found, the associated pre-classification identifier is retrieved as output based on the partial matching relationship between the processed attribute information and the attribute information combination in the first lookup table, thus obtaining the pre-classification identifier.
4. The product classification method based on attribute rule mapping according to claim 1, characterized in that, S42 includes: S421. Based on at least one pre-classification identifier, query the second lookup table; S422. Based on the query results, obtain the further mapping conditions corresponding to each pre-classification identifier in the second lookup table. The further mapping conditions are defined by attribute information. S423. Based on the processed attribute information, verify whether the further mapping conditions are met, and obtain the verification result; S424. Based on the verification results, determine the pre-classification identifier that meets the conditions from at least one pre-classification identifier, and use it as the classification identifier of the product.
5. The product classification method based on attribute rule mapping according to claim 1, characterized in that, Following S4, it also includes: S5. Based on the product's classification identifier and the processed attribute information used for matching, the classification identifier and the processed attribute information are associated and stored to obtain the associated storage result; S6. When a verification request for a categorized product is received, the corresponding categorization identifier and processed attribute information are retrieved from the associated storage results based on the product identifier in the verification request.
6. A product classification method based on attribute rule mapping according to claim 5, characterized in that, S5 include: S51. Generate a unique tracking identifier for the product based on its classification identifier and processed attribute information; S52. Based on the unique tracking identifier, classification identifier, and processed attribute information, establish the association between the unique tracking identifier, classification identifier, and processed attribute information; S53. Based on the association relationship, perform storage operations to obtain the associated storage result.
7. The product classification method based on attribute rule mapping according to claim 1, characterized in that, The pre-defined lookup table is constructed through the following steps: Collect historical product classification records based on historical product description texts and confirmed historical classification identifiers; Based on the historical product description text, S2 to S3 are executed sequentially on the historical product description text to generate historical processed attribute information. Based on historical processed attribute information and historical classification identifiers, the historical processed attribute information is associated with the corresponding historical classification identifiers to form an initial set of correspondences; Based on the initial set of correspondences, conflict detection and resolution are performed on the initial set of correspondences to form a pre-defined lookup table.
8. A product classification system based on attribute rule mapping, characterized in that, The system employs a product classification method based on attribute rule mapping as described in any one of claims 1 to 7, and the system comprises: The text receiving and parsing module is used to perform step S1. Based on the product name and the product natural language description, it receives and parses the product name and the product natural language description to obtain the product description text; The attribute information extraction module is used to execute step S2. Based on the product description text, it extracts attribute information that exists in the form of a combination of attribute name and attribute value from the product description text to obtain attribute information; wherein, S2 includes: S21. Based on the product description text, use a pre-trained semantic model to identify text fragments that represent product characteristics in the product description text, and obtain text fragments; S22. Based on the text fragment, parse the text fragment to determine the attribute name and the corresponding attribute value of the text fragment, and obtain the attribute name and attribute value; S23. Based on the attribute name and attribute value, combine the attribute name and attribute value to obtain the attribute information; The attribute information processing module is used to execute step S3. Based on the attribute information, the attribute names in the attribute information are standardized and the attribute values are normalized to obtain the processed attribute information; wherein, S3 includes: S31. Based on attribute information, obtain a predefined set of standardized attribute names and a set of allowed attribute values corresponding to each standardized attribute name; S32. Based on the attribute names in the attribute information and the set of standardized attribute names, map the attribute names in the attribute information to the corresponding standardized attribute names in the set of standardized attribute names to obtain the mapped attribute names; S33. Based on the mapped attribute name, the corresponding attribute value in the attribute information, and the set of allowed attribute values, normalize the attribute values to obtain normalized attribute values. S34. Based on the mapped attribute names and normalized attribute values, combine the mapped attribute names and normalized attribute values to generate processed attribute information; The attribute matching and classification module is used to perform step S4. Based on the processed attribute information, the processed attribute information is matched with a preset lookup table. The lookup table defines the correspondence between attribute information combinations and classification identifiers to obtain the classification identifier of the product.
Citation Information
Patent Citations
Commodity attribute intelligent processing method, device and equipment based on large model
CN119886309A
Commodity classification method and system based on interpretable artificial intelligence and knowledge anchoring
CN122065116A