Knowledge query method, device, medium and program product in customer service dialogue process

By generating real-time dialogue sequences and scoring concatenated segments, and using a large language model to generate standard questions, the problem of difficulty in recognizing customer intent in customer service systems was solved, enabling efficient and accurate knowledge retrieval and meeting real-time service needs.

CN123138366APending Publication Date: 2026-11-20INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611101223.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing customer service systems struggle to accurately identify customer intent when handling conversational and fragmented dialogues, resulting in low accuracy and efficiency of knowledge retrieval results, and failing to meet real-time service needs.

Method used

By generating real-time dialogue sequences, splicing paragraphs and scoring business relevance, standard questions are generated using a large language model, business knowledge is directly retrieved from the enterprise knowledge base, and dialogue noise is removed, thereby improving the accuracy and efficiency of semantic judgment.

Benefits of technology

It enables efficient knowledge retrieval during customer service conversations without requiring agents to manually extract intent, reducing the time spent on business knowledge retrieval, improving the accuracy and relevance of standard questions, and increasing the recall and accuracy of knowledge retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138366A_ABST
    Figure CN123138366A_ABST
Patent Text Reader

Abstract

The application discloses a kind of knowledge query methods, equipment, medium and program product in customer service dialogue process.The method comprises: in the dialogue process of the agent and customer, generate real-time dialogue sequence, and generate corresponding splicing paragraph for each dialogue sentence in real-time dialogue sequence;According to each splicing paragraph, obtain the business relevance score of each dialogue sentence, and according to the business relevance score of each dialogue sentence, extract core business sentence sequence in real-time dialogue sequence;According to core business sentence sequence, generate prompt word, and input prompt word into pre-trained large language model, obtain the target standard question output by large language model;According to target standard question, search in enterprise knowledge base, and send the business knowledge obtained by searching to the agent.The above technical scheme can accurately identify customer intent and generate standard question, and based on standard question, high matching degree of business knowledge can be directly searched and obtained, so as to effectively improve customer service dialogue efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and big data technology, and in particular to knowledge retrieval methods, devices, media, and program products in customer service dialogue processes. Background Technology

[0002] As enterprises continuously improve their digital service levels, the scale of service requests handled by online customer service, including business inquiries, after-sales guidance, and complaint handling, is constantly expanding. The efficiency and standardization of agent responses directly determine customer experience and service operation quality. However, customers' daily expressions are generally characterized by being conversational, fragmented, and highly redundant. Furthermore, conversations often include non-business content such as greetings, emotional expressions, and repeated confirmations. Manually extracting core requests and searching the knowledge base is cumbersome and time-consuming for agents, making it difficult to meet the efficiency requirements of real-time service.

[0003] In existing technologies, the general approach is to first extract keywords and classify intents based on customer descriptions, or extract questions based on a general model. Then, based on the obtained keywords, intents, or extracted questions, a query is performed in an enterprise-level knowledge base, and the relevant knowledge is sent to the agent.

[0004] However, keyword extraction often suffers from severe semantic loss and cannot handle colloquial and long conversations, resulting in low accuracy of query results. Intent classification methods can only identify a limited number of predefined intent categories, and have low accuracy in identifying newly emerging business or complex mixed intents. Furthermore, they can only output category labels, requiring agents to manually convert the labels into query statements, which is difficult to meet the requirements of real-time performance and high efficiency. Questions extracted from general large models may not correspond to the enterprise's business knowledge, and colloquial expressions often contain a lot of noise, making it difficult for the generated questions to accurately match customer intents. The recall and accuracy of knowledge retrieval are both insufficient to meet actual business needs. Summary of the Invention

[0005] This invention provides a knowledge retrieval method, device, medium, and program product for customer service dialogue processes. It can accurately identify customer intent and generate standard questions. Based on the standard questions, highly matching business knowledge can be directly retrieved, thereby effectively improving the efficiency of customer service dialogues.

[0006] According to one aspect of the present invention, a knowledge retrieval method is provided during a customer service dialogue process, comprising: During the dialogue between the agent and the customer, a real-time dialogue sequence is generated, and corresponding spliced ​​segments are generated for each dialogue statement in the real-time dialogue sequence. Based on each concatenated segment, obtain the business relevance score of each dialogue statement, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement. Based on the core business statement sequence, generate prompt words and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; Based on the target standard question, a search is performed in the enterprise knowledge base, and the retrieved business knowledge is sent to the agent.

[0007] Optionally, during the conversation between the agent and the customer, a real-time dialogue sequence is generated, and corresponding concatenated segments are generated for each dialogue statement in the real-time dialogue sequence, including: During the conversation between the agent and the customer, the conversation text is extracted and divided into sentences to obtain multiple conversation sentences and the sending time and sending role of each conversation sentence. The dialogue statements are sorted according to their sending time to generate a real-time dialogue sequence; Each dialogue statement in the real-time dialogue sequence is taken as the target statement in turn. The target statement is concatenated with the adjacent statements before and after it to generate a concatenated paragraph corresponding to the target statement. The round position code and the sending role of each dialogue statement are injected into the concatenated paragraph.

[0008] The advantages of this setup are: it changes the traditional single-sentence judgment mode, introduces the context of the target sentence, and allows the model to judge the business value of the sentence in combination with the context of the dialogue, avoiding misjudgment caused by looking at the sentence in isolation; by embedding the sending role, it is easier for the model to distinguish the speech patterns and noise features of different roles, thereby improving the accuracy of noise recognition; by embedding the round position code, it can strengthen the understanding of the dialogue context and improve the accuracy of semantic judgment.

