A commodity classification method and system based on a knowledge base and a large language model

By combining a knowledge base and a large language model, the commodity classification method solves the problems of low efficiency and poor interpretability in existing technologies, and achieves highly accurate and reliable commodity classification decisions, significantly improving customs supervision efficiency and trade facilitation.

CN122241326APending Publication Date: 2026-06-19JIANGSU ENTRY-EXIT INSPECTION & QUARANTINE BUREAU IND PROD TESTING CENT

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU ENTRY-EXIT INSPECTION & QUARANTINE BUREAU IND PROD TESTING CENT
Filing Date
2026-05-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing product classification methods are inefficient, costly, and susceptible to subjective factors. Keyword matching-based solutions have poor generalization ability and are difficult to handle complex and ever-changing natural language descriptions. Traditional machine learning-based solutions suffer from a lack of interpretability due to their black-box decision-making model and are not adaptable to long-tail products and rule changes.

Method used

A product classification method based on knowledge base and large language model is adopted. The large language model is used to understand and analyze product information, extract key attributes, and classify them step by step in combination with the HS coding rule knowledge base. The output is a structured HS code and reasoning, and compliance and logical consistency are checked to generate clear and traceable classification results.

Benefits of technology

It improved the accuracy, reliability, and compliance of product classification, significantly reduced business risks caused by algorithmic misjudgments, and achieved improved efficiency in decision-making transparency and human-machine collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241326A_ABST
    Figure CN122241326A_ABST
Patent Text Reader

Abstract

This invention proposes a commodity classification method and system based on a knowledge base and a large language model, relating to the field of customs auxiliary review technology. Addressing the problems of existing technologies, such as the low efficiency of manual labor in customs commodity classification review, the poor generalization ability and insufficient interpretability of automated methods based on keywords or traditional machine learning, and the illusion and difficulty in strictly adhering to business rules when directly using large language models, this invention adopts a data-driven and intelligence-driven collaborative architecture. It extracts structured attributes of commodities through a large language model and performs progressive logical reasoning based on an external HS coding rule knowledge base, generating traceable triple reasoning justifications; and generates business-oriented prompts through an associated risk knowledge base. This invention integrates the semantic understanding advantages of large language models with the deterministic advantages of rule systems, significantly improving the accuracy, reliability, decision-making transparency, business risk prevention and control capabilities, and human-machine collaborative review efficiency of customs auxiliary review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of customs auxiliary audit technology, and in particular to a commodity classification method and system based on a knowledge base and a large language model. Background Technology

[0002] Commodity classification methods based on knowledge bases and large language models are key technologies for improving customs supervision efficiency and trade facilitation. Rapid and accurate HS code classification of import and export commodities through automated and intelligent means can not only significantly improve customs clearance efficiency and reduce enterprise compliance costs, but also serve as an important foundation for reliable trade statistics. Breakthroughs in artificial intelligence technology have brought transformative opportunities for commodity classification, moving from automation to intelligence. A dual-driven approach integrating structured domain knowledge and the cognitive capabilities of large language models has become the most promising technological direction in this field.

[0003] However, existing commodity classification assistance technologies all have significant limitations, making it difficult to meet the requirements of high accuracy, high reliability, and high availability for customs operations. Traditional manual classification, while highly accurate, is inefficient, costly, and susceptible to subjective factors. Automated solutions based on keyword matching or rule engines have poor generalization capabilities and struggle to handle complex and ever-changing natural language descriptions and the constant emergence of new commodities. Solutions based on traditional machine learning or early deep learning models, while offering some efficiency improvements, suffer from a lack of interpretability due to their black-box decision-making model and heavy reliance on large amounts of high-quality labeled data, making them ill-suited for long-tail commodities and rule changes.

[0004] Therefore, there is an urgent need to build a product classification method and system based on knowledge bases and large language models with higher accuracy and completeness. Summary of the Invention

[0005] To address these issues, this invention provides a product classification method and system based on a knowledge base and a large language model. This overcomes the problems of low efficiency, high cost, and susceptibility to subjective factors associated with traditional manual classification; poor generalization ability of automated solutions based on keyword matching, which struggle to handle complex and ever-changing natural language descriptions and a constant stream of new products; and the lack of interpretability due to the black-box decision-making model of traditional machine learning solutions, which heavily rely on large amounts of high-quality labeled data and are insufficiently adaptable to long-tail products and rule changes.

[0006] To achieve the above objectives, this invention provides a product classification method based on a knowledge base and a large language model, comprising: S1, Receive product information input by the user, preprocess the product information, and generate a standardized description; S2, based on the large language model, the standardized description is understood and analyzed, the key attributes affecting the classification of goods are extracted, and the key attributes are transformed into structured attribute data; S3, based on the pre-built HS coding rule knowledge base, according to the structured attribute data and combined with the chapter annotations of the HS coding rule knowledge base, determine the chapter to which the product belongs, and output the corresponding two-digit chapter code and the first reason for reasoning; S4. Using the two-digit chapter code as a constraint, based on the structured attribute data and combined with the item clauses and classification rules of the HS coding rule knowledge base, determine the item to which the product belongs, and output the corresponding four-digit item code and the second reasoning. S5, using the four-digit item code as a constraint, based on the structured attribute data and the sub-item clauses in the HS coding rule knowledge base, determine the sub-item to which the product belongs level by level until the complete ten-digit HS code and the third reasoning are output. S6, Perform compliance and logical consistency verification on the complete ten-digit HS code; S7. Based on the verified complete ten-digit HS code, query the associated risk knowledge base to obtain and generate risk warning information related to the product; S8, output the classification review result, which includes at least the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.

[0007] Furthermore, the standardized description is understood and analyzed based on a large language model to extract key attributes affecting product classification, and these key attributes are transformed into structured attribute data, including: S21, invoke the inference interface of the large language model deployed locally or in the cloud, and use the standardized description as the input text; S22, construct prompt words corresponding to the attribute extraction task to guide the large language model to identify and extract key attributes of predefined categories from the standardized description; the predefined categories include: material or composition, function or use, processing technology or state, classification attributes, and specification parameters; S23, receive the natural language or semi-structured text response containing the extracted key attributes output by the large language model; S24, parse the natural language or semi-structured text response, organize the key attributes and transform them into machine-readable structured attribute data.

