Intelligent customer service semantic recognition and error correction method and system based on linkage of large language model and knowledge graph

The intelligent customer service system, which links a large language model with a knowledge graph, dynamically updates the knowledge graph and optimizes model parameters locally. This solves the problems of lagging knowledge updates and high resource consumption in intelligent customer service systems, achieving efficient dynamic knowledge updates and error correction, and improving the accuracy of answers and response efficiency.

CN121303145APending Publication Date: 2026-01-09SICHUAN UNIV JINCHENG INST

Patent Information

Application Number
CN202511852662.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

When faced with complex semantic structures or questions in specialized fields, existing intelligent customer service systems generate answers that contain factual errors or logical contradictions. Furthermore, outdated knowledge leads to insufficient accuracy in the answers. Traditional methods require full retraining or manual intervention, which is resource-intensive and inefficient.

Method used

After generating an initial answer using a large language model, confidence is verified by combining it with a knowledge graph. The knowledge graph is dynamically updated and model parameters are locally optimized. An incremental learning module is used to crawl external data and generate error correction samples, adjusting only the local parameters related to the error.

Benefits of technology

It enables real-time dynamic updates of knowledge, reduces the cost of manual intervention and resource consumption, improves the accuracy of answers and response efficiency, and ensures that the system operates efficiently in resource-constrained scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303145A_ABST
    Figure CN121303145A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent customer service semantic recognition and error correction method and system based on linkage of a large language model and a knowledge graph, relates to the technical field of artificial intelligence and natural language processing, and discloses the intelligent customer service semantic recognition and error correction method and system based on linkage of the large language model and the knowledge graph. After the primary answer is generated through the large language model, confidence verification is carried out in combination with the knowledge graph, the knowledge graph is dynamically updated, model parameters are locally optimized, the problems that knowledge updating is lagged and full-model training resource consumption is large in a traditional method are solved, and the answer accuracy can be improved; knowledge dynamic updating can be realized, the manual intervention cost is reduced, and the model training efficiency is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and natural language processing technology, and in particular to a method and system for intelligent customer service semantic recognition and error correction based on the linkage of large language models and knowledge graphs. Background Technology

[0002] Current intelligent customer service systems primarily rely on large language models for semantic understanding and answer generation. While capable of handling routine user queries, their generated answers often contain factual errors or logical contradictions when faced with complex semantic structures or specialized domain questions. Existing technologies typically enhance semantic understanding by introducing static knowledge graphs. However, the construction and maintenance of knowledge graphs require significant manual intervention, with update cycles usually measured in weeks or months, making it difficult to capture dynamic changes in external knowledge in a timely manner. This lag is particularly problematic in fields like finance and healthcare, where knowledge updates are frequent, leading to discrepancies between the system's answers and the latest information. Furthermore, when the system detects incorrect answers, traditional solutions either rely on manual review and correction, which is inefficient and costly, or involve full model retraining, consuming substantial computational resources and potentially degrading the model's original capabilities. This architecture prevents the system from maintaining responsiveness while simultaneously achieving real-time knowledge updates and automatic error correction, thus limiting the effectiveness of intelligent customer service systems.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a method and system for intelligent customer service semantic recognition and error correction based on the linkage of large language models and knowledge graphs, aiming to improve the accuracy of intelligent customer service responses.

[0005] To achieve the above objectives, this application proposes an intelligent customer service semantic recognition and error correction method based on the linkage of a large language model and a knowledge graph. The method includes: Receive user query data and process the user query data through a large language model to generate preliminary answer data; The preliminary response data is semantically segmented to extract key fact points and generate atomic fact unit data. The atomic fact unit data is matched with nodes in the knowledge graph, and confidence data is calculated based on the matching results. When the confidence data is lower than a preset threshold, the knowledge graph incremental learning module is activated to crawl data from external data sources and extract new knowledge units. Based on the new knowledge units, the knowledge graph nodes are updated and error correction sample data is generated. The error correction sample data is used to perform local parameter optimization on the large language model to generate optimized large language model data, and based on the optimized large language model data, corrected answer data is generated.

[0006] In one embodiment, the steps of receiving user query data and processing the user query data through a large language model to generate preliminary answer data include: Receive the user query data; The user query data is input into the large language model, and encoded through the semantic understanding layer of the large language model to generate preliminary semantic representation data; Based on the preliminary semantic representation data, text generation processing is performed through the decoder layer of the large language model to generate the preliminary answer data.

[0007] In one embodiment, the steps of performing semantic segmentation on the preliminary response data, extracting key fact points, and generating atomic fact unit data include: The preliminary response data is preprocessed to remove redundant information and noise, generating purified preliminary response data; The purified preliminary response data is subjected to syntactic parsing and segmented into multiple semantic fragment data. Key entities and relationships are identified from multiple semantic fragment data, key fact points are extracted, and atomic fact unit data is generated by assembling them.

[0008] In one embodiment, the step of matching the atomic fact unit data with nodes in the knowledge graph and calculating confidence data based on the matching results includes: The atomic fact unit data is mapped to the nodes of the knowledge graph, and then processed by a subgraph matching algorithm to generate matching result data. Based on the matching result data, the correlation strength value between nodes is calculated, and the confidence data is generated by combining the source label and time label of the nodes in the knowledge graph through a weighted average algorithm.

