Telephone service processing method and device and medium
By continuously identifying and updating the user's call intention during the telephone service, the problem of ignoring new call intentions in the prior art is solved, the user experience and intention recognition accuracy is improved, and a faster service response is achieved.
Patent Information
- Application Number
- CN202411296218.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-29
AI Technical Summary
The prior art ignores new call intentions generated by users during the telephone service process, resulting in poor user experience and the intent recognition accuracy needs to be improved.
By performing intent identification of voice data during incoming calls by the user terminal and during service execution, real and new call intent are obtained, and intent confirmation instructions are detected when service execution is completed, the target call intent is updated to respond to the user's new service needs.
Timely capture various user's call intentions, improve service response speed and user experience, and improve the overall quality of telephone services.
Smart Images

Figure CN119049457A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a telephone service processing method, device and medium. Background Art
[0002] Telephone service is the main way for enterprises to communicate with users. It is characterized by immediacy, directness and strong interactivity. In related technologies, the user's call intention is obtained by performing intent recognition on the user's voice information during the call, and then the corresponding service is executed based on the user's call intention to respond to the user's service needs. However, during the service execution, new call intentions may be generated. Related technologies often ignore new call intentions, which reduces the user experience of telephone services. Summary of the invention
[0003] The embodiments of the present application provide a telephone service processing method, device and medium for improving the user experience of telephone services.
[0004] On the one hand, an embodiment of the present application provides a telephone service processing method, the method comprising the following steps: In the case of an incoming call from a user terminal, performing intent recognition on the first voice data to obtain a first call intent as a target call intent; wherein the first voice data is voice data output by the user terminal in the case of an incoming call from the user terminal; According to the target call intention, a target service is obtained and the target service is executed; During the execution of the target service, performing intent recognition on the second voice data to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; When the target service is executed, if an intention confirmation instruction of the user terminal is detected, the second call intention corresponding to the intention confirmation instruction is determined as the new target call intention, and the process returns to the step of obtaining the target service and executing the target service according to the target call intention.
[0005] On the other hand, an embodiment of the present application provides a telephone service processing device, the device comprising: A first processing module is used to perform intent recognition on the first voice data when a user terminal calls in, and obtain a first call intention as a target call intention; wherein the first voice data is voice data output by the user terminal when the user terminal calls in; A second processing module, configured to obtain a target service and execute the target service according to the target call intention; a third processing module, configured to perform intent recognition on the second voice data during the execution of the target service to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; The fourth processing module is used to determine the second call intention corresponding to the intention confirmation instruction as the new target call intention if an intention confirmation instruction of the user terminal is detected when the target service is executed, and return to the second processing module.
[0006] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned telephone service processing method.
[0007] The telephone service processing method, device and medium of the embodiments of the present application, when a user terminal calls in, obtains a first call intention by performing intent recognition on the voice data output by the user terminal when the user terminal calls in, and the first call intention is used to characterize the user's real call intention when the user terminal calls in, and then determines the target service based on the first call intention, and executes the target service to respond to the user's initial service demand; and during the execution of the target service, obtains at least one second call intention by performing intent recognition on the voice data output by the user terminal during this period, and the second call intention is used to characterize the new call intention generated by the user during this period; after the service is executed, if an intention confirmation instruction of the user terminal is detected, the second call intention corresponding to the intention confirmation instruction is determined as the new target call intention, and returns to the step of obtaining the target service and executing the target service according to the target call intention to respond to the user's new service demand, so that the various call intentions of the user in the telephone service process can be captured in a timely manner, thereby improving the response speed to the various service demands of the user and improving the user experience of the telephone service.
[0008] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a flow chart of the telephone service processing method provided by this application; Figure 2 It is a flow chart of intent recognition provided by this application; Figure 3 is a flowchart of intention prediction provided by this application; Figure 4 is a flowchart of search recommendations provided by this application; Figure 5 is another flow chart of intent recognition provided by this application; Figure 6 It is a schematic diagram of the intention decision provided by this application; Figure 7 is another flow chart of the telephone service processing method provided by the present application; Figure 8 It is another flow chart of the telephone service processing method provided by the present application; Fig. 9 is another flow chart of intent recognition provided by this application; Fig.10 It is a structural diagram of the telephone service processing device provided in this application. DETAILED DESCRIPTION
[0010] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0011] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0012] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0014] Telephone service is the main way for enterprises to communicate with users. It is characterized by immediacy, directness and strong interactivity. In the related art, the user's call intention is obtained by performing intent recognition on the user's voice information during the call, and then the corresponding service is executed based on the user's call intention to respond to the user's service needs. However, during the execution of the service, new call intentions may be generated, but the related art often ignores the new call intentions, which leads to poor user experience of telephone services. In addition, the related art usually converts the user's voice information during the call into text information, and then uses a preset intent recognition model to perform intent recognition on the text information. The accuracy of its intent recognition needs to be improved.
[0015] In view of this, embodiments of the present application provide a telephone service processing method, device, and medium, aiming to improve the user experience of telephone services and the accuracy of intent recognition.
[0016] First, the implementation steps of the telephone service processing method of the present application will be described in detail below with reference to the accompanying drawings.
[0017] It should be noted that in each implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when each implementation of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of each implementation of the present application will be obtained.
[0018] The telephone service processing method of the embodiment of the present application can be applied to a terminal, a server, or software running in a terminal or a server. The terminal can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. In addition, the server can also be a node server in a blockchain network, but is not limited to this. Among them, blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
[0019] Reference Figure 1 , Figure 1It is a flow chart of the telephone service processing method provided by the present application, and the telephone service processing method may include the following steps S101-S104: S101, when a user terminal calls in, performing intent recognition on first voice data to obtain a first call intent as a target call intent; wherein the first voice data is voice data output by the user terminal when the user terminal calls in; S102, obtaining a target service and executing the target service according to the target call intention; S103, performing intent recognition on the second voice data during the execution of the target service to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; S104, when the target service is executed, if an intention confirmation instruction of the user terminal is detected, the second call intention corresponding to the intention confirmation instruction is determined as the new target call intention, and the process returns to the step of obtaining the target service and executing the target service according to the target call intention.
[0020] In an embodiment of the present application, when a user terminal calls in, a first call intention is obtained by performing intent recognition on voice data output by the user terminal when the user terminal calls in, and the first call intention is used to characterize the user's real call intention when the user terminal calls in. Then, a target service is determined based on the first call intention, and the target service is executed to respond to the user's initial service needs. During the execution of the target service, at least one second call intention is obtained by performing intent recognition on voice data output by the user terminal during this period, and the second call intention is used to characterize a new call intention generated by the user during this period. After the service is executed, if an intention confirmation instruction of the user terminal is detected, it means that the user terminal expects to execute a second call intention. At this time, the second call intention corresponding to the intention confirmation instruction is determined as a new target call intention, and the process returns to the step of obtaining and executing the target service according to the target call intention to respond to the user's new service needs. In this way, the various call intentions of the user during the telephone service process can be captured in a timely manner, thereby improving the response speed to the various service needs of the user and improving the user experience of the telephone service.
[0021] In the above step S101, when the user terminal calls in, the first voice data is obtained, and then the intent of the first voice data is recognized to obtain the first call intention as the target call intention, so that the corresponding service can be executed based on the target call intention in the subsequent steps to respond to the user's service needs.
[0022] The user terminal is mainly used to obtain and output the user's voice data when the user terminal calls in or during the execution of the target service.
[0023] The above-mentioned user terminal can be configured according to actual conditions, and the embodiments of the present application do not specifically limit this.
[0024] For example, the user terminal may be a smart phone or a landline phone, but is not limited thereto.
[0025] The first voice data refers to the voice data output by the user terminal when a call is received by the user terminal.
[0026] The first call intention is used to indicate the user's real call intention when a call is received by the user terminal.
[0027] The above-mentioned performing intent recognition on the first voice data to obtain the first call intention may include converting the first voice data into a first text, performing intent recognition on the first text through a pre-trained first neural network model to obtain the first call intention, but is not limited to this.
[0028] The first neural network model may be a neural network model trained by using a plurality of preset first texts and an intention category corresponding to each preset first text.
[0029] The above-mentioned first neural network model can be set according to actual conditions, and the embodiment of the present application does not make any specific limitation on this.
[0030] For example, the first neural network model may be a recognition model based on a convolutional neural network model; or, the first neural network model may be a recognition model based on a recurrent neural network model, but is not limited thereto.
[0031] In the above step S102, after the target call intention is determined, the target service is determined by the target call intention, and the target service is executed to respond to the user's initial service demand.
[0032] The above-mentioned obtaining the target service according to the target call intention may include selecting a preset service corresponding to the target call intention as the target service from a plurality of preset services.
[0033] The above-mentioned preset services can be set according to actual conditions, and the embodiments of the present application do not make specific limitations on this.
[0034] Alternatively, the above-mentioned obtaining the target service according to the target call intention may include obtaining the target service according to the target call intention in combination with a machine learning method, but is not limited thereto.
[0035] The above-mentioned machine learning method can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.
[0036] For example, the above-mentioned machine learning method may be a support vector machine; or, the above-mentioned machine learning method may be a random forest or logistic regression, but is not limited thereto.
[0037] The above-mentioned execution of the target service may include calling and processing at least one functional interface of the target service, but is not limited thereto.
[0038] The above functional interfaces can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.
[0039] For example, the above functional interface may be an application programming interface, but is not limited thereto.
[0040] In the above step S103, during the execution of the target service, one or more new call intentions may be generated. For example, during the broadband service application, the user wants to modify the call package, and a new call intention will be generated at this time. In order to capture the call intention generated during this period, during the execution of the target service, the second voice data is obtained, and the second voice data is subjected to intent recognition to obtain the second call intention. When it is detected that the target service has not been completed, the step of obtaining the second voice data is returned to realize loop recognition until it is detected that the target service has been completed, and one or more second call intentions identified during this period are output. The second call intention can be understood as a new call intention generated during the execution of the target service. In this way, when the target service is completed, a new service is executed based on the new call intention generated during the service execution, thereby meeting the user's new service needs.
[0041] The second voice data refers to voice data output by the user terminal during the execution of the target service.
[0042] The frequency of obtaining the second voice data may be set according to actual conditions, and the embodiment of the present application does not specifically limit this. For example, the second voice data may be obtained once per minute, but is not limited thereto.
[0043] The second call intention is used to indicate the user's actual call intention during the execution of the target service.
[0044] The above-mentioned performing intent recognition on the second voice data to obtain at least one second call intention may include converting the second voice data into a second text, performing intent recognition on the second text through a pre-trained second neural network model to obtain at least one second call intention, but is not limited to this.
[0045] The second neural network model may be a neural network model trained by using a plurality of preset second texts and an intention category corresponding to each preset second text.
[0046] The above-mentioned second neural network model can be set according to actual conditions, and the embodiment of the present application does not make any specific limitation on this.
[0047] For example, the second neural network model may be a recognition model based on a convolutional neural network model; or, the second neural network model may be a recognition model based on a recurrent neural network model, but is not limited thereto.
[0048] In the above step S104, after the target service is executed, if an intention confirmation instruction of the user terminal is detected, the second call intention corresponding to the intention confirmation instruction is determined as the new target call intention, and the process returns to the step of obtaining the target service and executing the target service according to the target call intention to respond to the user's new service needs.
[0049] The above intention confirmation instruction is used to respond to the user's second call intention.
[0050] The above-mentioned detection of the user terminal's intention confirmation instruction may include obtaining third voice data, the third voice data refers to the voice data output by the user terminal when the target service is executed, and converting the third voice data into a third recognition text. If it is detected that the third recognition text contains keywords associated with any second call intention, it is determined that the user terminal's intention confirmation instruction is detected.
[0051] Alternatively, the above-mentioned detection of the intention confirmation instruction of the user terminal may include sending at least one second call intention to the user terminal so that the user terminal confirms at least one second call intention. If the user terminal confirms any second call intention, the user terminal returns the intention confirmation instruction corresponding to the confirmed second call intention; the intention confirmation instruction sent by the user terminal is obtained, and it is determined that the intention confirmation instruction of the user terminal is detected at this time, but it is not limited to this.
[0052] The new target call intention may be a second call intention corresponding to the intention confirmation instruction; or, the new target call intention may be a call intention updated and changed according to changes in user needs, but is not limited thereto.
[0053] The above steps will be further described below.
[0054] In some embodiments, reference Figure 2 The above-mentioned performing intent recognition on the first voice data to obtain the first call intention may include: Converting the first voice data to obtain first text data; If it is detected that there is no keyword belonging to any preset intent category in the first text data, the intent is predicted on the first text data to obtain a first intent sequence, and the first text data is roughly sorted and finely sorted to obtain a second intent sequence; A first call intention is obtained according to the first intention sequence and the second intention sequence.
[0055] In this embodiment, the first voice data is converted to obtain the first text data, and it is detected whether there are keywords belonging to any preset intent category in the first text data; if so, it means that the intent recognition cannot be realized by keyword retrieval, and the intent recognition is realized by intent prediction, rough sorting and fine sorting. Specifically, firstly, the intent is predicted on the first text data to obtain a first intent sequence, so as to quickly capture the user intent in natural language; and, the first text data is roughly sorted and finely sorted to obtain a second intent sequence, both of which belong to search recommendation technology, and the search recommendation technology is used to realize the accurate capture of user intent in natural language; finally, the first call intent is determined by the first intention sequence and the second intention sequence, so that a more comprehensive and accurate user call intent, especially complex call intent, can be quickly captured, effectively improving the accuracy of intent recognition.
[0056] The first text data mentioned above refers to the first text data obtained by converting the first voice data.
[0057] The above-mentioned converting the first voice data to obtain the first text data may include performing voice recognition on the first voice data through a preset voice recognition model to obtain the first text data, but is not limited thereto.
[0058] The above-mentioned speech recognition model can be set according to actual conditions, and this embodiment does not make any specific limitation to this.
[0059] For example, the above-mentioned speech recognition model can be a recurrent neural network model; or, the above-mentioned speech recognition model can be a recursive neural network model, but is not limited thereto.
[0060] The above-mentioned keywords belonging to any preset intent category may be pre-set keywords.
[0061] The above-mentioned preset intention categories can be set according to actual conditions, and this embodiment does not specifically limit this.
[0062] The first intention sequence is used to indicate the result obtained by performing intention prediction on the first text data.
[0063] The above-mentioned performing intention prediction on the first text data to obtain the first intention sequence may include performing intention prediction on the first text data through a pre-trained third neural network model to obtain the first intention sequence, but is not limited to this.
[0064] The third neural network model may be a neural network model trained by using a plurality of preset third texts and an intention category corresponding to each preset third text.
[0065] The above-mentioned third neural network model can be set according to actual conditions, and the embodiment of the present application does not make any specific limitation on this.
[0066] For example, the third neural network model may be a prediction model based on a convolutional neural network model; or, the third neural network model may be a prediction model based on a recurrent neural network model, but is not limited thereto.
[0067] The second intention sequence is used to indicate the results obtained by performing rough sorting and fine sorting on the first text data.
[0068] The above-mentioned rough sorting and fine sorting of the first text data to obtain the second intention sequence may include rough sorting of the first text data to obtain rough processed data, and simultaneously fine sorting of the first text data to obtain fine processed data, and merging the rough processed data and the fine processed data into the second intention sequence, but is not limited to this.
[0069] The intention prediction of the first text data and the rough sorting and fine sorting of the first text data may be performed in parallel, for example, the intention prediction of the first text data is performed while the rough sorting and fine sorting of the first text data are performed.
[0070] Alternatively, the above-mentioned intention prediction of the first text data and the above-mentioned rough sorting and fine sorting of the first text data can be executed serially, for example, the first text data is firstly predicted for intention, and then the first text data is roughly sorted and finely sorted; or, the first text data is firstly rough sorted and finely sorted, and then the first text data is predicted for intention.
[0071] The above-mentioned obtaining of the first call intention based on the first intention sequence and the second intention sequence may include obtaining a fused intention sequence for the first intention sequence and the second intention sequence, and then obtaining the first call intention based on the fused intention sequence in combination with a machine learning method, but is not limited to this.
[0072] In one example, for each preset intent category, a keyword of the preset intent category is determined, wherein the first The keywords of the preset intent categories can be expressed as , To indicate the The preset intent categories include keywords; for a given length Text data , the keywords of each preset intent category are traversed; during the traversal, if it is detected that all the keywords of all preset intent categories are not in the text data, intent recognition is achieved through intent prediction, rough sorting and fine sorting.
[0073] In some embodiments, reference Figure 2 The above-mentioned performing intent recognition on the first voice data to obtain the first call intention may also include: If it is detected that there are keywords belonging to any preset intention category in the first text data, the first call intention is determined according to at least one keyword belonging to the corresponding preset intention category in the first text data.
[0074] In this embodiment, if it is detected that there are keywords belonging to any preset intention category in the first text data, it means that intention recognition can be directly realized through keyword retrieval. At this time, the first call intention is determined based on at least one keyword in the first text data that belongs to the corresponding preset intention category, thereby improving the efficiency of intent recognition.
[0075] The above-mentioned determination of the first call intention based on at least one keyword belonging to the corresponding preset intention category in the first text data may include determining all keywords in the first text data belonging to the corresponding preset intention category as candidate keywords, and obtaining the preset intention category to which the candidate keyword with the highest frequency of occurrence in the first text data belongs as the first call intention.
[0076] Alternatively, the above-mentioned determination of the first call intention based on at least one keyword belonging to the corresponding preset intention category in the first text data may include determining all keywords in the first text data that belong to the corresponding preset intention category as candidate keywords, and obtaining the preset intention category to which the candidate keyword with the earliest appearance time in the first text data belongs as the first call intention, but is not limited to this.
[0077] In one example, for each preset intent category, a keyword of the preset intent category is determined, wherein the first The keywords of the preset intent categories can be expressed as , To indicate the The preset intent categories include keywords; for a given length Text data , traverse the keywords of each preset intent category; during the traversal, if the first If any keyword of a preset intent category is in the text data, the category of the text data is considered to be preset intent category, and the call intent is determined to be Preset intent categories.
[0078] In some embodiments, reference Figure 3 , the above-mentioned performing intention prediction on the first text data to obtain the first intention sequence may include: Using a pre-trained first prediction model, the first text data is subjected to intent prediction to obtain a plurality of intent prediction labels and a prediction probability of each intent prediction label; According to the prediction probability of each intention prediction label, a first preset number of intention prediction labels are selected from a plurality of intention prediction labels as target intention labels; According to each target intent label and the predicted probability of each target intent label, a first intent sequence is obtained.
[0079] In this implementation, first, a pre-trained first prediction model is used to perform intent prediction on the first text data to obtain a number of intent prediction labels and a prediction probability of each intent prediction label; then, the prediction probability of each intent prediction label is used to select a first preset number of intent prediction labels as target intent labels from among the several intent prediction labels; finally, a first intent sequence is obtained through each target intent label and the prediction probability of each target intent label. In this way, the advantages of the prediction model in the intent prediction task are fully utilized, and the user's real call intention is quickly captured through the prediction model to improve the accuracy of intent recognition.
[0080] The first prediction model may be an intent prediction model pre-trained by using a plurality of preset multi-label classification texts and the intent category corresponding to each preset multi-label classification text.
[0081] The above-mentioned first prediction model can be set according to actual conditions, and this embodiment does not make any specific limitation to this.
[0082] For example, the first prediction model may be an intention prediction model based on a Tiny-Bert model; or, the first prediction model may be an intention prediction model based on a Bert model, but is not limited thereto.
[0083] The above-mentioned intention prediction labels are all used to characterize the intention category corresponding to the first text data, and the prediction probability of each intention prediction label is different.
[0084] The above-mentioned first preset number can be set according to actual conditions, and this embodiment does not make any specific limitation to this.
[0085] For example, the first preset number is 5, but is not limited thereto.
[0086] The above-mentioned method of selecting a first preset number of intention prediction tags as target intent tags from among a number of intention prediction tags based on the prediction probability of each intention prediction tag may include: first, sorting a number of intention prediction tags according to the prediction probability of each intention prediction tag, wherein the sorting of the intention prediction tags is negatively correlated with the prediction probability of the intention prediction tags, that is, the earlier the sorting of the intention prediction tag, the greater the prediction probability of the intention prediction tag; and then, selecting the first N intention prediction tags as target intent tags, where N is the first preset number.
[0087] Alternatively, the above-mentioned selecting a first preset number of intention prediction tags as target intent tags from a number of intention prediction tags based on the prediction probability of each intention prediction tag may include: first, sorting a number of intention prediction tags according to the prediction probability of each intention prediction tag, wherein the sorting of the intention prediction tags is positively correlated with the prediction probability of the intention prediction tags, that is, the earlier the ranking of the intention prediction tag, the smaller the prediction probability of the intention prediction tag; then, selecting the last N intention prediction tags as target intent tags, where N is the first preset number.
[0088] The above-mentioned first intent sequence may include each target intent label and the predicted probability of each target intent label.
[0089] In one example, for a given length Text data First, the text data is input into the pre-trained first prediction model, and the intent prediction is performed through the first prediction model to obtain several intent prediction labels and the prediction probability of each intent prediction label; then, according to the prediction probability of each intent prediction label, several intent prediction labels are sorted, where the sorting of intent prediction labels is negatively correlated with the prediction probability of intent prediction labels; then, the first five intent prediction labels are selected as target intent labels; finally, the first intent sequence is constructed through each target intent label and the prediction probability of each target intent label, that is, ,in, represents the first intention sequence, Indicates target intent labels, Indicates The predicted probability of the target intent label, Represents the ranking number of the target intent label. The ranking number is negatively correlated with the predicted probability, that is, the smaller the ranking number of the target intent label, the higher the predicted probability of the target intent label.
[0090] In another example, the generation process of the first prediction model may include: First, obtain a first data set. The first data set may include multiple preset multi-label classification texts and the intent category corresponding to each preset multi-label classification text. Each multi-label classification text and the intent category corresponding to each multi-label classification text can be expressed as , Represents multi-label classification text, Indicates the intent category corresponding to the multi-label classification text, and then divides the first data set into a first training set, a first validation set, and a first test set according to a first preset ratio; Then, a multi-label classification model based on the Tiny-Bert model is built, and multiple rounds of training are performed on the multi-label classification model using the first training set. At the end of each round of training, the performance parameters of the multi-label classification model trained in this round on the first validation set are evaluated, so as to obtain the multi-label classification model with the best performance parameters on the first validation set as the candidate multi-label classification model; Finally, the candidate multi-label classification model is tested through the first test set to obtain the performance parameters of the candidate multi-label classification model, and it is determined whether the performance parameters of the candidate multi-label classification model meet the preset classification standards; if so, the candidate multi-label classification model is output as the first prediction model; if not, the parameters of the training process are optimized, and the step of performing multiple rounds of training on the multi-label classification model through the first training set is returned to realize cyclic training.
[0091] The number of multi-label classified texts contained in the first data set may be more than 100,000, but is not limited thereto.
[0092] The first preset ratio may be 8:1:1, that is, the first data set is divided into a first training set, a first validation set, and a first test set according to a ratio of 8:1:1, but is not limited thereto.
[0093] The classification layer of the above multi-label classification model can be a classification layer based on a Softmax function, but is not limited thereto.
[0094] The performance parameters of the multi-label classification model and the performance parameters of the candidate multi-label classification model may be average accuracy or F1 score, etc., but are not limited thereto.
[0095] The above classification standard may be an accuracy threshold or an F1 score threshold, but is not limited thereto.
[0096] The loss function used in the above-mentioned multiple rounds of training may be a binary cross entropy loss function or a log-likelihood loss function, but is not limited thereto.
[0097] In some embodiments, reference Figure 4The above-mentioned rough sorting and fine sorting of the first text data to obtain the second intention sequence may include: Encoding and vectorizing the first text data to obtain text encoding data; According to the similarity of each preset coded data, a second preset number of preset coded data is selected from a plurality of preset coded data as the rough sorting data; wherein the similarity of the preset coded data is the similarity of the preset coded data with respect to the text coded data; According to the similarity of each rough sorting data, a third preset number of rough sorting data is selected from the second preset number of rough sorting data as fine sorting data; wherein the similarity of the rough sorting data is the similarity of the sentence text corresponding to the rough sorting data with respect to the first text data, and the third preset number is less than the second preset number; A second intention sequence is obtained according to the target intention category corresponding to each refined sorted data and the similarity of each refined sorted data; the similarity of the refined sorted data is the similarity of the sentence text corresponding to the refined sorted data with respect to the first text data.
[0098] In this implementation, first, the first text data is encoded and vectorized to obtain text encoding data; then, the similarity of each preset encoding data is obtained, and the similarity of the preset encoding data refers to the similarity of the preset encoding data relative to the text encoding data, and based on the similarity of each preset encoding data, a second preset number of preset encoding data is selected from a plurality of preset encoding data, and the selected preset encoding data is determined as coarse-sorted data, so as to preliminarily screen and obtain coarse-sorted data that is relatively similar to the first text data, and implement coarse-sorting processing; then, on the basis of the coarse-sorting processing, the similarity of each coarse-sorted data is obtained, and the similarity of the coarse-sorted data refers to the similarity of the sentence text corresponding to the coarse-sorted data relative to the first text data. similarity, and based on the similarity of each rough sorting data, a third preset number of rough sorting data is selected from the second preset number of rough sorting data, and the selected rough sorting data is used as the refined sorting data, so as to further screen the result of the rough sorting processing, and select the refined sorting data that is most similar to the first text data to realize the refined sorting processing; wherein the third preset number is less than the second preset number; finally, the second intention sequence is obtained through the target intent category corresponding to each refined sorting data and the similarity of each refined sorting data, wherein the similarity of the refined sorting data refers to the similarity of the sentence text corresponding to the refined sorting data with respect to the first text data, so that the user's real call intention can be accurately captured through the search recommendation technology, and the accuracy of intent recognition is improved.
[0099] The above-mentioned encoding and vectorizing the first text data to obtain the text encoding data may include encoding and vectorizing the first text data through a preset vector model to obtain the text encoding data, but is not limited thereto.
[0100] The above vector model can be set according to actual conditions, and this embodiment does not specifically limit this.
[0101] For example, the above-mentioned vector model may be a BGE-Embedding model, but is not limited thereto.
[0102] The above-mentioned preset coding data may be coding data obtained by encoding a preset initial text.
[0103] The similarity of the preset coding data refers to the similarity of the preset coding data to the text coding data.
[0104] The second preset number can be set according to actual conditions, and this embodiment does not impose any specific limitation on this.
[0105] For example, the second preset number may be 10, but is not limited thereto.
[0106] The above-mentioned selecting a second preset number of preset coded data as coarse-sorted data from among a number of preset coded data according to the similarity of each preset coded data may include: first, sorting a number of preset coded data according to the similarity of each preset coded data, wherein the sorting of the preset coded data is negatively correlated with the similarity of the preset coded data, that is, the earlier the preset coded data is sorted, the greater the similarity of the preset coded data; and then, selecting the first M preset coded data as coarse-sorted data, where M is the second preset number.
[0107] Alternatively, the above-mentioned selecting a second preset number of preset coded data as coarse-sorted data from among a number of preset coded data according to the similarity of each preset coded data may include: first, sorting a number of preset coded data according to the similarity of each preset coded data, wherein the sorting of the preset coded data is positively correlated with the similarity of the preset coded data, that is, the later the preset coded data is sorted, the greater the similarity of the preset coded data; and then, selecting the last M preset coded data as coarse-sorted data, where M is the second preset number.
[0108] The similarity of the above-mentioned rough-sorted data refers to the similarity of the sentence text corresponding to the rough-sorted data with respect to the first text data.
[0109] The sentence text corresponding to the above-mentioned rough-sorted data refers to the preset similar sentences of the rough-sorted data.
[0110] The third preset number is smaller than the second preset number.
[0111] The third preset number can be set according to actual conditions, and this embodiment does not impose any specific limitation on this.
[0112] For example, the third preset number may be 5, but is not limited thereto.
[0113] The above-mentioned method of selecting a third preset number of rough sorted data as fine sorted data from a second preset number of rough sorted data according to the similarity of each rough sorted data may include: first, sorting the M rough sorted data according to the similarity of each rough sorted data, wherein the sorting of the rough sorted data is negatively correlated with the similarity of the rough sorted data, that is, the higher the sorting of the rough sorted data, the greater the similarity of the rough sorted data; then, selecting the first R rough sorted data as fine sorted data, where R is the third preset number, and M is the second preset number.
[0114] Alternatively, the above-mentioned method of selecting a third preset number of rough sorted data as fine sorted data from a second preset number of rough sorted data based on the similarity of each rough sorted data may include: first, sorting the M rough sorted data according to the similarity of each rough sorted data, wherein the sorting of the rough sorted data is positively correlated with the similarity of the rough sorted data, that is, the later the sorting of the rough sorted data is, the greater the similarity of the rough sorted data is; then, selecting the last R rough sorted data as fine sorted data, where R is the third preset number, and M is the second preset number.
[0115] The similarity of the refined data refers to the similarity of the sentence text corresponding to the refined data with respect to the first text data.
[0116] The second intention sequence may include the target intention category corresponding to each refined ranking data and the similarity of each refined ranking data.
[0117] The similarity of the finely sorted data, the similarity of the coarsely sorted data and the similarity of the preset coded data can all be set according to actual conditions, and this embodiment does not specifically limit this.
[0118] For example, the similarity may be L2 norm similarity or p norm similarity, but is not limited thereto.
[0119] In one example, first, a number of preset initial texts and a target intent category corresponding to each preset initial text are obtained, and each initial text and the target intent category corresponding to each initial text are expressed as: , is the initial text, Refers to the target intent category corresponding to the initial text; each initial text is encoded using a pre-trained vector model to obtain the encoding data corresponding to each initial text, that is, the preset encoding data , each preset coding data and the target intention category corresponding to each preset coding data are stored as a recall knowledge base.
[0120] Then, for a given length Text data , the text data is input into the pre-trained vector model for encoding and vectorization, and the encoded data of the text data is obtained as the output of the vector model. The encoded data of the text data is represented as .
[0121] Afterwards, the L2 norm similarity between the encoding data of the text data and each preset encoding data in the recall knowledge base is calculated, wherein the L2 norm similarity between the encoding data of the text data and the preset encoding data can be expressed as , select the top 10 results with the highest similarity as the rough sorting data, and then get the rough sorting results. The rough sorting results include the preset similar sentences, target intent categories and similarities of each rough sorting data. The rough sorting results can be expressed as ,in Indicates the rough sorting result. Indicates Preset similar sentences of rough sorting data, Indicates The target intent category of the coarse-grained data, Indicates The similarity of the coarse-sequenced data, It represents the sorting number of the coarse-sorted data. The sorting number of the coarse-sorted data is negatively correlated with the similarity of the coarse-sorted data. That is, the smaller the sorting number of the coarse-sorted data, the higher the similarity of the coarse-sorted data.
[0122] Finally, the text data and the preset similar sentences of each rough ranking data are input into the pre-trained fine ranking model, and the L2 norm similarity of the text data relative to the preset similar sentences of each rough ranking data is obtained through the fine ranking model, and the top 5 results with the highest similarity are selected as the fine ranking data, thereby obtaining the fine ranking result, which is the second intention sequence. The second intention sequence includes the target intention category corresponding to each fine ranking data and the similarity of each fine ranking data. The second intention sequence is expressed as ,in represents the second intention sequence, Indicates The target intent category corresponding to the refined data is Indicates The similarity of the refined data, It represents the sorting number of the refined data. The sorting number of the refined data is negatively correlated with the similarity of the refined data. That is, the smaller the sorting number of the refined data, the higher the similarity of the refined data.
[0123] The above-mentioned refined sorting model can be set according to actual conditions, and this embodiment does not make any specific limitation to this.
[0124] For example, the above-mentioned refined ranking model may be a BGE-Reranker model, but is not limited thereto.
[0125] In another example, the generation process of the vector model and the refined arrangement model may include: First, a second data set is obtained. The second data set may include a number of preset search texts and a positive sample set corresponding to each preset search text. The length of the positive sample set corresponding to each search text is a preset fixed value. Then, the second data set is divided into a second training set and a second test set according to a second preset ratio. Each data in the second training set is represented as , Represents the search text, Represents the positive sample set corresponding to the search text.
[0126] Then, the second training set is processed using the BAAI General Embedding (BGE) model to obtain a set of negative samples corresponding to each search text in the second training set. , the negative sample set corresponding to each search text is a preset multiple of the positive sample set corresponding to each search text. The third training set is constructed by each search text and the positive sample set and negative sample set corresponding to each search text. Each data in the third training set can be expressed as .
[0127] Afterwards, the BGE-Embedding model is fine-tuned using the third training set to obtain a fine-tuned BGE-Embedding model, and the BGE-Reranker model is fine-tuned using the third training set to obtain a fine-tuned BGE-Reranker model.
[0128] Finally, the fine-tuned BGE-Embedding model is tested by the second test set to obtain the performance parameters of the fine-tuned BGE-Embedding model. If the performance parameters of the fine-tuned BGE-Embedding model meet the preset training standards, the fine-tuned BGE-Embedding model is output as a vector model, otherwise the parameters of the training process are optimized, and the step of fine-tuning the BGE-Embedding model by the third training set is returned to obtain the fine-tuned BGE-Embedding model to achieve cyclic training; and the fine-tuned BGE-Reranker model is tested by the second test set to obtain the performance parameters of the fine-tuned BGE-Reranker model. If the performance parameters of the fine-tuned BGE-Reranker model meet the preset training standards, the fine-tuned BGE-Reranker model is output as a refined ranking model, otherwise the parameters of the training process are optimized, and the step of fine-tuning the BGE-Reranker model by the third training set is returned to obtain the fine-tuned BGE-Reranker model to achieve cyclic training.
[0129] The number of search texts included in the second data set may be more than 50,000, but is not limited thereto.
[0130] The second preset ratio may be 9:1, that is, the second data set is divided into a second training set and a second test set according to a ratio of 9:1, but is not limited thereto.
[0131] The above preset multiple may be 3 times, but is not limited thereto.
[0132] The performance parameters of the fine-tuned BGE-Embedding model and the performance parameters of the fine-tuned BGE-Reranker model may be average accuracy or recall rate, etc., but are not limited thereto.
[0133] The above training standard may be an accuracy threshold or a recall threshold, but is not limited thereto.
[0134] In some embodiments, reference Figure 5 , the obtaining of the first call intention according to the first intention sequence and the second intention sequence may include: If the target intention label with the highest predicted probability in the first intention sequence and the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence are the same, the target intention label with the highest predicted probability in the first intention sequence or the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence is selected as the first call intention.
[0135] In this embodiment, after obtaining the first intention sequence and the second intention sequence, it is determined whether the target intention label with the highest predicted probability in the first intention sequence is the same as the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence. If so, it means that the credibility of the results obtained by intention prediction and the credibility of the results obtained by search recommendation technology are high. At this time, any one of the target intention labels with the highest predicted probability in the first intention sequence or the target intention categories corresponding to the refined ranking data with the highest similarity in the second intention sequence is selected as the first call intention, thereby achieving rapid identification of the user's true call intention and improving the efficiency of intention recognition.
[0136] In some embodiments, reference Figure 5 , the step of obtaining the first call intention according to the first intention sequence and the second intention sequence may further include: If the target intent label with the highest prediction probability in the first intent sequence and the target intent category corresponding to the refined sorted data with the highest similarity in the second intent sequence are different, the first intent sequence and the second intent sequence are preprocessed to obtain a third intent sequence; The third intention sequence is processed by a pre-trained second prediction model to obtain intention decision information; the intention decision information includes first preset information, second preset information and third preset information, the first preset information is used to characterize the first call intention determined by the first intention sequence, the second preset information is used to characterize the first call intention determined by the second intention sequence, and the third preset information is used to characterize the first call intention determined by the pre-trained large model; Determine the first call intention based on the intention decision information.
[0137] In this embodiment, after obtaining the first intention sequence and the second intention sequence, it is determined whether the target intention label with the highest prediction probability in the first intention sequence is the same as the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence. If not, it means that the results obtained by intention prediction and the results obtained by search recommendation technology are both questionable. At this time, the first intention sequence and the second intention sequence need to be preprocessed and decision-made. Specifically, first, the first intention sequence and the second intention sequence are preprocessed to obtain a third intention sequence; then, the third intention sequence is decision-made through the pre-trained second prediction model to obtain intention decision information, wherein the intention decision information may include first preset information, second preset information and third preset information, the first preset information is used to characterize the first call intention determined by the first intention sequence, the second preset information is used to characterize the first call intention determined by the second intention sequence, and the third preset information is used to characterize the first call intention determined by the pre-trained large model; finally, the user's real call intention, that is, the first call intention, is determined through the intention decision information. In this way, the user's real call intention is determined by preprocessing and decision-making the first intention sequence and the second intention sequence, which can effectively improve the accuracy of intention recognition.
[0138] The above-mentioned preprocessing of the first intention sequence and the second intention sequence to obtain the third intention sequence may include performing type conversion processing on the first intention sequence and the second intention sequence, and then fusing the first intention sequence and the second intention sequence into the third intention sequence.
[0139] Alternatively, the above-mentioned preprocessing of the first intention sequence and the second intention sequence to obtain the third intention sequence may include performing type conversion processing on the first intention sequence and the second intention sequence, and then concatenating the first intention sequence and the second intention sequence to obtain the third intention sequence. The third intention sequence can be expressed as .
[0140] The above-mentioned type conversion processing of the first intention sequence and the second intention sequence may include converting the target intent category corresponding to each target intent label in the first intention sequence and each refined ranking data in the second intention sequence into an integer type, and normalizing the predicted probability of each target intent label in the first intention sequence and the similarity of each refined ranking data in the second intention sequence, but is not limited to this.
[0141] The above-mentioned second prediction model can be a machine learning model trained by multiple preset decision texts and the intention decision information corresponding to each preset decision text.
[0142] The second prediction model can be set according to actual conditions, and this embodiment does not impose any specific limitation on this.
[0143] For example, the second prediction model may be a decision tree model, but is not limited thereto.
[0144] The above-mentioned intention decision information may include first preset information, second preset information and third preset information. The first preset information is used to characterize the determination of the first call intention through the first intention sequence, the second preset information is used to characterize the determination of the first call intention through the second intention sequence, and the third preset information is used to characterize the determination of the first call intention through a pre-trained large model.
[0145] The above-mentioned large model can be set according to actual conditions, and this embodiment does not make any specific limitation to this.
[0146] For example, the above-mentioned large model may be a telechat-12B model, but is not limited thereto.
[0147] The above-mentioned determination of the first call intention based on the intention decision information may include, if the intention decision information is the first preset information, randomly selecting a target intention label from the first intention sequence as the first call intention; if the intention decision information is the second prediction information, randomly selecting a target intention category corresponding to the sorted data from the second intention sequence as the first call intention; if the intention decision information is the third preset information, inputting the first text data into a pre-trained large model, performing intent prediction through the pre-trained large model, and obtaining the first call intention, but is not limited to this.
[0148] In one example, the generation process of the second prediction model may include: First, the third data set is obtained. The third data set includes several preset decision texts and the decision labels corresponding to each decision text. The decision label is the intent category. The decision text and its corresponding decision label can be expressed as , Represents the decision text, Representing a decision label corresponding to a decision text, predicting each decision text in the third data set through a pre-trained first prediction model to obtain a TOP1 intent label of each decision text, where the TOP1 intent label of each decision text refers to a target intent label with the highest prediction probability; and performing rough sorting and fine sorting on each decision text in the third data set, where the specific implementation methods of the rough sorting and fine sorting are the same as those of the aforementioned implementation methods, thereby obtaining a TOP1 intent category of each decision text, where the TOP1 intent category of each decision text is a target intent category corresponding to refined sorted data with the highest similarity among multiple refined sorted data obtained after rough sorting and fine sorting.
[0149] Then, according to the TOP1 intention label and TOP1 intention category of each decision text, the intention decision information of each decision text is determined. For each decision text, Figure 6The following is an example diagram of the intent decision logic. The intent decision logic is as follows: If the TOP1 intent label is the same as the TOP1 intent category, it is considered that the decision text does not need to be processed by the decision tree model, and the decision text and its TOP1 intent label and TOP1 intent category are discarded; If the TOP1 intention label is the same as the decision label, it is considered that the decision text needs to be processed by the decision tree model, and the TOP1 intention label of the decision text is credible, and the intention decision information of the decision text is the first preset information; If the TOP1 intention category is the same as the decision label, it is considered that the decision text needs to be processed by the decision tree model, and the TOP1 intention category of the decision text is credible, and the intention decision information of the decision text is the second preset information; If the TOP1 intent label is different from the decision label and the TOP1 intent category is different from the decision label, it is considered that the decision text needs to be processed by the decision tree model, and the TOP1 intent label and TOP1 intent category of the decision text are unreliable, and the intent decision information of the decision text is the third preset information.
[0150] Finally, each decision text and the intended decision information of each decision text are integrated into a fourth data set, and the fourth data set is divided into a fourth training set and a third test set according to a third preset ratio. The decision tree model is trained by the fourth training set to obtain a trained decision tree model, and the trained decision tree model is tested by the third test set to obtain performance parameters of the trained decision tree model. If the performance parameters of the trained decision tree model meet the preset training standards, the trained decision tree model is output as the second prediction model, otherwise the parameters of the training process are optimized, and the step of training the decision tree model through the fourth training set is returned to realize cyclic training.
[0151] The number of decision texts included in the third data set may be more than six thousand, but is not limited thereto.
[0152] The third preset ratio may be 9:1, that is, the fourth data set is divided into the fourth training set and the third test set according to a ratio of 9:1, but is not limited thereto.
[0153] The performance parameter of the decision tree model after the training may be an average accuracy rate or a recall rate, etc., but is not limited thereto.
[0154] The above training standard may be an accuracy threshold or a recall threshold, but is not limited thereto.
[0155] In another example, the generation process of the large model may include: First, a fifth data set is obtained, where the fifth data set includes a preset task description, a plurality of preset large model training texts, a classification label corresponding to each preset large model training text, and an interpretation caliber corresponding to each classification label, wherein the classification label is the intent category; then, the fifth data set is divided into a fifth training set and a fourth test set according to a fourth preset ratio, the telechat-12b model is trained by the fifth training set to obtain the trained telechat-12b model, the trained telechat-12b model is tested by the fourth test set to obtain the performance parameters of the trained telechat-12b model; if the performance parameters of the trained telechat-12b model meet the preset training standards, the trained telechat-12b model is output as the large model, otherwise the parameters of the training process are adjusted, and the step of training the telechat-12b model by the fifth training set to obtain the trained telechat-12b model is returned to realize cyclic training.
[0156] The fourth preset ratio may be 9:1, that is, the fifth data set is divided into a fifth training set and a fourth test set according to a ratio of 9:1, but is not limited thereto.
[0157] The performance parameter of the telechat-12b model after the training may be an average accuracy rate or a recall rate, etc., but is not limited thereto.
[0158] The above training standard may be an accuracy threshold or a recall threshold, but is not limited thereto.
[0159] In some implementations, determining the first call intention according to the intention decision information may include: If the intention decision information is the first preset information, the target intention label with the highest prediction probability in the first intention sequence is determined as the first call intention; Alternatively, if the intention decision information is the second preset information, the target intention category corresponding to the sorted data with the highest similarity in the second intention sequence is determined as the first call intention; Alternatively, if the intention decision information is the third preset information, a pre-trained large model is used to perform intent recognition on the first text data, the first intention sequence and the second intention sequence to obtain the first call intention.
[0160] In this embodiment, the first call intention is determined based on the intention decision information output by the second prediction model. Specifically, when the intention decision information is the first preset information, it means that the credibility of the result obtained by intention prediction is higher, and the target intention label with the highest prediction probability in the first intention sequence is determined as the first call intention; when the intention decision information is the second preset information, it means that the credibility of the result obtained by the search recommendation technology is higher, and the target intention category corresponding to the highest similarity in the second intention sequence is determined as the first call intention; when the intention decision information is the third preset information, it means that the results obtained by intention prediction and the results obtained by search recommendation technology are both unreliable, and the first text data, the first intention sequence and the second intention sequence are identified through the pre-trained large model to cope with the identification of complex intentions in intention identification, thereby determining the first call intention. In this way, the accuracy of intention identification can be effectively improved while taking into account the reasoning delay of intention identification.
[0161] The above-mentioned use of a pre-trained big model to perform intent recognition on the first text data, the first intention sequence and the second intention sequence to obtain the first call intention may include obtaining an intention prompt word as input data of the pre-trained big model based on the first text data, the first intention sequence and the second intention sequence, and obtaining the first call intention by performing intent recognition through the pre-trained big model, but is not limited to this.
[0162] The obtaining of the intent prompt word according to the first text data, the first intent sequence, and the second intent sequence may include obtaining the intent prompt word according to the first text data, the first intent sequence, and the second intent sequence in combination with a machine learning method.
[0163] Alternatively, the above-mentioned obtaining of the intention prompt word according to the first text data, the first intention sequence and the second intention sequence may include firstly, constructing category interpretation data according to each target intention label, the interpretation caliber corresponding to each target intention label, the target intention category corresponding to each refined sorting data and the interpretation caliber corresponding to the target intention category corresponding to each refined sorting data, and simultaneously obtaining a preset task description, the task description being to select a category from each target intention label and the target intention category corresponding to each refined sorting data as the call intention output, and then constructing the intention prompt word according to the category interpretation data, the task description and the first text data. , Represents the task description, represents the first text data, Represents categorical explanatory data.
[0164] In some implementations, performing intent recognition on the second voice data to obtain at least one second call intention may include: Converting the second voice data to obtain second text data; If it is detected that there is no keyword belonging to any preset intent category in the second text data, the second text data is predicted to obtain a third intent sequence, and the second text data is roughly sorted and finely sorted to obtain a fourth intent sequence; According to the third intention sequence and the fourth intention sequence, a second call intention is obtained.
[0165] In this embodiment, the second voice data is converted to obtain the second text data, and it is detected whether there are keywords belonging to any preset intent category in the second text data; if so, it means that the intent recognition cannot be realized by keyword retrieval, and the intent recognition is realized by intent prediction, rough sorting and fine sorting. Specifically, first, the second text data is subjected to intent prediction to obtain the third intent sequence, so as to quickly capture the user intent in natural language; and the second text data is subjected to rough sorting and fine sorting to obtain the fourth intent sequence, both of which belong to search recommendation technology, and the search recommendation technology is used to realize the accurate capture of user intent in natural language; finally, the second call intent is determined by the third intent sequence and the fourth intent sequence, so that a more comprehensive and accurate user call intent, especially complex call intent, can be quickly captured, and the accuracy of intent recognition can be effectively improved.
[0166] The second text data mentioned above refers to the second text data obtained by converting the second voice data.
[0167] The third intention sequence is used to indicate a result obtained by performing intention prediction on the second text data.
[0168] The fourth intention sequence is used to indicate the results obtained by performing rough sorting and fine sorting on the second text data.
[0169] The intention prediction of the second text data and the rough sorting and fine sorting of the second text data may be performed in parallel, for example, the intention prediction of the second text data and the rough sorting and fine sorting of the second text data are performed simultaneously.
[0170] Alternatively, the above-mentioned intention prediction of the second text data and the above-mentioned rough sorting and fine sorting of the second text data can be executed serially, for example, the second text data is firstly predicted for intention, and then the second text data is roughly sorted and finely sorted; or, the second text data is firstly roughly sorted and finely sorted, and then the second text data is predicted for intention.
[0171] The above-mentioned implementation method of performing intention recognition on the second voice data is the same as the above-mentioned implementation method of performing intention recognition on the first voice data, and this embodiment will not be repeated here.
[0172] In some implementations, performing intent recognition on the second voice data to obtain the second call intention may further include: If it is detected that a keyword belonging to any preset intent category exists in the second text data, the second call intent is determined according to at least one keyword belonging to the corresponding preset intent category in the second text data.
[0173] In this embodiment, if it is detected that there are keywords belonging to any preset intention category in the second text data, it means that intention recognition can be directly realized through keyword retrieval. At this time, the second call intention is determined based on at least one keyword in the second text data that belongs to the corresponding preset intention category, thereby improving the efficiency of intent recognition.
[0174] The above-mentioned determination of the second call intention based on at least one keyword belonging to the corresponding preset intention category in the second text data may include determining all keywords belonging to the corresponding preset intention category in the second text data as candidate keywords, and obtaining the preset intention category to which the candidate keyword with the highest frequency of occurrence in the second text data belongs as the second call intention.
[0175] Alternatively, the above-mentioned determination of the second call intention based on at least one keyword belonging to the corresponding preset intention category in the second text data may include determining all keywords belonging to the corresponding preset intention category in the second text data as candidate keywords, and obtaining the preset intention category to which the candidate keyword with the earliest appearance time in the second text data belongs as the second call intention, but is not limited to this.
[0176] In some embodiments, reference Figure 7 , the above method may further include: When the target service is executed, if no intention confirmation instruction is detected, the process returns to the step of performing intent recognition on the first voice data and obtaining the first call intention as the target call intention until the incoming call of the user terminal ends.
[0177] In this implementation, after the target service is executed, if no intention confirmation instruction from the user terminal is detected, it means that all second call intentions are not the intentions that the user terminal wants to execute. At this time, the process returns to the step of performing intent recognition on the first voice data, and obtaining the first call intention as the target call intention, and the detection is repeated in a loop until the incoming call of the user terminal ends. This is conducive to improving user satisfaction with the telephone service.
[0178] In order to facilitate the understanding of the above-mentioned telephone service processing method of the present application, the actual application scenario of the above-mentioned telephone service processing method of the present application is used as an example. The execution subject of the above-mentioned telephone service processing method of this example is the call center. Figure 8 The specific process of the call center performing telephone service processing is shown in steps S201-S207.
[0179] S201, a user dials the telephone number of a call center through a user terminal, and an operator at the call center connects the user terminal.
[0180] S202, the operator conducts at least one round of dialogue with the user. For example, the operator asks "How can I help you?" and the user replies "The broadband cannot access the Internet." The operator obtains the user's voice data during this dialogue, i.e., first voice data, converts the first voice data into corresponding text data, performs intent recognition based on the text data, and obtains the first call intent as the target call intent.
[0181] S203, from a plurality of preset services, a preset service corresponding to the target call intention is selected as the target service, and at least one application programming interface of the target service is called. For example, if the target call intention is broadband fault repair, the preset service corresponding to broadband fault repair is determined as the target service, and the application programming interface of the target service is called to execute the target service.
[0182] S204, during the execution of the target service, one or more new call intentions may be generated. For example, during the broadband service application, the user may ask the operator "how much is the call balance", and the new call intention generated at this time is to check the call balance. In order to capture the new call intention, the user's voice data during the execution of the target service, that is, the second voice data, is obtained, the second voice data is converted into corresponding text data, and the intention recognition is performed based on the text data to obtain the second call intention.
[0183] S205, determining whether the target service has been executed; if not, returning to step S204; if so, proceeding to step S206.
[0184] S206, determine whether the intention confirmation instruction of the user terminal is detected; if not, enter step S207; if so, determine the second call intention corresponding to the intention confirmation instruction as the target call intention, and then return to step S203 to execute the new service.
[0185] S207, determine whether the call is ended; if so, end the entire process; if not, return to step S202.
[0186] It can be seen that the embodiments of the present application can timely capture various call intentions of users during the telephone service process, which can not only improve the response speed to various service needs of users and reduce the cost of call services, but also reduce the number of occurrences of ignoring the user's new call intentions, thereby improving the user experience of telephone services and meeting users' needs for telephone services.
[0187] Reference Fig. 9 In this example, the process of obtaining the corresponding call intention through intent recognition is shown in the following steps S301-S309.
[0188] S301, converting the voice data into text data, and detecting whether there are keywords belonging to any preset intent category in the text data; if so, proceeding to step S302; if not, proceeding to step S303.
[0189] S302, determine all keywords belonging to corresponding preset intent categories as candidate keywords, obtain the candidate keyword with the highest frequency of occurrence in the text data as the target keyword, and select the preset intent category to which the target keyword belongs as the first call intention.
[0190] S303, perform intention prediction and search recommendation processing at the same time.
[0191] As for the implementation method of intent prediction, the pre-trained Tiny-Bert model is used to perform intent prediction on text data to obtain several intent prediction labels and the prediction probability of each intent prediction label. Then, according to the prediction probability of each intent prediction label, several intent prediction labels are sorted, where the sorting of the intent prediction labels is negatively correlated with the prediction probability of the intent prediction labels. Then, the top 5 intent prediction labels are selected as target intent labels. Finally, the first intent sequence is constructed through each target intent label and the prediction probability of each target intent label.
[0192] When the target service is not executed, the text data used by the Tiny-Bert model may be text data corresponding to the voice data of three rounds of conversations, namely, one round of users, one round of operators and one round of users, but is not limited thereto.
[0193] During the execution of the target service, the text data used by the Tiny-Bert model may be text data corresponding to the voice data of a single round of conversation, that is, one round of users, but is not limited thereto.
[0194] As for the implementation method of search recommendation processing, the text data is encoded and vectorized through the pre-trained BGE-Embedding model to obtain text encoded data, the L2 norm similarity of the text encoded data relative to each preset encoded data is calculated, the top 10 results with the highest similarity are selected as coarse ranking data, the text data and the preset similar sentences of each coarse ranking data are input into the pre-trained BGE-Reranker model, the L2 norm similarity of the text data relative to the preset similar sentences of each coarse ranking data is calculated through the pre-trained BGE-Reranker model, the top 5 results with the highest similarity are selected as refined ranking data, and the second intent sequence is constructed through the target intent category corresponding to each refined ranking data and the similarity of each refined ranking data.
[0195] When the target service is not executed or during the execution of the target service, the text data used by the above-mentioned BGE-Reranker model can be text data corresponding to the voice data of a single round of conversation, that is, one round of users, but is not limited to this.
[0196] S304, determine whether the TOP1 target intent label in the first intent sequence is the same as the TOP1 target intent category in the second intent sequence. The TOP1 target intent label in the first intent sequence refers to the target intent label with the highest prediction probability in the first intent sequence, and the TOP1 target intent category in the second intent sequence refers to the target intent category corresponding to the highest similarity ranked data in the second intent sequence; if so, proceed to step S305; if not, proceed to step S306.
[0197] S305 , selecting the TOP1 target intention label in the first intention sequence or the TOP1 target intention category in the second intention sequence as the call intention.
[0198] S306, making a decision.
[0199] Specifically, first, the target intent category corresponding to each target intent label in the first intent sequence and each refined ranking data in the second intent sequence is converted into an integer type, and the predicted probability of each target intent label in the first intent sequence and the similarity of each refined ranking data in the second intent sequence are normalized.
[0200] Then, the first intention sequence and the second intention sequence are concatenated to obtain a third intention sequence.
[0201] Afterwards, the third intention sequence is processed by a pre-trained decision tree model to obtain intention decision information. The intention decision information may include first preset information, second preset information and third preset information, the first preset information is used to characterize the determination of the call intention through the first intention sequence, the second preset information is used to characterize the determination of the call intention through the second intention sequence, and the third preset information is used to characterize the determination of the call intention through the pre-trained large model.
[0202] S308, identify the intention decision information; if the intention decision information is the first preset information, determine the target intention label with the highest predicted probability in the first intention sequence as the call intention; if the intention decision information is the second preset information, determine the target intention category corresponding to the sorted data with the highest similarity in the second intention sequence as the call intention; if the intention decision information is the third preset information, enter step S309.
[0203] S309, performing large model intention recognition processing.
[0204] Specifically, first, according to each target intent label in the first intent sequence and the interpretation caliber corresponding to each target intent label and the target intent category corresponding to each refined data in the second intent sequence and the interpretation caliber corresponding to the target intent category corresponding to each refined data, category interpretation data is constructed, and a preset task description is obtained at the same time. The task description is to select a category from each target intent label and the target intent category corresponding to each refined data as the call intention output, and then according to the category interpretation data, the task description and the text data, the intention prompt words are constructed, and then the intention prompt words are used as the input data of the pre-trained telechat-12b model, and the intention recognition is performed through the pre-trained telechat-12b model to obtain the call intention.
[0205] When the target service is not executed, the text data used by the telechat-12b model may be text data corresponding to the voice data of three rounds of conversation, namely, one round of user, one round of operator and one round of user, but is not limited thereto.
[0206] During the execution of the target service, the text data used by the telechat-12b model may be text data corresponding to the voice data of a single round of conversation, that is, one round of users, but is not limited thereto.
[0207] It can be seen that the embodiment of the present application provides an intent recognition method based on a combination of large and small models of a decision tree. After intent recognition is performed through intention prediction and coarse and fine sorting processing, a decision tree model is used to decide which recognition result to use as the final communication intention. If neither is adopted, a large model is used for intent reasoning, thereby quickly and accurately capturing the user's real call intention, and coarse and fine intention recognition in intent recognition, thereby effectively improving the accuracy and efficiency of intent recognition.
[0208] In addition, refer to Fig.10 , the embodiment of the present application provides a telephone service processing device, including: The first processing module 401 is used to perform intent recognition on the first voice data when a user terminal calls in, and obtain a first call intention as a target call intention; wherein the first voice data is the voice data output by the user terminal when the user terminal calls in; The second processing module 402 is used to obtain a target service and execute the target service according to the target call intention; The third processing module 403 is used to perform intent recognition on the second voice data during the execution of the target service to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; The fourth processing module 404 is used to determine the second call intention corresponding to the intention confirmation instruction as the target call intention if an intention confirmation instruction of the user terminal is detected when the target service is executed, and return to the second processing module 402.
[0209] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0210] Finally, an embodiment of the present application provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned telephone service processing method.
[0211] The contents of the above method embodiments are all applicable to the present storage medium embodiments. The functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0212] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are expected, wherein the order of various operations is changed and the sub-operation described as a part of a larger operation is performed independently.
[0213] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0214] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0215] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable programs for implementing logical functions, and may be embodied in any computer-readable medium for use by a program execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch and execute a program from a program execution system, device or apparatus), or in conjunction with such program execution system, device or apparatus. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by a program execution system, device or apparatus, or in conjunction with such program execution system, device or apparatus.
[0216] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0217] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable program execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0218] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0219] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0220] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A telephone service processing method, characterized in that: The following steps are involved: In the case of an incoming call from a user terminal, performing intent recognition on the first voice data to obtain a first call intent as a target call intent; wherein the first voice data is voice data output by the user terminal in the case of an incoming call from the user terminal; According to the target call intention, a target service is obtained and the target service is executed; During the execution of the target service, performing intent recognition on the second voice data to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; When the target service is executed, if an intention confirmation instruction of the user terminal is detected, the second call intention corresponding to the intention confirmation instruction is determined as the new target call intention, and the process returns to the step of obtaining the target service and executing the target service according to the target call intention.
2. The telephone service processing method according to claim 1, characterized in that: The performing intention recognition on the first voice data to obtain the first call intention includes: Converting the first voice data to obtain first text data; If it is detected that there is no keyword belonging to any preset intent category in the first text data, the first text data is predicted to obtain a first intent sequence, and the first text data is roughly sorted and finely sorted to obtain a second intent sequence; The first call intention is obtained according to the first intention sequence and the second intention sequence.
3. The telephone service processing method according to claim 2, characterized in that: The performing intention prediction on the first text data to obtain a first intention sequence includes: Using a pre-trained first prediction model, the first text data is subjected to intent prediction to obtain a plurality of intent prediction labels and a prediction probability of each of the intent prediction labels; According to the prediction probability of each of the intention prediction labels, a first preset number of the intention prediction labels are selected from the plurality of the intention prediction labels as target intention labels; The first intention sequence is obtained according to each of the target intention labels and the predicted probability of each of the target intention labels.
4. The telephone service processing method according to claim 2, characterized in that: The performing rough sorting and fine sorting on the first text data to obtain a second intention sequence includes: Encoding and vectorizing the first text data to obtain text encoding data; According to the similarity of each preset coded data, a second preset number of the preset coded data is selected from a plurality of the preset coded data as the rough sorting data; wherein the similarity of the preset coded data is the similarity of the preset coded data with respect to the text coded data; According to the similarity of each of the rough sorted data, a third preset number of the rough sorted data is selected from the second preset number of the rough sorted data as the fine sorted data; wherein the similarity of the rough sorted data is the similarity of the sentence text corresponding to the rough sorted data with respect to the first text data, and the third preset number is less than the second preset number; The second intention sequence is obtained according to the target intention category corresponding to each refined sorted data and the similarity of each refined sorted data; the similarity of the refined sorted data is the similarity of the sentence text corresponding to the refined sorted data with respect to the first text data.
5. The telephone service processing method according to claim 2, characterized in that: The obtaining the first call intention according to the first intention sequence and the second intention sequence includes: If the target intention label with the highest predicted probability in the first intention sequence and the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence are the same, the target intention label with the highest predicted probability in the first intention sequence or the target intention category corresponding to the refined ranking data with the highest similarity in the second intention sequence is selected as the first call intention.
6. The telephone service processing method according to claim 2, characterized in that: The obtaining the first call intention according to the first intention sequence and the second intention sequence includes: If the target intent label with the highest prediction probability in the first intent sequence and the target intent category corresponding to the refined data with the highest similarity in the second intent sequence are different, preprocessing the first intent sequence and the second intent sequence to obtain a third intent sequence; The third intention sequence is subjected to decision processing by a pre-trained second prediction model to obtain intention decision information; the intention decision information includes first preset information, second preset information and third preset information, the first preset information is used to characterize the first call intention determined by the first intention sequence, the second preset information is used to characterize the first call intention determined by the second intention sequence, and the third preset information is used to characterize the first call intention determined by the pre-trained large model; The first call intention is determined according to the intention decision information.
7. The telephone service processing method according to claim 6, characterized in that: The determining the first call intention according to the intention decision information includes: If the intention decision information is the first preset information, determining the target intention label with the highest prediction probability in the first intention sequence as the first call intention; Alternatively, if the intention decision information is the second preset information, the target intention category corresponding to the sorted data with the highest similarity in the second intention sequence is determined as the first call intention; Alternatively, if the intention decision information is the third preset information, a pre-trained large model is used to perform intent recognition on the first text data, the first intention sequence and the second intention sequence to obtain the first call intention.
8. The telephone service processing method according to claim 2, characterized in that: The performing intention recognition on the first voice data to obtain the first call intention also includes: If it is detected that there are keywords belonging to any preset intent category in the first text data, the first call intention is determined according to at least one keyword in the first text data belonging to the corresponding preset intent category.
9. The telephone service processing method according to claim 1, characterized in that: The performing intent recognition on the second voice data to obtain at least one second call intention includes: Converting the second voice data to obtain second text data; If it is detected that there is no keyword belonging to any preset intent category in the second text data, performing intent prediction on the second text data to obtain a third intent sequence, and performing rough sorting and fine sorting on the second text data to obtain a fourth intent sequence; The second call intention is obtained according to the third intention sequence and the fourth intention sequence.
10. The telephone service processing method according to claim 9, characterized in that: The performing intention recognition on the second voice data to obtain at least one second call intention further includes: If it is detected that there are keywords belonging to any preset intent category in the second text data, the second call intention is determined according to at least one keyword in the second text data belonging to the corresponding preset intent category.
11. The telephone service processing method according to claim 1, characterized in that: The method further comprises the following steps: When the target service is executed, if the intention confirmation instruction is not detected, the process returns to the step of performing intent recognition on the first voice data and obtaining the first call intention as the target call intention until the incoming call of the user terminal ends.
12. A telephone service processing device, characterized in that: include: A first processing module is used to perform intent recognition on the first voice data when a user terminal calls in, and obtain a first call intention as a target call intention; wherein the first voice data is voice data output by the user terminal when the user terminal calls in; A second processing module, configured to obtain a target service and execute the target service according to the target call intention; a third processing module, configured to perform intent recognition on the second voice data during the execution of the target service to obtain at least one second call intention; wherein the second voice data is voice data output by the user terminal during the execution of the target service; The fourth processing module is used to determine the second call intention corresponding to the intention confirmation instruction as the new target call intention if an intention confirmation instruction of the user terminal is detected when the target service is executed, and return to the second processing module.
