A customer service reply method, an electronic device, a readable storage medium and a program product
By generating structured query statements through semantic understanding of query statements and combining multi-level retrieval strategies based on knowledge graphs and vector libraries, the problem of intent understanding in cross-domain scenarios of intelligent customer service systems is solved, and efficient and accurate response generation is achieved.
Patent Information
- Application Number
- CN202611525049.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-12-01
AI Technical Summary
Existing intelligent customer service systems struggle to accurately understand user intent when faced with colloquial and ambiguous natural language queries, resulting in low relevance and insufficient recall of search results. Furthermore, they are prone to intent confusion and mismatch in cross-domain scenarios.
By semantically understanding the query statement to generate a structured query statement, and combining path matching from the knowledge graph and nearest neighbor search from the pre-set response vector library, a multi-level retrieval strategy is adopted to obtain candidate retrieval results, including multi-layered progressive understanding of intent tags and entity information. Combined with user profiling and fuzzy error tolerance mechanism, accurate retrieval and semantic generalization are achieved.
It improves the accuracy of generated response statements, overcomes the semantic gap between spoken language and retrieval standards, enhances cross-domain adaptability, and ensures the accuracy and efficiency of responses.
Smart Images

Figure CN123198060A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a customer service response method, electronic device, readable storage medium, and program product. Background Technology
[0002] Intelligent customer service systems, as a key tool for enterprises to improve service efficiency, primarily rely on automating user inquiries. Current mainstream technologies often employ keyword matching, rule-based word segmentation, or basic vector retrieval to achieve question-and-answer matching, attempting to quickly locate the information users need within a massive knowledge base.
[0003] Existing technologies typically perform shallow word segmentation on user input and then directly match word meanings in a full-text database, or calculate similarity in a vector database based on general sentence vectors. However, existing solutions suffer from the technical problem of low accuracy in generating responses. Summary of the Invention
[0004] The purpose of this disclosure is to provide a customer service response method, electronic device, readable storage medium, and program product designed to improve the accuracy of generated response statements.
[0005] To achieve the above objectives, the present disclosure adopts the following technical solution: Firstly, this disclosure provides a customer service response method, including: The system acquires the target user's query statement, performs semantic understanding processing on the query statement, and generates a structured query statement, which includes intent tags and entity information. By executing a multi-level retrieval strategy on the structured query statement, a candidate retrieval result set is obtained, which includes multiple candidate retrieval results and their corresponding confidence scores. Finally, based on the candidate retrieval result set, the corresponding response statement can be determined. The multi-level retrieval strategy includes at least a first retrieval strategy and a second retrieval strategy. The first retrieval strategy includes path matching in a knowledge graph based on intent tags and entity information. The second retrieval strategy includes nearest neighbor search from a pre-defined response vector library based on the query vector corresponding to the structured query statement.
[0006] The customer service response method provided in this disclosure generates a structured query statement containing intent tags and entity information by performing semantic understanding processing on the query statement. This transforms unstructured natural language into a data form that can be accurately parsed by machines, avoiding the semantic gap between spoken expression and retrieval standards. Furthermore, a multi-level retrieval strategy involving path matching based on a knowledge graph and nearest neighbor search based on a preset response vector library is executed on the structured query statement. This strategy can not only utilize the knowledge graph to obtain high-confidence structured standard answers, but also capture semantically similar responses through vector search, achieving dual coverage of precise retrieval and semantic generalization, thereby improving the accuracy of the generated response statement.
[0007] Secondly, this disclosure provides an electronic device including a memory and a processor, the memory and the processor being coupled. The memory stores processor-executable instructions, and the processor executes the aforementioned customer service response method when executing the instructions.
[0008] Thirdly, this disclosure provides a computer-readable storage medium storing computer program instructions that, when executed on an electronic device, cause the electronic device to perform the aforementioned customer service response method.
[0009] Fourthly, this disclosure provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the aforementioned customer service response method.
[0010] It should be noted that any of the possible implementations of any of the above aspects can be combined, provided that the solutions do not contradict each other. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this disclosure, 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 this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A system architecture diagram of a customer service response method provided in this disclosure embodiment; Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure; Figure 3 A flowchart illustrating a customer service response method provided in an embodiment of this disclosure; Figure 4 A flowchart illustrating another customer service response method provided in this embodiment of the disclosure; Figure 5 A flowchart illustrating yet another customer service response method provided in this embodiment of the disclosure; Figure 6 This is a schematic diagram of the structure of a customer service response system provided in an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the structure of a customer service response device provided in an embodiment of the present disclosure. Detailed Implementation
[0013] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this disclosure.
[0014] In the description of this disclosure, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or relative positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this disclosure and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this disclosure. Unless otherwise specified, the above-mentioned orientational descriptions can be flexibly set in practical applications, provided that the relative positional relationships shown in the accompanying drawings are satisfied.
[0015] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0016] In the description of this disclosure, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "communication" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. They can refer to a direct connection or an indirect connection through an intermediate medium, or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.
[0017] In embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, article, or apparatus that includes that element.
[0018] In this disclosure, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0019] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0020] Currently, intelligent customer service systems are widely used on various online service platforms, aiming to improve service efficiency and user experience by responding to user inquiries through automation. In intelligent customer service systems, the search and response module is one of the core functions, with the goal of accurately understanding the user's query intent and quickly providing relevant and accurate responses. Existing mainstream solutions typically employ keyword matching or rule-based word segmentation techniques, combined with simple vector retrieval or knowledge graph queries to achieve question-and-answer matching.
[0021] In typical existing technical solutions, the system first segments and extracts keywords from the user's input query, then performs word-based matching or retrieval based on statistical methods such as TF-IDF in a knowledge base or frequently asked questions (FAQ) document. Some solutions introduce pre-trained language models to generate sentence vectors and retrieve similar question-answer pairs in a vector database using cosine similarity. Other solutions attempt to construct knowledge graphs and perform path queries based on entity names to obtain structured answers. These methods can work in scenarios with clear structured data and standardized query expressions, but they often fail to accurately capture the user's true intent when faced with colloquial expressions, synonym variations, or cross-business domain queries.
[0022] However, the aforementioned existing technical solutions suffer from at least the following drawbacks: Due to a lack of deep semantic understanding and structured parsing of query statements, existing methods struggle to accurately map users' colloquial and ambiguous natural language into standard nodes in knowledge graphs or semantic anchors in vector libraries, resulting in low relevance and insufficient recall of search results. Furthermore, existing solutions generally fail to distinguish between global semantics and business domain-specific semantics in their search paths, easily leading to intent confusion and incorrect matching in cross-domain scenarios, further reducing response accuracy. Therefore, how to achieve accurate semantic understanding and cross-domain adaptation of user queries while maintaining high search performance is a pressing technical problem that needs to be solved in this field.
[0023] To address the aforementioned technical issues, this disclosure provides a customer service response method, which includes obtaining a target user's query statement, performing semantic understanding processing on the query statement to generate a structured query statement including intent tags and entity information, and then executing a multi-level retrieval strategy that includes path matching with a knowledge graph and nearest neighbor search with a preset response vector library on the structured query statement to obtain a candidate retrieval result set. The candidate retrieval result set includes multiple candidate retrieval results and the confidence level corresponding to each candidate retrieval result, thereby determining the response statement corresponding to the query statement based on the candidate retrieval result set.
[0024] In this solution, semantic understanding processing of query statements generates structured query statements containing intent tags and entity information, transforming unstructured natural language into a machine-readable data format that avoids the semantic gap between spoken expression and retrieval standards. Furthermore, a multi-level retrieval strategy involving path matching based on a knowledge graph and nearest neighbor search based on a pre-defined response vector library is applied to the structured query statements. This approach leverages the knowledge graph to obtain high-confidence structured standard answers while capturing semantically similar responses through vector search, achieving dual coverage of precise retrieval and semantic generalization, thereby improving the accuracy of the generated response statements.
[0025] Optionally, the customer service response method provided in this disclosure also has the following core improvements: First, a three-layer progressive understanding link of "rule structure parsing + statistical semantic expansion + deep intent classification" is constructed. This involves word normalization through the fusion of word segmentation, domain thesaurus, and historical co-occurrence statistics, and context encoding using a pre-trained model, combined with business context routing to solve cross-domain disambiguation problems. Second, a personalized re-ranking mechanism based on user profiles is introduced. During the ranking stage, user historical interaction characteristics (such as historical adoption type and user level) are used as weighting factors to achieve a balance between general optimality and individual suitability. Third, a fallback architecture of "fuzzy fault tolerance + synonyms + multi-source retrieval" is designed. Pre-set synonym relationship edges and edit distance fuzzy matching are used, and automatic degradation to vector retrieval and full-text retrieval is supported when the knowledge graph hit is insufficient. Furthermore, a closed-loop architecture of search-feedback-evolution is established, automatically feeding back user dislikes, referrals to human agents, and other logs to the knowledge graph construction module, triggering incremental updates and compressing the knowledge base update cycle from monthly to daily. Finally, a modular layered architecture was adopted, decoupling the system into five layers: interaction, query, search, result processing, and response generation. A multi-level caching mechanism was also introduced to ensure the effectiveness of semantic computing while meeting the sub-second response requirements.
[0026] The embodiments provided in this disclosure will now be described in detail with reference to the accompanying drawings.
[0027] This disclosure provides a customer service response method that can be applied to, for example... Figure 1 In the system architecture shown. For example... Figure 1 As shown, the system architecture includes a first device 101. The first device 101 is the executing entity of the customer service response method provided in this disclosure.
[0028] The first device 101 can be an electronic device, a terminal, or a server. For example, the terminal can be a mobile phone, a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a mixed reality (MR) terminal device, a terminal in industrial control, a vehicle-mounted terminal device, a terminal in self-driving, a terminal in assisted driving, a terminal in remote medical care, a terminal in a smart grid, a terminal in transportation safety, a terminal in a smart city, a terminal in a smart home, etc.
[0029] A terminal may also be referred to as terminal equipment, user equipment (UE), access terminal, vehicle-mounted terminal, industrial control terminal, remote terminal, mobile device, UE terminal equipment, wireless communication equipment, machine terminal, or UE device, etc. A terminal can be fixed or mobile.
[0030] A server can be a single physical server; or it can consist of two or more physical servers that share different responsibilities, working together to achieve the corresponding functions. In terms of server type, for example, a server can be a blade server, a high-density server, a rack server, or a tower server, etc.
[0031] In some embodiments, the first device 101 obtains the query statement of the target user, performs semantic understanding processing on the query statement, generates a structured query statement including intent tags and entity information, and performs a multi-level retrieval strategy including path matching based on knowledge graph and nearest neighbor search based on query vector on the structured query statement to obtain a candidate retrieval result set including multiple candidate retrieval results and the confidence level corresponding to each candidate retrieval result, thereby determining the response statement corresponding to the query statement based on the candidate retrieval result set.
[0032] In some embodiments, the first device 101 can directly obtain the query statement of the target user. For example, the first device 101 can directly obtain the query statement of the target user based on the input content of the target user on the interactive interface.
[0033] In other embodiments, the first device 101 may also receive query statements sent from an external second device 102 associated with the first device 101. The first device 101 may communicate with the second device 102 via wired or wireless means.
[0034] For example, the second device 102 may also be an electronic device, a user terminal of the target user, or a server. The user terminal, as an optional data source, includes personal computers, smartphones, or tablets, and is used to send query statements to the first device 101.
[0035] Taking the first device as an electronic device as an example, Figure 2 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure.
[0036] like Figure 2 As shown, the electronic device 200 includes a processor 201, a memory 202, a communication interface 203, and a bus 204. The processor 201, the memory 202, and the communication interface 203 can be connected via the bus 204.
[0037] The processor 201 is the control center of the electronic device 200 and can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The processor 201 can be a general-purpose central processing unit (CPU) or other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.
[0038] As an example, processor 201 may include one or more CPUs, for example Figure 2 CPU 0 and CPU 1 are shown in the diagram.
[0039] The memory 202 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0040] In one possible implementation, the memory 202 may exist independently of the processor 201. The memory 202 can be connected to the processor 201 via a bus 204 and is used to store data, instructions, or program code. When the processor 201 calls and executes the instructions or program code stored in the memory 202, it can implement the customer service response method provided in the embodiments of this disclosure.
[0041] In another possible implementation, the memory 202 can also be integrated with the processor 201.
[0042] The communication interface 203 is used for connecting the electronic device to other devices via a communication network, which may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The communication interface 203 may include a receiving unit for receiving data and a transmitting unit for transmitting data.
[0043] Bus 204 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0044] In some embodiments, the electronic device 200 may integrate input units such as a keyboard and keyboard, allowing users to input queries into the electronic device 200 without the need for external devices.
[0045] In some embodiments, the electronic device 200 may also include input / output devices, such as physical components like a touchscreen, display, microphone, or keyboard, which are used to directly receive voice or text input from the user.
[0046] It should be pointed out that, Figure 2 The structure shown does not constitute a limitation on the electronic device, except... Figure 2 In addition to the components shown, the electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0047] Taking an electronic device as the executing entity of the customer service response method provided in this embodiment of the disclosure as an example, the customer service response method provided in this embodiment of the disclosure will be described.
[0048] Figure 3 This is a flowchart illustrating a customer service response method provided in an embodiment of this disclosure. Figure 3 As shown, the method specifically includes: S301. Obtain the query statement of the target user.
[0049] Among them, the query statement refers to the query text data entered by the target user into the electronic device, and its content covers the business questions inquired by the target user, product attribute queries or fault descriptions, etc.
[0050] In some embodiments, the query statement can be a word, a phrase, a sentence, or a paragraph, etc. That is, this embodiment does not limit the character length of the query statement.
[0051] In some embodiments, electronic devices can obtain query statements through various means. For example, an electronic device can obtain the corresponding query statement based on the user's input on the interactive interface.
[0052] The input content of the target user on the interactive interface can be text, image, audio, or video. If the input content is text, the electronic device can directly use the text content as a query statement; if the input content is an image, the electronic device can perform image processing on the image content to extract the text content present in the image content and use that text content as a query statement; if the input content is audio and / or video content, the electronic device can extract audio data from the audio and / or video content, perform semantic recognition on the audio data, and obtain the query statement corresponding to the audio and / or video content.
[0053] For example, a target user inputs "What should I do if my internet is down?" via the World Wide Web (Web) or an application (APP), and this text is recognized by the electronic device as a query statement; or, during a call, a user says "My broadband connection is down," and this speech is converted into the query statement "Broadband connection down." After obtaining this query statement, the electronic device uses it as input data for semantic understanding processing in the subsequent step S302, initiating the intent recognition and entity extraction process.
[0054] The aforementioned electronic device's acquisition of query statements generated by the target user on the interactive interface can be considered an act of acquiring query statements generated in real time. Furthermore, the electronic device can also acquire input text that is not generated in real time. For example, the first device can acquire query statements from a specified database / specified storage space / local file. This embodiment does not limit the method of acquiring query statements.
[0055] In some embodiments, the query statement can be any language or any regional dialect. For example, the query statement can be a language from different countries, such as Chinese or English, or a language from different regions, such as Cantonese, Mandarin, or Wu dialect.
[0056] S302. Perform semantic understanding processing on the query statement to generate a structured query statement.
[0057] The structured query statement includes intent tags and entity information.
[0058] Semantic understanding processing refers to the process of transforming unstructured query statements into structured data containing semantic features, based on natural language processing technology.
[0059] Correspondingly, a structured query statement refers to an intermediate data format that includes intent tags and entity information, generated after semantic understanding processing. The intent tags identify the business category and operational purpose of the user's query, while the entity information locates the specific objects or attribute values involved in the query.
[0060] In some embodiments, before semantic understanding processing of the query statement, word segmentation, part-of-speech tagging, and syntactic analysis can be performed on the query statement to identify the core verbs and noun phrases. Subsequently, the core verbs and noun phrases in the query statement are matched with a preset business domain intent database to determine the corresponding intent tags. Simultaneously, entity recognition algorithms can be used to generate entity information from key information extracted from the query statement, such as names of people, place names, product models, and fault codes.
[0061] In some embodiments, the query statement may contain unclear or omitted components. In such cases, the query statement can be completed and disambiguated by combining the session context identifier corresponding to the current query statement, followed by semantic understanding processing. For example, if the context has recorded that the target user is inquiring about broadband-related issues, but the current query statement is only "how much," the semantics can be automatically completed to generate an intent label for "broadband fee query," and "broadband" can be extracted as entity information.
[0062] S303. Perform a multi-level retrieval strategy on the structured query statement to obtain a set of candidate retrieval results.
[0063] A multi-level retrieval strategy refers to a processing scheme that uses at least two different retrieval mechanisms in parallel or sequentially to comprehensively obtain candidate retrieval results from different dimensions for structured queries. This multi-level retrieval strategy can overcome the limitations of a single retrieval method when dealing with colloquial expressions or complex business logic. By complementing the precise reasoning capabilities of knowledge graphs with the semantic generalization capabilities of vector libraries, it improves the coverage and accuracy of retrieval results.
[0064] The candidate search results set includes multiple candidate search results and the confidence level of each candidate search result.
[0065] A candidate search result set refers to the data set output after executing a multi-level search strategy, containing multiple candidate search results and their corresponding confidence scores. Candidate search results refer to solutions, FAQ entries, or answer fragments corresponding to the query statement, while confidence score is a quantitative value indicating the degree of match between the candidate search result and the current query statement.
[0066] In some embodiments, the multi-level retrieval strategy includes at least a first retrieval strategy and a second retrieval strategy.
[0067] The first retrieval strategy includes path matching in the knowledge graph based on intent tags and entity information.
[0068] A knowledge graph is a structured database that stores entities, relationships, and solution nodes, which are connected by pre-defined business logic relationships.
[0069] In one feasible implementation, path matching is performed in the knowledge graph based on intent tags and entity information. Specifically, this includes mapping intent tags to query type nodes in the knowledge graph and mapping entity information to attribute nodes or object nodes in the knowledge graph. Subsequently, a breadth-first search or depth-first search algorithm is used to find the shortest path or optimal logical path connecting the above nodes in the knowledge graph. If multiple valid paths are found, the matching score of each path is calculated based on the weight of the relationships on the path or historical feedback data. The solution pointed to by the path with a score greater than a preset equal division threshold is selected as the candidate retrieval result and assigned a corresponding confidence level.
[0070] The candidate search results obtained through the first search strategy can also be collectively referred to as the first candidate search result subset. The first candidate search result subset includes at least one first candidate search result and the first confidence level corresponding to each first candidate search result.
[0071] The first confidence level is used to characterize the degree of matching between the retrieval path corresponding to the first candidate retrieval result and the structured query statement.
[0072] The second retrieval strategy includes performing nearest neighbor search in a pre-defined response vector library based on the query vector corresponding to the structured query statement.
[0073] A query vector is a multidimensional numerical vector generated by encoding a structured query statement (or its original text form), which can represent the deep semantic information of the query statement.
[0074] A pre-defined response vector library refers to a database that stores a massive number of historical question-and-answer pairs or standard answers, along with their corresponding sentence vectors. By calculating the similarity (e.g., cosine similarity) between the query vector and each pre-defined response vector in the library, several pre-defined responses with a similarity greater than a pre-defined similarity threshold are selected as candidate search results, and the calculated similarity value is used as its corresponding confidence level.
[0075] In one feasible implementation, the second retrieval strategy first concatenates the intent tags and entity information from the structured query statement into a text sequence with a specific format, then inputs it into a vector encoding model to generate a query vector, thereby enhancing the vector's ability to represent business semantics. Subsequently, based on this query vector, a nearest neighbor search is performed in a preset response vector library to obtain candidate retrieval results. For example, if the intent tag is "fault reporting" and the entity information contains "optical modem", the concatenated text sequence is "fault reporting optical modem", and a query vector can be generated based on this sequence.
[0076] The candidate search results obtained through the second search strategy can also be collectively referred to as the second candidate search result subset. The second candidate search result subset includes at least one second candidate search result and the second confidence level corresponding to each second candidate search result.
[0077] The second confidence level is used to characterize the global vector similarity between the second candidate retrieval result and the structured query statement.
[0078] In some embodiments, the multi-level retrieval strategy may also include other retrieval strategies, such as a third retrieval strategy, a fourth retrieval strategy, etc. These will be described in detail in subsequent embodiments and will not be repeated here.
[0079] S304. Based on the candidate search result set, determine the response statement corresponding to the query statement.
[0080] In some embodiments, based on the candidate search result set, the candidate search result with the highest confidence in the candidate search result set can be determined as the response statement corresponding to the query statement.
[0081] In other embodiments, at least one candidate search result with a confidence level greater than a second preset threshold can be selected from a candidate search result set comprising multiple candidate search results. Based on the target user's historical interaction characteristics, the at least one candidate search result is sorted, and the candidate search result ranked first is determined as the response statement corresponding to the query statement. For example, historical interaction characteristics include historical consultation categories, historical accepted answer types, user level, and product affiliation, etc.
[0082] Specifically, if the confidence levels of all candidate search results in the candidate search result set are lower than a preset threshold, a manual intervention process can be triggered or a prompt can be generated to help the user further describe the problem, rather than directly outputting an answer with low confidence.
[0083] In this embodiment, a structured query statement containing intent tags and entity information is generated by semantic understanding processing of the query statement. This transforms unstructured natural language into a data form that can be accurately parsed by machines, avoiding the semantic gap between spoken expression and retrieval standards. Furthermore, a multi-level retrieval strategy involving path matching based on a knowledge graph and nearest neighbor search based on a preset response vector library is executed on the structured query statement. This strategy can not only utilize the knowledge graph to obtain high-confidence structured standard answers, but also capture semantically similar responses through vector search, achieving dual coverage of precise retrieval and semantic generalization, thereby improving the accuracy of the generated response statement.
[0084] The following examples illustrate other retrieval strategies included in the multi-level retrieval strategy.
[0085] In some embodiments, the multi-level retrieval strategy further includes a third retrieval strategy. The third retrieval strategy includes expanding entity information based on a pre-defined thesaurus to obtain expanded information, and performing path matching in the knowledge graph based on intent tags and expanded information.
[0086] The pre-set thesaurus refers to a database that stores mapping relationships between entity information and its various synonymous expressions, including industry-standard terminology, commonly used colloquial terms, abbreviations, and common alternative names. After obtaining entity information, by querying the pre-set thesaurus, the matched terms in the entity information can be replaced or expanded to all corresponding items in the pre-set thesaurus, thereby generating an extended information set containing the original entity information and multiple extended information.
[0087] Extended information refers to a set of synonyms, near-synonyms, or aliases generated by semantically expanding the original entity information based on a pre-set thesaurus, which covers various ways of expressing entity information in natural language.
[0088] In one feasible implementation, entity information is expanded based on a pre-defined thesaurus to obtain extended information. Specifically, this involves: traversing each keyword in the entity information and searching it in the pre-defined thesaurus; if a corresponding thesaurus is found, all entries in that thesaurus are added to the extended information, forming a combination of "original entity + synonym"; if no synonym is found, the original entity information remains unchanged as part of the extended information. This process ensures the multi-source nature of entity information in knowledge graph retrieval, thereby improving the accuracy and reliability of subsequent searches.
[0089] In one feasible implementation, after obtaining the extended information, path matching can be performed in the knowledge graph based on the intent tag and the extended information. Specifically, this includes: using the intent tag to locate the root node of the query type in the knowledge graph, and using each item in the extended information as an entity node to attempt to establish paths from the root node to each entity node in the knowledge graph; if an item in the extended information (such as a synonym) successfully matches a standard node in the knowledge graph, the solution node associated with that path is extracted as a candidate retrieval result and assigned a corresponding confidence level.
[0090] The candidate search results obtained through the third search strategy can also be collectively referred to as the third candidate search result subset. The third candidate search result subset includes at least one third candidate search result and the third confidence level corresponding to the third candidate search result.
[0091] The third confidence level is used to characterize the extended matching degree between the retrieval path corresponding to the third candidate retrieval result and the structured query statement.
[0092] For example, when the entity information is an optical modem, the pre-set thesaurus contains synonyms such as fiber optic modem and optical network unit (ONU) corresponding to the optical modem. The generated extended information is "optical modem, fiber optic modem, ONU". Subsequently, the electronic device performs path matching in the knowledge graph using optical modem, fiber optic modem, and ONU as nodes respectively. Even if the knowledge graph only stores "fiber optic modem" as a standard node and does not store "optical modem", it can still successfully match the corresponding fault handling path through the extended information of "fiber optic modem", thereby generating candidate search results.
[0093] In this embodiment, during the multi-level retrieval process, the entity expansion mechanism enhances the supplementary retrieval scheme for improving the coverage of knowledge graph path matching, avoiding matching failures caused by inconsistencies between the target user's query statement and the standard entity node representation in the knowledge graph (such as colloquial abbreviations, synonyms, aliases, etc.). Simultaneously, by expanding entity information, the semantic boundaries of the retrieval can be broadened, thereby improving the recall rate of knowledge graph retrieval. Furthermore, the multi-level retrieval strategy, comprised of the first, second, and third retrieval strategies, further enhances the richness and diversity of the retrieval result set, thereby improving the accuracy of the subsequently determined response statement.
[0094] In some embodiments, the multi-level retrieval strategy further includes a fourth retrieval strategy. The fourth retrieval strategy includes determining a target business domain based on intent tags, determining a target statement mapping table corresponding to the target business domain, mapping the query statement to at least one domain-specific search term under the target business domain based on the target statement mapping table, and retrieving from the sub-knowledge graph corresponding to the target business domain and / or the preset response vector library corresponding to the target business domain based on the at least one domain-specific search term.
[0095] The target business domain refers to a specific business category with an independent knowledge system and response database, as indicated by the intent tag, such as independent fields like "broadband fault", "tariff package" or "business processing".
[0096] The target statement mapping table is a rule base that stores the mapping relationship between general query expressions and domain-specific search terms under the target business domain. It defines the business logic transformation rules corresponding to different intent tags. After determining the target business domain, by loading the target statement mapping table corresponding to the target business domain, the entity information and intent tags in the structured query statement are taken as input, and transformed according to the rules in the mapping table to generate at least one domain-specific search term that can accurately reach the knowledge nodes of the target business domain.
[0097] A sub-knowledge graph refers to a local knowledge graph that stores entities, relationships, and solutions unique to a target business domain.
[0098] The preset response vector library refers to a local vector library that stores historical question-and-answer pairs and their corresponding vectors within the target business domain.
[0099] Domain-specific search terms refer to the conversion of general terms in a query statement into professional terms or search keywords that conform to the specifications of the target business domain, based on a target statement mapping table.
[0100] In one feasible implementation, based on a target statement mapping table, the query statement is mapped to at least one domain-specific search term under the target business domain. Specifically, this includes: identifying entity information in the query statement; searching the target statement mapping table for the standard expression or index keyword of that entity information under the target business domain; and if the query statement contains ambiguous descriptions, it can be decomposed or converted into a combination of standard search conditions under the target business domain according to the rules in the target statement mapping table. For example, under the target business domain of broadband failure, being unable to connect to the internet is mapped to a broadband connection anomaly, and a red light on the optical modem is mapped to a loss of signal (LOS) alarm. The generated broadband connection anomaly and optical modem LOS alarm are the domain-specific search terms.
[0101] In one feasible implementation, after obtaining at least one domain-specific search term, the electronic device performs a search from the sub-knowledge graph corresponding to the target business domain and / or the preset response vector library corresponding to the target business domain. Specifically, if the sub-knowledge graph is included, path matching or keyword retrieval is performed in the sub-knowledge graph using the domain-specific search term; if the preset response vector library exists, the domain-specific search term is converted into vector form, and nearest neighbor search is performed in the local vector library; if both the sub-knowledge graph and the preset response vector library exist, both can be called simultaneously, and the search results of both can be merged as candidate search results for this fourth search strategy.
[0102] The candidate search results obtained through the fourth search strategy can also be collectively referred to as the fourth candidate search result subset. The fourth candidate search result subset includes at least one fourth candidate search result and the fourth confidence level corresponding to the fourth candidate search result.
[0103] The fourth confidence level is used to characterize the domain vector similarity between the fourth candidate retrieval result and the structured query statement.
[0104] For example, when the intent tag is determined to be "business processing", the target business domain is locked as the business processing domain. If the query statement is "I want to change my package", the package change is mapped to the domain-specific search term "package change processing" through the target statement mapping table corresponding to the business processing domain. Subsequently, the search is performed through the sub-knowledge graph (storing package change process nodes) and / or the preset response vector library (storing package change-related questions and answers) corresponding to the business processing domain, instead of traversing the entire knowledge base.
[0105] In some embodiments, the multi-level retrieval strategy further includes a third retrieval strategy and a fourth retrieval strategy.
[0106] In this embodiment, the fourth search strategy effectively isolates interference between different business domains, ensuring that the search results are strictly limited to the target business domain. It also avoids the problem of insufficient search accuracy in general search when facing highly specialized and vertical business scenarios. By narrowing the search scope to a specific target business domain and utilizing domain-specific mapping rules, the accuracy of the response is improved. Furthermore, the multi-level search strategy composed of the first, second, and fourth search strategies can further enhance the richness and diversity of the search result set, thereby improving the accuracy of the subsequently determined response statement.
[0107] In some embodiments, such as Figure 4 The diagram shows a specific implementation of step S303 provided in this embodiment of the present disclosure, which specifically includes steps S401-S402.
[0108] S401. Execute a multi-level retrieval strategy on the structured query statement to obtain a subset of candidate retrieval results corresponding to each level of the multi-level retrieval strategy.
[0109] A multi-level retrieval strategy refers to a processing scheme in which an electronic device, for a structured query statement, invokes at least two different retrieval mechanisms in parallel or sequentially to comprehensively obtain candidate retrieval results from different dimensions. For example, a multi-level retrieval strategy may include the first, second, and third retrieval strategies described above; a multi-level retrieval strategy may also include the first, second, and fourth retrieval strategies described above; a multi-level retrieval strategy may also include the first, second, third, and fourth retrieval strategies described above.
[0110] A subset of candidate search results refers to a dataset obtained independently after executing a specific search strategy at a certain level of a multi-level search strategy. This dataset contains the candidate search results matched under that strategy and the corresponding confidence scores for each candidate search result. Correspondingly, if the multi-level search strategy includes a first search strategy, a second search strategy, a third search strategy, and a fourth search strategy, the subset of candidate search results includes the first subset of candidate search results, the second subset of candidate search results, the third subset of candidate search results, and the fourth subset of candidate search results.
[0111] For example, when executing a multi-level search strategy, the first search strategy may output a first candidate search result subset containing "restart optical modem" with a confidence level of 0.85, the second search strategy may output a second candidate search result subset containing "optical modem restart guide" with a confidence level of 0.92, and the third search strategy may output a third candidate search result subset containing "optical modem LOS alarm processing" with a confidence level of 0.78.
[0112] S402. The union of the subsets of candidate search results corresponding to each level of search strategy is determined as the candidate search result set.
[0113] The confidence level of a candidate search result is either the weighted sum of the confidence levels of the candidate search results within the subsets of candidate search results corresponding to each level of search strategy, or the maximum confidence level of the candidate search results within the subsets of candidate search results corresponding to each level of search strategy. The weights of the confidence levels of the subsets of candidate search results corresponding to each level of search strategy can be fixed values or empirically set values.
[0114] It is understandable that the complete steps for the union of the candidate search result subsets corresponding to each level of search strategy are to first deduplicate the candidate search result subsets corresponding to each level of search strategy to obtain the deduplicated candidate search results, and then determine the deduplicated candidate search results as the candidate search result set.
[0115] In one feasible implementation, the union of the candidate search result subsets corresponding to each level of search strategy is determined as the candidate search result set. Specifically, this includes: receiving the first candidate search result subset output by the first search strategy, the second candidate search result subset output by the second search strategy, the third candidate search result subset output by the third search strategy, and the fourth candidate search result subset output by the fourth search strategy; then, initializing an empty candidate search result set, and sequentially traversing each candidate search result subset, adding each candidate search result from each subset to the candidate search result set. If a candidate search result appears repeatedly in multiple subsets, during the union phase, one instance of that candidate search result can be retained and its source strategy count marked, or all instances can be retained and a source identifier appended, so that subsequent steps can adjust the weights based on source richness.
[0116] For example, suppose a multi-level retrieval strategy includes four strategies. The first retrieval strategy yields a first candidate retrieval result subset S1 = {A, B}, the second retrieval strategy yields a second candidate retrieval result subset S2 = {B, C}, the third retrieval strategy yields a third candidate retrieval result subset S3 = {D}, and the fourth retrieval strategy yields a fourth candidate retrieval result subset S4 = {A, E}. The candidate retrieval result set determined based on these four candidate retrieval result subsets is {A, B, C, D, E}. Here, A and B appear in multiple subsets, indicating that they are simultaneously hit by multiple retrieval mechanisms and have high potential relevance; results 3, 4, and 5 are each hit by only a single strategy.
[0117] In this embodiment, within the overall architecture of aggregating multi-source search results through multi-level retrieval strategies to obtain a comprehensive candidate search result set, this embodiment further defines the calculation method for the confidence score of candidate search results. Specifically, it adopts the weighted sum or maximum value of the confidence scores in the corresponding subsets of each level of retrieval strategy. The introduction of a weighted summation mechanism strengthens the overall score of a result when different retrieval strategies all give high confidence scores to the same result. The maximum value mechanism ensures that the probability of selection increases as long as any strategy accurately hits the target, thus enabling a more flexible and accurate quantification of the reliability of candidate search results. In summary, this embodiment effectively solves the potential one-sidedness problem of single-strategy confidence scores, significantly improving the matching accuracy and answer quality of the final selected response statements and user intent.
[0118] In some embodiments, if the confidence level of each candidate search result in the candidate search result set is less than a first preset threshold, the full-text search engine is invoked to perform inverted index matching on the query statement in the historical response database. The matched historical question-answer pairs and the confidence levels corresponding to each historical question-answer pair are used as the backup candidate search result set. The confidence levels corresponding to the historical question-answer pairs are used to characterize the relevance score between the historical question-answer pairs and the structured query statement. The union of the candidate search result subsets corresponding to each level of search strategy and the backup candidate search result set is determined as the candidate search result set.
[0119] The fifth search strategy can also be achieved by calling the full-text search engine to perform inverted index matching on the query statement in the historical response database.
[0120] The backup candidate search result set refers to the set of backup data, which includes historical question-answer pairs and their relevance scores, recalled by the full-text search engine from the historical response database when the multi-level search strategy fails to provide high-confidence results.
[0121] Historical question-and-answer pairs refer to data records that are pre-stored in a historical response database and consist of historical user queries and corresponding historical standard answers.
[0122] The first preset threshold refers to the lower limit of confidence level used to determine whether the recall results of a multi-level retrieval strategy are reliable. This value can be set according to the actual business requirements for the accuracy of the response. For example, the first preset threshold can be 0.75, 0.8, etc.
[0123] When the confidence level of each candidate search result in the candidate search result set is less than the first preset threshold, it indicates that the current multi-level search strategy has failed to effectively hit highly relevant responses. At this point, a safety net search mechanism is triggered, which calls the full-text search engine with the query statement as input and performs inverted index matching in the historical response database. The introduction of this candidate search result set aims to solve the problem that in complex or low-frequency scenarios, the confidence level of the recalled results is generally low due to incomplete knowledge coverage or semantic matching deviations in multi-level search strategies. This ensures that a usable set of candidate response data can always be provided, avoiding the direct return of empty results or low-quality responses.
[0124] In some embodiments, the confidence level of a candidate search result is the weighted sum of the confidence levels of the candidate search results in the subset of candidate search results corresponding to each level of search strategy and the set of guaranteed candidate search results, or the maximum confidence level of the candidate search results in the subset of candidate search results corresponding to each level of search strategy and the set of guaranteed candidate search results.
[0125] In some embodiments, a full-text search engine is invoked to perform inverted index matching on the query statement in the historical response database. Specifically, this includes: converting the query statement into search keywords that the full-text search engine can recognize; the full-text search engine uses a pre-built inverted index structure to quickly locate historical question-and-answer pairs containing search keywords in the historical response database; for each matched historical question-and-answer pair, the semantic similarity or keyword overlap between the historical query statement and the current query statement in the historical question-and-answer pair is calculated, and the calculated value is used as the confidence level corresponding to the historical question-and-answer pair.
[0126] When forming the final candidate search result set, a logical merging operation is performed to combine the subsets of candidate search results corresponding to each level of search strategy with the backup candidate search result set. If a historical question-answer pair in the backup candidate search result set already exists in the subsets of candidate search results corresponding to each level of search strategy, one instance of that historical question-answer pair can be retained, and its confidence level updated to the maximum or weighted average of the two; otherwise, it is directly added to the candidate search result set. In this way, the final candidate search result set includes both the accurate results recalled by the multi-level search strategy and ensures the complete integration of the backup candidate search result set in low-confidence scenarios, thereby improving the accuracy of subsequent response determination.
[0127] The following is a detailed description of the customer service response method provided in this disclosure using a specific embodiment.
[0128] Figure 5 This is a flowchart illustrating yet another customer service response method provided in an embodiment of this disclosure. Figure 5 As shown, the method is executed by a first device (such as a server or a smart customer service terminal), and specifically includes: S501, The first device obtains the query statement of the target user.
[0129] The first device receives natural language query text input by the target user through an interaction layer. This interaction layer includes a web client, an app client, or an application programming interface (API). While acquiring the query statement, the first device records the query timestamp, the target user's unique identifier (User ID), and the current session context ID, which serve as association keys for subsequent personalized ranking and multi-turn dialogue disambiguation.
[0130] For example, if a target user enters "My broadband connection is down" on the web, the text will be recognized as a query by the first device.
[0131] S502, The first device performs semantic understanding processing on the query statement to generate a structured query statement.
[0132] The structured query statement includes intent tags and entity information, and may also include confidence scores. That is, the structured query statement is a triple {intent tag, entity set, confidence score}.
[0133] In some embodiments, semantic understanding processing of the query statement is performed, specifically including constructing a three-layer progressive understanding chain: The first layer is a shallow parsing layer. It sequentially performs file cleaning (e.g., noise reduction, simplified / traditional character standardization, special character filtering), word segmentation, and part-of-speech tagging on the query statement. It also integrates domain thesaurus, near-synonym list, and colloquial alias mapping table to perform word-level structural normalization on the query statement, resulting in a normalized query statement. Furthermore, it expands the query statement by incorporating frequently occurring keywords (terms) from historical search results as auxiliary expansion features, i.e., extended information. For example, user inputs such as "disconnected" or "unable to connect" are uniformly normalized to the standard expression "network unavailable."
[0134] The second layer is the deep semantic layer, which performs context encoding on the normalized query statement based on a pre-trained semantic encoding model and outputs the intent category and entity information.
[0135] The pre-trained semantic encoding model is a pre-trained semantic encoding model fine-tuned based on customer service domain expectations. This pre-trained semantic encoding model can employ a dual-path parallel decoding head to jointly output a structured query description. Entity information (also known as named entity recognition (NER)): By using Span pointer decoding, entities such as product name, business object, and status description are extracted, and the entity type and boundaries are output. The extraction results can be mapped to the standard node ID of the knowledge graph through entity links.
[0136] Intent Classification: By employing a hierarchical classifier (e.g., Level 1: Business Domain; Level 2: Operation Type), the intent label and confidence score are output.
[0137] This pre-trained semantic encoding model can be jointly trained through multiple tasks. ) Optimization, thereby enabling intents and entities to share semantic representations and eliminating the accumulation of errors in cascaded pipelines.
[0138] The third layer is the context disambiguation layer. It addresses ambiguity in the same expression across different business domains by differentiating them through business context routing and combining historical intent tags and entity information from the session context cache for joint disambiguation. For example, when the intent tag "shutdown" is identified, if the business domain in the current session context is locked to the "broadband domain," the intent is directed to the broadband shutdown node; if it is locked to the "mobile domain," it is directed to the mobile phone shutdown node. This solves the cross-domain intent confusion problem caused by traditional single-path word segmentation in customer service.
[0139] The context disambiguation layer can also combine historical intent tags and entity information in the session context cache to complete queries with omissions or references.
[0140] S503, The first device executes the first retrieval strategy on the structured query statement to obtain the first candidate retrieval result subset.
[0141] The first candidate search result subset includes at least one first candidate search result and a first confidence level corresponding to each first candidate search result. The first confidence level is used to characterize the degree of matching between the search path corresponding to the first candidate search result and the structured query statement.
[0142] The first retrieval strategy involves performing precise path matching using a knowledge graph. Specifically, the first device selects the corresponding SPARQL query template from a pre-set "intent-query template mapping table" based on the intent tag, and then retrieves the entity information. The mapped graph node IDs are substituted into template placeholders to construct an executable SPARQL query statement. The first device executes this query statement in the knowledge graph, returning a set of standard solution nodes that precisely match the intent tags and entity information, which is determined as the first candidate retrieval result subset R1.
[0143] For example, an executable SPARQL query statement can be: SELECT ?solution WHERE { :e1 :hasProblem ?p . / / Find the corresponding problem p from entity node e1 ?p :hasSolution ?solution . / / Find the corresponding solution from problem node p. FILTER (?p = :IntentNode) / / Filter condition: The question node must match the current intent. }
[0144] The knowledge graph construction involves several steps: First, pre-trained models such as BERT can be used to automatically extract entities and relationships from product manuals, FAQs, and historical dialogues. Second, a hierarchical ontology structure of "product-attribute-problem-solution" is established, and entity alignment technology is used to fuse multi-source data and eliminate ambiguity. Finally, an incremental update mechanism is deployed to identify and fuse new and old knowledge in real time, and dynamic expansion is supported by FAISS vector indexing. This method achieves automatic knowledge accumulation and real-time updates, significantly improving the retrieval accuracy and problem coverage capability of the intelligent customer service system.
[0145] S504. The first device executes the second retrieval strategy on the structured query statement to obtain a subset of the second candidate retrieval results.
[0146] The subset of second candidate search results includes at least one second candidate search result and a second confidence level corresponding to each second candidate search result. The second confidence level is used to characterize the global vector similarity between the second candidate search result and the structured query statement.
[0147] Specifically, the first device inputs the original query statement or structured query statement into a sentence vector encoding model (such as Sentence-Bidirectional Encoder Representations from Transformers (Sentence-BERT) or a domain-fine-tuned Sentence Embeddings model based on Simple Contrastive Learning of Sentence Embeddings (SimCSE)) to generate a query vector. Then, the first device performs an approximate nearest neighbor (ANN) search in a pre-defined response vector library (such as FAISS or Milvus), returning the Top-M semantically similar answer nodes with a cosine similarity greater than a pre-defined threshold (such as 0.65-0.75), which are determined as the second candidate retrieval result subset R2.
[0148] The preset response vector library, also known as the answer vector index library, can be built offline by encoding the text descriptions of all standard solution nodes in the knowledge graph using the same vector model, and can be refreshed synchronously with the incremental updates of the indicator graph.
[0149] S505, The first device executes the third retrieval strategy on the structured query statement to obtain a third subset of candidate retrieval results.
[0150] The third candidate search result subset includes at least one third candidate search result and the third confidence level corresponding to each third candidate search result. The third confidence level is used to characterize the extended matching degree between the search path corresponding to the third candidate search result and the structured query statement.
[0151] The first device performs synonym expansion and fuzzy matching. Specifically, the first device traverses the synonym edges of entity information in the knowledge graph to obtain the set of alias nodes. Simultaneously, the spoken alias mapping table is queried to map alias nodes to standard nodes. For example, a network outage can be mapped to "network unavailable," and a connection failure can be mapped to "network connection failed." The first device can also edit distance tolerance. For an entity string that is not matched, the edit distance between the entity string and the knowledge graph node name is calculated (when the distance...). And the length ratio (When fuzzy matching is considered successful), the expanded entity set will be re-evaluated (i.e., ... Substitute the SPARQL template into the second knowledge graph retrieval to obtain the third candidate retrieval result subset R3.
[0152] S506. The first device executes the fourth retrieval strategy on the structured query statement to obtain the fourth candidate retrieval result subset.
[0153] The fourth candidate retrieval result subset includes at least one fourth candidate retrieval result and the fourth confidence level corresponding to each fourth candidate retrieval result. The fourth confidence level is used to characterize the domain vector similarity between the fourth candidate retrieval result and the structured query statement.
[0154] The first device performs specialized semantic-oriented convergence (vertical category isolated retrieval). Specifically, the first device determines the target business domain (such as broadband domain, package domain) based on intent tags, loads the corresponding vertical category-specific mapping table, and converges colloquial expressions to standard concepts in the corresponding domain (e.g., in the broadband domain, network outage / inability to connect / not being able to access the internet is converged to optical modem LOS alarm, network cable abnormality, red signal light, etc.; in the package domain, large data / sufficient data is converged to 30G and above). Subsequently, the first device only performs searches in the sub-knowledge graph and / or lake vector sub-database corresponding to the target business domain, without touching the full data, thus avoiding the pollution of vertical category accuracy by general data. The first device can also perform edit distance fault tolerance; for entity strings that are not matched, the edit distance between the entity string and the knowledge graph node name is calculated (when the distance is... And the length ratio (When fuzzy matching is considered successful), the expanded entity set will be re-evaluated (i.e., ... Substitute the SPARQL template, query the specific vector library, perform a secondary knowledge graph retrieval, and obtain the fourth candidate retrieval result subset R4.
[0155] S507. If the confidence scores of the candidate search result subsets in the first, second, third, and fourth candidate search result subsets are less than the second preset threshold, the first device calls the full-text search engine to perform inverted index matching on the query statement in the historical response database, and uses the matched historical question-and-answer pairs and the confidence scores corresponding to each historical question-and-answer pair as the backup candidate search result set.
[0156] The confidence score for historical question-answer pairs is used to characterize the relevance score between the historical question-answer pairs and the structured query. The confidence score for historical question-answer pairs can also be considered the fifth confidence score.
[0157] After aggregating the four candidate search result subsets, the first device determines whether the highest confidence score is lower than a second preset threshold (e.g., 0.75). If it is lower than this second preset threshold, it indicates that the multi-level search strategy has failed to effectively hit highly relevant results, and the first device triggers a fallback mechanism: it calls the full-text search engine to perform inverted index matching on the query statement in the historical response database. The fallback candidate search result set includes historical question-answer pairs and their relevance scores (i.e., confidence scores), used to characterize the relevance of historical question-answer pairs to the query statement, ensuring that no empty answers or low-confidence responses are output in complex or low-frequency scenarios.
[0158] S508. The first device determines the candidate search result set as the union of the first candidate search result subset, the second candidate search result subset, the third candidate search result subset, the fourth candidate search result subset, and the backup candidate search result set.
[0159] By deduplicating the first, second, third, fourth, and backup candidate search result subsets, only the highest confidence level of the same standard answer is retained and marked, and a candidate search result set based on confidence level is output.
[0160] The confidence level can be determined based on the comprehensive scoring function. The comprehensive scoring function satisfies the following relationship: ; in, Indicates confidence level; This represents the weighting coefficient corresponding to the first confidence level; Indicates the first confidence level; This represents the weighting coefficient corresponding to the second confidence level; Indicates the second confidence level; This represents the weighting coefficient corresponding to the third confidence level; Indicates the third confidence level; This represents the weighting coefficient corresponding to the fourth confidence level; Indicates four confidence levels; This represents the weighting coefficient corresponding to the fifth confidence level; This indicates the fifth confidence level. , , and The weighting of scores can be adjusted by tracking and analyzing user behavior.
[0161] S509. The first device determines the response statement corresponding to the query statement from the candidate search result set based on the historical interaction characteristics of the target user.
[0162] Specifically, the first device selects candidate results with a confidence level greater than a second preset threshold, introduces user profile features as ranking weight factors, calculates the final ranking score, and determines the candidate search result ranked first (or the natural language response generated by it) as the final response statement, which is then sent to the target user's interactive interface. If the candidate search result set is empty or all candidate search results have extremely low confidence levels, the first device can also trigger a manual intervention process or guide the user to supplement the problem description.
[0163] In this embodiment, a dual-layer fuzzy matching mechanism combining global synonymy and specialized semantics effectively solves the problem of cross-domain intent confusion, significantly improving retrieval accuracy. An isolated retrieval strategy using a knowledge graph and response database corresponding to the target domain ensures professional accuracy while increasing retrieval speed by over 40%, meeting sub-second response requirements. Furthermore, all extended results revert to standard nodes in the knowledge graph, ensuring a structured output and seamless integration with response generation. Simultaneously, dynamic configuration and plug-in expansion of ranking strategies are supported, fully unleashing the agent's potential and demonstrating exceptional flexibility and continuous evolution capabilities.
[0164] Figure 6 This is a schematic diagram of the structure of a customer service response system provided in an embodiment of this disclosure. Figure 6 As shown, the customer service response system adopts a modular layered architecture, which includes, from top to bottom, a front-end interaction layer, a query processing layer, a search execution layer, a result processing layer, and a response generation layer.
[0165] The front-end interaction layer can provide multiple access methods such as web, APP and API interfaces. It is responsible for receiving the target user's original query statement (text, voice or image) and recording context information such as user ID, session ID and timestamp.
[0166] The query processing layer can incorporate a natural language understanding (NLU) module to perform semantic analysis on the query statement, perform intent recognition and entity extraction, and generate a structured query statement containing intent tags and entity information, thus bridging the semantic gap between colloquial expressions and standard retrieval.
[0167] The semantic analysis includes a five-layer progressive semantic decomposition and normalization process: The first layer consists of word segmentation and part-of-speech tagging: the input query statement is segmented and then magnetically tagged.
[0168] The second layer is a neighborhood synonym mapping: through a pre-set domain knowledge base, colloquial expressions are mapped to standard professional terms, thus resolving word-for-word differences.
[0169] The third layer consists of syntactic analysis and part-of-speech analysis: based on part-of-speech analysis, core slots are identified, and entity information such as "product", "broadband", "status", and "fault" is extracted.
[0170] The fourth layer is co-occurrence statistical extension, which can automatically introduce extended words that frequently co-occur with the core words (such as "optical modem" and "red light") by utilizing the statistical features of historical logs, thereby enhancing semantic richness.
[0171] The fifth layer is deep semantic fusion, which inputs the feature vectors extracted from the above four layers into the pre-trained deep learning model for fusion calculation. The final output is a structured query description containing clear intent labels, entity sets and high confidence scores, which completely solves the semantic gap between colloquial expressions and standard retrieval.
[0172] The search execution layer, acting as the core search engine, executes five levels of search strategies in parallel: path matching search based on knowledge graphs, vector nearest neighbor search based on FAISS / SimCSE, extended search based on thesaurus (simultaneously performing directed and undirected synonym expansion), and vertical category isolation search based on business domains. When the confidence scores of the above four levels of search results are all less than the threshold, the full-text search engine (Elasticsearch, ES) is invoked to perform BM25 word literal matching on the unstructured FAQ document library using extracted keywords, forcing the return of a non-empty set to ensure that the customer service response system can provide "non-empty answers" under any circumstances.
[0173] The results processing layer is responsible for integrating the subsets of candidate search results obtained from various levels of search strategies, performing deduplication, confidence weighting calculation (such as weighted sum or taking the maximum value), and personalized ranking algorithms based on user profiles to select the optimal candidate set.
[0174] The response generation layer generates natural and fluent response statements based on the sorted candidate search results, combined with template filling or natural language generation (NLG) technology, and supports multimodal output formats such as text, images, and cards.
[0175] The response generation layer can also support multimodal output formats such as text, images, and cards to be returned to the front end. Simultaneously, the customer service response system initiates a dynamic feedback closed-loop mechanism, collecting real-time user behavior logs such as clicks, acceptances, and referrals to human agents, feeding this data back to the underlying layer: on one hand, automatically optimizing the weighting parameters and ranking weights of specific searches; on the other hand, triggering a dynamic knowledge graph update process, incrementally updating graph nodes, correcting synonym relationships, and updating and adjusting part-of-speech tagging based on new feedback, forming a self-evolving decoupled architecture from online search to behavior analysis to graph evolution to performance improvement, ensuring continuous optimization of search accuracy. The knowledge graph can also be updated by calling external intelligent agents.
[0176] The above embodiments primarily describe the solutions of the embodiments of this disclosure from a methodological perspective. It is understood that, in order to achieve the above functions, the customer service response device includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.
[0177] This disclosure embodiment can divide the customer service response device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each function into a separate functional module.
[0178] Figure 7 This is a schematic diagram of a customer service response device provided in an embodiment of this disclosure. Figure 7 As shown, the customer service response device 700 includes a communication module 701 and a processing module 702.
[0179] The communication module 701 is used to obtain the query statement of the target user.
[0180] In some embodiments, the processing module 702 is used to perform semantic understanding processing on the query statement to generate a structured query statement, which includes intent tags and entity information; In some embodiments, the processing module 702 is further configured to execute a multi-level retrieval strategy on the structured query statement to obtain a candidate retrieval result set, which includes multiple candidate retrieval results and the confidence level corresponding to each candidate retrieval result.
[0181] In some embodiments, the processing module 702 is further configured to determine the response statement corresponding to the query statement based on the candidate retrieval result set.
[0182] The multi-level retrieval strategy includes at least a first retrieval strategy and a second retrieval strategy. The first retrieval strategy includes: performing path matching in the knowledge graph based on intent tags and entity information; the second retrieval strategy includes: performing nearest neighbor search in a pre-defined response vector library based on the query vector corresponding to the structured query statement.
[0183] The processing module 702 may be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The processor may include an application processor and a baseband processor. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0184] In some embodiments, the customer service response device 700 further includes a storage module 703, which can be used to store knowledge graphs, preset response vector libraries, and historical candidate search result sets, etc.
[0185] For example, the processing module 702 can be as follows: Figure 2 The processor 201 shown; the communication module 701 can be as follows: Figure 2 The communication interface 203 shown; the storage module 703 can be as follows: Figure 2 The memory 202 shown.
[0186] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0187] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0188] This disclosure provides a computer program product containing instructions, which includes a computer program or instructions. When the computer program product or instructions are executed by a processor, the customer service response method in the above method embodiments is implemented.
[0189] The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on an electronic device, all or part of the processes or functions described in the embodiments of this disclosure are generated. The electronic device may be a computer, which may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission. Exemplary examples include wired transmission methods such as optical fiber, twisted pair, and coaxial cable; wireless transmission includes infrared, microwave, etc.
[0190] This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform the customer service response method in the method flow shown in the above method embodiments.
[0191] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires; portable computer disks; hard disks; optical media (e.g., DVDs); random access memory (RAM); read-only memory (ROM); erasable programmable read-only memory (EPROM); registers; hard disks; optical fibers; compact disc read-only memory (CD-ROM); optical storage devices; magnetic storage devices; or any suitable combination thereof; or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC).
[0192] In this embodiment of the disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0193] Since the electronic devices, computer-readable storage media, and computer program products in the embodiments of this disclosure can be applied to the above methods, the technical effects they can achieve can also be referred to the above method embodiments. The embodiments of this disclosure will not be repeated here.
[0194] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0195] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0196] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0197] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
[0198] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0199] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A customer service response method, characterized in that, The method includes: Obtain the query statement of the target user; The query statement is semantically understood to generate a structured query statement, which includes intent tags and entity information. A multi-level retrieval strategy is executed on the structured query statement to obtain a candidate retrieval result set, which includes multiple candidate retrieval results and the confidence level corresponding to each candidate retrieval result; Based on the candidate search result set, determine the response statement corresponding to the query statement; The multi-level retrieval strategy includes at least a first retrieval strategy and a second retrieval strategy. The first retrieval strategy includes: performing path matching in the knowledge graph based on the intent tag and the entity information; The second retrieval strategy includes: performing a nearest neighbor search in a preset response vector library based on the query vector corresponding to the structured query statement.
2. The method according to claim 1, characterized in that, The multi-level retrieval strategy also includes a third retrieval strategy, which includes: The entity information is expanded based on a pre-set thesaurus to obtain expanded information; Path matching is performed in the knowledge graph based on the intent tag and the extended information.
3. The method according to claim 1 or 2, characterized in that, The multi-level retrieval strategy also includes a fourth retrieval strategy, which includes: The target business domain is determined based on the intent tag, and a target statement mapping table corresponding to the target business domain is determined. Based on the target statement mapping table, the query statement is mapped to at least one domain-specific search term under the target business domain; Based on the at least one domain-specific search term, a search is performed from the sub-knowledge graph corresponding to the target business domain and / or the preset response vector library corresponding to the target business domain.
4. The method according to claim 1, characterized in that, The multi-level retrieval strategy applied to the structured query statement yields a candidate retrieval result set, including: A multi-level retrieval strategy is executed on the structured query statement to obtain a subset of candidate retrieval results corresponding to each level of the multi-level retrieval strategy; The union of the subsets of candidate search results corresponding to the various levels of search strategies is determined as the candidate search result set; Wherein, the confidence level corresponding to the candidate search result is the weighted sum of the confidence levels of the candidate search result in the subset of candidate search results corresponding to each level of search strategy, or the maximum confidence level of the candidate search result in the subset of candidate search results corresponding to each level of search strategy.
5. The method according to claim 4, characterized in that, The method further includes: If the confidence level of each candidate search result in the candidate search result set is less than a first preset threshold, the full-text search engine is invoked to perform inverted index matching on the query statement in the historical response database. The matched historical question-and-answer pairs and the confidence scores corresponding to each historical question-and-answer pair are used as a backup candidate retrieval result set. The confidence scores corresponding to the historical question-and-answer pairs are used to characterize the relevance scores between the historical question-and-answer pairs and the structured query statement. The step of determining the candidate search result set by the union of the subsets of candidate search results corresponding to the various levels of search strategies includes: The candidate search result set is determined by the union of the subset of candidate search results corresponding to each level of search strategy and the set of guaranteed candidate search results. Wherein, the confidence level corresponding to the candidate search result is the weighted sum of the confidence levels of the candidate search result in the subset of candidate search results corresponding to each level of search strategy and the set of guaranteed candidate search results, or it is the maximum value of the confidence level of the candidate search result in the subset of candidate search results corresponding to each level of search strategy and the set of guaranteed candidate search results.
6. The method according to claim 1, characterized in that, The step of determining the response statement corresponding to the query statement based on the candidate retrieval result set includes: Based on the confidence level of each candidate search result, the candidate search result with the highest confidence level in the candidate search result set is determined as the response statement corresponding to the query statement.
7. The method according to claim 1, characterized in that, The step of determining the response statement corresponding to the query statement based on the candidate retrieval result set includes: Select at least one candidate search result with a confidence level greater than a second preset threshold from the multiple candidate search results included in the candidate search result set; Based on the target user's historical interaction characteristics, the at least one candidate search result is sorted, and the candidate search result with the highest sorting result is determined as the response statement corresponding to the query statement.
8. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the customer service response method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the customer service response method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed by a processor, implement the customer service response method as described in any one of claims 1 to 7.
