Service processing method, system and equipment based on multi-Agent cooperation and medium

By employing a multi-agent collaborative service processing method, the system coordinates agents to receive and analyze user input, invokes functional agents to execute tasks, generates response content, and executes preset processing strategies when timeouts occur. This solves the problem that existing customer service robots cannot deeply integrate with business scenarios, achieving efficient collaboration and closed-loop control, and improving user experience and customer service efficiency.

CN121745521APending Publication Date: 2026-03-27SHENZHEN XIAOYI NET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing customer service robots cannot deeply integrate with business scenarios to achieve multi-task collaboration, resulting in poor user experience, low customer service efficiency, and failure to meet the professional needs of skill-based service matching platforms.

Method used

A service processing method based on multi-agent collaboration is adopted. The coordination agent receives user input and forwards it to the problem identification agent. The user input is analyzed to determine the problem type, request priority and whether it involves order information. The corresponding functional agent is called to execute the task. The response generation agent generates the response content. The coordination agent monitors the agent execution process and executes the preset processing strategy when the timeout occurs.

Benefits of technology

It achieves efficient collaboration and closed-loop control in service processing, ensuring consistency between response content and user intent and business status, improving the stability and practicality of service responses, and significantly enhancing user experience and customer service efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745521A_ABST
    Figure CN121745521A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a service processing method, system and device based on multi-Agent cooperation and a medium, and the method comprises the steps: receiving user input through a coordination Agent, and forwarding the user input to a problem recognition Agent; analyzing and determining a problem type, a request priority and whether order information is involved or not by a problem identification Agent; the coordination Agent calls a corresponding function Agent to execute a task according to the task execution result, aggregates an analysis result and a task execution result, and transmits the result to the reply generation Agent; the reply generation Agent generates reply content and returns the reply content to the coordination Agent; and the coordinating Agent monitors the execution state of each Agent in the whole process, executes a preset strategy according to the Agent type to provide alternative input when the time is out, and finally returns a reply to a user. According to the scheme, automation, self-adaption and high robustness of the service process can be achieved, manual dependence is reduced, and the service response accuracy and practicability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, in particular to a service processing method, system, device and medium based on multi-agent cooperation. BACKGROUND

[0002] With the expansion of the business scale of skill service matching platforms (such as home appliance installation and housekeeping service platforms), user consultation needs have shifted from simple FAQ question and answer (such as "how to place an order") to complex business-related problems (such as "installation delay complaint" and "information query of the master"). The existing technology usually adopts two types of solutions: 1. Keyword retrieval customer service: through a pre-set keyword library, the user input is matched, for example, the user mentions "installation delay", and a fixed "please be patient, the master will contact you as soon as possible" template reply is returned directly; 2. Single LLM question and answer customer service: based on a general large language model to generate a reply, although it can understand natural language, it is not connected with the platform business system, and cannot query real-time order data and master information, and lacks long-term conversation memory, so the user needs to describe the problem again when repeating the consultation.

[0003] However, the above two existing methods have obvious limitations: the keyword retrieval customer service cannot understand the user's emotions and the context of the problem, the reply is mechanical and cannot solve individual business problems; the single LLM question and answer customer service has language understanding ability, but it is disconnected from the order system and user portrait, cannot provide accurate replies based on real business data, and has no exception handling mechanism, so once the model generates a timeout or the data query fails, it will result in a long time of no response to the user. These limitations ultimately result in low user consultation resolution rate, high repeated communication cost, and poor complaint handling efficiency, which cannot meet the professional customer service needs of skill service matching platforms.

[0004] Therefore, the problem of the traditional customer service robot in the prior art, which cannot deeply combine the business scenario to realize multi-task cooperation, resulting in poor user experience and low customer service efficiency, needs to be solved. SUMMARY

[0005] The main purpose of the present application is to provide a service processing method, system, device and medium based on multi-agent cooperation, which aims to solve the technical problem of the traditional customer service robot in the prior art, which cannot deeply combine the business scenario to realize multi-task cooperation, resulting in poor user experience and low customer service efficiency.

[0006] To achieve the above purpose, the first aspect of the present application provides a service processing method based on multi-agent cooperation, comprising: receiving user input based on a coordination agent and forwarding it to a problem identification agent; analyzing the user input by the problem identification agent to determine the problem type, request priority and whether it involves order information, and returning the analysis result to the coordination agent; based on the coordination Agent, calling a corresponding functional Agent according to the problem type, and performing a corresponding task through the functional Agent, and returning a task execution result to the coordination Agent; based on the coordination Agent, passing the analysis result and the task execution result to a reply generation Agent; through the reply generation Agent, generating a reply content by combining the analysis result and the task execution result, and sending the reply content to the coordination Agent; based on the coordination Agent, monitoring the execution process of each Agent, and when detecting that there is an Agent timeout, performing a preset processing strategy according to the type of the timeout Agent to provide a substitute input; through the coordination Agent, returning a final reply to the user.

