A method and system for automatically processing customer emails based on sentiment analysis

Through the automated processing methods and systems of customer emails based on sentiment analysis, the problem of manual reading of email content cannot be classified is solved, and the sentiment score and automated processing of emails are realized, which reduces waiting time and resource waste, and improves work efficiency and customer experience.

CN113919803BActive Publication Date: 2025-04-08BAIRONG ZHIXIN (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111163203.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-04-08
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

In the prior art, the mail content is read manually, and the email cannot be classified based on emotions, resulting in the inability to feedback to determine the urgency of customer requests, delay workflow, and waste of enterprise resources.

Method used

Through the automated processing methods and systems of customer emails based on sentiment analysis, using Python and PyTorch deep learning models, the emails are rated and classified emotionally, and the email queues are generated priority processing, and SQL query statements and reply email templates are automatically generated.

Benefits of technology

Reduce waiting time for emergency customer requests, save labor and time costs, improve work efficiency, and improve customer user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113919803B_ABST
    Figure CN113919803B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for automatically processing customer mails based on sentiment analysis, wherein the method comprises: monitoring incoming mails from customers, calling a sentiment scoring model to score the mails sentimentally, sorting mails in a certain time window or a certain number of batches based on sentiment scores, forming a priority queue for mail processing, scanning mail contents one by one based on a business entity word recognition model, identifying and triggering corresponding database query requests, filling customer information in the mails into SQL statement templates, executing query operations and returning results, automatically selecting mail reply template contents according to mail sentiment scores and business consultation trigger points, filling in SQL statement templates, and automatically forming reply mails. The method solves the technical problem in the prior art that mails cannot be classified based on sentiment, making it impossible to feedback and determine the urgency of customer requests, delaying the processing of workflows, and causing a large amount of human and material resources waste for enterprises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a method and system for automatically processing customer emails based on sentiment analysis. Background Art

[0002] When companies handle customer inquiry emails, they usually read the email content manually, determine customer needs one by one, handle different request emails according to established procedures, and record them in the company system. This method requires companies to invest a lot of manpower costs, and the manual serial email processing method cannot filter out high-priority requests from a large number of emails, making the processing results not timely and accurate.

[0003] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:

[0004] The existing technology has the technical problem of manually reading the content of emails and failing to classify emails based on emotions, which makes it impossible to determine the urgency of customer requests, delays the processing of workflows, and causes a large amount of human and material resources of the enterprise to be wasted. Summary of the invention

[0005] In view of the defects in the prior art, the purpose of the embodiments of the present application is to provide a method and system for automatically processing customer emails based on sentiment analysis, which solves the technical problem that the prior art uses manual methods to read email content, and at the same time cannot classify emails based on sentiment, making it impossible to feedback and determine the urgency of customer requests, delaying the processing of work processes, and causing a large amount of human and material resources of the enterprise to be wasted. By classifying emails and processing email information according to the importance of customer emotions, the relative waiting time for urgent customer requests is reduced, and at the same time, a program is used to automatically generate SQL query statements, and a reply email template is automatically generated according to the sentiment score and email subject, forming a customer feedback and experience report, and exploring the potential improvement points of the existing business chain, the customer experience is improved, and a large amount of labor and time costs can be saved for the enterprise, and the technical effect of improving work efficiency is achieved.

[0006] On the one hand, an embodiment of the present application provides a method for automatically processing customer emails based on sentiment analysis, wherein the method is applied to a customer email automatic processing system, the system is developed based on the Python programming language and the PyTorch deep learning model tool, and the method comprises: collecting customer consultation emails of a first enterprise within a first time period to generate a customer consultation email dataset; based on a sentiment scoring model, traversing and training the customer consultation email dataset to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; sorting the email sentiment scoring result set to construct a priority processing email queue; based on In the business entity word recognition model, the customer email contents in the priority email queue are sequentially identified and scanned to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool; according to the set of triggerable query terms, a corresponding database query request is triggered to generate an SQL statement template; the email sentiment score result set and the set of triggerable query terms are input into a predefined email reply content template set for training to obtain a matching email reply content template; the matching email reply content template is intelligently filled into the SQL statement template to generate a target reply email set, and each of the target reply emails is sent to the corresponding customers.

[0007] On the other hand, the present application also provides a customer email automatic processing system based on sentiment analysis, wherein the system includes: a first collection unit: the first collection unit is used to collect customer consultation emails of a first enterprise within a first time period to generate a customer consultation email data set; a first training unit: the first training unit is used to traverse and train the customer consultation email data set based on a sentiment scoring model to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; a first sorting unit: the first sorting unit is used to sort the email sentiment scoring result set to construct a priority processing email queue; a first scanning unit: the first scanning unit is used to sort the priority processing emails based on a business entity word recognition model The customer email contents in the email queue are identified and scanned in sequence to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool; the first trigger unit: the first trigger unit is used to trigger the corresponding database query request according to the set of triggerable query terms, and generate an SQL statement template; the first input unit: the first input unit is used to input the email sentiment score result set and the set of triggerable query terms into a predefined email reply content template set for training, and obtain a matching email reply content template; the first filling unit: the first filling unit is used to intelligently fill the matching email reply content template into the SQL statement template, generate a target reply email set, and send them to the corresponding customers respectively.

[0008] In a third aspect, an embodiment of the present application provides an automated customer email processing system based on sentiment analysis, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.

[0009] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0010] By monitoring customer mail, calling the sentiment scoring model to score the sentiment of the mail, sorting the mails within a certain time window or a certain number of batches based on the sentiment score, forming a priority queue for mail processing, scanning the mail content one by one in the queue order based on the business entity word recognition model, identifying and triggering the corresponding database query request, filling the customer information in the mail into the SQL statement template, and executing the query operation to return the result, according to the mail sentiment score and business consultation trigger point, automatically selecting the mail reply template content, filling in the SQL statement template, and automatically forming a reply mail. By classifying the mail and processing the mail information according to the severity of the customer's emotions, the relative waiting time of urgent customer requests is reduced, and at the same time, the program is used to automatically generate SQL query statements, and the reply mail template is automatically generated according to the sentiment score and the mail subject, which achieves the technical effect of improving customer experience, saving a lot of labor and time costs for the enterprise, and improving work efficiency.

