An AI-based commodity HS code intelligent matching method

CN123012614APending Publication Date: 2026-10-30QINGDAO YUNYIMAO INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611217844.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

[0014]本发明中通过对归类冲突数据中的冲突边进行逆向追踪,能够沿约束传播方向定位导致候选HS编码路径互斥的属性来源及规则触发链,避免在完整归类约束图中进行无目的回溯;从冲突源链中筛选未赋值、低置信度或取值不确定的属性槽位,可将信息补充范围限定于直接影响冲突解除的关键节点。通过对待补全槽位进行解冲增益评估,比较各槽位对冲突边解除数量、候选路径削减程度及局部传播范围的影响,优先确定具有较高区分能力的目标补全要素。将目标补全要素重构为对应的申报提示并获取补全申报数据,可减少无关字段的重复询问及数据传输量,为后续局部属性回填和约束收敛提供准确输入,从而提高冲突溯源效率、补全信息有效性及归类推理过程的计算稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012614A_ABST
    Figure CN123012614A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, in particular to a commodity HS coding intelligent matching method based on AI. The method comprises the following steps: obtaining commodity declaration data, performing classified element extraction on the commodity declaration data to obtain commodity attribute data; performing constraint association graph building on the commodity attribute data and a preset exclusive rule library to obtain classified constraint graph data; performing minimum conflict subgraph extraction based on the classified constraint graph data to obtain classified conflict data; performing reverse source tracing reasoning based on the classified conflict data to obtain completed declaration data; and performing exclusive constraint convergence based on the completed declaration data and the classified constraint graph data to obtain target HS coding data. Through classified constraint graph, minimum conflict subgraph extraction and reverse source tracing completion, local incremental convergence of exclusive rules is realized, repeated graph traversal and invalid declaration supplement are reduced, and the accuracy, efficiency and traceability of HS coding matching are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an AI-based intelligent matching method for commodity HS codes. Background Technology

[0002] HS codes are crucial data for classifying import and export commodities. Commodity classification typically requires integrating multiple declaration information, including commodity name, specifications, main material, component ratio, intended use, processing status, and composition, along with relevant class notes, chapter notes, heading clauses, and exclusivity conditions, to determine the corresponding commodity code. However, actual commodity declaration data usually originates from commodity management systems, order systems, enterprise databases, or manually entered terminals. Inconsistencies in field structures, attribute names, synonyms, and missing key parameters exist between different data sources, making it difficult to directly convert commodity declaration text into the structured attributes required for rule-based reasoning.

[0003] Existing product HS coding matching systems typically generate multiple candidate codes based on text semantic similarity. However, the probabilistic associations output by the semantic model and the threshold conditions, applicable scope, and exclusion conclusions in the exclusion rules use different data representations, making it difficult to perform state verification within the same computational structure. When product attributes are missing or have insufficient confidence, the system cannot accurately determine the specific attribute nodes and constraint relationships that cause candidate paths to be mutually exclusive. This usually requires repeated traversal of all rule nodes and candidate coding paths. After supplementing a single product attribute, it is also necessary to re-execute full rule matching, resulting in access to irrelevant nodes, repeated verification of constraint edges, and repeated calculation of candidate paths, reducing the processing efficiency of conflict localization and constraint propagation. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes an AI-based intelligent matching method for commodity HS codes, thereby resolving at least one of the aforementioned technical issues.

[0005] This application provides an AI-based intelligent matching method for commodity HS codes, including the following steps: Obtain product declaration data, and extract categorization elements from the product declaration data to obtain product attribute data; Constraint association graphs are constructed using product attribute data and a pre-defined exclusive rule base to obtain classification constraint graph data; Minimum conflict subgraph extraction is performed based on the classification constraint graph data to obtain classification conflict data; Based on the classification conflict data, reverse tracing reasoning was performed to obtain the supplementary declaration data; The target HS code data is obtained by performing exclusive constraint convergence based on the completed declaration data and the classification constraint diagram data.

[0006] This invention extracts classification elements from commodity declaration data, converting unstructured declaration text into computable commodity attribute data. Furthermore, commodity attributes and exclusive rules are uniformly mapped onto a classification constraint graph, enabling semantic relationships, threshold conditions, and exclusive rules to be collaboratively processed in the form of nodes and constraint edges. By extracting the minimum conflict subgraph, the scope of conflict analysis can be limited to the local graph structure that leads to mutual exclusion of candidate classification paths, reducing repeated traversal of irrelevant nodes and constraint edges. Then, reverse tracing reasoning is used to locate key missing attributes affecting conflict resolution, forming targeted supplementary declaration data, avoiding indiscriminate supplementation of all declaration fields. Based on the supplementary results, exclusive constraint convergence is performed, allowing incremental updates and pruning of affected local nodes and candidate paths, thereby reducing the computational overhead of full graph reconstruction and repeated reasoning, improving conflict localization efficiency, constraint propagation speed, and the consistency and interpretability of HS encoding matching results.

[0007] Optionally, the extraction of categorization elements includes: Semantic encoding of declaration fields is performed on commodity declaration data to obtain commodity declaration semantic data; categorization entity recognition is performed on commodity declaration semantic data to obtain categorization element data; categorization attribute category mapping is performed on categorization element data to obtain categorization element mapping data; and attribute value element association is performed on categorization element mapping data and commodity declaration semantic data to obtain commodity attribute data.

[0008] This invention utilizes semantic encoding of declared fields in commodity declaration data to transform scattered contextual information across different fields such as commodity name, specifications, material description, usage description, and processing status into a unified semantic representation. This reduces interference from inconsistent field expressions, misuse of abbreviations, and synonymous descriptions in subsequent identification. Through entity recognition, key entities affecting commodity classification, such as material, component ratio, function, usage, and processing depth, can be accurately located, reducing the involvement of irrelevant text in calculations. By mapping classification attribute categories, entities with different expressions are merged into a unified attribute category. Combined with the semantic data of commodity declarations, the association between attribute values ​​and classification elements is completed, reducing data bias caused by attribute value mismatches, cross-field misassociations, and missing elements. This results in commodity attribute data with a clear structure, consistent semantics, and direct applicability for constraint mapping, improving the computational stability and processing accuracy of subsequent conflict detection, constraint propagation, and HS code matching.

[0009] Optionally, constraint-based mapping includes: Based on product attribute data and a pre-defined exclusive rule base, rule slot alignment is performed to obtain attribute rule mapping data; threshold relationship binding is performed based on the attribute rule mapping data to obtain threshold constraint association data; exclusive path orchestration is performed on the threshold constraint association data to obtain exclusive rule path data; priority orientation is performed based on the exclusive rule path data to obtain rule orientation relationship data; constraint edges are generated on the rule orientation relationship data to obtain classification constraint edge data; and heterogeneous graph encapsulation is performed based on the classification constraint edge data to obtain classification constraint graph data.

[0010] This invention aligns product attribute data with the exclusive rule base through rule slot alignment, enabling attributes such as material, component ratio, usage, function, and processing status to accurately map to corresponding machine-executable rule conditions, reducing semantic discrepancies between natural language attributes and structured rules. Threshold-based binding solidifies numerical attributes, interval conditions, and trigger boundaries into computable constraints, preventing fuzzy semantic matching from exceeding hard thresholds. Path orchestration and priority orientation of exclusive relationships clarify the triggering order, exclusion direction, and hierarchical dependencies between different rules, reducing conclusion conflicts caused by parallel rule execution. Constraint edge generation and heterogeneous graph encapsulation unify the associations between product attributes, exclusive rules, and candidate codes into a traversable graph structure, reducing node access and computational overhead caused by repeated comparisons of all rules, and improving the orderliness, traceability, and processing efficiency of classification constraint propagation.

[0011] Optionally, minimum conflict subgraph extraction includes: Constraint states are labeled based on the classification constraint graph data to obtain constraint state graph data; mutually exclusive path addressing is performed on the constraint state graph data to obtain mutually exclusive classification path data; conflict closure is generated based on the mutually exclusive classification path data to obtain conflict subgraph data; conflict kernel reduction is performed on the conflict subgraph data to obtain minimum conflict subgraph data; evidence chain encapsulation is performed based on the minimum conflict subgraph data to obtain classification conflict data.