[0009] Optionally, based on each concatenated segment, a business relevance score is obtained for each dialogue statement, and based on the business relevance score of each dialogue statement, a core business statement sequence is extracted from the real-time dialogue sequence, including: Each concatenated segment is sent to a pre-trained scoring model, and the score output by the scoring model is used as the business relevance score of the corresponding dialogue statement of the concatenated segment. Based on the business relevance score of each dialogue statement, dialogue statements that exceed the currently set first threshold are identified as candidate statements, and sentence vectors for each candidate statement are generated. Based on the sequential relationship of each candidate statement in the real-time dialogue sequence, calculate the sentence vector similarity between each candidate statement and its adjacent candidate statements, and perform any of the following: If the sentence vector similarity between a candidate statement and its adjacent candidate statements is less than the second threshold, then the candidate statement is retained. If the sentence vector similarity between a candidate statement and its adjacent candidate statements is greater than or equal to the second threshold, then the confidence scores of the candidate statement and its adjacent candidate statements are calculated respectively, and the candidate statement with the higher confidence score is retained. All the remaining candidate statements are sorted by sending time to form a core business statement sequence.

[0010] The advantage of this setup is that, through two-level filtering of business relevance scoring and confidence levels, it can compress the text length of the input to the large language model while ensuring effective business information, thereby improving the inference efficiency of the large model.

[0011] Optionally, before generating a real-time dialogue sequence during the conversation between the agent and the customer, the following steps are also included: Obtain multiple historical dialogue statements and determine whether each historical dialogue statement matches any noise type. If so, mark the historical dialogue statement as the lowest score; If not, mark the historical dialogue statement as the highest score; In each historical dialogue statement that has been marked with a score, multiple paragraph samples are constructed using a sliding window, and the target loss function is determined based on the proportion of the historical dialogue statement with the lowest score in all historical dialogue statements. The paragraph samples are input into the initial scoring model in a random order, and the scoring model is trained based on the target loss function and adversarial training.

[0012] The advantages of this setup are: it can specifically address the distribution problem of low noise sample proportion in customer service dialogues, strengthen the model's ability to identify minority class noise and difficult-to-distinguish noise, and improve the model's tolerance to colloquial expressions, disordered word order, and non-standard expressions through adversarial training without adding additional labeled data, making it more suitable for the diverse expressions in real customer service scenarios. By inputting samples in shuffled order, it can prevent the model from speculatively learning positional patterns, ensuring that the model truly makes judgments based on semantic content, and improving the generality and scenario adaptability of the classification model.

[0013] Optionally, after training the scoring model based on the target loss function and adversarial training, the method further includes: Determine multiple initial thresholds, and based on the scoring model obtained from the current training, determine the F1 score corresponding to each initial threshold; The initial threshold with the highest F1 score is determined as the first threshold.

[0014] The advantage of this setting is that it automatically selects the first threshold with the best F1 score based on the scoring model trained on real business data, which makes the first threshold suitable for the current business scenario, achieves the best balance between precision and recall, and avoids the problem of poor adaptability of a single fixed threshold.

[0015] Optionally, before generating a real-time dialogue sequence during the conversation between the agent and the customer, the following steps are also included: Obtain multiple sets of historical dialogue records, generate historical dialogue sequences for each set of historical dialogue records, and extract the sequence of historical core business statements from each historical dialogue sequence. Based on the historical core business statement sequence, obtain customer intent fragments and agent response fragments, and match the customer intent fragments and agent response fragments to generate semantic units; Obtain the standard question corresponding to the semantic unit, and combine the customer intent fragment, the agent response fragment, and the standard question to form a training sample; The initial large language model is fine-tuned with all parameters based on each training sample to obtain the trained large language model.

[0016] The advantages of this setup are: the training input uses denoised text that is completely consistent with the online inference, avoiding the data distribution differences between training and inference, ensuring that the offline training effect of the model can be fully transferred to the online scenario, and the fine-tuning method of full parameter updates enables the large language model to fully learn the terminology system, expression habits and knowledge base specifications of the enterprise business domain, and the generated standard questions are more in line with the internal requirements of the enterprise.

[0017] Optionally, based on the historical core business statement sequence, customer intent fragments and agent response fragments are obtained, and the customer intent fragments and agent response fragments are matched to generate semantic units, including: Context encoding is performed on each historical statement in the historical core business statement sequence, and hierarchical density clustering is performed based on the context encoding of each historical statement. Customer intent fragments and agent response fragments are obtained based on the clustering results. The customer intent fragment and the agent response fragment are respectively dereferenced, and the dereferenced customer intent fragment and the agent response fragment are matched. A set of successfully matched customer intent fragments and agent response fragments is taken as a semantic unit.

[0018] The advantages of this setup are: segmenting segments by identifying semantic boundaries through hierarchical density clustering facilitates accurate segmentation of semantic units in complex intent scenarios; resolution of referential issues improves the accuracy of subsequent standard question mapping and ensures the semantic integrity of training samples, effectively enhancing the learning efficiency of large language models.

