WO2022142041A1 - 意图识别模型的训练方法、装置、计算机设备和存储介质 - Google Patents

意图识别模型的训练方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2022142041A1
WO2022142041A1 PCT/CN2021/091710 CN2021091710W WO2022142041A1 WO 2022142041 A1 WO2022142041 A1 WO 2022142041A1 CN 2021091710 W CN2021091710 W CN 2021091710W WO 2022142041 A1 WO2022142041 A1 WO 2022142041A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
sensitive
recognition model
intent
target
Prior art date
Application number
PCT/CN2021/091710
Other languages
English (en)
French (fr)
Inventor
左彬靖
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022142041A1 publication Critical patent/WO2022142041A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Definitions

  • the present application relates to the technical field of artificial intelligence, and in particular, to a training method, apparatus, computer equipment and storage medium for an intent recognition model.
  • the intelligent customer service system has been applied in various fields, including the financial field, the e-commerce field, the communication field and so on.
  • the customer may inadvertently reveal the content containing sensitive information.
  • How to determine whether the customer's voice during the conversation has sensitive content has become an urgent problem to be solved.
  • the method based on the neural network model has become the mainstream sensitive content detection method, that is, the pre-trained recognition model is used to identify the intention of the voice input by the customer in the dialogue, and then based on the intention to determine whether the voice is in the voice There is sensitive content.
  • the inventor realized that since most of the time the customer speaks speech with normal content, only a very small part is speech with sensitive content, which leads to a class imbalance in the positive and negative samples used to train the generated recognition model. Therefore, the generalization ability of the recognition model generated by training is poor, and the intention prediction effect of the generated model is poor.
  • the main purpose of this application is to provide a training method, device, computer equipment and storage medium for an intent recognition model, which aims to solve the problem of class imbalance in the existing positive and negative samples used for training the generated recognition model, thereby enabling training
  • the generalization ability of the generated recognition model is poor, and the intention prediction effect of the generated model is poor.
  • the present application proposes a training method for an intent recognition model, the method comprising the steps of:
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding the intent tag
  • text expansion processing is performed on the sensitive text according to preset rules to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is equal to the second quantity of the normal text.
  • the ratio between them is equal to the preset ratio, wherein the random mosaic processing refers to using a special symbol to replace each word in the text with a preset probability;
  • the training sample and the contextual text data corresponding to the training sample are used as the input of the preset initial intention recognition model, and the intention label corresponding to the training sample is used as the output of the initial intention recognition model.
  • the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the first intention recognition model is used as the target intention recognition model, so that the newly input customer dialogue text data can be used for intention recognition through the target intention recognition model.
  • the present application also provides a training device for an intent recognition model, including:
  • the first acquisition module is used to acquire sensitive text and normal text based on historical call recording data, wherein the sensitive text is text containing sensitive content, the normal text is text that does not contain sensitive content, and the sensitive text is the same as the text.
  • the normal text carries a corresponding intent tag;
  • the first processing module is used to perform text expansion processing on the sensitive text based on the random mosaic processing method according to preset rules, so as to obtain the expanded sensitive text, so that the first quantity of the expanded sensitive text is the same as that of all the sensitive texts.
  • the ratio between the second quantities of the normal text is equal to the preset ratio, wherein the random mosaic processing refers to performing replacement processing on each word in the text using a special symbol with a preset probability;
  • a second processing module configured to perform labeling processing on other texts except the sensitive text in the expanded sensitive text to obtain corresponding designated sensitive text, so that the other texts carry corresponding intent labels;
  • a second acquisition module configured to use the designated sensitive text and the normal text as training samples, and acquire contextual text data corresponding to the training samples;
  • the training module is configured to use the training sample and the contextual text data corresponding to the training sample as the input of the preset initial intent recognition model, and use the intent label corresponding to the training sample as the input of the initial intent recognition model. output, train the initial intent recognition model to obtain the trained first intent recognition model;
  • a third processing module configured to acquire preset test sample data, input the test sample data into the first intent recognition model, and receive the identification corresponding to the test sample data output by the first intent recognition model result;
  • a first judging module configured to verify the first intent recognition model based on the recognition result, and determine whether the verification is passed
  • a determination module configured to use the first intention recognition model as a target intention recognition model if the verification is passed, so as to perform intention recognition on the newly input customer dialogue text data through the target intention recognition model.
  • the present application also provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements a training method for an intent recognition model when the processor executes the computer program, wherein the intent recognition
  • the training method of the model includes the following steps:
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding the intent tag
  • text expansion processing is performed on the sensitive text according to preset rules to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is equal to the second quantity of the normal text.
  • the ratio between them is equal to the preset ratio, wherein the random mosaic processing refers to using a special symbol to replace each word in the text with a preset probability;
  • the training sample and the contextual text data corresponding to the training sample are used as the input of the preset initial intention recognition model, and the intention label corresponding to the training sample is used as the output of the initial intention recognition model.
  • the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the first intention recognition model is used as the target intention recognition model, so that the newly input customer dialogue text data can be used for intention recognition through the target intention recognition model.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements a method for training an intent recognition model, wherein the training method for the intent recognition model includes the following: step:
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding the intent tag
  • text expansion processing is performed on the sensitive text according to preset rules to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is equal to the second quantity of the normal text.
  • the ratio between them is equal to the preset ratio, wherein the random mosaic processing refers to using a special symbol to replace each word in the text with a preset probability;
  • the training sample and the contextual text data corresponding to the training sample are used as the input of the preset initial intention recognition model, and the intention label corresponding to the training sample is used as the output of the initial intention recognition model.
  • the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the first intention recognition model is used as the target intention recognition model, so that the newly input customer dialogue text data can be used for intention recognition through the target intention recognition model.
  • the training method, device, computer equipment and storage medium of the intent recognition model provided in this application are beneficial to increase the generalization ability of the model generated by training, and effectively improve the effect of intent prediction of the model generated by training. Therefore, the generated target intention recognition model can be used to accurately and quickly realize the intention recognition of the voice information input by the user, and then quickly determine whether the voice information input by the user contains sensitive information according to the intention recognition result.
  • FIG. 1 is a schematic flowchart of a training method of an intent recognition model according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for training an intent recognition model according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • a training method for an intent recognition model includes:
  • S1 Obtain sensitive text and normal text based on historical call recording data, where the sensitive text is text containing sensitive content, the normal text is text that does not contain sensitive content, and the sensitive text and the normal text carry There is a corresponding intent tag;
  • S2 Perform text expansion processing on the sensitive text according to preset rules based on random mosaic processing to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is the same as the first quantity of the normal text.
  • the ratio between the two quantities is equal to the preset ratio, wherein the random mosaic processing refers to performing replacement processing on each word in the text using a special symbol with a preset probability;
  • S5 Use the training sample and the contextual text data corresponding to the training sample as the input of a preset initial intent recognition model, and use the intent label corresponding to the training sample as the output of the initial intent recognition model.
  • the initial intent recognition model is trained to obtain a trained first intent recognition model;
  • S6 Acquire preset test sample data, input the test sample data into the first intent recognition model, and receive a recognition result corresponding to the test sample data output by the first intent recognition model;
  • S7 Verify the first intent recognition model based on the recognition result, and determine whether the verification is passed;
  • the execution subject of the method embodiment is a training device for an intent recognition model.
  • the training device for the above-mentioned intent recognition model can be implemented through a virtual device, such as software code, or through a physical device written or integrated with relevant execution codes, and can communicate with the user through a keyboard, mouse, remote control, Human-computer interaction is carried out by means of touchpads or voice-activated devices.
  • the training device for the intent recognition model in this embodiment can solve the problem of imbalanced training samples of the intent recognition model.
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding intent tag.
  • the sensitive text corresponds to the sensitive intention.
  • the sensitive text may be text including sensitive content such as cursing content, complaining content, and complaining content.
  • the above-mentioned historical call recording data refers to the stored call recording data between the customer and the customer service. By obtaining the above-mentioned historical call recording data, the historical call recording data can be converted and split into sensitive text containing sensitive content, and no Normal text with sensitive content.
  • the above-mentioned sensitive text is subjected to text expansion processing according to the preset rules to obtain the expanded sensitive text, so that the first quantity of the above-mentioned expanded sensitive text is between the above-mentioned second quantity of the normal text.
  • the ratio is equal to the preset ratio, and the above random mosaic processing refers to the replacement processing of each word in the text with a special symbol with a preset probability.
  • the above preset probability is not specifically limited, for example, it can be set to 15%, the above special symbol can be [MASK], and the above preset ratio is not specifically limited, preferably can be set to 0.1, by comparing the expanded sensitive text with the normal text The number ratio is set to 1:10, which can improve the generalization of model training.
  • the above-mentioned preset rules may include a variety of situations, for example, the above-mentioned sensitive text can be directly subjected to random mosaic processing to perform text expansion processing; or the sensitive text can be spliced with meaningless text first, and then the spliced text can be randomly processed.
  • the sensitive text can be concatenated with other sensitive texts of the same intent, and then the concatenated text can be randomly mosaicked for text augmentation, and so on.
  • other texts except the above-mentioned sensitive texts in the above-mentioned expanded sensitive texts are marked and processed to obtain corresponding designated sensitive texts, so that the above-mentioned other texts carry corresponding intention labels.
  • the intent labels of the above other texts are the same as the intent labels of sensitive texts corresponding to the other texts.
  • the designated sensitive text is obtained, the above designated sensitive text and the above normal text are used as training samples, and context text data corresponding to the above training samples are obtained.
  • the context text data corresponding to the above training samples can also be obtained based on the above historical call recording data, and the context text data can reflect the business scenarios of the dialogue flow corresponding to the above training samples.
  • the above contextual text data is a feature introduced to better identify the intent of the training samples. Since the topics of the contextual dialogue data are basically the same, the contextual text data can reflect the user's intent from the side, and play a good role in the intent recognition of the training samples. Supporting role.
  • the above-mentioned training samples and the contextual text data corresponding to the above-mentioned training samples are used as the input of the preset initial intention recognition model, and the intention labels corresponding to the above-mentioned training samples are used as the output of the above-mentioned initial intention recognition model.
  • Perform training to obtain a trained first intent recognition model Among them, CNN model, LSTM model, TRANSFORMER model, etc. can be used as the above-mentioned initial intent recognition model. Since the CNN model can detect information similar to keywords, and the training and inference speed is extremely fast, it is suitable for high concurrency scenarios, and the CNN model is preferably used as the above-mentioned initial intent recognition model.
  • the first intent recognition model After obtaining the first intent recognition model, obtain preset test sample data, input the test sample data into the first intent recognition model, and receive the recognition output corresponding to the test sample data from the first intent recognition model result.
  • the test sample data includes pre-collected data samples different from the training samples, and context data corresponding to the data samples.
  • the above-mentioned first intent recognition model is verified, and it is determined whether the verification is passed. If the verification is passed, the above-mentioned first intention recognition model is used as the target intention recognition model, so as to perform intention recognition on the newly input customer dialogue text data through the above-mentioned target intention recognition model.
  • this embodiment uses random mosaic to perform text expansion processing on sensitive text, which is equivalent to adding random noise to sensitive content data to increase the sensitivity of non-repetitive sensitive content. Text data can effectively alleviate the problem of unbalanced positive and negative sample categories.
  • the generated target intention recognition model can be used to accurately and quickly realize the intention recognition of the voice information input by the user, and then quickly determine whether the voice information input by the user contains sensitive information according to the intention recognition result.
  • step S2 includes:
  • S202 Process the sensitive text by adopting random mosaic processing, and generate a plurality of first sensitive texts equal to the fourth number based on the sensitive text;
  • S203 Perform expansion processing on the sensitive text by using the first sensitive text to obtain the expanded sensitive text.
  • the above-mentioned method based on random mosaic processing performs text expansion processing on the above-mentioned sensitive text according to preset rules to obtain the expanded sensitive text, so that the first quantity of the above-mentioned expanded sensitive text is equal to that of the above-mentioned sensitive text.
  • the step of making the ratio between the second quantities of the normal text equal to the preset ratio may specifically include: first acquiring the third quantity of the sensitive text. Then, the difference between the above-mentioned third quantity and the above-mentioned first quantity is calculated to obtain the fourth quantity.
  • the above-mentioned fourth quantity is the quantity of text to be generated for expanding the sensitive text.
  • the above-mentioned sensitive text is processed by means of random mosaic processing, and a plurality of first sensitive texts equal to the above-mentioned fourth quantity are generated based on the above-mentioned sensitive text.
  • the step of processing the above-mentioned sensitive text by means of random mosaic processing may include: randomly screening out a target word from each word included in the sensitive text, and then using special symbols to perform the processing on the target word in the sensitive text. Replace to obtain the replaced sensitive text, and then perform special symbol replacement processing on other words in the sensitive text except the above target word with the above preset probability.
  • the above special symbol can be [MASK], if any sensitive text is the sentence "I don't want to disclose", after random mosaic processing of this sentence, the processed sensitive text can be obtained as "I do not [[ MASK] revealed that "by using special symbols to replace words in the sensitive text to generate new text data different from the original sensitive text, so as to realize the increase of the text data of the sensitive content corresponding to the sensitive text that is not repeated.
  • the specific generation method for generating the same number of first sensitive texts as the above-mentioned fourth number based on the above-mentioned sensitive texts is not limited.
  • a certain number of target sensitive texts can be selected from the above-mentioned sensitive texts, and then the sensitive The text is subjected to random mosaic processing until a plurality of first sensitive texts equal to the above-mentioned fourth number are generated.
  • the above-mentioned certain number can be set according to actual requirements, and of course other implementation manners can also be used, which will not be described here.
  • the above-mentioned sensitive text is expanded by using the above-mentioned first sensitive text to obtain the above-mentioned expanded sensitive text.
  • the expanded sensitive text includes the first sensitive text and the sensitive text. During the call, the number of voices of customers expressing normal content is far greater than the number of voices containing sensitive content.
  • this embodiment uses random mosaic to perform text expansion processing on the above sensitive text. , which is equivalent to adding random noise to sensitive content data to increase the text data of non-repeated sensitive content, which can effectively alleviate the problem of unbalanced positive and negative sample categories, increase the generalization ability of the model generated by training, and help improve subsequent training. The effect of the intent prediction of the generated model.
  • step S2 includes:
  • S211 Use the preset text to perform splicing processing on the sensitive text to obtain the spliced second sensitive text;
  • S212 Process the second sensitive text by using random mosaic processing, and generate a plurality of third sensitive texts that are the same as the fourth number based on the second sensitive text;
  • S213 Perform expansion processing on the sensitive text by using the third sensitive text to obtain the expanded sensitive text.
  • the above-mentioned method based on random mosaic processing performs text expansion processing on the above-mentioned sensitive text according to preset rules to obtain the expanded sensitive text, so that the first quantity of the above-mentioned expanded sensitive text is equal to that of the above-mentioned sensitive text.
  • the step that the ratio between the second quantities of the normal texts is equal to the preset ratio may specifically include: first obtaining preset texts, wherein the preset texts are meaningless texts, and the meaningless texts may specifically be meaningless texts 's tone of voice. Then, the above-mentioned sensitive text is spliced by using the above-mentioned preset text to obtain the spliced second sensitive text.
  • the generated second sensitive text after splicing is still the sensitive intent corresponding to the sensitive text, that is, the second sensitive text Still sensitive text with sensitive content. For example, if any sensitive text is the sentence "I don't want to reveal", and the default text is "What?", then the spliced text after splicing the two is "What, I don't want to reveal”. Then, the above-mentioned second sensitive text is processed by means of random mosaic processing, and a plurality of third sensitive texts equal to the above-mentioned fourth quantity are generated based on the above-mentioned second sensitive text.
  • the processed spliced text can be obtained as "what, I don't want to reveal [MASK]".
  • the specific generation method for generating the same number of third sensitive texts as the above fourth sensitive texts based on the above second sensitive texts is not limited.
  • a certain number of target second sensitive texts can be selected from the abovementioned second sensitive texts, Then, random mosaic processing is performed on the target second sensitive text, until a plurality of third sensitive texts equal to the above fourth number are generated.
  • the above-mentioned certain number can be set according to actual requirements, and of course other implementation manners can also be used, which will not be described here.
  • the above-mentioned sensitive text is expanded by using the above-mentioned third sensitive text to obtain the above-mentioned expanded sensitive text.
  • random mosaic to perform text expansion processing on the above-mentioned sensitive text, it is equivalent to adding random noise to the sensitive content data to increase the text data of the sensitive content that is not repeated, which can effectively alleviate the imbalance of positive and negative sample categories.
  • increasing the generalization ability of the model generated by training is conducive to improving the effect of intention prediction of the model generated by subsequent training.
  • step S2 includes:
  • S220 Obtain preset sensitive text, wherein the preset sensitive text is any text in all the sensitive texts;
  • S221 Filter out similar sensitive texts with the same intent label as the preset sensitive texts from all the sensitive texts;
  • S223 Process the fourth sensitive text by using random mosaic processing, and generate a plurality of fifth sensitive texts that are the same as the fourth number based on the fourth sensitive text;
  • S224 Perform expansion processing on the sensitive text by using the fifth sensitive text to obtain the expanded sensitive text.
  • the above-mentioned method based on random mosaic processing performs text expansion processing on the above-mentioned sensitive text according to preset rules to obtain the expanded sensitive text, so that the first quantity of the above-mentioned expanded sensitive text is equal to that of the above-mentioned sensitive text.
  • the step that the ratio between the second quantities of the normal texts is equal to the preset ratio may specifically include: first acquiring preset sensitive texts, wherein the preset sensitive texts are any text among all the sensitive texts. Then, similar sensitive texts with the same intent label as the above preset sensitive texts are selected from all the above sensitive texts, and the above predetermined sensitive texts are spliced by using the above similar sensitive texts to obtain the spliced fourth sensitive text.
  • the category is still the same.
  • the above-mentioned preset sensitive text is spliced by using the above-mentioned same type of sensitive text, and the obtained fourth sensitive text after splicing still corresponds to the sensitive intention of the preset sensitive text.
  • the default sensitive text is the sentence "I don't want to disclose”
  • the intent label of the default sensitive text is complaining intent
  • the same type of sensitive text with the same intent label as the default sensitive text is "Hello. Annoying”
  • the spliced text after splicing the two is "You are so annoying, I don't want to reveal it”.
  • the fourth sensitive text is processed by random mosaic processing, and based on the fourth sensitive text, a plurality of fifth sensitive texts that are the same as the fourth number are generated.
  • the processed spliced text can be obtained as "I'm so annoying, I [MASK][MASK] reveal”.
  • the specific generation method for generating the same number of fifth sensitive texts as the fourth sensitive text based on the fourth sensitive text is not limited. For example, a certain number of target fourth sensitive texts can be selected from the fourth sensitive texts.
  • random mosaic processing is performed on the target fourth sensitive text, until a plurality of fifth sensitive texts equal to the above fourth number are generated.
  • the above-mentioned certain number can be set according to actual requirements, and of course other implementation manners can also be used, which will not be described here.
  • the above-mentioned sensitive text is expanded by using the above-mentioned fifth sensitive text to obtain the above-mentioned expanded sensitive text.
  • random mosaic to perform text expansion processing on the above-mentioned sensitive text it is equivalent to adding random noise to the sensitive content data to increase the text data of the sensitive content that is not repeated, which can effectively alleviate the imbalance of positive and negative sample categories.
  • increasing the generalization ability of the model generated by training is conducive to improving the effect of intention prediction of the model generated by subsequent training.
  • step S5 includes:
  • S500 Input the training sample into an embedding layer in the initial intent recognition model, encode the training sample through the embedding layer, and convert the training sample into a corresponding first feature vector;
  • S501 Use the first feature vector as an input to a convolutional neural network layer in the initial intent recognition model, and perform convolution processing on the first feature vector through the convolutional neural network layer to generate a corresponding first feature vector.
  • S502 Use the second feature vector as an input of a maximum pooling layer in the initial intent recognition model, and perform pooling processing on the second feature vector through the maximum pooling layer to generate a corresponding third feature vector;
  • S503 Input the context text data corresponding to the training samples into an embedding layer in the initial intent recognition model, encode the context text data through the embedding layer, and convert the context text data into is the corresponding fourth eigenvector;
  • S505 Input the fifth feature vector into the fully connected layer in the initial intent recognition model, and calculate the probability that the target intent of the training sample belongs to the intent label corresponding to the training sample through a preset softmax function value;
  • the above-mentioned training samples and the context text data corresponding to the above-mentioned training samples are used as the input of the preset initial intention recognition model, and the intention labels corresponding to the above-mentioned training samples are used as the above-mentioned initial intention recognition model.
  • the steps of training the above-mentioned initial intent recognition model to obtain the trained first intent recognition model may specifically include: firstly inputting the above-mentioned training samples into the embedding layer in the above-mentioned initial intention recognition model, and using the above-mentioned embedding layer to The above-mentioned training samples are encoded, and the above-mentioned training samples are converted into corresponding first feature vectors.
  • the above-mentioned training samples are encoded by the embedding layer, and the above-mentioned training samples can be converted into corresponding dense word vectors, that is, the above-mentioned first feature vector.
  • each of the training samples can be converted into Words are randomly initialized as vectors with mean 0 and variance 1.
  • the first feature vector is used as the input of the convolutional neural network layer in the initial intention recognition model, and the first feature vector is convolved through the convolutional neural network layer to generate a corresponding second feature vector.
  • the first feature vector A is obtained, it is sent to the convolutional neural network layer (CNN), and the features of the training samples are continued to be extracted.
  • CNN convolutional neural network layer
  • the convolution kernel used in the convolutional neural network layer has a width of d and a height of d.
  • the second feature vector is used as the input of the maximum pooling layer in the initial intent recognition model, and the second feature vector is pooled through the maximum pooling layer to generate a corresponding third feature vector.
  • the above-mentioned context text data corresponding to the above-mentioned training samples are input into the embedding layer in the above-mentioned initial intention recognition model, the above-mentioned context text data is encoded through the above-mentioned embedding layer, and the above-mentioned context text data is converted into a corresponding fourth feature vector .
  • the embedding layer is also used for encoding processing, the dimension can be 5 dimensions, and the corresponding fourth feature vector p 2 is generated.
  • the above context text data is a feature introduced to better identify the intent of the training samples. Since the topics of the contextual dialogue data are basically the same, the context text data can reflect the user's intent from the side, and play an important role in the intent recognition of the training samples. good auxiliary effect. Subsequently, the third feature vector and the fourth feature vector are spliced to generate a corresponding fifth vector.
  • the above-mentioned fifth feature vector is input into the fully connected layer in the above-mentioned initial intent recognition model, and the target intent of the above-mentioned training sample is calculated by the preset softmax function, which belongs to the intent corresponding to the above-mentioned training sample. The probability value of the label.
  • the above loss function is: is the probability value that the target intent of the training sample belongs to the intent label corresponding to the above training sample, and y is the intent label corresponding to the training sample.
  • the process of judging the convergence of the loss function includes: substituting the probability value generated in the fully connected layer into the loss function, and then judging whether the loss function reaches a preset loss value, and if it reaches the preset loss value, judging that the loss function has converged , if the preset loss value is not reached, it is determined that the loss function has not converged. If the above loss function converges, it is determined that the training process is completed, and the trained first intent recognition model is obtained.
  • the weights and biases of the above-mentioned initial intent recognition model are further adjusted according to the above-mentioned loss function using a back-propagation algorithm, and the above-mentioned training steps are continued until the loss function converges, thereby completing the training process.
  • the above-mentioned back-propagation algorithm may refer to the existing algorithm.
  • This implementation obtains the trained first intent recognition model through training, which is conducive to further determining a target intent recognition model that meets the needs based on the first intent recognition model, so that the target intent recognition model can be used to quickly and accurately realize the user Intent recognition of input speech information.
  • step S8 after the above step S8, it includes:
  • S800 Acquire the voice information input by the user during the call
  • S802 Preprocess the text information to obtain processed target text information
  • S803 Obtain context voice information corresponding to the voice information, and convert the context voice information into corresponding target context text information;
  • S804 Input the target text information and the target context text information into the target intent recognition model, perform intent recognition on the target text information based on the target intent recognition model, and obtain a target corresponding to the voice information Intent recognition results;
  • the intent recognition process may be performed on the voice information input by the user during the current call based on the target intent recognition model. Specifically, firstly, the voice information input by the user during the call is acquired, and the above-mentioned voice information is converted into corresponding text information. Among them, ASR technology can be used to convert voice information into text information. Then, the above text information is preprocessed to obtain the processed target text information. Wherein, the process of the above preprocessing may include processing such as removing punctuation marks, removing special characters, segmenting words, removing stop words, and the like.
  • the contextual voice information corresponding to the above-mentioned voice information is acquired, and the above-mentioned contextual voice information is converted into corresponding target contextual text information.
  • the above-mentioned context voice information only includes the historical input information of the voice information currently input by the user, that is, the above-mentioned voice information, and for the conversion process of the contextual voice information, reference can be made to the above-mentioned voice information.
  • the above-mentioned target context text information can reflect the business scenario of the current call process, and can reflect the user's intention on the side, which plays a good auxiliary role in the intention recognition of the voice information.
  • the target text information and the target context text information are input into the target intent recognition model, the target text information is subjected to intent recognition based on the target intent recognition model, and the target intent recognition result corresponding to the voice information is obtained. And judge whether the above target intent recognition result belongs to the preset sensitive intent.
  • the above-mentioned preset sensitive intentions are not specifically limited, for example, they may include complaining intentions, complaining intentions, cursing intentions, and the like. If the above-mentioned target intention recognition result belongs to the above-mentioned sensitive intention, a reminder message corresponding to the above-mentioned target intention recognition result is generated.
  • the above-mentioned reminder information includes at least the voice information and the above-mentioned sensitive intention.
  • the target intent recognition model generated by training can accurately generate the voice information corresponding to the voice information input by the user based on the input target text information and the above-mentioned target context text information.
  • the target intention can be realized in different dialogue processes, even if the customer speaks the same words, it can judge different intentions, effectively improving the accuracy and efficiency of intention recognition.
  • the voice information input by the user contains a sensitive intention
  • reminder information corresponding to the above target intention recognition result will be generated, so that the subsequent customer service can take corresponding countermeasures to the user based on the reminder information to ensure business communication. went well.
  • step S804 includes:
  • S8040 Acquire a preset number of specified target intent recognition models, wherein the preset number of the specified target intent recognition models are all generated by training using the training samples, and the preset number is greater than 1;
  • S8041 Input the target text information and the target context text information into each of the designated target intent recognition models respectively, so as to output the first target text information corresponding to the target text information through each of the designated target intent recognition models. Intent recognition results;
  • S8042 Receive the first intent recognition results respectively returned by each of the target intent recognition models
  • S8043 Perform analysis processing on all the first intent recognition results, and filter out the second intent recognition result that appears most frequently among all the first intent recognition results;
  • the above-mentioned target text information and the above-mentioned target context text information are input into the above-mentioned target intention recognition model, and the above-mentioned target text information is subjected to intention recognition based on the above-mentioned target intention recognition model, and the corresponding voice information is obtained.
  • the step of identifying the result of the target intent of the device may specifically include: first obtaining a preset number of designated target intent recognition models, wherein the preset number of the above-mentioned designated target intent recognition models are all generated by training the above-mentioned training samples, and the above-mentioned preset The number is greater than 1, for example, it can be set to 3, 4, 5, etc.
  • the intent recognition results generated by different target intent recognition models after identifying the target text information may not be exactly the same.
  • the accuracy of the identified intent information is low, and the above preset number of intent recognition models are used to separately perform intent recognition on the target text information.
  • the accuracy of the obtained intent recognition result corresponding to the target text information can be improved, and it is avoided that only one intent recognition model is used to perform the intent recognition on the target text information, resulting in an excessive recognition error.
  • the target text information and the target context text information are respectively input into each of the specified target intent recognition models, so as to output first intent recognition results corresponding to the target text information through each of the specified target intent recognition models.
  • the above-mentioned first intention recognition results respectively returned by each of the above-mentioned target intention recognition models are received.
  • all the first intent recognition results are analyzed and processed, and the second intent recognition result that appears most frequently among all the first intent recognition results is screened out, and the second intent recognition result is used as the target intent recognition result.
  • intention recognition is performed on the above target text information by using a preset number of designated target intention recognition models respectively, and then the intention recognition results returned by each designated target intention recognition model are collected respectively, and the intention recognition result with the most occurrences is used as the user
  • the final intent recognition result can avoid that only one intent recognition model is used to identify the target text information and cause the recognition error to be too large, and the accuracy of the intent recognition for the target text information can be effectively improved.
  • the above-mentioned preset number is preferably an odd number, and by setting the above-mentioned preset number to an odd number, it can be avoided that when an even number, such as 4, is used, the intention recognition results predicted for every two are the same, and the same as the remaining two.
  • the training method of the intent recognition model in the embodiment of the present application can also be applied to the blockchain field, for example, the above-mentioned target intent recognition model and other data are stored on the blockchain.
  • the blockchain By using the blockchain to store and manage the above target intent recognition model, the security and immutability of the above target intent recognition model can be effectively guaranteed.
  • an embodiment of the present application also provides a training device for an intent recognition model, including:
  • the first acquisition module 1 is configured to acquire sensitive text and normal text based on historical call recording data, wherein the sensitive text is text containing sensitive content, the normal text is text that does not contain sensitive content, and the sensitive text is carrying a corresponding intent tag with the normal text;
  • the first processing module 2 is used to perform text expansion processing on the sensitive text based on the random mosaic processing method according to preset rules, so as to obtain the expanded sensitive text, so that the first quantity of the expanded sensitive text is the same as that of the expanded sensitive text.
  • the ratio between the second quantities of the normal text is equal to a preset ratio, wherein the random mosaic processing refers to performing replacement processing on each word in the text using a special symbol with a preset probability;
  • the second processing module 3 is used to perform labeling processing on other texts except the sensitive text in the expanded sensitive text, to obtain the corresponding designated sensitive text, so that the other texts carry corresponding intent labels;
  • the second acquisition module 4 is used to use the designated sensitive text and the normal text as training samples, and acquire contextual text data corresponding to the training samples;
  • the training module 5 is used for taking the training sample and the contextual text data corresponding to the training sample as the input of the preset initial intention recognition model, and using the intention label corresponding to the training sample as the initial intention recognition model
  • the output of the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the third processing module 6 is configured to acquire preset test sample data, input the test sample data into the first intent recognition model, and receive the output of the first intent recognition model corresponding to the test sample data identification results;
  • a first judgment module 7 configured to verify the first intent recognition model based on the recognition result, and determine whether the verification is passed;
  • the determining module 8 is configured to use the first intention recognition model as a target intention recognition model if the verification is passed, so as to perform intention recognition on the newly input customer dialogue text data through the target intention recognition model.
  • the first acquisition module, the first processing module, the second processing module, the second acquisition module, the training module, the third processing module, the first judgment module and the determination module in the above-mentioned training device for the intention recognition model For details of the implementation process of the functions and roles, please refer to the implementation process corresponding to steps S1 to S8 in the above-mentioned training method of the intent recognition model, which will not be repeated here.
  • the above-mentioned first processing module includes:
  • a first obtaining unit configured to obtain the third quantity of the sensitive text
  • a first calculating unit configured to calculate the difference between the third quantity and the first quantity to obtain a fourth quantity
  • a first processing unit configured to process the sensitive text by means of random mosaic processing, and generate a plurality of first sensitive texts equal to the fourth number based on the sensitive text;
  • a first expansion unit configured to perform expansion processing on the sensitive text by using the first sensitive text to obtain the expanded sensitive text.
  • the above-mentioned first processing module includes:
  • a second acquiring unit configured to acquire preset text, wherein the preset text is meaningless text
  • a first splicing unit configured to perform splicing processing on the sensitive text by using the preset text to obtain the spliced second sensitive text
  • a second processing unit configured to process the second sensitive text by means of random mosaic processing, and generate a plurality of third sensitive texts that are the same as the fourth number based on the second sensitive text;
  • the second expansion unit is configured to perform expansion processing on the sensitive text by using the third sensitive text to obtain the expanded sensitive text.
  • the implementation process of the functions and functions of the second acquisition unit, the first splicing unit, the second processing unit and the second expansion unit in the above-mentioned training device for the intent recognition model can be found in the above-mentioned training method for the intent recognition model for details.
  • the implementation process corresponding to steps S210 to S213 in the above will not be repeated here.
  • the above-mentioned first processing module includes:
  • a third obtaining unit configured to obtain a preset sensitive text, wherein the preset sensitive text is any one of all the sensitive texts;
  • a first screening unit configured to screen out the same type of sensitive text that has the same intent label as the preset sensitive text from all the sensitive texts;
  • a second splicing unit configured to perform splicing processing on the preset sensitive text using the same type of sensitive text to obtain the spliced fourth sensitive text
  • a third processing unit configured to process the fourth sensitive text by means of random mosaic processing, and generate a plurality of fifth sensitive texts equal to the fourth number based on the fourth sensitive text;
  • a third expansion unit configured to perform expansion processing on the sensitive text by using the fifth sensitive text to obtain the expanded sensitive text.
  • the implementation process of the functions and functions of the third acquisition unit, the first screening unit, the second splicing unit, the third processing unit and the third expansion unit in the training device for the above-mentioned intent recognition model can be found in the above-mentioned intent recognition for details.
  • the implementation process corresponding to steps S220 to S224 in the model training method will not be repeated here.
  • the above-mentioned training module includes:
  • a first conversion unit configured to input the training samples into an embedding layer in the initial intent recognition model, encode the training samples through the embedding layer, and convert the training samples into corresponding first Feature vector;
  • a first generating unit configured to use the first feature vector as the input of the convolutional neural network layer in the initial intent recognition model, and perform convolution processing on the first feature vector through the convolutional neural network layer Then generate the corresponding second feature vector;
  • the second generating unit is configured to use the second feature vector as the input of the maximum pooling layer in the initial intent recognition model, and generate the second feature vector after the pooling process is performed on the second feature vector by the maximum pooling layer. the corresponding third eigenvector;
  • the second conversion unit is configured to input the context text data corresponding to the training samples into the embedding layer in the initial intent recognition model, and encode the context text data through the embedding layer, and convert the Convert the context text data into the corresponding fourth feature vector;
  • a third generating unit configured to perform splicing processing on the third feature vector and the fourth feature vector to generate a corresponding fifth vector
  • the second computing unit is configured to input the fifth feature vector into the fully connected layer in the initial intent recognition model, and calculate through a preset softmax function that the target intent of the training sample belongs to the corresponding training sample The probability value of the intent label;
  • a judgment unit configured to judge whether the preset loss function converges based on the probability value
  • the determining unit is configured to determine that the training process is completed if the loss function converges, and obtain the trained first intent recognition model.
  • the first conversion unit, the first generation unit, the second generation unit, the second conversion unit, the third generation unit, the second calculation unit, the judgment unit and the judgment unit in the above-mentioned training device for the intention recognition model For details of the implementation process of the functions and roles, please refer to the implementation process corresponding to steps S500 to S507 in the above-mentioned training method of the intent recognition model, which will not be repeated here.
  • the above-mentioned training device for the intent recognition model includes:
  • the third acquisition module is used to acquire the voice information input by the user during the call;
  • a first conversion module for converting the voice information into corresponding text information
  • a fourth processing module configured to preprocess the text information to obtain processed target text information
  • a second conversion module configured to acquire contextual voice information corresponding to the voice information, and convert the contextual voice information into corresponding target contextual text information
  • a recognition module configured to input the target text information and the target context text information into the target intent recognition model, perform intent recognition on the target text information based on the target intent recognition model, and obtain and identify the voice information The corresponding target intent recognition result;
  • a second judgment module configured to judge whether the target intention recognition result belongs to a preset sensitive intention
  • a generating module configured to generate reminder information corresponding to the target intent recognition result if the target intent recognition result belongs to the sensitive intent.
  • the realization of the functions and functions of the third acquisition module, the first conversion module, the fourth processing module, the second conversion module, the recognition module, the second judgment module and the generation module in the above-mentioned training device for the intention recognition model For details of the process, please refer to the implementation process corresponding to steps S800 to S806 in the above-mentioned training method of the intent recognition model, which will not be repeated here.
  • the above-mentioned identification module includes:
  • a fourth obtaining unit configured to obtain a preset number of specified target intent recognition models, wherein the preset number of the specified target intent recognition models are all generated by using the training samples, and the preset number is greater than 1;
  • An output unit configured to respectively input the target text information and the target context text information into each of the designated target intent recognition models, so as to output the corresponding target text information through each of the designated target intent recognition models respectively The first intent recognition result of ;
  • a receiving unit configured to receive the first intent recognition results returned by each of the target intent recognition models
  • a second screening unit configured to analyze and process all the first intention recognition results, and filter out the second intention recognition result that appears most frequently among all the first intention recognition results
  • a determination unit configured to use the second intention recognition result as the target intention recognition result.
  • the implementation process of the functions and functions of the fourth acquisition unit, the output unit, the receiving unit, the second screening unit, and the determination unit in the above-mentioned training device for the intent recognition model is detailed in the above-mentioned training method for the intent recognition model.
  • the implementation process corresponding to steps S8040 to S8044 will not be repeated here.
  • an embodiment of the present application further provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3 .
  • the computer equipment includes a processor, memory, a network interface, a display screen, an input device and a database connected by a system bus.
  • the processor of the computer equipment is designed to provide computing and control capabilities.
  • the memory of the computer device includes a storage medium and an internal memory.
  • the storage medium stores an operating system, a computer program and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the storage medium.
  • the computer device's database is used to store training samples and target intent recognition models.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the display screen of the computer equipment is an indispensable graphic and text output device in the computer, which is used to convert digital signals into optical signals, so that text and graphics can be displayed on the screen of the display screen.
  • the input device of the computer equipment is the main device for information exchange between the computer and the user or other devices, and is used to transmit data, instructions and certain flag information to the computer.
  • the computer program when executed by a processor, implements a method of training an intent recognition model.
  • the above-mentioned processor performs the steps of the above-mentioned training method of the intent recognition model:
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding the intent tag
  • text expansion processing is performed on the sensitive text according to preset rules to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is equal to the second quantity of the normal text.
  • the ratio between them is equal to the preset ratio, wherein the random mosaic processing refers to using a special symbol to replace each word in the text with a preset probability;
  • the training sample and the contextual text data corresponding to the training sample are used as the input of the preset initial intention recognition model, and the intention label corresponding to the training sample is used as the output of the initial intention recognition model.
  • the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the first intention recognition model is used as the target intention recognition model, so that the newly input customer dialogue text data can be used for intention recognition through the target intention recognition model.
  • FIG. 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the apparatus or computer equipment to which the solution of the present application is applied.
  • An embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and a computer program is stored thereon, and the computer program is implemented when executed by a processor
  • the training method of the intent recognition model shown in any one of the above exemplary embodiments, the training method of the intent recognition model includes the following steps:
  • the sensitive text is text containing sensitive content
  • the normal text is text that does not contain sensitive content
  • the sensitive text and the normal text carry corresponding the intent tag
  • text expansion processing is performed on the sensitive text according to preset rules to obtain expanded sensitive text, so that the first quantity of the expanded sensitive text is equal to the second quantity of the normal text.
  • the ratio between them is equal to the preset ratio, wherein the random mosaic processing refers to using a special symbol to replace each word in the text with a preset probability;
  • the training sample and the contextual text data corresponding to the training sample are used as the input of the preset initial intention recognition model, and the intention label corresponding to the training sample is used as the output of the initial intention recognition model.
  • the initial intent recognition model is trained, and the trained first intent recognition model is obtained;
  • the first intention recognition model is used as the target intention recognition model, so that the newly input customer dialogue text data can be used for intention recognition through the target intention recognition model.
  • any reference to memory, storage, database or other medium provided in this application and used in the embodiments may include non-volatile and/or volatile memory.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