[0008] Furthermore, based on the pre-built HS encoding rule knowledge base, the chapter to which the item belongs is determined according to the structured attribute data and the chapter annotations of the HS encoding rule knowledge base, including: S31, construct chapter-level classification prompts, wherein the chapter-level classification prompts include at least: target pointing instructions that assign the customs classification role to the large language model, the structured attribute data, and task instructions and output format requirements that require chapter-level classification based on chapter annotations and general classification rules in the HS encoding rule knowledge base; S32, input the chapter-level classification prompts into the large language model; S33, obtain the output content of the large language model, and extract the two-digit chapter code determined after analyzing the product based on the chapter annotations, as well as the first reasoning reason for classifying the product based on the chapter annotations.

[0009] Furthermore, based on the structured attribute data, combined with the item clauses and classification rules of the HS coding rule knowledge base, the item to which the product belongs is determined, and the corresponding four-digit item code and a second reasoning are output, including: S41. Based on the two-digit chapter code, construct item-level classification prompt words. The item-level classification prompt words include at least: target direction instructions that assign the customs classification role to the large language model, the two-digit chapter code, the structured attribute data, and task instructions and output format requirements for item-level classification based on item clauses and general classification rules in the HS coding rule knowledge base. S42, input the category-level classification prompts into the large language model; S43, obtain the output content of the large language model, and extract the four-digit item code determined after analyzing the goods according to the item clauses and general classification rules, as well as the second reasoning reason explaining the classification based on the item clauses and general classification rules.

[0010] Furthermore, based on the structured attribute data and in conjunction with the sub-item clauses in the HS coding rule knowledge base, the sub-item to which the product belongs is determined level by level until a complete ten-digit HS code and a third reasoning are output, including: S51, based on the four-digit item code, construct sub-item-level classification prompts. The sub-item-level classification prompts include at least: target direction instructions that assign the customs classification role to the large language model, the four-digit item code, the structured attribute data, and instructions and output format requirements for sub-item-level hierarchical classification based on the sub-item clauses and general classification rules in the HS coding rule knowledge base. S52, input the sub-item-level classification prompts into the large language model, and determine a five- or six-digit sub-item code based on the structured product attribute data and sub-item text; S53, based on the defined sub-sub-code, determines a six- to eight-bit sub-sub-code; S54, repeat S53 until the complete ten-digit HS code is determined; S55: Obtain the intermediate response, which includes encoding and interpretation, output by the large language model during the judgment process, and integrate it to generate a third reasoning.

[0011] Furthermore, the compliance and logical consistency verification of the complete ten-digit HS code includes: S61, Perform format and range verification on the complete ten-digit HS code, the format and range verification includes at least bit verification, number range verification of each level of code and separator format verification; S62, verify whether the logical inclusion relationship between the complete ten-digit HS code, the two-digit chapter code, and the four-digit item code is valid; S63, based on the inherent logical consistency of the first reasoning, the second reasoning and the third reasoning, and the similarity with the historical classification case library, calculate the comprehensive confidence level of the complete ten-digit HS code; S64a, if all verifications pass and the overall confidence level is higher than the preset confidence threshold, then the verification is considered successful; S64b, if the logical hierarchy relationship verification fails or the overall confidence level is lower than the preset confidence threshold, an additional verification mechanism is triggered. The additional verification mechanism includes at least one of the following: calling a backup large language model or machine learning model to perform multi-model voting verification or automatically marking the classification review result as requiring manual review.

[0012] Furthermore, the risk warning information includes at least one or more of the following: historical violations, security notices, and inspection or audit recommendations associated with the product’s complete 10-digit HS code.

[0013] Furthermore, the output classification and audit results include: S81, Generate a classification review result page, which displays the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information in a structured manner; S82 provides a user interaction interface, including at least: S82a) Copy operation interface, used to copy the complete ten-digit HS code or all classification audit results to the clipboard in response to user instructions; S82b) Export operation interface, used to respond to user instructions to generate the classification review results, including the complete reasoning process chain, into a downloadable standardized format document; S82c) Feedback operation interface, used to receive user judgment on the correctness of the classification review results and correction information; S83, the input information, process data, output classification review results, and user feedback data received through the feedback operation interface of this classification task are associated and stored in the historical classification record database.

[0014] This invention also provides a product classification system based on a knowledge base and a large language model, used to implement the product classification method based on a knowledge base and a large language model as described in any one of the claims, the system comprising: The preprocessing module is used to receive product information input by the user, preprocess the product information, and generate a standardized description; The key attribute extraction module, connected to the preprocessing module, is used to understand and analyze the standardized description based on the large language model, extract the key attributes that affect the classification of goods, and transform the key attributes into structured attribute data. The chapter-level classification reasoning module, connected to the key attribute extraction module, is used to determine the chapter to which the product belongs based on the pre-built HS coding rule knowledge base, according to the structured attribute data and the chapter annotations of the HS coding rule knowledge base, and output the corresponding two-digit chapter code and the first reasoning reason. The item-level classification reasoning module, connected to the chapter-level classification reasoning module, is used to determine the item to which the product belongs based on the structured attribute data, the item clauses and classification general rules of the HS coding rule knowledge base, using the two-digit chapter code as a constraint, and output the corresponding four-digit item code and the second reasoning reason. The subheading-level classification reasoning module, connected to the item-level classification reasoning module, is used to determine the subheading to which the product belongs by step by step, based on the structured attribute data and the subheading clauses in the HS coding rule knowledge base, using the four-digit item code as a constraint, until the complete ten-digit HS code and the third reasoning reason are output. The verification and evaluation module, connected to the sub-category-level classification reasoning module, is used to verify the compliance and logical consistency of the complete ten-digit HS code. The risk association module, connected to the verification and evaluation module, is used to query the associated risk knowledge base based on the verified complete ten-digit HS code, obtain and generate risk warning information related to the product; The classification result interaction module, connected to the risk association module, is used to output the classification review result. The classification review result includes at least the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: Firstly, this invention creatively constructs a dual-engine collaborative architecture and progressive reasoning mechanism that integrates data-driven knowledge and intelligence-driven decision-making. The core lies in the deep integration of the natural language understanding capabilities of a large language model with the deterministic logical computation capabilities of a structured, traceable HS-encoded rule knowledge base. By allowing the large language model to focus on its strengths in semantic understanding and attribute extraction, while the rule knowledge base and reasoning engine undertake attribute-based logical computation, an intelligent division of labor is achieved: the large oracle model handles fuzzy logic, and the rule engine handles precision. This solves the core pain points of rigidity in traditional rule systems and the black-box nature of machine learning models in existing technologies. It improves the accuracy, reliability, and compliance of classification decisions, and further enhances the transparency and traceability of decisions by generating a clear, complete, and traceable reasoning chain through a progressive logical thinking process from macro to micro levels. Secondly, this invention solves the common problems of illusion and inability to self-check and correct in professional field applications of traditional machine learning models and native large language models through compliance and logical consistency verification mechanisms. It significantly improves the business availability and reliability of the system output, intercepts or warns of possible classification errors before output, thereby significantly reducing business risks and execution costs caused by algorithm misjudgment, and provides key guarantees for the reliable application of artificial intelligence in rigorous scenarios such as customs enforcement. Third, by constructing and outputting a triple structured reasoning that runs through the entire classification process, this invention achieves full transparency and logical traceability in the AI ​​decision-making process, enabling product classification personnel to quickly understand the classification ideas of the Big Prophecy model, focus on the key nodes of the review reasoning, and significantly improve the review efficiency of human-machine collaboration. Attached Figure Description