[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the knowledge query method in the customer service dialogue process described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the knowledge query method in the customer service dialogue process described in any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the knowledge query method in the customer service dialogue process described in any embodiment of the present invention.

[0022] The technical solution of this invention generates a real-time dialogue sequence during the dialogue between the agent and the customer, and generates corresponding spliced ​​segments for each dialogue statement in the real-time dialogue sequence; based on each spliced ​​segment, it obtains a business relevance score for each dialogue statement, and extracts a core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement; based on the core business statement sequence, it generates prompt words, and inputs the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; based on the target standard question, it retrieves the business knowledge in the enterprise knowledge base, and sends the retrieved business knowledge to the agent. This method eliminates the need for the agent to manually extract customer intent and input search terms, automatically pushing business knowledge to the agent, effectively reducing the time spent on business knowledge queries and shortening customer waiting time. Based on the method of first removing invalid noise content in the dialogue through noise reduction processing, and then obtaining the standard question based on the core business statements, it effectively avoids interference from irrelevant information, improves the accuracy and relevance of the standard question generation, and the generated standard question is more in line with the expression specifications of the enterprise knowledge base, which can more accurately hit the corresponding answer in the knowledge base, improving the recall and accuracy of knowledge retrieval.

[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart of a knowledge query method in a customer service dialogue process according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of another knowledge query method in a customer service dialogue process provided by Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a knowledge query device in a customer service dialogue process according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the knowledge query method in the customer service dialogue process according to an embodiment of the present invention. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] Example 1 Figure 1This is a flowchart illustrating a knowledge query method during a customer service conversation, as provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where business knowledge is automatically queried during a customer service conversation and sent to the agent for viewing. This method can be executed by a knowledge query device during the customer service conversation. This knowledge query device can be implemented in hardware and / or software and is generally configured in a computer or processor with data processing capabilities. Figure 1 As shown, the method includes: S110. During the dialogue between the agent and the customer, generate a real-time dialogue sequence and generate corresponding spliced ​​paragraphs for each dialogue statement in the real-time dialogue sequence.

[0029] Optionally, a real-time dialogue sequence refers to a set of dialogue statements arranged in chronological order during the communication between an agent and a customer.

[0030] Optionally, the present invention supports voice or text dialog box dialogues between customers and agents. In the case of voice dialogue, the voice stream can be converted into text through a voice transcription system, and then the text can be divided into multiple dialogue statements. In the case of text dialog box dialogue, the dialogue text can be directly obtained and divided into multiple dialogue statements.

[0031] Optionally, a concatenated segment refers to a text segment formed by concatenating the target dialogue statement to be judged with its adjacent dialogue statements in chronological order, and injecting round position encoding and sending role into each dialogue statement in the concatenated segment.

[0032] In an optional example, if the real-time dialogue sequence is represented as D_raw=[u1,u2,…,u…] n ], where u1, u2, ..., u n If there are n dialogue statements, then the concatenated paragraph can be represented as u. i-1 +u i +u i+1 u i For the target dialogue statement currently being processed in the real-time dialogue sequence, u i-1 with u i+1 u i The preceding and following dialogue statements.

[0033] During the dialogue between the agent and the customer, a real-time dialogue sequence is generated, and corresponding concatenated segments are generated for each dialogue statement in the real-time dialogue sequence, which may include: During the conversation between the agent and the customer, the conversation text is extracted and divided into sentences to obtain multiple conversation sentences and the sending time and sending role of each conversation sentence. The dialogue statements are sorted according to their sending time to generate a real-time dialogue sequence; Each dialogue statement in the real-time dialogue sequence is taken as the target statement in turn. The target statement is concatenated with the adjacent statements before and after it to generate a concatenated paragraph corresponding to the target statement. The round position code and the sending role of each dialogue statement are injected into the concatenated paragraph.

[0034] Optionally, if the customer service dialogue is a voice dialogue, the sending role of each dialogue statement can be identified by the source of the dialogue information, and the time when the voice is converted into text is determined as the sending time of the dialogue statement; if the customer service dialogue is a text dialog box dialogue, the sending time and the sending role are both known attributes of each dialogue statement.

[0035] Optionally, the sending role refers to the subject that sends the dialogue message, which can be a customer or an agent.

[0036] Optionally, the target sentence refers to the core statement currently being used to determine business relevance. Each statement in the real-time dialogue sequence is used as the target sentence in turn. The preceding and following statements of the target sentence in the dialogue sequence are concatenated in chronological order to obtain the concatenated paragraph corresponding to the target sentence.

[0037] Optionally, for the first and last sentences of a dialogue, special placeholders can be used to fill in the corresponding positions, or adjacent sentences on one side can be directly spliced ​​together.

[0038] Optionally, turn position encoding is used to identify the global turn position of the target sentence in the entire dialogue, so that the model can perceive the temporal logic of the dialogue.

[0039] The advantages of this setup are: it changes the traditional single-sentence judgment mode, introduces the context of the target sentence, and allows the model to judge the business value of the sentence in combination with the context of the dialogue, avoiding misjudgment caused by looking at the sentence in isolation; by embedding the sending role, it is easier for the model to distinguish the speech patterns and noise features of different roles, thereby improving the accuracy of noise recognition; by embedding the round position code, it can strengthen the understanding of the dialogue context and improve the accuracy of semantic judgment.

[0040] S120. Based on each spliced ​​segment, obtain the business relevance score of each dialogue statement, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement.

[0041] Optionally, each spliced ​​segment can be input into a pre-trained scoring model to obtain a business relevance score for the target sentence corresponding to each spliced ​​segment. The target sentence is the dialogue statement in the middle of the spliced ​​segment.

[0042] Optionally, the business relevance score is a value between 0 and 1, representing the degree of relevance between the dialogue statement and the core business requirements. The higher the score, the more effective business information the statement contains.

[0043] Optionally, based on the business relevance score, dialogue statements that are strongly related to core business needs can be identified as core business statements, and the core business statements can be arranged into a core business statement sequence according to their time sequence.