本申请涉及人工智能技术领域,提供一种意图识别模型的训练方法、装置、计算机设备和存储介质,方法包括:获取敏感文本及正常文本;基于随机马赛克处理的方式对敏感文本进行文本扩充处理;将指定敏感文本与正常文本作为训练样本,并获取与训练样本对应的上下文文本数据;将训练样本及上下文文本数据作为初始意图识别模型的输入,以意图标签作为初始意图识别模型的输出进行模型训练,得到第一意图识别模型;基于测试样本数据验证第一意图识别模型;若验证通过,将第一意图识别模型作为目标意图识别模型。本申请能缓解样本类别不平衡的问题,增加训练模型的泛化能力。本申请还可以应用于区块链领域,上述目标意图识别模型等数据可以存储于区块链上。

Description

意图识别模型的训练方法、装置、计算机设备和存储介质
本申请要求于2020年12月29日提交中国专利局、申请号为2020115945659,发明名称为“意图识别模型的训练方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,具体涉及一种意图识别模型的训练方法、装置、计算机设备和存储介质。
背景技术
目前智能客服系统已经应用在各个领域,包括金融领域,电商领域、通信领域等等。在客服与客户的对话过程中,客户有可能在不经意间透露包含敏感信息的内容,如何确定客户在对话过程中的语音是否具有敏感内容,成为了一个亟需解决的问题。随着深度学习的流行,基于神经网络模型的方法已经成为主流的敏感内容检测方法,即采用预训练的识别模型识别出客户在对话中输入的语音的意图,再基于意图判别出该语音中是否存在敏感内容。然而发明人意识到,由于客户绝大多数时间说的都是正常内容的语音,只有极少部分为带有敏感内容的语音,从而导致用于训练生成识别模型的正负样本存在类别不平衡的问题,进而使得训练生成的识别模型的泛化能力较差,且生成的模型的意图预测效果较差。
技术问题
本申请的主要目的为提供一种意图识别模型的训练方法、装置、计算机设备和存储介质,旨在解决现有的用于训练生成识别模型的正负样本存在类别不平衡的问题,进而使得训练生成的识别模型的泛化能力较差,且生成的模型的意图预测效果较差的技术问题。
技术解决方案
本申请提出一种意图识别模型的训练方法,所述方法包括步骤:
基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本申请还提供一种意图识别模型的训练装置,包括:
第一获取模块,用于基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
第一处理模块,用于基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
第二处理模块,用于对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
第二获取模块,用于将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
训练模块,用于将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
第三处理模块,用于获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
第一判断模块,用于基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
确定模块,用于若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时实现一种意图识别模型的训练方法,其中,所述意图识别模型的训练方法包括以下步骤:
基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现一种意图识别模型的训练方法,其中,所述意图识别模型的训练方法包括以下步骤:
基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
有益效果
本申请中提供的意图识别模型的训练方法、装置、计算机设备和存储介质,有利于增加训练生成的模型的泛化能力,有效提升训练生成的模型的意图预测的效果。使得后续能利用生成的目标意图识别模型来准确快速地实现对于用户输入的语音信息的意图识别,进而根据意图识别结果来快速判别出用户输入的语音信息是否包含有敏感信息。
附图说明
图1是本申请一实施例的意图识别模型的训练方法的流程示意图;
图2是本申请一实施例的意图识别模型的训练装置的结构示意图;
图3是本申请一实施例的计算机设备的结构示意图。
本发明的最佳实施方式
应当理解,此处所描述的具体实施例仅仅用于解释本申请,并不用于限定本申请。
参照图1,本申请一实施例的意图识别模型的训练方法,包括:
S1:基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
S2:基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
S3:对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
S4:将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
S5:将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
S6:获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
S7:基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
S8:若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
如上述步骤S1至S8所述,本方法实施例的执行主体为一种意图识别模型的训练装置。在实际应用中,上述意图识别模型的训练装置可以通过虚拟装置,例如软件代码实现,也可以通过写入或集成有相关执行代码的实体装置实现,且可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。本实施例中的意图识别模型的训练装置,能够解决意图识别模型的训练样本不平衡的问题。具体地,首先基于历史通话录音数据获取敏感文本以及正常文本,其中,上述敏感文本为包含敏感内容的文本,上述正常文本为不包含敏感内容的文本,且上述敏感文本与上述正常文本携带有对应的意图标签。敏感文本对应敏感意图,举例地,敏感文本可为包括咒骂内容、抱怨内容、投诉内容等敏感内容的文本。另外,上述历史通话录音数据是指已存储的客户与客服之间的通话录音数据,通过获取上述历史通话录音数据,进而可将历史通话录音数据转换拆分成包含敏感内容的敏感文本,以及不包含敏感内容的正常文本。然后基于随机马赛克处理的方式,按照预设规则对上述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使上述扩充后的敏感文本的第一数量与上述正常文本的第二数量之间的比值等于预设比值,上述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理。对上述预设概率不作具体限定,例如可设为15%,上述特殊符号可为[MASK],对上述预设比值不作具体限定,优选可设为0.1,通过将扩充后的敏感文本与正常文本的数量比设置为1:10,可以提高模型训练的泛化性。另外,上述预设规则可包括多种情况,例如可直接对上述敏感文本进行随机马赛克处理以进行文本扩充处理;或者可以先使用无意义的文本对敏感文本进行拼接处理,再对拼接文本进行随机马赛克处理以进行文本扩充处理;或者还可以先使用相同意图的其他敏感文本对敏感文本进行拼接处理,再对拼接文本进行随机马赛克处理以进行文本扩充处理,等等。之后对上述扩充后的敏感文本中除上述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使上述其他文本携带对应的意图标签。其中,上述其他文本的意图标签与生成其他文本对应的敏感文本的意图标签相同。在得到了指定敏感文本后,将上述指定敏感文本与上述正常文本作为训练样本,并获取与上述训练样本对应的上下文文本数据。其中,同样可基于上述历史通话录音数据来获取到与上述训练样本对应的上下文文本数据,上下文文本数据能够体现与上述训练样本对应的对话流程的业务场景。上述上下文文本数据是为了更好地识别训练样本的意图而引入的特征,由于上下文对话数据的主题基本是一致的,因而上下文文本数据能够侧面反映用户意图,对训练样本的意图识别起到良好的辅助作用。后续将上述训练样本以及与上述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与上述训练样本对应的意图标签作为上述初始意图识别模型的输出,对上述初始意图识别模型进行训练,得到训练完成的第一意图识别模型。其中,可以采用CNN模型、LSTM模型、TRANSFORMER模型等作为上述初始意图识别模型。由于CNN模型能够检测类似关键词的信息,并且训练和推理速度极快,适用于高并发场景,优选采用CNN模型作为上述初始意图识别模型。在得到了上述第一意图识别模型后,获取预设的测试样本数据,将上述测试样本数据输入至上述第一意图识别模型,接收上述第一意图识别模型输出的与上述测试样本数据对应的识别结果。其中,上述测试样本数据包含有预先收集的与上述训练样本不同的数据样本,以及与该数据样本对应的上下文数据。并基于上述识别结果对上述第一意图识别模型进行验证,判断是否验证通过。如果验证通过,将上述第一意图识别模型作为目标意图识别模型,以通过上述目标意图识别模型对新输入的客户对话文本数据进行意图识别。其中,如果验证不通过,则会对基于上述模型训练过程对上述初始意图识别模型 进行重新训练,直至训练生成满足验证要求的第二意图识别模型,并将该第二意图识别模型作为上述目标意图识别模型。针对现有存在的正负样本类别不平衡的问题,本实施例通过采用随机马赛克的方式对敏感文本进行文本扩充处理,相当于给敏感内容数据加了随机噪声,以增加不重复的敏感内容的文本数据,可以有效缓解正负样本类别不平衡的问题。进而通过使用扩充后的样本数据来训练模型,有利于增加训练生成的模型的泛化能力,有效提升训练生成的模型的意图预测的效果。使得后续能利用生成的目标意图识别模型来准确快速地实现对于用户输入的语音信息的意图识别,进而根据意图识别结果来快速判别出用户输入的语音信息是否包含有敏感信息。
进一步地,本申请一实施例中,上述步骤S2,包括:
S200:获取所述敏感文本的第三数量;
S201:计算所述第三数量与所述第一数量的差值,得到第四数量;
S202:采用随机马赛克处理的方式对所述敏感文本进行处理,基于所述敏感文本生成与所述第四数量相同的多个第一敏感文本;
S203:使用所述第一敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
如上述步骤S200至S203所述,上述基于随机马赛克处理的方式,按照预设规则对上述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使上述扩充后的敏感文本的第一数量与上述正常文本的第二数量之间的比值等于预设比值的步骤,具体可包括:首先获取上述敏感文本的第三数量。然后计算上述第三数量与上述第一数量的差值,得到第四数量。其中,上述第四数量即为需要生成的用于扩充敏感文本的文本数量。之后采用随机马赛克处理的方式对上述敏感文本进行处理,基于上述敏感文本生成与上述第四数量相同的多个第一敏感文本。优选地,采用随机马赛克处理的方式对上述敏感文本进行处理的步骤可包括:从敏感文本中包括的每一个字中随机筛选出一个目标字,然后使用特殊符号对敏感文本中的该目标字进行替换,得到替换后的敏感文本,后续再以上述预设概率对敏感文本中除上述目标字外的其他字进行特殊符号替换处理。举例地,上述特殊符号可为[MASK],如果任意一个敏感文本为“我不想透露”这句话,通过对这句话进行随机马赛克处理后,可得到处理后的敏感文本为“我不[MASK]透露”,通过使用特殊符号对敏感文本中的字进行替换以生成与原本的敏感文本不同的新的文本数据,从而实现了与敏感文本对应的不重复的敏感内容的文本数据的增加。另外,对于基于上述敏感文本生成与上述第四数量相同的多个第一敏感文本的具体生成方式不作限定,例如可从上述敏感文本中选择出一定数量的目标敏感文本,然后分别对该目标敏感文本进行随机马赛克处理,直至生成与上述第四数量相同的多个第一敏感文本。上述一定数量可根据实际需求进行设置,当然还可以采用其他的实现方式,在此不作过多叙述。最后使用上述第一敏感文本对上述敏感文本进行扩充处理,得到上述扩充后的敏感文本。其中,上述扩充后的敏感文本包括上述第一敏感文本与上述敏感文本。由于在通话过程中,客户表达正常内容的语音数量远远大于包含敏感内容的语音数量,针对正负样本类别不平衡的问题,本实施例通过采用随机马赛克的方式对上述敏感文本进行文本扩充处理,相当于给敏感内容数据加了随机噪声,以增加不重复的敏感内容的文本数据,可以有效缓解正负样本类别不平衡的问题,增加训练生成的模型的泛化能力,有利于提升后续训练生成的模型的意图预测的效果。
进一步地,本申请一实施例中,上述步骤S2,包括:
S210:获取预设文本,其中,所述预设文本为无意义的文本;
S211:使用所述预设文本对所述敏感文本进行拼接处理,得到拼接后的第二敏感文本;
S212:采用随机马赛克处理的方式对所述第二敏感文本进行处理,基于所述第二敏感文本生成与所述第四数量相同的多个第三敏感文本;
S213:使用所述第三敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
如上述步骤S210至S213所述,上述基于随机马赛克处理的方式,按照预设规则对上述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使上述扩充后的敏感文本的第一数量与上述正常文本的第二数量之间的比值等于预设比值的步骤,具体可包括:首先获取预设文本,其中,上述预设文本为无意义的文本,该无意义的文本具体可为无意义的语气词。然后使用上述预设文本对上述敏感文本进行拼接处理,得到拼接后的第二敏感文本。其中,由于预设文本为无意义的文本,通过使用上述预设文本对上述敏感文本进行拼接处理,生成的拼接后的第二敏感文本仍然是上述敏感文本对应的敏感意图,即第二敏感文本仍属于包含敏感内容的敏感文本。举例地,如果任一敏感文本为“我不想透露”这句话,预设文本为“什么啊”,则两者拼接后的拼接文本为“什么啊,我不想透露”。之后采用随机马赛克处理的方式对上述第二敏感文本进行处理,基于上述第二敏感文本生成与上述第四数量相同的多个第三敏感文本。举例地,对上述“什么啊,我不想透露”的拼接文本进行随机马赛克处理后,如可得到处理后的拼接文本为“什么啊,我不想透[MASK]”。另外,对于基于上述第二敏感文本生成与上述第四数量相同的多个第三敏感文本的具体生成方式不作限定,例如可从上述第二敏感文本中选择出一定数量的目标第二敏感文本,然后分别对该目标第二敏感文本进行随机马赛克处理,直至生成与上述第四数量相同的多个 第三敏感文本。上述一定数量可根据实际需求进行设置,当然还可以采用其他的实现方式,在此不作过多叙述。最后使用上述第三敏感文本对上述敏感文本进行扩充处理,得到上述扩充后的敏感文本。本实施例通过采用随机马赛克的方式对上述敏感文本进行文本扩充处理,相当于给敏感内容数据加了随机噪声,以增加不重复的敏感内容的文本数据,可以有效缓解正负样本类别不平衡的问题,增加训练生成的模型的泛化能力,有利于提升后续训练生成的模型的意图预测的效果。
进一步地,本申请一实施例中,上述步骤S2,包括:
S220:获取预设敏感文本,其中,所述预设敏感文本为所有所述敏感文本中的任意一个文本;
S221:从所有所述敏感文本中筛选出与所述预设敏感文本具有相同的意图标签的同类敏感文本;
S222:使用所述同类敏感文本对所述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本;
S223:采用随机马赛克处理的方式对所述第四敏感文本进行处理,基于所述第四敏感文本生成与所述第四数量相同的多个第五敏感文本;
S224:使用所述第五敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
如上述步骤S220至S224所述,上述基于随机马赛克处理的方式,按照预设规则对上述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使上述扩充后的敏感文本的第一数量与上述正常文本的第二数量之间的比值等于预设比值的步骤,具体可包括:首先获取预设敏感文本,其中,上述预设敏感文本为所有上述敏感文本中的任意一个文本。然后从所有上述敏感文本中筛选出与上述预设敏感文本具有相同的意图标签的同类敏感文本,并使用上述同类敏感文本对上述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本。其中,在分类任务中,如果两个类别相同的句子拼接在一起,其类别还是同一个。使用上述同类敏感文本对上述预设敏感文本进行拼接处理,得到的拼接后的第四敏感文本仍然对应着该预设敏感文本的敏感意图。举例地,假如预设敏感文本为“我不想透露”这句话,则该预设敏感文本的意图标签为抱怨意图,具有与该预设敏感文本的意图标签相同的同类敏感文本为“你好烦啊”,则两者拼接后的拼接文本为“你好烦啊,我不想透露”。之后采用随机马赛克处理的方式对上述第四敏感文本进行处理,基于上述第四敏感文本生成与上述第四数量相同的多个第五敏感文本。举例地,对“你好烦啊,我不想透露”的拼接文本进行随机马赛克处理后,如可得到处理后的拼接文本为“你好烦啊,我[MASK][MASK]透露”。另外,对于基于上述第四敏感文本生成与上述第四数量相同的多个第五敏感文本的具体生成方式不作限定,例如可从上述第四敏感文本中选择出一定数量的目标第四敏感文本,然后分别对该目标第四敏感文本进行随机马赛克处理,直至生成与上述第四数量相同的多个第五敏感文本。上述一定数量可根据实际需求进行设置,当然还可以采用其他的实现方式,在此不作过多叙述。最后使用上述第五敏感文本对上述敏感文本进行扩充处理,得到上述扩充后的敏感文本。本实施例通过采用随机马赛克的方式对上述敏感文本进行文本扩充处理,相当于给敏感内容数据加了随机噪声,以增加不重复的敏感内容的文本数据,可以有效缓解正负样本类别不平衡的问题,增加训练生成的模型的泛化能力,有利于提升后续训练生成的模型的意图预测的效果。
进一步地,本申请一实施例中,上述步骤S5,包括:
S500:将所述训练样本输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述训练样本进行编码处理,将所述训练样本转换为对应的第一特征向量;
S501:将所述第一特征向量作为所述初始意图识别模型中的卷积神经网络层的输入,通过所述卷积神经网络层对所述第一特征向量进行卷积处理后生成对应的第二特征向量;
S502:将所述第二特征向量作为所述初始意图识别模型中的最大池化层的输入,通过所述最大池化层对所述第二特征向量进行池化处理后生成对应的第三特征向量;
S503:将与所述训练样本对应的所述上下文文本数据输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述上下文文本数据进行编码处理,将所述上下文文本数据转换为对应的第四特征向量;
S504:对所述第三特征向量与所述第四特征向量进行拼接处理,生成对应的第五向量;
S505:将所述第五特征向量输入至所述初始意图识别模型中的全连接层,通过预设的softmax函数计算出所述训练样本的目标意图属于与所述训练样本对应的意图标签的概率值;
S506:基于所述概率值,判断预设的损失函数是否收敛;
S507:若所述损失函数收敛,则判定完成训练过程,并得到训练完成的第一意图识别模型。
如上述步骤S500至S507所述,上述将上述训练样本以及与上述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与上述训练样本对应的意图标签作为上述初始意图识别模型的输出,对上述初始意图识别模型进行训练,得到训练完成的第一意图识别模型的步骤,具体可包括:首先将上述训练样本输入至上述初始意图识别模型中的嵌入层,通过上述嵌入层对上述训练样本进行编码处理,将上述训练样本转换为对应的第一特征向量。其中,通过嵌入层对上述训练样本进行编码处理,可以将上述训练样本转换为对应的稠密的词向量,即上述第一特征向量,嵌入层的转化公式为:A=EmbeddingMatrix(x),其中A为第一特征向量,EmbeddingMatrix为词向量表,其内部为V×d的矩 阵,V为字的数量,d为词向量的维度,x为训练样本,通过该转化公式可将训练样本中每一个字随机初始化为均值为0,方差为1的向量。然后将上述第一特征向量作为上述初始意图识别模型中的卷积神经网络层的输入,通过上述卷积神经网络层对上述第一特征向量进行卷积处理后生成对应的第二特征向量。其中,在得到第一特征向量A后,将其送入到卷积神经网络层(CNN)中,继续抽取训练样本的特征,假设卷积神经网络层采用的卷积核是宽度为d,高度为h的矩阵ω,对于嵌入层输出的特征矩阵A∈R sxd,则卷积神经网络层的卷积操作公式可用如下公式表示:μ i=f(ο i+b 1),ο i=ω*A[i:i+h-1],i=1,2,···,s-h+1,其中,s表示训练样本的长度,d表示词向量的维度,f是Relu激活函数,b 1为偏差项。之后将上述第二特征向量作为上述初始意图识别模型中的最大池化层的输入,通过上述最大池化层对上述第二特征向量进行池化处理后生成对应的第三特征向量。其中,设卷积层抽取训练样本的特征之后得到的第二特征向量为u,然后经过一个最大池化层,得到第三特征向量p 1,最大池化层的计算公式为:p 1=max(u i),i=1,2,..,s。同时将与上述训练样本对应的上述上下文文本数据输入至上述初始意图识别模型中的嵌入层,通过上述嵌入层对上述上下文文本数据进行编码处理,将上述上下文文本数据转换为对应的第四特征向量。其中,参考嵌入层对于上述训练样本的处理,对于与上述训练样本对应的上下文文本数据,同样使用嵌入层进行编码处理,维度可为5维,生成对应的第四特征向量p 2。另外,上述上下文文本数据是为了更好地识别训练样本的意图而引入的特征,由于上下文对话数据的主题基本是一致的,因而上下文文本数据能够侧面反映用户意图,对训练样本的意图识别起到良好的辅助作用。后续对上述第三特征向量与上述第四特征向量进行拼接处理,生成对应的第五向量。其中,可采用公式p=[p 1,p 2]对上述第三特征向量与上述第四特征向量进行拼接处理,得到第五特征向量p。在得到了第五向量后,再将上述第五特征向量输入至上述初始意图识别模型中的全连接层,通过预设的softmax函数计算出上述训练样本的目标意图属于与上述训练样本对应的意图标签的概率值。其中,可基于公式
Figure PCTCN2021091710-appb-000001
计算出上述训练样本的目标意图属于与上述训练样本对应的意图标签的概率值,其中,W p为全连接层中向量p的参数矩阵,b 2为偏差项。最后基于上述概率值,判断预设的损失函数是否收敛。其中,上述损失函数为:
Figure PCTCN2021091710-appb-000002
为训练样本的目标意图属于与上述训练样本对应的意图标签的概率值,y为训练样本对应的意图标签。另外,判断损失函数收敛的过程包括:指将全连接层中生成的概率值代入至损失函数中,然后判断该损失函数是否达到预设损失值,如果达到该预设损失值则判定损失函数收敛,如果未达到预设损失值则判定损失函数未收敛。如果上述损失函数收敛,则判定完成训练过程,并得到训练完成的第一意图识别模型。其中,如果上述损失函数未收敛,则进一步根据上述损失函数采用反向传播算法调整上述初始意图识别模型的权值和偏置,继续执行上述训练步骤,直至该损失函数收敛,进而完成训练过程。上述反向传播算法可参照现有的算法。本实施通过训练得到训练完成的第一意图识别模型,有利于后续基于该第一意图识别模型进一步确定出满足需求的目标意图识别模型,使得后续能够利用该目标意图识别模型快速准确地实现对于用户输入的语音信息的意图识别。
进一步地,本申请一实施例中,上述步骤S8之后,包括:
S800:获取用户在通话过程中输入的语音信息;
S801:将所述语音信息转换为对应的文本信息;
S802:对所述文本信息进行预处理,得到处理后的目标文本信息;
S803:获取与所述语音信息对应的上下文语音信息,并将所述上下文语音信息转换为对应的目标上下文文本信息;
S804:将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果;
S805:判断所述目标意图识别结果是否属于预设的敏感意图;
S806:若所述目标意图识别结果属于所述敏感意图,生成与所述目标意图识别结果对应的提醒信息。
如上述步骤S800至S806所述,在训练生成了上述目标意图识别模型后,可基于该目标意图识别模型对用户在当前通话过程中输入的语音信息进行意图识别处理。具体地,首先获取用户在通话过程中输入的语音信息,并将上述语音信息转换为对应的文本信息。其中,可使用ASR技术将语音信息转化为文本信息。然后对上述文本信息进行预处理,得到处理后的目标文本信息。其中,上述预处理的过程可包括去除标点符号,去除特殊字符,分词,去停用词等处理。之后获取与上述语音信息对应的上下文语音信息,并将上述上下文语音信息转换为对应的目标上下文文本信息。其中,上述上下文语音信息仅包括用户当前输入的语音信息的历史输入信息,即上文语音信息,且对于上下文语音信息的转换过程可参考 上述语音信息。另外,上述目标上下文文本信息能够体现当前通话过程的业务场景,能够侧面反映用户意图,对语音信息的意图识别起到良好的辅助作用。后续将上述目标文本信息与上述目标上下文文本信息输入至上述目标意图识别模型,基于上述目标意图识别模型对上述目标文本信息进行意图识别,获取与上述语音信息对应的目标意图识别结果。并判断上述目标意图识别结果是否属于预设的敏感意图。其中,对于上述预设的敏感意图不作具体限定,例如可包括投诉意图、抱怨意图、咒骂意图等。如果上述目标意图识别结果属于上述敏感意图,生成与上述目标意图识别结果对应的提醒信息。其中,上述提醒信息至少包括该语音信息与上述敏感意图。本实施例在接收到用户在通话过程中输入的语音信息后,通过训练生成的目标意图识别模型便能基于输入的目标文本信息与上述目标上下文文本信息,准确地生成与用户输入的语音信息对应的目标意图,能够实现在不同的对话流程中,即使客户说同样的话也能判断不同的意图,有效提高意图识别的准确性与效率。另外,当与用户输入的语音信息包含有敏感意图,则会生成与上述目标意图识别结果对应的提醒信息,以使得后续客服能够基于该提醒信息对用户采取相应的应对措施,以保证业务交流的顺利进行。
进一步地,本申请一实施例中,上述步骤S804,包括:
S8040:获取预设数量的指定目标意图识别模型,其中,预设数量的所述指定目标意图识别模型均是使用所述训练样本训练生成的,所述预设数量大于1;
S8041:将所述目标文本信息与所述目标上下文文本信息分别输入至各所述指定目标意图识别模型中,以通过各所述指定目标意图识别模型分别输出与所述目标文本信息对应的第一意图识别结果;
S8042:接收各所述目标意图识别模型分别返回的所述第一意图识别结果;
S8043:对所有所述第一意图识别结果进行分析处理,筛选出在所有所述第一意图识别结果中出现次数最多的第二意图识别结果;
S8044:将所述第二意图识别结果作为所述目标意图识别结果。
如上述步骤S8040至S8044所述,上述将上述目标文本信息与上述目标上下文文本信息输入至上述目标意图识别模型,基于上述目标意图识别模型对上述目标文本信息进行意图识别,获取与上述语音信息对应的目标意图识别结果的步骤,具体可包括:首先获取预设数量的指定目标意图识别模型,其中,预设数量的上述指定目标意图识别模型均是使用上述训练样本训练生成的,且上述预设数量大于1,例如可设置为3个、4个、5个等。另外,对于输入的相同的目标文本信息,不同的目标意图识别模型对该目标文本信息进行识别后生成的意图识别结果可能并不完全相同。当只使用一个意图识别模型对该目标文本信息进行意图识别时,其所识别出的意图信息的准确率较低,而利用上述预设数量的意图识别模型来分别对目标文本信息进行意图识别,可以提高所得到的与目标文本信息对应的意图识别结果的准确性,避免仅利用一个意图识别模型来对目标文本信息进行意图识别而导致识别误差过大。然后将上述目标文本信息与上述目标上下文文本信息分别输入至各上述指定目标意图识别模型中,以通过各上述指定目标意图识别模型分别输出与上述目标文本信息对应的第一意图识别结果。之后接收各上述目标意图识别模型分别返回的上述第一意图识别结果。最后对所有上述第一意图识别结果进行分析处理,筛选出在所有上述第一意图识别结果中出现次数最多的第二意图识别结果,并将上述第二意图识别结果作为上述目标意图识别结果。本实施例通过使用预设数量的指定目标意图识别模型分别对上述目标文本信息进行意图识别,然后收集各指定目标意图识别模型分别返回的意图识别结果,并将出现次数最多的意图识别结果作为用户最终的意图识别结果,从而可以避免仅利用一个意图识别模型来对目标文本信息进行意图识别而导致识别误差过大,有效地提高了对于目标文本信息的意图识别的准确率。进一步地,上述预设数量优选采用奇数,通过将上述预设数量设置为奇数个,可以避免出现当采用偶数个,例如4个时每两个预测出的意图识别结果相同,而与其余两个预测出的不同的情况,进而导致无法确定出与目标文本信息对应的意图的情况。通过采用奇数个的意图识别模型来对上述目标文本信息进行意图识别,可以保证意图识别模型所预测出的与目标文本信息对应的意图能够更加准确。
本申请实施例中的意图识别模型的训练方法还可以应用于区块链领域,如将上述目标意图识别模型等数据存储于区块链上。通过使用区块链来对上述目标意图识别模型进行存储和管理,能够有效地保证上述目标意图识别模型的安全性与不可篡改性。
参照图2,本申请一实施例中还提供了一种意图识别模型的训练装置,包括:
第一获取模块1,用于基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
第一处理模块2,用于基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
第二处理模块3,用于对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
第二获取模块4,用于将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
训练模块5,用于将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
第三处理模块6,用于获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
第一判断模块7,用于基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
确定模块8,用于若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本实施例中,上述意图识别模型的训练装置中的第一获取模块、第一处理模块、第二处理模块、第二获取模块、训练模块、第三处理模块、第一判断模块与确定模块的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S1至S8的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述第一处理模块,包括:
第一获取单元,用于获取所述敏感文本的第三数量;
第一计算单元,用于计算所述第三数量与所述第一数量的差值,得到第四数量;
第一处理单元,用于采用随机马赛克处理的方式对所述敏感文本进行处理,基于所述敏感文本生成与所述第四数量相同的多个第一敏感文本;
第一扩充单元,用于使用所述第一敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
本实施例中,上述意图识别模型的训练装置中的第一获取单元、第一计算单元、第一处理单元与第一扩充单元的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S200至S203的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述第一处理模块,包括:
第二获取单元,用于获取预设文本,其中,所述预设文本为无意义的文本;
第一拼接单元,用于使用所述预设文本对所述敏感文本进行拼接处理,得到拼接后的第二敏感文本;
第二处理单元,用于采用随机马赛克处理的方式对所述第二敏感文本进行处理,基于所述第二敏感文本生成与所述第四数量相同的多个第三敏感文本;
第二扩充单元,用于使用所述第三敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
本实施例中,上述意图识别模型的训练装置中的第二获取单元、第一拼接单元、第二处理单元与第二扩充单元的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S210至S213的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述第一处理模块,包括:
第三获取单元,用于获取预设敏感文本,其中,所述预设敏感文本为所有所述敏感文本中的任意一个文本;
第一筛选单元,用于从所有所述敏感文本中筛选出与所述预设敏感文本具有相同的意图标签的同类敏感文本;
第二拼接单元,用于使用所述同类敏感文本对所述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本;
第三处理单元,用于采用随机马赛克处理的方式对所述第四敏感文本进行处理,基于所述第四敏感文本生成与所述第四数量相同的多个第五敏感文本;
第三扩充单元,用于使用所述第五敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
本实施例中,上述意图识别模型的训练装置中的第三获取单元、第一筛选单元、第二拼接单元、三处理单元与第三扩充单元的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S220至S224的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述训练模块,包括:
第一转换单元,用于将所述训练样本输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述训练样本进行编码处理,将所述训练样本转换为对应的第一特征向量;
第一生成单元,用于将所述第一特征向量作为所述初始意图识别模型中的卷积神经网络层的输入, 通过所述卷积神经网络层对所述第一特征向量进行卷积处理后生成对应的第二特征向量;
第二生成单元,用于将所述第二特征向量作为所述初始意图识别模型中的最大池化层的输入,通过所述最大池化层对所述第二特征向量进行池化处理后生成对应的第三特征向量;
第二转换单元,用于将与所述训练样本对应的所述上下文文本数据输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述上下文文本数据进行编码处理,将所述上下文文本数据转换为对应的第四特征向量;
第三生成单元,用于对所述第三特征向量与所述第四特征向量进行拼接处理,生成对应的第五向量;
第二计算单元,用于将所述第五特征向量输入至所述初始意图识别模型中的全连接层,通过预设的softmax函数计算出所述训练样本的目标意图属于与所述训练样本对应的意图标签的概率值;
判断单元,用于基于所述概率值,判断预设的损失函数是否收敛;
判定单元,用于若所述损失函数收敛,则判定完成训练过程,并得到训练完成的第一意图识别模型。
本实施例中,上述意图识别模型的训练装置中的第一转换单元、第一生成单元、第二生成单元、第二转换单元、第三生成单元、第二计算单元、判断单元与判定单元的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S500至S507的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述意图识别模型的训练装置,包括:
第三获取模块,用于获取用户在通话过程中输入的语音信息;
第一转换模块,用于将所述语音信息转换为对应的文本信息;
第四处理模块,用于对所述文本信息进行预处理,得到处理后的目标文本信息;
第二转换模块,用于获取与所述语音信息对应的上下文语音信息,并将所述上下文语音信息转换为对应的目标上下文文本信息;
识别模块,用于将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果;
第二判断模块,用于判断所述目标意图识别结果是否属于预设的敏感意图;
生成模块,用于若所述目标意图识别结果属于所述敏感意图,生成与所述目标意图识别结果对应的提醒信息。
本实施例中,上述意图识别模型的训练装置中的第三获取模块、第一转换模块、第四处理模块、第二转换模块、识别模块、第二判断模块与生成模块的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S800至S806的实现过程,在此不再赘述。
进一步地,本申请一实施例中,上述识别模块,包括:
第四获取单元,用于获取预设数量的指定目标意图识别模型,其中,预设数量的所述指定目标意图识别模型均是使用所述训练样本训练生成的,所述预设数量大于1;
输出单元,用于将所述目标文本信息与所述目标上下文文本信息分别输入至各所述指定目标意图识别模型中,以通过各所述指定目标意图识别模型分别输出与所述目标文本信息对应的第一意图识别结果;
接收单元,用于接收各所述目标意图识别模型分别返回的所述第一意图识别结果;
第二筛选单元,用于对所有所述第一意图识别结果进行分析处理,筛选出在所有所述第一意图识别结果中出现次数最多的第二意图识别结果;
确定单元,用于将所述第二意图识别结果作为所述目标意图识别结果。
本实施例中,上述意图识别模型的训练装置中的第四获取单元、输出单元、接收单元、第二筛选单元与确定单元的功能和作用的实现过程具体详见上述意图识别模型的训练方法中对应步骤S8040至S8044的实现过程,在此不再赘述。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏、输入装置和数据库。其中,该计算机设备设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括存储介质、内存储器。该存储介质存储有操作系统、计算机程序和数据库。该内存储器为存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储训练样本与目标意图识别模型。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机设备的显示屏是计算机中必不可少的一种图文输出设备,用于将数字信号转换为光信号,使文字与图形在显示屏的屏幕上显示出来。该计算机设备的输入装置是计算机与用户或其他设备之间进行信息交换的主要装置,用于把数据、指令及某些标志信息等输送到计算机中去。该计算机程序被处理器执行时以实现一种意图识别模型的训练方法。
上述处理器执行上述意图识别模型的训练方法的步骤:
基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的装置、计算机设备的限定。
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一个示例性实施例所示出的意图识别模型的训练方法,所述意图识别模型的训练方法包括以下步骤:
基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM通过多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种意图识别模型的训练方法,其中,包括:
    基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
    基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
    对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
    将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
    将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
    获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
    基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
    若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
  2. 根据权利要求1所述的意图识别模型的训练方法,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取所述敏感文本的第三数量;
    计算所述第三数量与所述第一数量的差值,得到第四数量;
    采用随机马赛克处理的方式对所述敏感文本进行处理,基于所述敏感文本生成与所述第四数量相同的多个第一敏感文本;
    使用所述第一敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  3. 根据权利要求2所述的意图识别模型的训练方法,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设文本,其中,所述预设文本为无意义的文本;
    使用所述预设文本对所述敏感文本进行拼接处理,得到拼接后的第二敏感文本;
    采用随机马赛克处理的方式对所述第二敏感文本进行处理,基于所述第二敏感文本生成与所述第四数量相同的多个第三敏感文本;
    使用所述第三敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  4. 根据权利要求2所述的意图识别模型的训练方法,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设敏感文本,其中,所述预设敏感文本为所有所述敏感文本中的任意一个文本;
    从所有所述敏感文本中筛选出与所述预设敏感文本具有相同的意图标签的同类敏感文本;
    使用所述同类敏感文本对所述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本;
    采用随机马赛克处理的方式对所述第四敏感文本进行处理,基于所述第四敏感文本生成与所述第四数量相同的多个第五敏感文本;
    使用所述第五敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  5. 根据权利要求1所述的意图识别模型的训练方法,其中,所述将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型的步骤,包括:
    将所述训练样本输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述训练样本进行编码处理,将所述训练样本转换为对应的第一特征向量;
    将所述第一特征向量作为所述初始意图识别模型中的卷积神经网络层的输入,通过所述卷积神经网络层对所述第一特征向量进行卷积处理后生成对应的第二特征向量;
    将所述第二特征向量作为所述初始意图识别模型中的最大池化层的输入,通过所述最大池化层对所述第二特征向量进行池化处理后生成对应的第三特征向量;
    将与所述训练样本对应的所述上下文文本数据输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述上下文文本数据进行编码处理,将所述上下文文本数据转换为对应的第四特征向量;
    对所述第三特征向量与所述第四特征向量进行拼接处理,生成对应的第五向量;
    将所述第五特征向量输入至所述初始意图识别模型中的全连接层,通过预设的softmax函数计算出所述训练样本的目标意图属于与所述训练样本对应的意图标签的概率值;
    基于所述概率值,判断预设的损失函数是否收敛;
    若所述损失函数收敛,则判定完成训练过程,并得到训练完成的第一意图识别模型。
  6. 根据权利要求1所述的意图识别模型的训练方法,其中,所述将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别的步骤之后,包括:
    获取用户在通话过程中输入的语音信息;
    将所述语音信息转换为对应的文本信息;
    对所述文本信息进行预处理,得到处理后的目标文本信息;
    获取与所述语音信息对应的上下文语音信息,并将所述上下文语音信息转换为对应的目标上下文文本信息;
    将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果;
    判断所述目标意图识别结果是否属于预设的敏感意图;
    若所述目标意图识别结果属于所述敏感意图,生成与所述目标意图识别结果对应的提醒信息。
  7. 根据权利要求6所述的意图识别模型的训练方法,其中,所述将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果的步骤,包括:
    获取预设数量的指定目标意图识别模型,其中,预设数量的所述指定目标意图识别模型均是使用所述训练样本训练生成的,所述预设数量大于1;
    将所述目标文本信息与所述目标上下文文本信息分别输入至各所述指定目标意图识别模型中,以通过各所述指定目标意图识别模型分别输出与所述目标文本信息对应的第一意图识别结果;
    接收各所述目标意图识别模型分别返回的所述第一意图识别结果;
    对所有所述第一意图识别结果进行分析处理,筛选出在所有所述第一意图识别结果中出现次数最多的第二意图识别结果;
    将所述第二意图识别结果作为所述目标意图识别结果。
  8. 一种意图识别模型的训练装置,其中,包括:
    第一获取模块,用于基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
    第一处理模块,用于基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
    第二处理模块,用于对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
    第二获取模块,用于将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
    训练模块,用于将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
    第三处理模块,用于获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
    第一判断模块,用于基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
    确定模块,用于若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,其中,所述处理器执行所述计算机程序时实现一种意图识别模型的训练方法:
    其中,所述意图识别模型的训练方法包括:
    基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
    基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
    对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
    将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
    将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
    获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
    基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
    若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
  10. 根据权利要求9所述的计算机设备,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取所述敏感文本的第三数量;
    计算所述第三数量与所述第一数量的差值,得到第四数量;
    采用随机马赛克处理的方式对所述敏感文本进行处理,基于所述敏感文本生成与所述第四数量相同的多个第一敏感文本;
    使用所述第一敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  11. 根据权利要求10所述的计算机设备,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设文本,其中,所述预设文本为无意义的文本;
    使用所述预设文本对所述敏感文本进行拼接处理,得到拼接后的第二敏感文本;
    采用随机马赛克处理的方式对所述第二敏感文本进行处理,基于所述第二敏感文本生成与所述第四数量相同的多个第三敏感文本;
    使用所述第三敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  12. 根据权利要求10所述的计算机设备,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设敏感文本,其中,所述预设敏感文本为所有所述敏感文本中的任意一个文本;
    从所有所述敏感文本中筛选出与所述预设敏感文本具有相同的意图标签的同类敏感文本;
    使用所述同类敏感文本对所述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本;
    采用随机马赛克处理的方式对所述第四敏感文本进行处理,基于所述第四敏感文本生成与所述第四数量相同的多个第五敏感文本;
    使用所述第五敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  13. 根据权利要求9所述的计算机设备,其中,所述将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入, 以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型的步骤,包括:
    将所述训练样本输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述训练样本进行编码处理,将所述训练样本转换为对应的第一特征向量;
    将所述第一特征向量作为所述初始意图识别模型中的卷积神经网络层的输入,通过所述卷积神经网络层对所述第一特征向量进行卷积处理后生成对应的第二特征向量;
    将所述第二特征向量作为所述初始意图识别模型中的最大池化层的输入,通过所述最大池化层对所述第二特征向量进行池化处理后生成对应的第三特征向量;
    将与所述训练样本对应的所述上下文文本数据输入至所述初始意图识别模型中的嵌入层,通过所述嵌入层对所述上下文文本数据进行编码处理,将所述上下文文本数据转换为对应的第四特征向量;
    对所述第三特征向量与所述第四特征向量进行拼接处理,生成对应的第五向量;
    将所述第五特征向量输入至所述初始意图识别模型中的全连接层,通过预设的softmax函数计算出所述训练样本的目标意图属于与所述训练样本对应的意图标签的概率值;
    基于所述概率值,判断预设的损失函数是否收敛;
    若所述损失函数收敛,则判定完成训练过程,并得到训练完成的第一意图识别模型。
  14. 根据权利要求9所述的计算机设备,其中,所述将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别的步骤之后,包括:
    获取用户在通话过程中输入的语音信息;
    将所述语音信息转换为对应的文本信息;
    对所述文本信息进行预处理,得到处理后的目标文本信息;
    获取与所述语音信息对应的上下文语音信息,并将所述上下文语音信息转换为对应的目标上下文文本信息;
    将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果;
    判断所述目标意图识别结果是否属于预设的敏感意图;
    若所述目标意图识别结果属于所述敏感意图,生成与所述目标意图识别结果对应的提醒信息。
  15. 根据权利要求14所述的计算机设备,其中,所述将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果的步骤,包括:
    获取预设数量的指定目标意图识别模型,其中,预设数量的所述指定目标意图识别模型均是使用所述训练样本训练生成的,所述预设数量大于1;
    将所述目标文本信息与所述目标上下文文本信息分别输入至各所述指定目标意图识别模型中,以通过各所述指定目标意图识别模型分别输出与所述目标文本信息对应的第一意图识别结果;
    接收各所述目标意图识别模型分别返回的所述第一意图识别结果;
    对所有所述第一意图识别结果进行分析处理,筛选出在所有所述第一意图识别结果中出现次数最多的第二意图识别结果;
    将所述第二意图识别结果作为所述目标意图识别结果。
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种意图识别模型的训练方法,其中,所述意图识别模型的训练方法包括以下步骤:
    基于历史通话录音数据获取敏感文本以及正常文本,其中,所述敏感文本为包含敏感内容的文本,所述正常文本为不包含敏感内容的文本,且所述敏感文本与所述正常文本携带有对应的意图标签;
    基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值,其中,所述随机马赛克处理是指以预设概率对文本中的每个字使用特殊符号进行替换处理;
    对所述扩充后的敏感文本中除所述敏感文本外的其他文本进行标注处理,得到对应的指定敏感文本,以使所述其他文本携带对应的意图标签;
    将所述指定敏感文本与所述正常文本作为训练样本,并获取与所述训练样本对应的上下文文本数据;
    将所述训练样本以及与所述训练样本对应的上下文文本数据作为预设的初始意图识别模型的输入,以与所述训练样本对应的意图标签作为所述初始意图识别模型的输出,对所述初始意图识别模型进行训练,得到训练完成的第一意图识别模型;
    获取预设的测试样本数据,将所述测试样本数据输入至所述第一意图识别模型,接收所述第一意图识别模型输出的与所述测试样本数据对应的识别结果;
    基于所述识别结果对所述第一意图识别模型进行验证,判断是否验证通过;
    若验证通过,将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取所述敏感文本的第三数量;
    计算所述第三数量与所述第一数量的差值,得到第四数量;
    采用随机马赛克处理的方式对所述敏感文本进行处理,基于所述敏感文本 生成与所述第四数量相同的多个第一敏感文本;
    使用所述第一敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设文本,其中,所述预设文本为无意义的文本;
    使用所述预设文本对所述敏感文本进行拼接处理,得到拼接后的第二敏感文本;
    采用随机马赛克处理的方式对所述第二敏感文本进行处理,基于所述第二敏感文本生成与所述第四数量相同的多个第三敏感文本;
    使用所述第三敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  19. 根据权利要求17所述的计算机可读存储介质,其中,所述基于随机马赛克处理的方式,按照预设规则对所述敏感文本进行文本扩充处理,得到扩充后的敏感文本,以使所述扩充后的敏感文本的第一数量与所述正常文本的第二数量之间的比值等于预设比值的步骤,包括:
    获取预设敏感文本,其中,所述预设敏感文本为所有所述敏感文本中的任意一个文本;
    从所有所述敏感文本中筛选出与所述预设敏感文本具有相同的意图标签的同类敏感文本;
    使用所述同类敏感文本对所述预设敏感文本进行拼接处理,得到拼接后的第四敏感文本;
    采用随机马赛克处理的方式对所述第四敏感文本进行处理,基于所述第四敏感文本生成与所述第四数量相同的多个第五敏感文本;
    使用所述第五敏感文本对所述敏感文本进行扩充处理,得到所述扩充后的敏感文本。
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述将所述第一意图识别模型作为目标意图识别模型,以通过所述目标意图识别模型对新输入的客户对话文本数据进行意图识别的步骤之后,包括:
    获取用户在通话过程中输入的语音信息;
    将所述语音信息转换为对应的文本信息;
    对所述文本信息进行预处理,得到处理后的目标文本信息;
    获取与所述语音信息对应的上下文语音信息,并将所述上下文语音信息转换为对应的目标上下文文本信息;
    将所述目标文本信息与所述目标上下文文本信息输入至所述目标意图识别模型,基于所述目标意图识别模型对所述目标文本信息进行意图识别,获取与所述语音信息对应的目标意图识别结果;
    判断所述目标意图识别结果是否属于预设的敏感意图;
    若所述目标意图识别结果属于所述敏感意图,生成与所述目标意图识别结果对应的提醒信息。