[0007] Further, in the step of analyzing the user input through the problem identification Agent to determine the problem type, the request priority, and whether it involves order information, the step includes: performing semantic parsing on the natural language text of the user input to identify whether the natural language text contains a complaint intent, a service performance exception description, or an order identifier; generating a structured problem label according to the identification result, the structured problem label including the problem type, whether it involves order information, and the request priority; returning the structured problem label as an analysis result to the coordination Agent.

[0008] Further, in the step of calling a corresponding functional Agent according to the problem type based on the coordination Agent, the step includes: when the problem type indicates that it involves order information, triggering an order query operation; through the order query Agent, accessing an order database to obtain order details, service provider information, and a current performance state corresponding to the user input, and returning the order details, the service provider information, and the current performance state as a task execution result to the coordination Agent; when the problem type does not involve order information but belongs to a platform rule consultation type problem, triggering a knowledge base retrieval operation; through the knowledge base Agent, retrieving a policy clause or a service description matching the problem type from a dynamic knowledge base, and returning the policy clause or the service description as a task execution result to the coordination Agent.

[0009] Further, before the step of passing the analysis result and the task execution result to the reply generation Agent based on the coordination Agent, the step further includes: acquire historical session records associated with the user; pass the historical session records to a coordination Agent, and pass the historical session records to a reply generation Agent by the coordination Agent.

[0010] Further, in the step of generating reply content by the reply generation Agent in combination with the analysis result and the task execution result, the step comprises: fusing the analysis result, the task execution result and the historical session records to form a context-enhanced comprehensive input; determining a platform processing strategy matched with the service exception according to the comprehensive input and the request priority; generating a natural language reply text containing specific business actions and state descriptions based on the platform processing strategy.

[0011] Further, in the step of monitoring the execution process of each Agent by the coordination Agent, when detecting that there is an Agent timeout, executing a preset processing strategy according to the type of the timeout Agent to provide a substitute input, the step comprises: if the problem identification Agent does not return the analysis result within a preset time limit, generating the structured problem label as the substitute input by using a keyword matching rule; if the function Agent is an order query Agent and does not return the task execution result within a preset time limit, using the order data in the cache as the substitute input; if the reply generation Agent does not return the reply content within a preset time limit, calling a standard reply template corresponding to the problem type to generate the reply content.

[0012] Further, after the step of analyzing the user input by the problem identification Agent to determine the problem type, the request priority and whether the order information is involved, and returning the analysis result to the coordination Agent, the step further comprises: monitoring a current system resource usage state, the system resource usage state comprising a network bandwidth occupancy rate or a service request queue length; when the system resource usage state exceeds a preset threshold, differentiating resource allocation for user requests according to the request priority; wherein a user request with a high request priority is allocated a higher network transmission priority or a shorter task processing waiting time.

[0013] A second aspect of the present application proposes a service processing system based on multi-Agent collaboration, comprising: an input receiving module configured to receive user input based on a coordination Agent and forward the user input to a problem identification Agent; The issue identification module is used to analyze user input through the issue identification agent to determine the issue type, request priority, and whether order information is involved, and then return the analysis results to the coordination agent. The task scheduling module is used to call the corresponding functional agent based on the problem type by the coordination agent, and execute the corresponding task through the functional agent, and return the task execution result to the coordination agent. The data integration module is used to transmit the analysis results and the task execution results to the response generation agent based on the coordination agent; The response generation module is used to generate response content by combining the analysis results and the task execution results with the response generation agent, and send the response content to the coordination agent; The execution monitoring module is used to monitor the execution process of each agent based on the coordination agent. When an agent timeout is detected, a preset processing strategy is executed according to the type of the timeout agent to provide alternative input. The result return module is used to return the final response to the user through the coordination agent.

[0014] A third aspect of this application also includes a computer device comprising a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of any of the methods described above.

[0015] The fourth aspect of this application also includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0016] Beneficial effects This application achieves efficient collaboration and closed-loop control in service processing by constructing a multi-agent collaborative process centered on a coordination agent. The coordination agent receives user input and forwards it to the issue identification agent, which analyzes and determines the issue type, request priority, and whether order information is involved. Based on this, the coordination agent calls the corresponding functional agent to execute the task and transmits the task execution result and analysis result to the response generation agent, which generates the final response content, ensuring consistency between the response content and the user's intent and business status. Simultaneously, the coordination agent monitors the execution process of each agent throughout. Upon detecting a timeout, it executes a preset processing strategy based on the timeout agent type to provide alternative input, avoiding service interruptions due to single points of failure. Through this mechanism, the system achieves automated task scheduling, adaptive exception handling, and traceability of the service process without manual intervention, significantly improving the stability of service response and business usability. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a service processing method based on multi-agent collaboration according to an embodiment of this application. Figure 2 This is a schematic block diagram of a service processing system based on multi-agent collaboration according to an embodiment of this application; Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application.

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

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when an element is referred to as “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein may include wireless connections or wireless coupling. The term “and or” as used herein includes all or any modules and all combinations of one or more associated listed items.