[0016] Figure 1 A flowchart illustrating a product classification method based on a knowledge base and a large language model, provided in this embodiment of the invention; Figure 2 This is a structural block diagram of a product classification system based on a knowledge base and a large language model, provided for an embodiment of the present invention. Detailed Implementation

[0017] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0018] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0019] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "inner", "outer", etc., which indicate directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of this invention.

[0020] Furthermore, it should be noted that, in the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0021] Example 1 like Figure 1 As shown, this invention provides a product classification method based on a knowledge base and a large language model, including: S1, Receive product information input by the user, preprocess the product information, and generate a standardized description; In one possible implementation, the user enters text into the product information input box through the system's front-end interface, for example: "For finishing, Liaoning linden, non-standard, 970×100-970MM, 0.42MM, rotary-cut, 2M3, Grade 1". Upon receiving this raw input, the system initiates a preprocessing flow. First, it identifies and removes any redundant characters or internal codes in the input text that are irrelevant to the product classification. For example, if the input begins with characters like 0 or 3, which are clearly internal process codes, the system will filter them out. Simultaneously, the system standardizes the delimiters in the text, such as converting any commas or dashes to semicolons, and ensuring that spaces are left after punctuation marks to maintain a neat text format.

[0022] The system scans descriptions based on a built-in database of common product names and feature terms. For example, it identifies "for finishing" as a usage keyword, "velocity cutting" as a processing keyword, and "0.42mm" as a thickness parameter. For any ambiguity or abbreviations, the system can intelligently complete or replace them; for instance, it interprets "M3" as cubic meters when the context is clear.

[0023] Specific terms are standardized by converting colloquial or industry abbreviations into standard terms; for example, *Tiliao linden* is identified as the standard Chinese name for the tree species. The cleaned and standardized information is then reorganized and linked according to the logical order of use + tree species / material + specifications + process + grade to form a semantically clear and complete description. In a specific embodiment, after the above preprocessing, based on the user's input, the generated standardized description output is: Linden veneer for decorative purposes, non-standard dimensions of 970 mm × 100 mm, thickness of 0.42 mm, processing method of rotary cutting, volume of 2 cubic meters, and grade 1.

[0024] This invention addresses the problems of redundant characters, chaotic formatting, non-standard terminology, arbitrary information order, and ambiguous or missing key attributes in original product descriptions by implementing data cleaning, key information identification and completion, grammar and terminology standardization, and structured segmentation and reorganization. It transforms unstructured natural language input into standardized descriptions with uniform format, clear semantics, and complete elements, improving the accuracy and efficiency of subsequent semantic understanding and attribute extraction by large language models. It also reduces the risk of model misjudgment due to input noise and ambiguity, and provides a clear and reliable textual foundation for rule-based logical reasoning, thereby improving the processing quality and stability of the entire intelligent classification system from the source.

[0025] S2, based on a large language model, understands and analyzes the standardized description, extracts key attributes affecting product classification, and transforms these key attributes into structured attribute data, including: S21, invoke the inference interface of the large language model deployed locally or in the cloud, and use the standardized description as the input text; S22, construct prompt words corresponding to the attribute extraction task to guide the large language model to identify and extract key attributes of predefined categories from the standardized description; the predefined categories include: material or composition, function or use, processing technology or state, classification attributes, and specification parameters; S23, receive the natural language or semi-structured text response containing the extracted key attributes output by the large language model; S24, parse the natural language or semi-structured text response, organize the key attributes and transform them into machine-readable structured attribute data.

[0026] In one possible implementation, the system configures and invokes a locally deployed large language model service. For example, based on the open-source Qwen model and deployed via an API interface using the vLLM framework, it takes the standardized description generated in the previous step as the core input text and generates structured prompt words, which are then sent to the large language model. These prompt words clearly define the model's role and task, for example: Please extract and output the key attributes that affect the HS code classification from the following product descriptions.

[0027] Product Description: [Linden veneer for decorative purposes, non-standard dimensions 970mm x 100mm, thickness 0.42mm, processed by rotary cutting, volume 2 cubic meters, grade 1] Please output in the following JSON format, and only output JSON objects: { Material / Composition: The specific material or component extracted, such as the type of wood; Function / Purpose: The specific function or purpose extracted; Processing technology / state: The specific processing technology or physical state extracted; Classification attribute: If applicable, extract the Latin scientific name; Specifications: Extract key parameters such as thickness, size, and volume.

[0028] } After receiving the prompt words, the large language model analyzes the descriptive text based on its semantic understanding capabilities and generates a response. The returned response is a structured JSON string, for example: Material / Composition: Linden wood; Function / Use: For finishing purposes; Processing technology / condition: rotary cutting; Classification attribute: Tilia mandshurica; Specifications: Thickness 0.42 mm, non-standard dimensions 970 mm × 100 mm, volume 2 cubic meters, grade 1.

[0029] Upon receiving this response, it is parsed using a JSON parser. The integrity of the JSON structure is verified, and the parsed key-value pairs are stored in an internal data structure to form the final structured attribute data. This data has a well-structured format, with explicit key names and clear values, and can be directly read and used by the subsequent rule reasoning module.