[0009] In one embodiment, when the confidence data is lower than a preset threshold, the steps of activating the knowledge graph incremental learning module to crawl external data sources and extract new knowledge units, updating knowledge graph nodes based on the new knowledge units, and generating error correction sample data include: When the confidence level data is lower than the preset threshold, the activation control module outputs a trigger signal; Based on the trigger signal, the knowledge graph incremental learning module is activated, and based on the preset crawling strategy, the external data source data is crawled in a targeted manner. The external data source data is processed by entity linking to extract the new knowledge units; The new knowledge unit is fused with the knowledge graph node to update the knowledge graph structure; Based on the new knowledge unit, adversarial samples are constructed to generate the error correction sample data.

[0010] In one embodiment, the preset crawling strategy includes: Filter the preset data source list; the preset data source list includes official websites and academic journals; Data exceeding a preset duration is filtered from the data source list, and the filtered data is used as the external data source data.

[0011] In one embodiment, the steps of using the error-correction sample data to perform local parameter optimization on the large language model to generate optimized large language model data, and generating corrected answer data based on the optimized large language model data include: The error-correcting sample data is input into the large language model to activate the local attention head layer; Only the parameters of the local attention head layer are unfrozen, and the parameters are optimized using the backpropagation algorithm to generate the optimized large language model data; Based on the optimized large language model data, the user query data is reprocessed to generate the corrected answer data.

[0012] In one embodiment, unfreezing only the parameters of the local attention head layer includes: Identify the keywords of erroneous knowledge points in the error correction sample data; Map the erroneous knowledge point keywords to a specific attention head layer of the large language model; The parameters of the specific attention head layer are optimized using the gradient descent algorithm to avoid full model optimization.

[0013] In one embodiment, the method further includes: Output the corrected answer data to the user interface and receive user feedback data; Based on the user feedback data, the weight values ​​of the nodes in the knowledge graph are adjusted to generate reinforced knowledge graph data. Based on the reinforced knowledge graph data, the process of matching the atomic fact unit data with the nodes in the knowledge graph and calculating the confidence data based on the node correlation and data timeliness is returned.

[0014] Furthermore, to achieve the above objectives, this application also proposes an intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph. The intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph includes: a memory, a processor, and an intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph, stored in the memory and executable on the processor. The intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph is configured to implement the steps of the intelligent customer service semantic recognition and error correction method based on the linkage of a large language model and a knowledge graph.

[0015] The intelligent customer service semantic recognition and error correction method and system proposed in this application, which is based on the linkage of a large language model and a knowledge graph, generates an initial answer through a large language model and then verifies the confidence level by combining it with a knowledge graph. The knowledge graph is dynamically updated and the model parameters are locally optimized. This solves the problems of lagging knowledge updates and high resource consumption for full model training in traditional methods, and can improve the accuracy of answers. In addition, it can also realize dynamic knowledge updates, reduce the cost of manual intervention, and optimize the efficiency of model training. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an embodiment of the intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs in this application. Figure 2 For this application Figure 1 A detailed flowchart of step S100; Figure 3 For this application Figure 1 A detailed flowchart of step S200; Figure 4 For this application Figure 1 Detailed flowchart of step S300; Figure 5 For this application Figure 1 Detailed flowchart of step S400; Figure 6 For this application Figure 1A detailed flowchart of step S500; Figure 7 This is a schematic diagram of the structure of an embodiment of the intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph, as provided in this application.

[0019] Explanation of icon numbers: 10. Memory; 20. Processor.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0022] It should be understood that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0023] In existing technologies, intelligent customer service systems typically use large language models to generate initial answers. However, when handling complex semantics or time-sensitive queries, the accuracy of the answers is easily compromised due to lagging knowledge updates. Traditional methods enhance semantic understanding by introducing static knowledge graphs, but knowledge graph updates rely on manual maintenance and are difficult to respond to external changes in real time. When an error is detected, existing solutions require full retraining of the model or manual intervention, resulting in high resource consumption and low efficiency, failing to meet the needs of efficient error correction in dynamic scenarios. For example, in financial product consultation scenarios, when a user inquires about the latest interest rate policies, the system may provide outdated information due to a failure to update the knowledge base in a timely manner, and the error correction process requires significant computational resources.

[0024] To address the aforementioned issues, a mechanism is needed to dynamically update knowledge and efficiently correct errors. Considering the high cost of updating knowledge graphs, we explore how to incrementally learn to supplement only missing knowledge, rather than performing a full reconstruction. Simultaneously, to avoid the resource waste associated with full model optimization, we investigate how to locate error-related parameters for localized adjustments. Further analysis reveals that combining the confidence assessment of a large language model with that of a knowledge graph can trigger targeted knowledge crawling and improve model accuracy through targeted training, thus forming a closed-loop optimization process.