[0012] This invention calibrates the constraint states of attribute nodes, rule nodes, constraint edges, and candidate coding nodes in the classification constraint graph, converting the satisfied, violated, unresolved, and inactive states of each constraint relationship into computable graph state data, providing a clear state basis for conflict localization. Through mutually exclusive path addressing, candidate classification paths whose conclusions cannot be simultaneously valid can be quickly identified along the activated constraint directions, avoiding indiscriminate traversal of all graph nodes. Conflict closure generation confines necessary nodes and constraint edges with propagational associations to mutually exclusive conclusions to a local subgraph, and uses conflict kernel reduction to eliminate redundant paths and unnecessary constraints that do not affect the mutually exclusive state, thus forming a minimal conflict structure that cannot be further reduced. Encapsulating the minimal conflict subgraph with an evidence chain preserves the conflict source, rule triggering relationships, and path transmission order, reducing the graph search range, node access count, and redundant verification overhead while improving the accuracy, interpretability, and efficiency of subsequent reverse tracing reasoning in classification conflict localization.

[0013] Optionally, reverse tracing reasoning includes: Conflict edge tracing is performed based on the categorized conflict data to obtain conflict source chain data; unresolved slots are filtered from the conflict source chain data to obtain slot data to be filled; the de-conflict gain is evaluated from the slot data to be filled to obtain target completion element data; the declaration items are reconstructed based on the target completion element data to obtain completion prompt data, and completion declaration data is obtained based on the completion prompt data.

[0014] This invention, by tracing conflict edges in classification conflict data in reverse, can locate the attribute sources and rule triggering chains that cause mutual exclusion of candidate HS encoding paths along the constraint propagation direction, avoiding aimless backtracking in the complete classification constraint graph. By filtering unassigned, low-confidence, or uncertain-value attribute slots from the conflict source chain, the scope of information supplementation can be limited to key nodes that directly affect conflict resolution. By evaluating the dissipation gain of the slots to be supplemented, and comparing the impact of each slot on the number of conflict edges resolved, the degree of candidate path reduction, and the local propagation range, target supplementation elements with higher discriminative power are prioritized. Reconstructing the target supplementation elements into corresponding declaration prompts and obtaining supplementation declaration data reduces repeated queries of irrelevant fields and data transmission volume, providing accurate input for subsequent local attribute backfilling and constraint convergence, thereby improving conflict tracing efficiency, the effectiveness of supplementation information, and the computational stability of the classification reasoning process.

[0015] Optionally, convergence of the exclusivity constraint includes: Based on the completed declaration data and classification constraint graph data, attribute backfilling and correction are performed to obtain updated constraint graph data; based on the updated constraint graph data, exclusive rules are activated to obtain rule activation path data; path pruning is performed on the rule activation path data to obtain converged classification path data; based on the converged classification path data, unique coding determination is performed to obtain target HS coding data.

[0016] This invention achieves local incremental updates by backfilling the completed declaration data into the corresponding product attribute nodes of the classification constraint graph and simultaneously correcting the states of relevant nodes and constraint edges. This avoids rebuilding the complete classification constraint graph due to the addition of a single attribute. Based on the corrected attribute values, corresponding exclusion rules are activated, establishing a clear propagation relationship between rule triggering conditions, exclusion directions, and candidate coding paths. Targeted pruning of paths that violate hard constraints, threshold conditions, or exclusion conclusions quickly compresses the candidate path search space, reducing invalid node traversal and redundant rule verification. A unique coding determination is performed on the converged classification paths, enabling the output of the target HS code under the condition that activated constraints are satisfied and the candidate set is stable. This improves constraint propagation efficiency, consistency of classification results, and traceability of the coding generation process.

[0017] Optionally, mutual exclusion path addressing includes: Conflicting endpoints are locked based on constraint state graph data to obtain mutually exclusive endpoint data; constraint direction tracing is performed on the mutually exclusive endpoint data to obtain directional constraint chain data; mutually exclusive branch intersections are performed based on the directional constraint chain data to obtain mutually exclusive path data; and path dual encapsulation is performed based on the mutually exclusive path data to obtain mutually exclusive classification path data.

[0018] In this invention, by locking conflict endpoints in the constraint state graph, candidate HS-encoded nodes with mutually exclusive classification conclusions can be prioritized, avoiding indiscriminate searching of all encoded nodes and rule nodes. Tracing the attribute sources, rule triggering relationships, and exclusion transmission chains corresponding to endpoints along the constraint edge direction maintains the directionality and causal continuity of conflict paths. By performing mutually exclusive branch intersections on directional constraint chains, key branches originating from nodes with the same attribute or rule nodes but pointing to incompatible classification conclusions can be identified, reducing interference from irrelevant paths in conflict analysis. Dual encapsulation of mutually exclusive paths forms structured path pairs with the nodes, constraint edges, and triggering states of two corresponding paths, thereby reducing the graph traversal range, decreasing the number of repeated addressings and constraint checks, and improving the accuracy, processing efficiency, and traceability of mutually exclusive path location.

[0019] Optionally, conflict nuclear reduction includes: Based on the conflict subgraph data, necessary edge trial deletions are performed to obtain edge deletion verification data; based on the edge deletion verification data, conflict preservation verification is performed to obtain necessary constraint data; redundant nodes are removed from the necessary constraint data to obtain conflict core data; minimum closure confirmation is performed on the conflict core data to obtain minimum conflict subgraph data.

[0020] This invention employs a necessary edge trial deletion process on attribute constraint edges, rule triggering edges, and encoded exclusion edges in the conflict subgraph, followed by conflict preservation verification after each trial deletion. This accurately determines the actual contribution of each constraint edge to the mutual exclusion classification conclusion, avoiding coarse screening based solely on edge weight or connectivity. Necessary constraints that cause changes in the conflict state are retained, while redundant nodes that do not participate in effective propagation, are repeatedly connected, or do not affect the establishment of a conflict are removed, continuously compressing the node and edge size of the conflict subgraph. The system performs minimum closure verification, ensuring that the reduced graph structure maintains connectivity, constraint integrity, and conflict reproducibility, thus obtaining a minimum conflict subgraph that cannot be further reduced. This reduces irrelevant node access and repeated constraint verification during subsequent reverse tracing, lowers processor graph traversal and state update overhead, and improves the accuracy and computational efficiency of conflict source localization, key missing attribute identification, and local reasoning.

[0021] Optionally, the demodulation gain evaluation includes: Based on the slot data to be filled, slot value expansion is performed to obtain slot hypothesis data; local propagation simulation is performed on the slot hypothesis data to obtain local propagation data; based on the local propagation data, de-energization gain quantization is performed to obtain slot gain data; based on the slot gain data, gain cost sorting is performed to obtain target completion element data.

[0022] This invention expands the optional attribute values ​​of each slot to be filled, forming slot hypothesis data that can cover different exclusion conditions and candidate classification branches, providing a basis for the calculable evaluation of missing attributes. Subsequently, each slot hypothesis is backfilled into the corresponding conflict local area for propagation simulation, allowing for pre-observation of the state changes of relevant rule nodes, constraint edges, and candidate HS encoding paths, avoiding repeated trial calculations on the complete classification constraint graph. Based on the number of conflicts that each hypothesis can resolve, the number of candidate paths pruned, and the constraint propagation range, the dissipation gain is quantified. Furthermore, the gain cost is ranked according to the difficulty of attribute acquisition, the number of interactions, and the data supplementation cost, thus prioritizing the target completion elements that achieve a greater conflict reduction effect with lower completion costs. This reduces invalid information queries and repeated graph traversal, improving the targeting of completion decisions, the efficiency of local reasoning, and the stability of subsequent encoding convergence.

[0023] Optionally, this application also provides an AI-based intelligent matching system for commodity HS codes, including: At least one memory for storing computer-executable instructions; At least one processor, the processor being configured to execute computer-executable instructions stored in the memory to implement the AI-based intelligent matching method for commodity HS codes as described above; The data transmission interface, connected to the processor, is used to receive commodity declaration data, a preset exclusive rule base, and supplementary declaration data corresponding to the completion prompt data, and to transmit the commodity declaration data, the preset exclusive rule base, and the completion declaration data to the processor, and to output the target HS code data generated by the processor.

