Class knowledge graph construction and reasoning method for commodity classification
By constructing a knowledge graph driven by association weights and a dual-drive reasoning mechanism, the accuracy and robustness issues of product classification in existing technologies are solved, realizing the high-precision and rapid update requirements of e-commerce platforms for product classification, and improving the accuracy of classification results and the ability to identify anomalies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WIRELESS LIFE (BEIJING) INFORMATION TECH CO LTD
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for product classification suffer from problems such as low accuracy, weak ability to identify abnormal scenarios, limited sample library coverage, and delayed updates, making it difficult to meet the high-precision and rapid update requirements of e-commerce platforms for product classification.
By collecting product data from multiple sources, a knowledge graph driven by association weights is constructed, an initial calibration benchmark library is generated, abnormal samples are automatically extracted and a training set is built, a dual-drive inference mechanism is used for classification, association weights are dynamically updated to optimize classification results, a closed-loop feedback mechanism is formed, and the co-evolution of knowledge graph and AI model is realized.
It significantly improves the accuracy of product classification and anomaly detection capabilities, realizes the co-evolution of knowledge graph and reasoning mechanism, ensures the accuracy and robustness of classification results, and supports rapid updates and expansion of the sample library.
Smart Images

Figure CN121996715A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of data processing and artificial intelligence, and in particular to a method for constructing and reasoning category knowledge graphs for commodity classification. Background Technology
[0002] With the rapid development of e-commerce and new retail, the number of products is growing exponentially, and product categories are becoming increasingly segmented, placing extremely high demands on the accuracy and precision of product categorization. The accuracy of product categorization directly affects the platform's recommendation efficiency, search experience, and supply chain management. For example, when a user searches for "red pure cotton children's clothing," if the platform cannot accurately identify the relationship between product attributes and categories, it may recommend adult red cotton clothing or children's clothing made of synthetic fibers, resulting in a significant decline in user experience.
[0003] Currently, product classification mainly relies on manual annotation and traditional AI models (such as convolutional neural networks and recurrent neural networks) for separate processing. Manual annotation suffers from high costs, low efficiency, and susceptibility to subjective factors. While traditional AI models can achieve a certain degree of automatic classification, they have three core shortcomings: First, they lack a structured understanding of the relationship between product attributes and categories, relying solely on data features for classification, resulting in low accuracy in fine-grained scenarios. Second, they have weak ability to identify abnormal scenarios such as mislabeled or missing labels, and poor robustness when faced with a large amount of non-standard data in actual business. Third, their sample library coverage is limited, with insufficient classification capabilities for emerging product categories (such as smart wearable devices) or niche attribute combinations (such as "bamboo fiber-baby socks"), and sample updates rely on manual collection and annotation, resulting in long iteration cycles.
[0004] Some existing technologies attempt to incorporate knowledge graphs to assist in product classification, but significant shortcomings remain: Knowledge graph construction relies on domain experts manually defining association rules between attributes and categories, resulting in low construction efficiency and difficulty adapting to rapid updates in product categories; the collaboration between the graph and AI models is insufficient, with the graph often used as an auxiliary feature input to the model, failing to form a closed loop of "graph guiding reasoning, reasoning providing feedback to optimize the graph," leading to a decline in the graph's practicality over time; existing technologies lack specific optimization mechanisms for abnormal scenarios such as mislabeling and omissions in product classification, resulting in models not encountering enough abnormal samples during training and weak ability to identify and correct erroneous labels in practical applications; sample library expansion relies on manually collecting and labeling new product data, leading to delays in supplementing samples for emerging categories, and the model and graph coverage failing to meet business needs. Therefore, there is an urgent need for a product classification method that can automatically construct product category knowledge graphs, enable joint reasoning between the graph and AI models, optimize for abnormal scenarios, and support automatic sample library updates. Summary of the Invention
[0005] Therefore, this invention provides a method for constructing and reasoning category knowledge graphs for commodity classification, in order to solve the aforementioned problems existing in the prior art.
[0006] To achieve the above objectives, this invention provides a method for constructing and reasoning about category knowledge graphs for commodity classification, comprising:
[0007] Step S1: Collect product data through multiple sources and generate attribute-category structured data pairs after preprocessing;
[0008] Step S2: Based on the structured data, color, material and functional attributes are automatically extracted, and the support, confidence and lift are calculated using an association mining algorithm to construct a knowledge graph containing association weights, and an initial calibration benchmark library is generated simultaneously.
[0009] Step S3: Based on the association weights, generate three types of abnormal samples: mislabeled, missing, and counterexample labeled. After screening, construct a training set with normal samples and calculate the policy threshold parameters.
[0010] Step S4: Construct a dual-drive reasoning mechanism. Based on the initial knowledge graph, perform association traversal and confidence calculation on the input product data to generate classification results. When the overall confidence of the classification results is less than the policy threshold parameter, call the association weight to correct the classification results and output the optimized response coefficient.
[0011] Step S5: Based on the correction result and the optimized response coefficient, the associated weights are dynamically updated using a sliding weighted algorithm to obtain an optimization effect measure;
[0012] Step S6: Based on the optimization effect metric, reconstruct the abnormal sample generation rule parameter set to adjust the generation ratio and mutation intensity of the three types of abnormal samples to obtain an optimized training set and output the system performance index.
[0013] Step S7: Optimize the fusion weights of the dual-drive inference mechanism based on the optimized training set and the system performance index. If the system performance index fails to meet the quality standard, trigger the bypass mechanism to directly backtrack and adjust the associated weights to form a system pass-through calibration.
[0014] Step S8: Based on the optimized response coefficient, the optimized effect metric, the system performance index, the system direct calibration, and the initial calibration benchmark library, a reinforcement learning algorithm is used to update the initial calibration benchmark library to the evolution strategy library, and the optimal self-calibration path is dynamically selected to obtain the target knowledge graph.
[0015] Furthermore, the process of using association mining algorithms to calculate support, confidence, and lift to construct a knowledge graph containing association weights includes:
[0016] By introducing prior knowledge of category distribution, candidate attribute combinations are filtered in a hierarchical manner. The frequent pattern growth algorithm is used to mine the joint distribution features of multiple attributes. The support is calculated to measure the co-occurrence frequency of attributes and categories. The confidence is calculated to evaluate the strength of conditional probability. The lift is calculated to determine the significance of association. The three are integrated to form a multi-dimensional association evaluation system.
[0017] Based on the aforementioned association evaluation system, a hierarchical topological structure of the knowledge graph is constructed, dividing nodes into attribute node domains and category node domains, and dividing edges into single-attribute mapping edges and combined attribute mapping edges. The association weights are generated by multiplying confidence and lift.
[0018] Furthermore, the process of step S3 includes:
[0019] Based on the association weights, three types of abnormal sample generation rules are constructed. The incorrectly labeled sample is generated by replacing the correct category with a low-weight category. The missingly labeled sample is generated by randomly deleting core attributes. The negative example sample is generated by combining zero-weight attribute-category pairs. The generation ratio is dynamically allocated according to the distribution characteristics of the association weights.
[0020] A sample validity assessment mechanism is used to screen the three types of abnormal samples, and the degree to which the abnormal quantitative samples deviate from the normal distribution is calculated.
[0021] The selected abnormal samples are mixed with the normal samples in a certain proportion to construct a hierarchical training set;
[0022] Based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set, the policy threshold parameter is calculated using statistical measurement methods.
[0023] Furthermore, the process of calculating the policy threshold parameter using statistical metrics based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set includes:
[0024] Perform hierarchical feature statistics on the training set, and calculate the confidence distribution features of the normal sample layer and the abnormal sample layer respectively;
[0025] Based on the distribution dispersion of the normal sample layer and the deviation index of the abnormal sample layer, a weighted fusion method is used to calculate the difference metric of the sample layer;
[0026] A time decay factor is introduced to dynamically adjust the differential metric value. The time decay factor is calculated based on the interval between two adjacent rounds of strategy self-calibration.
[0027] By combining the preset benchmark threshold values in the initial calibration benchmark library, a sliding window mechanism is used to weight and fuse the differential metric values with the benchmark threshold values to generate a dynamic threshold intermediate value.
[0028] The policy threshold parameters are obtained by applying bidirectional constraints to the intermediate value of the dynamic threshold.
[0029] Furthermore, the process of step S4 includes:
[0030] Based on the association weights, attribute-category association traversal is performed on the product data to generate graph confidence.
[0031] Deep learning models are used to extract features from the training set to generate AI confidence scores;
[0032] The comprehensive confidence score and preliminary classification results are obtained by dynamically fusing the map confidence score and AI confidence score based on attribute integrity.
[0033] When the overall confidence level is less than the policy threshold parameter, the validation rule is invoked to correct the classification result and the optimized response coefficient is output.
[0034] Furthermore, the process of invoking the verification rule to correct the classification result and output the optimized response coefficient when the overall confidence level is less than the policy threshold parameter includes:
[0035] During the error correction process, a verification rule base is established based on the identification patterns of the three types of abnormal samples. When the overall confidence level is less than the policy threshold parameter, the verification rule base is called to perform logical verification on the preliminary classification results, identify mislabeling, omission, or counterexample label errors, and the high-confidence association relationship in the association weight is called to replace and correct the erroneous categories, generating the corrected classification results.
[0036] The optimized response coefficient is obtained by multiplying the corrected accuracy by the deviation of the policy threshold parameter.
[0037] Furthermore, step S6 includes the following process:
[0038] The adjustment factor for the sample generation intensity is calculated based on the aforementioned optimization effect metric;
[0039] The abnormal sample generation rule parameter set is reconstructed, wherein the proportion of mis-shot samples is determined by the product of the base proportion and the adjustment factor, the proportion of missed samples is determined by the complementary relationship between the base proportion and the sample library coverage, and the mutation intensity of negative sample is determined by the coupling relationship between the base intensity and the policy threshold parameter.
[0040] During the sample generation process, mutation operations are used to perturb the attributes or categories of normal samples to generate the three types of abnormal samples;
[0041] The generated abnormal samples are screened, and their deviation from the normal distribution is evaluated by calculating the abnormality degree of the samples. Invalid samples are removed by an automatic filtering mechanism based on a preset abnormality degree threshold. The screened abnormal samples are mixed with normal samples in proportion to construct the optimized training set.
[0042] The system performance index is calculated as the product of the effective rate of generated samples and the false positive suppression rate. The effective rate is determined by the proportion of the number of effective samples to the total number of generated samples, and the false positive suppression rate is determined by comparing the similarity between generated samples and historical false positive samples.
[0043] Furthermore, the process of reconstructing the abnormal sample generation rule parameter set includes:
[0044] The base proportion of misprinted samples is calculated based on the amplitude of the optimization effect measurement. The base proportion remains at the initial set value when the optimization effect is significant, and increases proportionally when the optimization effect does not meet expectations.
[0045] The sample library coverage rate is calculated based on the proportion of the number of categories already covered in the training set to the total number of categories. The generation ratio of missed samples is determined by the complementarity principle. The generation ratio is negatively correlated with the coverage rate.
[0046] The abnormal amplification baseline value is obtained by normalizing the threshold parameter of the strategy. The mutation intensity of the negative sample is determined by combining the directional sign of the optimization effect metric. The mutation intensity shows a linear growth trend when the threshold parameter is high.
[0047] The ratio of misprinted samples, the ratio of missed samples, and the mutation intensity of counterexample samples are combined to form the parameter set of the abnormal sample generation rule.
[0048] Furthermore, the process of step S7 includes:
[0049] The achievement degree of the system performance index is calculated based on the classification performance of the optimized training set;
[0050] When the achievement level indicates that the system performance index meets the quality standard, an incremental learning strategy is used to fine-tune the weight allocation ratio of graph reasoning and deep learning classification in the dual-drive reasoning mechanism.
[0051] When the achievement rate is lower than the preset benchmark, it is determined that the quality standard has not been met, triggering the bypass mechanism and skipping the normal adjustment process of the fusion weight;
[0052] The association weights are adjusted backtracking under the bypass mechanism. The attribute-category mapping relationship of high misjudgment rate samples in the optimized training set is directly called to perform punitive correction on the association weights. The punitive correction uses backpropagation to reduce the weight value of the misjudgment path and updates the knowledge graph formation system direct calibration synchronously.
[0053] Furthermore, the degree of achievement is determined by comparing the magnitude of the improvement in classification accuracy before and after training with the degree of closeness to the preset expected target.
[0054] Compared with existing technologies, the beneficial effects of this invention are as follows: by constructing a five-layer progressive closed-loop system driven by association weights, this invention achieves the synergistic evolution of knowledge graphs and inference mechanisms: association weights, as core parameters, directly affect the quality of abnormal sample generation and classification confidence, while classification errors are quantified by optimizing response coefficients and fed back to the weight update stage, forming a causal chain; policy threshold parameters are dynamically calculated based on the difference in confidence distribution between normal and abnormal samples, and their numerical changes directly trigger correction responses of different intensities, reflecting the adaptive relationship between data separability and judgment criteria; optimization effect measurement is calculated by multiplying the magnitude of weight changes with the improvement in accuracy, establishing a direct quantitative correlation between parameter space adjustment and performance space improvement; the system efficiency index adopts the form of sub-index product, balancing sample quality and misjudgment suppression capability, and integrates multiple parameters into a state space through reinforcement learning, with accuracy improvement, efficiency cost, and stability as reward objectives for policy evolution, thereby forming a negative feedback closed loop of parameter linkage between knowledge graph construction, sample generation, and inference optimization, significantly improving the accuracy of product classification and the ability to identify anomalies. Attached Figure Description
[0055] Figure 1 A flowchart illustrating a method for constructing and reasoning a category knowledge graph for commodity classification, provided by this invention;
[0056] Figure 2 This is a flowchart illustrating step S4 in the category knowledge graph construction and reasoning method for commodity classification provided by the present invention. Detailed Implementation
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] Please see Figure 1 As shown, this invention provides a method for constructing and reasoning about category knowledge graphs for product classification, including:
[0062] Step S1: Collect product data through multiple sources and generate attribute-category structured data pairs after preprocessing;
[0063] Specifically, structured data such as product titles, official tags, detailed descriptions, prices, and sales volume are obtained through open interfaces of e-commerce platforms. Unstructured data such as product images and user reviews from platforms without interfaces are obtained through web scraping technology. Material testing reports and semi-structured inventory data are obtained through the terminal sales systems and RFID devices of offline stores. For text data, regular expressions are used to filter out special characters, and the word frequency-inverse document frequency algorithm is used to remove marketing terms with low information entropy. For image data, a no-reference image quality assessment algorithm is used to select valid images with sufficient clarity. For structured data, an isolated forest anomaly detection algorithm is used to identify and delete invalid records with abnormal prices or conflicting class annotations. Text data is converted into word vector representations using word segmentation tools. Image data is uniformly scaled to standard pixel size and processed using color space standardization. Attribute terms are mapped to a unified standard expression through a preset dictionary. Finally, the standardized multimodal data is converted into a unified encoding format. The data pairs include color attributes, material attributes, and functional attributes extracted from product text, as well as initial class annotations obtained from structured information. The data pairs are stored in a distributed database to support high-concurrency access.
[0064] Step S2: Based on the structured data, color, material and functional attributes are automatically extracted, and the support, confidence and lift are calculated using an association mining algorithm to construct a knowledge graph containing association weights, and an initial calibration benchmark library is generated simultaneously.
[0065] Specifically, a bidirectional LSTM-CRF model based on an attention mechanism is used for named entity recognition in product titles and descriptions. This model captures contextual semantic features through a bidirectional long short-term memory network and optimizes entity boundaries using conditional random fields to accurately identify attribute entities such as "bright red," "pure cotton," and "waterproof." For color attributes, the model outputs color word vectors; for material attributes, it outputs material word vectors; and for functional attributes, it extracts functional verb phrases through dependency parsing. Product images are input into a pre-trained ResNet-50 model to extract 512-dimensional visual feature vectors, which are then connected to independent color and material classifiers. The color classifier uses a MobileNet structure and outputs a color category probability distribution; the material classifier uses an SVM model and outputs material texture feature classification results. When the image recognition results differ from the text extraction results, a weighted voting mechanism is used to determine the final attribute value. The TextRank algorithm is used to extract keywords from user review texts, and sentiment analysis is combined to identify implicit attributes that users care about. For example, the "breathable" functional attribute is extracted from "breathable and not stuffy," and the "wear-resistant" material attribute is extracted from "durable and durable."
[0066] Specifically, the process of using association mining algorithms to calculate support, confidence, and lift to construct a knowledge graph containing association weights includes:
[0067] By introducing prior knowledge of category distribution, candidate attribute combinations are filtered in a hierarchical manner. The frequent pattern growth algorithm is used to mine the joint distribution features of multiple attributes. The support is calculated to measure the co-occurrence frequency of attributes and categories. The confidence is calculated to evaluate the strength of conditional probability. The lift is calculated to determine the significance of association. The three are integrated to form a multi-dimensional association evaluation system.
[0068] Specifically, prior knowledge of category distribution is introduced: the frequency of each category in the full product data is statistically analyzed, and the prior weight of each category is calculated. During the candidate attribute combination generation stage, only attribute combinations associated with categories whose prior weights are higher than the median are retained. The co-occurrence frequency of attribute-category pairs is statistically analyzed, and their proportion in the full data is calculated to measure the prevalence of the association. Conditional probability formulas are used to calculate the probability of a category appearing when an attribute appears, measuring the directional strength of the association. The ratio of confidence level to the independent probability of a category is calculated to determine whether the association is significantly better than a random distribution. The above three dimensions of measurement are normalized to construct a multi-dimensional association evaluation system, and associations that meet the minimum support, minimum confidence, and minimum lift thresholds are selected as valid associations.
[0069] Based on the aforementioned association evaluation system, a hierarchical topological structure of the knowledge graph is constructed, dividing nodes into attribute node domains and category node domains, and dividing edges into single-attribute mapping edges and combined attribute mapping edges. The association weights are generated by multiplying confidence and lift.
[0070] Specifically, the graph nodes are divided into attribute node domains and category node domains. Attribute node domains are further subdivided into color attribute subdomains, material attribute subdomains, and functional attribute subdomains; category node domains are constructed into a tree structure according to the product category hierarchy. Association edges are divided into single-attribute mapping edges and combined attribute mapping edges. Single-attribute mapping edges represent a direct relationship between a single attribute and a category; combined attribute mapping edges represent a combined relationship between multiple attributes and a category. For each valid association edge, an association weight is calculated, where the association weight is equal to the product of the confidence level and the lift. For combined attribute edges, a confidence-weighted average method is used to calculate the comprehensive weight.
[0071] Step S3: Based on the association weights, generate three types of abnormal samples: mislabeled, missing, and counterexample labeled. After screening, construct a training set with normal samples and calculate the policy threshold parameters.
[0072] Specifically, step S3 includes the following process:
[0073] Based on the association weights, three types of abnormal sample generation rules are constructed. The incorrectly labeled sample is generated by replacing the correct category with a low-weight category. The missingly labeled sample is generated by randomly deleting core attributes. The negative example sample is generated by combining zero-weight attribute-category pairs. The generation ratio is dynamically allocated according to the distribution characteristics of the association weights.
[0074] Specifically, the normal samples in the training set are traversed, and their attribute sets (e.g., {red, cotton, casual}) are extracted. Categories with an association weight of less than 0.2 for this attribute set in the knowledge graph are then selected as candidate error categories, sorted by weight in ascending order, and the top K (K=3) are used for replacement. For example, the correct category "T-shirt" in "red + cotton + T-shirt" is replaced with "jeans" with an association weight of 0.15, generating a misprinted sample. The generation ratio is set to 40% of the total abnormal samples. When the weight distribution exhibits a long-tail characteristic, the proportion of misprinted samples is automatically increased to 45% to strengthen the identification of long-tail categories.
[0075] Specifically, the correct categories of normal samples are retained, and 1-2 core attributes from color, material, and function are randomly deleted. The deletion strategy uses importance-weighted random sampling, where attributes with lower importance (such as color) are deleted more likely than those with higher importance (such as material). For example, "red + cotton + T-shirt" is changed to "cotton + T-shirt" (the color attribute is deleted). The generation ratio is set to 35%, and is inversely adjusted according to the mean attribute completeness of the training set: when the average attribute completeness is higher than 0.8, the ratio is reduced to 30%, and vice versa, it is increased to 40%.
[0076] Specifically, the algorithm mines attribute-category pairs (such as "down jacket + summer clothes") with a combined association weight of 0 in the knowledge graph, and replaces the categories of normal samples with these conflicting categories. The generation ratio is set to 25%, and is positively adjusted according to the sparsity of the knowledge graph: when the proportion of sparse regions in the graph exceeds 30%, the proportion of negative samples is increased to 30% to enhance the ability to identify sparse regions.
[0077] A sample validity assessment mechanism is used to screen the three types of abnormal samples, and the degree to which the abnormal quantitative samples deviate from the normal distribution is calculated.
[0078] Specifically, for each generated anomalous sample, the standardized distance between its attribute-category association weight and the average weight of normal samples in the training set is calculated; this distance value represents the anomalousness. Simultaneously, the "adversarial difficulty" metric is calculated; the lower the classification confidence of the deep learning model for that sample, the higher the adversarial difficulty, and the higher the anomalousness. An anomalousness threshold is set at 0.5; samples below this value are considered invalid variants and are discarded. Combining the preset anomalousness threshold, an automatic filtering pipeline removes invalid samples, retaining valid anomalous samples with an anomalousness ≥ 0.5, ensuring a final anomalous sample effectiveness rate of over 95%.
[0079] The selected abnormal samples are mixed with the normal samples in a certain proportion to construct a hierarchical training set;
[0080] Specifically, valid outlier samples and normal samples are mixed at a ratio of 1:4, with the total sample size controlled at 500,000. A stratified sampling strategy is used during mixing to ensure a balanced proportion of outlier samples within each product category. The mixed training set is then labeled differently: normal samples are labeled "valid samples"; misprinted samples are labeled "misprint type + correct category"; missed samples are labeled "missed type + missing attribute"; and counterexamples are labeled "conflict type + conflict attribute". This labeling system supports error type identification and attribution analysis during subsequent strategy calibration.
[0081] Based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set, the policy threshold parameter is calculated using statistical measurement methods.
[0082] Specifically, the process of calculating the policy threshold parameter using statistical metrics based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set includes:
[0083] Perform hierarchical feature statistics on the training set, and calculate the confidence distribution features of the normal sample layer and the abnormal sample layer respectively;
[0084] Specifically, all normal samples labeled as "valid samples" are extracted from the training set, and the confidence score for each sample is calculated based on knowledge graph inference. The mean μ1 and standard deviation σ1 of this layer of confidence scores are calculated, where μ1 reflects the average confidence level of normal samples, and σ1 reflects the dispersion of their distribution. For example, in 100,000 normal samples, μ1 = 0.85 and σ1 = 0.12 are calculated. All three types of abnormal samples are extracted from the training set, and their confidence scores are also calculated based on knowledge graph inference. The median μ2 and interquartile range σ2 of this layer of confidence scores are calculated, where μ2 reflects the central tendency of abnormal samples, and σ2 reflects the dispersion of their distribution. For example, in 25,000 abnormal samples, μ2 = 0.32 and σ2 = 0.18 are calculated.
[0085] Based on the distribution dispersion of the normal sample layer and the deviation index of the abnormal sample layer, a weighted fusion method is used to calculate the difference metric of the sample layer;
[0086] Specifically, the standard deviation σ1 of the normal sample layer and the interquartile range σ2 of the abnormal sample layer are weighted and fused using the formula: Distribution Dispersion = σ1 + 0.5 × σ2. This fusion method takes into account both the overall dispersion of normal samples and the local dispersion of abnormal samples. The difference Δμ = μ1 - μ2 between the mean of the normal sample layer and the median of the abnormal sample layer is calculated. This difference reflects the degree of separation between the two layers of samples in the confidence space. Continuing the previous example, Δμ = 0.85 - 0.32 = 0.53. The weighted fusion formula is used: Differentiation metric = Distribution Dispersion / Δμ. The larger this value, the more obvious the separation between normal and abnormal samples, and the threshold parameter should be adjusted accordingly.
[0087] A time decay factor is introduced to dynamically adjust the differential metric value. The time decay factor is calculated based on the interval between two adjacent rounds of strategy self-calibration.
[0088] Specifically, the timestamps of two adjacent rounds of policy self-calibration are recorded, and the interval Δt (in days) is calculated. For example, the interval between the current calibration and the last calibration is Δt = 3 days. An exponential decay formula is used: the time decay factor η = e^(-0.1×Δt). This factor ensures that the threshold parameter is more sensitive to recent training data, and the influence of historical data gradually weakens. The adjusted metric is obtained by multiplying the differential metric by the time decay factor: Adjusted metric = η × differential metric.
[0089] By combining the preset benchmark threshold values in the initial calibration benchmark library, a sliding window mechanism is used to weight and fuse the differential metric values with the benchmark threshold values to generate a dynamic threshold intermediate value.
[0090] Specifically, a preset benchmark threshold value T0 is retrieved from the initial calibration benchmark library. This value is a fixed parameter initially configured by the system; in this embodiment, T0 = 0.6. A weighted fusion formula is used: Dynamic threshold median value = 0.7 × adjusted metric value + 0.3 × T0. The weighting coefficients 0.7 and 0.3 form a sliding window to dynamically balance current data characteristics and historical experience.
[0091] The policy threshold parameters are obtained by applying bidirectional constraints to the intermediate value of the dynamic threshold.
[0092] Specifically, the upper limit constraint is set to a maximum allowable value of 0.8 to prevent missed triggers (abnormal samples cannot be identified) due to an excessively high threshold. If the median value of the dynamic threshold is greater than 0.8, it is forcibly set to 0.8. The lower limit constraint is set to a minimum allowable value of 0.4 to prevent false triggers (normal samples are misjudged) due to an excessively low threshold. If the median value of the dynamic threshold is less than 0.4, it is forcibly set to 0.4. After bidirectional constraint verification, the final policy threshold parameter T is obtained.
[0093] Step S4: Construct a dual-drive reasoning mechanism. Based on the initial knowledge graph, perform association traversal and confidence calculation on the input product data to generate classification results. When the overall confidence of the classification results is less than the policy threshold parameter, call the association weight to correct the classification results and output the optimized response coefficient.
[0094] Specifically, such as Figure 2 As shown, the process of step S4 includes:
[0095] Step S41: Perform attribute-category association traversal on the product data according to the association weight to generate graph confidence.
[0096] Specifically, for input product data, its standardized attribute set (e.g., {blue, cotton, casual}) is extracted, and a multi-hop association traversal is performed in the knowledge graph. The traversal process starts from each attribute node and propagates along the association edges to the category nodes, collecting all reachable candidate category nodes to form a candidate category set. For example, the attribute "blue" can be associated with categories such as "dress", "shirt", and "T-shirt". For each candidate category, its graph confidence Cg is calculated using the formula: Cg = Σ(attribute weight i × association weight i), where the attribute weight i is pre-calculated based on the distinguishing power of the attribute for the category (e.g., the material attribute has a higher weight for the clothing category than the color attribute).
[0097] Step S42: Use a deep learning model to extract features from the training set to generate AI confidence scores;
[0098] Specifically, a deep learning classification network based on BERT-BiLSTM is constructed. The input layer receives word vector sequences (300-dimensional) of product text and visual feature vectors (2048-dimensional) of product images, fusing text and image features through a cross-modal attention mechanism. The BERT layer uses a 12-layer Transformer structure to extract deep semantic representations, the BiLSTM layer captures sequence dependencies, and the output layer is mapped to the category space through a fully connected network. The training set is input into the deep learning model for end-to-end training, and the loss function is a weighted sum of cross-entropy loss and association weight loss. After the model converges, forward propagation is performed on the input product data, outputting the probability distribution of each category, and the probability value of the top-1 category is taken as the AI confidence score Ca. For example, for the image and text "red pure cotton T-shirt", the model outputs a probability of 0.92 for the category "T-shirt", then Ca = 0.92.
[0099] Step S43: Dynamically fuse the map confidence and AI confidence based on attribute integrity to obtain the comprehensive confidence and preliminary classification results;
[0100] Specifically, the attribute completeness α of the input sample is calculated as: actual number of attributes / standard number of attributes (the standard number of attributes is 3). When α ≥ 0.8, the attribute is considered complete; when α < 0.5, the attribute is considered missing; and when α falls in between, the attribute is partially missing.
[0101] Weighting strategy: When attributes are complete, the graph inference weight w1 = 0.6, and the AI classification weight w2 = 0.4; when attributes are missing, w1 = 0.3, w2 = 0.7; when attributes are partially missing, linear interpolation is used to determine the weights. This strategy ensures reliance on graph constraints when data quality is high, and on AI generalization ability when data is sparse. The overall confidence score C = w1 × Cg + w2 × Ca. The uncertainty of the overall confidence score is also calculated: σ = √(w1 × Cg + w2 × Ca). 2×σg 2 + w2 2 ×σa 2 If σ > 0.15, the overall confidence level is lowered by 0.05 as a conservative estimate. The category with the highest overall confidence level is selected as the preliminary classification result, and the Top-3 candidate categories and their confidence levels are output. For example, for a product sample, the preliminary result is "T-shirt" (C=0.88), and the candidate list is {"T-shirt":0.88, "hoodie":0.65, "shirt":0.42}.
[0102] Step S44: When the overall confidence level is less than the policy threshold parameter, the verification rule is invoked to correct the classification result and the optimized response coefficient is output.
[0103] Specifically, the process of invoking the validation rule to correct the classification result and output the optimized response coefficient when the overall confidence level is less than the policy threshold parameter includes:
[0104] During the error correction process, a verification rule base is established based on the identification patterns of the three types of abnormal samples. When the overall confidence level is less than the policy threshold parameter, the verification rule base is called to perform logical verification on the preliminary classification results, identify mislabeling, omission, or counterexample label errors, and the high-confidence association relationship in the association weight is called to replace and correct the erroneous categories, generating the corrected classification results.
[0105] Specifically, based on the three types of abnormal samples, pattern recognition rules are extracted: the misprint rule determines that the weight of the association between the attribute set and the output category is lower than a threshold and there is competition for high-weight categories; the omission rule determines that the output category is missing ≥2 core attributes; and the counterexample rule determines that the attribute-category association weight is zero. These rules are stored in the rule base in the form of condition-action pairs, supporting dynamic addition and deletion. When the overall confidence level is less than the policy threshold parameter, the verification rule base is called to perform pattern matching on the preliminary classification result. If the misprint rule is matched, it is identified as "misprint error" and the correct category is located; if the omission rule is matched, it is identified as "omission error" and the missing attribute is located; if the counterexample rule is matched, it is identified as "counterexample error" and a conflict relationship is marked. For the identified incorrect categories, the high-confidence associated categories (weight Top-1 and >0.8) corresponding to the current attribute set in the knowledge graph are called for replacement and correction, generating a corrected classification result and attaching a correction type label.
[0106] The optimized response coefficient is obtained by multiplying the corrected accuracy by the deviation of the policy threshold parameter.
[0107] Specifically, the correction accuracy P is calculated as the proportion of correctly corrected samples to the total number of corrected samples, the policy threshold deviation D is calculated as (TC) / T (T is the threshold parameter, C is the pre-correction confidence), and the optimized response coefficient δ=P×D is output as a quantitative indicator of the effect of the first-layer policy self-calibration.
[0108] Step S5: Based on the correction result and the optimized response coefficient, the associated weights are dynamically updated using a sliding weighted algorithm to obtain an optimization effect measure;
[0109] Specifically, based on the correction results, the change in category confidence ΔC before and after correction is extracted. Combined with the optimized response coefficient δ, the weight update intensity factor γ is calculated using the formula γ = δ × tanh(ΔC). The hyperbolic tangent function maps the update intensity to the (0,1) interval, preventing excessive update amplitude from causing weight oscillations. A sliding window of length L (L=100) is established to maintain the historical association weight sequence {W_hist} and the new sample confidence sequence {C_new} within the window. An exponentially weighted moving average strategy is adopted, with the historical weight coefficient α_hist = 0.7×(1-δ) and the new sample weight coefficient α_new = 0.3×(1+δ). The optimized response coefficient δ dynamically adjusts the ratio between the two; a larger δ indicates a better correction effect and a greater tendency to adopt new sample information. For each corrected associated edge, an update operation is performed: W_updated = α_hist × W_hist_avg + α_new × C_new, where W_hist_avg is the exponentially weighted average of historical weights within the sliding window. For uncorrected associated edges, a momentum factor is introduced to maintain weight stability; the momentum factor β = 0.95, i.e., W_updated = β × W_current + (1-β) × W_hist_avg. The optimization effect metric η is calculated as ||W_updated - W_original||2 × ΔAcc, where the first term is the L2 norm of the weight update, measuring the magnitude of weight change, and the second term ΔAcc is the improvement in classification accuracy before and after the update, obtained by comparing the classification results before and after the update of this batch of samples. A time decay factor λ = e^(-0.05 × Δt) is introduced to smooth η, where Δt is the time interval between two adjacent updates (in hours), ensuring that recent optimization effects have higher reference value. If the optimization effect metric η is less than the preset threshold η_min (η_min=0.01) for three consecutive times, it is determined that the weight update is trapped in a local optimum, triggering the abnormal sample generation intensity enhancement mechanism in step S6, which forcibly increases the sample perturbation to break the weight deadlock.
[0110] Step S6: Based on the optimization effect metric, reconstruct the abnormal sample generation rule parameter set to adjust the generation ratio and mutation intensity of the three types of abnormal samples to obtain an optimized training set and output the system performance index.
[0111] Specifically, step S6 includes the following process:
[0112] The adjustment factor for the sample generation intensity is calculated based on the aforementioned optimization effect metric;
[0113] Specifically, the adjustment factor formula is: λ = 1 + tanh(η - η0), where η0 is the baseline threshold for optimization effect (η0 = 0.05), and the tanh function maps the adjustment range to the [0,2] interval. When η > η0, λ > 1, indicating that the current optimization is effective, and the sample generation intensity is moderately increased to consolidate the optimization effect; when η < η0, λ < 1, indicating that the optimization is weak, and the generation intensity is reduced to avoid wasting resources. If η < 0.5 × η0 for 3 consecutive times, an aggressive enhancement mode is triggered, λ is forcibly set to 2.0, and the total amount of abnormal sample generation is increased by 30%, forcing the system to break through the local optimum.
[0114] The abnormal sample generation rule parameter set is reconstructed, wherein the proportion of mis-shot samples is determined by the product of the base proportion and the adjustment factor, the proportion of missed samples is determined by the complementary relationship between the base proportion and the sample library coverage, and the mutation intensity of negative sample is determined by the coupling relationship between the base intensity and the policy threshold parameter.
[0115] Specifically, the process of reconstructing the abnormal sample generation rule parameter set includes:
[0116] The base proportion of misprinted samples is calculated based on the amplitude of the optimization effect measurement. The base proportion remains at the initial set value when the optimization effect is significant, and increases proportionally when the optimization effect does not meet expectations.
[0117] The sample library coverage rate is calculated based on the proportion of the number of categories already covered in the training set to the total number of categories. The generation ratio of missed samples is determined by the complementarity principle. The generation ratio is negatively correlated with the coverage rate.
[0118] The abnormal amplification baseline value is obtained by normalizing the threshold parameter of the strategy. The mutation intensity of the negative sample is determined by combining the directional sign of the optimization effect metric. The mutation intensity shows a linear growth trend when the threshold parameter is high.
[0119] The ratio of misprinted samples, the ratio of missed samples, and the mutation intensity of counterexample samples are combined to form the parameter set of the abnormal sample generation rule.
[0120] During the sample generation process, mutation operations are used to perturb the attributes or categories of normal samples to generate the three types of abnormal samples;
[0121] Specifically, three types of mutation operations are performed on normal samples to generate abnormal samples: Misprint mutation: The attribute set is retained, and the five categories with the lowest association weights of the attribute set are queried from the knowledge graph as candidates. One category is randomly selected to replace the original category by weighting the reciprocal of the weights.
[0122] Missed attribute mutation: Randomly delete 1-2 attributes from the attribute set. The probability of deletion is negatively correlated with the importance of the attribute (color 0.3, material 0.2, function 0.1).
[0123] Counterexample mutation: Randomly extract zero-weight attribute-category pairs from the knowledge graph, replace the original categories with conflicting categories, and retain the original attribute set.
[0124] The variation range is controlled by adjusting the factor λ. When λ > 1, the range of candidate categories is increased (misprinted) or the number of attributes is deleted (missed), and when λ < 1, the variation range is reduced.
[0125] The generated abnormal samples are screened, and their deviation from the normal distribution is evaluated by calculating the abnormality degree of the samples. Invalid samples are removed by an automatic filtering mechanism based on a preset abnormality degree threshold. The screened abnormal samples are mixed with normal samples in proportion to construct the optimized training set.
[0126] Specifically, for generated anomalous samples, the standardized Mahalanobis distance between the attribute-category association weight in the knowledge graph and the average weight of normal samples in the training set is calculated; this distance value is the anomalousness. An anomalousness threshold of 0.5 is set; samples below this value are considered invalid mutations and are discarded. An automatic filtering pipeline with a preset anomalousness threshold is used, employing parallel computing to batch process generated samples, retaining valid anomalous samples with an anomalousness ≥ 0.5, ensuring an effectiveness rate of over 95%. The filtered anomalous samples are mixed with normal samples at a 1:4 ratio, with the total sample size controlled at 500,000. Stratified sampling is used to ensure a balanced proportion of anomalous samples within each category, constructing a differentiated and optimized training set, where normal samples are marked "valid," and anomalous samples are labeled with an error type.
[0127] The system performance index is calculated as the product of the effective rate of generated samples and the false positive suppression rate. The effective rate is determined by the proportion of the number of effective samples to the total number of generated samples, and the false positive suppression rate is determined by comparing the similarity between generated samples and historical false positive samples.
[0128] Specifically, two core indicators are calculated and the system effectiveness is output: Effectiveness E1 = N_valid / N_total, where N_valid is the number of valid outlier samples and N_total is the total number of generated samples. For example, if 20,000 outlier samples are generated, and 19,000 remain after removal, then E1 = 95%. False positive suppression rate E2 is calculated by extracting the feature vectors of historical false positive samples from the optimized training set and calculating the mean cosine similarity between the feature vectors of generated samples and false positive samples: E2 = 1 - mean similarity. The lower the similarity, the more effectively the generated samples can cover historical false positive patterns and suppress future false positives. If the mean similarity is 0.3, then E2 = 0.7. The system effectiveness index η = E1 × E2 comprehensively reflects the sample generation quality and false positive suppression capability.
[0129] Step S7: Optimize the fusion weights of the dual-drive inference mechanism based on the optimized training set and the system performance index. If the system performance index fails to meet the quality standard, trigger the bypass mechanism to directly backtrack and adjust the associated weights to form a system pass-through calibration.
[0130] Specifically, step S7 includes the following process:
[0131] The achievement degree of the system performance index is calculated based on the classification performance of the optimized training set;
[0132] Specifically, the degree of achievement is determined by comparing the magnitude of the improvement in classification accuracy before and after training with the degree of closeness to the preset expected target.
[0133] Specifically, before training the dual-drive inference mechanism using the optimized training set, the current classification accuracy Acc_before is calculated on the validation set; after training, the classification accuracy Acc_after is calculated on the same validation set. The validation set consists of 10,000 samples, uniformly distributed across product categories. The improvement magnitude ΔAcc = Acc_after - Acc_before. For example, if the accuracy before training is 0.82 and after training it is 0.875, then ΔAcc = 0.055. The desired target value Acc_target is retrieved from the initial calibration benchmark library; this value is a system configuration parameter, typically set to 0.9. The proximity μ is calculated as μ = ΔAcc / (Acc_target - Acc_before). The achievement degree D = tanh(μ), which maps the achievement degree to the [0,1] interval using a hyperbolic tangent function. The preset quality standard threshold is D_quality = 0.6; D ≥ 0.6 is considered acceptable, and D < 0.6 is considered unacceptable.
[0134] When the achievement level indicates that the system performance index meets the quality standard, an incremental learning strategy is used to fine-tune the weight allocation ratio of graph reasoning and deep learning classification in the dual-drive reasoning mechanism.
[0135] Specifically, when the achievement level D ≥ 0.6, incremental learning fine-tuning of the fusion weights is performed: the initial ratio of the graph inference weight w_g and the AI classification weight w_a in the dual-drive inference mechanism is set to 0.5:0.5. The inference path sources of high-confidence correct samples are analyzed. If more than 70% rely on graph inference, the fine-tuning direction is to increase w_g; if more than 70% rely on AI classification, the fine-tuning direction is to increase w_a. Gradient sign is used to determine the increment: if ∂D / ∂w_g > 0, w_g is increased; otherwise, w_a is increased. Small-step incremental updates are used: w_g_new = w_g_old + η×Δw, where the learning rate η = 0.05×(1-D), and Δw = sign(∂D / ∂w_g)×0.02. For example, when D=0.65, η≈0.0175, and w_g is fine-tuned from 0.5 to 0.5175. After the weights are updated, normalization is performed to ensure that w_g + w_a = 1. Fine-tuning is stopped when the degree of improvement ΔD < 0.01 after three consecutive fine-tunings to prevent overfitting.
[0136] When the achievement rate is lower than the preset benchmark, it is determined that the quality standard has not been met, triggering the bypass mechanism and skipping the normal adjustment process of the fusion weight;
[0137] Specifically, when the achievement level D < 0.6, the bypass mechanism is triggered and step S72 is skipped. If D < 0.6 and D shows a decreasing trend in two consecutive training cycles, it is determined that the system performance has not met the quality standard, and the bypass flag is activated. The bypass mechanism directly skips the regular fine-tuning process of the fusion weights and proceeds to the backtracking adjustment of the associated weights in step S74.
[0138] The association weights are adjusted backtracking under the bypass mechanism. The attribute-category mapping relationship of high misjudgment rate samples in the optimized training set is directly called to perform punitive correction on the association weights. The punitive correction uses backpropagation to reduce the weight value of the misjudgment path and updates the knowledge graph formation system direct calibration synchronously.
[0139] Specifically, samples whose classification results are inconsistent with the true labels are extracted from the optimized training set, and their misclassification rate M = N_misclass / N_total is calculated. The top-K attribute-category pairs (K=100) with the highest misclassification rates are selected as targets for backtracking adjustment. For each target association pair (i,j), the penalty factor ρ = M_ij / M_max is calculated, where M_ij is the misclassification rate of the pair, and M_max is the highest misclassification rate. Weight correction is performed: W_ij_new = W_ij_old × (1 -ρ×δ), where δ is the optimized response coefficient. For example, if the association weight of "leather-T-shirt" is 0.15, the misclassification rate ρ=0.8, and δ=0.1, then the new weight is 0.15×(1-0.08)=0.138, achieving a backpropagation-style penalty reduction. The penalty-corrected association weights are updated synchronously to the knowledge graph in real time, covering the original weight values to form a closed loop for system direct calibration.
[0140] Step S8: Based on the optimized response coefficient, the optimized effect metric, the system performance index, the system direct calibration, and the initial calibration benchmark library, a reinforcement learning algorithm is used to update the initial calibration benchmark library to the evolution strategy library, and the optimal self-calibration path is dynamically selected to obtain the target knowledge graph.
[0141] In this embodiment, a five-dimensional state vector s = [δ, η, E, C, F] is constructed, where: δ is the optimized response coefficient, with a value range of [0,1], quantifying the calibration intensity of the first-layer strategy; η is the optimization effect metric, with a value range of [0,+∞), reflecting the product effect of weight update magnitude and accuracy improvement; E is the system performance index, with a value range of [0,1], reflecting the sample generation quality and misjudgment suppression capability; C is the cumulative trigger frequency of the system direct calibration, with a value range of [0,100], recording the number of times the bypass mechanism is activated; F is the feature vector of the initial calibration benchmark library, containing association mining hyperparameters, graph structure statistics, and benchmark identification rule encoding, with a dimension of 50, which is reduced to 10 dimensions through principal component analysis. For each component, Z-score normalization is applied, s_i_norm = (s_i - μ_i) / σ_i, where μ_i and σ_i are statistically derived from historical data in the initial calibration benchmark library to ensure that the state space is stably distributed in the interval [-3,3].
[0142] Specifically, a discrete action space A = {a1, a2, a3, a4, a5} is defined, corresponding to the self-calibration path of the five-layer progressive intelligent optimization system: Action a1 only executes the correction mechanism of step S4, with the smallest adjustment range, suitable for slight deviation scenarios where δ > 0.8 and η < 0.02; Action a2 executes the weight update of step S4→S5, suitable for medium optimization needs where δ ∈ [0.5,0.8] and η ∈ [0.02,0.1]; Action a3 executes the rule reconstruction of step S4→S5→S6, suitable for insufficient sample quality scenarios where δ < 0.5 and E < 0.7; a4 executes the cross-layer optimization of step S4→S5→S6→S7, suitable for systematic deviation scenarios where E < 0.6 and C > 5; a5 executes the complete five-layer progressive process, suitable for severe failure scenarios where E < 0.5 for three consecutive times or C > 10 for a single time.
[0143] Specifically, a composite reward function R(s,a) = R1 + R2 + R3 is designed, where: Reward R1 is based on accuracy improvement: R1 = (Acc_after - Acc_before) × 100, with a positive reward for improved accuracy and a negative reward for decreased accuracy; Reward R2 is based on efficiency penalty: R2 = -0.1 × cost(a), where cost(a) is the execution cost of action a, with costs of 1, 2, 4, 8, and 16 for a1 to a5 respectively, penalizing complex paths to avoid over-optimization; Reward R3 is based on stability incentive: R3 = 1.0 if |Acc_after - Acc_target| < 0.05 else -0.5, encouraging convergence to the target accuracy. Finally, the immediate reward is normalized to the [-1,1] interval: R_norm = tanh(R_total / 10).
[0144] Specifically, the Q-values of historical best paths are extracted from the initial calibration benchmark library as initialization. Uncovered state-action pairs are randomly initialized, with Q0 averaging -0.1 to 0.1. After each execution of step S7, the TD error is calculated based on the transition state s': δ_TD = R + γ×max a'Q(s',a') - Q(s,a), where the discount factor γ=0.9. The Q-value is updated with a learning rate α=0.1: Q(s,a) ← Q(s,a) + α×δ_TD. A decaying ε-greedy strategy is adopted, with an initial ε=0.3, decaying by 0.01 per training round, and a minimum ε_min=0.05, ensuring sufficient exploration in the early stages and stable utilization in the later stages. When the Q-value of a state-action pair increases for 10 consecutive iterations and the cumulative reward R_cum = ΣR > 100, the strategy path is fixed to the evolutionary strategy library Φ1, storing state feature patterns, action selections, average reward values, and a fixed timestamp. When the capacity of the evolutionary strategy library Φ1 exceeds 100, an elimination mechanism is initiated. The "utility value" U = Q_avg × f_frequency of each strategy is calculated, where f_frequency is the frequency at which the strategy is called. The 20% of strategies with the lowest utility values are eliminated to maintain the simplicity and efficiency of the strategy library. Calculate the cosine similarity between the current state s and each fixed strategy state pattern in Φ1, and select the top-3 strategies with the highest similarity as candidate paths. From the candidate paths, select the action a* with the highest Q value as the optimal self-calibration path, and execute the corresponding path process (one of a1 to a5). After executing the optimal path, freeze the association weights of the current knowledge graph and generate the target knowledge graph G_target. G_target contains the final association weights after calibration by the five-layer intelligent optimization system, the updated node and edge structure, and the evolutionary strategy library Φ1 as metadata. Add a version identifier to the target knowledge graph, record the key indicators in this evolution cycle: final accuracy, cumulative reward value, strategy library capacity, bypass trigger count, etc., output to the production environment and archive to the initial calibration benchmark library as historical data for the next round of evolution.
[0145] Specifically, this invention achieves the co-evolution of knowledge graph and reasoning mechanism by constructing a five-layer progressive closed-loop system driven by association weights: association weights, as core parameters, directly affect the quality of abnormal sample generation and classification confidence, while classification error is quantified by optimizing response coefficients and fed back to the weight update stage, forming a causal chain; policy threshold parameters are dynamically calculated based on the difference in confidence distribution between normal and abnormal samples, and their numerical changes directly trigger correction responses of different intensities, reflecting the adaptive relationship between data separability and judgment criteria; optimization effect measurement is calculated by multiplying the magnitude of weight changes with the accuracy improvement, establishing a direct quantitative correlation between parameter space adjustment and performance space improvement; the system efficiency index adopts the form of sub-indicator product, balancing sample quality and misjudgment suppression capability, and integrates multiple parameters into a state space through reinforcement learning, with accuracy improvement, efficiency cost, and stability as reward objectives for policy evolution, thereby forming a negative feedback closed loop of parameter linkage between knowledge graph construction, sample generation, and reasoning optimization, significantly improving product classification accuracy and anomaly identification capability.
[0146] 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.
[0147] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing and reasoning about category knowledge graphs for commodity classification, characterized in that, include: Step S1: Collect product data through multiple sources and generate attribute-category structured data pairs after preprocessing; Step S2: Based on the structured data, color, material and functional attributes are automatically extracted, and the support, confidence and lift are calculated using an association mining algorithm to construct a knowledge graph containing association weights, and an initial calibration benchmark library is generated simultaneously. Step S3: Based on the association weights, generate three types of abnormal samples: mislabeled, missing, and counterexample labeled. After screening, construct a training set with normal samples and calculate the policy threshold parameters. Step S4: Construct a dual-drive reasoning mechanism to generate classification results by performing association traversal and confidence calculation on the input product data based on the initial knowledge graph; When the overall confidence of the classification result is less than the policy threshold parameter, the association weight is called to correct the classification result and the optimized response coefficient is output. Step S5: Based on the correction result and the optimized response coefficient, the associated weights are dynamically updated using a sliding weighted algorithm to obtain an optimization effect measure; Step S6: Based on the optimization effect metric, reconstruct the abnormal sample generation rule parameter set to adjust the generation ratio and mutation intensity of the three types of abnormal samples to obtain an optimized training set and output the system performance index. Step S7: Optimize the fusion weights of the dual-drive inference mechanism based on the optimized training set and the system performance index. If the system performance index fails to meet the quality standard, trigger the bypass mechanism to directly backtrack and adjust the associated weights to form a system pass-through calibration. Step S8: Based on the optimized response coefficient, the optimized effect metric, the system performance index, the system direct calibration, and the initial calibration benchmark library, a reinforcement learning algorithm is used to update the initial calibration benchmark library to the evolution strategy library, and the optimal self-calibration path is dynamically selected to obtain the target knowledge graph.
2. The method for constructing and reasoning about category knowledge graphs for commodity classification according to claim 1, characterized in that, The process of using association mining algorithms to calculate support, confidence, and lift to construct a knowledge graph containing association weights includes: By introducing prior knowledge of category distribution, candidate attribute combinations are filtered in a hierarchical manner. The frequent pattern growth algorithm is used to mine the joint distribution features of multiple attributes. The support is calculated to measure the co-occurrence frequency of attributes and categories. The confidence is calculated to evaluate the strength of conditional probability. The lift is calculated to determine the significance of association. The three are integrated to form a multi-dimensional association evaluation system. Based on the aforementioned association evaluation system, a hierarchical topological structure of the knowledge graph is constructed, dividing nodes into attribute node domains and category node domains, and dividing edges into single-attribute mapping edges and combined attribute mapping edges. The association weights are generated by multiplying confidence and lift.
3. The method for constructing and reasoning about category knowledge graphs for commodity classification according to claim 2, characterized in that, The process of step S3 includes: Based on the association weights, three types of abnormal sample generation rules are constructed. The incorrectly labeled sample is generated by replacing the correct category with a low-weight category. The missingly labeled sample is generated by randomly deleting core attributes. The negative example sample is generated by combining zero-weight attribute-category pairs. The generation ratio is dynamically allocated according to the distribution characteristics of the association weights. A sample validity assessment mechanism is used to screen the three types of abnormal samples, and the degree to which the abnormal quantitative samples deviate from the normal distribution is calculated. The selected abnormal samples are mixed with the normal samples in a certain proportion to construct a hierarchical training set; Based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set, the policy threshold parameter is calculated using statistical measurement methods.
4. The method for constructing and reasoning about category knowledge graphs for commodity classification according to claim 3, characterized in that, The process of calculating the policy threshold parameter using statistical metrics based on the confidence distribution of normal samples and the dispersion of abnormal samples in the training set includes: Perform hierarchical feature statistics on the training set, and calculate the confidence distribution features of the normal sample layer and the abnormal sample layer respectively; Based on the distribution dispersion of the normal sample layer and the deviation index of the abnormal sample layer, a weighted fusion method is used to calculate the difference metric of the sample layer; A time decay factor is introduced to dynamically adjust the differential metric value. The time decay factor is calculated based on the interval between two adjacent rounds of strategy self-calibration. By combining the preset benchmark threshold values in the initial calibration benchmark library, a sliding window mechanism is used to weight and fuse the differential metric values with the benchmark threshold values to generate a dynamic threshold intermediate value. The policy threshold parameters are obtained by applying bidirectional constraints to the intermediate value of the dynamic threshold.
5. The method for constructing and reasoning a category knowledge graph for commodity classification according to claim 4, characterized in that, The process of step S4 includes: Based on the association weights, attribute-category association traversal is performed on the product data to generate graph confidence. Deep learning models are used to extract features from the training set to generate AI confidence scores; The comprehensive confidence score and preliminary classification results are obtained by dynamically fusing the map confidence score and AI confidence score based on attribute integrity. When the overall confidence level is less than the policy threshold parameter, the validation rule is invoked to correct the classification result and the optimized response coefficient is output.
6. The method for constructing and reasoning a category knowledge graph for commodity classification according to claim 5, characterized in that, The process of invoking the validation rule to correct the classification result and output the optimized response coefficient when the overall confidence level is less than the policy threshold parameter includes: During the error correction process, a verification rule base is established based on the identification patterns of the three types of abnormal samples. When the overall confidence level is less than the policy threshold parameter, the verification rule base is called to perform logical verification on the preliminary classification results, identify mislabeling, omission, or counterexample label errors, and the high-confidence association relationship in the association weight is called to replace and correct the erroneous categories, generating the corrected classification results. The optimized response coefficient is obtained by multiplying the corrected accuracy by the deviation of the policy threshold parameter.
7. The method for constructing and reasoning a category knowledge graph for commodity classification according to claim 6, characterized in that, The process of step S6 includes: The adjustment factor for the sample generation intensity is calculated based on the aforementioned optimization effect metric; The abnormal sample generation rule parameter set is reconstructed, wherein the proportion of mis-shot samples is determined by the product of the base proportion and the adjustment factor, the proportion of missed samples is determined by the complementary relationship between the base proportion and the sample library coverage, and the mutation intensity of negative sample is determined by the coupling relationship between the base intensity and the policy threshold parameter. During the sample generation process, mutation operations are used to perturb the attributes or categories of normal samples to generate the three types of abnormal samples; The generated abnormal samples are screened, and their deviation from the normal distribution is evaluated by calculating the abnormality degree of the samples. Invalid samples are removed by an automatic filtering mechanism based on a preset abnormality degree threshold. The screened abnormal samples are mixed with normal samples in proportion to construct the optimized training set. The system performance index is calculated as the product of the effective rate of generated samples and the false positive suppression rate. The effective rate is determined by the proportion of the number of effective samples to the total number of generated samples, and the false positive suppression rate is determined by comparing the similarity between generated samples and historical false positive samples.
8. The method for constructing and reasoning about category knowledge graphs for commodity classification according to claim 7, characterized in that, The process of reconstructing the abnormal sample generation rule parameter set includes: The base proportion of misprinted samples is calculated based on the amplitude of the optimization effect measurement. The base proportion remains at the initial set value when the optimization effect is significant, and increases proportionally when the optimization effect does not meet expectations. The sample library coverage rate is calculated based on the proportion of the number of categories already covered in the training set to the total number of categories. The generation ratio of missed samples is determined by the complementarity principle. The generation ratio is negatively correlated with the coverage rate. The abnormal amplification baseline value is obtained by normalizing the threshold parameter of the strategy. The mutation intensity of the negative sample is determined by combining the directional sign of the optimization effect metric. The mutation intensity shows a linear growth trend when the threshold parameter is high. The ratio of misprinted samples, the ratio of missed samples, and the mutation intensity of counterexample samples are combined to form the parameter set of the abnormal sample generation rule.
9. The method for constructing and reasoning a category knowledge graph for commodity classification according to claim 8, characterized in that, The process of step S7 includes: The achievement degree of the system performance index is calculated based on the classification performance of the optimized training set; When the achievement level indicates that the system performance index meets the quality standard, an incremental learning strategy is used to fine-tune the weight allocation ratio of graph reasoning and deep learning classification in the dual-drive reasoning mechanism. When the achievement rate is lower than the preset benchmark, it is determined that the quality standard has not been met, triggering the bypass mechanism and skipping the normal adjustment process of the fusion weight; The association weights are adjusted backtracking under the bypass mechanism. The attribute-category mapping relationship of high misjudgment rate samples in the optimized training set is directly called to perform punitive correction on the association weights. The punitive correction uses backpropagation to reduce the weight value of the misjudgment path and updates the knowledge graph formation system direct calibration synchronously.
10. The method for constructing and reasoning a category knowledge graph for commodity classification according to claim 9, characterized in that, The degree of achievement is determined by comparing the improvement in classification accuracy before and after training with the degree of closeness to the preset expected target.