[0021] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0022] Reference Figure 1 This invention provides a service processing method based on multi-agent collaboration, including steps S1-S7, specifically: S1. The Coordination Agent receives user input and forwards it to the Problem Identification Agent; S2. Analyze user input through the issue identification agent to determine the issue type, request priority, and whether order information is involved, and return the analysis results to the coordination agent; S3. Based on the problem type, the coordination agent calls the corresponding functional agent and executes the corresponding task through the functional agent, and returns the task execution result to the coordination agent. S4. Based on the coordination agent, the analysis results and the task execution results are transmitted to the response generation agent; S5. Generate a response by combining the analysis results and the task execution results with the response generation agent, and send the response to the coordination agent; S6. Based on the coordination agent, monitor the execution process of each agent. When an agent timeout is detected, execute a preset processing strategy according to the timeout agent type to provide alternative input. S7. The final response is returned to the user through the coordinating agent.

[0023] First, as described in step S1, the Coordination Agent, serving as the unified entry point for the multi-Agent collaboration process, receives raw input from the user terminal (including text messages or text after speech recognition), encapsulates it into a standardized request object, and forwards it to the Problem Identification Agent. This step is implemented through an internal service communication framework, employing an asynchronous call mechanism based on gRPC to ensure low latency and high concurrency processing capabilities. The request object includes the user identifier (user_id), session identifier (session_id), timestamp, and raw input text (raw_text). For example, when a user enters "My order placed yesterday hasn't been shipped yet" on the client, the Coordination Agent encapsulates this content into a structured message and routes it to the Problem Identification Agent instance based on the service registration and discovery mechanism. The purpose of this step is to establish a centralized request access point, preventing functional modules from directly exposing themselves to external input, providing a structured foundation for subsequent unified scheduling, status monitoring, and exception handling, while ensuring that all data flows are relayed through the Coordination Agent, conforming to the star-shaped interaction logic of the overall process.

[0024] As described in step S2, the problem identification agent performs semantic understanding on the user input and outputs structured analysis results, including the problem type, request priority, and whether order information is involved. This step adopts a two-stage processing mechanism: First, it uses a pre-trained language model based on the Transformer architecture (such as BERT-base) to classify the intent. The preset intent categories include "complaint," "logistics anomaly," "refund application," and "rule consultation," with a classification confidence threshold set at 0.85. Second, it combines the rule engine to determine the request priority—if the intent category is "complaint" or the input text contains keywords such as "failure to fulfill," "overdue delivery," or "not received," the request priority is marked as "high," otherwise it is marked as "normal." At the same time, it uses a named entity recognition model (such as BiLSTM-CRF) to detect whether there are order identification fields such as order number, mobile phone number, or transaction serial number. If the recognition is successful, "whether order information is involved" is set to "yes." For example, if the user inputs "I want to complain that the rider did not deliver the food," the system identifies the problem type as "complaint," the request priority as "high," and extracts the order ID "OD20251101001." This step transforms unstructured user input into structured decision-making basis, providing key input for subsequent agent scheduling and resource allocation, and undertaking the core function of intelligent triage in the overall process.

[0025] As described in step S3, the coordination agent dynamically invokes the corresponding functional agent to execute specific tasks based on the problem type and receives the task execution results returned by the agent. This step is implemented through a policy routing mechanism, which internally maintains the mapping relationship between problem types and functional agents: problems involving orders (such as logistics and fulfillment anomalies) trigger the order query agent, while rule-based problems (such as refund and modification policies) trigger the knowledge base agent. The order query agent accesses the order data table through the database connection pool, querying fields including order status (order_status), fulfillment status (fulfillment_status, with values ​​of "normal", "abnormal", and "timeout"), service provider ID (merchant_id), and estimated completion time. The knowledge base agent, based on a joint retrieval mechanism of inverted index and vector similarity, returns the policy clause with the highest matching degree from the structured knowledge base. For example, for the "order not shipped" problem, the order query agent returns: {order_id:"OD20251101001",order_status:"paid",fulfillment_status:"abnormal",merchant_id:"M1001"}. This step enables on-demand activation of business capabilities, ensuring that task execution is precisely matched with user issues, while all results are sent back to the coordinating agent to maintain the unidirectional convergence of data flow.

[0026] As described in step S4, the coordination agent aggregates the analysis results output by the problem identification agent and the task execution results returned by the function agent, and then transmits them uniformly to the response generation agent. This step is implemented through context assembly logic, which integrates the two types of results into a context object containing fields such as problem_type, priority, has_order_info, order_details (optional), and knowledge_snippet (optional). Data is asynchronously transmitted through an in-memory queue to ensure processing efficiency under high throughput. For example, when a user inquires "Why hasn't my order arrived yet?", the coordination agent integrates the analysis result {problem_type:"Logistics delay", priority:"High", has_order_info:true} with the task result {fulfillment_status:"in_transit", estimated_arrival:"2025-11-02 18:00"} to form a complete context before sending it to the response generation agent. This step lays the foundation for multi-source information fusion, avoids inaccurate responses due to information fragmentation, and is a key link connecting the analysis layer and the generation layer, ensuring that the response content has both semantic accuracy and business integrity.

