A data processing method and device

Through automatic screening and predicted intent classification, the problems of low manual annotation efficiency and low accuracy in the existing technology are solved, efficient and accurate intent classification annotation is achieved, and labor costs are reduced.

CN114817530BActive Publication Date: 2024-08-27阿里巴巴(中国)网络技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210353788.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-02
Publication Date
2024-08-27
Estimated Expiration
2042-04-02

AI Technical Summary

Technical Problem

When training demand classification models, the existing technology requires a large amount of manual annotation of sample text, resulting in low efficiency, low accuracy and high labor costs. Especially when processing complex and extensive communication records between customers and data service platforms, it is difficult to accurately obtain customers. need.

Method used

By obtaining the intent tags of intent classification and vocabulary in the text, and using semantic correlation and contextual relationships, we can automatically filter and predict intent classification, reduce manual participation, and improve annotation efficiency and accuracy.

Benefits of technology

It realizes automated intent classification, reduces labor costs, improves labeling efficiency and accuracy, and can quickly obtain intent classification labels for a large number of training texts before training the model, reducing the burden of manual analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114817530B
    Figure CN114817530B
Patent Text Reader

Abstract

The present application provides a data processing method and device. According to the semantic relationship and contextual relationship between words in a text including an intent label corresponding to an intent classification, the first word semantically related to the intent label corresponding to the intent classification can be accurately obtained, thereby obtaining the candidate word corresponding to the intent classification. If you want to obtain the intent classification of a text afterwards, you can obtain the intent classification embodied in the text based on the semantic relationship or contextual relationship between words in the text and the candidate words corresponding to each intent classification. It can be seen that the intent classification embodied in the text can be obtained automatically without human intervention, because the intent classification embodied in the text is obtained by means of the semantic relationship or contextual relationship between words in the text and the candidate words corresponding to each intent classification, which can improve the efficiency and accuracy of the intent classification embodied in the text, and can reduce labor costs, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method and device. Background Art

[0002] At present, there are more and more data service platforms on the Internet. Data service platforms can provide data services to customers. For example, shopping platforms provide shopping services to shoppers, game platforms provide game services to players, and chat platforms provide chat services to chat players. In order to better provide data services to customers and improve the competitiveness of data service platforms, customer needs can be collected to provide data services to customers in a targeted manner based on their needs, so as to meet customers' core needs as much as possible while providing data services to customers, so as to increase customers' stickiness to data service platforms. Summary of the invention

[0003] The present application shows a data processing method and device.

[0004] In a first aspect, the present application provides a data processing method, the method comprising:

[0005] Obtaining intent labels corresponding to a plurality of intent categories respectively, and obtaining a plurality of texts, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories;

[0006] For any one of the multiple intent classifications, a text including an intent label corresponding to the intent classification is screened from multiple texts, a first word semantically related to the intent label corresponding to the intent classification is predicted based on words in the screened text except for the intent label corresponding to the intent classification, and a candidate word corresponding to the intent classification is obtained based on the first word semantically related to the intent label corresponding to the intent classification;

[0007] For any one of multiple texts and any one of the words in the text, a second word semantically related to the word is predicted based on words in the text other than the word, and the intent classification embodied in the text is obtained based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

[0008] In an optional implementation, obtaining the intent labels corresponding to the plurality of intent categories respectively includes:

[0009] Acquire multiple scene vocabulary related to target scenes involved in multiple intent classifications;

[0010] For any one of the multiple intent categories, when there is only one keyword annotating the intent category, at least one scene word whose semantic similarity with the keyword annotating the intent category is greater than a preset similarity is selected from the multiple scene words; and the intent label corresponding to the intent category is obtained based on at least the selected at least one scene word;

[0011] Alternatively, when there are at least two keywords that annotate the intent classification, at least one scene vocabulary is screened from multiple scene vocabularies, the average semantic similarity between the at least two keywords that annotate the intent classification is greater than a preset similarity, and the intent label corresponding to the intent classification is obtained based on at least the screened at least one scene vocabulary.

[0012] In an optional implementation, there are at least two first words semantically related to the intent label corresponding to the intent classification;

[0013] The acquiring the candidate word corresponding to the intent classification according to the first vocabulary semantically related to the intent label corresponding to the intent classification includes:

[0014] Counting the first occurrence frequencies of each first word semantically related to the intent label corresponding to the intent classification in the text including the intent label corresponding to the intent classification;

[0015] Among the first words semantically related to the intent label corresponding to the intent classification, select at least one first word in descending order of first occurrence frequency;

[0016] According to the selected at least one first word, candidate words corresponding to the intention classification are obtained.

[0017] In an optional implementation, the step of obtaining a candidate word corresponding to the intention classification according to the selected at least one first word includes:

[0018] Eliminate, from the selected at least one first word, first words that appear in candidate words corresponding to intent categories other than the intent category in multiple intent categories;

[0019] According to the remaining first words in the selected at least one first word, candidate words corresponding to the intention classification are obtained.

[0020] In an optional implementation, the step of eliminating, from the selected at least one first vocabulary, first vocabulary appearing in candidate words corresponding to intent categories other than the intent category in multiple intent categories, includes:

[0021] For any one of the at least one selected first vocabulary, obtaining the prominence of the first vocabulary in a text including an intent label corresponding to the intent classification;

[0022] When the significance is less than the preset significance, the first word is eliminated from the selected at least one first word.

[0023] In an optional implementation, obtaining the prominence of the first vocabulary in the text including the intent label corresponding to the intent classification includes:

[0024] Counting the second occurrence frequency of the first word in the text including the intent label corresponding to each intent classification other than the intent classification in the plurality of intent classifications;

[0025] The significance is calculated according to the first occurrence frequency and the second occurrence frequency.

[0026] In an optional implementation, calculating the significance according to the first occurrence frequency and the second occurrence frequency includes:

[0027] According to the first occurrence frequency and the second occurrence frequency, calculating the expectation between the occurrence frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification, and calculating the variance between the second occurrence frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification other than the intent classification in the plurality of intent classifications;

[0028] The significance is calculated according to the expectation, the variance, and the first occurrence frequency.

[0029] In an optional implementation, calculating the significance according to the expectation, the variance, and the first occurrence frequency includes:

[0030] Calculating the difference between the first occurrence frequency and the expectation;

[0031] calculating a ratio between the difference and the variance;

[0032] The significance is obtained according to the ratio.

[0033] In an optional implementation, predicting a first vocabulary semantically related to the intent label corresponding to the intent classification based on the vocabulary in the filtered text other than the intent label corresponding to the intent classification includes:

[0034] Determining a target scenario involved in the intent classification;

[0035] Among the prediction models applicable to different scenarios, obtain a prediction model applicable to the target scenario;

[0036] The vocabulary included in the filtered text except the intent label corresponding to the intent classification is input into the prediction model applicable to the target scenario, so that the prediction model applicable to the target scenario processes the vocabulary included in the filtered text except the intent label corresponding to the intent classification to obtain the first vocabulary semantically related to the intent label corresponding to the intent classification.