[0044] Optionally, the core business statement sequence refers to the set of dialogue statements that remain after removing non-business noise such as small talk, emotions, and repeated confirmations from the real-time dialogue sequence, containing only valid business information.

[0045] S130. Generate prompt words based on the core business statement sequence, and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model.

[0046] Optionally, core business statements can be filled into a preset prompt word template to generate prompt words. These prompt words can then be input into a large language model that has been pre-adjusted according to the enterprise's business situation. The large language model will then directly generate target standard questions that conform to the enterprise's knowledge base format specifications.

[0047] This process, before generating a real-time dialogue sequence during the conversation between the agent and the customer, may also include: Obtain multiple sets of historical dialogue records, generate historical dialogue sequences for each set of historical dialogue records, and extract the sequence of historical core business statements from each historical dialogue sequence. Based on the historical core business statement sequence, obtain customer intent fragments and agent response fragments, and match the customer intent fragments and agent response fragments to generate semantic units; Obtain the standard question corresponding to the semantic unit, and combine the customer intent fragment, the agent response fragment, and the standard question to form a training sample; The initial large language model is fine-tuned with all parameters based on each training sample to obtain the trained large language model.

[0048] Optionally, multiple complete historical customer service conversations can be obtained, and key information in each historical customer service conversation can be anonymized to obtain multiple sets of historical conversation records.

[0049] Optionally, historical dialogue records can be broken down sentence by sentence into multiple historical dialogue statements, and these statements can be arranged in chronological order to generate a historical dialogue sequence.

[0050] Optionally, during the training of the large language model, the method for extracting the historical core business statement sequence from the historical dialogue sequence is the same as the method for extracting the core business statement sequence from the real-time dialogue sequence in steps S110 and S120.

[0051] Optionally, the method for extracting the historical core business statement sequence from each historical dialogue sequence is as follows: Generate corresponding historical segments for each historical dialogue statement in the historical dialogue sequence; Based on each historical segment, obtain the business relevance score of each historical dialogue statement, and extract the sequence of historical core business statements from the historical dialogue sequence based on the business relevance score of each historical dialogue statement.

[0052] Optionally, a customer intent fragment refers to a complete fragment of a customer's request formed by aggregating multiple semantically related statements from the customer side, corresponding to an independent business inquiry or processing intent; a customer service response fragment refers to a collection of customer service responses corresponding to the customer intent fragment, including business answers, operation instructions, or information confirmations.

[0053] Optionally, each customer intent fragment should correspond to an agent response fragment, and the corresponding customer intent fragment and agent response fragment together form a semantic unit.

[0054] Optionally, the enterprise knowledge base stores multiple sets of question-answer pairs consisting of standard questions and business knowledge. Based on each semantic unit, the enterprise knowledge base can retrieve the standard question corresponding to that semantic unit.

[0055] Optionally, full parameter fine-tuning refers to updating all parameters of a large language model during training, thereby enabling the model to deeply learn domain knowledge and standardize its output. Compared to parameter efficient fine-tuning, it achieves better domain adaptation.

[0056] The advantages of this setup are: the training input uses denoised text that is completely consistent with the online inference, avoiding the data distribution differences between training and inference, ensuring that the offline training effect of the model can be fully transferred to the online scenario, and the fine-tuning method of full parameter updates enables the large language model to fully learn the terminology system, expression habits and knowledge base specifications of the enterprise business domain, and the generated standard questions are more in line with the internal requirements of the enterprise.

[0057] Specifically, based on the historical core business statement sequence, customer intent fragments and agent response fragments are obtained, and the customer intent fragments and agent response fragments are matched to generate semantic units, which may include: Context encoding is performed on each historical statement in the historical core business statement sequence, and hierarchical density clustering is performed based on the context encoding of each historical statement. Customer intent fragments and agent response fragments are obtained based on the clustering results. The customer intent fragment and the agent response fragment are respectively dereferenced, and the dereferenced customer intent fragment and the agent response fragment are matched. A set of successfully matched customer intent fragments and agent response fragments is taken as a semantic unit.

[0058] Optionally, context encoding refers to generating a semantic vector containing contextual information for each historical statement by combining the global context of the entire historical core business statement sequence.

[0059] Optionally, hierarchical density clustering is a density-based unsupervised clustering algorithm that can automatically discover clusters of arbitrary shapes without pre-specifying the number of clusters. It can automatically identify semantic block boundaries in dialogues and segment independent intent fragments.

[0060] Optionally, after context encoding each historical statement, sentence vectors containing contextual relationships can be obtained. Then, a hierarchical density clustering algorithm is applied to the sentence vector space. At the same time, combined with features such as dialogue time window, speech rate pauses, etc., the boundaries of semantic blocks are automatically identified, and continuous, highly semantically related statements are grouped into an independent segment. The segment is determined to belong to the customer intent segment or the agent response segment, as well as the specific intent of the segment.

[0061] Optionally, pronoun resolution refers to restoring pronouns in the dialogue, such as "it" and "this," to specific business entities, while supplementing omitted subjects and objects to make the semantics of the sentences complete and clear.

[0062] The advantages of this setup are: segmenting segments by identifying semantic boundaries through hierarchical density clustering facilitates accurate segmentation of semantic units in complex intent scenarios; resolution of referential issues improves the accuracy of subsequent standard question mapping and ensures the semantic integrity of training samples, effectively enhancing the learning efficiency of large language models.

[0063] S140. Based on the target standard question, search the enterprise knowledge base and send the retrieved business knowledge to the agent.

[0064] Optionally, the target standard question can be directly used as a search term to hit the corresponding question-answer pair in the knowledge base. The enterprise knowledge base is a standardized business knowledge warehouse pre-built by the enterprise, consisting of a large number of standard question-answer pairs, covering all service scenarios such as business consultation, after-sales processing, and complaint handling.