[0024] The purpose of this invention is to address the problems of scattered fields, inconsistent attribute expressions, and multi-layered nesting of exclusion rules in commodity declaration texts. Firstly, by extracting classification elements, unstructured information such as commodity name, material, component ratio, use, function, and processing status is converted into calculable commodity attribute data. Commodity attributes, exclusion rules, threshold conditions, and candidate HS codes are uniformly encapsulated in a classification constraint graph, enabling the orderly propagation of soft semantic associations and hard constraint relationships within the same graph structure. Through minimum conflict subgraph extraction, the analytical scope of mutually exclusive classification conclusions is compressed to the necessary nodes and constraint edges that directly lead to conflicts, reducing repeated traversal of irrelevant rule paths. Then, by tracing the conflict source chain backwards to locate unassigned or low-confidence key attribute slots, targeted completion prompts are generated based on the mitigation gain, avoiding indiscriminate supplementation of all declaration fields. By using completed declaration data to perform attribute backfilling, rule activation, and candidate path pruning on the local graph structure, incremental convergence can be achieved without rebuilding the complete constraint graph. This reduces the computational overhead of graph traversal, state verification, and repeated reasoning, and improves the efficiency of conflict localization, the stability of constraint propagation, and the consistency, accuracy, and traceability of the target HS encoding process. Attached Figure Description

[0025] Other features, objects, and advantages of this application will become more apparent from the following detailed description of the non-limiting embodiments, taken with reference to the accompanying drawings: Figure 1 A flowchart illustrating the steps of an AI-based intelligent matching method for commodity HS codes is shown in one embodiment. Figure 2 A flowchart illustrating the steps of a classification element extraction method according to an embodiment is shown. Figure 3 A flowchart illustrating the steps of a constraint association graphing method according to an embodiment is shown. Figure 4 A flowchart illustrating the steps of a minimum conflict subgraph extraction method according to an embodiment is shown. Figure 5 A flowchart illustrating the steps of a reverse tracing reasoning method according to an embodiment is shown. Figure 6 A flowchart illustrating the steps of an exclusive constraint convergence method according to one embodiment is shown. Detailed Implementation

[0026] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0027] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. Functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0028] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0029] The aforementioned intelligent matching system for HS codes of the goods was deployed on a server configured with an Intel Xeon E-2388G processor, 32GB of memory, and an NVIDIA RTX 3060 graphics card. The preset exclusive rule base includes 12,680 classification rules, 3,245 HS code nodes, and 18,640 rule constraints. A single product declaration from a batch of imported textile goods was selected for processing. The product declaration included: "Women's knitted top, 80% cotton content, 20% polyester fiber content, short sleeves, for everyday wear," but did not declare whether it had a collar or a front opening structure.

[0030] The system first uses a trained BERT language encoding model to semantically encode the product name, ingredient content, processing method, and usage fields. It then performs entity recognition and attribute category mapping to obtain product attribute data such as "Applicable to women," "Product category," "Processing method," "Main material," "Cotton," "Cotton content," "Secondary material," "Polyester fiber," "Polyester fiber content," "Sleeve type," and "Main usage," etc. The entity recognition confidence score is no less than 0.80. The character interval between "80% cotton content" and the main material "cotton" is 2 characters, and the syntactic dependency path length is 1, satisfying the association conditions of a character interval not exceeding 12 characters and a syntactic dependency path length not exceeding 3.

[0031] After aligning product attribute data with the exclusive rule base through rule slots and binding threshold relationships, the system establishes a local classification constraint graph containing 42 product attribute nodes, 67 related rule nodes, 18 candidate HS code nodes, and 156 constraint edges. The cotton content of 80% satisfies the numerical condition of "cotton content not less than 80%", and simultaneously activates the corresponding classification rules for "knitted, women's, and short-sleeved". Since the original declaration data did not include the "collar type" and "open front structure" attributes, the classification constraint graph simultaneously forms retention and exclusion paths pointing to candidate code 61061000, with an initial number of 4 candidate codes.

[0032] The system uses candidate code 61061000 as the conflict endpoint for mutual exclusion path addressing, extracting a conflict subgraph containing 17 nodes and 24 constraint edges. Through necessary edge deletion, conflict-preserving verification, and redundant node removal, a minimal conflict subgraph consisting of 8 nodes and 9 necessary constraint edges is finally obtained. Compared with directly traversing all 156 local constraint edges, the number of constraint edges actually involved in subsequent conflict tracing is reduced by 94.23%.

[0033] The system performs reverse tracing along both the retained and excluded paths to identify "collar type" and "front opening structure" as slots to be filled. After candidate value expansion and local propagation simulation for the two slots, the dissipation gain for "collar type = no collar" is 1, and the dissipation gain for "front opening structure = no front opening" is 2. Following the order of dissipation gain from largest to smallest and completion cost from smallest to largest, the system prioritizes generating a completion prompt: "Please confirm whether the product has a front opening structure." The applicant confirms through the input interface that the product "has no front opening structure," and the system accordingly generates the completed application data and fills in the corresponding attribute nodes.

[0034] After attribute backfilling is completed, the system reactivates the affected exclusive rules and performs local propagation only within the 23 rule nodes reachable from the "open front structure" slot. After path pruning, the original four candidate HS codes are reduced to one, and the final output target HS code is 61061000. At the same time, a classification evidence chain consisting of knitted—women's—80% cotton content—short sleeve—no front open front structure—target HS code is generated.

[0035] In a test set containing 5000 textile product declaration data, the method of this embodiment was compared with a conventional matching method that uses full rule traversal. The average processing time per declaration of the conventional method was 816 milliseconds, while the average processing time per declaration of the method of this embodiment was 247 milliseconds, a reduction of 69.73%. The conventional method accessed an average of 1865 rule nodes, while the method of this embodiment accessed an average of 524 rule nodes, a reduction of 71.90%. When there were missing declaration elements, the conventional method required an average of 5.8 declaration fields to be supplemented, while the method of this embodiment only prompted the supplementation of 2.0 key fields on average, a reduction of 65.52%. The first-time matching accuracy of the target HS code increased from 91.40% of the conventional method to 97.20%. This shows that this embodiment, by limiting the scope of conflict analysis through minimum conflict subgraph and combining reverse tracing completion and local constraint convergence, improves the efficiency, accuracy, and traceability of HS code matching results while reducing full graph traversal, invalid field supplementation, and duplicate rule verification.

[0036] Please see Figures 1 to 6 This application provides an AI-based intelligent matching method for commodity HS codes, including the following steps: 01. Obtain product declaration data, and extract classification elements from the product declaration data to obtain product attribute data; In one embodiment, commodity declaration data is obtained, including commodity name, specifications, ingredient content, processing method, main use, brand, packaging form, unit of measurement, and declaration element description. Null values, duplicate fields, and fields with abnormal formatting are cleaned, and numerical units, percentage expressions, and synonym descriptions are standardized to obtain standard declaration field data. The standard declaration field data is then divided into text segments according to field order, and semantic encoding is performed using a pre-trained language model (such as the BERT language model) to obtain commodity declaration semantic data. ,in, For the text of the i-th declaration field, For the corresponding set of semantic vectors, The semantic vector of the i-th declaration field, i.e., the declaration field text. The encoding result is obtained after processing the semantic encoding function of the declaration field. Based on the preset classification element dictionary and entity boundary labeling rules, classification entity recognition is performed on the semantic data of the commodity declaration. When a continuous character segment simultaneously satisfies entity type matching and field position constraints, it is identified as a classification element, and classification element data is obtained. The classification element type includes at least commodity material, composition ratio, structural form, processing state, function and purpose, target user, and packaging state. Each classification element is converted into a unified attribute slot according to the preset attribute category mapping table. For example, "cotton content 80%" is mapped to "main material = cotton, content = 80%", and "knitted women's top" is mapped to "manufacturing method = knitted, target user = women, commodity category = top", thus obtaining classification element mapping data. Attribute values ​​are associated according to the positional relationship, modification relationship, and numerical adjacency relationship of the classification elements in the original fields. For attribute slots... From the set of candidate values ​​that are semantically closest to it and satisfy the type constraints (The attribute value is determined from the set of associable attribute values ​​of the j-th categorization attribute category obtained by identifying, mapping, and filtering according to field position, entity type, and syntactic relation from the original commodity declaration data.) ,in, For attribute slot semantic vectors, For candidate attribute value semantic vectors, For semantic distance, the attribute name, attribute value, source field, and corresponding text position are encapsulated into product attribute data: ,in, For source field, This indicates the position of the attribute value in the declaration data.