[0030] This invention solves the technical challenge of automatically, accurately, and consistently extracting the key attributes required for classification from complex and ever-changing natural language product descriptions by leveraging the deep semantic understanding capabilities of large language models and constructing professional prompts containing explicit task instructions and structured output requirements. This improves the accuracy and efficiency of the entire system's understanding of product information, reduces reliance on rules summarized from human experience or tedious feature engineering, and provides clean and reliable input for subsequent logical reasoning based on defined rules.

[0031] S3, based on the pre-built HS coding rule knowledge base, according to the structured attribute data and combined with the chapter annotations of the HS coding rule knowledge base, determine the chapter to which the product belongs, and output the corresponding two-digit chapter code and the first reason for reasoning; The pre-built HS encoding rule knowledge base determines the chapter to which the product belongs based on the structured attribute data and chapter annotations in the HS encoding rule knowledge base, including: S31, construct chapter-level classification prompts, wherein the chapter-level classification prompts include at least: target pointing instructions that assign the customs classification role to the large language model, the structured attribute data, and task instructions and output format requirements that require chapter-level classification based on chapter annotations in the HS encoding rule knowledge base; S32, input the chapter-level classification prompts into the large language model; S33, obtain the output content of the large language model, and extract the two-digit chapter code determined after analyzing the product based on the chapter annotations, as well as the first reasoning reason for classifying the product based on the chapter annotations.

[0032] The first reason for reasoning is natural language text. The content of the first reason for reasoning includes the matching analysis of the key attributes of the product with the relevant chapter annotations in the HS coding rule knowledge base, as well as the chapter annotation clauses on which it is based.

[0033] In one possible implementation, a pre-built HS coding rule knowledge base is first accessed. This knowledge base integrates the structure and content of the "Commodity and Item Notes to the Import and Export Tariff" and the import and export tariff schedule, and generates highly guiding prompts based on structured attribute data. These prompts explicitly define the role, input information, task, and output format of the large language model. For example, the system constructs the following prompts and sends them to the large language model: Please make your judgment based on the Harmonized Product Names and Coding System and its annotations.

[0034] Based on the provided product attributes, determine the chapter to which it most likely belongs.

[0035] Enter product attributes: Material / Composition: Linden wood; Function / Use: For finishing purposes; Processing technology / condition: rotary cutting; Classification attribute: Tilia mandshurica; Specifications: Thickness 0.42 mm, non-standard dimensions 970 mm × 100 mm, volume 2 cubic meters, grade 1.

[0036] The rules and knowledge background are Chapter 44 Wood and Wood Products; the chapter notes for charcoal may include definitions and scope of wood, timber, rotary-cut, etc.

[0037] Thinking requirements: Based on the above attributes, especially the two core characteristics of wood material and rotary cutting process, please analyze and determine the chapter to which it belongs, referring to the notes of the relevant chapters.

[0038] Output format: Output a strict JSON object containing only the following two fields: { chapter_code: A two-digit string, for example, 44; chapter_reason: A string that details the reasons for the classification, citing the key points of the chapter notes and the matching analysis of product characteristics.

[0039] } The constructed chapter-level categorization prompts are used to call the service interface of a large language model, such as the Qwen model, which is the same as S2 or specifically designed for inference tasks. The large language model then infers and generates a response based on its internal understanding of the HS (Historical Standards) rules. The system receives a response in a JSON format similar to the following: { chapter_code: 44; chapter_reason: Based on the provided attributes, the product material is linden wood, which belongs to the timber category. The processing method is rotary cutting, a type of timber processing. According to the Harmonized System of Commodity Descriptions and Coding, Chapter 44 is titled "Wood and Wood Products; Charcoal," with its chapter notes defining the scope of wood as referred to in this chapter. The veneer made from rotary-cut linden wood of this product basically conforms to the description of wood products in Chapter 44. Therefore, it is preliminarily determined that it should be classified under Chapter 44.

[0040] } Then, using a JSON parser, the value 44 of the chapter_code field was accurately extracted from the response as the two-digit chapter code, and the content of the chapter_reason field was used as the first reason for reasoning.

[0041] This invention addresses the problems of inaccurate chapter-level positioning, vague reasoning, or over-reliance on subjective experience that may exist in the initial stage of product classification using traditional methods or manual judgment. It constructs specialized prompts that integrate expert role instructions, structured product attributes, and HS rule knowledge, and then uses a large language model for knowledge-based reasoning. This improves the accuracy, consistency, and interpretability of product chapter-level classification, laying a correct and reliable foundation for subsequent progressively refined classification processes. Simultaneously, it reduces the risk of errors in the entire subsequent classification path due to incorrect initial category judgments, demonstrating the crucial value of first-level decision-making in a progressive reasoning architecture.

[0042] S4. Using the two-digit chapter code as a constraint, based on the structured attribute data and combined with the item clauses and classification rules of the HS coding rule knowledge base, determine the item to which the product belongs, and output the corresponding four-digit item code and the second reasoning. Based on the structured attribute data, and in conjunction with the item clauses and general classification rules of the HS coding rule knowledge base, the item to which the product belongs and the second reason for inference are determined, including: S41. Based on the two-digit chapter code, construct item-level classification prompt words. The item-level classification prompt words include at least: target direction instructions that assign the customs classification role to the large language model, the two-digit chapter code, the structured attribute data, and task instructions and output format requirements for item-level classification based on item clauses and general classification rules in the HS coding rule knowledge base. S42, input the category-level classification prompts into the large language model; S43, obtain the output content of the large language model, and extract the four-digit item code determined after analyzing the goods according to the item clauses and general classification rules, as well as the second reasoning reason explaining the classification based on the item clauses and general classification rules.

[0043] In one possible implementation, chapter code 44, determined in step S3, is used as a strong constraint to limit the scope of reasoning to Chapter 44. Subsequently, the system accesses the HS coding rule knowledge base to obtain the relevant items under Chapter 44, such as 4401, 4403, 4407, and 4408, along with their annotations. It then prepares to apply the General Classification Rules to generate a more guiding prompt, using the result of the previous step as the known context. For example: Please categorize a product step by step.

[0044] Given that the product has been identified as belonging to Chapter 44, the reasoning in the previous round was that the product is a veneer made from linden wood through rotary cutting, which conforms to the description of wood and wood products in Chapter 44. The current task is to determine the 4-digit heading code to which the product should be classified within the scope of Chapter 44, based on the product's detailed attributes.