[0037] In an optional implementation, the prediction model suitable for the target scenario is obtained by optimizing the initial prediction model based on the text generated in the target scenario, and the initial prediction model is trained based on the text generated in each scenario.

[0038] In an optional implementation, the step of obtaining the intent classification embodied in the text according to the second words semantically related to the words in the text and the candidate words corresponding to the intent classifications includes:

[0039] Determine the number of identical words between the candidate words corresponding to each intent classification and the second word;

[0040] According to the intention classification in which the number of identical words between the corresponding candidate word and the second word is greater than a preset number, the intention classification embodied in the text is obtained.

[0041] In a second aspect, the present application shows a structural block diagram of a data processing device, the device comprising:

[0042] A first acquisition module is used to acquire intent labels corresponding to a plurality of intent categories respectively, and a second acquisition module is used to acquire a plurality of texts, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories;

[0043] A screening module, for screening texts including an intent label corresponding to any one of a plurality of intent categories from a plurality of texts, a first prediction module, for predicting a first vocabulary semantically related to the intent label corresponding to the intent category based on vocabulary in the screened texts other than the intent label corresponding to the intent category, and a third acquisition module, for acquiring a candidate word corresponding to the intent category based on the first vocabulary semantically related to the intent label corresponding to the intent category;

[0044] The second prediction module is used to predict, for any one of multiple texts and for any one word in the text, a second word semantically related to the word based on words other than the word in the text; and the fourth acquisition module is used to acquire the intent classification embodied in the text based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

[0045] In an optional implementation, the first acquisition module includes:

[0046] A first acquisition submodule is used to acquire multiple scene words related to target scenes involved in multiple intent classifications;

[0047] A second acquisition submodule is used for, for any one of the multiple intent categories, when there is one keyword annotating the intent category, screening at least one scene vocabulary from multiple scene vocabularies, the semantic similarity between which and the keyword annotating the intent category is greater than a preset similarity; obtaining the intent label corresponding to the intent category based on at least the screened at least one scene vocabulary; or, when there are at least two keywords annotating the intent category, screening at least one scene vocabulary from multiple scene vocabularies, the average semantic similarity between which and at least two keywords annotating the intent category is greater than a preset similarity, and obtaining the intent label corresponding to the intent category based on at least the screened at least one scene vocabulary.

[0048] In an optional implementation, there are at least two first words semantically related to the intent label corresponding to the intent classification;

[0049] The third acquisition module includes:

[0050] A statistical submodule, used for counting the first occurrence frequencies of each first word semantically related to the intent label corresponding to the intent classification in the text including the intent label corresponding to the intent classification;

[0051] A selection submodule, configured to select at least one first word from among the first words semantically related to the intent label corresponding to the intent classification, in descending order of first occurrence frequency;

[0052] The third acquisition submodule is used to acquire candidate words corresponding to the intention classification according to the selected at least one first word.

[0053] In an optional implementation, the third acquisition submodule includes:

[0054] a removing unit, configured to remove, from the selected at least one first word, first words that appear in candidate words corresponding to intent categories other than the intent category in a plurality of intent categories;

[0055] An acquisition unit is used to acquire candidate words corresponding to the intention classification according to the remaining first words in the selected at least one first word.

[0056] In an optional implementation, the elimination unit includes:

[0057] an acquisition subunit, configured to acquire, for any one of the selected at least one first vocabulary, the prominence of the first vocabulary in a text including an intent label corresponding to the intent classification;

[0058] The elimination subunit is used to eliminate the first word from the at least one selected first word when the significance is less than a preset significance.

[0059] In an optional implementation, the acquisition subunit is specifically used to: count the second occurrence frequency of the first word in the text of the intent label corresponding to each intent classification other than the intent classification in multiple intent classifications; calculate the significance based on the first occurrence frequency and the second occurrence frequency.

[0060] In an optional implementation, the acquisition subunit is specifically used to: calculate the expectation between the appearance frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification according to the first appearance frequency and the second appearance frequency, and calculate the variance between the second appearance frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification other than the intent classification in multiple intent classifications;

[0061] The significance is calculated according to the expectation, the variance, and the first occurrence frequency.

[0062] In an optional implementation, the acquisition subunit is specifically used to: calculate the difference between the first occurrence frequency and the expectation; calculate the ratio between the difference and the variance; and acquire the significance according to the ratio.

[0063] In an optional implementation, the first prediction module includes:

[0064] A first determination submodule, used to determine a target scenario involved in the intention classification;

[0065] A fourth acquisition submodule is used to acquire a prediction model applicable to a target scenario from prediction models applicable to different scenarios;

[0066] An input submodule is used to input the vocabulary in the filtered text except the intent label corresponding to the intent classification into a prediction model applicable to the target scenario, so that the prediction model applicable to the target scenario processes the vocabulary in the filtered text except the intent label corresponding to the intent classification to obtain a first vocabulary that is semantically related to the intent label corresponding to the intent classification.

[0067] In an optional implementation, the prediction model suitable for the target scenario is obtained by optimizing the initial prediction model based on the text generated in the target scenario, and the initial prediction model is trained based on the text generated in each scenario.

[0068] In an optional implementation, the fourth acquisition module includes:

[0069] A second determination submodule is used to determine the number of identical words between the candidate words corresponding to each intention classification and the second words;

[0070] The fifth acquisition submodule is used to acquire the intent classification embodied in the text according to the intent classification in which the number of identical words between the corresponding candidate word and the second word is greater than a preset number.

[0071] In a third aspect, the present application shows an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the method shown in any of the aforementioned aspects.

[0072] In a fourth aspect, the present application shows a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a method as shown in any of the aforementioned aspects.

[0073] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform a method as shown in any of the aforementioned aspects.

[0074] Compared with the prior art, this application has the following advantages:

[0075] In the present application, intent labels corresponding to multiple intent classifications are obtained. Also, multiple texts are obtained, wherein the texts include multiple words, and the multiple words included in the texts include an intent label corresponding to one of the intent classifications. For any one of the multiple intent classifications, the texts including the intent label corresponding to the intent classification are screened out from multiple texts, and then, based on the words in the screened texts except the intent label corresponding to the intent classification, the first words semantically related to the intent label corresponding to the intent classification are predicted, and the candidate words corresponding to the intent classification are obtained based on the first words semantically related to the intent label corresponding to the intent classification. For any one of the multiple texts, for any word in the text, based on the words in the text except the word, a second word semantically related to the word is predicted. Based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification, the intent classification embodied in the text is obtained.

[0076] In the present application, according to the semantic relationship and contextual relationship between the words in the text including the intent label corresponding to the intent classification, the first word semantically related to the intent label corresponding to the intent classification can be accurately obtained, and then the candidate words corresponding to the intent classification (which can be multiple, etc.) can be accurately obtained. The candidate words corresponding to the intent classification can reflect the main purpose of the intent classification, etc. Later, when it is necessary to obtain the intent classification of a text, the intent classification embodied in the text can be obtained according to the semantic relationship or contextual relationship between the words in this text and the candidate words corresponding to each intent classification. In this way, through this application, the intent classification embodied in the text can be automatically obtained without manual participation, and because the intent classification embodied in the text is obtained by means of the semantic relationship or contextual relationship between the words in the text and the candidate words corresponding to each intent classification, the efficiency and accuracy of the intent classification embodied in the text can be improved, and the labor cost can be reduced.