[0037] 02. Perform constraint association graph construction on product attribute data and preset exclusive rule base to obtain classification constraint graph data; In one embodiment, product attribute data is read. and a pre-defined exclusive rule base Each of the exclusive rules Includes the set of applicable attribute slots Triggering conditions Excluded objects Reserved objects and rule priority Based on the attribute name and attribute value type, and Align rule slots with the same name or belonging to a preset synonym mapping relationship to obtain attribute rule mapping data: ,in, For attribute values The corresponding rule conditions, from the triggering conditions Obtained from [the data]. Threshold relationships are bound to the attribute rule mapping data. For numeric attributes, the judgment is made according to the interval conditions in the rules: ,in, and These represent the lower and upper limits of the rule conditions, respectively; for enumerated attributes, a set inclusion relationship is used. The process involves making a judgment to obtain threshold constraint-related data. Conditions that must be satisfied simultaneously within the same rule are concatenated in the order of "prerequisite attribute condition—threshold condition—exclusion result"; conditions that can be satisfied individually are formed into parallel branches. When all conditions in a branch are met, the corresponding exclusion object is connected. and reserved objects This yields the exclusive rule path data. Based on rule priority... Priority orientation is determined based on conditional inclusion relationships and HS coding levels. Higher priority rules point to lower priority rules, specific attribute rules point to general attribute rules, and sub-item rules point to category rules. If two rules have the same priority, the one with more conditions is prioritized, resulting in rule orientation relationship data. Constraint edges are generated based on the rule orientation relationships. "Satisfied" or "Not Satisfied" edges are generated between attribute nodes and rule nodes, "Retained" or "Excluded" edges are generated between rule nodes and HS coding nodes, and "Preceded," "Dependent," or "Overridden" edges are generated between rule nodes, resulting in classification constraint edge data. ,in, and For associated nodes, Assuming the constraint edge type, product attribute nodes, rule nodes, and candidate HS code nodes are encapsulated into a node set V, and the classification constraint edge data is encapsulated into an edge set E, thus constructing the classification constraint graph data: ,in, This is a set of node types (including product attribute node types, exclusive rule node types, and HS code node types). The set of constraint edge types (including "satisfied" or "not satisfied" edges, "retained" or "excluded" edges, "preceded", "dependent" or "covered" edges).

[0038] 03. Extract the minimum conflict subgraph based on the classification constraint graph data to obtain the classification conflict data; In one embodiment, classification constraint diagram data is read. Based on the value status of the product attribute nodes and the type of constraint edges, the state of each rule node is labeled. When all the preconditions of a rule are met, the rule is marked as active; when some preconditions are not met, it is marked as inactive; when a necessary attribute is missing, it is marked as pending, thus obtaining the constraint state diagram data. ,in, In the constraint state graph data, candidate HS-encoded nodes that simultaneously possess both "retain" and "exclude" paths are identified as conflict endpoints. From these conflict endpoints, the forward classification paths are obtained by tracing back along the "retain, exclude, depend on, and precede" constraint edges. and reverse exclusive path When two paths point to the same HS code or hierarchical codes and have opposite conclusions, they constitute mutually exclusive classification path data. ,in, The HS code corresponding to the path. To retain or exclude conclusions, the initial node set is composed of attribute nodes, rule nodes, HS-encoded nodes, and their connecting edges in each group of mutually exclusive classification paths. Sum of edges It also adds the necessary preceding nodes to maintain path connectivity, generating conflicting closures: This yields the conflict subgraph data. For each constraint edge in the conflict subgraph, necessary edge deletions are performed. For edges to be verified... ,structure If, after deleting an edge, there are still retained and excluded paths corresponding to the same conflict endpoint, then the edge is considered redundant and permanently deleted; otherwise, it is retained as a necessary edge. After completing edge deletion, nodes that are not connected to necessary edges and are not conflict endpoints are removed, and this process is repeated until no conflict can be maintained after deleting any remaining edge, thus obtaining the minimum conflict subgraph data. Following the order of "product attribute - trigger rule - constraint path - conflict code", the nodes and edges in the minimum conflict subgraph are encapsulated into evidence chains to form categorized conflict data: Where h is the conflict HS code, For conflicting related product attribute sets, This is a set of conflict association rules.

[0039] 04. Based on the classification conflict data, reverse tracing reasoning is performed to obtain the supplementary declaration data; In one embodiment, classification conflict data is read. ,in, For conflicting HS codes, and These are the reserved paths and excluded paths, respectively. For conflicting related product attribute sets, This is a set of conflict association rules. Starting from the first point, traverse backwards along both paths until the first rule node with different triggering conditions is located. Record the rule node, its preceding attribute node, and the constraint edge to obtain the conflict source chain data: Extract rules from the conflict source chain and The required set of attribute slots is denoted as and The attribute slot set refers to the set of product attribute categories that an exclusive rule needs to read when making a trigger judgment. For the i-th conflicting HS code, the reserved path conflict source rule node is the one along the reserved path. The difference rules located during reverse tracing that directly support the retained conclusion. For the i-th conflict HS code, the exclusion path conflict source rule node is the one along the exclusion path. The discrepancy rules located during reverse tracing that directly support the exclusion conclusion. The slots required by the rules are compared with existing conflict-related attributes: ,in, For the set of missing slots, Let i be the set of conflict-related product attributes corresponding to the i-th conflict. In the middle, the set formed after extracting all attribute slot names; for the same slot with multiple different values, if the number of values ​​satisfies If so, the slot is identified as a conflicting slot. This represents the set of attribute values ​​that have already appeared in the existing product attribute data for the slot u to be filled. Missing and conflicting slots are merged to obtain the data for the slots to be filled. Based on the enumeration conditions, numerical ranges, or hierarchical categories in the conflict association rules, expand the candidate value set B(u) for each slot u to be filled, forming the slot hypothesis data: Each hypothesis z is temporarily written into the corresponding conflict source chain, and the rule activation state and retention / exclusion paths are recalculated to obtain the remaining conflict set C(z). Hierarchical categories refer to attribute category systems with superior, subordinate, or parent-child inclusion relationships, used to represent attribute values ​​with hierarchical refinement relationships, such as product category, usage category, material category, or processing state. The resolution gain is represented by the number of conflicts reduced. ,in, This is the conflict set before completion. The data is sorted according to "deconflict gain from largest to smallest, number of completion fields from fewest to most, and rule level from specific to general," and slots with g(z) > 0 are selected as the target completion feature data. Based on the slot names, candidate values, source rules, and corresponding conflict codes in the target completion element data, the original conflict-related attributes are reconstructed for the declaration items. Missing slots are added, conflicting slots have their old values ​​invalidated and target values ​​replaced, and duplicate records of the same slot are merged to obtain the completed declaration data. ,in, Let r be the set of all conflicting related product attributes, r be the candidate value source rule, and h be the corresponding conflict HS code. The status is either newly added, replaced, or pending confirmation.

[0040] 05. Based on the completed declaration data and the classification constraint diagram data, perform exclusive constraint convergence to obtain the target HS code data.

[0041] In one embodiment, the supplementary declaration data is read. and classification constraint diagram data Retrieve the value of the slot with the status of "new" or "replaced". Write the corresponding product attribute node, where j is the order item and M is the total number of data; mark the "satisfied" and "triggered" edges associated with the replaced old value as invalid, and apply the rules based on the source. Regenerate the constraint edges between attribute nodes and rule nodes to obtain updated constraint graph data: , To update the node set, the data is derived from the node set V in the original classification constraint diagram data and the newly added or replaced product attribute values ​​in the supplementary declaration data. To update the constraint edge set, we use edges derived from the original constraint edge set E and those recalculated based on the completed attribute values; we then iterate through and update the rule nodes in the constraint graph. For each rule... Let its necessary condition set be This rule is activated when all conditions are met by valid product attributes: Continuing along the activation rule node, connect its retained HS encoding, excluded HS encoding, and subsequent dependent rules to obtain the rule activation path data. Path pruning is performed on the rule activation path data, such as deleting paths containing inactive rule nodes or invalid attribute edges; deleting a path when its pointed-to HS code is hit by any valid exclusion edge; for two retained paths pointing to both a parent code and a child code, if all conditions of the child code path are met, the child code path is retained and its fully contained parent path is deleted. The pruned path set is as follows: ,in, This is the set of valid excluded edges for path p. Given the set of conditions required for this path, we obtain the convergent classification path data. We then extract the candidate HS code set corresponding to the convergent classification path. ,like If the condition is met, then the code is directly identified as the target HS code; if there are hierarchical codes, then the code at the deepest level that satisfies all conditions is retained; if there are multiple codes at the same level, then their exclusion conditions are further checked, and only the codes that have not been excluded by other valid rules are retained. When the condition is met... At that time, output the target HS-encoded data: ,in, For the target HS code, For the corresponding convergence path, To activate the rule set, The set of product attributes that support this code.