[0045] Enter product attributes: Material / Composition: Linden wood Function / Use: For finishing purposes Processing technology / condition: rotary cutting Classification attribute: Tilia mandshurica Specifications: Thickness 0.42 mm Key rule tips: Title 4407: Timber that has been sawn, sliced ​​or rotary-cut; Item 4408: Single-layer board; Rule 1 of the General Rules for Classification: The titles of categories, chapters and sub-chapters are for convenience of reference only; legally binding classifications shall be determined according to the headings and the relevant class notes or chapter notes. General Rules for Classification, Rule Six: The classification of subheadings shall follow the same principles and be determined by comparison at each level; Please rigorously compare the product attributes with the descriptions of each candidate item, especially the rotary cutting process and veneer shape, following the general classification rules, to determine the single best-matching item. The output format should be a strict JSON object. { heading_code: A four-digit numeric string, for example, 4408; heading_reason: A string that details why this heading was chosen. This includes reasons for excluding other similar headings, key parts of the cited heading, and key points of the general classification rules applied.

[0046] } The category-level classification prompt is sent to the large language model for inference. Under the constraints of Chapter 44, the large language model performs comparative analysis based on attributes and rules to generate a response. An example of the response received by the system is shown below: { heading_code: 4408; heading_reason: Based on the product attributes, it is a 0.42 mm thick linden veneer, and the processing method is clearly rotary cutting. Heading 4407 covers timber that has been longitudinally sawn, planed, or rotary-cut, but generally refers to timber thicker than 6 mm. Heading 4408 explicitly lists veneer, including veneer for finishing. According to Rule 1 of the General Rules for Classification, it should be determined according to the heading provisions. The rotary-cut veneer of this product, with a thickness of 0.42 mm, is more consistent with the description of veneer under heading 4408 than with timber under heading 4407. Therefore, it is determined to be classified under heading 4408.

[0047] } The JSON response was then parsed, and the value 4408 of the heading_code field was extracted as the four-digit item code, and the content of the heading_reason field was used as the second reason for reasoning.

[0048] This invention uses precise chapter coding as a constraint and constructs composite prompts that integrate the results of the previous level of reasoning, specific structured attributes, and item-level clauses and general classification rules. This guides a large language model to perform accurate comparisons and logical judgments, solving the problems of classification direction deviation, insufficient reasoning, and inconsistent judgments among different experts that easily occur at the item level due to similar descriptions and complex rules. It significantly improves the accuracy of classification at the key item level and the traceability of the decision-making process. Through mandatory comparison and exclusion and rule reference, it outputs a logically rigorous second reasoning, effectively reducing the systemic risk that the classification of all subsequent sub-items will completely fail due to incorrect item selection, and providing a solid and correct intermediate node for the final determination of the ten-digit code.

[0049] S5, using the four-digit item code as a constraint, and based on the structured attribute data and the sub-item clauses in the HS coding rule knowledge base, determine the sub-item to which the product belongs level by level until the complete ten-digit HS code and the third reasoning are output, including: S51, based on the four-digit item code, construct sub-item-level classification prompts. The sub-item-level classification prompts include at least: target direction instructions that assign the customs classification role to the large language model, the four-digit item code, the structured attribute data, and instructions and output format requirements for sub-item-level hierarchical classification based on the sub-item clauses and general classification rules in the HS coding rule knowledge base. S52, input the sub-item-level classification prompts into the large language model, and determine a five- or six-digit sub-item code based on the structured product attribute data and sub-item text; S53, based on the defined sub-sub-code, determines a six- to eight-bit sub-sub-code; S54, repeat S53 until the complete ten-digit HS code is determined; S55: Obtain the intermediate response, which includes encoding and interpretation, output by the large language model during the judgment process, and integrate it to generate a third reasoning.

[0050] In one possible implementation, the item code 4408 determined in step S4 is used as the root node, restricting subsequent reasoning to be performed within the sub-item tree structure under this item. The HS coding rule knowledge base is accessed to obtain all sub-items under item 4408, such as first-level sub-items 4408.1 and 4408.9; second-level sub-items 4408.11 and 4408.19, and so on, up to the ten-digit code, including their clauses, annotations, and hierarchical relationships.

[0051] The construction and execution of the first round of sub-item-level reasoning, in a specific embodiment, involves the construction of prompt words, for example: Please classify the goods under heading 4408 into subheadings.

[0052] This product has been classified under heading 4408: Single-layer board.

[0053] Product core attributes: Linden wood, for veneer, rotary-cut, 0.42 mm thick.

[0054] The current task is to determine the first subheading under heading 4408. The rules are as follows: 4408.1: Veneer for finishing purposes; 4408.9: Other.

[0055] Based on the intended use of the product, please determine which first-level subheading it should belong to.

[0056] The output format is a JSON object: { subheading_code_level1: Subheading code; reason_level1: Select a reason and cite the sub-item; } Feedback results after large language model analysis: { subheading_code_level1: 4408.1; reason_level1: Since the intended use of the goods is clearly for finishing, which fully matches the provisions of subheading 4408.1 for finishing veneers, it is classified under this subheading.

[0057] } Subsequently, the second round of sub-level reasoning was constructed and executed in the same manner, and the results were fed back after analysis by the Grand Prophet Model: { subheading_code_level2: 4408.19; Reason_level2: The material of the product is linden wood, whose Latin name is *Tilia mandshurica*, which belongs to temperate wood and does not meet the definition of tropical wood. Therefore, it should be classified under other subheadings under first-level subheading 4408.1, namely 4408.19.

[0058] } Based on the more detailed subheadings under 4408.19 in the knowledge base, such as further differentiation by thickness and whether it is spliced, the above process is repeated to construct new prompts. These prompts guide the model, under the constraints of 4408.19, to continue judging the next level of subheadings based on attributes such as a thickness of 0.42 mm, until the model outputs a complete ten-digit HS code. In each round of subheading reasoning, the content of the reasoning reason field returned by the model is recorded. After obtaining the final ten-digit HS code, the system connects, integrates, and refines these step-by-step reasons according to the reasoning hierarchy, forming a complete and progressive third reasoning statement. For example, if the product is a decorative veneer, it is first classified under the first-level subheading 4408.1 of heading 4408. Since its material, linden, is a temperate wood, not a tropical wood, it is classified under the second-level subheading 4408.19: Other Non-Tropical Wood Veneers. Furthermore, based on its thickness of 0.42 mm and in accordance with the national subheading annotation, it was ultimately determined to be classified under the ten-digit HS code 4408.1990.