[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0013] Figure 1 A flowchart of a method for automatically processing customer emails based on sentiment analysis according to an embodiment of the present application;

[0014] Figure 2 A schematic diagram of a process of constructing the sentiment scoring model in a method for automatically processing customer emails based on sentiment analysis according to an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a process of generating the business entity word recognition model in a method for automatically processing customer emails based on sentiment analysis according to an embodiment of the present application;

[0016] Figure 4 A schematic diagram of a process of constructing the predefined email reply content template in a method for automatically processing customer emails based on sentiment analysis according to an embodiment of the present application;

[0017] Figure 5 A schematic diagram of a flow chart of a method for automatically processing customer emails based on sentiment analysis in an embodiment of the present application, wherein the set of question reply emails is fed back to the first operator for content review;

[0018] Figure 6 A schematic diagram of a process for optimizing the predefined email reply content template in a method for automatically processing customer emails based on sentiment analysis according to an embodiment of the present application;

[0019] Figure 7 This is a schematic diagram of the structure of a customer email automatic processing system based on sentiment analysis according to an embodiment of the present application;

[0020] Figure 8 It is a schematic diagram of the structure of an exemplary electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiment of the present application provides a method and system for automatically processing customer emails based on sentiment analysis, which solves the technical problem that the prior art uses manual methods to read email content, and at the same time cannot classify emails based on sentiment, making it impossible to feedback and determine the urgency of customer requests, delaying the processing of work processes, and causing a large amount of human and material resources of the enterprise to be wasted. By classifying emails and processing email information according to the importance of customer emotions, the relative waiting time for urgent customer requests is reduced, and at the same time, a program is used to automatically generate SQL query statements, and a reply email template is automatically generated according to the sentiment score and email subject, forming a customer feedback and experience report, and exploring the potential improvement points of the existing business chain, the technical effect of improving customer experience can be achieved, which can save a lot of labor and time costs for the enterprise and improve work efficiency.

[0022] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0023] Application Overview

[0024] When enterprises handle customer consultation emails, they usually read the email content manually, determine customer needs one by one, process different request emails according to established procedures, and record them in the enterprise system. This method requires enterprises to invest a lot of manpower costs, and the manual serial email processing method cannot filter out high-priority requests from a large number of emails, making the processing results not timely and accurate. The existing technology has technical problems such as manually reading email content and being unable to classify emails based on emotions, making it impossible to feedback and determine the urgency of customer requests, delaying the processing of work processes, and causing a large amount of human and material resources of enterprises to be wasted.

[0025] In response to the above technical problems, the overall idea of ​​the technical solution provided by this application is as follows:

[0026] The embodiment of the present application provides a method for automatically processing customer emails based on sentiment analysis, wherein the method is applied to a customer email automatic processing system, the system is developed based on the Python programming language and the PyTorch deep learning model tool, and the method comprises: collecting customer consultation emails of a first enterprise within a first time period to generate a customer consultation email dataset; based on a sentiment scoring model, traversing and training the customer consultation email dataset to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; sorting the email sentiment scoring result set to construct a priority processing email queue; based on the sentiment scoring model, A business entity word recognition model is used to sequentially identify and scan the customer email contents in the priority email queue to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool; according to the set of triggerable query terms, a corresponding database query request is triggered to generate an SQL statement template; the email sentiment score result set and the set of triggerable query terms are input into a predefined email reply content template set for training to obtain a matching email reply content template; the matching email reply content template is intelligently filled into the SQL statement template to generate a target reply email set, and each of the target reply emails is sent to the corresponding customers.