[0042] Optionally, the extraction of categorization elements includes: 11. Based on the commodity declaration data, perform semantic encoding on the declaration fields to obtain commodity declaration semantic data; In one embodiment, the product name, specifications, ingredient content, processing method, main use, brand, packaging form, unit of measurement, and declaration elements are read, and then the following steps are performed sequentially: space removal, full-width / half-width character unification, unit of measurement conversion, and synonym replacement. Specifically, "eighty percent" and "80%" are unified to "80%", and "polyester fiber" and "polyester fiber" are uniformly associated with the same standard term. The cleaned i-th field text is denoted as... Input to the pre-trained language encoding model: Obtain semantic data for product declaration ,in, For fields The corresponding semantic vector.

[0043] The model training process includes training a pre-trained language encoding model using the BERT architecture. It involves collecting text containing product names, specifications, material composition, processing methods, uses, and historical classifications; segmenting the text; and adding classification tags [CLS] and separator tags [SEP]. The initial representation of each input word is as follows: ,in, , and These represent the word embedding, position embedding, and field fragment embedding for the t-th word, respectively. The encoding model uses a 12-layer Transformer encoder with a hidden layer dimension of 768, 12 multi-head attention heads, a single-head dimension of 64, a feedforward network intermediate dimension of 3072, a maximum input length of 128 words, and a dropout rate of 0.1. The encoding result of the l-th layer is represented as: ,in, , For multi-head self-attention processing, This is processed by a feedforward network. During training, 15% of the words are randomly masked, and the masked words are predicted based on the context. Of these, 80% of the selected words are replaced with [MASK], 10% are replaced with random words, and 10% remain unchanged. Cross-entropy loss is used to update the model parameters. ,in This is the set of optimal model parameters obtained after training. For model parameters, For the set of positions of the masked lexical units, For primitive word elements, This is the masked input text. The training batch size is set to 32, and the learning rate is set to... The training process is repeated 5 times. After training, the text of the i-th declaration field is... Input the model and extract the 768-dimensional vector corresponding to the [CLS] marker in the last layer as the field semantic vector: , The completed semantic encoding model for the declared fields, i.e., the optimal parameter language encoder, yields: Where H represents the semantic data of the commodity declaration, and n represents the total number of declaration fields.

[0044] 12. Perform entity recognition on the semantic data of commodity declarations to obtain classification element data; In one embodiment, character fragments in each field are labeled as entities according to a continuous boundary rule of attribute name—attribute value—numerical unit. Entity types include product material, ingredient ratio, structural form, processing status, function and purpose, applicable object, and packaging status. The hidden vectors of the corresponding words in the last layer of BERT are averaged to obtain the entity semantic vector. Input the attribute category name and candidate attribute value into the same trained language encoding model to obtain the attribute category semantic vector. and candidate attribute value semantic vector A word classification layer is connected to the BERT output layer, and Softmax is used to output the entity type probability. The maximum type probability is used as the entity recognition confidence score. When the entity recognition confidence score of a candidate character segment is not lower than 0.80, and the characters before and after it do not belong to the same entity continuation segment, the entity is retained; candidate segments with a confidence score lower than 0.80 are marked as unrecognized items. For example, "cotton 80%, polyester 20% knitted women's top" is recognized as "cotton", "80%", "polyester", "20%", "knitted", "women's", and "top", resulting in the following classification element data: ,in, For entity content, For entity type, For source field, For physical location.

[0045] 13. Based on the classification element data, perform classification attribute category mapping to obtain classification element mapping data; In one embodiment, each entity type is matched with a preset classification attribute category table. For example, "cotton, polyester" is mapped to "material", "80%", "20%" is mapped to "composition content", "knitted" is mapped to "processing method", and "women's" is mapped to "applicable object". For entities with multiple candidate attribute categories, entity vectors are calculated. With attribute category vector Cosine similarity: Choose to satisfy And the attribute category with the highest similarity If all values ​​are below 0.82, the entity is marked as an element to be confirmed, and the classification element mapping data is obtained. .

[0046] 14. Based on the classification element mapping data and the commodity declaration semantic data, attribute value elements are associated to obtain commodity attribute data.

[0047] In one embodiment, for attribute categories Within the same source field, retrieve adjacent candidate attribute values; numeric attribute values ​​must be no more than 12 characters apart from the attribute entity, and the syntactic dependency path length must not exceed 3; enumerated attribute values ​​must be located within the clause containing the attribute entity. When multiple candidate values ​​exist, select the one with the smallest semantic distance. ,in, For attribute categories The set of candidate values, This is for semantic distance. For the same attribute with multiple valid values, each value is retained according to its original position in the text, without merging the values. For example, this results in "Main material = cotton, content = 80%", "Secondary material = polyester, content = 20%", "Processing method = knitted", "Target audience = women", "Product category = tops". We get: ,in, For the field where the attribute value comes from, This indicates the position of the attribute value in the product declaration data.

[0048] Optionally, constraint-based mapping includes: 21. Based on product attribute data and a preset exclusive rule base, align rule slots to obtain attribute rule mapping data; In one embodiment, the aforementioned product attribute data is read. and the exclusive rule base Each rule Includes a set of rule slots Triggering conditions Excluded objects Reserved objects and rule priority First, align the attributes according to the principle of identical names. If the names are inconsistent, search the preset thesaurus; for example, unify "ingredient content" and "material percentage" into the content slot. If multiple candidate slots still exist, calculate the cosine similarity between the attribute vector and the regular slot vector, and retain the slot with the largest similarity value that is not less than 0.82, resulting in: ,in, For attribute values The corresponding rule conditions.

[0049] 22. Based on the attribute rule mapping data, threshold relationship binding is performed to obtain threshold constraint associated data; In one embodiment, percentages, masses, lengths, and other numerical values ​​are first converted to a unified unit specified by the rule base. For numerical conditions, the following applies: Binding is performed, where, and For rules Preset lower and upper limits. For example, "cotton content not less than 80%" corresponds to... , This ensures that 100% of the boundary values ​​are included. For enumerated conditions, the following method is used: Make a judgment; for negative conditions, use The judgment is performed to obtain the threshold constraint associated data: ,in, This is a marker indicating whether the condition is true or false.

[0050] 23. Arrange exclusive paths for threshold constraint-related data to obtain exclusive rule path data; In one embodiment, for conditions connected by "AND" within the same rule, they are concatenated in the order of attribute slot—threshold condition—rule conclusion; conditions connected by "OR" are established as parallel branches; and conditions connected by "NOT" are connected to the branch where the condition is not true. When all conditions on the concatenated path are true... At that time, connect the end of the path to the corresponding reserved object. Or exclude objects ,get: , This is the first attribute slot of the q-th rule. This is the trigger condition for the first attribute slot in the q-th rule. For the nth attribute slot of the qth rule, such as main material, component content, processing method, or main purpose. This is the trigger condition for the nth attribute slot in the qth rule. Let q be the classification conclusion object of the q-th rule, representing the connection based on the rule content. or And aggregate them to form exclusive rule path data. .

[0051] 24. Priority orientation is performed based on the exclusive rule path data to obtain rule orientation relationship data; In one embodiment, the rule priority is set to Level 1 is the highest and level 5 is the lowest. Among two rules with a relationship, the rule with higher priority points to the rule with lower priority; when priorities are the same, the specific rule with more applicable attribute conditions points to the general rule with fewer conditions; when the number of conditions is still the same, the rule pointing to the deeper HS encoding level takes precedence. Therefore: ,in, For the direction of precedence, dependency, or overriding.