[0025] Based on this, embodiments of this application provide an intelligent customer service semantic recognition and error correction method based on the linkage of a large language model and a knowledge graph, referring to... Figure 1 The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs includes steps S100 to S500, wherein: Step S100: Receive user query data and process the user query data through a large language model to generate preliminary answer data; Step S200: Perform semantic segmentation on the preliminary response data, extract key fact points, and generate atomic fact unit data; Step S300: Match the atomic fact unit data with the nodes in the knowledge graph, and calculate the confidence data based on the matching results; Step S400: When the confidence data is lower than a preset threshold, the knowledge graph incremental learning module is started to crawl external data source data and extract new knowledge units, and the knowledge graph nodes are updated based on the new knowledge units to generate error correction sample data. Step S500: Use the error correction sample data to perform local parameter optimization processing on the large language model to generate optimized large language model data, and generate corrected answer data based on the optimized large language model data.

[0026] In this embodiment, semantic segmentation refers to the process of dividing text into independent semantic fragments and extracting key entities and relationships through syntactic parsing. Specifically, it can be implemented using dependency parsing combined with named entity recognition technology to separate verifiable fact units from complex answers. Atomic fact unit data refers to structured data units containing a single entity and its associated relationships, specifically represented by triples, such as (entity A, relation, entity B), used for precise matching with knowledge graph nodes. Confidence data refers to a reliability index calculated based on the matching degree and timeliness of knowledge graph nodes, specifically implemented using a subgraph matching algorithm combined with a time decay function, used to determine the credibility of preliminary answers. The knowledge graph incremental learning module refers to an automated component that crawls external data and extracts new knowledge in a targeted manner. Specifically, it can be implemented by selecting authoritative data sources (such as websites) through a preset priority strategy, used to quickly supplement missing or outdated knowledge. Local parameter optimization refers to adjusting only the parameters of specific neural network layers in the large language model that are related to errors. Specifically, it can be implemented by freezing irrelevant layers and unfreezing the target attention head layer, used to reduce training resource consumption and preserve the model's generalization ability.

[0027] In this embodiment, the user query first inputs a large language model to generate an initial answer, which is then semantically segmented into multiple independent fact units. Each fact unit is matched with a node in the knowledge graph. If the matching degree is lower than a threshold, the incremental learning module is triggered to crawl the latest information from a preset data source (such as an official website), extract new knowledge, and update the knowledge graph. The updated knowledge graph generates adversarial samples, which are used to backpropagate and optimize the error-related attention head layer in the large language model, ultimately generating a corrected answer. For example, when a user asks "current mortgage interest rate," if the initial answer is based on outdated knowledge, the system updates the knowledge graph by matching it with the latest policy documents and only adjusts the layer in the model that processes interest rate-related parameters, quickly outputting the correct result.

[0028] In this embodiment, a confidence-driven incremental learning mechanism supplements only necessary knowledge rather than reconstructing the entire knowledge graph. Simultaneously, local parameter optimization avoids full model adjustments, significantly reducing resource consumption while maintaining accuracy. For example, existing technologies require manual review of all data to update the knowledge graph, while this solution shortens the knowledge update cycle through automated crawling and structured extraction. Thus, when a user queries for time-sensitive knowledge, this application can quickly identify low-confidence portions in the answer, update the knowledge graph accordingly, and optimize model parameters specifically, thereby improving answer accuracy and response efficiency. Furthermore, local parameter optimization avoids the waste of computational resources associated with full model training, ensuring efficient system operation even in resource-constrained scenarios.

[0029] In one feasible implementation, refer to Figure 2Step S100 includes steps S110 to S130, wherein: Step S110: Receive the user query data; Step S120: Input the user query data into the large language model, and encode it through the semantic understanding layer of the large language model to generate preliminary semantic representation data; Step S130: Based on the preliminary semantic representation data, text generation processing is performed through the decoder layer of the large language model to generate the preliminary answer data.

[0030] In this embodiment, user query data refers to the consultation content input by the user through natural language, which can be collected using a text input box or a speech-to-text interface to trigger the response process of the intelligent customer service system. The large language model refers to a pre-trained language model with a multi-layer neural network structure, specifically implemented using a Transformer-based model, used to perform semantic understanding and text generation tasks. The semantic understanding layer is the network layer in the model responsible for extracting semantic features, specifically using a self-attention mechanism to perform contextual analysis on the input sequence, transforming discrete words into continuous vector representations. Encoding processing refers to the process of converting the original text into a machine-processable numerical representation, specifically implemented by superimposing a word embedding layer and a positional encoding layer, used to capture deep semantic information of sentences. Preliminary semantic representation data refers to the multi-dimensional vector set formed after encoding processing, specifically stored in the form of a floating-point matrix, serving as input conditions for subsequent generation steps. The decoder layer is the network module in the model responsible for generating output word by word, specifically implemented using an autoregressive mechanism combined with masked attention, used to generate coherent text according to the probability distribution of semantic vectors. Text generation processing refers to the process of generating natural language sequences based on semantic vectors. Specifically, a beam search algorithm can be used to control the generation path and balance the diversity and accuracy of the generated results.