[0027] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0028] Embodiment 1

[0029] like Figure 1 As shown, an embodiment of the present application provides a method for automatically processing customer emails based on sentiment analysis, wherein the method is applied to a customer email automatic processing system, the system is developed based on Python programming language and PyTorch deep learning model tool, and the method includes:

[0030] Step S100: collecting customer consultation emails of a first enterprise within a first time period to generate a customer consultation email dataset;

[0031] Specifically, when an enterprise handles customer consultation emails, it usually manually reads the email content, determines customer needs one by one, processes emails of different requests according to established procedures, and records them in the enterprise system. This method requires the enterprise to invest a lot of manpower costs, and the manual serial email processing method cannot filter out high-priority requests from a large number of emails, making the processing results not timely and accurate. In order to solve such problems, in this application, an automatic customer email processing system based on sentiment analysis is provided, and the system is developed using the Python programming language and the PyTorch deep learning model tool. Furthermore, the first enterprise is any enterprise that needs to process customer emails, the first time period is any time period, and the customer consultation email dataset can be understood as a collection of consultation emails received by the first enterprise from corporate customers within any time period, so that the emails in the customer consultation email dataset are further processed.

[0032] Step S200: Based on the sentiment scoring model, the customer consultation email dataset is traversed and trained to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language;

[0033] Step S300: sorting the email sentiment score result set and constructing a priority email queue;

[0034] Specifically, after the customer consultation email data set is known, it can be further processed according to the sentiment scoring model, wherein the sentiment scoring model can traverse and train the customer consultation emails in the customer consultation email data set, and perform sentiment scoring on them one by one. The email sentiment scoring result set is a set of sentiment scoring results for each email, and then the email sentiment scoring result set is sorted. In other words, the sentiment analysis model is used to determine the sentiment polarity of the customer consultation email, such as positivity, negativity, and no sentiment tendency, and give a corresponding score. According to different polarities and scores, the corresponding processing priority is matched to each email. Use Java or Python program to sort customer email processing requests based on scores. The priority processing email queue is obtained by sorting according to the email sentiment score. The emails in the customer consultation email data set can be prioritized based on the priority processing email queue.

[0035] Step S400: Based on the business entity word recognition model, the customer email contents in the priority email queue are sequentially identified and scanned to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool;

[0036] Step S500: triggering a corresponding database query request according to the triggerable query term set, and generating an SQL statement template;

[0037] Specifically, after the priority processing mail queue is constructed, the customer mail contents in the priority processing mail queue can be sequentially identified and scanned based on the business entity word recognition model, wherein the business entity word recognition model can effectively recognize the business entity words in the customer mail, such as "order record number" and "address" and other information, so as to facilitate the determination of the core business request subject of the mail, and the triggerable query term set is understood as a statement set of keywords and query conditions for data query, and then the triggerable query term set is used to trigger the corresponding database query request and generate an SQL statement template. For example, based on the business entity word recognition model and traditional keyword matching, the key information of the mail is jointly determined, and the core business request subject of the mail is further determined. The key points that need to be queried in the database, such as bill number, customer type, payment time and status, name, address and other information, are extracted and stored in the database, and then specific query keywords and query conditions are extracted to generate SQL statements available to the database, and the Python program automatically calls the SQL statement and returns the query result. The SQL statement can be understood as Structured Query Language (SQL), which is a special purpose programming language, a database query and programming language, used to access data and query, update and manage relational database systems. The SQL statement template is a data management template available for the database.

[0038] Step S600: inputting the email sentiment score result set and the triggerable query term set into a predefined email reply content template set for training to obtain a matching email reply content template;

[0039] Step S700: intelligently fill the matching email reply content template into the SQL statement template, generate a target reply email set, and send them to corresponding customers respectively.

[0040] Specifically, in order to make intelligent replies to customer emails based on sentiment analysis, the email sentiment scoring result set and the triggerable query term set can be input into a predefined email reply content template set for training, wherein the predefined email reply content template is a predefined email reply content template for customers in bad emotional states. By continuously training the email sentiment scoring result set and the triggerable query term set, a matching email reply content template can be obtained. For example, when the customer is anxious, we apologize and explain that the customer will be dealt with in a focused manner; when the customer is satisfied, we express our gratitude and try to ask about other needs, thereby saving labor costs and achieving more friendly and customized reply email content.