[0059] This invention addresses the core pain point of traditional end-to-end models or single-step reasoning, which are prone to errors throughout the entire process due to a single mistake in determining the complete HS code, and which constructs prompt words to guide the large language model through multiple iterations and progressive refinement under the constraints of knowledge base sub-item clauses. It significantly improves the accuracy of the final ten-digit HS code determination and the system's robustness, effectively curbing model illusions through a hierarchical verification process. Simultaneously, its automatically generated and integrated complete reasoning chain, containing the basis for each step of the judgment, greatly enhances the interpretability, traceability, and credibility of the final classification results, providing users with a clear and transparent decision-making path and fundamentally reducing the classification risks caused by excessively deep coding levels and complex rules.

[0060] S6, Perform compliance and logical consistency checks on the complete ten-digit HS code, including: S61, Perform format and range verification on the complete ten-digit HS code, the format and range verification includes at least bit verification, number range verification of each level of code and separator format verification; S62, verify whether the logical inclusion relationship between the complete ten-digit HS code, the two-digit chapter code, and the four-digit item code is valid; S63, based on the inherent logical consistency of the first reasoning, the second reasoning and the third reasoning, and the similarity with the historical classification case library, calculate the comprehensive confidence level of the complete ten-digit HS code; S64a, if all verifications pass and the overall confidence level is higher than the preset confidence threshold, then the verification is considered successful; S64b, if the logical hierarchy relationship verification fails or the overall confidence level is lower than the preset confidence threshold, an additional verification mechanism is triggered. The additional verification mechanism includes at least one of the following: calling a backup large language model or machine learning model to perform multi-model voting verification or automatically marking the classification review result as requiring manual review.

[0061] In one possible implementation, the output verification result is 4408.1990, along with the first, second, and third reasoning reasons. The verification module is then invoked to parse and check the code 4408.1990, confirming its validity as a ten-digit number. Since the last two digits are an additional code, they are not shown in this embodiment. Specifically, it verifies whether the first two digits, 44, are within the valid chapter code range, whether the first four digits, 4408, are a valid item code under Chapter 44, and whether the subsequent digits conform to the subheading rules of its parent item, confirming whether the encoding format conforms to the standard.

[0062] If the validity of all ten digits is verified, a logical hierarchy check is performed. Specifically, the tree-like hierarchical structure table in the HS coding rule knowledge base is queried to check whether the knowledge base records that the parent code of 4408.1990 is 4408.19, and whether the parent of 4408.19 is 4408.1, and whether the parent of 4408.1 is 4408. It is confirmed that the first four digits of the final ten-digit code 4408.1990, 4408, are consistent with the item code output in step S4, and the first two digits, 44, are consistent with the chapter code output in step S3.

[0063] If all logical hierarchy checks pass, a comprehensive confidence score is calculated. Specifically, the confidence assessor is activated to evaluate whether the first, second, and third reasons are coherent and consistent. For example, does the third reason continue the conclusion of the second reason and use the basic attributes established in the first reason? A logical consistency score can be obtained through text similarity analysis or key entity matching; in a specific embodiment, the evaluation result is 90 points. The structured attributes of the current product are compared with the historical case database using vectorized similarity retrieval. In one specific embodiment, multiple cases related to veneer, linden wood, rotary-cut, and approximately 0.4mm thickness were found, all with the final code 4408.1990, indicating high similarity and a historical similarity score of 95. In this embodiment, the weight of the logical consistency score is 0.4, the weight of the historical similarity score is 0.6, and the calculated overall confidence score is 93.

[0064] Optionally, the optional implementation range of the preset confidence threshold is [80, 90]. Preferably, the preferred embodiment of the preset confidence threshold is 85 points. In this embodiment, since the overall confidence is greater than the preset confidence threshold, the verification is determined to be successful, and the classification result can enter the subsequent risk query and output stage.

[0065] If the system outputs a 10-digit code of 4407.9990, but the item code is 4408, the logical-level verification fails, meaning 4407.9990 does not belong to item 4408. Alternatively, if the overall confidence score is only 70 points, an additional verification mechanism is triggered. Specifically, another finely tuned open-source big oracle model with a different architecture, such as the ChatGLM model, is called in parallel to categorize the original product descriptions. If the main model's output has low confidence or is inconsistent with other model results, the result supported by the majority of models is adopted, or a flag indicating that manual review is required is added to the categorization results on the front-end interface, such as "low confidence, manual review recommended."

[0066] This invention addresses the problem in intelligent classification systems where large language models or other algorithmic models may output codes with illegal formats or logical contradictions, or be unable to self-check their own erroneous results, by implementing an automated, multi-layered verification and evaluation mechanism. This includes format and logical hierarchy verification, comprehensive confidence calculation based on inference chain consistency and historical case comparison, and multi-strategy result processing rules. It significantly improves the compliance, reliability, and business availability of the system's final output. Through a preset security threshold comparison mechanism, it effectively intercepts risky outputs of logical errors and low confidence levels. Simultaneously, it greatly reduces the possibility of erroneous classification results directly flowing into subsequent business processes and the workload and pressure on manual reviewers when handling massive amounts of results, achieving a dual improvement in quality and efficiency and ensuring the robust operation of the intelligent auxiliary review system.

[0067] S7. Based on the verified complete ten-digit HS code, query the associated risk knowledge base to obtain and generate risk warning information related to the product; The risk warning information shall include at least one or more of the following: historical violations, safety notices, and inspection or audit recommendations associated with the product’s complete 10-digit HS code.

[0068] In one possible implementation, the verified ten-digit HS code, such as 4408.1990, is used as a key query condition to invoke the query interface of the risk knowledge base. This knowledge base is a relational database, such as PostgreSQL, whose table structure includes fields such as HS code, historical violation count, and recent security notifications. After executing the query, the database returns risk data records related to the code. These records are then transformed into user-friendly, easily understood risk warning information according to predefined business rules and templates. The generated warning information may be presented as structured text blocks or front-end components.

[0069] This invention addresses the pain points of traditional audit models, where classification results are isolated from subsequent regulatory requirements and risk information, leading to low audit efficiency and high risk omission rates. It achieves a seamless connection from code recognition to risk warning. This is accomplished by performing real-time and accurate correlation queries between verified and confirmed 10-digit HS codes and a pre-built structured business risk knowledge base. Based on the query results, multi-dimensional and actionable risk warning information is automatically generated. This significantly improves the initiative, accuracy, and intelligence of audits, and effectively reduces compliance omissions, misplacement of high-risk goods, and potential risks caused by human error or incomplete information.