[0031] In this embodiment, user query data is first transmitted to the input of the large language model. In the semantic understanding layer, each word is converted into a high-dimensional vector through word embedding. Then, a multi-layer self-attention mechanism is used to calculate the association weights between words, forming a set of semantic vectors containing contextual information. This vector set is then passed to the decoder layer, where it interacts with historical generation results through a cross-attention mechanism to progressively predict the probability distribution of the next output word. Finally, a complete preliminary response text is generated through a greedy search or temperature sampling strategy. During this process, the semantic vectors established in the encoding stage effectively represent the user's intent, while the step-by-step generation mechanism in the decoding stage ensures the grammatical correctness of the output statement.

[0032] Understandably, existing technologies typically pass user input directly to a language model for end-to-end generation, lacking separate control over semantic understanding and text generation. Furthermore, the quality of intermediate semantic representations is difficult to trace during generation, leading to a high risk of error propagation. This application, however, explicitly separates the encoding and decoding stages, allowing the semantic understanding process to be independently monitored and optimized. Simultaneously, a structured processing flow enhances the interpretability of the generation process, enabling refined processing of user queries. The phased encoding and decoding mechanism reduces the impact of semantic understanding biases on the final output. Explicit generation of semantic representation data provides analyzable intermediate results for subsequent knowledge graph verification, while the modular processing flow allows the system to independently optimize encoding quality or generation strategies, effectively improving the accuracy and controllability of intelligent customer service responses.

[0033] In one feasible implementation, refer to Figure 3 Step S200 includes steps S210 to S230, wherein: Step S210: Preprocess the preliminary response data to remove redundant information and noise, and generate purified preliminary response data; Step S220: Perform syntactic parsing on the purified preliminary response data and segment it into multiple semantic fragment data; Step S230: Identify key entities and relationships from multiple semantic fragment data, extract the key fact points, and assemble them to generate the atomic fact unit data.

[0034] In this embodiment, preprocessing refers to filtering irrelevant characters and duplicate content using text cleaning techniques, specifically regular expression matching or stop word filtering, to eliminate data noise interference with subsequent processing. Syntax parsing involves decomposing the sentence structure based on dependency parsing or constituent parsing, specifically using tools like the Stanford parser or spaCy, to break down complex sentences into independent semantic units. Key entity and relation identification refers to locating core elements in the text using named entity recognition and relation extraction techniques, specifically using BERT-based sequence labeling models or graph neural networks, to extract verifiable factual elements from semantic fragments.

[0035] In this embodiment, the initial response data, after preprocessing, is segmented into multiple semantic fragments through syntactic parsing, with each fragment corresponding to an independent factual expression unit. The key entity and relationship identification module performs structured analysis on each semantic fragment, extracting entities with clear semantic orientations and their associated relationships, and finally assembling the discrete factual elements into independently verifiable atomic factual units. For example, in an intelligent customer service scenario, when a user inquires about product warranty policies, the response generated by the large language model may contain multiple clauses. Semantic segmentation can decompose these different clauses into independent factual units, which are then verified separately using a knowledge graph.

[0036] In this embodiment, the proposed solution achieves fine-grained decomposition of complex answers through semantic segmentation and atomic fact unit generation. This allows knowledge verification to focus on independent fact elements, significantly improving the accuracy of error detection. Simultaneously, the structured fact unit generation mechanism provides a standardized input format for subsequent knowledge graph matching, avoiding the efficiency loss associated with unstructured text matching. It also solves the problem of ambiguous error localization caused by overall verification in traditional methods. Fine-grained knowledge verification is achieved through the atomic fact unit generation mechanism, ensuring the independent verifiability of each fact element. In intelligent customer service scenarios, this solution can accurately identify local errors in answers generated by large language models, preventing error information from being missed during overall verification. Furthermore, it provides accurate error correction samples for subsequent incremental learning of the knowledge graph and model optimization.

[0037] In one feasible implementation, refer to Figure 4 Step S300 includes steps S310 to S320, wherein: Step S310: Map the atomic fact unit data to the nodes of the knowledge graph, process it through a subgraph matching algorithm, and generate matching result data; Step S320: Based on the matching result data, calculate the association strength value between nodes, and combine the source label and time label of the nodes in the knowledge graph to generate the confidence data through a weighted average algorithm.

[0038] In this embodiment, the subgraph matching algorithm refers to a matching method based on graph structure similarity. Specifically, it can be implemented using the VF2 algorithm or the path query function built into the Neo4j graph database, used to locate the set of nodes that have topological relationships with atomic fact units in the knowledge graph. The node association strength value refers to the degree of relationship quantified by edge weights or co-occurrence frequency, specifically using cosine similarity or Jaccard coefficient to calculate the semantic association degree between entities. The source tag refers to the credibility level of the knowledge node acquisition channel, specifically using authoritative institution identifiers or data source type classifiers for labeling. The timeliness tag refers to a dynamic parameter recording the update time of the knowledge node, specifically using timestamp labeling or a sliding window decay function for dynamic weight adjustment.

