Intelligent customer service processing method based on natural language processing model

By adopting a processing method based on natural language processing model in the intelligent customer service system, and using Rasa NLU and Rasa Core for intent recognition and dialogue management, the shortcomings of the existing system in semantic understanding and personalized services are solved, and a higher level is achieved. Semantic understanding accuracy and personalized service quality.

CN119357328APending Publication Date: 2025-01-24SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411395568.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing intelligent customer service system has shortcomings in semantic understanding and personalized services, and it is difficult to quickly and accurately understand user intentions and provide personalized services.

Method used

Adopt intelligent customer service processing methods based on natural language processing models, use RASA NLU for intent and physical identification, combine Rasa Core for dialogue management, use convolutional neural networks and long -term memory networks to identify Essence

Benefits of technology

It improves the accuracy of semantic understanding and intent recognition of the intelligent customer service system, can better cope with diverse user language styles and practical application scenarios, provides more accurate and personalized services, and improves user experience and enterprise service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357328A_ABST
    Figure CN119357328A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent customer service processing method based on a natural language processing model. The method comprises the following steps: S1, obtaining a text message input by a user; s2, performing intention and entity recognition on the text message through the Rasa NLU to obtain the intention and the entity of the text message; s3, inputting the intention and the entity into a Rasa Core; and S4, predicting the next action through the Rasa Core so as to respond to the text message input by the user. The response speed of the intelligent customer service robot can be increased, the processing efficiency can be improved, the dialogue process can be optimized, more accurate personalized services can be realized, and the interaction effect and the user satisfaction of the intelligent customer service robot can be improved; in the current digital era, the intelligent customer service robot is widely applied to various industries, so that the intelligent customer service robot has important significance in improving customer service quality and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing and intelligent customer service technology in the field of artificial intelligence, and specifically to an intelligent customer service processing method based on a natural language processing model. Background Art

[0002] With the rapid popularization of Internet e-commerce, the demand for customer service in online shopping has shown explosive growth. The traditional manual customer service model can no longer meet the needs of enterprises to efficiently handle a large number of customer inquiries, and intelligent customer service robots have emerged. Intelligent customer service robots can respond to customer inquiries in real time and provide 24 / 7 services, greatly reducing the labor costs of enterprises.

[0003] Driven by the continuous progress of natural language processing technology, the performance and functions of intelligent customer service robots have been significantly improved. However, there are still some challenges to be solved. For example, intelligent customer service robots need to quickly and accurately understand the user's intentions and give appropriate responses in time to avoid users waiting for a long time. At the same time, different users have different needs and characteristics. How to provide users with personalized services and improve user experience is also a key issue in the development of intelligent customer service robots.

[0004] There are two existing intelligent customer service solutions: (1) Rule-based intelligent customer service system: Figure 1 As shown in the figure, many early intelligent customer service applications adopted this approach. Some companies developed simple customer service scripts on their own, which answered users' questions by setting a series of rules and keyword matching. The advantage of this approach is that it is simple and direct, and can respond quickly to some common, fixed-pattern questions. However, it requires manual writing of a large number of rules. As the business expands and user questions become more diverse, the number of rules will continue to increase, resulting in high maintenance costs and difficulty in covering all possible user questions and expressions. Secondly, it has weak capabilities for complex semantic understanding and context processing, and cannot flexibly respond to the diverse needs of users. (2) Intelligent customer service system based on traditional machine learning algorithms: Figure 2As shown in the figure, it learns the pattern between user questions and intents by training on a large amount of annotated data; for example, using the naive Bayes algorithm, the probability of a word belonging to different intent categories is calculated based on the frequency of occurrence of words in the user's question, thereby determining the intent; then the corresponding reply template is selected according to the intent or a suitable reply is selected from the pre-prepared reply library. This method improves the accuracy and generalization ability of intelligent customer service to a certain extent, but requires a large amount of annotated data, and the training and optimization process of the model is relatively complicated. Traditional machine learning algorithms mainly learn based on the statistical characteristics of data. For some problems that require deep understanding and reasoning, the processing ability is limited, and it is difficult to think and judge flexibly like humans; therefore, for some emerging problems that have not appeared in the training data, the processing effect may not be ideal. At the same time, for scenarios with high real-time requirements, the response speed of traditional machine learning algorithms may not be fast enough. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the deficiencies in the prior art, the present invention provides an intelligent customer service processing method based on a natural language processing model, which can solve at least one of the above technical problems.

[0007] (II) Technical solution

[0008] In order to solve the above technical problems, the present invention provides the following technical solutions: an intelligent customer service processing method based on a natural language processing model, comprising the following steps:

[0009] S1. Obtain a text message input by a user;

[0010] S2. Perform intent and entity recognition on the text message through Rasa NLU to obtain the intent and entity of the text message;