[0070] S8, output the classification review result, which includes at least the complete 10-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.

[0071] Output the classification and review results, including: S81, Generate a classification review result page, which displays the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information in a structured manner; S82 provides a user interaction interface, including at least: S82a) Copy operation interface, used to copy the complete ten-digit HS code or all classification audit results to the clipboard in response to user instructions; S82b) Export operation interface, used to respond to user instructions to generate the classification review results, including the complete reasoning process chain, into a downloadable standardized format document; S82c) Feedback operation interface, used to receive user judgment on the correctness of the classification review results and correction information; S83, the input information, process data, output classification review results, and user feedback data received through the feedback operation interface of this classification task are associated and stored in the historical classification record database.

[0072] In one possible implementation, after completing all processes in steps S1-S7, the final information is integrated and output through a graphical user interface or API response. Specifically, the front-end renders a categorized review results page, which uses clear area divisions to display all information. The top results area displays the final HS code in larger, bolder font, with its standard name below, such as veneer for non-tropical wood veneer. The reasoning process display area shows the first reasoning reason, the second reasoning reason, and the third reasoning reason; The risk warning area displays the generated risk warning information in the form of eye-catching cards; The reference information area lists several of the most similar historical classification cases retrieved by the system.

[0073] Provide a set of operation buttons in a fixed location on the results page or on the results card: The copy button, when clicked by the user, will have the complete 10-digit HS code written to the system clipboard via JavaScript. A drop-down menu can also be provided to select "copy the entire report". The "Export" button, when clicked by the user, causes the system backend to populate a predefined template with all structured information from the current page, such as codes, reasoning chains, and risk warnings, generating a formatted visual document for the user to download, save, or print. This document can be used as an attachment to the review record. Feedback buttons are used by users (usually customs officers) who click the corresponding button based on their professional judgment. If "Correct" is clicked, the system records a positive feedback; if "Incorrect" is clicked, the system pops up a feedback form, requiring the user to enter the correct HS code and the reason for the correction. After submission, this data is recorded. The entire data chain of this classification task will be associated and stored in a record in the historical classification record database. This record will contain at least the task ID, timestamp, operator, original product description, preprocessed standardized description, structured attribute data, intermediate results of reasoning at each stage, final HS code, reasoning text at each level, risk warning information, correct / incorrect identifier, corrected code (if any), and reason for correction (if any).

[0074] This invention generates a structured, visualized audit result page that integrates the final classification results, the complete reasoning process, and risk warnings. It also provides diverse result output and feedback channels, solving the problems of monotonous output formats, opaque processes, and inconvenient user reuse or correction in intelligent systems. This significantly improves the system's usability and user trust, making complex AI decisions intuitive, traceable, and easy to operate. Simultaneously, by establishing a standardized data loop, it significantly reduces the cost and time required for manual result processing, feedback recording, and iterative system optimization. This provides an indispensable data foundation and user participation mechanism for the reliability verification, continuous learning, and performance evolution of the entire auxiliary audit system.

[0075] Example 2 like Figure 2 As shown, the present invention also provides a product classification system based on a knowledge base and a large language model, used to implement the product classification method based on a knowledge base and a large language model as described in any one of Embodiment 1, the system comprising: The preprocessing module is used to receive product information input by the user, preprocess the product information, and generate a standardized description; The key attribute extraction module, connected to the preprocessing module, is used to understand and analyze the standardized description based on the large language model, extract the key attributes that affect the classification of goods, and transform the key attributes into structured attribute data. The chapter-level classification reasoning module, connected to the key attribute extraction module, is used to determine the chapter to which the product belongs based on the pre-built HS coding rule knowledge base, according to the structured attribute data and the chapter annotations of the HS coding rule knowledge base, and output the corresponding two-digit chapter code and the first reasoning reason. The item-level classification reasoning module, connected to the chapter-level classification reasoning module, is used to determine the item to which the product belongs based on the structured attribute data, the item clauses and classification general rules of the HS coding rule knowledge base, using the two-digit chapter code as a constraint, and output the corresponding four-digit item code and the second reasoning reason. The subheading-level classification reasoning module, connected to the item-level classification reasoning module, is used to determine the subheading to which the product belongs by step by step, based on the structured attribute data and the subheading clauses in the HS coding rule knowledge base, using the four-digit item code as a constraint, until the complete ten-digit HS code and the third reasoning reason are output. The verification and evaluation module, connected to the sub-category-level classification reasoning module, is used to verify the compliance and logical consistency of the complete ten-digit HS code. The risk association module, connected to the verification and evaluation module, is used to query the associated risk knowledge base based on the verified complete ten-digit HS code, obtain and generate risk warning information related to the product; The classification result interaction module, connected to the risk association module, is used to output the classification review result. The classification review result includes at least the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.

[0076] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A product classification method based on a knowledge base and a large language model, characterized in that, include: S1, Receive product information input by the user, and preprocess the product information to generate a standardized description; S2, based on the large language model, the standardized description is understood and analyzed, the key attributes affecting the classification of goods are extracted, and the key attributes are transformed into structured attribute data; S3, based on the pre-built HS coding rule knowledge base, according to the structured attribute data and combined with the chapter annotations of the HS coding rule knowledge base, determine the chapter to which the product belongs, and output the corresponding two-digit chapter code and the first reason for reasoning; S4. Using the two-digit chapter code as a constraint, based on the structured attribute data and combined with the item clauses and classification rules of the HS coding rule knowledge base, determine the item to which the product belongs, and output the corresponding four-digit item code and the second reasoning. S5, using the four-digit item code as a constraint, based on the structured attribute data and the sub-item clauses in the HS coding rule knowledge base, determine the sub-item to which the product belongs level by level until the complete ten-digit HS code and the third reasoning are output. S6, Perform compliance and logical consistency verification on the complete ten-digit HS code; S7. Based on the verified complete ten-digit HS code, query the associated risk knowledge base to obtain and generate risk warning information related to the product; S8, output the classification review result, which includes at least the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.

2. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The process involves understanding and analyzing the standardized description based on a large language model, extracting key attributes that influence product classification, and transforming these key attributes into structured attribute data, including: S21, invoke the inference interface of the large language model deployed locally or in the cloud, and use the standardized description as the input text; S22, construct prompt words corresponding to the attribute extraction task to guide the large language model to identify and extract key attributes of predefined categories from the standardized description; the predefined categories include: material or composition, function or use, processing technology or state, classification attributes, and specification parameters; S23, receive the natural language or semi-structured text response containing the extracted key attributes output by the large language model; S24, parse the natural language or semi-structured text response, organize the key attributes and transform them into machine-readable structured attribute data.

3. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The pre-built HS encoding rule knowledge base determines the chapter to which an item belongs based on the structured attribute data and the chapter annotations of the HS encoding rule knowledge base, including: S31, construct chapter-level classification prompts, wherein the chapter-level classification prompts include at least: target pointing instructions that assign the customs classification role to the large language model, the structured attribute data, and task instructions and output format requirements that require chapter-level classification based on chapter annotations and general classification rules in the HS encoding rule knowledge base; S32, input the chapter-level classification prompts into the large language model; S33, obtain the output content of the large language model, and extract the two-digit chapter code determined after analyzing the product based on the chapter annotations, as well as the first reasoning reason for classifying the product based on the chapter annotations.

4. The product classification method based on knowledge base and large language model according to claim 3, characterized in that, Based on the structured attribute data, combined with the item clauses and classification rules of the HS coding rule knowledge base, the item category to which the product belongs is determined, and the corresponding four-digit item code and a second reasoning are output, including: S41. Based on the two-digit chapter code, construct item-level classification prompt words. The item-level classification prompt words include at least: target direction instructions that assign the customs classification role to the large language model, the two-digit chapter code, the structured attribute data, and task instructions and output format requirements for item-level classification based on item clauses and general classification rules in the HS coding rule knowledge base. S42, input the category-level classification prompts into the large language model; S43, obtain the output content of the large language model, and extract the four-digit item code determined after analyzing the goods according to the item clauses and general classification rules, as well as the second reasoning reason explaining the classification based on the item clauses and general classification rules.

5. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The process involves determining the sub-category to which the product belongs, level by level, based on the structured attribute data and the sub-category clauses in the HS coding rule knowledge base, until a complete ten-digit HS code and a third reasoning are output, including: S51, based on the four-digit item code, construct sub-item-level classification prompts. The sub-item-level classification prompts include at least: target direction instructions that assign the customs classification role to the large language model, the four-digit item code, the structured attribute data, and instructions and output format requirements for sub-item-level hierarchical classification based on the sub-item clauses and general classification rules in the HS coding rule knowledge base. S52, input the sub-item-level classification prompts into the large language model, and determine a five- or six-digit sub-item code based on the structured product attribute data and sub-item text; S53, based on the defined sub-sub-code, determines a six- to eight-bit sub-sub-code; S54, repeat S53 until the complete ten-digit HS code is determined; S55: Obtain the intermediate response, which includes encoding and interpretation, output by the large language model during the judgment process, and integrate it to generate a third reasoning.

6. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The compliance and logical consistency verification of the complete ten-digit HS code includes: S61, Perform format and range verification on the complete ten-digit HS code, the format and range verification includes at least bit verification, number range verification of each level of code and separator format verification; S62, verify whether the logical inclusion relationship between the complete ten-digit HS code, the two-digit chapter code, and the four-digit item code is valid; S63, based on the inherent logical consistency of the first reasoning, the second reasoning and the third reasoning, and the similarity with the historical classification case library, calculate the comprehensive confidence level of the complete ten-digit HS code; S64a, if all verifications pass and the overall confidence level is higher than the preset confidence threshold, then the verification is considered successful; S64b, if the logical hierarchy relationship verification fails or the overall confidence level is lower than the preset confidence threshold, an additional verification mechanism is triggered. The additional verification mechanism includes at least one of the following: calling a backup large language model or machine learning model to perform multi-model voting verification or automatically marking the classification review result as requiring manual review.

7. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The risk warning information includes at least one or more of the following: historical violations, safety notices, and inspection or audit recommendations associated with the product’s complete 10-digit HS code.

8. The product classification method based on knowledge base and large language model according to claim 1, characterized in that, The output classification and review results include: S81, Generate a classification review result page, which displays the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information in a structured manner; S82 provides a user interaction interface, including at least: S82a) Copy operation interface, used to copy the complete ten-digit HS code or all classification audit results to the clipboard in response to user instructions; S82b) Export operation interface, used to respond to user instructions to generate the classification review results, including the complete reasoning process chain, into a downloadable standardized format document; S82c) Feedback operation interface, used to receive user judgment on the correctness of the classification review results and correction information; S83, the input information, process data, output classification review results, and user feedback data received through the feedback operation interface of this classification task are associated and stored in the historical classification record database.

9. A product classification system based on a knowledge base and a large language model, used to implement the product classification method based on a knowledge base and a large language model as described in any one of claims 1 to 8, characterized in that, The system includes: The preprocessing module is used to receive product information input by the user, preprocess the product information, and generate a standardized description; The key attribute extraction module, connected to the preprocessing module, is used to understand and analyze the standardized description based on the large language model, extract the key attributes that affect the classification of goods, and transform the key attributes into structured attribute data. The chapter-level classification reasoning module, connected to the key attribute extraction module, is used to determine the chapter to which the product belongs based on the pre-built HS coding rule knowledge base, according to the structured attribute data and the chapter annotations of the HS coding rule knowledge base, and output the corresponding two-digit chapter code and the first reasoning reason. The item-level classification reasoning module, connected to the chapter-level classification reasoning module, is used to determine the item to which the product belongs based on the structured attribute data, the item clauses and classification general rules of the HS coding rule knowledge base, using the two-digit chapter code as a constraint, and output the corresponding four-digit item code and the second reasoning reason. The subheading-level classification reasoning module, connected to the item-level classification reasoning module, is used to determine the subheading to which the product belongs by step by step, based on the structured attribute data and the subheading clauses in the HS coding rule knowledge base, using the four-digit item code as a constraint, until the complete ten-digit HS code and the third reasoning reason are output. The verification and evaluation module, connected to the sub-category-level classification reasoning module, is used to verify the compliance and logical consistency of the complete ten-digit HS code. The risk association module, connected to the verification and evaluation module, is used to query the associated risk knowledge base based on the verified complete ten-digit HS code, obtain and generate risk warning information related to the product; The classification result interaction module, connected to the risk association module, is used to output the classification review result. The classification review result includes at least the complete ten-digit HS code, the first reason for reasoning, the second reason for reasoning, the third reason for reasoning, and the risk warning information.