[0039] In this embodiment, after the atomic fact unit is mapped to a knowledge graph node, the subgraph matching algorithm traverses the knowledge graph nodes that are directly or indirectly related to the atomic fact, generating a matching subgraph containing entities, attributes, and relationships. The association strength value between nodes is calculated by analyzing the weight distribution and path length of the edges in the matching subgraph; for example, frequently co-occurring entity pairs have higher association strength. Source tags and timeliness tags correct the matching results from the dimensions of data authority and time validity, respectively; for example, nodes from official websites have higher credibility than social media nodes, and nodes updated in the last three months have better timeliness than historical data nodes. The weighted average algorithm merges the values ​​of association strength, source credibility, and timeliness according to a preset ratio to generate a comprehensive confidence assessment value.

[0040] In this embodiment, the proposed solution captures complex semantic relationships through a subgraph matching algorithm and calculates confidence levels using multi-dimensional dynamic weights. This allows the knowledge verification process to dynamically reflect changes in the external environment, avoiding misjudgments caused by single-dimensional evaluation. Thus, this application can dynamically assess the matching reliability between nodes in the knowledge graph and user queries, accurately identify semantic units requiring correction in scenarios with frequent knowledge updates, and provide precise triggering conditions for subsequent incremental learning, thereby reducing the frequency of manual intervention and improving error correction efficiency.

[0041] In one feasible implementation, refer to Figure 5 Step S400 includes steps S410 to S450, wherein: Step S410: When the confidence data is lower than the preset threshold, the activation control module outputs a trigger signal; Step S420: Based on the trigger signal, start the knowledge graph incremental learning module and crawl the external data source data in a targeted manner based on the preset crawling strategy; Step S430: Perform entity linking processing on the external data source data and extract the new knowledge unit; Step S440: The new knowledge unit is fused with the knowledge graph node to update the knowledge graph structure; Step S450: Based on the new knowledge unit, construct adversarial samples and generate the error correction sample data.

[0042] In this embodiment, the preset crawling strategy refers to pre-defined data source filtering rules. Specifically, it can employ a whitelist mechanism that includes official websites and academic journals, and set time-based filtering conditions to exclude data that exceeds a preset time limit, thereby ensuring the authority and timeliness of external data. Entity linking processing refers to associating entities in external data with existing nodes in the knowledge graph. Specifically, it can use alignment algorithms based on semantic similarity, such as using word vectors to calculate the cosine similarity between entities to achieve accurate matching. Adversarial sample construction refers to generating training data by replacing or perturbing key elements in new knowledge units. Specifically, it can employ adversarial generative networks or rule templates to inject error patterns to enhance the model's ability to identify erroneous knowledge.

[0043] In this embodiment, when the system detects that the confidence level of the initial response is below a threshold, the control module automatically triggers the incremental learning process. The incremental learning module accesses trusted data sources according to a preset strategy, such as prioritizing the crawling of the latest policy documents published on the official website while filtering out historical data from a year ago. After entity linking processing, the crawled data extracts new knowledge units that conflict with or complement the current knowledge graph. For example, in a financial customer service scenario, if the knowledge graph does not contain the latest loan interest rate information, the incremental learning module can crawl the latest announcements from the central bank's official website and extract interest rate values ​​as new nodes. After the new nodes are inserted into the knowledge graph using a graph structure fusion algorithm, the system automatically generates adversarial examples containing a comparison between incorrect and correct interest rates for subsequent model optimization.

[0044] In this embodiment, automated targeted crawling is achieved through a preset strategy, combined with a time-sensitive filtering mechanism to ensure data freshness. Simultaneously, adversarial example construction techniques are used to transform knowledge updates into trainable error-correcting data, avoiding the manual labor required for full data annotation. Furthermore, this solution achieves dynamic updates through incremental learning, ensuring service continuity. Thus, this application realizes real-time dynamic updates of the knowledge graph and automated generation of error-correcting samples, solving the problem of incorrect responses caused by outdated knowledge in traditional intelligent customer service. Targeted crawling and time-sensitive filtering effectively improve the accuracy of external knowledge acquisition; entity linking and adversarial example construction transform knowledge updates into training data understandable to the model, avoiding the waste of resources from retraining the entire model, and reducing system maintenance costs while ensuring semantic recognition accuracy.

[0045] In one feasible implementation, the preset crawling strategy includes: filtering a preset list of data sources; the preset list of data sources includes official websites and academic journals; filtering data information in the list of data sources that exceeds a preset duration, and using the filtered data information as the external data source data.

[0046] In this embodiment, the preset data source list refers to a pre-defined set of trustworthy data sources. Specifically, it can be selected using manual annotation or automated evaluation to ensure authoritative and stable data sources, such as official websites and academic journal websites. Its purpose is to ensure the high reliability of the knowledge units acquired by the incremental learning module. The preset duration refers to a time threshold for data validity, which can be set using a dynamic time window algorithm, for example, three years or adjusted according to the domain knowledge update cycle. Its purpose is to eliminate interference from outdated data on knowledge graph updates and ensure the timeliness of newly added knowledge.