[0077] For example, in a scenario where a large amount of training texts need to be annotated with intent classifications before training the model, the efficiency and accuracy of the intent classification embodied in the annotated texts can be improved and labor costs can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 It is a step flow chart of a data processing method of the present application.

[0079] Figure 2 It is a structural block diagram of a data processing device of the present application.

[0080] Figure 3 It is a structural block diagram of a device of the present application. DETAILED DESCRIPTION

[0081] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0082] The inventors have found that in many cases, when customers encounter problems, they will communicate with the staff of the data service platform through voice or text to solve the customer's problem (meet the customer's needs) through communication.

[0083] In this way, the inventor collected the historical communication records between the majority of customers and the staff of the data service platform, and conducted a large amount of statistical analysis on the historical communication records between the majority of customers and the staff of the data service platform, and found that the content of the historical communication records between customers and the staff of the data service platform often contains the needs of customers.

[0084] In view of this, in order to obtain the needs of customers, the inventors have thought of obtaining the needs of customers based on the historical communication records between customers and the staff of the data service platform.

[0085] In order to obtain the customer's needs based on the historical communication records between the customer and the staff of the data service platform, the inventor has come up with a method in which a model can be used to obtain the customer's needs based on the historical communication records between the customer and the staff of the data service platform.

[0086] For example, when it is necessary to obtain customer needs, if the historical communication records between the customer and the staff of the data service platform are in the form of text, the historical communication records between the customer and the staff of the data service platform can be input into the demand classification model, so that the demand classification model processes the historical communication records between the customer and the staff of the data service platform, obtains the customer's needs, and outputs the customer's needs, thereby achieving the goal of obtaining the customer's needs.

[0087] However, in the above method, since a demand classification model needs to be used, the demand classification model needs to be trained in advance.

[0088] In the scenario of training a classification model, a supervised training method can be used to train the classification model. In view of this, when training a demand classification model, a supervised training method is often used to train the demand classification model.

[0089] Among them, the inventors found that if a supervised training method is needed to train the demand classification model, a large amount of sample texts (including historical communication records between customers and staff of the data service platform, etc.) need to be collected, and the sample texts need to be annotated to obtain the customer needs reflected in the content of the sample texts. Then, a large amount of sample texts and the customer needs reflected in the content of each annotated sample text are used to train the demand classification model.

[0090] The inventor discovered that the historical communication records between customers and the staff of the data service platform are stored by the data service platform during the historical process of communication between the customers and the staff of the data service platform. In this way, the historical communication records between customers and the staff of the data service platform can be directly obtained from the data service platform.

[0091] However, sample text annotation is often performed manually. In the scenario of manual sample text annotation, it is often necessary to manually browse all the content in the sample text and manually analyze all the content in the sample text to obtain the customer's needs reflected in the content of the sample text, and annotate the sample text according to the customer's needs reflected in the content of the sample text.

[0092] However, after the inventors conducted a statistical analysis on the current status of the results of “manual annotation of sample texts”, they found that the efficiency and accuracy of the annotation of sample texts are low and the labor cost is high.

[0093] Thus, there is a need to improve the efficiency and accuracy of sample text annotation and reduce labor costs when sample text annotation is required.

[0094] In order to achieve the purpose of "improving the efficiency and accuracy of sample text annotation and reducing labor costs when sample text annotation is required", the inventors analyzed the reasons for the low efficiency and accuracy of the current situation of "manual annotation of sample text" and the high labor costs, and found that:

[0095] On the one hand, since the training demand classification model requires a large amount of sample text, the number of sample texts that need to be labeled is often very large. When the number of sample texts that need to be labeled is very large, the workload of manually labeling a large amount of sample texts is very large, resulting in high labor costs.

[0096] On the other hand, with regard to "manual analysis of all the content in the sample text", the inventor conducted a statistical analysis of the content in the historical communication records between the majority of customers and the staff of the data service platform and found that: in the historical communication records between a customer and the staff of the data service platform, there are a lot of conversations, such as a lot of texts, and the scope / scenes involved in the conversations are usually wide and complex (for example, in the case of shopping / sales / e-commerce, the scope / scenes involved in the conversations are wide and complex, etc.). This makes it difficult to manually analyze all the content in the sample text, which indirectly leads to a low accuracy rate in the annotation of the sample text.

[0097] On the other hand, often only a very small part of the conversation content reflects the customer's needs. That is, the historical communication records between the customer and the staff of the data service platform often reflect the customer's needs very little. That is, the historical communication records between the customer and the staff of the data service platform are very sparse about the customer's intentions, which makes it difficult to search for customer needs after manually analyzing all the content in the sample text and the search takes a long time, resulting in low efficiency in labeling the sample text.

[0098] In view of the above analysis, the inventors found that the labor cost of annotating sample texts is high because of the manual participation in the annotation. If there is no manual participation in the annotation of sample texts, the labor cost can be reduced. However, it is required to improve the efficiency and accuracy of annotation when there is no manual participation in the annotation of sample texts.

[0099] In order to improve the efficiency and accuracy of annotation without human intervention when annotating sample texts, now that a large amount of sample texts have been collected (including historical communication records between customers and staff of the data service platform, etc.), annotation can be carried out using the following methods.

[0100] Specifically, see Figure 1 , shows a data processing method of the present application, which is applied to electronic devices (including data service platforms, etc., and may also include devices held by customers, etc.), and the method includes:

[0101] In step S101, the intent labels corresponding to the plurality of intent categories are obtained, and a plurality of texts are obtained, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories.

[0102] The multiple texts may be pre-stored in the electronic device, and the content in the texts may reflect the customer's intention classification.

[0103] Intent classification may include: operation-related intentions, inventory-related intentions, customization-related intentions, inquiry-related intentions, store opening-related intentions, complaint-related intentions, and refund-related intentions, etc. This application does not limit the types and quantities of intent classifications, which may be determined based on actual conditions.

[0104] The multiple texts may be pre-stored in the electronic device or in the cloud, and the electronic device may directly obtain the multiple texts pre-stored locally or in the cloud.

[0105] In one example, the multiple texts may be texts that appear in actual events during the historical process, for example, historical communication records between the client and the staff of the data service platform during the historical process, etc. For any client, at least part of the content in the historical communication records between the client and the staff of the data service platform during the historical process may be used as a text, etc. The same is true for each other client.

[0106] The intent tag may be embodied in words, etc. The subject of the intent tag corresponding to an intent classification is related to the intent classification, for example, the intent classification may be embodied.

[0107] For example, the intent tags corresponding to operation-related intents may include: "operation", "marketing", "management" and "operation", etc. The intent tags "operation", "marketing", "management" and "operation" can reflect the main purpose of the operation-related intents.