[0027] As described in step S5, the response generation agent generates a natural language response based on the received context object and returns the response content to the coordination agent. This step uses a fine-tuned generative language model (such as ChatGLM-6B), with structured context as input and natural language text of no more than 200 characters as output. The model introduces priority control during the inference phase: responses to high-priority requests must include proactive responses such as "processed urgently" or "personally followed up," while ordinary requests use standard wording. Simultaneously, the output content undergoes compliance verification via a keyword filtering module. For example, for a high-priority complaint request, combined with the order's abnormal status, a response is generated: "We are very sorry for the inconvenience. This order has been marked as abnormal. We will contact the merchant immediately for processing and provide feedback on the progress within 30 minutes." This step achieves a precise mapping from structured business data to user-understandable language and is the final output link in the service loop, directly determining the user's perceived service quality.

[0028] As described in step S6, the coordination agent continuously monitors the response time of each agent during process execution. When any agent fails to return a result within a preset time limit, a preset fallback strategy is executed based on its type to provide alternative input. This step is implemented through a timer and state machine mechanism. For example, the preset timeout thresholds are: 800ms for problem identification agent, 1500ms for functional agent, and 1000ms for response generation agent. Specific strategies include: problem identification timeout → enabling keyword matching rules to generate simplified labels (e.g., setting priority=high if "complaint" is included); order query timeout → reading the order snapshot of the user in the last 5 minutes from the Redis cache; response generation timeout → calling the standard response template bound to the problem type (e.g., logistics template: "Your order is in transit, please wait patiently"). For example, if the order query agent times out due to database response delay, the system automatically uses the cached order status "shipped" as the alternative input. This step effectively prevents service interruption due to single-point processing delays, significantly improving the availability and stability of the system under high load or abnormal conditions.

[0029] As described in step S7, the coordinating agent returns the final response content to the user terminal through the original access channel, completing a full service interaction. This step is implemented through the session management module, which pushes the response content to the user device via WebSocket or HTTP callback based on the session_id, while simultaneously recording structured logs with fields including user_id, session_id, response_text, end-to-end latency, and request priority. For example, after the user receives the response on the client, the system synchronously updates the session status to "responded" and triggers a tracking event for subsequent analysis. This step achieves the final closed loop of the service process, ensuring that users receive timely feedback, while providing data support for performance monitoring, model optimization, and service quality assessment. It is a key link in realizing the value of the entire multi-agent collaboration mechanism.

[0030] In one embodiment, the step of analyzing user input through a question identification agent to determine the question type, request priority, and whether order information is involved includes: S20: Perform semantic parsing on the natural language text input by the user to identify whether the natural language text contains complaint intent, description of service performance abnormality, or order identifier; S21: Generate structured question labels based on the recognition results. The structured question labels include the question type, whether order information is involved, and the request priority. S22: Return the structured question labels as analysis results to the coordinating agent.

[0031] In this embodiment, the problem identification agent employs a multi-task joint modeling architecture to achieve semantic parsing and label generation. First, the input text is processed by an intent classification model fine-tuned based on BERT-base. During the training phase, this model incorporates complaint intents (such as "I want to complain," "The service is terrible") and descriptions of service fulfillment anomalies (such as "Haven't shipped yet," "The rider hasn't arrived") as positive samples, with a classification threshold set to 0.82. Simultaneously, an order identifier is detected using a BiLSTM-CRF named entity recognition model. Supported regular expression patterns include order number (OD12), 11-digit mobile phone number, and transaction serial number. The identification results are fed into a rule decision-maker. If a complaint intent or service fulfillment anomaly keywords (the keyword library contains 200+ entries, such as "timeout," "not delivered") are detected, the request priority is set to "high"; otherwise, it is set to "normal." If any order identifier is identified, "Whether it involves order information" is marked as true. Structured problem tags are output in JSON format, with fields including "problem_type" (values ​​such as "complaint" or "logistics_delay"), "has_order_info" (boolean), and "priority" ("high" / "normal"). This processing logic is executed by the intent recognition module, whose input comes from the coordination agent, and whose output is returned via a gRPC interface. For example, if a user inputs "I complained that order OD20251101001 hasn't been delivered yet," the system identifies the complaint intent, the fulfillment anomaly, and the order ID, generating the tag {"problem_type":"complaint","has_order_info":true,"priority":"high"}. This solution uses structured tags to uniformly express user intent, business relevance, and service urgency, solving the problems of high false positive rates and inability to distinguish priorities caused by traditional customer service systems relying on keyword matching. This significantly improves the accuracy of subsequent scheduling and the rationality of resource allocation.

[0032] In one embodiment, the step of invoking the corresponding functional agent based on the problem type using the coordination agent includes: S30: When the problem type indicates that order information is involved, an order query operation is triggered; S31: Access the order database through the order query agent, obtain the order details, service provider information and current performance status corresponding to the user input, and return the order details, service provider information and current performance status as the task execution result to the coordination agent; S32: When the question type does not involve order information but belongs to the platform rule consultation question type, a knowledge base retrieval operation is triggered; S33: The knowledge base agent retrieves policy terms or service descriptions that match the question type from the dynamic knowledge base and returns the policy terms or service descriptions as the task execution result to the coordination agent.

