Intelligent customer service system and related method
Through the collaboration of dynamic management units and dynamic tool libraries, combined with natural language processing models, the problems of tool updates requiring downtime and keyword matching miscalls in traditional intelligent customer service systems have been solved, achieving flexible response and precise service of the intelligent customer service system.
Patent Information
- Application Number
- CN202510796222.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-23
AI Technical Summary
Traditional intelligent customer service systems are rigid in tool management and cannot dynamically load new tools, resulting in service interruptions. Parsing user requests relies on keyword matching, which has low accuracy and cannot meet complex business needs.
The dynamic management unit is used in collaboration with the dynamic tool library to achieve real-time registration, update and deletion of tools through a two-way communication channel. The natural language processing model is combined to parse user requests and generate accurate tool calling strategies.
The intelligent customer service system has been enabled to flexibly respond to high-frequency business changes, avoiding service interruptions and improving tool call accuracy and user interaction efficiency.
Smart Images

Figure CN120690192A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an intelligent customer service system and related methods. Background Art
[0002] With the in-depth application of artificial intelligence technology in the field of intelligent customer service, the defects of traditional intelligent customer service systems that rely on fixed rule engines and require predefined logic for tool calls are becoming increasingly prominent.
[0003] While the existing Model Context Protocol (MCP) enables cross-system contextual interaction and tool invocation in intelligent customer service scenarios, tools in the existing MCP protocol cannot be dynamically loaded. Adding or updating tools requires a server restart, leading to service interruptions in scenarios like major e-commerce promotions and real-time policy adjustments. This makes intelligent customer service systems inflexible and inadequate to meet actual needs. Furthermore, traditional intelligent customer service relies solely on keyword matching to parse user requests, resulting in low tool invocation accuracy and an inability to accurately respond to complex business needs. Summary of the Invention
[0004] Based on the above problems, this application provides an intelligent customer service system and related methods, the purpose of which is to enable the intelligent customer service system to respond in real time to high-frequency business changes and accurately analyze user requests.
[0005] The embodiments of this application disclose the following technical solutions:
[0006] In a first aspect, the present application provides an intelligent customer service system, the system comprising:
[0007] System front-end, used to receive user operation instructions and display interaction results;
[0008] The system backend is used to respond to operations by operation and maintenance personnel and generate tool management instructions;
[0009] The client module includes a message encapsulation unit and a code execution unit; the message encapsulation unit is used to encapsulate the user operation instruction into a service request message that conforms to the model context protocol format; the code execution unit is used to receive and execute the target tool code returned by the server module;
[0010] The server module includes a dynamic management unit, a routing decision unit and a dynamic tool library; the dynamic management unit is used to receive tool management instructions from the system backend, push tool registration information to the client module through a two-way communication channel and receive registration results; the routing decision unit is used to parse the business request message based on a natural language processing model, generate a tool call strategy and call the target tool code; the dynamic tool library is used to store metadata of registered tools.
[0011] In an optional implementation, the client module and the server module implement standardized interaction through a model context protocol, and the bidirectional communication channel is constructed based on the model context protocol.
[0012] In an optional implementation, the server module further includes:
[0013] The key distribution unit is used to generate an asymmetric key pair, pre-distribute the public key to the client module and save the private key.
[0014] In an optional implementation, the server module further includes:
[0015] A security encryption unit is used to encrypt the target tool code using the private key stored in the key distribution unit.
[0016] In an optional implementation, the code execution unit is specifically configured to:
[0017] Decrypting the encrypted target tool code returned by the server module using the public key pre-distributed by the key distribution unit;
[0018] Verify the decrypted tool code signature;
[0019] Execute the verified target tool code.
[0020] In an optional implementation, the routing decision unit includes:
[0021] A semantic parsing subunit, configured to extract entity information and intent features from the service request message based on a natural language processing model;
[0022] The strategy generation subunit is used to generate a tool calling strategy and call the target tool code according to the intention characteristics.
[0023] A second aspect of the present application provides a tool management method, which is applied to a server module of any one of the intelligent customer service systems provided in the first aspect, and the method includes:
[0024] Receive tool management instructions generated by the system backend;
[0025] Push tool registration information to the client module through a two-way communication channel;
[0026] Receive the registration result returned by the client module and update the dynamic tool library.
[0027] A third aspect of the present application provides a tool management method, which is applied to a client module of any one of the intelligent customer service systems provided in the first aspect, and the method includes:
[0028] Receive tool registration information pushed by the server module;
[0029] The tool registration process is executed according to the tool registration information, and the registration result is returned to the server module.
[0030] A fourth aspect of the present application provides an intelligent customer service interaction method, which is applied to a client module of any one of the intelligent customer service systems provided in the first aspect. The method includes:
[0031] Receive user operation instructions from the system front end and encapsulate the instructions into business request messages that comply with the model context protocol format;
[0032] Sending service request messages to the server module through a two-way communication channel and receiving tool call results returned by the server module;
[0033] Integrate tool call results into natural language answers and display them to users through the system front end.
[0034] In a fifth aspect, the present application provides a computer-readable storage medium for storing program code, wherein the program code is used to execute the steps of the method described in any implementation of the second aspect, the third aspect, or the fourth aspect.
[0035] Compared with the existing technology, this application has the following beneficial effects:
[0036] The intelligent customer service system proposed in this application includes: a system front end, used to receive user operation instructions and display interaction results; a system back end, used to respond to operations of operation and maintenance personnel and generate tool management instructions; a client module, including a message encapsulation unit and a code execution unit; the message encapsulation unit is used to encapsulate the user operation instructions into a business request message that conforms to the model context protocol format; the code execution unit is used to receive and execute the target tool code returned by the server module; the server module includes a dynamic management unit, a routing decision unit and a dynamic tool library; the dynamic management unit is used to receive the tool management instructions of the system back end, push tool registration information to the client module through a two-way communication channel and receive registration results; the routing decision unit is used to parse the business request message, generate a tool call strategy and call the target tool code; the dynamic tool library is used to store metadata of registered tools. It can be seen that the intelligent customer service system in the technical solution of this application supports real-time registration, updating, and deletion of tools through the collaboration of the dynamic management unit and the dynamic tool library. After the operation and maintenance personnel generate tool management instructions through the system backend, the dynamic management unit can push registration information to the client through a two-way communication channel. The client can complete hot loading of tools without restarting the service, solving the service interruption problem caused by downtime required for tool updates in traditional solutions. At the same time, the routing decision unit parses user requests based on the natural language processing model and generates precise tool call strategies, avoiding the problem of miscalls caused by traditional keyword matching, significantly improving the accuracy of tool calls and user interaction efficiency, and realizing the flexible response and precise service of the intelligent customer service system to high-frequency business changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 A schematic diagram of the structure of an intelligent customer service system provided in an embodiment of the present application;
[0039] Figure 2 A flowchart of an intelligent customer service interaction method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] As described above, the current intelligent customer service system has problems with rigid tool management and weak semantic parsing capabilities.
[0041] After research, the inventor proposed an intelligent customer service system and related methods.
[0042] The intelligent customer service system includes: a system front end for receiving user operation instructions and displaying interaction results; a system back end for responding to operations of operation and maintenance personnel and generating tool management instructions; a client module including a message encapsulation unit and a code execution unit; the message encapsulation unit is used to encapsulate the user operation instructions into a service request message in accordance with the model context protocol format; the code execution unit is used to receive and execute the target tool code returned by the server module; the server module includes a dynamic management unit, a routing decision unit and a dynamic tool library; the dynamic management unit is used to receive the tool management instructions from the system back end, push tool registration information to the client module via a two-way communication channel and receive the registration results; the routing decision unit is used to parse the service request message, generate a tool call strategy and call the target tool code; the dynamic tool library is used to store the metadata of registered tools. It can be seen that the intelligent customer service system in the technical solution of this application supports real-time registration, update and deletion of tools through the collaboration of the dynamic management unit and the dynamic tool library. After the operation and maintenance personnel generate the tool management instructions through the system back end, the dynamic management unit can push the registration information to the client via the two-way communication channel. The client can complete the hot loading of the tool without restarting the service, solving the service interruption problem caused by the need to shut down the tool update in traditional solutions. At the same time, the routing decision unit analyzes user requests based on the natural language processing model and generates precise tool calling strategies, avoiding the problem of incorrect calls caused by traditional keyword matching, significantly improving the accuracy of tool calling and user interaction efficiency, and realizing the intelligent customer service system's flexible response and precise service to high-frequency business changes.
[0043] In order to help those skilled in the art better understand the present invention, 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 the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0044] See also Figure 1 , which is a schematic diagram of the structure of an intelligent customer service system provided in an embodiment of the present application, such as Figure 1 As shown, the intelligent customer service system provided in the embodiment of the present application includes: a system front end 101, a system back end 102, a client module 103 and a server module 104.
[0045] The system front end 101 is used to receive user operation instructions and display interaction results.
[0046] In an embodiment of the present application, the system front end 101 serves as the interaction entrance between the user and the intelligent customer service system, and is used to receive multimodal operation instructions such as text and voice. For example, when the user inputs "query Shanghai weather", the system front end converts the instruction into structured data and passes it to the client module 103; it is also responsible for displaying the interaction results.
[0047] In an embodiment of the present application, the interaction result can be presented to the user through natural language answers or visual content, such as integrating weather data into a natural language answer of "Shanghai will be sunny tomorrow, and the temperature will be 25℃".
[0048] The system backend 102 is used to respond to operations of the operation and maintenance personnel and generate tool management instructions.
[0049] In the embodiment of the present application, the system backend 102 is oriented to the operation and maintenance personnel, and is used to respond to the operations of the operation and maintenance personnel and generate tool management instructions.
[0050] Operations and maintenance personnel can perform operations such as adding, deleting, and updating tools through the management interface of the system backend, such as uploading new tool code, configuring tool parameters, or monitoring tool status.
[0051] In an embodiment of the present application, the tool management instructions generated by the system backend 102 are transmitted to the server module in a standardized format (such as JSON). For example, when a new tool is added, the instructions will include information such as the tool's unique identifier, version number, code file, and metadata, and the server module will complete the registration and update of the tool accordingly.
[0052] The client module 103 includes a message encapsulation unit 1031 and a code execution unit 1032 .
[0053] The message encapsulation unit 1031 is used to encapsulate the user operation instruction into a service request message that complies with the model context protocol format.
[0054] In an embodiment of the present application, the message encapsulation unit 1031 encapsulates the user operation instruction received by the system front end 101 into a service request message that complies with the Model Context Protocol (MCP) format.
[0055] The code execution unit 1032 is used to receive and execute the target tool code returned by the server module 104;
[0056] In an optional implementation, the code execution unit 1032 is configured to receive the target tool code returned by the server module 104 and load and run the tool code in an isolated environment (such as a Docker sandbox).
[0057] The server module 104 is the core processing center of the intelligent customer service system, including a dynamic management unit 1041 , a routing decision unit 1042 and a dynamic tool library 1043 .
[0058] The dynamic management unit 1041 is used to receive tool management instructions from the system backend, push tool registration information to the client module through a two-way communication channel, and receive registration results.
[0059] In an embodiment of the present application, after the dynamic management unit 1041 receives the tool management instruction from the system backend 102, it pushes the tool registration information to the client module through a two-way communication channel (such as HTTP long connection or WebSocket long connection, etc.).
[0060] In this embodiment of the present application, the registration information includes the tool's unique identifier, interface definition, and version number, and supports an incremental synchronization mechanism, transmitting only the changed parts of the tool code to reduce data usage. Simultaneously, the dynamic management unit 1041 receives the registration result returned by the client module 103, such as "registered" or "update failed."
[0061] The routing decision unit 1042 is used to parse the service request message based on a natural language processing model, generate a tool calling strategy and call the target tool code.
[0062] In an embodiment of the present application, the routing decision unit 1042 parses the service request message based on a natural language processing model (such as BERT) to generate a tool calling strategy.
[0063] In the embodiment of the present application, the tool calling strategy includes the calling order of the target tool, parameter mapping relationship and other contents.
[0064] In an example implementation, when a user asks "what will be the weather like in Shanghai tomorrow", the routing decision unit will match the weather query tool in the dynamic tool library, generate a call instruction containing the "location: Shanghai" parameter, and trigger the transmission process of the tool code.
[0065] The dynamic tool library 1043 is used to store metadata of registered tools.
[0066] In an embodiment of the present application, the dynamic tool library 1043 stores metadata of registered tools, including information such as the tool's unique identifier, version number, interface specification, status, and last update time.
[0067] In an exemplary implementation, a pseudo code example for updating a dynamic tool library is as follows:
[0068]
[0069] The following tool set definition follows the standard format of the large model toolfunc. An example of the tool format for a weather query is as follows:
[0070]
[0071] }
[0072] In an optional implementation, in order to ensure data persistence and improve high-frequency query efficiency, the dynamic tool library 1043 adopts a storage method that combines a relational database (such as MySQL) and a memory cache (such as Redis).
[0073] In the embodiment of the present application, the intelligent customer service system supports real-time registration, updating, and deletion of tools through the collaboration of a dynamic management unit and a dynamic tool library. After the operation and maintenance personnel generate tool management instructions through the system backend, the dynamic management unit can push registration information to the client through a two-way communication channel. The client can complete hot loading of tools without restarting the service, solving the service interruption problem caused by tool updates requiring downtime in traditional solutions. At the same time, the routing decision unit parses user requests based on a natural language processing model and generates a precise tool call strategy, avoiding the problem of miscalls caused by traditional keyword matching, significantly improving tool call accuracy and user interaction efficiency, and realizing the intelligent customer service system's flexible response to high-frequency business changes and precise service.
[0074] Optionally, the client module and the server module implement standardized interaction through the Model Context Protocol (MCP), and the two-way communication channel is constructed based on the MCP protocol.
[0075] In the embodiment of the present application, the service request message sent by the client and the tool registration information pushed by the server both follow the MCP format.
[0076] In an example implementation, the bidirectional communication channel is implemented using the HTTP protocol, which supports the server to actively push tool update instructions.
[0077] The embodiment of the present application ensures tool status synchronization through a two-way communication channel, reduces interface adaptation costs through a standardized MCP format, and only needs to implement protocol parsing logic when a new tool is connected, thereby improving development efficiency.
[0078] Optionally, the server module 104 further includes: a key distribution unit and a security encryption unit.
[0079] The key distribution unit is used to generate an asymmetric key pair, pre-distribute the public key to the client module and save the private key.
[0080] An asymmetric key pair consists of a public key and a private key. Data encrypted by the public key can only be decrypted by the private key, and vice versa. It is suitable for sensitive data transmission.
[0081] In an example implementation, the key distribution unit may generate a 2048-bit RSA asymmetric key pair, pre-distribute the public key to the client module 103 via HTTPS, and save the private key.
[0082] A security encryption unit is used to encrypt the target tool code using the private key stored in the key distribution unit.
[0083] In one example implementation, a public key P and a private key S are generated during initialization, and the client obtains the public key P through a secure interface. The secure encryption unit uses the private key S to perform RSA-OAEP encryption on the target tool code. For example, the weather query tool code C is encrypted into ciphertext C'. After transmission to the client, the client decrypts the code using the public key P to obtain the original code.
[0084] In one example implementation, the encryption pseudocode example is as follows:
[0085] def encrypt_message(public_key,code):
[0086] ciphertext=public_key.encrypt(plaintext.encode('utf-8'),
[0087] padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA256())
[0088] algorithm=hashes.SHA256(),label=None))
[0089] return ciphertext
[0090] In this embodiment, a key distribution unit generates an asymmetric key pair. The public key is pre-distributed to the client, and the private key is securely stored by the server. The private key is then used in conjunction with a secure encryption unit to encrypt the tool code, ensuring that the tool code is encrypted during transmission, preventing the leakage of sensitive business logic. This asymmetric encryption mechanism eliminates the need to transmit the private key across the network, reducing the risk of key leakage and improving the security of code transmission.
[0091] Optionally, the code execution unit 1032 is specifically used to: first use the public key pre-distributed by the key distribution unit to decrypt the encrypted target tool code returned by the server module 104; then verify the signature of the decrypted tool code to ensure that the code has not been tampered with; and finally execute the verified target tool code.
[0092] In one example implementation, the decryption pseudocode example is as follows:
[0093] def decrypt_message(private_key,ciphertext):
[0094] plaintext=private_key.decrypt(ciphertext,
[0095] padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None))
[0096] return plaintext.decode('utf-8')
[0097] The embodiment of the present application uses a signature verification mechanism to ensure that the target tool code has not been tampered with during transmission, and refuses to execute when verification fails, thereby avoiding malicious code injection.
[0098] Optionally, the routing decision unit 1042 includes a semantic parsing subunit and a policy generating subunit.
[0099] The semantic parsing subunit is used to extract entity information and intent features in the business request message based on a natural language processing model.
[0100] In an embodiment of the present application, the semantic parsing subunit performs word segmentation and named entity recognition on the business request message based on pre-trained models such as BERT. For example, the user request "refund progress of order 12345" is parsed into the entity "order number: 12345" and the intention "query order status".
[0101] The strategy generation subunit is used to generate a tool calling strategy and call the target tool code according to the intention characteristics.
[0102] In an embodiment of the present application, the strategy generation sub-unit matches the tools in the dynamic tool library according to the intent features. For example, the "query order status" intent corresponds to the work order processing tool, and generates a calling strategy including the tool_id "tool_workorder" and the parameter "12345", and supports multi-tool chain calling (such as first querying the order status, and then calling the logistics tool to obtain transportation information).
[0103] This embodiment of the application uses a natural language processing model to understand the contextual semantics of user requests, avoiding miscalls caused by semantic ambiguity in traditional keyword matching. It dynamically matches tools based on intent characteristics and supports chained calls of single or multiple tools, improving the system's adaptability and response accuracy to complex business scenarios.
[0104] Based on the intelligent customer service system provided in the above embodiments, this application also provides a tool management method, which is applied to the server module of any intelligent customer service system described in the above embodiments. The method includes the following steps:
[0105] Step 1: Receive tool management instructions generated by the system backend.
[0106] Step 2: Push tool registration information to the client module through a two-way communication channel.
[0107] Step 3: Receive the registration result returned by the client module and update the dynamic tool library.
[0108] Based on the intelligent customer service system provided in the above embodiments, this application also provides a tool management method, which is applied to the client module of any intelligent customer service system described in the above embodiments. The method includes the following steps:
[0109] Step 1: Receive the tool registration information pushed by the server module.
[0110] Step 2: Execute the tool registration process according to the tool registration information and return the registration result to the server module.
[0111] Based on the intelligent customer service system provided in the aforementioned embodiments, the present application also provides an intelligent customer service interaction method, which is applied to the client module of any intelligent customer service system described in the aforementioned embodiments. Figure 2 A flowchart of an intelligent customer service interaction method provided in an embodiment of the present application.
[0112] like Figure 2 As shown, the method is applied to the intelligent customer service system client module and includes the following steps:
[0113] S201: Receive user operation instructions from the system front end and encapsulate the instructions into a business request message that complies with the model context protocol format.
[0114] S202: Send a service request message to the server module through a two-way communication channel and receive the tool call result returned by the server module.
[0115] S203: Integrate the tool call results into natural language answers and display them to the user through the system front end.
[0116] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the program is executed by a processor, the method described in any of the method embodiments is implemented.
[0117] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method embodiment, since it is basically similar to the system embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the system embodiment. The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without making any creative efforts.
[0118] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. An intelligent customer service system, characterized in that: include: System front-end, used to receive user operation instructions and display interaction results; The system backend is used to respond to operations by operation and maintenance personnel and generate tool management instructions; The client module includes a message encapsulation unit and a code execution unit; the message encapsulation unit is used to encapsulate the user operation instruction into a service request message that complies with the model context protocol format; The code execution unit is used to receive and execute the target tool code returned by the server module; The server module includes a dynamic management unit, a routing decision unit, and a dynamic tool library; the dynamic management unit is used to receive tool management instructions from the system backend, push tool registration information to the client module through a two-way communication channel, and receive registration results; The routing decision unit is used to parse the service request message based on a natural language processing model, generate a tool calling strategy and call the target tool code; The dynamic tool library is used to store metadata of registered tools.
2. The system according to claim 1, wherein: The client module and the server module implement standardized interaction through a model context protocol, and the bidirectional communication channel is constructed based on the model context protocol.
3. The system according to claim 1, wherein: The server module further includes: The key distribution unit is used to generate an asymmetric key pair, pre-distribute the public key to the client module and save the private key.
4. The system according to claim 3, characterized in that The server module further includes: A security encryption unit is used to encrypt the target tool code using the private key stored in the key distribution unit.
5. The system according to claim 4, characterized in that The code execution unit is specifically used for: Decrypting the encrypted target tool code returned by the server module using the public key pre-distributed by the key distribution unit; Verify the decrypted tool code signature; Execute the verified target tool code.
6. The system according to claim 1, wherein: The routing decision unit includes: A semantic parsing subunit, configured to extract entity information and intent features from the service request message based on a natural language processing model; The strategy generation subunit is used to generate a tool calling strategy and call the target tool code according to the intention characteristics.
7. A tool management method, characterized in that: The server module applied to the intelligent customer service system according to any one of claims 1 to 6, the method comprising: Receive tool management instructions generated by the system backend; Push tool registration information to the client module through a two-way communication channel; Receive the registration result returned by the client module and update the dynamic tool library.
8. A tool management method, characterized in that: A client module applied to the intelligent customer service system according to any one of claims 1 to 6, the method comprising: Receive tool registration information pushed by the server module; The tool registration process is executed according to the tool registration information, and the registration result is returned to the server module.
9. An intelligent customer service interaction method, characterized in that: A client module applied to the intelligent customer service system according to any one of claims 1 to 6, the method comprising: Receive user operation instructions from the system front end and encapsulate the instructions into business request messages that comply with the model context protocol format; Sending service request messages to the server module through a two-way communication channel and receiving tool call results returned by the server module; Integrate tool call results into natural language answers and display them to users through the system front end.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the steps of any one of claims 7 to 9.