[0052] 25. Generate constraint edges on the rule-oriented relation data to obtain classification constraint edge data; In one embodiment, the product attribute node and the rule node are connected according to... Generate edges that satisfy or do not satisfy the conditions; rule nodes and Generate a "reserved" edge between them, and "Exclusion" edges are generated between them; rule nodes are based on... Generate "preceding", "dependent", or "overriding" edges to obtain: ,in, and For associated nodes, This is the type of constraint edge.

[0053] 26. Based on the classification constraint edge data, perform heterogeneous graph encapsulation to obtain classification constraint graph data.

[0054] In one embodiment, product attribute nodes, rule nodes, and candidate HS code nodes are encapsulated into a node set V, with each node carrying an attribute value. Rules and conditions Priority and encoding level information; encapsulate the classification constraint edge data into an edge set E, forming: ,in, A set of types for attribute nodes, rule nodes, and HS-encoded nodes. A set of types for satisfying, not satisfying, retaining, excluding, preceding, depending on, and covering edges.

[0055] Optionally, minimum conflict subgraph extraction includes: 31. Based on the classification constraint diagram data, the constraint state is calibrated to obtain the constraint state diagram data; In one embodiment, the aforementioned classification constraint diagram data is read. And based on the "satisfied" or "not satisfied" edges between attribute nodes and rule nodes, the state of the rule node is determined. For rules If all necessary conditions correspond to If any necessary condition corresponds to the active state, then it is marked as active; If it does not exist, it is marked as inactive; However, if at least one necessary slot has not acquired an attribute value, it is marked as pending, resulting in: ,in, .

[0056] 32. Perform mutual exclusion path addressing on the constraint state diagram data to obtain mutually exclusive classification path data; In one embodiment, mutually exclusive path addressing is performed on the constraint state graph data to obtain mutually exclusive classification path data. The HS-coded nodes pointed to by both the "retain" and "exclude" edges of simultaneously activated rules are retrieved. Lock it as the conflict endpoint; from respectively Tracing backward along the constraint edges to the corresponding product attribute node yields the preserved path. and exclusion path When two paths correspond to the same HS code and have opposite classification conclusions, they are encapsulated as: ,in, The HS encoding that the path points to. To retain or exclude the conclusion.

[0057] 33. Generate conflict closures based on mutually exclusive classification path data to obtain conflict subgraph data; In one embodiment, conflict closures are generated based on mutually exclusive classification path data to obtain conflict subgraph data. For each group... Extract the attribute nodes, rule nodes, HS-encoded nodes, and constraint edges contained in the two paths, and recursively add the upstream nodes required to maintain rule activation along the "preceding" and "dependent" edges until a product attribute node without a preceding edge is reached, resulting in: , , The set of preceding nodes represents the path to be preserved. and exclusion path The activation status of each rule node in the set is the set of nodes added after recursively tracing upstream through "preceding" or "dependent" edges. Let be the set of preceding constraint edges, representing the set of preceding nodes. The set of constraint edges between nodes in the original mutually exclusive path, specifically including "preceding" edges and "dependent" edges, forms the conflict subgraph data. .

[0058] 34. Perform conflict kernel reduction on the conflict subgraph data to obtain the minimum conflict subgraph data; In one embodiment, conflict kernel reduction is performed on the conflict subgraph data to obtain the minimum conflict subgraph data. For each constraint edge... Perform necessary edge deletions, construct: If, after deleting edge e, both valid retainable paths and valid excluded paths still exist for the conflict endpoints, then e is considered a redundant edge and permanently deleted; otherwise, it is retained as a necessary edge. After completing the edge deletion trial, nodes that are not connected to necessary edges and are not conflict endpoints are removed, and this process is repeated until the original conflict cannot be maintained after any remaining edge is deleted, resulting in: , Let be the set of nodes in the minimum conflict subgraph, representing all nodes necessary to maintain the original conflict classification after necessary edge deletion, conflict preservation verification, redundant node removal, and minimum closure confirmation. Let be the set of constraint edges of the minimum conflict subgraph, representing the connection. Each node in the system must have the necessary constraint edges to ensure that both the retained and excluded paths exist simultaneously.

[0059] 35. Encapsulate the evidence chain based on the minimum conflict subgraph data to obtain the classification conflict data.

[0060] In one embodiment, evidence chains are encapsulated based on the minimum conflict subgraph data to obtain categorized conflict data. The retained evidence chains and excluded evidence chains are organized in the order of conflict attribute—triggering rule—retained or excluded edge—conflict HS code; the product attribute nodes in the minimum conflict subgraph are categorized into the conflict association attribute set. The rule nodes are assigned to the set of conflicting association rules. ,get: , where N is the number of conflict endpoints identified.

[0061] Optionally, reverse tracing reasoning includes: 41. Based on the categorized conflict data, perform conflict edge tracing to obtain conflict source chain data; In one embodiment, conflict edge tracing is performed based on the classification conflict data to obtain conflict source chain data. The aforementioned classification conflict data is read: , using conflict HS coding Starting from the reserved path, respectively and exclusion path Traverse the edges of "retain, exclude, depend on, and precede" in reverse order until the first rule node with different rule conditions in the two paths is located. and Extract the set of attribute slots required for the two rules. , and the corresponding set of conflicting attributes ,get: and each This data is compiled into conflict source chain data.

[0062] 42. Filter the pending slots in the conflict source chain data to obtain the slot data to be filled; In one embodiment, pending slots are filtered from the conflict source chain data to obtain slot data to be completed. The slots required for the rule are then compared with existing product attribute slots using a difference operation. Find the missing slots; for the same slot, there are more than two different values, i.e. When this happens, it is identified as a slot with a conflicting value. The result after merging is: It also encapsulates the slot name, pending type, source rules, and conflict codes to form the slot data to be completed. .

[0063] 43. Perform a de-impact gain assessment on the data of the slots to be filled to obtain the target filling element data; In one embodiment, based on the enumeration set in the source rule or numerical range For each slot u to be filled, a candidate value set B(u) is generated, forming a slot hypothesis z=(u,b). Each slot hypothesis is temporarily written into the corresponding conflict source chain and the rule state is re-propagated to obtain the filled conflict set C(z), whose dissipation gain is: ,in, This is the conflict set before completion. Invalid assumptions of g(z)=0 are removed, and the conflict is determined by decreasing de-conflict gain, increasing number of completion slots, and rule priority. Arranged in order from level 1 to level 5, the candidate value with the largest gain in each slot is retained as the target completion feature data: .

[0064] 44. Reconstruct the declaration items based on the target completion element data to obtain completion prompt data, and obtain the completed declaration data based on the completion prompt data.

[0065] In one embodiment, the slot name u, candidate value b, source rule r, conflict HS code h, and content to be verified in the target completion element are encapsulated into completion hint data: ,in, To correspond with the declaration prompts, such as "Please confirm the main material content" or "Please confirm the product processing method," the system obtains the confirmation values ​​submitted by the declaration entity / user based on the completion prompts through a preset input interface. Numerical confirmation values ​​must meet the following requirements: The enumerated confirmation value must satisfy the following conditions: After successful verification, missing slots will be added, and slots with conflicting values ​​will have their original values ​​invalidated and be replaced with confirmed values, while retaining the aforementioned status flags. ,get: ,in, This indicates whether the status is "added", "replaced", or "confirmed".

[0066] Optionally, convergence of the exclusivity constraint includes: 51. Based on the completed declaration data and the classification constraint diagram data, attribute backfilling and correction are performed to obtain updated constraint diagram data; In one embodiment, the aforementioned supplementary declaration data is read. and classification constraint graph data According to the slot name Locate the corresponding product attribute node. For For the newly added record, create a value with... For the attribute nodes; for the replaced record, mark the original attribute value node and its "satisfied" and "not satisfied" edges as invalid, and then write the confirmation value. Subsequently, based on the aforementioned numerical conditions... Or enumeration conditions Recalculate And generate the corresponding constraint edges to obtain the updated constraint graph data: .