PCT/CN2021/091710 2020-12-29 2021-04-30 意图识别模型的训练方法、装置、计算机设备和存储介质 WO2022142041A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011594565.9 2020-12-29
CN202011594565.9A CN112612894B (zh) 2020-12-29 2020-12-29 意图识别模型的训练方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022142041A1 true WO2022142041A1 (zh) 2022-07-07

Family

ID=75248862

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091710 WO2022142041A1 (zh) 2020-12-29 2021-04-30 意图识别模型的训练方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN112612894B (zh)
WO (1) WO2022142041A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115346306A (zh) * 2022-08-26 2022-11-15 中国银行股份有限公司 一种污损纸币识别方法及装置
CN116796290A (zh) * 2023-08-23 2023-09-22 江西尚通科技发展有限公司 一种对话意图识别方法、系统、计算机及存储介质
CN117094705A (zh) * 2023-10-19 2023-11-21 国网安徽省电力有限公司电力科学研究院 一种应用于高压开关柜缺陷预测的方法、系统及设备
CN117609462A (zh) * 2023-11-29 2024-02-27 广州方舟信息科技有限公司 药品问答方法、药品问答机器人、电子设备和存储介质
CN117932005A (zh) * 2024-03-21 2024-04-26 成都市技师学院(成都工贸职业技术学院、成都市高级技工学校、成都铁路工程学校) 一种基于人工智能的语音交互方法
CN117932005B (zh) * 2024-03-21 2024-06-04 成都市技师学院(成都工贸职业技术学院、成都市高级技工学校、成都铁路工程学校) 一种基于人工智能的语音交互方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612894B (zh) * 2020-12-29 2022-03-18 平安科技(深圳)有限公司 意图识别模型的训练方法、装置、计算机设备和存储介质
CN113076080B (zh) * 2021-04-21 2022-05-17 百度在线网络技术(北京)有限公司 模型训练方法和装置、意图识别方法和装置
CN113268593A (zh) * 2021-05-18 2021-08-17 Oppo广东移动通信有限公司 意图分类和模型的训练方法、装置、终端及存储介质
CN113407922B (zh) * 2021-07-14 2022-06-03 上海万向区块链股份公司 基于区块链技术的智能意图识别分析系统及方法
CN113742399B (zh) * 2021-09-07 2023-10-17 天之翼(苏州)科技有限公司 基于云边协同的数据溯源方法及系统
CN113987569A (zh) * 2021-10-14 2022-01-28 武汉联影医疗科技有限公司 反爬虫方法、装置、计算机设备和存储介质
CN115033676B (zh) * 2022-06-22 2024-04-26 支付宝(杭州)信息技术有限公司 一种意图识别模型训练及用户意图识别方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175608A (zh) * 2019-04-16 2019-08-27 中国平安财产保险股份有限公司 一种保险理赔附件处理方法及装置
CN111324727A (zh) * 2020-02-19 2020-06-23 百度在线网络技术(北京)有限公司 用户意图识别方法、装置、设备和可读存储介质
CN111401037A (zh) * 2020-06-05 2020-07-10 平安国际智慧城市科技股份有限公司 自然语言的生成方法、装置、电子设备及存储介质
CN111783434A (zh) * 2020-07-10 2020-10-16 苏州思必驰信息科技有限公司 提升回复生成模型抗噪能力的方法及系统
CN112612894A (zh) * 2020-12-29 2021-04-06 平安科技(深圳)有限公司 意图识别模型的训练方法、装置、计算机设备和存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106897459A (zh) * 2016-12-14 2017-06-27 中国电子科技集团公司第三十研究所 一种基于半监督学习的文本敏感信息识别方法
CN109003624B (zh) * 2018-06-29 2022-02-15 北京百度网讯科技有限公司 情绪识别方法、装置、计算机设备及存储介质
CN111368535B (zh) * 2018-12-26 2024-01-16 珠海金山数字网络科技有限公司 一种敏感词识别方法、装置及设备
CN110472224B (zh) * 2019-06-24 2023-07-07 深圳追一科技有限公司 服务质量的检测方法、装置、计算机设备和存储介质
KR20190107289A (ko) * 2019-08-30 2019-09-19 엘지전자 주식회사 인공지능 로봇 및 인공지능 로봇의 음성인식 방법
CN110807388B (zh) * 2019-10-25 2021-06-08 深圳追一科技有限公司 交互方法、装置、终端设备及存储介质
CN111161740A (zh) * 2019-12-31 2020-05-15 中国建设银行股份有限公司 意图识别模型训练方法、意图识别方法以及相关装置
CN111400495A (zh) * 2020-03-17 2020-07-10 重庆邮电大学 一种基于模板特征的视频弹幕消费意图识别方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175608A (zh) * 2019-04-16 2019-08-27 中国平安财产保险股份有限公司 一种保险理赔附件处理方法及装置
CN111324727A (zh) * 2020-02-19 2020-06-23 百度在线网络技术(北京)有限公司 用户意图识别方法、装置、设备和可读存储介质
CN111401037A (zh) * 2020-06-05 2020-07-10 平安国际智慧城市科技股份有限公司 自然语言的生成方法、装置、电子设备及存储介质
CN111783434A (zh) * 2020-07-10 2020-10-16 苏州思必驰信息科技有限公司 提升回复生成模型抗噪能力的方法及系统
CN112612894A (zh) * 2020-12-29 2021-04-06 平安科技(深圳)有限公司 意图识别模型的训练方法、装置、计算机设备和存储介质

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115346306A (zh) * 2022-08-26 2022-11-15 中国银行股份有限公司 一种污损纸币识别方法及装置
CN115346306B (zh) * 2022-08-26 2024-06-11 中国银行股份有限公司 一种污损纸币识别方法及装置
CN116796290A (zh) * 2023-08-23 2023-09-22 江西尚通科技发展有限公司 一种对话意图识别方法、系统、计算机及存储介质
CN116796290B (zh) * 2023-08-23 2024-03-29 江西尚通科技发展有限公司 一种对话意图识别方法、系统、计算机及存储介质
CN117094705A (zh) * 2023-10-19 2023-11-21 国网安徽省电力有限公司电力科学研究院 一种应用于高压开关柜缺陷预测的方法、系统及设备
CN117094705B (zh) * 2023-10-19 2024-01-02 国网安徽省电力有限公司电力科学研究院 一种应用于高压开关柜缺陷预测的方法、系统及设备
CN117609462A (zh) * 2023-11-29 2024-02-27 广州方舟信息科技有限公司 药品问答方法、药品问答机器人、电子设备和存储介质
CN117932005A (zh) * 2024-03-21 2024-04-26 成都市技师学院(成都工贸职业技术学院、成都市高级技工学校、成都铁路工程学校) 一种基于人工智能的语音交互方法
CN117932005B (zh) * 2024-03-21 2024-06-04 成都市技师学院(成都工贸职业技术学院、成都市高级技工学校、成都铁路工程学校) 一种基于人工智能的语音交互方法