[0011] S3. Input the intent and entity into Rasa Core;

[0012] S4. Predict the next action through Rasa Core in response to the text message input by the user.

[0013] Preferably, after step S1 and before step S2, the method further includes: pre-processing the text message.

[0014] Preferably, the preprocessing includes: segmenting the text message by a Rasa NLU word segmenter, and tagging the part of speech by a RasaNLU part of speech tagger.

[0015] Preferably, step S2 comprises: performing entity recognition on the text message through an entity extractor of Rasa NLU to obtain entities of the text message.

[0016] Preferably, step S2 further includes: performing intent recognition on the text message through an intent classifier of Rasa NLU to obtain the intent of the text message.

[0017] Preferably, the entity extractor specifically utilizes conditional random fields to perform entity recognition on text messages.

[0018] Preferably, the intent classifier specifically combines a convolutional neural network and a long short-term memory network to perform intent recognition on text messages.

[0019] Preferably, step S4 includes: Rasa Core searches for stories according to the intent, and Rasa Core predicts the next action according to the dialogue strategy and the stories.

[0020] Preferably, step S4 further comprises: Rasa Core calling an action to return a response.

[0021] (III) Beneficial effects

[0022] Compared with the prior art, the present invention provides an intelligent customer service processing method based on a natural language processing model, which has the following beneficial effects: (1) Compared with the rule-based system and keyword matching system in the prior art, the natural language processing model Rasa of the present invention is no longer limited to simple pattern matching and manually set rules, and can adaptively learn and understand various natural language expressions, greatly reducing the misjudgment and missed judgment caused by inaccurate semantic understanding. Compared with the traditional machine learning algorithm, the Rasa of the present invention has a stronger processing ability for complex semantics and contexts, and can better cope with diverse user language styles and practical application scenarios; (2) Compared with the limitations of the rule-based fixed dialogue process and the traditional dialogue management method, the Rasa Core dialogue management of the present invention is more intelligent and flexible, and can dynamically adjust the strategy according to the user's real-time feedback and the changes in the dialogue situation, so as to achieve more natural and smooth dialogue interaction and improve the efficiency and quality of the dialogue; (3) Compared with the lack of personalized service mechanism or the simple personalized attempt based on a single factor in the prior art, the present invention can provide each user with services and recommendations that are more in line with their personal needs and interests, provide more accurate and diversified personalized recommendations, enhance the interaction effect and satisfaction between users and the system, and improve the service quality and customer loyalty of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of the interaction between the rule-based intelligent customer service system and the user in the prior art;

[0024] Figure 2 This is a flowchart of the interaction between the customer service system and the user based on the traditional machine learning algorithm in the existing technology;

[0025] Figure 3 This is a flowchart of the steps of the intelligent customer service processing method based on the natural language processing model of the present invention;

[0026] Figure 4 This is the system architecture diagram of Rasa;

[0027] Figure 5 A flow chart of the interaction between a user and an intelligent customer service robot of the present invention;

[0028] Figure 6 Schematic diagram of the workflow of Rasa NLU of the present invention;

[0029] Figure 7 Schematic diagram of the pipeline architecture of Rasa NLU of the present invention;

[0030] Figure 8 Schematic diagram of the workflow of Rasa Core of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] The present invention provides an intelligent customer service processing method based on a natural language processing model, comprising the following steps:

[0033] S1. Obtain the text message input by the user.

[0034] S2. Perform intent and entity recognition on text messages through Rasa NLU to obtain the intent and entity of the text message.

