E-commerce customer service response method, device and equipment based on intelligent agent and storage medium
By using an agent-based e-commerce customer service response method, dynamic intent correction is achieved through intent recognition and memory network models. An association matrix is constructed and intelligent routing is performed, which solves the problems of insufficient intent recognition accuracy and weak context management capabilities in existing technologies. This enables efficient, accurate and coherent responses in e-commerce customer service systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI JIANSHIDUO INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-05-15
AI Technical Summary
Existing e-commerce customer service systems have shortcomings such as fragmented responses, weak multi-turn dialogue capabilities, inaccurate knowledge retrieval, shallow understanding of intent, and cumbersome tool integration, making it difficult to meet the needs for efficient, accurate, and consistent services.
An agent-based e-commerce customer service response method is adopted. It uses a pre-set intent recognition model and memory network model to classify and correct intents, constructs an intent association matrix, calls the target agent to generate response strategies through intelligent routing strategies, and reviews them through a conflict sanction mechanism to ensure knowledge consistency.
It significantly improves the responsiveness, knowledge accuracy, and standardization and scalability of tool integration in e-commerce customer service systems, and achieves intelligent multi-agent collaborative processing and accurate recognition of mixed intents.
Smart Images

Figure CN122045376A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an e-commerce customer service response method, apparatus, device, and storage medium based on intelligent agents. Background Technology
[0002] With the rapid development of the e-commerce industry, users' demands for customer service are becoming increasingly diversified and real-time, covering multiple aspects such as pre-sales guidance, after-sales service, promotional consultation, and logistics tracking. Existing e-commerce platform customer service systems generally employ human customer service, simple rule engines, or single chatbot technologies, resulting in fragmented responses, inability to achieve efficient collaboration across business processes, insufficient multi-turn dialogue capabilities leading to inconsistent user experiences, inaccurate knowledge retrieval failing to provide highly relevant real-time answers, insufficient understanding of customer intent failing to accurately identify and meet user needs, and cumbersome tool integration with inadequate scalability and maintainability. Specifically, the main shortcomings of existing technologies in the e-commerce customer service field include: a lack of specialized intelligent agent division of labor mechanisms for complex e-commerce scenarios; insufficient accuracy in mixed intent recognition, especially in mixed scenarios of product recommendation and after-sales consultation, with low accuracy and a lack of intelligent routing strategies; a lack of standardized mechanisms for tool integration, resulting in long integration cycles for new tools (usually more than 3 days), and a lack of unified tool management and automatic selection capabilities; a lack of knowledge consistency assurance mechanisms during multi-agent collaborative processing, leading to low knowledge conflict resolution rates; and insufficient multi-turn dialogue context management capabilities, resulting in generally low dialogue coherence. These shortcomings collectively restrict the intelligence level of customer service systems, making it difficult to meet the needs of efficient, accurate, and consistent services in e-commerce scenarios.
[0003] Therefore, improving the intelligence of e-commerce services is a problem that needs to be addressed. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide an e-commerce customer service response method, apparatus, device, and storage medium based on intelligent agents, which can realize intelligent e-commerce customer service. The specific solution is as follows: Firstly, this application discloses an e-commerce customer service response method based on intelligent agents, including: The intent classification process is performed on the product dialogue text sent by the user terminal using a preset intent recognition model to obtain the processed text. The historical query text, user preference records, and historical response answers corresponding to the processed text are obtained using a preset memory network model. Based on the historical query text, the user preference record, and the historical response answers, the processed text is subjected to intent correction processing to obtain the corrected text, and an intent association matrix corresponding to the corrected text is constructed. Based on the intent association matrix, a target routing strategy is determined from the preset routing strategies, and based on the target routing strategy, the target agent is invoked to generate an initial response strategy; The initial response strategy is reviewed using a preset conflict sanction mechanism, and the approved initial response strategy is determined as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
[0005] Optionally, the step of using a preset intent recognition model to perform intent classification processing on the product dialogue text sent by the user terminal to obtain processed text includes: Use the preset MCP protocol to call the preset tool to obtain the product dialogue text sent by the user; The product dialogue text is classified using a preset intent recognition model to obtain the processed text; the preset intent recognition model is an intent recognition model obtained by training the BETA model based on historical e-commerce customer service dialogue datasets.
[0006] Optionally, the step of using a preset memory network model to obtain the user's historical query text, user preference records, and historical response answers corresponding to the processed text includes: The short-term dialogue memory network model in the preset memory network model is used to read the historical query dialogue data of the target round of the user terminal to obtain the historical query text; The user's historical preference information is read using the medium-to-long-term dialogue memory network model in the preset memory network model to obtain the user preference record; The database in the preset memory network model is used to enhance the memory network model to read the historical response answers corresponding to the processed text from the preset knowledge base.
[0007] Optionally, the step of performing intent correction processing on the processed text based on the historical query text, the user preference record, and the historical response answers to obtain the corrected text includes: The corrected score of the processed text is determined using the preset intent recognition model and based on the historical query text, the user preference record, and the historical response answers. Obtain the user preference profile of the user terminal, and perform intent correction processing on the processed text based on the correction score and the user preference profile to obtain the corrected text.
[0008] Optionally, constructing the intent association matrix corresponding to the corrected text includes: The semantic similarity score, co-occurrence frequency score, and dependency score of the corrected text are determined based on a preset association strength determination method to obtain the target association strength score. Construct the intent association matrix corresponding to the corrected text based on the target association strength score.
[0009] Optionally, the step of determining the target routing strategy from the preset routing strategies based on the intent association matrix, and invoking the target agent to generate an initial response strategy based on the target routing strategy, includes: The target routing strategy is determined from the preset routing strategy based on the intent association matrix; If the target routing strategy is a cooperative routing strategy, then several target agents are invoked to perform cooperative responses to obtain several response results, and the several response results are merged into an initial response strategy using a preset arbitration fusion mechanism. If the target routing strategy is a parallel routing strategy, then several target agents are invoked to respond independently to obtain several response results, and the several response results are integrated into an initial response strategy. If the target routing strategy is a serial routing strategy, then the target agent is invoked to generate the initial response strategy based on the preset intent priority order.
[0010] Optionally, the step of reviewing the initial response strategy using a preset conflict sanction mechanism includes: Determine whether the response agent corresponding to the initial response strategy accesses the target knowledge source; If the responding agent does not access the target knowledge source, then the confidence score of the response content in the initial response strategy is determined; Determine whether the confidence score of the response content is greater than a preset confidence threshold; If the confidence score of the response content is less than or equal to the preset confidence threshold of the response, then the historical response accuracy score of the response agent is obtained. Determine whether the historical response accuracy score is greater than a preset score threshold; If the historical response accuracy score is less than or equal to the preset score threshold, the response content confidence score, the preset score threshold, and the preset weight value are fused to obtain the current fused score, and the current fused score is reviewed.
[0011] Secondly, this application discloses an e-commerce customer service response device based on intelligent agents, comprising: The intent classification module is used to classify the product dialogue text sent by the user terminal using a preset intent recognition model to obtain the processed text, and to use a preset memory network model to obtain the user terminal's historical query text, user preference records and the historical response answers corresponding to the processed text. The relation matrix determination module is used to perform intent correction processing on the processed text based on the historical query text, the user preference record, and the historical response answer to obtain the corrected text, and to construct the intent association relation matrix corresponding to the corrected text; The initial strategy determination module is used to determine the target routing strategy from the preset routing strategies based on the intent association matrix, and to call the target agent to generate an initial response strategy based on the target routing strategy; The customer service response module is used to review the initial response strategy using a preset conflict sanction mechanism, and determine the approved initial response strategy as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
[0012] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned agent-based e-commerce customer service response method.
[0013] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned agent-based e-commerce customer service response method.
[0014] As can be seen, in this application, a preset intent recognition model is used to classify the product dialogue text sent by the user terminal to obtain processed text. A preset memory network model is used to obtain the user terminal's historical query text, user preference records, and historical response answers corresponding to the processed text. Based on the historical query text, user preference records, and historical response answers, the processed text is subjected to intent correction processing to obtain corrected text, and an intent association matrix corresponding to the corrected text is constructed. Based on the intent association matrix, a target routing strategy is determined from preset routing strategies, and an initial response strategy is generated by calling a target agent based on the target routing strategy. A preset conflict sanction mechanism is used to review the initial response strategy, and the initial response strategy that passes the review is determined as the target response strategy, so as to respond to the product dialogue text based on the target response strategy. By using a preset intent recognition model to perform preliminary classification of product dialogue text and using a memory network model to integrate user historical queries, preference records, and historical response answers to dynamically correct intent, the application can accurately identify mixed intents in complex scenarios (such as a mixture of product recommendations and after-sales consultations), solving the problems of insufficient intent recognition accuracy and weak context management capabilities in the prior art. Subsequently, an intent association matrix is constructed based on the corrected text. The target strategy is intelligently matched from preset routing strategies, and the corresponding agent is invoked to generate the initial response strategy, achieving intelligent routing and specialized division of labor among multiple agents. Finally, a preset conflict mitigation mechanism is used to review the initial response strategy, ensuring knowledge consistency during multi-agent collaboration. The approved strategy is then adopted as the target response strategy. This creates a complete closed loop from intent recognition and routing decision-making to conflict resolution, significantly improving the responsiveness, knowledge accuracy, and standardization and scalability of tool integration in the e-commerce customer service system. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This application discloses a flowchart of an e-commerce customer service response method based on intelligent agents. Figure 2 This application discloses a flowchart of a specific agent-based e-commerce customer service response method. Figure 3 This application discloses a specific three-layer memory network architecture diagram; Figure 4This application discloses a complete workflow diagram of a specific customer service response. Figure 5 This application discloses a flowchart of a specific agent-based e-commerce customer service response method. Figure 6 This is a schematic diagram of the structure of an e-commerce customer service response device based on an intelligent agent disclosed in this application; Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] In this embodiment, existing e-commerce customer service systems rely on human operators and simple chatbots, resulting in shortcomings such as fragmented responses, weak multi-turn dialogue capabilities, inaccurate knowledge retrieval, shallow intent understanding, and cumbersome tool integration. Specifically, this manifests as a lack of agent-based division of labor, low accuracy in mixed intent recognition, long tool integration cycles, low rates of resolving knowledge conflicts among multiple agents, and insufficient context management, making it difficult to meet the demands for efficient and accurate service. Therefore, this application will specifically introduce an agent-based e-commerce customer service response method that can solve the above problems.
[0019] See Figure 1 As shown in the figure, this application discloses an e-commerce customer service response method based on intelligent agents, including: Step S11: Use a preset intent recognition model to perform intent classification processing on the product dialogue text sent by the user terminal to obtain the processed text, and use a preset memory network model to obtain the user terminal's historical query text, user preference records, and historical response answers corresponding to the processed text.
[0020] In this embodiment, the system receives customer service questions and contextual parameters (including store ID, user ID, country, language, etc.) input by the user, and generates standardized user request data, i.e., product dialogue text. The step of using a preset intent recognition model to classify the product dialogue text sent by the user to obtain processed text includes: using a preset MCP protocol to call a preset tool to obtain the product dialogue text sent by the user; and using the preset intent recognition model to classify the intent of the product dialogue text to obtain processed text. The preset intent recognition model is an intent recognition model obtained by training a BETA model based on a historical e-commerce customer service dialogue dataset. In this application, intents are categorized into five types based on the sales stage: Product Recommendation (PRODUCT_RECOMMEND): keywords such as "recommend," "what's good," and "which one is good"; Pre-sales Consultation (PRE_SELL_AGENT): keywords such as "how much," "is it in stock," and "how is it"; After-sales Service (AFTER_SELL_AGENT): keywords such as "return," "exchange," "repair," and "complaint"; Logistics Inquiry (LOGISTICS_QUERY): keywords such as "logistics," "express delivery," and "delivery"; and Other Inquiry (OTHER): other inquiries that are unclear or do not belong to the above categories. Mixed intent recognition includes examples such as: After-sales + Recommendation: "Recommend a new one while returning the item"; Consultation + Purchase: "How much is it? I'll order now"; Inquiry + Review: "How's the logistics speed? I want to give a good review."
[0021] Specifically, the tool layer uses the MCP (Model Context Protocol) to retrieve business data and employs a BERT-based e-commerce intent recognition model to perform preliminary classification of user queries.
[0022] S_base(i|Q) = Softmax(BERT_ecom(Q))_i; Where Q represents the user's current query text, and BERT_ecom is a BERT model fine-tuned on an e-commerce customer service dialogue dataset, outputting the probability distribution of four types of intent.
[0023] It should be noted that the basic intent score table in this application is shown in Table 1 below: Table 1 Basic Intent Score Table
[0024] In this embodiment, the step of obtaining the user's historical query text, user preference records, and historical response answers corresponding to the processed text using a preset memory network model includes: using a short-term dialogue memory network model in the preset memory network model to read the user's historical query dialogue data for the target round to obtain the historical query text; using a medium-to-long-term dialogue memory network model in the preset memory network model to read the user's historical preference information to obtain the user preference records; and using a database-enhanced memory network model in the preset memory network model to read the historical response answers corresponding to the processed text from a preset knowledge base. Wherein, as... Figure 2 As shown, the short-term dialogue memory network model in the preset memory network model is used to read the historical query dialogue data of the target rounds on the user's end to obtain the historical query text, including the complete content of the most recent 3-5 rounds of dialogue; a sliding window mechanism is adopted, with a window size of 5 rounds of dialogue; expired dialogue content is automatically cleaned up, and memory usage is controlled. The medium- and long-term dialogue memory network model in the preset memory network model is used to read the historical preference information of the user's end to obtain user preference records, including recording user preference information (historical purchase records, browsed product categories, brand preferences, price sensitivity, and regional preferences); recording historical interaction information (common problem types, problem-solving modes, and communication preferences); and recording business status information (ongoing orders, after-sales application status, coupon usage, and membership level); the data is persisted to the database, retaining detailed data for the most recent 6 months. The database-enhanced memory network model within a pre-defined memory network model retrieves historical response answers corresponding to the processed text from a pre-defined knowledge base. This includes obtaining common questions and standard answers from a FAQ knowledge base (which is updated daily); retrieving product details, related information, inventory, and promotional information from a product information knowledge base; obtaining return and exchange policies, warranty terms, and special category policies from an after-sales policy knowledge base; and obtaining promotional activity rules, coupon usage instructions, and membership benefits from an operational activity knowledge base. This three-layer memory management architecture (short-term dialogue, medium- to long-term business memory, and knowledge base-enhanced memory) effectively supports the continuity of multi-turn dialogues.
[0025] Step S12: Based on the historical query text, the user preference record, and the historical response answer, perform intent correction processing on the processed text to obtain the corrected text, and construct the intent association matrix corresponding to the corrected text.
[0026] In this embodiment, the step of performing intent correction processing on the processed text based on the historical query text, the user preference record, and the historical response answers to obtain the corrected text includes: determining the correction score of the processed text using the preset intent recognition model and based on the historical query text, the user preference record, and the historical response answers; obtaining the user preference profile from the user's end, and performing intent correction processing on the processed text based on the correction score and the user preference profile to obtain the corrected text. In this embodiment, the step of constructing the intent association matrix corresponding to the corrected text includes: determining the semantic similarity score, co-occurrence frequency score, and dependency score of the corrected text based on a preset association strength determination method to obtain a target association strength score; and constructing the intent association matrix corresponding to the corrected text based on the target association strength score. Specifically, the context correction score is calculated by combining the dialogue history context.
[0027] S_context(i|Q,H) = S_base(i|Q) × (1 + α × ContextRelevance(i,H)); Where: ContextRelevance(i,H) represents the relevance between intent i and historical context H, calculated through an attention mechanism; α is the context weight coefficient, ranging from [0,1]. In this invention, α=0.3, where context enhancement makes the greatest positive contribution to intent recognition. Then, based on the user preference profile P, the intent score is corrected: S_pref(i|Q,H,P) = S_context(i|Q,H) × (1 + β × PrefMatch(i,P)); Where: PrefMatch(i,P) represents the matching degree between intent i and user preference P, calculated based on the user's historical behavior; β is the preference weight coefficient, with a value range of [0,1], and β=0.2 in this invention.
[0028] Furthermore, setting the intent filtering threshold θ1=0.4, all intents satisfying S_pref(i) > θ1 are retained, forming the intent set I. The pairwise correlation strength between intents is calculated: ; Where: SemanticSim: semantic similarity of intent, calculated based on pre-trained word vectors; CoOccurFreq: co-occurrence frequency of intent, based on historical dialogue statistics; DependencyScore: intent dependency score, based on predefined rules; γ=0.4, δ=0.3, ε=0.3 are weight coefficients.
[0029] It should be noted here that the association determination rules are as follows: when Assoc(i_j,i_k) > 0.7, it is determined to be a strong association; when 0.4 < Assoc(i_j,i_k) ≤ 0.7, it is determined to be a weak association; and when Assoc(i_j,i_k) ≤ 0.4, it is determined to be no association. Then, the intention association matrix R is constructed: .
[0030] Step S13: Determine the target routing strategy from the preset routing strategy based on the intent association matrix, and call the target agent to generate an initial response strategy based on the target routing strategy.
[0031] In this embodiment, the step of determining a target routing strategy from preset routing strategies based on the intent association matrix and invoking a target agent to generate an initial response strategy based on the target routing strategy includes: determining a target routing strategy from preset routing strategies based on the intent association matrix; if the target routing strategy is a collaborative routing strategy, then invoking several target agents to perform collaborative responses to obtain several response results, and using a preset arbitration fusion mechanism to fuse the several response results into an initial response strategy; if the target routing strategy is a parallel routing strategy, then invoking several target agents to perform independent responses to obtain several response results, and integrating the several response results into an initial response strategy; if the target routing strategy is a serial routing strategy, then invoking target agents to generate an initial response strategy based on a preset intent priority order. Specifically, according to the intent association matrix R, the optimal routing strategy is selected: where strategy 1 is collaborative routing. Triggering condition: the existence of a strongly associated intent pair (i_j, i_k), R[i_j][i_k] = 2; execution method: multiple agents process collaboratively, sharing context and intermediate results, and fusing response content through a four-layer priority conflict arbitration mechanism. Strategy 2 is Parallel Routing. Triggering condition: The existence of a weakly related intent pair (i_j, i_k), R[i_j][i_k] = 1; Execution method: Multiple agents process independently in parallel, and finally integrate the response content. Strategy 3 is Serial Routing. Triggering condition: Unrelated intent pairs (i_j, i_k), R[i_j][i_k] = 0; Execution method: Processed serially according to priority, prioritizing the intent with the highest confidence.
[0032] Step S14: Review the initial response strategy using a preset conflict sanction mechanism, and determine the initial response strategy that passes the review as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
[0033] In this embodiment, the step of reviewing the initial response strategy using a preset conflict sanction mechanism includes: determining whether the response agent corresponding to the initial response strategy accesses the target knowledge source; if the response agent does not access the target knowledge source, determining the confidence score of the response content in the initial response strategy; determining whether the confidence score of the response content is greater than a preset confidence threshold; if the confidence score of the response content is less than or equal to the preset confidence threshold, obtaining the historical response accuracy score of the response agent; determining whether the historical response accuracy score is greater than a preset score threshold; if the historical response accuracy score is less than or equal to the preset score threshold, fusing the confidence score of the response content, the preset score threshold, and a preset weight value to obtain a current fused score, and reviewing the current fused score. That is, this application establishes a four-layer priority conflict arbitration mechanism. The system consists of four layers: First, authoritative source priority, i.e., authoritative knowledge base (FAQ library) > agent-generated content; Second, confidence priority, i.e., responses with a confidence score > 0.8 are given priority; Third, historical accuracy priority, i.e., agent responses with a historical accuracy score > 75% are given priority; Fourth, weighted fusion, i.e., fusion is performed by comprehensively considering confidence score, accuracy score, and weight.
[0034] It should be noted that this mechanism is mainly applied to multi-agent collaborative processing scenarios after mixed intent recognition. When a user's single question is recognized as a mixed intent (such as "return + recommendation"), it will trigger collaborative processing by multiple specialized agents. At this time, response conflicts or knowledge conflicts may occur, requiring a consistency guarantee mechanism for coordination.
[0035] The following are examples of typical conflict scenarios: Scenario 1: Knowledge conflict involving the mixed intent of "return + recommendation": User question: "This air conditioner doesn't cool well, I want to return it. Could you also recommend one that cools well?" Intent recognition: After-sales (returns) + Recommendation (new products) = strong association; Collaborative processing: The after-sales agent says, "Your 100 yuan coupon will be invalid after the return," or the recommendation agent says, "We recommend you use this 100 yuan coupon to buy a new air conditioner." At this point, a knowledge conflict arises: Can the coupon actually be used? Scenario 2: Information conflict arising from a mixed intent of "consultation + recommendation": User question: "How much does this phone cost? Can you recommend one with a better price-performance ratio?" Intent recognition: Pre-sales consultation + product recommendation = weak association; Collaborative processing: Pre-sales agent: "This phone is currently priced at 2999 yuan, and stock is limited," or Recommendation agent: "This phone is priced at 2799 yuan, offering better value for money." This will cause a knowledge conflict: inconsistent price information for the same product.
[0036] Scenario 3: Time-sensitive conflicts arising from a mixed intent of "after-sales service + logistics": User question: "I want to return the item, when will it arrive?" Intent recognition: After-sales service + logistics tracking = weak association Collaborative processing: After-sales AI agent: "Return review requires 3 business days," or, Logistics AI agent: "Pickup service will be available as early as tomorrow." This will cause a knowledge conflict: a conflict between return processing time and logistics timeliness.
[0037] Therefore, this application prioritizes authoritative knowledge sources, establishing a unified knowledge base and fact-checking mechanism to ensure all agents access the same authoritative knowledge sources; version control and update notifications are implemented for key business knowledge (such as prices, inventory, and policies); when an agent's response conflicts with an authoritative knowledge source, the authoritative knowledge source takes precedence. Response consistency checks and conflict detection involve checking the consistency of response content when multiple agents are processing collaboratively; marking conflicting responses and analyzing conflict types (knowledge conflicts, logical conflicts, and timeliness conflicts); and establishing response quality evaluation standards to quantify the degree of conflict.
[0038] After completing the response, this embodiment records all conflict cases, including conflict type, resolution strategy, and resolution effect; regularly analyzes conflict data, optimizes the knowledge source update mechanism and agent collaboration strategy; and supports manual intervention and knowledge error correction to continuously improve system consistency.
[0039] In addition, to better handle e-commerce customer service responses, this application has designed a five-layer architecture, such as... Figure 3As shown, the system comprises an access layer, orchestration layer, execution layer, tool layer, and data layer. These layers interact via standard interfaces. User requests originate in the access layer, undergo task decomposition and routing in the orchestration layer, are processed by the intelligent agent in the execution layer, invoke the MCP tool in the tool layer to retrieve business data, and finally retrieve relevant information from the knowledge base in the data layer to form a complete response returned to the user. Specifically, the access layer is responsible for user interaction and request reception, supporting Web (World Wide Web) interfaces, mobile applications, and API (Application Programming Interface) interfaces. It employs an asynchronous non-blocking I / O (Input / Output) model to handle high-concurrency requests, supporting a maximum of 1000 concurrent connections with a 30-second request timeout. The orchestration layer implements task orchestration and intelligent agent scheduling based on hybrid intent recognition, intelligent routing, and hierarchical context memory management. It uses a Directed Acyclic Graph (DAG) to represent business processes, supporting conditional branching, parallel execution, and iterative loops. A workflow engine is implemented based on an event-driven state machine model, supporting a maximum of 1000 concurrent workflow instances. The execution layer consists of multiple domain-specific intelligent agents, including pre-sales consultation agents, after-sales service agents, and product recommendation agents. Each agent achieves domain specialization based on a general-purpose large language model API and specialized prompting engineering. The tool layer is a toolset built on the MCP protocol, employing a plug-in architecture. Each tool runs as an independent MCP server, supporting hot-swapping and dynamic updates. These include knowledge base retrieval tools, order query tools, product search tools, logistics tracking tools, and after-sales application tools. The data layer is a knowledge base system based on the Milvus vector database, using a hierarchical vector index structure. It supports multimodal knowledge fusion and incremental vector updates, including a FAQ (FRACT, i.e., high-performance retrieval system) knowledge base, a product information knowledge base, an after-sales policy knowledge base, and an operational activity knowledge base.
[0040] In addition, the complete workflow from user input to customer service response is as follows: Figure 4As shown. Phase 1: User Input and Initialization (6 tasks executed in parallel): Start Node, Question Classification Node, Session Variable Initialization Node, MCP Tool List Acquisition Node, Basic Parameter Generation Node, Merchant Knowledge Base Query Node, Business Parameter Extraction Node. Phase 2: Agent Routing Decision: The conditional branch routing node selects the optimal routing strategy based on hybrid intent recognition and intelligent routing algorithms, routing the request to the corresponding processing path. Phase 3: Specialized Processing Paths: Product Recommendation Path (Query Rewriting → Product Knowledge Base Retrieval → Shopping Guide Content Generation), Pre-sales Consultation Path (Knowledge Base Waiting → Pre-sales Consultation Agent Processing), After-sales Consultation Path (Knowledge Base Waiting → After-sales Service Agent Processing). Phase 4: Data Integration and Response Generation: Variable Aggregator → Reply Format Confirmation Node. Phase 5: Session Memory Management: Session Variable Extraction and Assignment Node.
[0041] As can be seen, in this embodiment, as Figure 5As shown, a preset intent recognition model is used to classify the product dialogue text sent by the user terminal to obtain processed text. A preset memory network model is used to obtain the user terminal's historical query text, user preference records, and historical response answers corresponding to the processed text. Based on the historical query text, user preference records, and historical response answers, the processed text is subjected to intent correction processing to obtain corrected text, and an intent association matrix corresponding to the corrected text is constructed. Based on the intent association matrix, a target routing strategy is determined from preset routing strategies, and an initial response strategy is generated by calling a target agent based on the target routing strategy. A preset conflict sanction mechanism is used to review the initial response strategy, and the initial response strategy that passes the review is determined as the target response strategy, so as to respond to the product dialogue text based on the target response strategy. By using a preset intent recognition model to perform preliminary classification of product dialogue text and using a memory network model to integrate user historical queries, preference records, and historical response answers to dynamically correct intent, the system can accurately identify mixed intents in complex scenarios (such as a mixture of product recommendations and after-sales consultations), solving the problems of insufficient intent recognition accuracy and weak context management capabilities in existing technologies. Subsequently, an intent association matrix is constructed based on the corrected text. The target strategy is intelligently matched from preset routing strategies, and the corresponding agent is invoked to generate the initial response strategy, achieving specialized division of labor between intelligent routing and multiple agents. Finally, the initial response strategy is reviewed through a preset conflict sanction mechanism to ensure knowledge consistency during multi-agent collaboration. The approved strategy is then determined as the target response strategy. In other words, this application deploys the hybrid intent recognition model as an independent service, invoked in the question classification node, and implementing routing strategy selection logic in the conditional branch routing node, selecting collaborative / parallel / serial routes based on the intent association matrix. Hierarchical context memory management is integrated into the session variable extraction and assignment node to maintain recent dialogue content, storing user preferences and business status information in the system knowledge base, and integrating external knowledge base query services through MCP protocol tools. MCP tool standardization integration: An MCP tool catalog and registry center are established in the system. Automatic tool discovery and loading are implemented in the MCP tool list acquisition node, and appropriate tools are automatically selected based on user intent in the workflow node. Finally, an authoritative knowledge source repository is established within the system through a knowledge consistency guarantee mechanism. A response consistency check node is added before the variable aggregator node, and the four-layer priority conflict arbitration mechanism is implemented as conditional branching logic in the system workflow. In this way, a complete closed loop is formed from intent recognition and routing decision to conflict resolution, significantly improving the responsiveness, knowledge accuracy, and standardization and scalability of tool integration in the e-commerce customer service system.
[0042] refer to Figure 6The present application also discloses an e-commerce customer service response device based on an intelligent agent, comprising: The intent classification module 11 is used to classify the product dialogue text sent by the user terminal using a preset intent recognition model to obtain the processed text, and to use a preset memory network model to obtain the user terminal's historical query text, user preference records and the historical response answers corresponding to the processed text. The relation matrix determination module 12 is used to perform intent correction processing on the processed text based on the historical query text, the user preference record and the historical response answer, so as to obtain the corrected text and construct the intent association relation matrix corresponding to the corrected text; The initial strategy determination module 13 is used to determine the target routing strategy from the preset routing strategies based on the intent association matrix, and to call the target agent to generate an initial response strategy based on the target routing strategy; The customer service response module 14 is used to review the initial response strategy using a preset conflict sanction mechanism, and determine the initial response strategy that passes the review as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
[0043] As can be seen, in this embodiment, a preset intent recognition model is used to initially classify product dialogue text, and a memory network model is used to integrate user history of inquiries, preference records, and historical response answers to dynamically correct the intent. This accurately identifies mixed intents in complex scenarios (such as a mixture of product recommendations and after-sales consultations), solving the problems of insufficient intent recognition accuracy and weak context management capabilities in existing technologies. Subsequently, an intent association matrix is constructed based on the corrected text. The target strategy is intelligently matched from the preset routing strategy, and the corresponding intelligent agent is invoked to generate the initial response strategy, realizing intelligent routing and specialized division of labor among multiple intelligent agents. Finally, the initial response strategy is reviewed through a preset conflict sanction mechanism to ensure knowledge consistency in the multi-agent collaboration process. The strategy that passes the review is determined as the target response strategy for response. In this way, a complete closed loop is formed from intent recognition, routing decision-making to conflict resolution, significantly improving the responsiveness, knowledge accuracy, and standardization and scalability of tool integration in the e-commerce customer service system.
[0044] In some specific embodiments, the intent classification module 11 may specifically include: The text acquisition unit is used to call a preset tool using the preset MCP protocol to acquire the product dialogue text sent by the user terminal; The intent classification unit is used to classify the product dialogue text using a preset intent recognition model to obtain the processed text; the preset intent recognition model is an intent recognition model obtained by training the BETA model based on a historical e-commerce customer service dialogue dataset.
[0045] In some specific embodiments, the intent classification module 11 may specifically include: The historical query text acquisition unit is used to read the historical query dialogue data of the target round of the user terminal using the short-term dialogue memory network model in the preset memory network model, so as to obtain the historical query text. The preference record acquisition unit is used to read the user's historical preference information using the medium-to-long-term dialogue memory network model in the preset memory network model, so as to obtain the user preference record. The historical response answer acquisition unit is used to read the historical response answer corresponding to the processed text from the preset knowledge base by using the database enhancement memory network model in the preset memory network model.
[0046] In some specific embodiments, the relation matrix determination module 12 may specifically include: The score determination unit is used to determine the corrected score of the processed text based on the preset intent recognition model, the historical query text, the user preference record, and the historical response answer; An intent correction unit is used to obtain a user preference profile from the user terminal, and to perform intent correction processing on the processed text based on the correction score and the user preference profile to obtain corrected text.
[0047] In some specific embodiments, the relation matrix determination module 12 may specifically include: The association degree determination unit is used to determine the semantic similarity score, co-occurrence frequency score and dependency score of the corrected text based on a preset association strength determination method, so as to obtain the target association strength score; The intent relationship determination unit is used to construct the intent relationship matrix corresponding to the corrected text based on the target association strength score.
[0048] In some specific embodiments, the initial strategy determination module 13 may specifically include: The strategy determination unit is used to determine the target routing strategy from the preset routing strategy based on the intent association matrix; The first strategy execution unit is used to call several target agents to perform a collaborative response if the target routing strategy is a collaborative routing strategy, so as to obtain several response results, and use a preset arbitration fusion mechanism to fuse the several response results into an initial response strategy. The second strategy execution unit is used to call several target agents to respond independently if the target routing strategy is a parallel routing strategy, so as to obtain several response results, and integrate the several response results into an initial response strategy. The third strategy execution unit is used to call the target agent to generate an initial response strategy based on a preset intent priority order if the target routing strategy is a serial routing strategy.
[0049] In some specific embodiments, the customer service response module 14 may specifically include: The first line is a judgment unit, used to determine whether the response agent corresponding to the initial response strategy accesses the target knowledge source; A confidence determination unit is used to determine the confidence score of the response content in the initial response strategy if the response agent does not access the target knowledge source. The second line is a judgment unit, used to determine whether the confidence score of the response content is greater than a preset response confidence threshold. The response accuracy determination unit is used to obtain the historical response accuracy score of the response agent if the confidence score of the response content is less than or equal to the preset response confidence threshold. The third line is a judgment unit, used to determine whether the historical response accuracy score is greater than a preset score threshold. The scoring review unit is used to, if the historical response accuracy score is less than or equal to the preset scoring threshold, fuse the response content confidence score, the preset scoring threshold and the preset weight value to obtain the current fused score, and review the current fused score.
[0050] Furthermore, embodiments of this application also disclose an electronic device, Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0051] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the agent-based e-commerce customer service response method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0052] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0053] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0054] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the agent-based e-commerce customer service response method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0055] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned agent-based e-commerce customer service response method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0056] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0057] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software 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 this application.
[0058] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0059] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, 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, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0060] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for responding to e-commerce customer service based on intelligent agents, characterized in that, include: The intent classification process is performed on the product dialogue text sent by the user terminal using a preset intent recognition model to obtain the processed text. The historical query text, user preference records, and historical response answers corresponding to the processed text are obtained using a preset memory network model. Based on the historical query text, the user preference record, and the historical response answers, the processed text is subjected to intent correction processing to obtain the corrected text, and an intent association matrix corresponding to the corrected text is constructed. Based on the intent association matrix, a target routing strategy is determined from the preset routing strategies, and based on the target routing strategy, the target agent is invoked to generate an initial response strategy; The initial response strategy is reviewed using a preset conflict sanction mechanism, and the approved initial response strategy is determined as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
2. The e-commerce customer service response method based on intelligent agents according to claim 1, characterized in that, The process of classifying the product dialogue text sent by the user using a preset intent recognition model to obtain processed text includes: Use the preset MCP protocol to call the preset tool to obtain the product dialogue text sent by the user; The product dialogue text is classified using a preset intent recognition model to obtain the processed text; the preset intent recognition model is an intent recognition model obtained by training the BETA model based on historical e-commerce customer service dialogue datasets.
3. The e-commerce customer service response method based on intelligent agents according to claim 1, characterized in that, The step of using a preset memory network model to obtain the user's historical query text, user preference records, and historical response answers corresponding to the processed text includes: The short-term dialogue memory network model in the preset memory network model is used to read the historical query dialogue data of the target round of the user terminal to obtain the historical query text; The user's historical preference information is read using the medium-to-long-term dialogue memory network model in the preset memory network model to obtain the user preference record; The database in the preset memory network model is used to enhance the memory network model to read the historical response answers corresponding to the processed text from the preset knowledge base.
4. The e-commerce customer service response method based on intelligent agents according to claim 1, characterized in that, The process of performing intent correction processing on the processed text based on the historical query text, the user preference record, and the historical response answers to obtain the corrected text includes: The corrected score of the processed text is determined using the preset intent recognition model and based on the historical query text, the user preference record, and the historical response answers. Obtain the user preference profile of the user terminal, and perform intent correction processing on the processed text based on the correction score and the user preference profile to obtain the corrected text.
5. The e-commerce customer service response method based on intelligent agents according to claim 1, characterized in that, The construction of the intent association matrix corresponding to the corrected text includes: The semantic similarity score, co-occurrence frequency score, and dependency score of the corrected text are determined based on a preset association strength determination method to obtain the target association strength score. Construct the intent association matrix corresponding to the corrected text based on the target association strength score.
6. The e-commerce customer service response method based on intelligent agents according to claim 1, characterized in that, The step of determining the target routing strategy from the preset routing strategies based on the intent association matrix, and invoking the target agent to generate an initial response strategy based on the target routing strategy, includes: The target routing strategy is determined from the preset routing strategy based on the intent association matrix; If the target routing strategy is a cooperative routing strategy, then several target agents are invoked to perform cooperative responses to obtain several response results, and the several response results are merged into an initial response strategy using a preset arbitration fusion mechanism. If the target routing strategy is a parallel routing strategy, then several target agents are invoked to respond independently to obtain several response results, and the several response results are integrated into an initial response strategy. If the target routing strategy is a serial routing strategy, then the target agent is invoked to generate the initial response strategy based on the preset intent priority order.
7. The e-commerce customer service response method based on intelligent agents according to any one of claims 1 to 6, characterized in that, The step of reviewing the initial response strategy using a pre-defined conflict sanction mechanism includes: Determine whether the response agent corresponding to the initial response strategy accesses the target knowledge source; If the responding agent does not access the target knowledge source, then the confidence score of the response content in the initial response strategy is determined; Determine whether the confidence score of the response content is greater than a preset confidence threshold; If the confidence score of the response content is less than or equal to the preset confidence threshold of the response, then the historical response accuracy score of the response agent is obtained. Determine whether the historical response accuracy score is greater than a preset score threshold; If the historical response accuracy score is less than or equal to the preset score threshold, the response content confidence score, the preset score threshold, and the preset weight value are fused to obtain the current fused score, and the current fused score is reviewed.
8. An e-commerce customer service response device based on intelligent agents, characterized in that, include: The intent classification module is used to classify the product dialogue text sent by the user terminal using a preset intent recognition model to obtain the processed text, and to use a preset memory network model to obtain the user terminal's historical query text, user preference records and the historical response answers corresponding to the processed text. The relation matrix determination module is used to perform intent correction processing on the processed text based on the historical query text, the user preference record, and the historical response answer to obtain the corrected text, and to construct the intent association relation matrix corresponding to the corrected text; The initial strategy determination module is used to determine the target routing strategy from the preset routing strategies based on the intent association matrix, and to call the target agent to generate an initial response strategy based on the target routing strategy; The customer service response module is used to review the initial response strategy using a preset conflict sanction mechanism, and determine the approved initial response strategy as the target response strategy, so as to respond to the product dialogue text based on the target response strategy.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the agent-based e-commerce customer service response method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the agent-based e-commerce customer service response method as described in any one of claims 1 to 7.