Also Published As

Publication number Publication date
CN112612894A (zh) 2021-04-06
CN112612894B (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
WO2022142041A1 (zh) 意图识别模型的训练方法、装置、计算机设备和存储介质
CN109033305B (zh) 问题回答方法、设备及计算机可读存储介质
CN111062217B (zh) 语言信息的处理方法、装置、存储介质及电子设备
CN112528637B (zh) 文本处理模型训练方法、装置、计算机设备和存储介质
CN113094578B (zh) 基于深度学习的内容推荐方法、装置、设备及存储介质
CN113297366B (zh) 多轮对话的情绪识别模型训练方法、装置、设备及介质
CN116543404A (zh) 基于单元格坐标优化的表格语义信息抽取方法、系统、设备及介质
CN114120978A (zh) 情绪识别模型训练、语音交互方法、装置、设备及介质
CN113486178B (zh) 文本识别模型训练方法、文本识别方法、装置以及介质
CN113672731B (zh) 基于领域信息的情感分析方法、装置、设备及存储介质
CN115759119B (zh) 一种金融文本情感分析方法、系统、介质和设备
CN115687934A (zh) 意图识别方法、装置、计算机设备及存储介质
CN113723070A (zh) 文本相似度模型训练方法、文本相似度检测方法及装置
CN111368066B (zh) 获取对话摘要的方法、装置和计算机可读存储介质
CN115017879A (zh) 文本对比方法、计算机设备及计算机存储介质
CN113239694B (zh) 一种基于论元短语的论元角色识别的方法
CN112613293B (zh) 摘要生成方法、装置、电子设备及存储介质
CN112632956A (zh) 文本匹配方法、装置、终端和存储介质
CN112559725A (zh) 文本匹配方法、装置、终端和存储介质
CN111400340A (zh) 一种自然语言处理方法、装置、计算机设备和存储介质
CN115270818A (zh) 一种意图识别方法及装置、存储介质、计算机设备
CN115688789A (zh) 一种基于动态标签的实体关系抽取模型训练方法及系统
CN112434133B (zh) 一种意图分类方法、装置、智能终端及存储介质
CN116975298B (zh) 一种基于nlp的现代化社会治理调度系统及方法
CN115600580B (zh) 文本匹配方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21912803

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21912803

Country of ref document: EP

Kind code of ref document: A1