Charging station customer service processing method and device based on MCP protocol and tool call
Through a method based on the MCP protocol and tool calls, a large language model is used to identify user problems and call the back-end system for processing. This solves the problem of insufficient integration and collaboration capabilities of the intelligent customer service system in charging stations, realizes flexible multi-system collaboration and dynamic process orchestration, and improves user experience and service efficiency.
Patent Information
- Application Number
- CN202511015699.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-23
AI Technical Summary
The existing intelligent customer service system in charging stations has problems such as insufficient business system integration depth, lack of multi-system collaboration capabilities, and lack of dynamic process orchestration capabilities, resulting in the inability to efficiently solve users' complex needs.
A method based on the MCP protocol and tool calls is used to identify user problem types through a large language model, obtain the problem handling process according to preset mapping rules, and call the back-end business system for collaborative processing in sequence. The processing progress is recorded in real time and pushed to the user until the problem is solved in a closed loop.
It achieves flexible response to diverse user needs, improves the adaptability and efficiency of problem-solving processes, supports multi-system collaborative processing, and adapts to complex scenario services.
Smart Images

Figure CN120525544B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a charging station customer service processing method and device based on the MCP protocol and tool calling. Background Art
[0002] With the increasing popularity of new energy vehicles and the increasing number of charging stations, the problems users encounter during charging are becoming increasingly diverse. To improve service efficiency and user experience, more and more charging stations are introducing intelligent customer service systems. These systems can automatically answer various user questions, significantly improving the level of automated service.
[0003] At present, there are mainly the following types of intelligent customer service at charging stations: manual customer service: users' questions are answered manually by humans through telephone or APP, with personalized service but limited efficiency; traditional automatic voice customer service: preset voices are played through button menus, with low intelligence; keyword-based question-and-answer robots: can only answer common and simple questions and cannot handle complex needs; large-model-based intelligent customer service: using AI large models (such as ChatGPT, etc.) to understand users' natural language, can automatically answer more complex questions, and even conduct multiple rounds of conversations, with no service time restrictions and a high degree of intelligence.
[0004] However, although intelligent customer service based on large models has been applied in scenarios such as charging stations, it still has the following shortcomings:
[0005] 1. Weak integration with business systems: While intelligent customer service based on large models can understand user issues, it often relies too heavily on database updates and maintenance, and cannot delve into the charging station's business systems (such as device status query, order processing, and remote reboot) in real time. It can only provide general suggestions, and customer issues are not efficiently resolved.
[0006] 2. Lack of multi-system collaboration: Existing intelligent customer service systems can usually only answer single questions and are unable to automatically call on system tools (such as device management, payment, refunds, etc.) to collaboratively solve complex problems for users;
[0007] 3. Lack of intelligent decision-making and dynamic process orchestration capabilities: Existing intelligent customer service systems are unable to intelligently determine which systems to call and which business processes to follow based on specific user questions. They lack flexible automated process orchestration and decision-making capabilities, resulting in rigid service processes that are unable to adapt to changing user needs.
[0008] Therefore, the existing intelligent customer service system has problems such as insufficient business system integration depth, lack of multi-system collaboration capabilities, and lack of dynamic process orchestration capabilities. Summary of the Invention
[0009] The embodiments of the present invention provide a charging station customer service processing method and device based on the MCP protocol and tool call, aiming to solve the problems of insufficient business system integration depth, lack of multi-system collaboration capabilities, and lack of dynamic process orchestration capabilities in existing intelligent customer service systems.
[0010] In a first aspect, an embodiment of the present invention provides a charging station customer service processing method based on the MCP protocol and tool call, the method comprising:
[0011] With the help of a large language model, the natural language questions input by users are identified to obtain the corresponding question types;
[0012] Obtaining a problem handling process corresponding to the problem type according to a preset mapping rule;
[0013] Call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem;
[0014] During the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is resolved in a closed loop.
[0015] In a second aspect, an embodiment of the present invention further provides a charging station customer service processing device based on the MCP protocol and tool call, the device comprising:
[0016] The recognition unit is used to identify the natural language questions input by the user with the help of the language model and obtain the corresponding question type;
[0017] An acquisition unit, configured to acquire a problem handling process corresponding to the problem type according to a preset mapping rule;
[0018] A calling unit is used to call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem;
[0019] The processing unit is used to record the problem handling progress and results in real time during the problem handling process and push them to the user until the problem is resolved in a closed loop.
[0020] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method described in the first aspect can be implemented.
[0022] The present invention provides a charging station customer service processing method and device based on the MCP protocol and tool call, the method comprising: using a large language model to identify natural language questions input by the user to obtain the corresponding question type; obtaining the problem processing process corresponding to the question type according to a preset mapping rule; calling the back-end business system in sequence according to the problem processing process to collaboratively handle the problem; during the problem handling process, recording the problem handling progress and processing results in real time and pushing them to the user until the problem is closed-loop resolved. The embodiments of the present invention have the following beneficial effects: 1. Obtaining the problem handling process corresponding to the problem type according to the preset mapping rules. Through this dynamic adaptation mechanism, it is possible to flexibly respond to the diverse needs of different users, significantly improving the adaptability of the problem handling process and the flexibility of problem handling; 2. Calling the back-end business system according to the problem handling process to achieve multi-system collaborative processing and support complex scenario services. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A flowchart of a charging station customer service processing method based on the MCP protocol and tool call provided in an embodiment of the present invention;
[0025] Figure 2 A schematic block diagram of a charging station customer service processing device based on the MCP protocol and tool call provided in an embodiment of the present invention;
[0026] Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0028] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0030] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. The embodiment of the present invention provides a charging station customer service processing method and device based on the MCP protocol and tool call. The charging station customer service processing method based on the MCP protocol and tool call can be found in Figure 1 , Figure 1 This is a flow chart of a charging station customer service processing method based on the MCP protocol and tool invocation, provided in an embodiment of the present invention. This method, based on the MCP protocol and tool invocation, is applied to the controller of the charging station intelligent customer service system. The present invention is described in detail below using specific embodiments.
[0031] Figure 1 The flowchart of the charging station customer service processing method based on the MCP protocol and tool call provided by the embodiment of the present invention is as follows. Figure 1 As shown, the method includes the following steps S110-S140.
[0032] S110. Using a large language model, identify the natural language question input by the user to obtain the corresponding question type.
[0033] In this embodiment, users input questions through various channels such as APP, WeChat mini-programs, and web pages. The front-end sends the natural language questions input by users to the charging station intelligent customer service system at the back-end; the back-end adopts the Spring AI framework and connects to the language big model (such as ChatGPT, etc.) service by calling the API interface. Relying on the natural language understanding ability of the language big model, it supports diversified input forms such as fuzzy expressions, dialects, typos, etc.; with the help of the language big model, the natural language questions input by users are identified to obtain the corresponding question types, such as equipment failure, payment anomalies, order inquiries, account problems, complaints and suggestions, etc.
[0034] In one embodiment, step S110 includes: converting the natural language question input by the user into a question vector; quickly matching vector data with semantically similar semantics to the question vector in the historical conversation vector library through vector retrieval; fusing the question vector with the vector data to obtain a fused vector; and inputting the fused vector into the language macro model for intent analysis, whereupon the language macro model determines the question type based on the generated user intent.
[0035] In this embodiment, the natural language question input by the user is converted into a question vector; vector data with similar semantics to the question vector is quickly matched in the historical dialogue vector library through vector retrieval; a large number of historical question processing records are stored in the historical dialogue vector library, and similar historical archived questions and corresponding historical archived processing records can be quickly found through vector retrieval, and the language macro model is assisted to better understand the user intention based on the found historical archived questions and corresponding historical archived processing records, wherein the historical question processing records are stored in the historical dialogue vector library in the form of vectors; the question vector is fused with the vector data to obtain a fused vector; after the fused vector is input into the language macro model for intent analysis, the language macro model determines the question type based on the generated user intention.
[0036] S120: Obtain a problem handling process corresponding to the problem type according to a preset mapping rule.
[0037] In this embodiment, the charging station intelligent customer service system has a built-in process orchestration engine (such as an open source workflow engine such as Spring Cloud Flow). The process orchestration engine obtains the problem handling process corresponding to the problem type according to preset mapping rules. The mapping rules are pre-configured in the form of a standardized process template (stored in YAML / JSON format). In the standardized process template, each problem type corresponds to a set of problem handling processes.
[0038] In one embodiment, after step S120, it also includes: after obtaining the newly added user intention, based on the mapping rule, dynamically loading the problem handling process according to the newly added user intention, generating a new problem handling process, and the new problem handling process is adapted to the newly added user intention.
[0039] In this embodiment, a new user intent refers to an interaction intent that is newly generated by the user through natural language input (such as supplementary questions, demand changes, additional demands, etc.) in the current problem handling process, which is different from the original problem type or handling direction. For example: the user's original demand is "query the current charging order progress", and during the problem handling process, the user asks a supplementary question "Can I apply for compensation if the order times out?", "apply for timeout compensation" constitutes a new user intent. At this time, based on the mapping rules, "query the current charging order progress" corresponds to problem handling process A, and "apply for timeout compensation" corresponds to problem handling process B. Problem handling process A is dynamically loaded according to problem handling process B to generate a problem handling process C (i.e., a new problem handling process) that is adapted to problem handling process B. Problem handling process C can flexibly connect the original problem handling process A with the newly added problem handling process B to avoid service interruptions caused by changes in user needs and improve process adaptability.
[0040] S130: Call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem.
[0041] In this embodiment, the charging station intelligent customer service system relies on the Model Context Protocol (MCP) to build a unified interface management system, which standardizes the registration and scheduling of API interfaces of various business systems such as equipment management, payment, orders, work orders, and membership. On this basis, Spring AI's tool calling mechanism (Tool Calling) is deeply integrated with the MCP protocol, enabling the language model to automatically select and call the corresponding business system interface from the registration tool of the MCP platform based on the parsed user intent. For example, when a user asks to "query charging orders and apply for invoices", the language model can use this integration mechanism to call the order system interface to obtain order information, and then trigger the invoice application tool of the payment system, realizing the automated connection of cross-system business and improving the consistency and intelligence of service processing.
[0042] In one embodiment, step S130 includes: during the problem handling process, dynamically selecting the next branch process according to the problem handling progress, handling results and conditional judgment rules in the problem handling process; and calling the interface of the corresponding backend business system for the selected branch process.
[0043] In this embodiment, during the problem handling process, the next branch process is dynamically selected based on the problem handling progress, the processing result of the current node, and the conditional judgment rules preset in the problem handling process. For the selected branch process, the corresponding backend business system interface is called to execute specific operations. For example, the natural language description of the process node (e.g., "the device is online and has sufficient battery") is converted into an executable structured expression (e.g., "device_status=online AND battery_level>70%"), and this structured expression serves as the core judgment basis (i.e., the conditional judgment rule) for the automated flow of each node in the problem handling process. If the processing result of the current node is "the device status is online and the battery_level=90%, which satisfies the conditional judgment rule of the current node," branch process A is selected (e.g., directly generating a reservation order and calling the order system interface to complete the reservation). If the processing result of the current node is "the device status is online but the battery_level=50%, which does not satisfy the conditional judgment rule of the current node," branch process B is selected (e.g., calling the device management system interface to trigger priority charging mode and then executing the reservation process after the battery reaches the required level).
[0044] The present invention implements a dynamic branch selection mechanism based on conditional judgment rules, realizes the automatic flow of process nodes and the precise execution of business operations, and improves process adaptability and processing efficiency.
[0045] S140: During the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is closed-loop resolved.
[0046] In this embodiment, during the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is closed-loop resolved (that is, the problem handling process reaches the closed-loop point). Through this real-time visual feedback of the problem handling progress and results, the user can clearly grasp the problem solving dynamics and effectively alleviate waiting anxiety.
[0047] In one embodiment, after step S140, the method further includes: if an abnormal event is detected, determining a target compensation mechanism according to the abnormal type of the abnormal event; and processing the abnormal event according to the target compensation mechanism.
[0048] In this embodiment, if an abnormal event is detected (such as an interface call failure, data verification exception, or branch execution interruption, etc.), a target compensation mechanism is determined based on the abnormal type of the abnormal event (such as a temporary fault, an irrecoverable error, etc.); the abnormal event is processed according to the target compensation mechanism to ensure that the final processing result meets expectations; for example, if the abnormal type of the abnormal event is a temporary fault (such as network jitter), a retry mechanism is started (repeating the target operation a preset number of times); if the abnormal type of the abnormal event is an irrecoverable error (such as a data consistency conflict), a rollback mechanism is started (according to the recorded problem handling process, the undo operation of the previous node is reversed and restored to a usable state), and the compensation process is synchronously recorded to ensure the traceability of the abnormal event processing.
[0049] In one embodiment, step S140 includes: when a user initiates a problem processing request, creating an exclusive context storage space for the user, and the context storage space is used to store the problem processing progress, processing results and conversation content of each round of nodes; after each node of the problem processing is executed, after the user preferences and historical conversation content are extracted from the context storage space, based on the current problem processing progress, current processing results, the user preferences and the historical conversation content, a conversation content with contextual coherence is generated and pushed to the user.
[0050] In this embodiment, when a user initiates a problem processing request, an exclusive context storage space is created for the user. The context storage space is used to store the problem processing progress, processing results and conversation content of each round of nodes; after each node of the problem processing is executed, the user preferences (such as interaction style preferences, service method preferences, etc.) and historical conversation content are extracted from the context storage space, and the current problem processing progress, current processing results, the user preferences and the historical conversation content are input into the language model for processing. The language model generates conversation content with contextual coherence based on the input information and pushes it to the user.
[0051] In one embodiment, after step S140, it also includes: when the user initiates a new problem handling request and there is currently an unresolved problem, generating a prompt message based on the new problem handling request and pushing it to the user; the prompt message includes an interactive option to guide the user to confirm whether to add a new question; receiving the answer returned by the user to the prompt message to determine whether the newly initiated problem handling request is a new problem handling request independent of historical problems; if the newly initiated problem handling request is a new problem handling request independent of historical problems, the new problem and the historical problem are processed in parallel through a multi-threaded scheduling mechanism.
[0052] In this embodiment, when a user initiates a new problem handling request and there are currently unresolved issues, a prompt message is generated based on the new problem handling request and pushed to the user. The prompt message includes interactive options guiding the user to confirm whether to add a new problem. The user's response to the prompt message is received, and a determination is made as to whether the newly initiated problem handling request is a new problem handling request independent of previous problems (i.e., currently unresolved problems). If the newly initiated problem handling request is a new problem handling request independent of previous problems, a multi-threaded scheduling mechanism is used to process the new and previous problems in parallel. This invention supports the parallel processing of multiple problem handling processes, improving the charging station intelligent customer service system's ability to handle complex needs.
[0053] To sum up, the embodiments of the present invention have the following beneficial effects: 1. The problem handling process corresponding to the problem type is obtained according to the preset mapping rules. Through this dynamic adaptation mechanism, it can flexibly respond to the diverse needs of different users and significantly improve the adaptability of the problem handling process and the flexibility of problem handling; 2. The back-end business system is called according to the problem handling process to realize multi-system collaborative processing and support complex scenario services.
[0054] Figure 2 This is a schematic block diagram of a charging station customer service processing device based on the MCP protocol and tool call provided by an embodiment of the present invention. Figure 2 As shown, corresponding to the above charging station customer service processing method based on MCP protocol and tool call, the present invention also provides a charging station customer service processing device based on MCP protocol and tool call, and the device is configured in the controller of the charging station intelligent customer service system. Figure 2 The charging station customer service processing device 700 based on the MCP protocol and tool call includes:
[0055] The recognition unit 701 is used to recognize the natural language question input by the user with the help of the language model and obtain the corresponding question type;
[0056] An acquisition unit 702 is configured to acquire a problem handling process corresponding to the problem type according to a preset mapping rule;
[0057] The calling unit 703 is used to call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem;
[0058] The processing unit 704 is used to record the problem handling progress and results in real time during the problem handling process and push them to the user until the problem is closed-loop resolved.
[0059] In some embodiments, when the recognition unit 701 performs the step of recognizing the natural language question input by the user with the help of the language large model and obtaining the corresponding question type, it is specifically used to:
[0060] The natural language question input by the user is converted into a question vector; vector data with similar semantics to the question vector is quickly matched in the historical conversation vector library through vector retrieval; the question vector and the vector data are fused to obtain a fused vector; the fused vector is input into the language model for intent analysis, and the language model determines the question type based on the generated user intent.
[0061] In some embodiments, after executing the problem processing flow steps corresponding to the problem type according to the preset mapping rule, the obtaining unit 702 is further configured to:
[0062] After obtaining the newly added user intention, based on the mapping rule, the problem handling process is dynamically loaded according to the newly added user intention to generate a new problem handling process, and the new problem handling process is adapted to the newly added user intention.
[0063] In some embodiments, when the calling unit 703 sequentially calls the backend business system according to the problem handling process to collaboratively perform the problem handling steps, it is specifically used to:
[0064] During the problem handling process, the next branch process is dynamically selected based on the problem handling progress, processing results and conditional judgment rules in the problem handling process; for the selected branch process, the interface of the corresponding back-end business system is called.
[0065] In some embodiments, the processing unit 704 is further configured to:
[0066] If an abnormal event is detected, a target compensation mechanism is determined according to the abnormal type of the abnormal event; and the abnormal event is processed according to the target compensation mechanism.
[0067] In some embodiments, when the processing unit 704 records the problem handling progress and results in real time and pushes them to the user during the problem handling process, it is specifically used to:
[0068] When a user initiates a problem handling request, a dedicated context storage space is created for the user. The context storage space is used to store the problem handling progress, processing results and conversation content of each round of nodes. After the execution of each node of the problem handling is completed, the user preferences and historical conversation content are extracted from the context storage space. Based on the current problem handling progress, current processing results, the user preferences and the historical conversation content, conversation content with contextual coherence is generated and pushed to the user.
[0069] In some embodiments, the processing unit 704 is further configured to:
[0070] When a user initiates a new problem handling request and there are currently unresolved issues, a prompt message is generated based on the new problem handling request and pushed to the user; the prompt message includes interactive options to guide the user to confirm whether to add a new question; the answer returned by the user to the prompt message is received to determine whether the newly initiated problem handling request is a new problem handling request independent of historical problems; if the newly initiated problem handling request is a new problem handling request independent of historical problems, the new problem and historical problems are processed in parallel through a multi-threaded scheduling mechanism.
[0071] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned charging station customer service processing device and each unit based on the MCP protocol and tool call can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, it will not be repeated here.
[0072] The charging station customer service processing device based on the MCP protocol and tool call can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the electronic devices shown.
[0073] See also Figure 3 , Figure 3 8 is a schematic block diagram of an electronic device provided by an embodiment of the present invention. The electronic device 800 can be a terminal or a server, wherein the terminal can be an electronic device with communication functions. The server can be a standalone server or a server cluster consisting of multiple servers.
[0074] See Figure 3 The electronic device 800 includes a processor 802 , a memory, and a network interface 805 connected via a system bus 801 , wherein the memory may include a non-volatile storage medium 803 and an internal memory 804 .
[0075] The non-volatile storage medium 803 can store an operating system 8031 and a computer program 8032. The computer program 8032 includes program instructions, which, when executed, can cause the processor 802 to execute a charging station customer service processing method based on the MCP protocol and tool call.
[0076] The processor 802 is used to provide computing and control capabilities to support the operation of the entire electronic device 800.
[0077] The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803. When the computer program 8032 is executed by the processor 802, the processor 802 can execute a charging station customer service processing method based on the MCP protocol and tool call.
[0078] The network interface 805 is used to communicate with other devices through the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the electronic device 800 to which the solution of the present invention is applied. The specific electronic device 800 may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0079] The processor 802 is configured to execute a computer program 8032 stored in the memory to implement the following steps:
[0080] With the help of a large language model, the natural language questions input by the user are identified to obtain the corresponding question type; the problem handling process corresponding to the question type is obtained according to the preset mapping rules; the back-end business system is called in sequence according to the problem handling process to collaboratively handle the problem; during the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is closed-loop resolved.
[0081] In some embodiments, when the processor 802 uses the language model to identify the natural language question input by the user and obtain the corresponding question type, it specifically implements the following steps:
[0082] The natural language question input by the user is converted into a question vector; vector data with similar semantics to the question vector is quickly matched in the historical conversation vector library through vector retrieval; the question vector and the vector data are fused to obtain a fused vector; the fused vector is input into the language model for intent analysis, and the language model determines the question type based on the generated user intent.
[0083] In some embodiments, after implementing the steps of obtaining the problem processing flow corresponding to the problem type according to the preset mapping rule, the processor 802 further implements the following steps:
[0084] After obtaining the newly added user intention, based on the mapping rule, the problem handling process is dynamically loaded according to the newly added user intention to generate a new problem handling process, and the new problem handling process is adapted to the newly added user intention.
[0085] In some embodiments, the processor 802 implements the following steps when sequentially calling the backend business system according to the problem handling process to collaboratively perform the problem handling steps:
[0086] During the problem handling process, the next branch process is dynamically selected based on the problem handling progress, processing results and conditional judgment rules in the problem handling process; for the selected branch process, the interface of the corresponding back-end business system is called.
[0087] In some embodiments, the processor 802 further implements the following steps after recording the problem handling progress and processing results in real time during the problem handling process:
[0088] If an abnormal event is detected, a target compensation mechanism is determined according to the abnormal type of the abnormal event; and the abnormal event is processed according to the target compensation mechanism.
[0089] In some embodiments, when the processor 802 records the problem handling progress and results in real time and pushes them to the user during the problem handling process, the following steps are specifically implemented:
[0090] When a user initiates a problem handling request, a dedicated context storage space is created for the user. The context storage space is used to store the problem handling progress, processing results and conversation content of each round of nodes. After the execution of each node of the problem handling is completed, the user preferences and historical conversation content are extracted from the context storage space. Based on the current problem handling progress, current processing results, the user preferences and the historical conversation content, conversation content with contextual coherence is generated and pushed to the user.
[0091] In some embodiments, the processor 802 further implements the following steps after recording the problem handling progress and processing results in real time during the problem handling process:
[0092] When a user initiates a new problem handling request and there are currently unresolved issues, a prompt message is generated based on the new problem handling request and pushed to the user; the prompt message includes interactive options to guide the user to confirm whether to add a new question; the answer returned by the user to the prompt message is received to determine whether the newly initiated problem handling request is a new problem handling request independent of historical problems; if the newly initiated problem handling request is a new problem handling request independent of historical problems, the new problem and historical problems are processed in parallel through a multi-threaded scheduling mechanism.
[0093] It should be understood that in the embodiment of the present invention, the processor 802 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0094] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0095] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor performs the following steps:
[0096] With the help of a large language model, the natural language questions input by the user are identified to obtain the corresponding question type; the problem handling process corresponding to the question type is obtained according to the preset mapping rules; the back-end business system is called in sequence according to the problem handling process to collaboratively handle the problem; during the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is closed-loop resolved.
[0097] In one embodiment, when the processor executes the program instructions to implement the step of identifying the natural language question input by the user with the help of the language big model and obtaining the corresponding question type, the processor specifically implements the following steps:
[0098] The natural language question input by the user is converted into a question vector; vector data with similar semantics to the question vector is quickly matched in the historical conversation vector library through vector retrieval; the question vector and the vector data are fused to obtain a fused vector; the fused vector is input into the language model for intent analysis, and the language model determines the question type based on the generated user intent.
[0099] In one embodiment, after executing the program instructions to obtain the problem processing flow steps corresponding to the problem type according to the preset mapping rules, the processor further implements the following steps:
[0100] After obtaining the newly added user intention, based on the mapping rule, the problem handling process is dynamically loaded according to the newly added user intention to generate a new problem handling process, and the new problem handling process is adapted to the newly added user intention.
[0101] In one embodiment, when the processor executes the program instructions to sequentially call the backend business system according to the problem handling process and collaboratively perform the problem handling steps, the processor specifically implements the following steps:
[0102] During the problem handling process, the next branch process is dynamically selected based on the problem handling progress, processing results and conditional judgment rules in the problem handling process; for the selected branch process, the interface of the corresponding back-end business system is called.
[0103] In one embodiment, the processor, while executing the program instructions to implement the problem handling process, after recording the problem handling progress and handling results in real time, further implements the following steps:
[0104] If an abnormal event is detected, a target compensation mechanism is determined according to the abnormal type of the abnormal event; and the abnormal event is processed according to the target compensation mechanism.
[0105] In one embodiment, when the processor executes the program instructions to implement the problem handling process, in which the problem handling progress and results are recorded in real time and pushed to the user, the processor specifically implements the following steps:
[0106] When a user initiates a problem handling request, a dedicated context storage space is created for the user. The context storage space is used to store the problem handling progress, processing results and conversation content of each round of nodes. After the execution of each node of the problem handling is completed, the user preferences and historical conversation content are extracted from the context storage space. Based on the current problem handling progress, current processing results, the user preferences and the historical conversation content, conversation content with contextual coherence is generated and pushed to the user.
[0107] In one embodiment, the processor, while executing the program instructions to implement the problem handling process, after recording the problem handling progress and handling results in real time, further implements the following steps:
[0108] When a user initiates a new problem handling request and there are currently unresolved issues, a prompt message is generated based on the new problem handling request and pushed to the user; the prompt message includes interactive options to guide the user to confirm whether to add a new question; the answer returned by the user to the prompt message is received to determine whether the newly initiated problem handling request is a new problem handling request independent of historical problems; if the newly initiated problem handling request is a new problem handling request independent of historical problems, the new problem and historical problems are processed in parallel through a multi-threaded scheduling mechanism.
[0109] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0110] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0111] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0112] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0113] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling an electronic device (such as a personal computer, terminal, or network device) to perform all or part of the steps of the method described in various embodiments of the present invention.
[0114] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A charging station customer service processing method based on MCP protocol and tool calling, characterized in that: The method comprises: With the help of a large language model, the natural language questions input by users are identified to obtain the corresponding question types; Obtaining a problem handling process corresponding to the problem type according to a preset mapping rule; Call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem; During the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user until the problem is closed-loop resolved; The language model is used to identify the natural language questions input by the user and obtain the corresponding question types, including: Convert the natural language questions input by users into question vectors; Quickly match vector data with semantically similar semantics to the question vector in the historical conversation vector library through vector retrieval; fusing the problem vector with the vector data to obtain a fused vector; After inputting the fusion vector into the language model for intent parsing, the language model determines the question type based on the generated user intent; After obtaining the problem processing flow corresponding to the problem type according to the preset mapping rule, the method further includes: After obtaining the newly added user intent, based on the mapping rule, the problem handling process is dynamically loaded according to the newly added user intent to generate a new problem handling process, and the new problem handling process is adapted to the newly added user intent; The back-end business systems are called in sequence according to the problem handling process to collaboratively handle the problem, including: During the problem handling process, the next branch process is dynamically selected based on the problem handling progress, processing results and the conditional judgment rules in the problem handling process; For the selected branch process, call the interface of the corresponding backend business system; During the problem handling process, the problem handling progress and results are recorded in real time and pushed to the user, including: When a user initiates a problem handling request, a dedicated context storage space is created for the user. The context storage space is used to store the problem handling progress, processing results, and conversation content of each round of nodes; After each node of problem processing is executed, user preferences and historical conversation content are extracted from the context storage space, and conversation content with contextual coherence is generated based on the current problem processing progress, current processing results, user preferences and historical conversation content and pushed to the user.
2. The charging station customer service processing method based on the MCP protocol and tool call according to claim 1 is characterized in that: During the problem handling process, after recording the problem handling progress and results in real time, the following steps are also included: If an abnormal event is detected, determining a target compensation mechanism according to the abnormal type of the abnormal event; The abnormal event is processed according to the target compensation mechanism.
3. The charging station customer service processing method based on MCP protocol and tool calling according to claim 1 is characterized in that: During the problem handling process, after recording the problem handling progress and results in real time, the following steps are also included: When a user initiates a new problem handling request and there are currently unresolved issues, a prompt message is generated based on the new problem handling request and pushed to the user; the prompt message includes an interactive option to guide the user to confirm whether to add a new problem; receiving a response from the user to the prompt information and determining whether the newly initiated question handling request is a new question handling request independent of the historical question; If the newly initiated problem handling request is a new problem handling request independent of the historical problem, the new problem and the historical problem will be processed in parallel through the multi-threaded scheduling mechanism.
4. A charging station customer service processing device based on MCP protocol and tool calling, characterized in that: The device comprises: The recognition unit is used to identify the natural language questions input by the user with the help of the language model and obtain the corresponding question type; An acquisition unit, configured to acquire a problem handling process corresponding to the problem type according to a preset mapping rule; A calling unit is used to call the back-end business system in sequence according to the problem handling process to collaboratively handle the problem; The processing unit is used to record the problem handling progress and results in real time during the problem handling process and push them to the user until the problem is closed-loop resolved. The recognition unit is further configured to convert a natural language question input by a user into a question vector; quickly match vector data with semantically similar semantics to the question vector in a historical conversation vector library through vector retrieval; fuse the question vector with the vector data to obtain a fused vector; and input the fused vector into the language macro model for intent analysis, whereupon the language macro model determines the question type based on the generated user intent. The acquisition unit is further configured to, after acquiring the newly added user intent, dynamically load the problem handling process according to the newly added user intent based on the mapping rule to generate a new problem handling process, where the new problem handling process is adapted to the newly added user intent; The calling unit is further configured to dynamically select the next branch process during the problem handling process based on the problem handling progress, the handling result, and the conditional judgment rules in the problem handling process; and call the interface of the corresponding backend business system for the selected branch process; The processing unit is also used to create an exclusive context storage space for the user when the user initiates a problem processing request. The context storage space is used to store the problem processing progress, processing results and conversation content of each round of nodes; after the execution of each node of the problem processing is completed, the user preferences and historical conversation content are extracted from the context storage space, and based on the current problem processing progress, current processing results, the user preferences and the historical conversation content, a conversation content with contextual coherence is generated and pushed to the user.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the charging station customer service processing method based on the MCP protocol and tool call according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by the processor, the processor executes the charging station customer service processing method based on the MCP protocol and tool call as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Biological information MCP service calling method, system, equipment and medium
CN120336048A
Urban rail transit intelligent operation and maintenance service construction method based on MCP
CN120338288A