[0108] In the present application, multiple intent classifications may be set in advance. For example, the intent classification may be annotated with at least one keyword to achieve the setting of the intent classification. The keywords for annotating the intent classification may be manually set, etc.

[0109] For example, keywords for operation-related intents may include "operation" etc., keywords for inventory-related intents may include "inventory", keywords for customization-related intents may include "customization" etc., keywords for inquiry-related intents may include "inquiry" etc., keywords for store opening-related intents may include "store opening" etc., keywords for complaint-related intents may include "complaint" etc., and keywords for refund-related intents may include "refund" etc.

[0110] Since the keywords that annotate the intent classification are also words, for any intent classification, the keywords that annotate the intent classification can be used as the intent label of the intent classification.

[0111] In step S102, for any one of the multiple intent classifications, texts including the intent label corresponding to the intent classification are screened from multiple texts, and then the first vocabulary semantically related to the intent label corresponding to the intent classification is predicted based on the vocabulary in the screened text except the intent label corresponding to the intent classification, and the candidate word corresponding to the intent classification is obtained based on the first vocabulary semantically related to the intent label corresponding to the intent classification.

[0112] The same is done for each other intent classification in the multiple intent classifications, thereby obtaining candidate words corresponding to each intent classification.

[0113] In one embodiment, when filtering texts including the intent label corresponding to the intent classification from multiple texts, for any one of the multiple texts, it can be determined whether the intent label corresponding to the intent classification exists in the vocabulary included in the text. If the intent label corresponding to the intent classification exists in the vocabulary included in the text, the text is filtered. If the intent label corresponding to the intent classification does not exist in the vocabulary included in the text, the text is not filtered. The same is true for each of the other texts in the multiple texts, thereby filtering out the text including the intent label corresponding to the intent classification from the multiple texts.

[0114] In another embodiment, when predicting a first word semantically related to the intent label corresponding to the intent classification based on words in the filtered text except the intent label corresponding to the intent classification, the intent label corresponding to the intent classification can be deleted from the filtered text to obtain words including the filtered text except the intent label corresponding to the intent classification (the relative position order between the words in the filtered text except the intent label corresponding to the intent classification is the same as the relative position order between these words in the filtered text), or, a preset identifier is used to replace the intent label corresponding to the intent classification in the filtered text to obtain words including the filtered text except the intent label corresponding to the intent classification.

[0115] Among them, the preset identifier may include "*", "#" or "@", etc., which can be determined according to actual conditions and is not limited in this application.

[0116] Then, the vocabulary in the filtered text except the intent label corresponding to the intent classification is input into the prediction model of the entire scene (involving multiple different scenes), so that the initial prediction model processes the vocabulary in the filtered text except the intent label corresponding to the intent classification, and obtains the first vocabulary semantically related to the intent label corresponding to the intent classification.

[0117] The initial prediction model may be a prediction model trained in advance, a prediction model trained in advance by the user, or a model trained in advance with the help of a third-party platform.

[0118] The initial prediction model can be trained based on a large amount of training texts, which include training texts related to various scenarios. The training texts related to various scenarios can be understood as: texts actually generated in various scenarios in the historical process, etc.

[0119] A large amount of training texts involving various scenarios can be used to train the model (this application does not limit the specific training method) to obtain an initial prediction model (prediction model for all scenarios). The "model" during model training can include the Wo-BERT model, etc.

[0120] In one example, for any one of a large number of training texts involving various scenarios, the training text can be segmented to obtain each word in the training text. For any word in the training text, the words other than the word in the training text can be obtained, and the words other than the word in the training text and the word form training data, wherein the words other than the word in the training text in the training data are training samples, and the word is annotated data. The same is true for each word in the training text, thereby obtaining multiple training data corresponding to the training text.

[0121] The same is true for each other training text in the large number of training texts related to various scenarios, so that each training text corresponds to a plurality of training data.

[0122] In this way, the model can be trained using multiple training data corresponding to each training text until the parameters in the model converge, thereby obtaining an initial prediction model.

[0123] For example, the initial prediction model can learn the semantic relationship and contextual relationship between "one of the words in the training text" and "words other than this word in the training text", so that the initial prediction model can predict the word in the text based on the words other than this word in the text, or predict the words in the text that are semantically related to this word, etc.

[0124] The semantic relevance between two words can be understood as: the semantic similarity between the two words is greater than a preset similarity. The preset similarity can be determined according to actual conditions, and this application does not impose any limitation on this.

[0125] The semantic similarity is determined by the Euclidean distance between the vectors of the words, etc., and the present application does not limit the method for determining the semantic similarity.

[0126] The functions of the initial prediction model include: for a text, based on the words included in the text except one of the words in the text, predicting the words semantically related to the word (for example, words that may appear in the position of the word in the text, etc.).

[0127] In one example, the scenarios may include sales scenarios, game scenarios, live broadcast scenarios, teaching scenarios, and sports scenarios, etc.

[0128] However, since the initial prediction model is trained based on a large amount of training texts involving various scenarios, the prediction model has a prediction effect on the texts involving various scenarios, but the prediction effect on the texts involving a certain scenario is not very prominent.

[0129] In a possible case, for a data service platform involving an electronic device, sometimes the data services it provides do not involve all scenarios, but only involve some scenarios. In a possible example, it only involves one scenario.

[0130] Thus, for certain scenarios, the prediction effect of using the initial prediction model is not very prominent.

[0131] For example, according to words other than one word included in a text related to a specific scene, the accuracy of words semantically related to the one word predicted using an initial prediction model is not very prominent.

[0132] In this way, in order to improve the accuracy of predicting words semantically related to a word based on words other than one word in a text involving a specific scenario, in another embodiment of the present application, a prediction model suitable for scenarios involving different intent classifications can be trained in advance.

[0133] For example, for any intent classification, the initial prediction model (prediction model for the entire scene) can be optimized based on the training text generated in the scene involved in the intent classification (the optimization method can refer to the method of training the initial prediction model mentioned above, which will not be described in detail here), and the prediction model suitable for the scene involved in the intent classification is obtained. The initial prediction model is trained based on the text generated in each scene. The same is true for each other intent classification.

[0134] The text generated in the scene involved in the intention classification includes: text that appears in events that actually occurred in the scene involved in the intention classification in the historical process, etc.

[0135] In this way, when it is necessary to predict the first vocabulary semantically related to the intent label corresponding to the intent classification based on the vocabulary in the filtered text except the intent label corresponding to the intent classification, the target scenario involved in the intent classification can be determined, and then, among the prediction models applicable to different scenarios, the prediction model applicable to the target scenario can be obtained, and then the vocabulary in the filtered text except the intent label corresponding to the intent classification can be input into the prediction model applicable to the target scenario, so that the prediction model applicable to the target scenario processes the vocabulary in the filtered text except the intent label corresponding to the intent classification to obtain the first vocabulary semantically related to the intent label corresponding to the intent classification.

[0136] The prediction model suitable for the target scenario is obtained by optimizing the initial prediction model based on the text generated in the target scenario. The initial prediction model is trained based on the text generated in each scenario.