[0041] Then, the matching email reply content template is intelligently filled into the SQL statement template to generate a target reply email set, which is sent to the corresponding customers respectively. That is, according to the email sentiment score and business consultation trigger point, the email reply template content is automatically selected and filled into the SQL statement template, and the reply email is automatically generated and sent to the corresponding customers respectively. By using the program to automatically generate SQL query statements and automatically generate reply email templates according to sentiment scores and email subjects, it can save a lot of labor and time costs for enterprises and improve work efficiency.

[0042] Further, such as Figure 2 As shown, the sentiment scoring model further includes:

[0043] Step S210: Based on the big data, historical customer consultation emails of the first enterprise are collected to generate a historical customer consultation email set;

[0044] Step S220: Preliminarily screening the historical customer consultation email set based on preset sentiment semantic features to obtain a first consultation email set;

[0045] Step S230: performing a secondary review on the first consultation email set to determine a sentiment classification set of each email in the first consultation email set;

[0046] Step S240: constructing the sentiment scoring model according to the sentiment classification sets of each email.

[0047] Specifically, when constructing the sentiment scoring model, the historical customer consultation emails of the first enterprise can be collected based on big data to generate a historical customer consultation email set. The historical customer consultation email set can be understood as a wide collection of existing customer consultation emails of the company, and then the historical customer consultation email set is preliminarily screened based on preset sentiment semantic features to obtain a first consultation email set, wherein the preset sentiment semantic features can be understood as combining a sentiment word dictionary to pre-screen emails with certain sentiment tendencies, which is the first consultation email set, and then the first consultation email set is reviewed for the second time, that is, the company's internal personnel review the pre-screening results, determine the sentiment classification set of each email in the first consultation email set, and finally determine the sentiment classification of each email, forming a machine learning training data set for the company's email data features, and developing a training sentiment scoring model. By classifying emails and processing email information according to the importance of customer emotions, the relative waiting time for urgent customer requests is reduced, and the customer experience is improved.

[0048] Further, such as Figure 3 As shown, the business entity word recognition model, step S400 also includes:

[0049] Step S410: obtaining a database query operation for replying to a customer consultation email according to the first operator of the first enterprise;

[0050] Step S420: determining a trigger keyword phrase set according to the database query operation, and obtaining a first business entity word set;

[0051] Step S430: inputting the first business entity word set into the historical customer consultation email set for training to obtain business word vector information, wherein the business word vector information has the business characteristics of the first enterprise;

[0052] Step S440: Based on the Python development program module, the similarity of each business entity word in the first business entity word set is traversed and calculated to obtain a vector similarity set of each business entity word, wherein the vector similarity set has a first similarity feature;

[0053] Step S450: Projecting the vector similarity set to the business word vector information, and matching to obtain a corresponding additional business entity word set;

[0054] Step S460: input the additional business entity word set into the first business entity word set, perform incremental learning, and generate the business entity word recognition model.