[0033] In this embodiment, the coordination agent executes conditional branches based on the `problem_type` and `has_order_info` fields in the problem label. If `has_order_info` is true or `problem_type` belongs to a preset order-related category (such as ["complaint", "logistics_delay", "refund"]), the order query agent is invoked; otherwise, if `problem_type` is a rule class such as ["policy_inquiry", "cancellation_rule"], a knowledge base retrieval is triggered. The order query agent accesses the MySQL order master database through a connection pool and executes parameterized SQL. The SELECT fields include `order_id`, `merchant_id`, `order_status` (enumerated values: paid / unshipped / shipped), and `fulfillment_status` (normal / abnormal / timeout). The query condition is the exact `order_id` or (`user_id + time window ≤ 7 days`). The knowledge base agent is built on Elasticsearch to create a hybrid retrieval system. Indexed documents include policy_id, category, and content. During retrieval, it combines BM25 keyword scores with Sentence-BERT vector cosine similarity (threshold ≥ 0.75) to return the top-1 result. Task execution results are returned in standardized JSON; for example, order results contain {"fulfillment_status":"abnormal"}, and knowledge base results contain {"content":"Cancellation is possible without reason before shipment"}. This logic is implemented by the task routing module, ensuring semantic alignment between function calls and user questions. For example, if a user asks "How to cancel an order," the system identifies it as a rule inquiry, triggers a knowledge base retrieval, and returns the cancellation policy. This mechanism avoids the problems of "no order to search" or "irrelevant answers" caused by fixed processes in traditional systems, improving the accuracy and business coverage of task execution.

[0034] In one embodiment, before the step of transmitting the analysis results and the task execution results to the response generation agent based on the coordination agent, the method further includes: S40: Obtain the historical session records associated with the user; S41: The historical session records are transmitted to the Coordination Agent, and the Coordination Agent transmits the historical session records to the Response Generation Agent.

[0035] In this embodiment, before the coordinating agent prepares to pass the context to the response generating agent, the system calls the session history service to query the three most recent sessions (time window ≤ 24 hours) based on user_id. Each record contains timestamp, user_utterance, system_response, and resolved_status (boolean value). Historical data is stored in ClickHouse and can be quickly retrieved using the primary key (user_id, session_id). The coordinating agent embeds the historical records into the context object as an array, with the field name "history_turns", and each item contains "user_msg" and "system_reply". This operation is performed by the context enhancement module, which actively pulls historical information during the data integration phase and merges it with the current analysis results before sending it uniformly. For example, if the user enters "Not ready yet?", combined with the previous entry in the history "My order OD20251101001 hasn't been shipped yet", the system can accurately understand that "Not ready yet" refers to the order status. Historical conversations are transmitted in JSON format: {"history_turns":[{"user_msg":"My order hasn't been shipped yet","system_reply":"Important processing has been completed"}]}. This mechanism significantly improves the contextual coherence and referential resolution capabilities of generated responses, resolving issues such as repetitive questions or irrelevant answers caused by a lack of historical memory in multi-turn conversations, and enhancing the human-like quality of the service and user trust.

[0036] In one embodiment, the step of generating response content by combining the analysis results and the task execution results with the response agent includes: S50: The analysis results, the task execution results, and historical session records are fused together to form a context-enhanced comprehensive input; S51: Based on the comprehensive input and request priority, determine the platform processing strategy that matches the service exception; S52: Generate a natural language response text containing specific business actions and status descriptions based on the platform processing strategy.

[0037] In this embodiment, the response generation agent receives comprehensive input including problem_type, priority, order_details, knowledge_snippet, and history_turns. First, it matches the platform's processing strategy through a policy decision-maker. The policy library is configured in YAML format; for example, when priority="high" and fulfillment_status="abnormal", the policy is {"action":"escalate_to_merchant","sla":"30min"}. The policy decision-maker is implemented based on a rule engine and supports multi-condition combination matching. Subsequently, the generation model (fine-tuned based on ChatGLM-6B) fuses policy actions, business data, and historical context to generate a natural language response. During model training, business action labels are introduced as conditional input to ensure that the output includes specific actions (e.g., "Contacted the merchant") and status descriptions (e.g., "Response expected within 30 minutes"). For example, for high-priority logistics exception requests, the system matches the "expedited follow-up" strategy and generates a response: "We have expedited the process for your order OD20251101001 with the merchant. We expect to provide feedback on the processing result within 30 minutes." This processing is completed by the strategy-driven response generation module, whose input comes from the coordinating agent, and whose output is returned after compliance filtering. This mechanism ensures that the response not only describes the status but also clearly states the actions taken by the platform, addressing the pain point of traditional customer service's "only explanation, no action," and significantly improving user satisfaction and problem resolution rates.