[0067] 52. Activate exclusive rules based on the updated constraint graph data to obtain rule activation path data; In one embodiment, the rule nodes are traversed. The set of necessary conditions When all necessary conditions are met When this happens, the rule enters the active state: The activation rule is connected along the "reserved" edge. Connect along the "exclusion" side to and in accordance with the aforementioned priority rules And it continues to propagate in the directions of "pre-, dependency, and coverage", forming rule activation path data: .

[0068] 53. Perform path pruning on the rule-activated path data to obtain converged and classified path data; In one embodiment, paths containing deactivation rules, unconfirmed attribute nodes, or invalid constraint edges are deleted; if the candidate HS code pointed to by the path is excluded by any activation rule. If a match is found, the candidate path is deleted. For multiple retained paths pointing to upper and lower level HS codes, if all the conditions required for the lower level code are met, the lower level code path is retained, and the upper level path whose condition set is completely contained is deleted. Therefore: ,in, This is the set of valid excluded edges for path p. This is the set of attribute conditions required for the path.

[0069] 54. Based on the converged classification path data, the uniqueness of the encoding is determined to obtain the target HS encoding data.

[0070] In one embodiment, candidate codes corresponding to each convergence path are extracted: ,like If the candidate codes have a hierarchical relationship, the code with the deepest level that meets all conditions is retained; if there are multiple codes at the same level, they are selected according to the rule priority. Exclusion criteria are checked from level 1 to level 5, and codes excluded by higher-priority rules are deleted. The final set of valid codes satisfies: When the time comes, the output is: ,in, For the target HS code, For the corresponding convergence path, This is the set of activation rules for this path. The set of product attributes that support the target code.

[0071] Optionally, mutual exclusion path addressing includes: Conflicting endpoints are locked based on constraint state diagram data to obtain mutually exclusive endpoint data; In one embodiment, the aforementioned constraint state diagram data is read. Only active rule nodes and their valid constraint edges are retained. For any HS-encoded node Count the set of valid "retained" edges pointing to the node. and the set of "exclusion" edges .when At that time, Identify conflicting endpoints and record the corresponding retention and exclusion rules to obtain mutually exclusive endpoint data: in, and They point to The set of activation retention rules and the set of activation exclusion rules.

[0072] Constraint direction tracing is performed on mutually exclusive endpoint data to obtain directional constraint chain data; In one embodiment, the aforementioned mutex endpoint data is read: ,in, For conflicting HS codes, and They point to The set of activation retention rules and the set of activation exclusion rules. To trace the starting point, the corresponding rule nodes are entered in reverse order along the "retain" and "exclude" edges. Then, the traversal continues in reverse order, prioritizing dependent edges and then preceding edges, until a product attribute node without any upstream rule edges is reached. During the traversal, a set of visited nodes is maintained. If a node has already been visited, the branch is terminated to avoid rule loops causing repeated traversal. When a "cover" edge is encountered, the priorities of related rules are compared. , mentioned above Level 1 is the highest, only along The direction of the rule with the smaller value continues to be tracked. When there are multiple necessary prerequisite attributes for the same rule, parallel chains are generated for each, and all attribute nodes and constraint edges required to maintain the activation of the rule are retained. As data for directional constraint chains.

[0073] Mutually exclusive path data is obtained by intersecting mutually exclusive branches based on directional constraint chain data; In one embodiment, the aforementioned directional constraint chain data is read. According to conflict HS codes Group the directional constraint chains, ensuring that the endpoints are the same. Retention chain With the chain of exclusion Pair them up. Only keep chain pairs where all rule nodes within the chain are active, all constraint edges are valid, and the classification conclusions are opposite, i.e.: ,in, This is a function to extract the endpoint of the path. This indicates whether the conclusion is retained or excluded. For each valid chain pair, extract the set of common nodes: ,like Then, according to the direction of constraint propagation, distance-conflict HS codes are selected from the common nodes. The furthest node, and the node whose subsequent nodes first enter the retained branch and the excluded branch respectively, is designated as the branch intersection node. This node can be a node sharing common product attributes or a node sharing common prerequisite rules. If the two chains do not have a common upstream node, then the conflicting HS-coded node will be used. As a meeting point. Using these as boundaries, retain the complete constraint branches leading to the retention conclusion and the exclusion conclusion respectively, and encapsulate them as follows: This yields the mutually exclusive path data.

[0074] Path dual encapsulation is performed based on mutually exclusive path data to obtain mutually exclusive categorized path data.

[0075] In one embodiment, the retention chain and exclusion chain are rearranged according to the forward order of product attribute node—preceding rule node—target rule node—classification conclusion—conflicting HS code to form a retention path. and exclusion path Only if two paths satisfy Dual encapsulation is performed at the time, where, The HS encoding that the path points to. To retain or exclude the conclusion, we obtain: As mutually exclusive classification path data.

[0076] Optionally, conflict nuclear reduction includes: Based on the conflict subgraph data, necessary edge deletion trials are performed to obtain edge deletion verification data; In one embodiment, the aforementioned conflict subgraph data is read. For each constraint edge, in the order of attribute-related edges, preceding or dependent edges, and retained or excluded edges, classify them accordingly. Perform a temporary deletion once each, and construct a candidate verification subgraph: During the deletion process, only the valid state of the currently verified edge is changed, without altering the activation states of other nodes, constraint directions, or rules. The type of the deleted edge, its start and end nodes, and the path connectivity results after deletion are recorded to obtain edge deletion verification data. ,in, and These represent the deletion of edges. Does the conflicting HS encoding still exist? The retained and excluded paths.

[0077] Conflict-preserving verification is performed based on edge deletion verification data to obtain necessary constraint data; In one embodiment, for each candidate verification subgraph Retrieve from the product attribute node along the direction of valid constraints to the conflict endpoint. .when Furthermore, when the two paths correspond to the retained conclusion and the excluded conclusion respectively, it indicates deletion. The original conflict still stands, An edge is identified as redundant; if any result is 0, it indicates that the edge is necessary to maintain the conflict and is retained. This yields the necessary constraint data: ,in, For the necessary edge set, This is the set of redundant edges that can be removed, forming the necessary constraint graph. , This is the set of nodes in the conflict subgraph.

[0078] Redundant nodes are removed from the necessary constraint data to obtain the core conflict data. In one embodiment, based on the necessary constraint graph First, delete isolated nodes that are not connected to any necessary edges; then delete intermediate nodes that are not located on any valid preserved or excluded path. For node v, if and If a node is found to be redundant, it will be removed; conflicting endpoints Both product attribute nodes and rule nodes on the two mutually exclusive paths are retained to obtain the core conflict data: , The core set of conflict nodes represents the set of conflict-related nodes remaining after removing isolated nodes and redundant nodes that did not participate in the valid retained or excluded paths from the necessary constraint graph.

[0079] Minimal closure confirmation is performed on the core conflict data to obtain the minimum conflict subgraph data.

[0080] In one embodiment, for The remaining edges and non-endpoint nodes in the path are then checked for deletion one by one; if any remaining edge or node is deleted, the path is preserved. Or exclude the path If at least one of the following is broken, then the current conflict core cannot be further reduced. The minimum closure condition is expressed as: and ,in, This indicates that there are still simultaneous references to the same thing. The valid retainable paths and excluded paths, with a value of 0 indicating that conflicts cannot be retained. For candidate data of the minimum conflict subgraph after removing constraint edge e, it means that from the minimum conflict subgraph The graph formed after temporarily deleting constraint edge e in the middle, For candidate data of the minimum conflict subgraph after deleting node v, it means that from the minimum conflict subgraph The graph is formed by temporarily deleting node v and simultaneously deleting all constraint edges connected to that node. After satisfying the above conditions, the output is: As the minimum conflict subgraph data.

[0081] Optionally, the demodulation gain evaluation includes: Based on the slot data to be completed, slot value expansion is performed to obtain hypothetical slot data; In one embodiment, the data of the slot to be filled is read. For each slot u to be filled, extract its source rules. Allowed values ​​in the range. Enumerated slots directly use rule sets. Generate a set of candidate values; numerical slots are allocated according to the aforementioned intervals. Extract the interval boundary values, interval midpoint, and values ​​from the original commodity declaration that can be converted to this interval to form B(u). Combine the slot with the candidate values ​​as follows: ,in, To obtain the slot assumption data for the corresponding conflict HS encoding.