[0047] In this embodiment, when insufficient confidence is detected during knowledge graph matching, the incremental learning module crawls authoritative data sources such as official websites and academic journals based on a preset data source list, avoiding the acquisition of noisy data from low-confidence websites. Subsequently, a preset time-duration filtering mechanism is used to remove outdated information that has been published for more than three years or other set thresholds, retaining only data content that meets the timeliness requirements as external data source data. This ensures that the newly extracted knowledge units can meet both accuracy requirements and reflect the latest knowledge dynamics.

[0048] In this embodiment, the solution effectively improves the accuracy of external data collection and reduces resource consumption caused by invalid data processing by limiting the data source type and timeliness conditions. It solves the problems of uncontrollable data source quality and insufficient knowledge timeliness in incremental learning of knowledge graphs. By collecting authoritative data sources in a targeted manner and filtering outdated information, it ensures the accuracy and real-time nature of newly added knowledge units, thereby improving the efficiency and reliability of knowledge graph updates and reducing the waste of storage and computing resources.

[0049] In one feasible implementation, refer to Figure 6 Step S500 includes steps S510 to S530, wherein: Step S510: Input the error correction sample data into the large language model and activate the local attention head layer; Step S520: Unfreeze only the parameters of the local attention head layer, optimize the parameters through the backpropagation algorithm, and generate the optimized large language model data; Step S530: Based on the optimized large language model data, reprocess the user query data to generate the corrected answer data.

[0050] In this embodiment, the local attention head layer refers to the attention mechanism component in the large language model responsible for handling specific semantic associations. Specifically, it can be implemented using the attention head layer related to erroneous knowledge points in the pre-trained model, achieving targeted parameter adjustment by locating the attention region associated with the error. Unfreezing parameters refers to releasing the frozen state of parameters of a specific network layer during model training. This can be achieved by modifying the model parameter update flag, allowing only the weights of the local attention head layer to participate in backpropagation calculations. The backpropagation algorithm is an optimization method for adjusting neural network parameters based on the gradient descent principle. Specifically, it can use the chain rule to calculate the partial derivative of the loss function with respect to the parameters of the local attention head layer, achieving iterative parameter updates.

[0051] In this embodiment, after the error-correcting sample data is input into the large language model, the model activates the corresponding local attention head layer based on the erroneous knowledge points in the sample. For example, if the sample involves an error in product pricing, the attention head layer related to numerical reasoning is activated. Subsequently, only the parameters of this attention head layer are unfrozen, while the other model parameters remain frozen. The loss gradient of the error-correcting sample is calculated using the backpropagation algorithm, and only the weight matrix of the local attention head layer is updated. When the optimized model processes the original user query, it uses the adjusted attention head layer to regenerate the semantic representation and correct the output content related to the erroneous knowledge points, such as updating the expired product price to the latest value.

[0052] Compared to existing technologies, traditional methods require a full parameter update of the entire model during error correction, resulting in high computational resource consumption and potentially damaging the model's original generalization ability. Our proposed solution, however, optimizes local parameters, making targeted adjustments only to the error-related attention head layer. This reduces computational overhead and avoids global parameter perturbations. Thus, this application enables dynamic error correction of large language models with low resource consumption, quickly correcting erroneous outputs of specific knowledge points while maintaining overall model stability. For example, in customer service scenarios, it allows for timely updates of product specifications or policy changes, while avoiding response delays caused by retraining the entire model.

[0053] In one feasible implementation, unfreezing only the parameters of the local attention head layer includes: identifying erroneous knowledge point keywords in the error correction sample data; mapping the erroneous knowledge point keywords to a specific attention head layer of the large language model; and optimizing the parameters of the specific attention head layer using a gradient descent algorithm to avoid full model optimization.

[0054] In this embodiment, the erroneous knowledge point keywords refer to the core entities or relationships that lead to incorrect answers. Specifically, this can be achieved using named entity recognition and dependency parsing techniques from natural language processing, used to locate the knowledge units that need correction. The specific attention head layer refers to the neural network layer in the large language model responsible for processing specific semantic patterns. This can be located using visualization tools for attention mechanisms, used to accurately pinpoint the model structure related to the erroneous knowledge points. The gradient descent algorithm is a mathematical method that iteratively optimizes the parameters by calculating the partial derivatives of the loss function. Specifically, it can be implemented using stochastic gradient descent or adaptive learning rate algorithms, used to adjust the weight parameters of a specific layer.

[0055] In this embodiment, when the confidence level of the knowledge graph match is detected to be lower than a threshold, the erroneous knowledge point keywords in the error correction sample data are extracted and input into the large language model. By analyzing the propagation path of the keywords in the model, the associated attention head layer is determined. Subsequently, backpropagation calculation is performed only for the parameters of this layer to update the weights and correct the generation logic of the erroneous knowledge points, while the parameters of other layers remain frozen. For example, if the error involves "product warranty period," the system identifies the attention head layer corresponding to this keyword and adjusts the parameters of this layer through local gradient descent, so that the model correctly references the updated data in the knowledge graph in subsequent answers.

[0056] In this embodiment, the solution optimizes local parameters and adjusts only the error-related structure, avoiding the negative impact of global training. This significantly reduces the computational resources required for model optimization while maintaining the stability of the original semantic understanding capability. This enables the intelligent customer service system to achieve efficient error correction in dynamic knowledge update scenarios without service interruption or response delay due to frequent training.