[0055] Specifically, when constructing the business entity word recognition model, a database query operation for replying to a customer consultation email can be obtained according to the first operator of the first enterprise, wherein the first operator is a relevant person in charge of customer consultation services within the company, that is, communicate with the relevant person in charge of customer consultation services within the company to determine the database query operation that is often required when replying to customer consultation emails, and then determine the triggering keyword phrase set according to the database query operation to obtain the first business entity word set. For example, determine which keyword phrases trigger these query operations to form a preliminary business entity word set, such as "order number", "remittance date", etc. Some open source Chinese pre-trained word vectors (a vectorized representation that describes the semantic similarity of Chinese words, such as Chinese WordVectors, etc., using a word vector training algorithm, by inputting the first business entity word set into the historical customer consultation email set for training, business word vector information can be obtained, and the business word vector information conforms to the word vector of the company's business context characteristics, that is, the business characteristics of the first enterprise. Further, based on Python development program modules, the similarity of each business entity word in the first business entity word set is traversed and calculated to obtain the vector similarity set of each business entity word. For example, one of the trigger words for database query is "order number", and a new customer consultation email contains the word "order record number". The program module will calculate the vector similarity between "order number" and "order record number", thereby determining that the word "order record number" can also be used as a trigger to query the customer order number. The additional business entity word set can be input into the first business entity word set for incremental learning, and automatically expanded to the business entity word set, so that the business entity word recognition model is generated. Using a program to automatically generate SQL query statements and automatically generate reply email templates based on sentiment scores and email subjects can save a lot of labor and time costs for enterprises and improve work efficiency.

[0056] Further, such as Figure 4 As shown, the predefined email reply content template, step S600 also includes:

[0057] Step S610: searching the historical customer consultation email collection to obtain a business consultation trigger point collection;

[0058] Step S620: Based on the sentiment difference characteristics, vertically matching the email sentiment classification sets and the business consultation trigger point sets, and generating reply email content templates corresponding to the email sentiment classifications;

[0059] Step S630: construct the predefined email reply content template according to the reply email content template corresponding to each email sentiment classification.

[0060] Specifically, when constructing the predefined email reply content template, the historical customer consultation email collection can be searched to obtain a business consultation trigger point set, that is, a combination of the themes of the customer consultation business in the historical customer emails of the first enterprise. At the same time, based on the emotional difference characteristics, the emotional classification sets of each email and the business consultation trigger point set are vertically matched, that is, corresponding reply email content templates are assigned to emails with different emotional orientations. For example, when the customer is anxious, apologies are expressed and the explanation will be focused on; when the customer is satisfied, thanks are expressed, etc., and then the predefined email reply content template is constructed according to the reply email content templates corresponding to the emotional classifications of each email.

[0061] Further, such as Figure 5 As shown, the embodiment of the present application also includes:

[0062] Step S710: Presetting the emotion threshold of the customer consultation email according to the business characteristics of the first enterprise;

[0063] Step S720: determining whether each email sentiment score result in the email sentiment score result set exceeds the sentiment threshold;

[0064] Step S730: If the sentiment score results of the emails exceed the sentiment threshold, the exceeding score results are screened, and reverse matching is performed to obtain a set of problematic customer consultation emails;

[0065] Step S740: Filter and obtain a problem reply email set corresponding to the problem customer consultation email set according to the target reply email set;

[0066] Step S750: Feedback the question reply email collection to the first operator for content review.

[0067] Specifically, when processing customer emails, when the evaluation results of some customers' emails are extreme, manual intervention can be performed. Furthermore, according to the business characteristics of the first enterprise, a sentiment threshold of the customer consultation email is preset. If the business characteristics of the first enterprise are service-oriented and have high requirements for service attitude and service quality, the sentiment threshold is a sentiment threshold within the customer satisfaction range. By judging whether the sentiment scoring results of each email in the email sentiment scoring result set exceed the sentiment threshold, it is judged whether the customer's email sentiment is within the satisfaction range. If it exceeds, the exceeding scoring results are screened, and reverse matching is performed to obtain a set of problem customer consultation emails, wherein the set of problem customer consultation emails can be understood as a set of emails whose customer email sentiment exceeds the normal threshold, such as when the customer is disappointed with the service, etc. Then, the set of problem reply emails is fed back to the first operator for content review, that is, the reply emails to the problem emails automatically generated by the system are stored in the draft box. Through manual customer service intervention, the emails are further considered, so that more friendly and customized reply email content is achieved on the basis of saving labor costs.

[0068] Further, such as Figure 6 As shown, after the sending to the corresponding customers respectively, the embodiment of the present application further includes:

[0069] Step S810: obtaining a secondary reply email set of the corresponding customer to the target reply email set;

[0070] Step S820: obtaining a set of secondary email sentiment scores for the set of secondary reply emails;

[0071] Step S830: uploading the secondary email sentiment score set to the data statistics table of the customer email automation processing system, and performing deep mining to obtain the sentiment score distribution information of the corresponding customer's consultation email;

[0072] Step S840: Optimizing the predefined email reply content template according to the sentiment score distribution information of the corresponding customer's consultation email.

[0073] Specifically, after sending the target reply email set to the corresponding customers respectively, the secondary reply email set of the corresponding customers to the target reply email set can be further obtained, that is, the secondary email reply received by the system from the corporate customers after the system automatically replies to the email, and the sentiment score is performed on it, that is, the secondary sentiment score of the user for the automatic reply email is tracked and recorded in the MySQL system data statistics table. By deeply mining the data, the overall sentiment score distribution of the user can be further mined based on these data, and then the predefined email reply content template can be optimized, that is, the process automation can be improved, and some missed processing flow branches can also be mined, and the system and business processes can be iteratively improved. From the perspective of corporate business analysis, the distribution of customer needs and the experience score of the company's services can be understood from more dimensions such as customer email sentiment scores and business request topics, and the possibility of standardizing and streamlining business processes can be explored.

[0074] Compared with the prior art, the present invention has the following beneficial effects:

[0075] 1. By monitoring customer emails, calling the sentiment scoring model to score the sentiment of emails, sorting emails within a certain time window or a certain number of batches based on the sentiment score, forming a priority queue for email processing, scanning the email content one by one in the queue order based on the business entity word recognition model, identifying and triggering the corresponding database query request, filling the customer information in the email into the SQL statement template, and executing the query operation to return the result, according to the email sentiment score and business consultation trigger point, automatically selecting the email reply template content, filling in the SQL statement template, and automatically forming a reply email. By classifying emails and processing email information according to the severity of customer emotions, the relative waiting time for urgent customer requests is reduced, and at the same time, the program is used to automatically generate SQL query statements, and the reply email template is automatically generated according to the sentiment score and email subject, which improves the customer experience, saves a lot of labor and time costs for the enterprise, and improves work efficiency.

[0076] 2. Based on the email sentiment score, if it is above the warning threshold (such as the customer is disappointed with the service), the automatically generated reply email will be saved in the draft box, and the employee will be notified to further consider the email. At the same time, the user's secondary sentiment score for the automatic reply email is tracked and recorded in the MySQL system data statistics table. The overall user sentiment score distribution is further mined to improve process automation. Some missed processing flow branches can also be mined to iteratively improve the technical effects of the system and business processes.

[0077] Embodiment 2

[0078] Based on the same inventive concept as the method for automatically processing customer emails based on sentiment analysis in the aforementioned embodiment, the present invention also provides a system for automatically processing customer emails based on sentiment analysis, such as Figure 7 As shown, the system comprises:

[0079] The first collection unit 11: The first collection unit 11 is used to collect customer consultation emails of the first enterprise within a first time period to generate a customer consultation email data set;

[0080] The first training unit 12: The first training unit 12 is used to perform traversal training on the customer consultation email dataset based on the sentiment scoring model to obtain an email sentiment scoring result set, wherein the sentiment scoring model is developed based on the Python programming language;

[0081] The first sorting unit 13: The first sorting unit 13 is used to sort the email sentiment score result set and build a priority email queue;

[0082] The first scanning unit 14: The first scanning unit 14 is used to sequentially identify and scan the customer email contents in the priority email queue based on a business entity word recognition model to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on a PyTorch deep learning model tool;

[0083] The first trigger unit 15: The first trigger unit 15 is used to trigger a corresponding database query request according to the triggerable query term set and generate an SQL statement template;

[0084] The first input unit 16: The first input unit 16 is used to input the email sentiment score result set and the triggerable query term set into a predefined email reply content template set for training, so as to obtain a matching email reply content template;

[0085] The first filling unit 17: The first filling unit 17 is used to intelligently fill the matching email reply content template into the SQL statement template, generate a target reply email set, and send them to the corresponding customers respectively.

[0086] Furthermore, the system also includes:

[0087] Second collection unit: The second collection unit is used to collect historical customer consultation emails of the first enterprise based on big data to generate a historical customer consultation email set;

[0088] First screening unit: The first screening unit is used to preliminarily screen the historical customer consultation email set based on preset emotional semantic features to obtain a first consultation email set;

[0089] First review unit: The first review unit is used to conduct a second review on the first consultation email set to determine a sentiment classification set of each email in the first consultation email set;

[0090] The first construction unit: The first construction unit is used to construct the sentiment scoring model according to the sentiment classification sets of each email.

[0091] Furthermore, the system also includes:

[0092] First obtaining unit: The first obtaining unit is used to obtain a database query operation for replying to a customer consultation email according to a first operator of the first enterprise;

[0093] First determination unit: The first determination unit is used to determine a trigger keyword phrase set according to the database query operation to obtain a first business entity word set;

[0094] First input unit: The first input unit is used to input the first business entity word set into the historical customer consultation email set for training to obtain business word vector information, wherein the business word vector information has the business characteristics of the first enterprise;

[0095] The first calculation unit is used to develop a program module based on Python, traverse and calculate the similarity of each business entity word in the first business entity word set, and obtain a vector similarity set of each business entity word, wherein the vector similarity set has a first similarity feature;

[0096] First projection unit: The first projection unit is used to project the vector similarity set to the business word vector information, and match to obtain a corresponding additional business entity word set;

[0097] Second input unit: The second input unit is used to input the additional business entity word set into the first business entity word set, perform incremental learning, and generate the business entity word recognition model.

[0098] Furthermore, the system also includes:

[0099] First retrieval unit: The first retrieval unit is used to retrieve the historical customer consultation email set to obtain a business consultation trigger point set;

[0100] First matching unit: The first matching unit is used to perform vertical matching on the email sentiment classification sets and the business consultation trigger point set based on sentiment difference characteristics, and generate reply email content templates corresponding to the email sentiment classifications;

[0101] Second construction unit: The second construction unit is used to construct the predefined email reply content template according to the reply email content template corresponding to each email sentiment classification.

[0102] Furthermore, the system also includes:

[0103] First preset unit: The first preset unit is used to preset the emotion threshold of the customer consultation email according to the business characteristics of the first enterprise;

[0104] First judgment unit: The first judgment unit is used to judge whether each email sentiment score result in the email sentiment score result set exceeds the sentiment threshold;

[0105] Second screening unit: The second screening unit is used to screen the exceeding score results if the sentiment score results of each email exceed the sentiment threshold, and reversely match to obtain a set of problematic customer consultation emails;

[0106] The third screening unit: the third screening unit is used to screen and obtain the problem reply email set corresponding to the problem customer consultation email set according to the target reply email set;

[0107] First feedback unit: The first feedback unit is used to feed back the question reply email set to the first operator for content review.

[0108] Furthermore, the system also includes:

[0109] Second obtaining unit: The second obtaining unit is used to obtain a secondary reply email set of the corresponding customer to the target reply email set;

[0110] The third obtaining unit: the third obtaining unit is used to obtain a set of secondary email sentiment scores of the set of secondary reply emails;

[0111] First uploading unit: The first uploading unit is used to upload the secondary email sentiment score set to the data statistics table of the customer email automation processing system, and perform in-depth mining to obtain the sentiment score distribution information of the consultation emails of the corresponding customers;

[0112] The first optimization unit: The first optimization unit is used to optimize the predefined email reply content template according to the sentiment score distribution information of the corresponding customer's consultation email.

[0113] The foregoing Figure 1The various variations and specific examples of the method for automated processing of customer emails based on sentiment analysis in Example 1 are also applicable to the system for automated processing of customer emails based on sentiment analysis in this embodiment. Through the above detailed description of the method for automated processing of customer emails based on sentiment analysis, those skilled in the art can clearly understand the implementation method of the system for automated processing of customer emails based on sentiment analysis in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail here.

[0114] Embodiment 3

[0115] Reference below Figure 8 To describe the electronic device of the embodiment of the present application.

[0116] Figure 8 The figure shows a schematic structural diagram of an electronic device according to an embodiment of the present application.

[0117] Based on the inventive concept of a method for automated processing of customer emails based on sentiment analysis in the aforementioned example, the present invention also provides a system for automated processing of customer emails based on sentiment analysis, on which a computer program is stored, and when the program is executed by a processor, the steps of any method of the system for automated processing of customer emails based on sentiment analysis described above are implemented.

[0118] Among them, Figure 8 In the embodiment of the present invention, a bus architecture (represented by bus 300) is shown, which may include any number of interconnected buses and bridges, and bus 300 links various circuits including one or more processors represented by processor 302 and memory represented by memory 304. Bus 300 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are not further described herein. Bus interface 305 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same element, namely a transceiver, providing a unit for communicating with various other systems over a transmission medium. Processor 302 is responsible for managing bus 300 and general processing, while memory 304 may be used to store data used by processor 302 when performing operations.

[0119] The embodiment of the present application provides a method for automatically processing customer emails based on sentiment analysis, wherein the method is applied to a customer email automatic processing system, the system is developed based on the Python programming language and the PyTorch deep learning model tool, and the method comprises: collecting customer consultation emails of a first enterprise within a first time period to generate a customer consultation email dataset; based on a sentiment scoring model, traversing and training the customer consultation email dataset to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; sorting the email sentiment scoring result set to construct a priority processing email queue; based on the sentiment scoring model, A business entity word recognition model is used to sequentially identify and scan the customer email contents in the priority email queue to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool; according to the set of triggerable query terms, a corresponding database query request is triggered to generate an SQL statement template; the email sentiment score result set and the set of triggerable query terms are input into a predefined email reply content template set for training to obtain a matching email reply content template; the matching email reply content template is intelligently filled into the SQL statement template to generate a target reply email set, and each of the target reply emails is sent to the corresponding customers.

[0120] In the above embodiments, the emails, order record numbers, bill numbers, customer types, payment time and status, names, addresses, remittance dates and other data involved in each embodiment are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions.

[0121] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0123] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0125] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0126] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for automatically processing customer emails based on sentiment analysis, wherein: The method is applied to a customer mail automation processing system, the system is developed based on Python programming language and PyTorch deep learning model tool, and the method includes: Collect customer consultation emails of the first enterprise within a first time period to generate a customer consultation email data set; Based on the sentiment scoring model, the customer consultation email dataset is traversed and trained to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; Sorting the email sentiment score result set and building a priority email queue; Based on the business entity word recognition model, the customer email contents in the priority email queue are sequentially identified and scanned to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on the PyTorch deep learning model tool; According to the set of triggerable query terms, trigger a corresponding database query request and generate an SQL statement template; Inputting the email sentiment score result set and the triggerable query term set into a predefined email reply content template set for training to obtain a matching email reply content template; Intelligently fill the matching email reply content template into the SQL statement template to generate a target reply email set, and send them to the corresponding customers respectively; The sentiment scoring model further includes: based on big data, collecting historical customer consultation emails of the first enterprise to generate a historical customer consultation email set; based on preset sentiment semantic features, preliminarily screening the historical customer consultation email set to obtain a first consultation email set; conducting a secondary review of the first consultation email set to determine a sentiment classification set of each email in the first consultation email set; and constructing the sentiment scoring model according to the sentiment classification set of each email; The business entity word recognition model also includes: according to the first operator of the first enterprise, obtaining a database query operation for replying to a customer consultation email; according to the database query operation, determining a set of triggering keywords and phrases to obtain a first business entity word set; inputting the first business entity word set into the historical customer consultation email set for training to obtain business word vector information, wherein the business word vector information has the business characteristics of the first enterprise; based on the Python development program module, traversing and calculating the similarity of each business entity word in the first business entity word set to obtain a vector similarity set of each business entity word, wherein the vector similarity set has a first similarity feature; projecting the vector similarity set onto the business word vector information to obtain a corresponding additional business entity word set by matching; inputting the additional business entity word set into the first business entity word set to perform incremental learning to generate the business entity word recognition model.