[0137] In another embodiment of the present application, the text including the intent label corresponding to the intent classification may be one or at least two, etc. The first words semantically related to the intent label corresponding to the intent classification are at least two.

[0138] In this way, obtaining the candidate word corresponding to the intent classification according to the first vocabulary semantically related to the intent label corresponding to the intent classification can be achieved through the following process, including:

[0139] 1021. Count the first occurrence frequencies of each first word semantically related to the intent tag corresponding to the intent classification in the text including the intent tag corresponding to the intent classification.

[0140] For any first word that is semantically related to the intent label corresponding to the intent classification, the total number of times the first word appears in the text including the intent label corresponding to the intent classification can be counted and used as the first occurrence frequency of the first word in the text including the intent label corresponding to the intent classification, etc.

[0141] Alternatively, the total number of times the first word appears in the text that includes the intent label corresponding to the intent classification is counted, and the number of texts that include the first word in the text that includes the intent label corresponding to the intent classification is counted, and the ratio between the total number and the number is calculated and used as the first occurrence frequency of the first word in the text that includes the intent label corresponding to the intent classification, etc.

[0142] Alternatively, the total number of times the first word appears in the text that includes the intent label corresponding to the intent classification is counted, and the number of texts that include the intent label corresponding to the intent classification is counted, and the ratio between the total number and the number is calculated and used as the first occurrence frequency of the first word in the text that includes the intent label corresponding to the intent classification, etc.

[0143] The same is true for each first word in other graphs that are semantically related to the intent label corresponding to the intent classification.

[0144] 1022. Select at least one first word from among the first words semantically related to the intent label corresponding to the intent classification in descending order of first occurrence frequency.

[0145] In one example, a specific number may be set in advance, so that a specific number of first words may be selected from the semantically related first words of the intent label corresponding to the intent classification in descending order of first occurrence frequency.

[0146] The specific quantity may include 10, 20 or 50, etc., which can be determined according to actual conditions and will not be described in detail here.

[0147] 1023. Obtain candidate words corresponding to the intention classification according to the selected at least one first word.

[0148] In one embodiment of the present application, this step can be implemented through the following process, including:

[0149] 11) Among the at least one selected first word, first words that appear in candidate words corresponding to intent categories other than the intent category among multiple intent categories are eliminated.

[0150] In the present application, for any one of the at least one selected first vocabulary, the prominence of the first vocabulary in the text including the intent label corresponding to the intent classification can be obtained.

[0151] If the significance of the first word in the text including the intent label corresponding to the intent classification is greater than or equal to a preset significance, the first word is retained.

[0152] Alternatively, when the significance of the first word in the text including the intent label corresponding to the intent classification is less than a preset significance, the first word is eliminated from the at least one selected first word.

[0153] Among them, the preset significance may include 15, 16 or 17, etc., which can be determined according to actual conditions and is not limited in this application.

[0154] 12) According to the remaining first words in the selected at least one first word, candidate words corresponding to the intention classification are obtained.

[0155] For example, the remaining first words in the selected at least one first word may be used as candidate words corresponding to the intention classification, etc.

[0156] In another embodiment of the present application, obtaining the significance of the first word in the text including the intent label corresponding to the intent classification may be achieved through the following process, including:

[0157] 21) Counting the second occurrence frequency of the first word in the text including the intent label corresponding to each intent classification other than the intent classification in the plurality of intent classifications.

[0158] For example, remove the intent classification from multiple intent classifications, and for any of the remaining intent classifications, count the second occurrence frequency of the first word in the text of the intent label corresponding to the any intent classification. The same is true for each of the remaining intent classifications. Thus, multiple second occurrence frequencies are obtained, and each second occurrence frequency corresponds to a different intent classification in the remaining intent classifications.

[0159] For example, assuming that multiple intent classifications include intent classification A, intent classification B, intent classification C, and intent classification D, and assuming that the intent classification is intent classification A, then what is obtained is the first occurrence frequency of the first word in the text including the intent label corresponding to intent classification A, the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification B, the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification C, and the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification D.

[0160] 22) Calculate the significance of the first word in the text including the intent label corresponding to the intent classification according to the first occurrence frequency and the second occurrence frequency.

[0161] In the present application, the expectation of the occurrence frequency of the first word in the text including the intent label corresponding to each intent classification can be calculated based on the first occurrence frequency and the second occurrence frequency. For example, the sum of the first occurrence frequency and each second occurrence frequency can be calculated, and then the total number of the first occurrence frequency and each second occurrence frequency can be counted, and then the ratio between the sum and the total number can be calculated to obtain the expectation of the occurrence frequency of the first word in the text including the intent label corresponding to each intent classification.

[0162] For instance, in the above example, the sum of "the first occurrence frequency of the first word in the text including the intent label corresponding to intent classification A", "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification B", "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification C", and "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification D" can be calculated.

[0163] Since there is 1 first occurrence frequency and 3 second occurrence frequencies in "the first occurrence frequency of the first vocabulary in the text including the intent label corresponding to intent classification A", "the second occurrence frequency of the first vocabulary in the text including the intent label corresponding to intent classification B", "the second occurrence frequency of the first vocabulary in the text including the intent label corresponding to intent classification C", and "the second occurrence frequency of the first vocabulary in the text including the intent label corresponding to intent classification D", there are a total of 4 occurrence frequencies. Therefore, the ratio between the sum and the value 4 can be calculated as the expectation between the occurrence frequencies of the first vocabulary in the text including the intent labels corresponding to intent classifications A, B, C and D, respectively.

[0164] Furthermore, the variance of the second occurrence frequencies of the first word in the text including the intent labels corresponding to each of the other intent categories except the intent category in the plurality of intent categories may be calculated.

[0165] For example, the variance between "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification B", "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification C", and "the second occurrence frequency of the first word in the text including the intent label corresponding to intent classification D" can be calculated to obtain the variance between the second occurrence frequencies of the first word in the text including the intent labels corresponding to intent classifications B, C and D, respectively.

[0166] The specific calculation method of the variance can refer to the existing method, which will not be described in detail here.

[0167] Then, the significance of the first word in the text including the intent label corresponding to the intent classification may be calculated according to the expectation, the variance, and the first occurrence frequency.

[0168] For example, the difference between the first occurrence frequency and the expectation can be calculated, and then the ratio between the difference and the variance can be calculated, and then the significance of the first word in the text including the intent label corresponding to the intent classification can be obtained based on the ratio. For example, the ratio can be used as the significance of the first word in the text including the intent label corresponding to the intent classification, etc.

[0169] In step S103, for any one of the multiple texts and any one word in the text, a second word semantically related to the word is predicted based on words other than the word in the text. The intent classification embodied in the text is obtained based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

[0170] In this step, for any one of the multiple texts, for any word in the text, a second word semantically related to the word is predicted based on words other than the word in the text, and the same is true for each other word in the text, thereby predicting second words semantically related to each word in the text. Then, based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification, the intent classification embodied in the text is obtained.