[0057] In one feasible implementation, the method further includes: outputting the corrected answer data to the user interface and receiving user feedback data; adjusting the weight values ​​of nodes in the knowledge graph based on the user feedback data to generate reinforced knowledge graph data; and returning to execute the step of matching the atomic fact unit data with nodes in the knowledge graph and calculating confidence data based on node correlation and data timeliness based on the reinforced knowledge graph data.

[0058] In this embodiment, user feedback data refers to the user's acceptance of the corrected answer or their suggestions for improvement. This can be achieved through click feedback, rating input, or text comments, reflecting the accuracy of relevant nodes in the knowledge graph. Adjusting node weights refers to dynamically changing the influence coefficient of nodes in the knowledge graph during matching calculations based on feedback data. This can be implemented using a linear weighted algorithm based on feedback intensity, ensuring that frequently corrected nodes receive more stringent confidence assessments in subsequent matches. Generating enhanced knowledge graph data involves embedding the adjusted weights into the graph structure to form a new version of the graph. This can be implemented using an incremental graph database update protocol, ensuring real-time optimization of the knowledge graph. Returning to perform matching processing involves re-verifying the facts using the updated graph weights. This can be implemented using a subgraph matching algorithm with weight constraints, making the confidence calculation more aligned with practical application scenarios.

[0059] In this embodiment, after the corrected answer is displayed on the user interface, the system continuously monitors user interaction. When it detects that a user has rated the answer or triggered a re-question, feedback data is collected and transmitted to the knowledge graph management module. This module analyzes the key entities in the feedback data and their associated nodes with the corrected answer, reducing the matching priority of the erroneous nodes through a weight decay function. For example, when a user corrects an answer involving a product parameter multiple times, the timeliness weight of that parameter node in the knowledge graph is dynamically lowered, and the system will prioritize matching nodes with more recent updates in subsequent matching processes. The updated knowledge graph takes effect immediately, and the atomic fact units automatically use the new weight coefficients for confidence evaluation in the next matching calculation, forming a closed-loop optimization mechanism.

[0060] In some specific implementations, user feedback data can be collected in real time using event tracking technology. The weight adjustment module can be set with a decay coefficient ranging from 0.1 to 0.3, a dynamic value automatically calculated based on the feedback frequency. Enhanced knowledge graph data generation can employ a graph database version control mechanism, retaining historical versions for rollback after each update.

[0061] Compared to existing technologies, current intelligent customer service systems typically only record error cases after receiving user feedback. The node weights of the knowledge graph require manual adjustment, necessitating retraining of the entire model after adjustment. This solution, however, establishes an automatic mapping relationship between feedback data and knowledge graph nodes, enabling dynamic adjustment and real-time application of weight values. This avoids the lag of manual intervention and significantly reduces computational resource consumption by replacing full model retraining with local optimization. Through this technical solution, this application can continuously optimize the matching logic of the knowledge graph based on actual user interaction data, improving the accuracy of the fact verification process. The dynamic weight adjustment mechanism allows the knowledge graph to quickly adapt to changes in domain knowledge, and the closed-loop optimization process effectively shortens system response time, reducing operational costs while maintaining semantic recognition accuracy.

[0062] In the embodiments of this application, the intelligent customer service semantic recognition and error correction method based on the linkage of large language model and knowledge graph generates an initial answer through large language model and then combines it with knowledge graph for confidence verification, dynamically updates the knowledge graph and locally optimizes model parameters. This solves the problems of lagging knowledge updates and high consumption of full model training resources in traditional methods, and can improve the accuracy of answers. In addition, it can also realize dynamic knowledge updates, reduce the cost of manual intervention and optimize model training efficiency.

[0063] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs. Any simple modifications based on this technical concept are within the protection scope of this application.

[0064] This application also provides an intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph, referencing... Figure 7 The intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph includes: a memory 10, a processor 20, and an intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph, which is stored on the memory 10 and can run on the processor 20. The intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph is configured to implement the steps of the intelligent customer service semantic recognition and error correction method based on the linkage of a large language model and a knowledge graph.

[0065] The intelligent customer service semantic recognition and correction system based on the linkage of a large language model and a knowledge graph provided in this application adopts the intelligent customer service semantic recognition and correction method based on the linkage of a large language model and a knowledge graph in the above embodiments, which can improve the accuracy of intelligent customer service responses. Compared with the prior art, the beneficial effects of the intelligent customer service semantic recognition and correction system based on the linkage of a large language model and a knowledge graph provided in this application are the same as the beneficial effects of the intelligent customer service semantic recognition and correction method based on the linkage of a large language model and a knowledge graph provided in the above embodiments, and other technical features of the intelligent customer service semantic recognition and correction system based on the linkage of a large language model and a knowledge graph are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0066] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0067] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. All equivalent structural transformations made under the technical concept of this application using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the scope of patent protection of this application.

Claims