[0082] Local propagation simulation was performed on the assumed slot data to obtain local propagation data; In one embodiment, for each slot, it is assumed that The candidate value b is temporarily written to slot u, and then the numerical condition is applied. Or enumeration conditions Recalculate the corresponding condition markers The propagation starts from slot u and proceeds along the edges of "satisfied, unsatisfied, preceding, dependent, covered, retained, and excluded" until it reaches the affected HS-encoded node. The propagation range only includes rule nodes and encoded nodes reachable from u, without modifying other graph regions, resulting in: ,in, The set of rules that cause a change in state. Let C(z) be the set of changing paths, and let C(z) be the set of remaining conflicts after simulation.

[0083] Slot gain data is obtained by performing de-energizing gain quantization based on local propagation data. In one embodiment, the aforementioned pre-completion conflict set is used. Based on this, calculate the number of conflicts that the slot assumption eliminates: When g(z) > 0, it indicates that the slot assumption can reduce conflicts; when g(z) = 0, it is determined to have no conflict resolution effect and is discarded; when g(z) < 0, it is determined to create new conflicts and is discarded. The effective assumptions, their conflict resolution codes, variation rules, and gain values ​​are encapsulated as follows: The slot gain data is obtained, where u is the slot to be filled, such as the main material, component content, processing method, or main purpose, and b is the candidate value of the slot to be filled, that is, a specific value in the candidate value set B(u). Let q be the source exclusivity rule, representing the rule upon which the candidate value b is based. The i-th conflict HS code represents the conflict code corresponding to the slot u to be filled. Let z be the slot assumption de-collision gain value, representing the reduction in the number of collisions after adopting the slot assumption z. It is the set of conflicts that are eliminated by the slot assumption, that is, conflicts that existed before completion but no longer exist after completion.

[0084] Gain cost sorting is performed based on slot gain data to obtain target completion element data.

[0085] In one embodiment, the completion cost c(z) is divided into three levels: c(z) = 1 when the original declaration field contains directly verifiable content; c(z) = 2 when manual confirmation by the declaration entity is required; and c(z) = 3 when supplementary product instructions, component testing materials, or processing certificates are required. The completion cost is determined according to the following order: from largest to smallest de-energizing gain g(z), from smallest to largest completion cost c(z), and rule priority. Sort the data lexicographically from level 1 to level 5; for each slot, only the candidate hypothesis that is first in the sorted order is retained, resulting in: Used to complete the target element data.

[0086] Optionally, this application also provides an AI-based intelligent matching system for commodity HS codes, including: At least one memory for storing computer-executable instructions; At least one processor, the processor being configured to execute computer-executable instructions stored in the memory to implement the AI-based intelligent matching method for commodity HS codes as described above; The data transmission interface, connected to the processor, is used to receive commodity declaration data, a preset exclusive rule base, and supplementary declaration data corresponding to the completion prompt data, and to transmit the commodity declaration data, the preset exclusive rule base, and the completion declaration data to the processor, and to output the target HS code data generated by the processor.

[0087] Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended application documents rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of the equivalents of the application documents be incorporated into the invention.

[0088] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. An AI-based intelligent matching method for commodity HS codes, characterized in that, Includes the following steps: Obtain product declaration data, and extract categorization elements from the product declaration data to obtain product attribute data; Constraint association graphs are constructed using product attribute data and a pre-defined exclusive rule base to obtain classification constraint graph data; Minimum conflict subgraph extraction is performed based on the classification constraint graph data to obtain classification conflict data; Based on the classification conflict data, reverse tracing reasoning was performed to obtain the supplementary declaration data; The target HS code data is obtained by performing exclusive constraint convergence based on the completed declaration data and the classification constraint diagram data.

2. The AI-based intelligent matching method for commodity HS codes according to claim 1, characterized in that, The extraction of classification elements includes: Semantic encoding of declaration fields is performed on commodity declaration data to obtain commodity declaration semantic data; categorization entity recognition is performed on commodity declaration semantic data to obtain categorization element data; categorization attribute category mapping is performed on categorization element data to obtain categorization element mapping data; and attribute value element association is performed on categorization element mapping data and commodity declaration semantic data to obtain commodity attribute data.

3. The AI-based intelligent matching method for commodity HS codes according to claim 1, characterized in that, Constraint association mapping includes: Based on product attribute data and a pre-defined exclusive rule base, rule slot alignment is performed to obtain attribute rule mapping data; threshold relationship binding is performed based on the attribute rule mapping data to obtain threshold constraint association data; exclusive path orchestration is performed on the threshold constraint association data to obtain exclusive rule path data; priority orientation is performed based on the exclusive rule path data to obtain rule orientation relationship data; constraint edges are generated on the rule orientation relationship data to obtain classification constraint edge data; and heterogeneous graph encapsulation is performed based on the classification constraint edge data to obtain classification constraint graph data.

4. The AI-based intelligent matching method for commodity HS codes according to claim 1, characterized in that, Minimum conflict subgraph extraction includes: Constraint states are labeled based on the classification constraint graph data to obtain constraint state graph data; mutually exclusive path addressing is performed on the constraint state graph data to obtain mutually exclusive classification path data; conflict closure is generated based on the mutually exclusive classification path data to obtain conflict subgraph data; conflict kernel reduction is performed on the conflict subgraph data to obtain minimum conflict subgraph data; evidence chain encapsulation is performed based on the minimum conflict subgraph data to obtain classification conflict data.

5. The AI-based intelligent matching method for commodity HS codes according to claim 1, characterized in that, Reverse tracing reasoning includes: Conflict edge tracing is performed based on the categorized conflict data to obtain conflict source chain data; unresolved slots are filtered from the conflict source chain data to obtain slot data to be filled; the de-conflict gain is evaluated from the slot data to be filled to obtain target completion element data; the declaration items are reconstructed based on the target completion element data to obtain completion prompt data, and completion declaration data is obtained based on the completion prompt data.

6. The AI-based intelligent matching method for commodity HS codes according to claim 1, characterized in that, Exclusivity constraint convergence includes: Based on the completed declaration data and classification constraint graph data, attribute backfilling and correction are performed to obtain updated constraint graph data; based on the updated constraint graph data, exclusive rules are activated to obtain rule activation path data; path pruning is performed on the rule activation path data to obtain converged classification path data; based on the converged classification path data, unique coding determination is performed to obtain target HS coding data.

7. The AI-based intelligent matching method for commodity HS codes according to claim 4, characterized in that, Mutual exclusion path addressing includes: Conflicting endpoints are locked based on constraint state graph data to obtain mutually exclusive endpoint data; constraint direction tracing is performed on the mutually exclusive endpoint data to obtain directional constraint chain data; mutually exclusive branch intersections are performed based on the directional constraint chain data to obtain mutually exclusive path data; and path dual encapsulation is performed based on the mutually exclusive path data to obtain mutually exclusive classification path data.

8. The AI-based intelligent matching method for commodity HS codes according to claim 4, characterized in that, Nuclear reduction in conflict includes: Based on the conflict subgraph data, necessary edge trial deletions are performed to obtain edge deletion verification data; based on the edge deletion verification data, conflict preservation verification is performed to obtain necessary constraint data; redundant nodes are removed from the necessary constraint data to obtain conflict core data; minimum closure confirmation is performed on the conflict core data to obtain minimum conflict subgraph data.

9. The AI-based intelligent matching method for commodity HS codes according to claim 5, characterized in that, De-splitting gain evaluation includes: Based on the slot data to be filled, slot value expansion is performed to obtain slot hypothesis data; local propagation simulation is performed on the slot hypothesis data to obtain local propagation data; based on the local propagation data, de-energization gain quantization is performed to obtain slot gain data; based on the slot gain data, gain cost sorting is performed to obtain target completion element data.

10. An AI-based intelligent matching system for commodity HS codes, characterized in that, include: At least one memory for storing computer-executable instructions; At least one processor, the processor being configured to execute computer-executable instructions stored in the memory to implement the AI-based intelligent matching method for commodity HS codes as described in any one of claims 1 to 9; The data transmission interface, connected to the processor, is used to receive commodity declaration data, a preset exclusive rule base, and supplementary declaration data corresponding to the completion prompt data, and to transmit the commodity declaration data, the preset exclusive rule base, and the completion declaration data to the processor, and to output the target HS code data generated by the processor.