[0065] Optionally, the generated target standard question can be used as a search term, and the corresponding standard answer can be matched in the enterprise knowledge base through a semantic search engine. The standard answer can then be automatically pushed to the agent workbench so that the agent workbench can quickly respond to the customer based on the pushed standard answer.

[0066] The technical solution of this invention generates a real-time dialogue sequence during the dialogue between the agent and the customer, and generates corresponding spliced ​​segments for each dialogue statement in the real-time dialogue sequence; based on each spliced ​​segment, it obtains a business relevance score for each dialogue statement, and extracts a core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement; based on the core business statement sequence, it generates prompt words, and inputs the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; based on the target standard question, it retrieves the business knowledge in the enterprise knowledge base, and sends the retrieved business knowledge to the agent. This method eliminates the need for the agent to manually extract customer intent and input search terms, automatically pushing business knowledge to the agent, effectively reducing the time spent on business knowledge queries and shortening customer waiting time. Based on the method of first removing invalid noise content in the dialogue through noise reduction processing, and then obtaining the standard question based on the core business statements, it effectively avoids interference from irrelevant information, improves the accuracy and relevance of the standard question generation, and the generated standard question is more in line with the expression specifications of the enterprise knowledge base, which can more accurately hit the corresponding answer in the knowledge base, improving the recall and accuracy of knowledge retrieval.

[0067] Example 2 Figure 2 This is a flowchart illustrating a knowledge query method during a customer service dialogue process, provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifically describes the method for generating core statement sequences and a scoring model. Figure 2 As shown, the method includes: S210. During the conversation between the agent and the customer, extract the conversation text, divide the conversation text into sentences, and obtain multiple conversation sentences as well as the sending time and sending role of each conversation sentence.

[0068] S220. Sort each dialogue statement according to its sending time to generate a real-time dialogue sequence.

[0069] S230. Take each dialogue statement in the real-time dialogue sequence as the target statement in turn, concatenate the target statement with the adjacent statements before and after the target statement to generate a concatenated paragraph corresponding to the target statement, and inject the round position code and the sending role of each dialogue statement into the concatenated paragraph.

[0070] S240. Based on each spliced ​​segment, obtain the business relevance score of each dialogue statement, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement.

[0071] Specifically, based on each concatenated segment, a business relevance score is obtained for each dialogue statement. Then, based on the business relevance score of each dialogue statement, a core business statement sequence is extracted from the real-time dialogue sequence, which may include: Each concatenated segment is sent to a pre-trained scoring model, and the score output by the scoring model is used as the business relevance score of the corresponding dialogue statement of the concatenated segment. Based on the business relevance score of each dialogue statement, dialogue statements that exceed the currently set first threshold are identified as candidate statements, and sentence vectors for each candidate statement are generated. Based on the sequential relationship of each candidate statement in the real-time dialogue sequence, calculate the sentence vector similarity between each candidate statement and its adjacent candidate statements, and perform any of the following: If the sentence vector similarity between a candidate statement and its adjacent candidate statements is less than the second threshold, then the candidate statement is retained. If the sentence vector similarity between a candidate statement and its adjacent candidate statements is greater than or equal to the second threshold, then the confidence scores of the candidate statement and its adjacent candidate statements are calculated respectively, and the candidate statement with the higher confidence score is retained. All the remaining candidate statements are sorted by sending time to form a core business statement sequence.

[0072] Optionally, dialogue statements with scores higher than the first threshold are more likely to contain business-related information and are retained as candidate statements.

[0073] Optionally, the sentence vector of the candidate statement refers to mapping the candidate statement to a numerical vector of fixed dimension, which can be used to calculate semantic similarity.

[0074] Optionally, adjacent alternative statements refer to the preceding or following alternative statement in the current alternative statement in the real-time dialogue sequence.

[0075] Optionally, sentence vector similarity can be the cosine similarity between two sentence vectors.

[0076] Optionally, the second threshold is a similarity threshold for determining whether the semantics of two candidate statements are highly repetitive. If the sentence vector similarity of the two candidate statements is higher than the second threshold, they are judged to be semantically repetitive and need to be deduplicated.

[0077] Optionally, confidence can be used to describe the degree of certainty that a candidate statement is a valid business statement. When deduplicating, statements with higher confidence are retained first. The semantic vector of the entire dialogue can be generated based on the current dialogue, and then the confidence of the candidate statement can be calculated based on the sentence vector of the candidate statement and the semantic vector of the entire dialogue.

[0078] The advantage of this setup is that, through two-level filtering of business relevance scoring and confidence levels, it can compress the text length of the input to the large language model while ensuring effective business information, thereby improving the inference efficiency of the large model.

[0079] This process, before generating a real-time dialogue sequence during the conversation between the agent and the customer, may also include: Obtain multiple historical dialogue statements and determine whether each historical dialogue statement matches any noise type. If so, mark the historical dialogue statement as the lowest score; If not, mark the historical dialogue statement as the highest score; In each historical dialogue statement that has been marked with a score, multiple paragraph samples are constructed using a sliding window, and the target loss function is determined based on the proportion of the historical dialogue statement with the lowest score in all historical dialogue statements. The paragraph samples are input into the initial scoring model in a random order, and the scoring model is trained based on the target loss function and adversarial training.

[0080] Optionally, historical dialogue statements can refer to historical anonymized dialogue statements obtained from the enterprise's business system logs.

