A service conversation detection method and system
By extracting dialogue text features and comparing their similarity with intent information features, and combining them with user information, the problem of low accuracy in service dialogue detection in existing technologies is solved, achieving more accurate violation detection and dialogue process adjustment.
Patent Information
- Application Number
- CN202210448009.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-04-27
AI Technical Summary
Existing service dialogue detection solutions determine whether dialogue information is in violation by detecting whether there are preset prohibited keywords in the dialogue information. However, this approach fails to take into account various situations in the dialogue information, resulting in low accuracy of violation detection and consequently affecting the accuracy of regulating the dialogue process.
By extracting features from the dialogue text and comparing their similarity with features from multiple preset intent information, the intent information of the dialogue information to be detected is determined. Combined with the user information of the target dialogue user and the service dialogue rules, it is determined whether the dialogue information violates the rules.
It improves the accuracy of service dialogue detection, can accurately determine the intent information of the dialogue information to be detected from various preset intent information, and further detect whether it violates the service dialogue rules, so as to ensure the compliance of the dialogue process.
Smart Images

Figure CN114548118B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a service dialogue detection method and system. Background Technology
[0002] Nowadays, many service providers have launched their own customer service platforms to offer better service, allowing customers to communicate with customer service representatives. During these conversations, either party may engage in inappropriate behavior, leading to poor customer experience or complaints. For example, such violations could include uncivil language or failure to comply with the service provider's regulatory requirements. Therefore, it's necessary to detect violations in both customer and customer conversations. When violations are detected, the conversation can be adjusted to create a positive atmosphere and improve customer experience. For instance, a notification can be generated to alert the sender, and the violating information can be redacted or blurred.
[0003] Existing service dialogue detection solutions typically determine whether a dialogue message violates regulations by detecting the presence of pre-defined prohibited keywords. If prohibited keywords are found, the dialogue message is considered to be in violation. However, since dialogue messages are often complex and varied, using the keyword retrieval method for violation detection cannot account for all possible scenarios, leading to low accuracy in violation detection and consequently, low accuracy in adjusting the dialogue process. Summary of the Invention
[0004] The purpose of this invention is to provide a service dialogue detection method and system to improve the accuracy of service dialogue detection. The specific technical solution is as follows:
[0005] In a first aspect, embodiments of the present invention provide a service dialogue detection method, the method comprising:
[0006] Obtain the dialogue text of the dialogue information to be detected, and obtain the user information of the target dialogue user included in the first condition. The dialogue information to be detected includes: the current dialogue information in the service dialogue process and multiple historical dialogue information that are continuous with the current dialogue information. The first condition is set according to the user information of the dialogue user specified in the pre-agreed service dialogue rules.
[0007] Features of the dialogue text are extracted, and the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results. Based on the multiple comparison results, the intent information of the dialogue information to be detected is determined in each of the preset intent information.
[0008] If the identified intent information is found to be in violation, the dialogue information to be detected is determined to be in violation.
[0009] If the determined intent information does not violate the rules, determine whether the user information of the target dialogue user meets the first condition, and determine whether the determined intent information meets the second condition, wherein the second condition is set according to the rule content of the service dialogue rules;
[0010] If the user information of the target dialogue user meets the first condition and the determined intent information meets the second condition, the dialogue information to be detected is determined to be in violation.
[0011] In one embodiment of the present invention, determining the intent information of the dialogue information to be detected from various preset intent information includes:
[0012] The obtained intent information is determined as the intent information of the current dialogue information;
[0013] The method further includes:
[0014] For each user participating in the service dialogue, it is determined whether the intent information of each dialogue message entered by the user meets the rule conditions. Based on the determination result, it is detected whether each dialogue message entered by the user violates the rules. The rule conditions are set according to the pre-agreed service dialogue rules.
[0015] In one embodiment of the present invention, the rule conditions include a third condition and a fourth condition, wherein the third condition is set according to the user information of the dialogue user specified in the service dialogue rules, and the fourth condition is set according to the rule content of the service dialogue rules.
[0016] The process of determining whether the intent information of each dialogue message entered by the user meets the rule conditions, and based on the determination result, detecting whether each dialogue message entered by the user violates the rules, includes:
[0017] Obtain user information for each user participating in the service dialogue process;
[0018] Determine whether the user information of each dialogue user meets the third condition, and determine whether the intent information of each dialogue message input by the dialogue user meets the fourth condition;
[0019] If the user information of each dialogue user meets the third condition and the intent information of each dialogue message entered by the dialogue user meets the fourth condition, it is determined that the dialogue message entered by the user violates the rules.
[0020] In one embodiment of the present invention, the dialogue users include customers and customer service representatives;
[0021] The customer's user information includes at least one of the following:
[0022] Risk tolerance level, customer level, customer authority, and customer location are used to characterize a customer's risk tolerance.
[0023] The customer service user information includes at least one of the following:
[0024] Customer service positions, customer service levels, customer service authority, and customer service locations.
[0025] In one embodiment of the present invention, the current dialogue information and the multiple historical dialogue information are dialogue information input by the same dialogue user.
[0026] In one embodiment of the present invention, the step of extracting features from the dialogue text, comparing the extracted features with the features of each of a plurality of preset intent information to obtain a plurality of comparison results, and determining the intent information of the dialogue text based on the plurality of comparison results includes:
[0027] Obtain a text vector composed of the word vectors of each word in the dialogue text;
[0028] The text vector is input into a pre-trained intent recognition model to obtain intent information determined by the intent recognition model from each preset intent information, which is used as the intent information of the dialogue text. The intent recognition model is trained using sample text vectors as input and the intent information of the sample text vectors as annotation information.
[0029] In one embodiment of the present invention, obtaining the dialogue text to be detected includes:
[0030] Get the current text of the current dialogue information;
[0031] Detect whether the current text contains preset prohibited keywords;
[0032] If so, the current dialogue information is determined to be in violation;
[0033] If not, then obtain the historical text of multiple historical dialogue messages that are continuous with the current dialogue information, and obtain the dialogue text that includes the current text and the historical text.
[0034] Secondly, embodiments of the present invention also provide a service dialogue detection system, the system including an information processing module, an intent recognition module, and a condition judgment module;
[0035] The information processing module is used to receive dialogue information sent by each dialogue user participating in the dialogue, obtain the dialogue text of the dialogue information to be detected, and obtain the user information of the target dialogue user included in the first condition. The dialogue information to be detected includes: the current dialogue information in the service dialogue process and multiple historical dialogue information that are continuous with the current dialogue information.
[0036] The intent recognition module is used to obtain the dialogue text, extract the features of the dialogue text, compare the extracted features with the features of each intent information in a plurality of preset intent information to obtain a plurality of comparison results, and determine the intent information of the dialogue information to be detected in each preset intent information based on the plurality of comparison results.
[0037] The information processing module is also used to obtain the determined intent information and, based on whether the determined intent information is illegal, detect whether the dialogue information to be detected is illegal.
[0038] The condition judgment module is used to store a first condition and a second condition, wherein the first condition is set according to the user information of the dialogue user as specified in the pre-agreed service dialogue rules, and the second condition is set according to the rule content of the service dialogue rules.
[0039] The condition judgment module is further configured to obtain the intent information of the dialogue information to be detected and the user information of the target dialogue user included in the first condition, determine whether the user information of the target dialogue user meets the first condition, and determine whether the determined intent information meets the second condition, and obtain the first judgment result.
[0040] The information processing module is further configured to obtain the first judgment result and, based on the first judgment result, detect whether the dialogue information to be detected violates regulations.
[0041] In one embodiment of the present invention, the intent recognition module is specifically used for:
[0042] The dialogue text is obtained, the features of the dialogue text are extracted, the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results, and the intent information of the current dialogue information is determined in each of the preset intent information based on the multiple comparison results.
[0043] The condition judgment module is further configured to, for each user participating in the service dialogue, determine whether the intent information of each dialogue message entered by the user meets the rule conditions, and obtain a second judgment result, wherein the rule conditions are set according to the pre-agreed service dialogue rules.
[0044] The information processing module is further configured to obtain a second judgment result for each user participating in the service dialogue, and detect whether each dialogue message entered by the user violates the rules based on the second judgment result.
[0045] In one embodiment of the present invention, the rule conditions include a third condition and a fourth condition, wherein the third condition is set according to the user information of the dialogue user specified in the service dialogue rules, and the fourth condition is set according to the rule content of the service dialogue rules.
[0046] The condition judgment module is specifically used to obtain user information of each dialogue user participating in the service dialogue process, and for each dialogue user participating in the service dialogue, to determine whether the user information of each dialogue user meets the third condition, and to determine whether the intent information of each dialogue message input by the dialogue user meets the fourth condition, so as to obtain the third judgment result.
[0047] The information processing module is also used to obtain a third judgment result for each user participating in the service dialogue, and to detect whether each dialogue message entered by the user violates the rules based on the third judgment result.
[0048] In one embodiment of the present invention, the dialogue users include customers and customer service representatives;
[0049] The customer's user information includes at least one of the following:
[0050] Risk tolerance level, customer level, customer authority, and customer location are used to characterize a customer's risk tolerance.
[0051] The customer service user information includes at least one of the following:
[0052] Customer service positions, customer service levels, customer service authority, and customer service locations.
[0053] In one embodiment of the present invention, the current dialogue information and the multiple historical dialogue information are dialogue information input by the same dialogue user.
[0054] In one embodiment of the present invention, the intent recognition module is specifically used for:
[0055] Obtain a text vector composed of the word vectors of each word in the dialogue text;
[0056] The text vector is input into a pre-trained intent recognition model to obtain intent information determined by the intent recognition model from each preset intent information, which is used as the intent information of the dialogue text. The intent recognition model is trained using sample text vectors as input and the intent information of the sample text vectors as annotation information.
[0057] In one embodiment of the present invention, the information processing module is further configured to obtain the current text of the current dialogue information and detect whether the current text includes a preset violation keyword. If the current text includes the preset violation keyword, the current dialogue information is determined to be violation. If the current text does not include the violation keyword, the historical text of multiple historical dialogue information consecutive with the current dialogue information is obtained, and a dialogue text containing the current text and the historical text is obtained.
[0058] Thirdly, embodiments of the present invention also provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0059] Memory, used to store computer programs;
[0060] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0061] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described in the first aspect above.
[0062] Beneficial effects of the embodiments of the present invention:
[0063] As can be seen from the above, when performing service dialogue detection using the solution provided in this embodiment of the invention, the dialogue text of the dialogue information to be detected and the user information of the target dialogue user are first obtained. Features of the obtained dialogue text are extracted, and the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results. Since the features of the dialogue text can usually characterize the semantics of the dialogue text, i.e., the semantics of the dialogue information to be detected, and the features of the intent information are also characterizing the intent information, comparing the similarity between the features of the dialogue text and the features of the intent information yields comparison results that characterize the degree of similarity between the semantics of the dialogue information to be detected and the intent information. Therefore, based on the multiple comparison results obtained, the intent information of the dialogue information to be detected can be accurately determined among the various preset intent information. Thus, based on whether the determined intent information violates regulations, it is possible to accurately detect whether the dialogue information to be detected violates regulations. Furthermore, if the determined intent information does not violate regulations, it is determined whether the user information of the target dialogue user meets the first condition and whether the determined intent information meets the second condition. This allows for further detection of whether the dialogue information to be detected violates regulations using service dialogue rules. As can be seen from the above, applying the service dialogue detection solution provided in this embodiment of the invention can improve the accuracy of service dialogue detection. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0065] Figure 1 A flowchart illustrating the first service dialogue detection method provided in this embodiment of the invention;
[0066] Figure 2 A flowchart illustrating the second service dialogue detection method provided in this embodiment of the invention;
[0067] Figure 3 A flowchart illustrating the third service dialogue detection method provided in this embodiment of the invention;
[0068] Figure 4 A flowchart illustrating the fourth service dialogue detection method provided in this embodiment of the invention;
[0069] Figure 5 A flowchart illustrating the fifth service dialogue detection method provided in this embodiment of the invention;
[0070] Figure 6This is a schematic diagram of the structure of the first service dialogue detection system provided in an embodiment of the present invention;
[0071] Figure 7a This is a schematic diagram of the structure of the second service dialogue detection system provided in an embodiment of the present invention;
[0072] Figure 7b This is a schematic diagram of the workflow of a service dialogue detection system provided in an embodiment of the present invention;
[0073] Figure 8 This is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present invention. Detailed Implementation
[0074] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on the present invention are within the scope of protection of the present invention.
[0075] See Figure 1 , Figure 1 This is a flowchart illustrating the first service dialogue detection method provided in an embodiment of the present invention. The method includes the following steps S101-S105.
[0076] Step S101: Obtain the dialogue text of the dialogue information to be detected, and obtain the user information of the target dialogue user included in the first condition.
[0077] The dialogue information to be detected includes: the current dialogue information during the service dialogue process and multiple historical dialogue information that are consecutive to the current dialogue information.
[0078] During the aforementioned service dialogue, each user can communicate via voice, text, or other means. Therefore, the dialogue information sent by the users can be either voice or text.
[0079] In one embodiment of the present invention, the aforementioned dialogue user can be a customer receiving the service and a customer service representative providing the service.
[0080] The above current dialogue information is the dialogue information currently entered by the user.
[0081] The aforementioned current dialogue information and multiple historical dialogue messages consecutive with the current dialogue information can be entered by multiple dialogue users during the service dialogue process, or they can be entered by the same dialogue user.
[0082] The first condition mentioned above is set based on the user information of the users in the pre-agreed service dialogue rules.
[0083] Since service conversations between users need to avoid violating the regulatory requirements and industry standards of the industry to which the service conversation belongs, the above-mentioned service conversation rules can be regarded as being determined according to the regulatory requirements and industry standards of the industry to which the service conversation belongs, or they can be agreed upon by individuals.
[0084] For example, in the financial industry, customer service representatives cannot recommend individual stocks, manage finances on behalf of customers, recommend financial products that do not match the customer's risk rating, or answer questions that they are not qualified to answer.
[0085] Regarding the rule that customer service representatives cannot answer questions they are not qualified to answer, the above service dialogue rules can be set so that customer service representatives with a level lower than a preset level cannot answer questions about stock market predictions. The first condition could be that the customer service representative's level is lower than the preset level.
[0086] Regarding the rule that customer service representatives cannot recommend financial products that do not match the customer's risk rating, the above service dialogue rules can be set so that customer service representatives cannot recommend financial products with a risk level higher than the lowest risk tolerance level to customers with the lowest risk tolerance level. The first condition can be that the customer's risk tolerance level is the lowest risk tolerance level.
[0087] Different industries have different service dialogue rules, which will not be listed one by one in this embodiment of the invention.
[0088] Specifically, when obtaining the user information of the target dialogue user, the target dialogue user included in the first condition can be identified, and then the user information of the identified target dialogue user can be obtained.
[0089] The specific implementation method for obtaining the user information of the target user in the dialogue can be found in the following embodiments, which will not be described in detail here.
[0090] In one embodiment of the present invention, the above-mentioned dialogue text can be obtained through either of the following two implementation methods.
[0091] In the first implementation, the current dialogue information during the service dialogue process can be obtained in real time, along with multiple historical dialogue information consecutive to the current dialogue information. If all obtained dialogue information is text information, then the text containing the multiple obtained dialogue information is the dialogue text of the dialogue information to be detected; if the obtained dialogue information contains speech information, speech recognition can be performed on the speech information to convert it into text information, thereby obtaining the text containing the various text information, which serves as the dialogue text of the dialogue information to be detected.
[0092] In one embodiment of the present invention, when obtaining multiple historical dialogue messages that are continuous with the current dialogue message, the number of historical dialogue messages to be obtained can be preset. After obtaining the current dialogue message, the preset number of historical dialogue messages that are continuous with the current dialogue message can be obtained again.
[0093] For example, the number of information items mentioned above can be 2, 3, or other manually set quantities.
[0094] In the second implementation method, the text obtained by other devices based on the current dialogue information and multiple historical information can also be used as the dialogue text of the dialogue information to be detected.
[0095] Step S102: Extract the features of the dialogue text, compare the similarity of the extracted features with the features of each of the multiple preset intent information to obtain multiple comparison results, and determine the intent information of the dialogue information to be detected in each preset intent information based on the multiple comparison results obtained.
[0096] The features of the aforementioned dialogue text are representative of the dialogue text. For example, the features of the aforementioned dialogue text can be features that represent the semantics of the dialogue text, or features that represent the vocabulary contained in the dialogue text.
[0097] The aforementioned preset intent information is used to characterize the intent of the user entering dialogue information. For example, the intent could be to send uncivil language, make excuses, promote commission-free services, promise returns, recommend products, or answer questions.
[0098] Similar to the features of the aforementioned dialogue text, the features of the aforementioned preset intent information are representative of the preset intent information.
[0099] Specifically, multiple preset intent information and the features of each preset intent information can be obtained in advance. After obtaining the dialogue text, the features of the dialogue text are extracted, and the extracted features are compared with the features of each preset intent information. The comparison results can include the similarity between the dialogue text and the intent information. Comparing the features of the dialogue text with the features of one preset intent information yields one comparison result. Comparing the features of the dialogue text with the features of multiple preset intent information yields multiple comparison results. After obtaining these multiple comparison results, the comparison result with the highest similarity can be determined, thereby identifying the intent information corresponding to this comparison result, and this intent information is identified as the intent information of the dialogue information to be detected.
[0100] Extracting features from dialogue text can be achieved using existing feature extraction techniques, and comparing the similarity between different features can be achieved using existing feature comparison techniques, which will not be elaborated here.
[0101] In addition, when the current dialogue information and multiple historical dialogue information are input by the same dialogue user, the interference of dialogue information input by other dialogue users on the service dialogue detection can be avoided, thereby improving the accuracy of determining new intent information of the dialogue to be detected, which is beneficial to service dialogue detection.
[0102] Furthermore, determining the intent information of the dialogue to be detected from multiple preset intent information can also be achieved through a pre-trained intent recognition model, as detailed later. Figure 2 Steps S102A-102B in the illustrated embodiment will not be described in detail here.
[0103] Step S103: If the determined intent information is violated, determine that the dialogue information to be detected is violated.
[0104] Specifically, when setting the aforementioned preset intent information, it is possible to specify whether the preset intent information is in violation. In this way, after determining the intent information of the dialogue information to be detected, since the determined intent information belongs to the aforementioned preset intent information, it is possible to determine whether the intent information of the dialogue information to be detected is in violation. If the determined intent information is in violation, it means that the dialogue information to be detected is in violation; if the determined intent information is not in violation, it means that the dialogue information to be detected is not in violation.
[0105] For example, if there is a preset intent information 'a', which is used to represent that the user intends to evade responsibility when inputting dialogue information, then the preset intent information 'a' is a violation of intent information. In this case, if the intent information of the dialogue information to be detected is the preset intent information 'a', then it means that the dialogue information to be detected is a violation.
[0106] In addition, different service dialogue adjustment methods can be preset for different violation intent information. In this way, after it is determined that the dialogue information to be detected is in violation, the service dialogue process can be adjusted by the service dialogue adjustment method corresponding to the violation intent information.
[0107] Step S104: If the determined intent information does not violate the rules, determine whether the user information of the target dialogue user meets the first condition, and determine whether the determined intent information meets the second condition.
[0108] The second condition is set according to the rules of the service dialogue rules.
[0109] The following two examples of service dialogue rules from step S101 above will be used to illustrate this step.
[0110] In the example of service dialogue rules above, if the rule is: customer service representatives with a level lower than a preset level cannot answer questions about stock market predictions, then the second condition could be that the customer service representative answers a question about stock market predictions. Thus, after obtaining the customer service representative's user information, it can be determined whether the customer service representative's level included in the obtained user information is lower than the preset level, and whether the intent information of the dialogue to be tested indicates that the customer service representative is answering a question about stock market predictions.
[0111] If the aforementioned service dialogue rule states that customer service representatives cannot recommend financial products with a risk level greater than the lowest risk tolerance level to customers with the lowest risk tolerance level, then the second condition can be that customer service representatives recommend financial products with a risk level greater than the lowest risk tolerance level to customers. In this way, after obtaining the customer's user information, it can be determined whether the customer's risk tolerance level included in the obtained user information is the lowest risk tolerance level, and whether the intent information of the dialogue to be tested indicates that the customer service representative recommended financial products with a risk level greater than the lowest risk tolerance level to the customer.
[0112] In addition, since the first condition and the user information of the target dialogue user can be obtained in advance, it is possible to determine in advance whether the user information of the target dialogue user meets the first condition, and after obtaining the intent information of the dialogue information to be detected, it is then determined whether the determined intent information meets the second condition.
[0113] For example, at the start of the above service dialogue, the first condition and the user information of the target dialogue user can be obtained, and it can be determined whether the user information of the target dialogue user meets the first condition.
[0114] Since there may be multiple service dialogue rules, for each service dialogue rule, a first condition and a second condition can be set based on that service dialogue rule. In this way, when making condition judgments, the first condition and the second condition corresponding to each service dialogue rule can be used respectively.
[0115] For example, given two service dialogue rules a and b, based on service dialogue rule a, a first condition a and a second condition a can be set; based on service dialogue rule b, a first condition b and a second condition b can be set. After obtaining the user information of the target dialogue user and the intent information of the dialogue information to be detected, the obtained user information and intent information can be judged using the first condition a and the second condition a to obtain a judgment result. Then, the obtained user information and intent information can be judged again using the first condition b and the second condition b to obtain another judgment result.
[0116] In addition, both the first and second conditions mentioned above can be composed of multiple sub-conditions, which can be combined according to a pre-set combination relationship to form the first or second condition.
[0117] You can set the trigger condition for satisfying the first or second condition to satisfy one or more of the included sub-conditions.
[0118] For example, if the first condition includes three sub-conditions a, b, and c, when determining whether the target user's information satisfies the first condition, if the target user's information satisfies any one of these three sub-conditions, then the target user's information can be considered to satisfy the first condition.
[0119] The triggering conditions can also be set to satisfy one or more of the necessary and non-necessary sub-conditions among the included sub-conditions.
[0120] For example, in the above distance, if sub-condition a is a necessary sub-condition and sub-conditions b and c are not necessary sub-conditions, then if the user information of the target user satisfies sub-condition a and any one of sub-conditions b and c, then the user information of the target user is considered to satisfy the first condition.
[0121] Step S105: If the user information of the target dialogue user meets the first condition and the determined intent information meets the second condition, the dialogue information to be detected is determined to be in violation.
[0122] If the user information of the target user meets the first condition and the determined intent information meets the second condition, it means that the dialogue information to be detected violates the pre-agreed service dialogue rules. In this case, the dialogue information to be detected is determined to be in violation.
[0123] In addition, since there may be multiple service dialogue rules, executing step S104 can result in multiple judgments. If there is a judgment result in which both the first and second conditions are met, it means that the dialogue information to be detected has violated the service dialogue rule. At this time, the dialogue information to be detected is determined to be in violation, and the violated service dialogue rule is the reason for the violation of the dialogue information to be detected.
[0124] As can be seen from the above, when performing service dialogue detection using the solution provided in this embodiment of the invention, the dialogue text of the dialogue information to be detected and the user information of the target dialogue user are first obtained. Features of the obtained dialogue text are extracted, and the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results. Since the features of the dialogue text can usually characterize the semantics of the dialogue text, i.e., the semantics of the dialogue information to be detected, and the features of the intent information are also characterizing the intent information, comparing the similarity between the features of the dialogue text and the features of the intent information yields comparison results that characterize the degree of similarity between the semantics of the dialogue information to be detected and the intent information. Therefore, based on the multiple comparison results obtained, the intent information of the dialogue information to be detected can be accurately determined among the various preset intent information. Thus, based on whether the determined intent information violates regulations, it is possible to accurately detect whether the dialogue information to be detected violates regulations. Furthermore, if the determined intent information does not violate regulations, it is determined whether the user information of the target dialogue user meets the first condition and whether the determined intent information meets the second condition. This allows for further detection of whether the dialogue information to be detected violates regulations using service dialogue rules. As can be seen from the above, applying the service dialogue detection solution provided in this embodiment of the invention can improve the accuracy of service dialogue detection.
[0125] The following explains the user information mentioned in step S101 above and how to obtain the user information of the target user in the dialogue.
[0126] In one embodiment of the present invention, the user information of the aforementioned user may include information such as user level, permissions, and location, and may also include information such as age, gender, and years of service. The present invention does not limit this.
[0127] In one embodiment of the present invention, the aforementioned dialogue users include customers and customer service representatives.
[0128] Customer user information includes at least one of the following:
[0129] This represents a customer's risk tolerance level, customer level, customer authority, and customer location.
[0130] Customer service user information includes at least one of the following:
[0131] Customer service positions, customer service levels, customer service authority, and customer service locations.
[0132] In this solution, the user information of the aforementioned customers or customer service personnel includes at least one of the listed information, thus providing rich information for service dialogue detection.
[0133] When obtaining the user information of the target dialogue user, since the first condition is set according to the user information of the dialogue user as specified in the pre-agreed service dialogue rules, the target dialogue user included in the first condition can also be determined in advance, and thus the user information of the target dialogue user can also be obtained in advance. For example, the user information of the target dialogue user can be obtained at the beginning of the above-mentioned service dialogue process.
[0134] In one embodiment of the present invention, user information of each dialogue user participating in the service dialogue can be collected in advance. After determining the target dialogue user, the user information of the target dialogue user can be determined from the collected user information.
[0135] In another embodiment of the present invention, the user information of the target dialogue user is obtained by evaluating the dialogue user.
[0136] The following explains the specific implementation method of determining the intent information of the dialogue information to be detected from multiple preset intent information through a pre-trained intent recognition model, as mentioned in step S102 above.
[0137] In one embodiment of the present invention, see Figure 2 The flowchart of the second service dialogue detection method is provided. In this embodiment, the above step S102 can be implemented through the following steps S102A-S102B.
[0138] Step S102A: Obtain the text vector composed of the word vectors of each word in the dialogue text.
[0139] Specifically, the above dialogue text can be segmented into multiple words, and each word can be converted into a word vector to obtain a text vector composed of the word vectors of each word.
[0140] In one embodiment of the present invention, the dialogue text can be segmented using either of the following two methods.
[0141] The first approach involves segmenting the text corresponding to each piece of dialogue information in the dialogue text.
[0142] In the second implementation method, when the dialogue text is obtained by splicing together the text of each dialogue message, the dialogue text can be directly segmented.
[0143] The above word segmentation process can be achieved using existing word segmentation technologies, such as word2vec.
[0144] In one embodiment of the present invention, after obtaining the word vectors of each word, the weight coefficients of each word vector can be calculated, and then the word vectors are weighted to obtain the weighted word vectors, thereby obtaining the text vectors composed of each word vector.
[0145] The weight coefficients of each word vector can be calculated using existing weighting techniques, such as TF-IDF (term frequency–inverse document frequency).
[0146] Step S102B: Input the text vector into the pre-trained intent recognition model to obtain the intent information determined by the intent recognition model from each preset intent information, which is used as the intent information of the dialogue text.
[0147] The intent recognition model is trained by using sample text vectors as input and the intent information of the sample text vectors as annotation information.
[0148] In one embodiment of the present invention, the intent recognition model includes an input layer, a convolutional layer, a pooling layer, a BiLSTM (Bi-directional Long Short-Term Memory) layer, a fully connected layer, and a Softmax layer. The convolutional layer extracts features using preset convolutional kernels; the pooling layer reduces the dimensionality complexity of the data processed by the model while preserving convolutional information; the BiLSTM layer contains hidden layers with 128 nodes and a Dropout parameter of 0.8; the fully connected layer obtains the feature vector representation of the text corresponding to the input vector; and the Softmax layer determines the intent information of the corresponding text from multiple preset intent information based on the feature vector.
[0149] Specifically, during the training phase of the intent recognition model, based on the sample text vector and the intent information of the sample text vector, the intent recognition model can learn the features of each preset intent information. Thus, after obtaining the above text vector, the intent recognition model can determine the intent information that matches the above text vector from each preset intent information based on the learned features, and output the determined intent information.
[0150] When training an intent recognition model, the sample dataset containing sample text vectors and intent information of the sample text vectors can be divided into a training set and a test set. The training set is used to train the intent recognition model, and the test set is used to test the intent recognition model after it has been trained using the training set.
[0151] As can be seen from the above, when detecting service dialogues using the scheme provided in this embodiment of the invention, the intent recognition model determines the intent information of the dialogue information to be detected from multiple preset intent information. Since the intent recognition model is trained using sample text vectors as input and the intent information of the sample text vectors as annotation information, it can accurately determine the intent information of the dialogue information to be detected based on the features learned from each preset intent information. Therefore, the service dialogue detection scheme provided in this embodiment of the invention can improve the accuracy of service dialogue detection.
[0152] To ensure the compliance of service dialogues involving multiple users, it is usually necessary to monitor the service dialogues in real time and to continuously monitor the entire service dialogue process.
[0153] In view of the above, in one embodiment of the present invention, see... Figure 3 The present invention provides a flowchart of a third service dialogue detection method. In this embodiment, the above step S102 can be implemented by the following step S102C, and the above method also includes the following step S106.
[0154] Step S102C: Extract the features of the dialogue text, compare the similarity of the extracted features with the features of each of the multiple preset intent information to obtain multiple comparison results, and determine the intent information of the current dialogue information among the multiple preset intent information based on the multiple comparison results obtained.
[0155] This step is similar to step S102 above, except that after determining the comparison result with the highest similarity from all comparison results and determining the intent information corresponding to that comparison result, the determined intent information is set as the intent information of the current dialogue information. In this way, during the service dialogue process, the intent information of each dialogue message entered by the user can be determined, thereby enabling real-time detection of the service dialogue and determination of the intent information of each dialogue message entered by the user.
[0156] After determining the intent information of the current dialogue information, the method further includes the following step S106.
[0157] Step S106: For each user participating in the service dialogue, determine whether the intent information of each dialogue message entered by the user meets the rule conditions. Based on the determination result, check whether each dialogue message entered by the user violates the rules.
[0158] The rules and conditions are set according to the pre-agreed service dialogue rules.
[0159] When setting the above rule conditions, one or more rule conditions can be set for a single service dialogue rule.
[0160] Specifically, when determining whether the intent information of each dialogue message entered by the user meets the rule conditions, each piece of intent information can be compared with each rule condition corresponding to the service dialogue rule. If all rule conditions corresponding to the service dialogue rule are met, it means that the intent information of each dialogue message entered by the user meets the rule conditions, indicating that the dialogue message entered by the user violates the rules.
[0161] For example, based on the aforementioned service dialogue rules, rule conditions 1 and 2 are set. Based on the three dialogue messages already entered by the user, three intent messages are detected: intent message 1, intent message 2, and intent message 3. When determining whether each intent message satisfies the rule conditions, we can first determine if intent message 1 satisfies rule condition 1 or rule condition 2, then determine if intent message 2 satisfies rule condition 1 or rule condition 2, and finally determine if intent message 3 satisfies rule condition 1 or rule condition 2. If any one of the three intent messages satisfies rule condition 1 and any one of the three intent messages satisfies rule condition 2, then it indicates that the three dialogue messages entered by the user violate the rules.
[0162] In addition, there can be multiple service dialogue rules mentioned above. For each service dialogue rule, it can be determined whether the intent information of each dialogue message entered by each dialogue user meets the rule conditions corresponding to the service dialogue rule. If it does, it means that the dialogue messages entered by the dialogue user violate the service dialogue rule.
[0163] As can be seen from the above, when using the solution provided in this embodiment of the invention to detect service dialogues, the intent information of the dialogue information input by the user can be detected in real time during the service dialogue process. Based on the rule conditions set in the service dialogue rules, it is determined whether the detected intent information meets the rule conditions. When all the set rule conditions are met, the dialogue information input by the user violates the pre-agreed service dialogue rules. Therefore, the service dialogue detection solution provided in this embodiment of the invention can comprehensively detect the entire service dialogue process, improving the accuracy of service dialogue detection and ensuring the compliance of the entire service dialogue process.
[0164] When detecting whether the dialogue information entered by each user violates the rules, it is possible not only to detect based on the intent information of the entered dialogue information, but also to obtain the user information of each user participating in the service dialogue process, and to conduct detection by combining the intent information and the obtained user information.
[0165] In one embodiment of the present invention, see Figure 4 The document provides a flowchart of a fourth service dialogue detection method. In this embodiment, the above-mentioned rule conditions include a third condition and a fourth condition. The third condition is set according to the user information of the dialogue user as specified in the service dialogue rules, and the fourth condition is set according to the rule content of the service dialogue rules.
[0166] The third condition is similar to the first condition, and the fourth condition is similar to the second condition.
[0167] In the solution provided by the embodiments of the present invention, the above step S106 can be achieved through the following steps S106A-S106C.
[0168] Step S106A: Obtain user information for each user participating in the service dialogue process.
[0169] The user information of each of the aforementioned dialogue users can be collected in advance or obtained by evaluating each dialogue user.
[0170] Step S106B: Determine whether the user information of each dialogue user meets the third condition, and determine whether the intent information of each dialogue message input by the dialogue user meets the fourth condition.
[0171] This step is similar to step S106 above, and will not be described in detail here.
[0172] Step S106C: If the user information of each dialogue user meets the third condition and the intent information of each dialogue message entered by the dialogue user meets the fourth condition, it is determined that the dialogue message entered by the user is in violation of the rules.
[0173] When the user information of each user in the dialogue meets the third condition, and the intent information of each dialogue message to be entered by the user in the dialogue meets the fourth condition, it means that the dialogue message entered by the user in the dialogue violates the service dialogue rules corresponding to the third and fourth conditions in the judgment process. At this time, it is determined that the dialogue message entered by the user is in violation.
[0174] As can be seen from the above, when using the solution provided in the embodiments of the present invention to detect service dialogues, for each dialogue user, not only is the intent information of the dialogue information already entered by the dialogue user used for detection, but also the user information of each dialogue user participating in the service dialogue process is used for detection. In this way, the dialogue information already entered by the dialogue user is detected from multiple aspects, which can improve the accuracy of dialogue information detection.
[0175] In one embodiment of the present invention, when the above-mentioned dialogue text is obtained, the current dialogue information can be initially detected by detecting illegal keywords.
[0176] Therefore, in one embodiment of the present invention, see... Figure 5 The flowchart of the fifth service dialogue detection method is provided. In this embodiment, the above step S101 can be implemented through the following steps S101A-S101E.
[0177] Step S101A: Obtain the current text of the current dialogue information.
[0178] The method for obtaining the current text is similar to the method for obtaining the dialogue text mentioned in step S101 above, and will not be repeated here.
[0179] Step S101B: Detect whether the current text contains preset prohibited keywords. If yes, proceed to step S101C; if no, proceed to step S101D.
[0180] The aforementioned prohibited keywords can be uncivilized language or sensitive words in the industry to which the service dialogue pertains.
[0181] Detecting illegal keywords in the current text can be achieved using existing text detection technologies, which will not be detailed here.
[0182] If the current text contains preset prohibited keywords, it indicates that the current dialogue information contains prohibited behavior, and step S101C is executed; if the current text does not contain preset prohibited keywords, it indicates that the current dialogue information passes the preliminary detection, and step S101D is executed to proceed with subsequent detection steps.
[0183] Step S101C: Determine that the current dialogue information violates the rules.
[0184] Step S101D: Obtain the historical text of multiple historical dialogue messages that are continuous with the current dialogue information, and obtain the dialogue text containing the current text and the historical text.
[0185] The method for obtaining historical text is similar to the method for obtaining dialogue text mentioned in step S101 above, and will not be repeated here.
[0186] After obtaining the aforementioned historical text, the current text and the historical text can be merged to obtain the merged text, which serves as the dialogue text for the dialogue information to be detected.
[0187] Step S101E: Obtain the user information of the target dialogue user included in the first condition.
[0188] For details on how to obtain user information of the target user in a conversation, please refer to the aforementioned methods. Figure 1 Step S101 in the illustrated embodiment will not be repeated here.
[0189] As can be seen from the above, when using the solution provided in this embodiment of the invention to detect service dialogues, before obtaining the dialogue text and the user information of the target dialogue user, a preliminary detection of the current dialogue information can be performed by detecting illegal keywords. Thus, when illegal keywords are detected in the current text of the current dialogue information, it can be determined that the current dialogue information is illegal, without the need for subsequent detection using the intent information of the dialogue information to be detected and the user information of the target dialogue user. Therefore, applying the service dialogue detection solution provided in this embodiment of the invention can improve the efficiency of service dialogue detection.
[0190] Corresponding to the above-described service dialogue detection method, this embodiment of the invention also provides a service dialogue detection system.
[0191] In one embodiment of the present invention, see Figure 6 A schematic diagram of a service dialogue detection system is provided. In this embodiment, the system includes an information processing module 601, an intent recognition module 602, and a condition judgment module 603.
[0192] The information processing module 601 is used to receive dialogue information sent by each dialogue user participating in the dialogue, obtain the dialogue text of the dialogue information to be detected, and obtain the user information of the target dialogue user included in the first condition. The dialogue information to be detected includes: the current dialogue information in the service dialogue process and multiple historical dialogue information that are continuous with the current dialogue information.
[0193] The intent recognition module 602 is used to obtain the dialogue text, extract the features of the dialogue text, compare the extracted features with the features of each intent information in a plurality of preset intent information to obtain a plurality of comparison results, and determine the intent information of the dialogue information to be detected in each preset intent information based on the plurality of comparison results.
[0194] The information processing module 601 is further configured to obtain the determined intent information and, based on whether the determined intent information is illegal, detect whether the dialogue information to be detected is illegal.
[0195] The condition judgment module 603 is used to store a first condition and a second condition, wherein the first condition is set according to the user information of the dialogue user as specified in the pre-agreed service dialogue rules, and the second condition is set according to the rule content of the service dialogue rules.
[0196] The condition judgment module 603 is further configured to obtain the intent information of the dialogue information to be detected and the user information of the target dialogue user who sent the dialogue information to be detected, determine whether the user information of the target dialogue user meets the first condition, and determine whether the determined intent information meets the second condition, and obtain the first judgment result.
[0197] The information processing module 601 is further configured to obtain the first judgment result and, based on the first judgment result, detect whether the dialogue information to be detected is in violation of regulations.
[0198] As can be seen from the above, when performing service dialogue detection using the solution provided in this embodiment of the invention, the dialogue text of the dialogue information to be detected and the user information of the target dialogue user are first obtained. Features of the obtained dialogue text are extracted, and the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results. Since the features of the dialogue text can usually characterize the semantics of the dialogue text, i.e., the semantics of the dialogue information to be detected, and the features of the intent information are also characterizing the intent information, comparing the similarity between the features of the dialogue text and the features of the intent information yields comparison results that characterize the degree of similarity between the semantics of the dialogue information to be detected and the intent information. Therefore, based on the multiple comparison results obtained, the intent information of the dialogue information to be detected can be accurately determined among the various preset intent information. Thus, based on whether the determined intent information violates regulations, it is possible to accurately detect whether the dialogue information to be detected violates regulations. Furthermore, if the determined intent information does not violate regulations, it is determined whether the user information of the target dialogue user meets the first condition and whether the determined intent information meets the second condition. This allows for further detection of whether the dialogue information to be detected violates regulations using service dialogue rules. As can be seen from the above, applying the service dialogue detection solution provided in this embodiment of the invention can improve the accuracy of service dialogue detection.
[0199] In one embodiment of the present invention, the intent recognition module 602 is specifically used for:
[0200] The dialogue text is obtained, the features of the dialogue text are extracted, the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results, and the intent information of the current dialogue information is determined in each of the preset intent information based on the multiple comparison results.
[0201] The condition judgment module 603 is further configured to, for each user participating in the service dialogue, determine whether the intent information of each dialogue message entered by the user meets the rule conditions, and obtain a second judgment result, wherein the rule conditions are set according to the pre-agreed service dialogue rules.
[0202] The information processing module 601 is further configured to obtain a second judgment result for each user participating in the service dialogue, and detect whether each dialogue message entered by the user violates the rules based on the second judgment result.
[0203] As can be seen from the above, when using the solution provided in this embodiment of the invention to detect service dialogues, the intent information of the dialogue information input by the user can be detected in real time during the service dialogue process. Based on the rule conditions set in the service dialogue rules, it is determined whether the detected intent information meets the rule conditions. When all the set rule conditions are met, the dialogue information input by the user violates the pre-agreed service dialogue rules. Therefore, the service dialogue detection solution provided in this embodiment of the invention can comprehensively detect the entire service dialogue process, improving the accuracy of service dialogue detection and ensuring the compliance of the entire service dialogue process.
[0204] In one embodiment of the present invention, the rule conditions include a third condition and a fourth condition, wherein the third condition is set according to the user information of the dialogue user specified in the service dialogue rules, and the fourth condition is set according to the rule content of the service dialogue rules.
[0205] The condition judgment module 603 is specifically used to obtain user information of each dialogue user participating in the service dialogue process, and for each dialogue user participating in the service dialogue, to determine whether the user information of each dialogue user meets the third condition, and to determine whether the intent information of each dialogue message input by the dialogue user meets the fourth condition, so as to obtain the third judgment result.
[0206] The information processing module 601 is further configured to obtain a third judgment result for each user participating in the service dialogue, and detect whether each dialogue message entered by the user violates the rules based on the third judgment result.
[0207] As can be seen from the above, when using the solution provided in the embodiments of the present invention to detect service dialogues, for each dialogue user, not only is the intent information of the dialogue information already entered by the dialogue user used for detection, but also the user information of each dialogue user participating in the service dialogue process is used for detection. In this way, the dialogue information already entered by the dialogue user is detected from multiple aspects, which can improve the accuracy of dialogue information detection.
[0208] In one embodiment of the present invention, the dialogue users include customers and customer service representatives;
[0209] The customer's user information includes at least one of the following:
[0210] Risk tolerance level, customer level, customer authority, and customer location are used to characterize a customer's risk tolerance.
[0211] The customer service user information includes at least one of the following:
[0212] Customer service positions, customer service levels, customer service authority, and customer service locations.
[0213] In this solution, the user information of the aforementioned customers or customer service personnel includes at least one of the listed information, thus providing rich information for service dialogue detection.
[0214] In one embodiment of the present invention, the current dialogue information and the multiple historical dialogue information are dialogue information input by the same dialogue user.
[0215] In this solution, when the current dialogue information and multiple historical dialogue information are input by the same dialogue user, the interference of dialogue information input by other dialogue users on service dialogue detection can be avoided, thereby improving the accuracy of determining new intent information of the dialogue to be detected, which is beneficial to service dialogue detection.
[0216] In one embodiment of the present invention, the intent recognition module 602 is specifically used for:
[0217] Obtain a text vector composed of the word vectors of each word in the dialogue text;
[0218] The text vector is input into a pre-trained intent recognition model to obtain intent information determined by the intent recognition model from each preset intent information, which is used as the intent information of the dialogue text. The intent recognition model is trained using sample text vectors as input and the intent information of the sample text vectors as annotation information.
[0219] As can be seen from the above, when detecting service dialogues using the scheme provided in this embodiment of the invention, the intent recognition model determines the intent information of the dialogue information to be detected from multiple preset intent information. Since the intent recognition model is trained using sample text vectors as input and the intent information of the sample text vectors as annotation information, it can accurately determine the intent information of the dialogue information to be detected based on the features learned from each preset intent information. Therefore, the service dialogue detection scheme provided in this embodiment of the invention can improve the accuracy of service dialogue detection.
[0220] In one embodiment of the present invention, the information processing module 601 is further configured to obtain the current text of the current dialogue information and detect whether the current text includes a preset violation keyword. If the current text includes the preset violation keyword, the current dialogue information is determined to be violation. If the current text does not include the violation keyword, the historical text of multiple historical dialogue information consecutive with the current dialogue information is obtained, and a dialogue text containing the current text and the historical text is obtained.
[0221] As can be seen from the above, when using the solution provided in this embodiment of the invention to detect service dialogues, before obtaining the dialogue text and the user information of the target dialogue user, a preliminary detection of the current dialogue information can be performed by detecting illegal keywords. Thus, when illegal keywords are detected in the current text of the current dialogue information, it can be determined that the current dialogue information is illegal, without the need for subsequent detection using the intent information of the dialogue information to be detected and the user information of the target dialogue user. Therefore, applying the service dialogue detection solution provided in this embodiment of the invention can improve the efficiency of service dialogue detection.
[0222] In one embodiment of the present invention, see Figure 7a The system provides a schematic diagram of the structure of a second type of service dialogue detection system. In this embodiment, in addition to the information processing module 601, intent recognition module 602 and condition judgment module 603, the system also includes a SAG (Service Access Gateway) module 604, an SMU (Service Monitoring Unit) module 605, a KLU (Knowledge Library Unit) module 606 and an IMU (Instant Messenger's unit) module 607.
[0223] The aforementioned SAG module 604 provides access services such as user login, authentication management, security authentication, and load balancing. It implements blacklist / whitelist filtering and permission filtering to prevent unauthorized access by clients. It also provides anti-harassment functionality to prevent the same client from repeatedly accessing the system within a short period, thus reducing system load. Application load balancing ensures that requests within the system are evenly distributed across various backend servers, preventing a large number of requests from being sent to the same server and causing high load.
[0224] The aforementioned SMU module 605 provides functions such as business management, intelligent services, API (Application Programming Interface) management, and routing management. Among these, the business management function coordinates the collaboration of various modules in the system; the intelligent service function manages the intelligent dialogue in the system, which refers to the interactive dialogue between customers and AI customer service; the API management function provides interfaces to the outside world and is responsible for calling SMU module 605; and the routing management function intelligently allocates customers and customer service representatives based on system resources, customer needs, customer information, and employee information.
[0225] KLU module 606 can be regarded as a knowledge base. It is used to store industry knowledge of the industry to which the storage service belongs, provide customers with professional knowledge in the industry, and can receive retrieval requests sent by information processing module 601. Based on the retrieval request, it searches the stored knowledge and feeds back the retrieved knowledge to information processing module 601.
[0226] The IMU module 607 is used to establish dialogue paths between various dialogue users participating in the service dialogue, and to realize functions such as transmission, recording, and storage of dialogue information.
[0227] The aforementioned information processing module 601 is also used to detect whether the dialogue information to be detected includes preset illegal keywords. If the dialogue information to be detected includes illegal keywords, then the dialogue information to be detected is determined to be illegal.
[0228] See Figure 7b , Figure 7b This is a schematic diagram of the workflow of a service dialogue detection system. Figure 7b In China, the workflow of the service dialogue detection system includes the following steps:
[0229] Step S701: SAG module 604 receives a dialogue request sent by the dialogue user;
[0230] Step S702: Based on the dialogue request, perform user security authentication and authorization on the dialogue user, and generate a dialogue permission after successful authentication;
[0231] Step S703: Send a dialogue permission to SMU module 605;
[0232] Step S704: SMU module 605 receives dialogue permission and generates dialogue establishment instruction.
[0233] Step S705: Send a dialogue establishment command to the IMU module 607;
[0234] Step S706: IMU module 607 establishes a service dialogue;
[0235] Step S707: SMU module 605 generates the first listening request;
[0236] Step S708: SMU module 605 sends a first listening request to information processing module 601;
[0237] Step S709: Service dialogue begins. The information processing module 601 receives dialogue information sent by each dialogue user in real time and performs illegal keyword detection on the received dialogue information. If illegal keywords are detected in the dialogue information, the dialogue user who sent the illegal dialogue information is notified; if no illegal keywords are detected in the dialogue information, the dialogue text of the dialogue information to be detected is obtained.
[0238] Step S710: The information processing module 601 sends the dialogue text to the intent recognition module 602;
[0239] Step S711: The intent recognition module 602 obtains and recognizes the intent information of the dialogue text;
[0240] Step S712: The intent recognition module 602 sends the above intent information to the condition judgment module 603;
[0241] Step S713: The condition judgment module 603 judges whether the intent information meets the preset conditions and obtains the judgment result;
[0242] Step S714: The condition judgment module 603 sends the judgment result to the information processing module 601;
[0243] Step S715: The information processing module 601 obtains the judgment result of the condition judgment module 603. Based on the obtained judgment result, it detects whether the dialogue information to be detected violates the rules. If it violates the rules, it notifies the dialogue user who sent the violated dialogue information. If it does not violate the rules, it executes step S716.
[0244] Step S716: Information processing module 601 sends intent information to condition judgment module 603;
[0245] Step S717: The condition judgment module 603 obtains the user information of each dialogue user participating in the service dialogue and obtains the intent information of each dialogue message. It uses the obtained user information and intent information to perform rule condition judgment and detects whether all the conditions corresponding to the service dialogue rule are met. If so, it generates the service dialogue rule detection result.
[0246] Step S718: The condition judgment module 603 sends the service dialogue rule detection result to the SMU module 605;
[0247] Step S719: The SMU module 605 obtains the detection result, determines the preset violation level corresponding to the violated service dialogue rule, and adjusts the service dialogue process through the adjustment method corresponding to the determined preset violation level.
[0248] The aforementioned preset violation levels can be divided into violations and serious violations. The adjustment method for violation levels can be to notify the user who sent the violation message, while the adjustment method for serious violations can be to notify both the user who sent the violation message and the administrator of the service dialogue detection system.
[0249] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804.
[0250] Memory 803 is used to store computer programs;
[0251] When processor 801 executes a program stored in memory 803, it performs the following steps:
[0252] Obtain the dialogue text of the dialogue information to be detected, wherein the dialogue information to be detected includes: the current dialogue information in the service dialogue process and multiple historical dialogue information consecutive with the current dialogue information;
[0253] Features of the dialogue text are extracted, and the extracted features are compared with the features of each of the multiple preset intent information to obtain multiple comparison results. Based on the multiple comparison results, the intent information of the dialogue information to be detected is determined in each of the preset intent information.
[0254] Based on whether the determined intent information violates the rules, the detection function checks whether the dialogue information to be detected violates the rules.
[0255] In addition, the above-mentioned electronic device can also implement other service dialogue detection methods as described in the previous method embodiment section, which will not be detailed here.
[0256] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0257] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0258] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0259] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0260] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the above-described service dialogue detection methods.
[0261] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the service dialogue detection methods described above.
[0262] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0263] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0264] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system, electronic device, computer-readable storage medium, and computer program product embodiments are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0265] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A service conversation detection method, characterized by, The method comprises: obtaining dialogue text of dialogue information to be detected, and obtaining user information of a target dialogue user included in a first condition, wherein the dialogue information to be detected comprises current dialogue information in a service dialogue process and a plurality of historical dialogue information continuous with the current dialogue information, and the first condition is set according to user information of a dialogue user specified in a pre-agreed service dialogue rule; extracting features of the dialogue text, comparing the extracted features with features of each of a plurality of preset intent information, obtaining a plurality of comparison results, and determining intent information of the dialogue information to be detected from the preset intent information based on the obtained plurality of comparison results, wherein the preset intent information is used to represent an intent of a dialogue user inputting dialogue information; in the case that the determined intent information is not in violation, judging whether the user information of the target dialogue user meets the first condition, and judging whether the determined intent information meets a second condition, wherein the second condition is set according to rule content of the service dialogue rule; if the user information of the target dialogue user meets the first condition and the determined intent information meets the second condition, it is determined that the dialogue information to be detected is in violation; in the case that the determined intent information is not in violation, judging whether the user information of the target dialogue user meets the first condition, and judging whether the determined intent information meets a second condition, if the user information of the target dialogue user meets the first condition and the determined intent information meets the second condition, it is determined that the dialogue information to be detected is in violation, comprising: in the case that there are a plurality of service dialogue rules, for each service dialogue rule, in the case that the determined intent information is not in violation, judging whether the user information of the target dialogue user meets a first condition corresponding to the service dialogue rule, and judging whether the determined intent information meets a second condition corresponding to the service dialogue rule, if the user information of the target dialogue user meets the first condition corresponding to the service dialogue rule and the determined intent information meets the second condition corresponding to the service dialogue rule, it is determined that the dialogue information to be detected is in violation; wherein for each service dialogue rule, the first condition corresponding to the service dialogue rule is set according to user information of a dialogue user specified in the service dialogue rule, and the second condition corresponding to the service dialogue rule is set according to rule content of the service dialogue rule; the first condition is composed of a plurality of first sub-conditions, and a trigger condition meeting the first condition is any one of the following two conditions: meeting one or more of a plurality of first sub-conditions, meeting one or more of necessary sub-conditions and non-necessary sub-conditions in a plurality of first sub-conditions; and / or the second condition is composed of a plurality of second sub-conditions, and a trigger condition meeting the second condition is any one of the following two conditions: satisfying one or more of the plurality of second sub-conditions, satisfying a necessary sub-condition of the plurality of second sub-conditions, and satisfying one or more of an unnecessary sub-condition.
2. The method of claim 1, wherein, The determining the intent information of the to-be-detected dialogue information in each preset intent information comprises: determining the obtained intent information as the intent information of the current dialogue information; The method further comprises: For each dialogue user participating in the service dialogue, judging whether the intent information of each piece of dialogue information input by the dialogue user satisfies a rule condition, and detecting whether each piece of dialogue information input by the dialogue user is in violation according to the judgment result, wherein the rule condition is set according to a pre-agreed service dialogue rule.
3. The method of claim 2, wherein, The rule condition comprises a third condition and a fourth condition, wherein the third condition is set according to user information of a dialogue user specified in the service dialogue rule, and the fourth condition is set according to rule content of the service dialogue rule. The judging whether the intent information of each piece of dialogue information input by the dialogue user satisfies a rule condition, and detecting whether each piece of dialogue information input by the dialogue user is in violation according to the judgment result, comprises: obtaining user information of each dialogue user participating in the service dialogue process; judging whether the user information of each dialogue user satisfies the third condition, and judging whether the intent information of each piece of dialogue information input by the dialogue user satisfies the fourth condition; if the user information of each dialogue user satisfies the third condition, and the intent information of each piece of dialogue information input by the dialogue user satisfies the fourth condition, determining that the dialogue information input by the user is in violation.
4. The method according to any one of claims 1 to 3, characterized in that, The dialogue user comprises a customer and a customer service; The user information of the customer comprises at least one of the following information: a risk tolerance level representing a risk tolerance degree of the customer, a customer level, a customer permission, and a location of the customer; The user information of the customer service comprises at least one of the following information: a position of the customer service, a customer service level, a customer service permission, and a location of the customer service.
5. The method according to any one of claims 1-3, characterized in that, The current dialogue information and the plurality of pieces of historical dialogue information are dialogue information input by a same dialogue user.
6. The method according to any one of claims 1-3, characterized in that, The extracting the features of the dialogue text, comparing the extracted features with features of each intent information in a plurality of preset intent information to obtain a plurality of comparison results, and determining the intent information of the dialogue text based on the obtained plurality of comparison results, comprises: obtaining a text vector composed of word vectors of each word in the dialogue text; inputting the text vector into a pre-trained intent recognition model to obtain intent information determined by the intent recognition model from each piece of preset intent information as the intent information of the dialogue text, wherein the intent recognition model is trained by taking a sample text vector as input and taking the intent information of the sample text vector as labeled information.
7. The method according to any one of claims 1-3, characterized in that, The obtaining the dialogue text of the to-be-detected dialogue information comprises: obtaining a current text of the current dialogue information; detecting whether the current text comprises a preset violation keyword; if yes, determining that the current dialogue information is in violation; If not, historical texts of a plurality of pieces of historical dialogue information continuous to the current dialogue information are obtained, and dialogue texts containing the current text and the historical texts are obtained.
8. A service conversation detection system, characterized by The system comprises an information processing module, an intention recognition module, and a condition judgment module. The information processing module is configured to receive dialogue information sent by each dialogue user participating in a dialogue, obtain dialogue texts of to-be-detected dialogue information, and obtain user information of a target dialogue user included in a first condition, wherein the to-be-detected dialogue information comprises current dialogue information in a service dialogue process and a plurality of pieces of historical dialogue information continuous to the current dialogue information, and the first condition is set according to user information of a dialogue user specified in a pre-agreed service dialogue rule. The intention recognition module is configured to obtain the dialogue texts, extract features of the dialogue texts, compare the extracted features with features of each piece of preset intention information in a plurality of pieces of preset intention information in terms of similarity, obtain a plurality of comparison results, and determine intention information of the to-be-detected dialogue information in each piece of preset intention information based on the obtained plurality of comparison results, wherein the preset intention information is used to represent an intention of a dialogue user inputting dialogue information. The information processing module is further configured to obtain the determined intention information, and detect whether the to-be-detected dialogue information is in violation according to whether the determined intention information is in violation. The condition judgment module is configured to store the first condition and a second condition, wherein the first condition is set according to user information of a dialogue user specified in a pre-agreed service dialogue rule, and the second condition is set according to rule content of the service dialogue rule. The condition judgment module is further configured to obtain the intention information of the to-be-detected dialogue information and the user information of the target dialogue user included in the first condition, judge whether the user information of the target dialogue user satisfies the first condition, and judge whether the determined intention information satisfies the second condition, to obtain a first judgment result. The information processing module is further configured to obtain the first judgment result, and detect whether the to-be-detected dialogue information is in violation according to the first judgment result. The condition judgment module is specifically configured to, in a case where a plurality of service dialogue rules exist, for each service dialogue rule, in a case where the determined intention information is not in violation, judge whether the user information of the target dialogue user satisfies a first condition corresponding to the service dialogue rule and whether the determined intention information satisfies a second condition corresponding to the service dialogue rule, to obtain a second judgment result, wherein for each service dialogue rule, the first condition corresponding to the service dialogue rule is set according to user information of a dialogue user specified in the service dialogue rule, and the second condition corresponding to the service dialogue rule is set according to rule content of the service dialogue rule. The information processing module is further configured to obtain the second judgment result, and detect whether the to-be-detected dialogue information is in violation according to the second judgment result. The first condition is composed of a plurality of first sub-conditions, and a trigger condition satisfying the first condition is any one of the following two conditions: satisfying one or more of the plurality of first sub-conditions, satisfying a necessary one of the plurality of first sub-conditions and one or more of the non-necessary sub-conditions; and / or the second condition is composed of a plurality of second sub-conditions, and the trigger condition for satisfying the second condition is any one of the following two conditions: satisfying one or more of the plurality of second sub-conditions, satisfying a necessary one of the plurality of second sub-conditions and one or more of the non-necessary sub-conditions.
9. An electronic device, comprising: comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete the communication among each other through the communication bus; the memory is used for storing a computer program; the processor is used for executing the program stored on the memory, and realizes the method steps in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps in any one of claims 1-7.
Citation Information
Patent Citations
Customer service call voice quality inspection method and device, electronic equipment and storage medium
CN112804400A
Business process quality inspection method and device based on voice interaction data
CN113723767A