1. A method for intelligent customer service semantic recognition and error correction based on the linkage of large language models and knowledge graphs, characterized in that, The method includes: Receive user query data and process the user query data through a large language model to generate preliminary answer data; The preliminary response data is semantically segmented to extract key fact points and generate atomic fact unit data. The atomic fact unit data is matched with nodes in the knowledge graph, and confidence data is calculated based on the matching results. When the confidence data is lower than a preset threshold, the knowledge graph incremental learning module is activated to crawl data from external data sources and extract new knowledge units. Based on the new knowledge units, the knowledge graph nodes are updated and error correction sample data is generated. The error correction sample data is used to perform local parameter optimization on the large language model to generate optimized large language model data, and based on the optimized large language model data, corrected answer data is generated.

2. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 1, characterized in that, The steps of receiving user query data, processing the user query data through a large language model, and generating preliminary answer data include: Receive the user query data; The user query data is input into the large language model, and encoded through the semantic understanding layer of the large language model to generate preliminary semantic representation data; Based on the preliminary semantic representation data, text generation processing is performed through the decoder layer of the large language model to generate the preliminary answer data.

3. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 1, characterized in that, The steps of semantic segmentation of the preliminary response data, extracting key fact points, and generating atomic fact unit data include: The preliminary response data is preprocessed to remove redundant information and noise, generating purified preliminary response data; The purified preliminary response data is subjected to syntactic parsing and segmented into multiple semantic fragment data. Key entities and relationships are identified from multiple semantic fragment data, key fact points are extracted, and atomic fact unit data is generated by assembling them.

4. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 1, characterized in that, The steps of matching the atomic fact unit data with nodes in the knowledge graph and calculating confidence data based on the matching results include: The atomic fact unit data is mapped to the nodes of the knowledge graph, and then processed by a subgraph matching algorithm to generate matching result data. Based on the matching result data, the correlation strength value between nodes is calculated, and the confidence data is generated by combining the source label and time label of the nodes in the knowledge graph through a weighted average algorithm.

5. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 1, characterized in that, When the confidence data is lower than a preset threshold, the steps of starting the knowledge graph incremental learning module to crawl external data sources and extract new knowledge units, updating knowledge graph nodes based on the new knowledge units, and generating error correction sample data include: When the confidence level data is lower than the preset threshold, the activation control module outputs a trigger signal; Based on the trigger signal, the knowledge graph incremental learning module is activated, and based on the preset crawling strategy, the external data source data is crawled in a targeted manner. The external data source data is processed by entity linking to extract the new knowledge units; The new knowledge unit is fused with the knowledge graph node to update the knowledge graph structure; Based on the new knowledge unit, adversarial samples are constructed to generate the error correction sample data.

6. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 5, characterized in that, The preset crawling strategy includes: Filter the preset data source list; the preset data source list includes official websites and academic journals; Data exceeding a preset duration is filtered from the data source list, and the filtered data is used as the external data source data.

7. The intelligent customer service semantic recognition and error correction method based on the linkage of large language models and knowledge graphs as described in claim 1, characterized in that, The steps of optimizing the local parameters of the large language model using the error-correction sample data to generate optimized large language model data, and generating corrected answer data based on the optimized large language model data, include: The error-correcting sample data is input into the large language model to activate the local attention head layer; Only the parameters of the local attention head layer are unfrozen, and the parameters are optimized using the backpropagation algorithm to generate the optimized large language model data; Based on the optimized large language model data, the user query data is reprocessed to generate the corrected answer data.

8. The intelligent customer service semantic recognition and error correction method based on the linkage of large language model and knowledge graph as described in claim 7, characterized in that, The parameters for unfreezing only the local attention head layer include: Identify the keywords of erroneous knowledge points in the error correction sample data; Map the erroneous knowledge point keywords to a specific attention head layer of the large language model; The parameters of the specific attention head layer are optimized using the gradient descent algorithm to avoid full model optimization.

9. The intelligent customer service semantic recognition and error correction method based on the linkage of large language model and knowledge graph as described in claim 1, characterized in that, The method further includes: Output the corrected answer data to the user interface and receive user feedback data; Based on the user feedback data, the weight values ​​of the nodes in the knowledge graph are adjusted to generate reinforced knowledge graph data. Based on the reinforced knowledge graph data, the process of matching the atomic fact unit data with the nodes in the knowledge graph and calculating the confidence data based on the node correlation and data timeliness is returned.

10. An intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph, characterized in that, The intelligent customer service semantic recognition and error correction system based on the linkage of a large language model and a knowledge graph includes: a memory, a processor, and an intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph, which is stored in the memory and can run on the processor. The intelligent customer service semantic recognition and error correction program based on the linkage of a large language model and a knowledge graph is configured to implement the steps of the intelligent customer service semantic recognition and error correction method based on the linkage of a large language model and a knowledge graph as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Intelligent question and answer implementation method and system based on large model and semantic map

    CN117271724A

  • Cross-domain heterogeneous data query system and method based on large model and knowledge graph

    CN120705262A

  • Government affair digital human dynamic interaction method and system based on multi-modal large model

    CN120821813A

Cited By

  • AI multi-mode private domain knowledge base and agent management method and system

    CN122285919A