2. The method of claim 1, wherein: The predefined email reply content template also includes: Retrieving the historical customer consultation email collection to obtain a business consultation trigger point collection; Based on the emotional difference characteristics, the emotional classification sets of each email and the business consultation trigger point set are matched vertically to generate a reply email content template corresponding to each email emotional classification; The predefined email reply content template is constructed according to the reply email content template corresponding to each email sentiment classification.

3. The method of claim 1, wherein: The method further comprises: Presetting a sentiment threshold of the customer consultation email according to the business characteristics of the first enterprise; Determine whether each email sentiment score result in the email sentiment score result set exceeds the sentiment threshold; If the sentiment score results of each email exceed the sentiment threshold, the exceeding score results are screened, and reverse matching is performed to obtain a set of problematic customer consultation emails; According to the target reply email set, filter and obtain the problem reply email set corresponding to the problem customer consultation email set; The question reply email collection is fed back to the first operator for content review.

4. The method of claim 1, wherein: The sending of the information to the corresponding customers respectively further includes: Obtaining a secondary reply email set of the corresponding customer to the target reply email set; Obtaining a secondary email sentiment score set of the secondary reply email set; Uploading the secondary email sentiment score set to the data statistics table of the customer email automation processing system, and performing in-depth mining to obtain the sentiment score distribution information of the corresponding customer's consultation emails; The predefined email reply content template is optimized according to the sentiment score distribution information of the corresponding customer's consultation email.