[0081] Optionally, noise type refers to predefined non-business invalid statement standards, which may include purely social etiquette type, emotional outburst type, operation confirmation type without new information type, and semantically highly repetitive type.

[0082] In specific examples, purely social etiquette phrases could include "Hello" or "Goodbye"; phrases expressing strong emotions could include "This is infuriating" or "Speechless"; operation confirmation phrases without new information could include "Please wait" or "Let me check for you"; and phrases with highly repetitive semantics could include asking "Why hasn't my order been shipped yet?" after already asking "Why hasn't my order been shipped?".

[0083] Optionally, if any type of noise is hit, it is marked as the lowest score, which can be 0; if no noise is hit, it is marked as the highest score, which can be 1.

[0084] Optionally, the sliding window size can be 3. The sliding window can be used to segment paragraph samples from the historical dialogue statements, and the specifications of the paragraph samples are consistent with the specifications of the spliced ​​paragraphs.

[0085] Optionally, if the proportion of the lowest-scoring historical dialogue statement in all historical dialogue statements is lower than a specified proportion threshold, it indicates a class imbalance problem with a low proportion of noisy samples, and the first objective loss function can be used; otherwise, the second objective loss function is used. The first and second objective loss functions can be preset. The first objective loss function can be the focus loss function, which solves the class imbalance problem by introducing class weight factors and hard sample focus factors, while allowing the model to focus on learning hard-to-distinguish samples and improve classification accuracy. The second objective loss function can be the standard cross-entropy loss function, which is used for fast training in noisy equalization scenarios.

[0086] Alternatively, adversarial training, also known as fast gradient training, forces the model to learn more essential semantic features by adding small gradient perturbations to the word vectors of paragraph samples, thereby improving the model's robustness to colloquial variations and non-standard expressions.

[0087] Optionally, after calculating the loss through normal forward propagation for each batch of paragraph samples, a small perturbation is added to the word vector along the gradient direction, and then the adversarial loss is calculated through forward propagation again. The original loss and the adversarial loss are then added together and backpropagated to update the model parameters.

[0088] The advantages of this setup are: it can specifically address the distribution problem of low noise sample proportion in customer service dialogues, strengthen the model's ability to identify minority class noise and difficult-to-distinguish noise, and improve the model's tolerance to colloquial expressions, disordered word order, and non-standard expressions through adversarial training without adding additional labeled data, making it more suitable for the diverse expressions in real customer service scenarios. By inputting samples in shuffled order, it can prevent the model from speculatively learning positional patterns, ensuring that the model truly makes judgments based on semantic content, and improving the generality and scenario adaptability of the classification model.

[0089] After training the scoring model based on the target loss function and adversarial training, the method may further include: Determine multiple initial thresholds, and based on the scoring model obtained from the current training, determine the F1 score corresponding to each initial threshold; The initial threshold with the highest F1 score is determined as the first threshold.

[0090] Optionally, the initial threshold is a pre-set set of multiple candidate classification thresholds. Multiple initial thresholds with uniform gradients can be set within a reasonable range and at a specified step size.

[0091] Optionally, the F1 score is the harmonic mean of precision and recall, which is a comprehensive indicator of the overall performance of the classification model. The higher the F1 score, the better the overall classification performance of the model.

[0092] Optionally, precision refers to the proportion of statements that are deemed useful at a specified initial threshold, and the actual labels are useful; recall refers to the proportion of all truly useful statements that are correctly identified as useful at a specified initial threshold.

[0093] Optionally, the F1 score of the currently trained scoring model can be obtained for each initial threshold. The F1 score for each initial threshold can be calculated using the following formula: F1 = 2 × precision × recall / (precision + recall).

[0094] Optionally, the initial threshold with the highest F1 score can be used as the first threshold for actual inference.

[0095] The advantage of this setting is that it automatically selects the first threshold with the best F1 score based on the scoring model trained on real business data, which makes the first threshold suitable for the current business scenario, achieves the best balance between precision and recall, and avoids the problem of poor adaptability of a single fixed threshold.

[0096] S250. Generate prompt words based on the core business statement sequence, and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model.

[0097] S260. Based on the target standard question, search the enterprise knowledge base and send the retrieved business knowledge to the agent.

[0098] The technical solution of this invention obtains the business relevance score of each dialogue statement based on each concatenated segment, and extracts the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement. This method can compress the text length of the input large language model while ensuring effective business information, thereby improving the inference efficiency of the large model. By marking historical dialogue statements with scores, constructing multiple paragraph samples, and determining the target loss function based on the proportion of the historical dialogue statement with the lowest score in all historical dialogue statements, the scoring model is trained based on paragraph samples, the target loss function, and adversarial training. This method can specifically address customer service concerns. To address the issue of low proportion of noise samples in speech, this approach strengthens the model's ability to identify minority class noise and difficult-to-distinguish noise. Through adversarial training, without the need for additional labeled data, it enhances the model's tolerance for colloquial expressions, disordered word order, and non-standard expressions, making it more suitable for diverse expressions in real customer service scenarios. By shuffling the input order of samples, it prevents the model from speculatively learning positional patterns, ensuring that the model truly makes judgments based on semantic content, thus improving the generality and scenario adaptability of the classification model. By determining the first threshold based on the F1 score, it ensures that the first threshold is adapted to the current business scenario, achieving the best balance between precision and recall, and avoiding the problem of poor adaptability of a single fixed threshold.

[0099] Example 3 Figure 3 This is a schematic diagram of the structure of a knowledge query device during a customer service dialogue process, provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a paragraph splicing generation module 310, a core business statement sequence extraction module 320, a standard question acquisition module 330, and a knowledge retrieval module 340.