[0038] In one embodiment, the step of monitoring the execution process of each agent based on the coordination agent, and executing a preset processing strategy according to the type of the timed-out agent to provide alternative input when an agent timeout is detected, includes: S60: If the problem identification agent does not return the analysis results within the preset time limit, the structured problem label is generated using the keyword matching rule as an alternative input; S61: If the function agent is an order query agent and the task execution result is not returned within the preset time limit, the order data in the cache will be used as the alternative input; S62: If the response generation agent does not return a response within the preset time limit, the response content is generated by calling the standard response template corresponding to the question type.

[0039] In this embodiment, the coordinating agent starts an independent timer for each invoked agent, with timeout thresholds of 800ms for the problem identification agent, 1500ms for the order query agent, and 1000ms for the response generation agent. After the timeout, the system executes a differentiated fallback strategy based on the agent type. For S60, the AC automaton is enabled to match the keyword library (e.g., "complaint" → priority="high") to generate simplified tags; for S61, the order snapshot (TTL=300 seconds) for the user_id in the most recent 5 minutes is read from the Redis cache, with the field including fulfillment_status; for S62, a standard response matching the problem_type is loaded from the template library, with the template stored in JSON, such as {"problem_type":"logistics_delay","template":"Your order is in transit"}. All alternative inputs are generated by the fault tolerance module and injected into the original process path. For example, if the order query times out due to a slow database query, the system continues to generate a response using the data with fulfillment_status="shipped" in the cache. This mechanism ensures the availability of the critical path without interrupting service, solves the problem of complete service failure under high concurrency or backend anomalies, and significantly improves system robustness.

[0040] In one embodiment, after the step of analyzing user input through the question identification agent to determine the question type, request priority, and whether order information is involved, and returning the analysis results to the coordination agent, the method further includes: S70: Monitor the current system resource usage status, which includes network bandwidth utilization or service request queue length; S71: When the system resource usage exceeds a preset threshold, differentiated resource allocation is performed on user requests according to the request priority; S72: Wherein, user requests with higher priority are assigned higher network transmission priority or shorter task processing wait time.

[0041] In this embodiment, after problem identification, the Agent coordinates the resource monitoring service to obtain real-time metrics: ingress network bandwidth utilization (threshold ≥ 80%) and service request queue length (threshold ≥ 100). If either metric exceeds the limit, the system enters resource regulation mode. High-priority requests are routed to Kafka high-priority topics, where consumer threads are allocated more CPU time slices; simultaneously, the DSCP value is marked as EF (Expedited Forwarding) at the network transport layer to ensure higher bandwidth guarantees during network congestion. Ordinary requests enter the default queue, and the waiting time may be extended. This logic is implemented by the resource-aware scheduling module, whose decision inputs include monitoring metrics and priority tags. For example, when the queue length reaches 120, user complaint requests are immediately assigned to the high-priority queue and processed within 300ms, while ordinary inquiry requests wait in the queue. This mechanism ensures the response timeliness of critical services (such as complaints and fulfillment anomalies) when the system is overloaded, solving the problem of high-value user loss caused by the traditional system's "one-size-fits-all" queuing, and improving the platform's service resilience and business usability under high load.

[0042] In one embodiment, the step of monitoring the execution process of each agent based on the coordination agent further includes: S80: Records the number of consecutive failures of the order query Agent; S81: When the number of consecutive failures reaches a preset number, terminate the automatic processing flow and transfer the current user's request to a human customer service representative.

[0043] In this embodiment, the coordination agent continuously tracks the return status of the order query agent after invoking it. Each invocation records the execution result: if the order query agent fails to provide valid order details due to database connection timeout, RPC error, or returning an empty result (without a valid cache to fall back on), it is considered an "execution failure." The coordination agent maintains an independent "order query failure counter" for each user session, initially set to 0, stored in the session context state object. The counter increments after each failure and resets to 0 upon successful execution. A preset failure threshold of 3 times is set, managed in YAML format through the system configuration center (e.g., fail_threshold:3). When the counter value reaches this threshold, the coordination agent immediately terminates the current automatic processing flow, no longer attempting to re-invoke the order query agent or enter the response generation stage, but instead triggers a human customer service transfer mechanism. Specifically, the coordinating agent encapsulates the complete context of the current session (including user_id, session_id, original user input, problem identification results, historical failure logs, and cached data already attempted) into a structured message, pushes it to the human customer service dispatch system via a highly reliable message queue (such as RabbitMQ), and returns a standardized prompt to the user terminal: "The system is temporarily unable to obtain your order information. You have been transferred to a human customer service specialist. Please wait." After receiving this message, the human customer service terminal can directly view the background of the user's problem and the system's attempt record, avoiding repeated inquiries. For example, if a user inquires three times, "Why hasn't my order OD20251101001 been shipped yet?", and the order database continues to return empty results due to a failure and the cache has expired, the system will automatically transfer the user to a human after the third failure. This mechanism effectively prevents the user from getting stuck in an invalid loop of calls when the underlying service is continuously unavailable, reduces user waiting time, and ensures that high-value order requests can still be handled manually after the automation fails, significantly improving the fault tolerance of the service system and the user experience.