[0171] In addition, the same is done for each other text in the multiple texts, thereby obtaining the intention classification embodied by each text in the multiple texts.

[0172] In one embodiment, the method of "predicting a second word semantically related to the word based on words other than the word in the text" can refer to the method of "predicting a first word semantically related to the intent label corresponding to the intent classification based on words other than the intent label corresponding to the intent classification in the filtered text" in step S102, which will not be described in detail here.

[0173] In another embodiment, obtaining the intent classification embodied in the text according to the second vocabulary semantically related to the vocabulary and the candidate words corresponding to each intent classification can be achieved through the following process, including:

[0174] 1031) Determine the number of identical words between the candidate words corresponding to each intent classification and the second word.

[0175] In one embodiment of the present application, for any one of the multiple intent classifications, there are often at least two candidate words corresponding to the intent classification, and there are often at least two second words obtained.

[0176] In this way, the number of overlapping words between the candidate word corresponding to the intention classification and the second vocabulary can be determined, that is, the number of identical words between the candidate word corresponding to the intention classification and the second vocabulary can be obtained.

[0177] The same is true for each of the other intent classifications in the plurality of intent classifications.

[0178] 1032) According to the intent classification in which the number of identical words between the corresponding candidate word and the second word is greater than a preset number, the intent classification embodied in the text is obtained.

[0179] The preset number may be set in advance, for example, 10, 15 or 20, etc., and may be specifically rated according to actual conditions, and this application does not impose any limitation on this.

[0180] In this step, among the number of identical words between the candidate words corresponding to each intention classification and the second vocabulary, a number greater than a preset number is selected. The selected number is the number of identical words between the candidate words corresponding to some intention classifications and the second vocabulary. The intention classification embodied in the text can be obtained based on these intention classifications. For example, these intention classifications can be used as the intention classification embodied in the text.

[0181] In the present application, intent labels corresponding to multiple intent classifications are obtained. Also, multiple texts are obtained, wherein the texts include multiple words, and the multiple words included in the texts include an intent label corresponding to one of the intent classifications. For any one of the multiple intent classifications, the texts including the intent label corresponding to the intent classification are screened out from multiple texts, and then, based on the words in the screened texts except the intent label corresponding to the intent classification, the first words semantically related to the intent label corresponding to the intent classification are predicted, and the candidate words corresponding to the intent classification are obtained based on the first words semantically related to the intent label corresponding to the intent classification. For any one of the multiple texts, for any word in the text, based on the words in the text except the word, a second word semantically related to the word is predicted. Based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification, the intent classification embodied in the text is obtained.

[0182] In the present application, according to the semantic relationship and contextual relationship between the words in the text including the intent label corresponding to the intent classification, the first word semantically related to the intent label corresponding to the intent classification can be accurately obtained, and then the candidate words corresponding to the intent classification (which can be multiple, etc.) can be accurately obtained. The candidate words corresponding to the intent classification can reflect the main purpose of the intent classification, etc. Later, when it is necessary to obtain the intent classification of a text, the intent classification embodied in the text can be obtained according to the semantic relationship or contextual relationship between the words in this text and the candidate words corresponding to each intent classification. In this way, through this application, the intent classification embodied in the text can be automatically obtained without manual participation, and because the intent classification embodied in the text is obtained by means of the semantic relationship or contextual relationship between the words in the text and the candidate words corresponding to each intent classification, the efficiency and accuracy of the intent classification embodied in the text can be improved, and the labor cost can be reduced.

[0183] For example, in a scenario where a large amount of training texts need to be annotated with intent classifications before training the model, the efficiency and accuracy of the intent classification embodied in the annotated texts can be improved and labor costs can be reduced.

[0184] In step S101, since the keywords annotating the intent classification are also words, for any intent classification, the keywords annotating the intent classification can be used as the intent label of the intent classification.

[0185] Sometimes, there may be only one keyword to mark an intent classification. In this case, the intent label of the intent classification marked by this keyword is also one. This will result in fewer intent labels for this intent classification, insufficient completeness, and insufficient robustness, which will ultimately make the accuracy of the intent classification reflected in the text not outstanding.

[0186] In this way, in order to improve the accuracy of acquiring the intent classification embodied in the text, the intent classification may correspond to multiple intent labels, and the semantics of the multiple intent labels corresponding to the intent classification are respectively related to the intent classification.

[0187] In order to make this intent classification correspond to multiple intent labels, in another embodiment of the present application, based on the keywords that mark this intent classification, more words semantically related to the keywords that mark this intent classification can be expanded and used as intent labels corresponding to this intent classification.

[0188] For example, in one method, multiple synonyms or antonyms of the keyword that marks this intent classification can be searched in the dictionary, and the found synonyms or antonyms and the keyword that marks this intent classification can be used as the intent label corresponding to this intent classification.

[0189] For another example, in another method, multiple synonyms or antonyms of the keywords of this intent classification can be expanded manually, and the found synonyms or antonyms and the keywords of this intent classification can be used as intent labels corresponding to this intent classification.

[0190] For example, in another embodiment, when obtaining the intent labels corresponding to the multiple intent categories, multiple scene words related to the target scenes involved in the multiple intent categories can be obtained. The target scenes involved in the multiple intent categories can be the same scene, for example, a sales scene or a game scene, and the multiple scene words related to the target scene can include words that are manually collected in advance and often appear in the target scene.

[0191] For any one of the multiple intent categories, when there is one keyword annotating the intent category, at least one scene vocabulary whose semantic similarity with the one keyword annotating the intent category is greater than a preset similarity is screened out from multiple scene vocabulary, and the intent label corresponding to the intent category is obtained at least based on the at least one screened scene vocabulary. Alternatively, when there are at least two keywords annotating the intent category, at least one scene vocabulary whose average semantic similarity with the at least two keywords annotating the intent category is greater than a preset similarity is screened out from multiple scene vocabulary, and the intent label corresponding to the intent category is obtained at least based on the at least one screened scene vocabulary.

[0192] The semantic similarity may be the Euclidean distance between the vectors of the words, etc. The closer the Euclidean distance between the words, the greater the semantic similarity between the words, and the farther the Euclidean distance between the words, the smaller the semantic similarity between the words.

[0193] The same is true for each of the other intent classifications in the plurality of intent classifications.

[0194] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0195] Reference Figure 2, shows a structural block diagram of a data processing device of the present application, the device comprising:

[0196] A first acquisition module 11 is used to acquire intent labels corresponding to a plurality of intent categories respectively, and a second acquisition module 12 is used to acquire a plurality of texts, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories;

[0197] A screening module 13 is used to screen texts including an intent label corresponding to any one of the multiple intent categories from multiple texts; a first prediction module 14 is used to predict a first vocabulary semantically related to the intent label corresponding to the intent category based on vocabulary in the screened texts other than the intent label corresponding to the intent category; a third acquisition module 15 is used to acquire a candidate word corresponding to the intent category based on the first vocabulary semantically related to the intent label corresponding to the intent category;