5. A customer email automation processing system based on sentiment analysis, wherein: The system comprises: First collection unit: The first collection unit is used to collect customer consultation emails of the first enterprise within a first time period to generate a customer consultation email data set; The first training unit: the first training unit is used to perform traversal training on the customer consultation email dataset based on the sentiment scoring model to obtain a set of email sentiment scoring results, wherein the sentiment scoring model is developed based on the Python programming language; First sorting unit: The first sorting unit is used to sort the email sentiment score result set and build a priority email queue; The first scanning unit is used to sequentially identify and scan the customer email contents in the priority email queue based on a business entity word recognition model to generate a set of triggerable query terms, wherein the business entity word recognition model is developed based on a PyTorch deep learning model tool; First trigger unit: The first trigger unit is used to trigger a corresponding database query request according to the triggerable query term set and generate an SQL statement template; First input unit: The first input unit is used to input the email sentiment score result set and the triggerable query term set into a predefined email reply content template set for training, so as to obtain a matching email reply content template; First filling unit: The first filling unit is used to intelligently fill the matching email reply content template into the SQL statement template, generate a target reply email set, and send them to corresponding customers respectively; The sentiment scoring model further includes: based on big data, collecting historical customer consultation emails of the first enterprise to generate a historical customer consultation email set; based on preset sentiment semantic features, preliminarily screening the historical customer consultation email set to obtain a first consultation email set; conducting a secondary review of the first consultation email set to determine a sentiment classification set of each email in the first consultation email set; and constructing the sentiment scoring model according to the sentiment classification set of each email; The business entity word recognition model also includes: according to the first operator of the first enterprise, obtaining a database query operation for replying to a customer consultation email; according to the database query operation, determining a set of triggering keywords and phrases to obtain a first business entity word set; inputting the first business entity word set into the historical customer consultation email set for training to obtain business word vector information, wherein the business word vector information has the business characteristics of the first enterprise; based on the Python development program module, traversing and calculating the similarity of each business entity word in the first business entity word set to obtain a vector similarity set of each business entity word, wherein the vector similarity set has a first similarity feature; projecting the vector similarity set onto the business word vector information to obtain a corresponding additional business entity word set by matching; inputting the additional business entity word set into the first business entity word set to perform incremental learning to generate the business entity word recognition model.

6. A customer email automation processing system based on sentiment analysis, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Speech processing equipment and processing method for power intelligent auxiliary service system

    CN105895101A

  • Natural language processing-based multi-language analysis method and device

    CN108197109A