[0044] Reference Figure 2 This is a block diagram of a service processing system based on multi-agent collaboration in one embodiment of this application. The system includes: The input receiving module 100 is used to receive user input based on the coordination agent and forward it to the problem identification agent; The problem identification module 200 is used to analyze user input through the problem identification agent to determine the problem type, request priority and whether order information is involved, and return the analysis results to the coordination agent; The task scheduling module 300 is used to call the corresponding functional agent based on the problem type according to the coordination agent, and execute the corresponding task through the functional agent, and return the task execution result to the coordination agent. The data integration module 400 is used to transmit the analysis results and the task execution results to the response generation agent based on the coordination agent; The response generation module 500 is used to generate response content by combining the analysis results and the task execution results with the response generation agent, and send the response content to the coordination agent; The execution monitoring module 600 is used to monitor the execution process of each agent based on the coordination agent. When an agent timeout is detected, a preset processing strategy is executed according to the timeout agent type to provide alternative input. The result returns modulo 700, which is used to return the final response to the user via the coordinating agent.

[0045] In one embodiment, the problem identification module 200 includes: The intent recognition unit is used to perform semantic parsing on the natural language text input by the user, and to identify whether the natural language text contains complaint intent, description of service performance abnormality, or order identifier. The tag generation unit is used to generate structured question tags based on the recognition results. The structured question tags include the question type, whether order information is involved, and the request priority. The result return unit is used to return the structured question labels as analysis results to the coordination agent.

[0046] In one embodiment, the task scheduling module 300 includes: The order query unit is used to trigger an order query operation when the question type indicates that order information is involved; The data acquisition unit is used to access the order database through the order query agent, obtain the order details, service provider information and current performance status corresponding to the user input, and return the order details, service provider information and current performance status as the task execution result to the coordination agent; The knowledge retrieval unit is used to trigger a knowledge base retrieval operation when the question type does not involve order information but belongs to the platform rule consultation question type; The terms return unit is used to retrieve policy terms or service descriptions that match the question type from the dynamic knowledge base through the knowledge base agent, and return the policy terms or service descriptions as the task execution result to the coordination agent.

[0047] In one embodiment, the system further includes a context enhancement module, the context enhancement module comprising: The history acquisition unit is used to acquire historical session records associated with the user; The record transmission unit is used to transmit the historical session records to the coordination agent, and the coordination agent transmits the historical session records to the response generation agent.

[0048] In one embodiment, the response generation module 500 includes: The context fusion unit is used to fuse the analysis results, the task execution results, and historical session records to form a context-enhanced comprehensive input; The strategy matching unit is used to determine the platform processing strategy that matches the service exception based on the comprehensive input and request priority. The text generation unit is used to generate natural language response text containing specific business actions and status descriptions based on the platform's processing strategy.

[0049] In one embodiment, the execution monitoring module 600 includes: The rule fallback unit is used to generate the structured question label as an alternative input by using keyword matching rules if the question identification agent does not return the analysis result within a preset time limit. The cache fallback unit is used to use cached order data as a substitute input if the function agent is an order query agent and the task execution result is not returned within a preset time limit. The template fallback unit is used to generate the response content by calling the standard response template corresponding to the question type if the response generation agent does not return the response content within a preset time limit.

[0050] In one embodiment, the system further includes a resource scheduling module, the resource scheduling module comprising: The resource monitoring unit is used to monitor the current system resource usage status, which includes network bandwidth utilization or service request queue length. The priority allocation unit is used to allocate resources differently to user requests based on the request priority when the system resource usage status exceeds a preset threshold. The high-priority protection unit is used in which user requests with high priority are assigned higher network transmission priority or shorter task processing wait time.