[0198] The second prediction module 16 is used to predict, for any one of the multiple texts and for any one word in the text, a second word semantically related to the word based on words other than the word in the text. The fourth acquisition module 17 is used to acquire the intent classification embodied in the text based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

[0199] In an optional implementation, the first acquisition module includes:

[0200] A first acquisition submodule is used to acquire multiple scene words related to target scenes involved in multiple intent classifications;

[0201] A second acquisition submodule is used for, for any one of the multiple intent categories, when there is one keyword annotating the intent category, screening at least one scene vocabulary from multiple scene vocabularies, the semantic similarity between which and the keyword annotating the intent category is greater than a preset similarity; obtaining the intent label corresponding to the intent category based on at least the screened at least one scene vocabulary; or, when there are at least two keywords annotating the intent category, screening at least one scene vocabulary from multiple scene vocabularies, the average semantic similarity between which and at least two keywords annotating the intent category is greater than a preset similarity, and obtaining the intent label corresponding to the intent category based on at least the screened at least one scene vocabulary.

[0202] In an optional implementation, there are at least two first words semantically related to the intent label corresponding to the intent classification;

[0203] The third acquisition module includes:

[0204] A statistical submodule, used for counting the first occurrence frequencies of each first word semantically related to the intent label corresponding to the intent classification in the text including the intent label corresponding to the intent classification;

[0205] A selection submodule, configured to select at least one first word from among the first words semantically related to the intent label corresponding to the intent classification, in descending order of first occurrence frequency;

[0206] The third acquisition submodule is used to acquire candidate words corresponding to the intention classification according to the selected at least one first word.

[0207] In an optional implementation, the third acquisition submodule includes:

[0208] a removing unit, configured to remove, from the selected at least one first word, first words that appear in candidate words corresponding to intent categories other than the intent category in a plurality of intent categories;

[0209] An acquisition unit is used to acquire candidate words corresponding to the intention classification according to the remaining first words in the selected at least one first word.

[0210] In an optional implementation, the elimination unit includes:

[0211] an acquisition subunit, configured to acquire, for any one of the selected at least one first vocabulary, the prominence of the first vocabulary in a text including an intent label corresponding to the intent classification;

[0212] The elimination subunit is used to eliminate the first word from the at least one selected first word when the significance is less than a preset significance.

[0213] In an optional implementation, the acquisition subunit is specifically used to: count the second occurrence frequency of the first word in the text of the intent label corresponding to each intent classification other than the intent classification in multiple intent classifications; calculate the significance based on the first occurrence frequency and the second occurrence frequency.

[0214] In an optional implementation, the acquisition subunit is specifically used to: calculate the expectation between the appearance frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification according to the first appearance frequency and the second appearance frequency, and calculate the variance between the second appearance frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification other than the intent classification in multiple intent classifications;

[0215] The significance is calculated according to the expectation, the variance, and the first occurrence frequency.

[0216] In an optional implementation, the acquisition subunit is specifically used to: calculate the difference between the first occurrence frequency and the expectation; calculate the ratio between the difference and the variance; and acquire the significance according to the ratio.

[0217] In an optional implementation, the first prediction module includes:

[0218] A first determination submodule, used to determine a target scenario involved in the intention classification;

[0219] A fourth acquisition submodule is used to acquire a prediction model applicable to a target scenario from prediction models applicable to different scenarios;

[0220] An input submodule is used to input the vocabulary in the filtered text except the intent label corresponding to the intent classification into a prediction model applicable to the target scenario, so that the prediction model applicable to the target scenario processes the vocabulary in the filtered text except the intent label corresponding to the intent classification to obtain a first vocabulary that is semantically related to the intent label corresponding to the intent classification.

[0221] In an optional implementation, the prediction model suitable for the target scenario is obtained by optimizing the initial prediction model based on the text generated in the target scenario, and the initial prediction model is trained based on the text generated in each scenario.

[0222] In an optional implementation, the fourth acquisition module includes:

[0223] A second determination submodule is used to determine the number of identical words between the candidate words corresponding to each intention classification and the second words;

[0224] The fifth acquisition submodule is used to acquire the intent classification embodied in the text according to the intent classification in which the number of identical words between the corresponding candidate word and the second word is greater than a preset number.

[0225] In the present application, intent labels corresponding to multiple intent classifications are obtained. Also, multiple texts are obtained, wherein the texts include multiple words, and the multiple words included in the texts include an intent label corresponding to one of the intent classifications. For any one of the multiple intent classifications, the texts including the intent label corresponding to the intent classification are screened out from multiple texts, and then, based on the words in the screened texts except the intent label corresponding to the intent classification, the first words semantically related to the intent label corresponding to the intent classification are predicted, and the candidate words corresponding to the intent classification are obtained based on the first words semantically related to the intent label corresponding to the intent classification. For any one of the multiple texts, for any word in the text, based on the words in the text except the word, a second word semantically related to the word is predicted. Based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification, the intent classification embodied in the text is obtained.

[0226] In the present application, according to the semantic relationship and contextual relationship between the words in the text including the intent label corresponding to the intent classification, the first word semantically related to the intent label corresponding to the intent classification can be accurately obtained, and then the candidate words corresponding to the intent classification (which can be multiple, etc.) can be accurately obtained. The candidate words corresponding to the intent classification can reflect the main purpose of the intent classification, etc. Later, when it is necessary to obtain the intent classification of a text, the intent classification embodied in the text can be obtained according to the semantic relationship or contextual relationship between the words in this text and the candidate words corresponding to each intent classification. In this way, through this application, the intent classification embodied in the text can be automatically obtained without manual participation, and because the intent classification embodied in the text is obtained by means of the semantic relationship or contextual relationship between the words in the text and the candidate words corresponding to each intent classification, the efficiency and accuracy of the intent classification embodied in the text can be improved, and the labor cost can be reduced.

[0227] For example, in a scenario where a large amount of training texts need to be annotated with intent classifications before training the model, the efficiency and accuracy of the intent classification embodied in the annotated texts can be improved and labor costs can be reduced.

[0228] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0229] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, the electronic device executes one or more methods in the above embodiments. In the present application embodiment, the electronic device includes a server, a gateway, a sub-device, etc., and the sub-device is an Internet of Things device or other device.

[0230] The embodiments of the present disclosure may be implemented as an apparatus configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the apparatus may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like.

[0231] Figure 3 An exemplary device 1300 that can be used to implement various embodiments of the present application is schematically shown.

[0232] For one embodiment, Figure 3 An exemplary apparatus 1300 is shown having one or more processors 1302, a control module (chip set) 1304 coupled to at least one of the (one or more) processors 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.

[0233] The processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1300 can be used as a server device such as a gateway in the embodiments of the present application.

[0234] In some embodiments, the device 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM / storage device 1308) having instructions 1314 and one or more processors 1302 configured to execute the instructions 1314 in combination with the one or more computer-readable media to implement a module to perform the actions of the present disclosure.

[0235] For one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1302 and / or any suitable device or component in communication with the control module 1304 .

[0236] The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0237] The memory 1306 may be used, for example, to load and store data and / or instructions 1314 for the device 1300. For one embodiment, the memory 1306 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1306 may include a double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).