[0035] It can be understood that the natural language processing model used in the present invention is Rasa, such as Figure 4 As shown, Rasa mainly includes Rasa NLU (natural language understanding, i.e. Figure 4 NLU Pipeline in Rasa Core (dialogue state management, i.e. Figure 4 Rasa NLU converts user input into intent and entity information, that is, extracts the semantic information of text messages. Rasa Core decides the next action based on the current and historical conversation records.

[0036] Rasa NLU is an important part of the Rasa framework, focusing on natural language understanding. The goal of Rasa NLU is to convert the natural language text entered by the user into a structured, machine-understandable representation. Rasa NLU is mainly used to extract the intent and entity information in the text to provide a basis for the next response of Rasa core. Intent corresponds to the intention expressed by the user (for example: asking about product prices, ordering food, checking the weather, etc.), while entity corresponds to the structured data in the text message entered by the user (for example: product name, location, date, etc.).

[0037] Preferably, if Figure 7 As shown in the figure, Rasa NLU adopts a pipeline architecture, which includes multiple components: Tokenizer, POS Tagger, Entity Extractor, Intent Classifier, etc. Each component of Rasa NLU processes the text in turn in the pipeline. This architecture makes the Rasa model easy to customize and expand.

[0038] In addition, after step S1 and before step S2, the method further includes: preprocessing the text message; specifically, the preprocessing includes: segmenting the text message by a Rasa NLU word segmenter, and tagging the part of speech by a Rasa NLU part of speech tagger.

[0039] The above step S2 includes: performing entity recognition on the text message through the entity extractor of Rasa NLU to obtain entities of the text message. Preferably, the entity extractor specifically uses conditional random fields (CRF) to perform entity recognition on the text message.

[0040] The above step S2 also includes: performing intent recognition on the text message through the intent classifier of Rasa NLU to obtain the intent of the text message. Preferably, the intent classifier specifically combines the use of a convolutional neural network (CNN) and a long short-term memory network (LSTM) to recognize the intent of the text message. Of course, in other embodiments, Rasa NLU can also use other network models of the prior art to recognize the intent and entity of the text message, and no excessive restrictions are made here.

[0041] S3. Input the intent and entity into Rasa Core.

[0042] S4. Predict the next action through Rasa Core in response to the text message input by the user.

[0043] Preferably, step S4 includes: Rasa Core searches for past stories according to the intent, and Rasa Core predicts the next action according to the dialogue strategy and the story. In addition, step S4 also includes: Rasa Core calls the action to return a response; finally, Rasa can translate the result of the Rasa Core call action into natural language and output it to the user, thereby completing a complete dialogue interaction process. Dialogue management: Rasa determines the next dialogue action based on the user's current input and historical dialogue (i.e., past stories or contextual information) in the form of a story; and Rasa uses dialogue strategies to manage the dialogue flow. The next action can be, for example, outputting text content, querying a database, etc. A tracker instance will be passed in the process of calling the execution action, so the entities or results in the historical dialogue can be passed to the current dialogue.

[0044] A "story" in Rasa Core is a sequence of examples that describe how a conversation proceeds. Each story represents a conversation path between a user and a robot. Stories can be defined in YAML format to describe user intent and the robot's response.

[0045] Example story definition:

[0046]

[0047] The above story can be regarded as a complete and real dialogue process between the user and the robot, and the dialogue strategy can be learned from it through machine learning or deep learning.

[0048] Dialogue policies in Rasa Core: Dialogue policies determine how the intelligent customer service robot responds in a specific context, that is, predicting the next action to be taken. Dialogue policies can include the following different types: (1) Memoization Policy: Memorize the dialogue paths (stories) that have been seen to ensure that the same response is reproduced in the same context. (2) Fallback Policy: Provide a default response when the machine learning model is uncertain. (3) TED (Transformer Embedding Dialogue) Policy: Use the Transformer model to predict the next most likely action, supporting more complex dialogue management.

[0049] The example configuration (config.yml) of the dialogue strategy is as follows:

[0050]

[0051]

[0052] In addition, preferably, in the above step S4, the user's purchase history, browsing history, feedback and other personalized information can be combined, and the user's similar behaviors and the matching of their own historical behaviors with product attributes can be comprehensively considered in combination with collaborative filtering and content filtering algorithms to predict the next action, thereby providing personalized recommendations that better meet user needs.

[0053] In addition, if Figure 4 As shown in the figure, in addition to the core natural language understanding (NLU) and dialogue state management (Core), Rasa can also have an Agent agent system, an Action Server custom backend service system, an auxiliary system Tracker Store, Lock Store, Event Broker and channel ( Figure 4 (not shown in the figure): (1) Agent component: from the user's perspective, it mainly receives user input messages and returns the answer of the Rasa system; from the Rasa perspective, it connects natural language understanding and dialogue state management, obtains answers based on Actions, and saves dialogue data to the database; (2) Tracker Store: Stores the dialogue between the user and the Rasa robot in the Tracker Store. The out-of-the-box systems provided by Rasa include PostgreSQL, SQLite, Oracle, Redis, MongoDB, and DynamoDB. Of course, custom storage can also be used; (3) LockStore: An ID generator, which will be used when the Rasa cluster is deployed. When the message is active, the session is locked to ensure the sequential processing of the message; (4) Event Broker: Simply put, it is a message queue that forwards Rasa messages to other services for processing, including RabbitMQ, Kafka, etc.; (5) FileSystem: Saves the trained model, which can be placed in local disks, cloud servers, etc.; (6) Action Server: Rasa's hot-swap function can be implemented through rasa-sdk, such as querying the weather forecast, etc.; it can also communicate with Rasa Core through HTTP; (7) channel: It connects users and conversational robots and supports a variety of mainstream instant messaging software to connect to Rasa.

[0054] Compared with the prior art, the present invention provides an intelligent customer service processing method based on a natural language processing model, which has the following beneficial effects: (1) Improving the flexibility and adaptability of the system: getting rid of the reliance on a large number of manually written rules, enabling the intelligent customer service robot to automatically learn and understand the ever-changing user language patterns and business needs, without the need for frequent manual rule updates, thereby reducing maintenance costs and improving the ability to respond to various complex situations. (2) Improving the accuracy of semantic understanding and intent recognition: The present invention combines convolutional neural networks (CNN) and long short-term memory networks (LSTM) for intent recognition, and uses conditional random fields (CRF) for entity extraction. The rule-based systems in the prior art mainly rely on manually written rules, have limited semantic understanding, and are difficult to handle complex and changeable natural languages. Although traditional machine learning algorithms have certain learning capabilities, they are relatively weak in processing complex semantics and contexts, and rely on a large amount of labeled data. The combination of CNN and LSTM in the present invention can automatically learn the features and semantic information of the text, better capture contextual relationships, and improve the accuracy of intent recognition. CRF considers the relationship between characters in the text and the global label structure in entity extraction, and can more accurately extract entities than traditional methods, reducing misjudgments and missed judgments. The present invention goes beyond simple keyword matching methods, deeply analyzes the semantic connotations of user questions, accurately grasps the user's true intentions, can handle questions with similar semantics but different expressions, and combines contextual information to more comprehensively understand user needs, providing users with more accurate and appropriate responses. (3) Enhance the generalization ability of the system: reduce excessive reliance on a large amount of labeled data, and through more advanced algorithms and model architectures, enable intelligent customer service robots to quickly learn and adapt to new situations with limited data, and improve their ability to handle unseen problems; the present invention adopts vector-based dialogue state representation and deep Q network (DQN) dialogue strategy decision-making. The existing rule-based system dialogue process is fixed, lacks flexibility, and is difficult to cope with diverse user needs; traditional dialogue management methods may not be able to make optimal decisions based on real-time dialogue status, resulting in unsmooth or inefficient dialogue; while the vector-based dialogue state representation of the present invention can comprehensively and accurately record the history and current status of the dialogue, providing richer information for dialogue strategy decision-making. DQN continuously optimizes dialogue strategies through reinforcement learning, and can select the best actions according to different dialogue scenarios, thereby improving the quality and efficiency of dialogue. (4) Realize personalized services: Based on a deep understanding of users, build user portraits, combine collaborative filtering and content filtering algorithms to achieve personalized recommendations, and provide customized services and recommendations for different users. Most existing technologies lack effective personalized service mechanisms and cannot provide customized services and recommendations based on user characteristics and needs. Even if there are some simple personalized attempts, they are often based on a single factor or simple rules, and the effect is limited.The present invention can build a user portrait by comprehensively collecting a variety of user information, and can more deeply understand the user's interest preferences, behavioral habits and other information, so as to provide more accurate personalized services for users. The combination of collaborative filtering and content filtering algorithms can comprehensively consider the matching of users' similar behaviors and their own historical behaviors with product attributes, and provide personalized recommendations that better meet user needs.

[0055] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0056] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An intelligent customer service processing method based on a natural language processing model, characterized in that: The following steps are involved: S1. Obtain a text message input by a user; S2. Performing intent and entity recognition on the text message through Rasa NLU to obtain the intent and entity of the text message; S3, inputting the intent and the entity into Rasa Core; S4. Predicting the next action through the Rasa Core to respond to the text message input by the user.

2. The intelligent customer service processing method based on the natural language processing model according to claim 1 is characterized in that: After step S1 and before step S2, the method further includes: pre-processing the text message.

3. The intelligent customer service processing method based on the natural language processing model according to claim 2 is characterized in that: The preprocessing includes: performing word segmentation on the text message by using the word segmenter of the Rasa NLU, and performing part-of-speech tagging by using the part-of-speech tagger of the RasaNLU.

4. The intelligent customer service processing method based on the natural language processing model according to claim 1 is characterized in that: The step S2 includes: performing entity recognition on the text message through the entity extractor of the Rasa NLU to obtain entities of the text message.

5. The intelligent customer service processing method based on the natural language processing model according to claim 4 is characterized in that: The step S2 also includes: performing intent recognition on the text message through the intent classifier of the Rasa NLU to obtain the intent of the text message.

6. The intelligent customer service processing method based on the natural language processing model according to claim 5 is characterized in that: The entity extractor specifically uses a conditional random field to perform entity recognition on the text message.

7. The intelligent customer service processing method based on the natural language processing model according to claim 5 is characterized in that: The intent classifier specifically combines a convolutional neural network and a long short-term memory network to perform intent recognition on the text message.

8. The intelligent customer service processing method based on the natural language processing model according to claim 1 is characterized in that: The step S4 includes: the Rasa Core searches for a story according to the intent, and the Rasa Core predicts a next action according to the dialogue strategy and the story.

9. The intelligent customer service processing method based on the natural language processing model according to claim 8 is characterized in that: The step S4 further includes: the Rasa Core calls an action to return a response.