[0051] Reference Figure 3This application also provides a computer device, which can be a server, and its internal structure can be as shown in Figure 3. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor is designed to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store usage data, etc., during the service processing method based on multi-agent cooperation. The network interface of the computer device is used to communicate with external terminals via a network connection. Furthermore, the above-mentioned computer device may also be equipped with an input device and a display screen, etc. When the aforementioned computer program is executed by a processor, it implements a service processing method based on multi-agent collaboration, including the following steps: A coordination agent receives user input and forwards it to a problem identification agent; the problem identification agent analyzes the user input to determine the problem type, request priority, and whether order information is involved, and returns the analysis results to the coordination agent; the coordination agent calls the corresponding functional agent according to the problem type, and the functional agent executes the corresponding task, returning the task execution result to the coordination agent; the coordination agent transmits the analysis result and the task execution result to a response generation agent; the response generation agent combines the analysis result and the task execution result to generate response content, and sends the response content to the coordination agent; the coordination agent monitors the execution process of each agent, and when an agent timeout is detected, a preset processing strategy is executed according to the timeout agent type to provide alternative input; the coordination agent returns the final response to the user. Those skilled in the art will understand that… Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0052] One embodiment of this application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements a service processing method based on multi-agent collaboration, including the following steps: receiving user input based on a coordination agent and forwarding it to a problem identification agent; analyzing the user input through the problem identification agent to determine the problem type, request priority, and whether order information is involved, and returning the analysis result to the coordination agent; calling the corresponding functional agent according to the problem type based on the coordination agent, and executing the corresponding task through the functional agent, and returning the task execution result to the coordination agent; transmitting the analysis result and the task execution result to a response generation agent based on the coordination agent; generating response content by combining the analysis result and the task execution result through the response generation agent, and sending the response content to the coordination agent; monitoring the execution process of each agent based on the coordination agent, and when an agent timeout is detected, executing a preset processing strategy according to the timeout agent type to provide alternative input; and returning the final response to the user through the coordination agent. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0053] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0054] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0055] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A service processing method based on multi-agent collaboration, characterized in that, include: The coordination agent receives user input and forwards it to the problem identification agent. The problem identification agent analyzes user input to determine the problem type, request priority, and whether order information is involved, and returns the analysis results to the coordination agent. Based on the problem type, the coordination agent calls the corresponding functional agent, executes the corresponding task through the functional agent, and returns the task execution result to the coordination agent. The coordination agent transmits the analysis results and the task execution results to the response generation agent. The response generation agent combines the analysis results and the task execution results to generate response content, and then sends the response content to the coordination agent. Based on the coordination agent monitoring the execution process of each agent, when an agent timeout is detected, a preset processing strategy is executed according to the timeout agent type to provide alternative input; The final response is returned to the user through the coordinating agent.

2. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, The step of analyzing user input through the question identification agent to determine the question type, request priority, and whether order information is involved includes: Semantic parsing is performed on the natural language text input by the user to identify whether the natural language text contains complaint intent, description of service performance abnormality, or order identifier; Based on the identification results, structured question tags are generated, which include question type, whether order information is involved, and request priority. The structured question labels are returned to the coordinating agent as analysis results.

3. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, The step of invoking the corresponding functional agent based on the problem type using the coordination agent includes: When the question type indicates that order information is involved, an order query operation is triggered; The order query agent accesses the order database to obtain the order details, service provider information, and current fulfillment status corresponding to the user input, and returns the order details, service provider information, and current fulfillment status as the task execution result to the coordination agent. When the question type does not involve order information but belongs to the category of platform rule consultation questions, a knowledge base retrieval operation is triggered; The knowledge base agent retrieves policy terms or service descriptions that match the question type from the dynamic knowledge base and returns these policy terms or service descriptions as the task execution result to the coordination agent.

4. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, Before the step of transmitting the analysis results and the task execution results to the response generation agent based on the coordination agent, the method further includes: Retrieve the historical session records associated with the user; The historical session records are passed to the Coordination Agent, which then passes them to the Response Generation Agent.

5. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, The step of generating response content by combining the analysis results and the task execution results with the response agent includes: The analysis results, task execution results, and historical session records are combined to form a context-enhanced comprehensive input. Based on the comprehensive input and request priority, determine the platform handling strategy that matches the service exception; The platform's processing strategy generates a natural language response text that includes specific business actions and status descriptions.

6. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, The step of monitoring the execution process of each agent based on the coordination agent, and executing a preset processing strategy according to the type of the timed-out agent to provide alternative input when an agent timeout is detected, includes: If the problem identification agent does not return the analysis results within the preset time limit, the structured problem label generated by the keyword matching rule will be used as the alternative input; If the function agent is an order query agent and no task execution result is returned within the preset time limit, the cached order data will be used as the alternative input. If the response generation agent does not return a response within the preset time limit, it will call the standard response template corresponding to the question type to generate the response content.

7. The service processing method based on multi-agent collaboration according to claim 1, characterized in that, After the step of analyzing user input through the problem identification agent to determine the problem type, request priority, and whether order information is involved, and returning the analysis results to the coordination agent, the method further includes: Monitor the current system resource usage status, which includes network bandwidth utilization or service request queue length; When the system resource usage exceeds a preset threshold, differentiated resource allocation is performed on user requests based on the request priority. In this context, the request priority is determined by the fact that user requests with higher priority are assigned a higher network transmission priority or a shorter task processing wait time.

8. A service processing system based on multi-agent collaboration, characterized in that, include: The input receiving module is used to receive user input based on the coordination agent and forward it to the problem identification agent; The issue identification module is used to analyze user input through the issue identification agent to determine the issue type, request priority, and whether order information is involved, and then return the analysis results to the coordination agent. The task scheduling module is used to call the corresponding functional agent based on the problem type by the coordination agent, and execute the corresponding task through the functional agent, and return the task execution result to the coordination agent. The data integration module is used to transmit the analysis results and the task execution results to the response generation agent based on the coordination agent; The response generation module is used to generate response content by combining the analysis results and the task execution results with the response generation agent, and send the response content to the coordination agent; The execution monitoring module is used to monitor the execution process of each agent based on the coordination agent. When an agent timeout is detected, a preset processing strategy is executed according to the type of the timeout agent to provide alternative input. The result return module is used to return the final response to the user through the coordination agent.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.