[0100] The paragraph splicing generation module 310 is used to generate a real-time dialogue sequence during the dialogue between the agent and the customer, and to generate corresponding spliced ​​paragraphs for each dialogue statement in the real-time dialogue sequence.

[0101] The core business statement sequence extraction module 320 is used to obtain the business relevance score of each dialogue statement based on each spliced ​​segment, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement.

[0102] The standard question acquisition module 330 is used to generate prompt words based on the core business statement sequence, and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model.

[0103] The knowledge retrieval module 340 is used to retrieve business knowledge from the enterprise knowledge base based on the target standard question and send the retrieved business knowledge to the agent.

[0104] The technical solution of this invention generates a real-time dialogue sequence during the dialogue between the agent and the customer, and generates corresponding spliced ​​segments for each dialogue statement in the real-time dialogue sequence; based on each spliced ​​segment, it obtains a business relevance score for each dialogue statement, and extracts a core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement; based on the core business statement sequence, it generates prompt words, and inputs the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; based on the target standard question, it retrieves the business knowledge in the enterprise knowledge base, and sends the retrieved business knowledge to the agent. This method eliminates the need for the agent to manually extract customer intent and input search terms, automatically pushing business knowledge to the agent, effectively reducing the time spent on business knowledge queries and shortening customer waiting time. Based on the method of first removing invalid noise content in the dialogue through noise reduction processing, and then obtaining the standard question based on the core business statements, it effectively avoids interference from irrelevant information, improves the accuracy and relevance of the standard question generation, and the generated standard question is more in line with the expression specifications of the enterprise knowledge base, which can more accurately hit the corresponding answer in the knowledge base, improving the recall and accuracy of knowledge retrieval.

[0105] Based on the above embodiments, the paragraph splicing generation module 310 can be specifically used for: During the conversation between the agent and the customer, the conversation text is extracted and divided into sentences to obtain multiple conversation sentences and the sending time and sending role of each conversation sentence. The dialogue statements are sorted according to their sending time to generate a real-time dialogue sequence; Each dialogue statement in the real-time dialogue sequence is taken as the target statement in turn. The target statement is concatenated with the adjacent statements before and after it to generate a concatenated paragraph corresponding to the target statement. The round position code and the sending role of each dialogue statement are injected into the concatenated paragraph.

[0106] Based on the above embodiments, the core business statement sequence extraction module 320 can be specifically used for: Each concatenated segment is sent to a pre-trained scoring model, and the score output by the scoring model is used as the business relevance score of the corresponding dialogue statement of the concatenated segment. Based on the business relevance score of each dialogue statement, dialogue statements that exceed the currently set first threshold are identified as candidate statements, and sentence vectors for each candidate statement are generated. Based on the sequential relationship of each candidate statement in the real-time dialogue sequence, calculate the sentence vector similarity between each candidate statement and its adjacent candidate statements, and perform any of the following: If the sentence vector similarity between a candidate statement and its adjacent candidate statements is less than the second threshold, then the candidate statement is retained. If the sentence vector similarity between a candidate statement and its adjacent candidate statements is greater than or equal to the second threshold, then the confidence scores of the candidate statement and its adjacent candidate statements are calculated respectively, and the candidate statement with the higher confidence score is retained. All the remaining candidate statements are sorted by sending time to form a core business statement sequence.

[0107] Based on the above embodiments, a scoring model training module may also be included, for: Obtain multiple historical dialogue statements and determine whether each historical dialogue statement matches any noise type. If so, mark the historical dialogue statement as the lowest score; If not, mark the historical dialogue statement as the highest score; In each historical dialogue statement that has been marked with a score, multiple paragraph samples are constructed using a sliding window, and the target loss function is determined based on the proportion of the historical dialogue statement with the lowest score in all historical dialogue statements. The paragraph samples are input into the initial scoring model in a random order, and the scoring model is trained based on the target loss function and adversarial training.

[0108] Based on the above embodiments, a threshold determination module may also be included, used for: Determine multiple initial thresholds, and based on the scoring model obtained from the current training, determine the F1 score corresponding to each initial threshold; The initial threshold with the highest F1 score is determined as the first threshold.

[0109] Based on the above embodiments, a large language model training module may also be included, used for: Obtain multiple sets of historical dialogue records, generate historical dialogue sequences for each set of historical dialogue records, and extract the sequence of historical core business statements from each historical dialogue sequence. Based on the historical core business statement sequence, obtain customer intent fragments and agent response fragments, and match the customer intent fragments and agent response fragments to generate semantic units; Obtain the standard question corresponding to the semantic unit, and combine the customer intent fragment, the agent response fragment, and the standard question to form a training sample; The initial large language model is fine-tuned with all parameters based on each training sample to obtain the trained large language model.

[0110] Based on the above embodiments, the large language model training module can be further specifically used for: Context encoding is performed on each historical statement in the historical core business statement sequence, and hierarchical density clustering is performed based on the context encoding of each historical statement. Customer intent fragments and agent response fragments are obtained based on the clustering results. The customer intent fragment and the agent response fragment are respectively dereferenced, and the dereferenced customer intent fragment and the agent response fragment are matched. A set of successfully matched customer intent fragments and agent response fragments is taken as a semantic unit.