[0238] For one embodiment, control module 1304 may include one or more input / output controllers to provide an interface to NVM / storage device 1308 and input / output device(s) 1310 .

[0239] For example, NVM / storage 1308 may be used to store data and / or instructions 1314. NVM / storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0240] NVM / storage device 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1308 may be accessed via input / output device(s) 1310 over a network.

[0241] (One or more) input / output devices 1310 may provide an interface for the apparatus 1300 to communicate with any other appropriate device, and the input / output device 1310 may include a communication component, a phonetic component, a sensor component, etc. The network interface 1312 may provide an interface for the apparatus 1300 to communicate through one or more networks, and the apparatus 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0242] For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers of the control module 1304 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304 to form a system-on-chip (SoC).

[0243] In various embodiments, the device 1300 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1300 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0244] An embodiment of the present application provides an electronic device, comprising: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, enable the electronic device to perform one or more methods in the present application.

[0245] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0246] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

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

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

[0249] These computer program instructions can also be loaded onto a computer or other programmable information processing terminal device, so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

[0251] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0252] The data processing method and device provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Obtaining intent labels corresponding to a plurality of intent categories respectively, and obtaining a plurality of texts, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories; For any one of the multiple intent classifications, a text including an intent label corresponding to the intent classification is screened from multiple texts, a first word semantically related to the intent label corresponding to the intent classification is predicted based on words in the screened text except for the intent label corresponding to the intent classification, and a candidate word corresponding to the intent classification is obtained based on the first word semantically related to the intent label corresponding to the intent classification; For any one of multiple texts and any one of the words in the text, a second word semantically related to the word is predicted based on words in the text other than the word, and the intent classification embodied in the text is obtained based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

2. The method according to claim 1, characterized in that The obtaining of the intent labels corresponding to the plurality of intent categories includes: Acquire multiple scene vocabulary related to target scenes involved in multiple intent classifications; For any one of the multiple intent categories, when there is only one keyword annotating the intent category, at least one scene word whose semantic similarity with the keyword annotating the intent category is greater than a preset similarity is selected from the multiple scene words; and the intent label corresponding to the intent category is obtained based on at least the selected at least one scene word; Alternatively, when there are at least two keywords that annotate the intent classification, at least one scene vocabulary is screened from multiple scene vocabularies, the average semantic similarity between the at least two keywords that annotate the intent classification is greater than a preset similarity, and the intent label corresponding to the intent classification is obtained based on at least the screened at least one scene vocabulary.

3. The method according to claim 1, characterized in that There are at least two first words semantically related to the intent label corresponding to the intent classification; The acquiring the candidate word corresponding to the intent classification according to the first vocabulary semantically related to the intent label corresponding to the intent classification includes: Counting the first occurrence frequencies of each first word semantically related to the intent label corresponding to the intent classification in the text including the intent label corresponding to the intent classification; Among the first words semantically related to the intent label corresponding to the intent classification, select at least one first word in descending order of first occurrence frequency; According to the selected at least one first word, candidate words corresponding to the intention classification are obtained.

4. The method according to claim 3, characterized in that The step of obtaining a candidate word corresponding to the intention classification according to the selected at least one first word includes: Eliminate, from the selected at least one first word, first words that appear in candidate words corresponding to intent categories other than the intent category in multiple intent categories; According to the remaining first words in the selected at least one first word, candidate words corresponding to the intention classification are obtained.

5. The method according to claim 4, characterized in that The step of removing, from the selected at least one first word, first words that appear in candidate words corresponding to intent categories other than the intent category in multiple intent categories, includes: For any one of the at least one selected first vocabulary, obtaining the prominence of the first vocabulary in a text including an intent label corresponding to the intent classification; When the significance is less than the preset significance, the first word is eliminated from the selected at least one first word.

6. The method according to claim 5, characterized in that The obtaining of the significance of the first vocabulary in the text including the intent label corresponding to the intent classification includes: Counting the second occurrence frequency of the first word in the text including the intent label corresponding to each intent classification other than the intent classification in the plurality of intent classifications; The significance is calculated according to the first occurrence frequency and the second occurrence frequency.

7. The method according to claim 6, characterized in that The calculating the significance according to the first occurrence frequency and the second occurrence frequency includes: According to the first occurrence frequency and the second occurrence frequency, calculating the expectation between the occurrence frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification, and calculating the variance between the second occurrence frequencies of the first vocabulary in the text including the intent label corresponding to each intent classification other than the intent classification in the plurality of intent classifications; The significance is calculated according to the expectation, the variance, and the first occurrence frequency.

8. The method according to claim 7, characterized in that The calculating the significance according to the expectation, the variance and the first occurrence frequency includes: Calculating the difference between the first occurrence frequency and the expectation; calculating a ratio between the difference and the variance; The significance is obtained according to the ratio.

9. The method according to claim 1, characterized in that: The predicting, based on the words in the filtered text except the intent label corresponding to the intent classification, a first word semantically related to the intent label corresponding to the intent classification comprises: Determining a target scenario involved in the intent classification; Among the prediction models applicable to different scenarios, obtain a prediction model applicable to the target scenario; The vocabulary included in the filtered text except the intent label corresponding to the intent classification is input into the prediction model applicable to the target scenario, so that the prediction model applicable to the target scenario processes the vocabulary included in the filtered text except the intent label corresponding to the intent classification to obtain the first vocabulary semantically related to the intent label corresponding to the intent classification.

10. The method according to claim 9, characterized in that The prediction model suitable for the target scenario is obtained by optimizing the initial prediction model based on the text generated in the target scenario, and the initial prediction model is trained based on the text generated in each scenario.

11. The method according to claim 1, characterized in that: The acquiring the intent classification embodied in the text according to the second words semantically related to each word in the text and the candidate words corresponding to each intent classification respectively includes: Determine the number of identical words between the candidate words corresponding to each intent classification and the second word; According to the intention classification in which the number of identical words between the corresponding candidate word and the second word is greater than a preset number, the intention classification embodied in the text is obtained.

12. A data processing device, characterized in that: The device comprises: A first acquisition module is used to acquire intent labels corresponding to a plurality of intent categories respectively, and a second acquisition module is used to acquire a plurality of texts, wherein the texts include a plurality of words, and the plurality of words included in the texts include an intent label corresponding to one of the intent categories; A screening module, for screening texts including an intent label corresponding to any one of a plurality of intent categories from a plurality of texts, a first prediction module, for predicting a first vocabulary semantically related to the intent label corresponding to the intent category based on vocabulary in the screened texts other than the intent label corresponding to the intent category, and a third acquisition module, for acquiring a candidate word corresponding to the intent category based on the first vocabulary semantically related to the intent label corresponding to the intent category; The second prediction module is used to predict, for any one of multiple texts and for any one word in the text, a second word semantically related to the word based on words other than the word in the text; and the fourth acquisition module is used to acquire the intent classification embodied in the text based on the second words semantically related to each word in the text and the candidate words corresponding to each intent classification.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium, characterized in that: A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.