[0111] The knowledge query device for customer service dialogue provided in this embodiment of the invention can execute the knowledge query method for customer service dialogue provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0112] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0113] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0114] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0115] Processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the knowledge query method in the customer service dialogue process described in the embodiments of the present invention. That is: During the dialogue between the agent and the customer, a real-time dialogue sequence is generated, and corresponding spliced ​​segments are generated for each dialogue statement in the real-time dialogue sequence. Based on each concatenated segment, obtain the business relevance score of each dialogue statement, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement. Based on the core business statement sequence, generate prompt words and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; Based on the target standard question, a search is performed in the enterprise knowledge base, and the retrieved business knowledge is sent to the agent.

[0116] In some embodiments, the knowledge query method during a customer service conversation can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the knowledge query method during a customer service conversation described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the knowledge query method during a customer service conversation by any other suitable means (e.g., by means of firmware).

[0117] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0119] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0121] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0122] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0123] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0124] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A knowledge retrieval method during customer service dialogue, characterized in that, include: During the dialogue between the agent and the customer, a real-time dialogue sequence is generated, and corresponding spliced ​​segments are generated for each dialogue statement in the real-time dialogue sequence. Based on each concatenated segment, obtain the business relevance score of each dialogue statement, and extract the core business statement sequence from the real-time dialogue sequence based on the business relevance score of each dialogue statement. Based on the core business statement sequence, generate prompt words and input the prompt words into a pre-trained large language model to obtain the target standard question output by the large language model; Based on the target standard question, a search is performed in the enterprise knowledge base, and the retrieved business knowledge is sent to the agent.

2. The method according to claim 1, characterized in that, During the conversation between the agent and the customer, a real-time dialogue sequence is generated, and corresponding concatenated segments are generated for each dialogue statement in the real-time dialogue sequence, including: During the conversation between the agent and the customer, the conversation text is extracted and divided into sentences to obtain multiple conversation sentences and the sending time and sending role of each conversation sentence. The dialogue statements are sorted according to their sending time to generate a real-time dialogue sequence; Each dialogue statement in the real-time dialogue sequence is taken as the target statement in turn. The target statement is concatenated with the adjacent statements before and after it to generate a concatenated paragraph corresponding to the target statement. The round position code and the sending role of each dialogue statement are injected into the concatenated paragraph.

3. The method according to claim 1, characterized in that, Based on each concatenated segment, a business relevance score is obtained for each dialogue statement. Then, based on the business relevance score of each dialogue statement, a core business statement sequence is extracted from the real-time dialogue sequence, including: Each concatenated segment is sent to a pre-trained scoring model, and the score output by the scoring model is used as the business relevance score of the corresponding dialogue statement of the concatenated segment. Based on the business relevance score of each dialogue statement, dialogue statements that exceed the currently set first threshold are identified as candidate statements, and sentence vectors for each candidate statement are generated. Based on the sequential relationship of each candidate statement in the real-time dialogue sequence, calculate the sentence vector similarity between each candidate statement and its adjacent candidate statements, and perform any of the following: If the sentence vector similarity between a candidate statement and its adjacent candidate statements is less than the second threshold, then the candidate statement is retained. If the sentence vector similarity between a candidate statement and its adjacent candidate statements is greater than or equal to the second threshold, then the confidence scores of the candidate statement and its adjacent candidate statements are calculated respectively, and the candidate statement with the higher confidence score is retained. All the remaining candidate statements are sorted by sending time to form a core business statement sequence.

4. The method according to claim 3, characterized in that, Before generating a real-time dialogue sequence during the conversation between the agent and the customer, the following steps are also included: Obtain multiple historical dialogue statements and determine whether each historical dialogue statement matches any noise type. If so, mark the historical dialogue statement as the lowest score; If not, mark the historical dialogue statement as the highest score; In each historical dialogue statement that has been marked with a score, multiple paragraph samples are constructed using a sliding window, and the target loss function is determined based on the proportion of the historical dialogue statement with the lowest score in all historical dialogue statements. The paragraph samples are input into the initial scoring model in a random order, and the scoring model is trained based on the target loss function and adversarial training.

5. The method according to claim 4, characterized in that, After training the scoring model based on the aforementioned target loss function and adversarial training, the following steps are also included: Determine multiple initial thresholds, and based on the scoring model obtained from the current training, determine the F1 score corresponding to each initial threshold; The initial threshold with the highest F1 score is determined as the first threshold.

6. The method according to claim 1, characterized in that, Before generating a real-time dialogue sequence during the conversation between the agent and the customer, the following steps are also included: Obtain multiple sets of historical dialogue records, generate historical dialogue sequences for each set of historical dialogue records, and extract the sequence of historical core business statements from each historical dialogue sequence. Based on the historical core business statement sequence, obtain customer intent fragments and agent response fragments, and match the customer intent fragments and agent response fragments to generate semantic units; Obtain the standard question corresponding to the semantic unit, and combine the customer intent fragment, the agent response fragment, and the standard question to form a training sample; The initial large language model is fine-tuned with all parameters based on each training sample to obtain the trained large language model.

7. The method according to claim 6, characterized in that, Based on the historical core business statement sequence, customer intent fragments and agent response fragments are obtained, and the customer intent fragments and agent response fragments are matched to generate semantic units, including: Context encoding is performed on each historical statement in the historical core business statement sequence, and hierarchical density clustering is performed based on the context encoding of each historical statement. Customer intent fragments and agent response fragments are obtained based on the clustering results. The customer intent fragment and the agent response fragment are respectively dereferenced, and the dereferenced customer intent fragment and the agent response fragment are matched. A set of successfully matched customer intent fragments and agent response fragments is taken as a semantic unit.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the knowledge query method in the customer service dialogue process according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the knowledge query method in the customer service dialogue process as described in any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the knowledge query method in the customer service dialogue process according to any one of claims 1-7.