Skill category analysis method, device, equipment and readable storage medium
By using the skill intention classification results of training data as prior or auxiliary information in the skill category analysis method, adjusting the skill category probability of user input information, solving the problem of low accuracy in the existing technology and achieving more accurate skill intention Sure.
Patent Information
- Application Number
- CN202310840870.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-07-10
AI Technical Summary
In the prior art, in the analysis of skill category information input by user, it is impossible to accurately characterize the degree that the user input information may belong to a certain skill category, resulting in the final determination of the user's actual skill intentions with low accuracy.
A skill category analysis method is proposed. By obtaining user input information and inputting them into skill category analysis model, using the skill intention classification results of each skill category corresponding to the training data as prior information or auxiliary information, adjusting the probability of model output, to Improve accuracy.
Through this method, it is possible to accurately determine the skill category to which the user input information belongs, thereby accurately determining the user's actual skill intentions, and improving the accuracy of skill category analysis.
Smart Images

Figure CN116775886B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and more specifically, to a skill category analysis method, apparatus, device and readable storage medium. Background Art
[0002] In the process of human-computer interaction, after receiving the user input information, the machine needs to use natural language processing technology to parse the user input information, determine the user's skill intention, and then give corresponding feedback. In the actual scenario of human-computer interaction, the user input information is ambiguous. In this case, the user input information may generate a variety of skill intentions corresponding to different skill categories. The machine needs to determine the user's actual skill intention from a variety of skill intentions corresponding to different skill categories in order to give an accurate response. For example, the user input information is "Play Wanjiang", and the possible skill intentions it may generate include "Play Music Wanjiang" corresponding to the music category and "Play Video Wanjiang" corresponding to the film and television category. The machine needs to determine the user's actual skill intention from them.
[0003] In the prior art, skill category analysis is performed on user input information to obtain the probability that the user input information belongs to each skill category, and the probability is sorted to determine the user's actual skill intention from the multiple skill intentions corresponding to different skill categories that may be generated by the user input information. However, the existing method of performing skill category analysis on user input information, the probability that the user input information belongs to each skill category cannot accurately characterize the extent to which the user input information may belong to the skill category, which will result in a low accuracy in the user's actual skill intention that is ultimately determined.
[0004] Therefore, how to provide a skill category analysis method that can accurately determine the extent to which user input information may belong to a certain skill category, and then enable the machine to accurately determine the user's actual skill intention from the multiple skill intentions corresponding to different skill categories that may be generated by the user input information, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0005] In view of the above problems, this application proposes a skill category analysis method, device, equipment and readable storage medium. The specific solution is as follows:
[0006] A skill category analysis method, the method comprising:
[0007] Get user input information;
[0008] Inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category;
[0009] The skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category;
[0010] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0011] Optionally, the training method of the skill category analysis model includes:
[0012] Inputting the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category;
[0013] For each skill category, based on the skill intention classification result of the skill category corresponding to the training data, calculate the probability that the training data does not belong to the skill category;
[0014] Using the probability that the training data does not belong to the skill category as a penalty term for the first probability that the training data belongs to each skill category, and calculating a second probability that the training data belongs to each skill category;
[0015] The skill category analysis model is obtained by training with the second probability that the training data belongs to each of the skill categories and the label that is close to the training data belonging to each of the skill categories as the training target.
[0016] Optionally, the calculating the probability that the training data does not belong to the skill category based on the skill intention classification result of the skill category corresponding to the training data includes:
[0017] Calculate the probability that the training data belongs to the skill category by using the skill intention classification result of the skill category corresponding to the training data;
[0018] The probability that the training data belongs to the skill category is used to calculate the probability that the training data does not belong to the skill category.
[0019] Optionally, the calculating the probability that the training data belongs to the skill category by using the skill intention classification result of the skill category corresponding to the training data includes:
[0020] The probability that the training data belongs to the skill category is calculated by using the maximum probability among the probabilities that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
[0021] A skill category analysis method, characterized in that the method comprises:
[0022] Get user input information;
[0023] Obtaining a skill intent classification result for each skill category corresponding to the user input information, wherein the skill intent classification result for each skill category corresponding to the user input information represents a probability that the user input information belongs to each skill intent included in the skill category and a probability that the user input information does not belong to the skill category;
[0024] Inputting the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category;
[0025] Using the skill intention classification results of each skill category corresponding to the user input information, adjusting the first probability that the user input information belongs to each skill category, to obtain the probability that the user input information belongs to each skill category;
[0026] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0027] Optionally, the adjusting the first probability that the user input information belongs to each skill category by using the skill intention classification result of each skill category corresponding to the user input information to obtain the probability that the user input information belongs to each skill category includes:
[0028] For each skill category, using the skill intention classification result of the skill category corresponding to the user input information, calculate a second probability that the user input information belongs to the skill category;
[0029] For each skill category, the first probability that the user input information belongs to the skill category is adjusted using the second probability that the user input information belongs to the skill category to obtain the probability that the user input information belongs to the skill category.
[0030] Optionally, the calculating a second probability that the user input information belongs to the skill category by using the skill intention classification result of the skill category corresponding to the user input information includes:
[0031] The second probability that the user input information belongs to the skill category is calculated by using the maximum probability among the probabilities of the user input information belonging to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category.
[0032] A skill category analysis device, comprising:
[0033] A first acquisition unit, used to acquire user input information;
[0034] A computing unit, used for inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category; wherein the skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category;
[0035] The first determining unit is configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0036] Optionally, the device further comprises: a skill category analysis model training unit, wherein the skill category analysis model training unit comprises:
[0037] a first training data processing unit, configured to input the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category;
[0038] A second training data processing unit, configured to calculate, for each skill category, a probability that the training data does not belong to the skill category based on a skill intention classification result of the skill category corresponding to the training data;
[0039] a third training data processing unit, configured to use the probability that the training data does not belong to the skill category as a penalty term for the first probability that the training data belongs to each skill category, and calculate a second probability that the training data belongs to each skill category;
[0040] The training unit is used to train the skill category analysis model by taking the second probability that the training data belongs to each of the skill categories and approaching the label that the training data belongs to each of the skill categories as the training target.
[0041] Optionally, the second training data processing unit includes:
[0042] A probability calculation unit for the training data belonging to a skill category, used to calculate the probability that the training data belongs to the skill category using the skill intention classification result of the skill category corresponding to the training data;
[0043] The probability calculation unit that the training data does not belong to the skill category is used to calculate the probability that the training data does not belong to the skill category by using the probability that the training data belongs to the skill category.
[0044] Optionally, the probability calculation unit that the training data belongs to a skill category is specifically used to:
[0045] The probability that the training data belongs to the skill category is calculated by using the maximum probability among the probabilities that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
[0046] A skill category analysis device, comprising:
[0047] A second acquisition unit, used to acquire user input information;
[0048] A skill intention classification result acquisition unit, used to acquire the skill intention classification result of each skill category corresponding to the user input information, wherein the skill intention classification result of each skill category corresponding to the user input information represents the probability that the user input information belongs to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category;
[0049] a skill category analysis unit, configured to input the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category;
[0050] an adjusting unit, configured to adjust the first probability that the user input information belongs to each skill category by using the skill intention classification result of each skill category corresponding to the user input information, so as to obtain the probability that the user input information belongs to each skill category;
[0051] The second determining unit is configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0052] Optionally, the adjustment unit includes:
[0053] A probability calculation unit that the user input information belongs to a skill category, used to calculate, for each skill category, a second probability that the user input information belongs to the skill category using a skill intention classification result of the skill category corresponding to the user input information;
[0054] The adjustment subunit is used to adjust, for each skill category, the first probability that the user input information belongs to the skill category using the second probability that the user input information belongs to the skill category, so as to obtain the probability that the user input information belongs to the skill category.
[0055] Optionally, the probability calculation unit that the user input information belongs to a skill category is specifically used to:
[0056] The second probability that the user input information belongs to the skill category is calculated by using the maximum probability among the probabilities of the user input information belonging to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category.
[0057] A skill category analysis device, comprising a memory and a processor;
[0058] The memory is used to store programs;
[0059] The processor is used to execute the program to implement the various steps of the skill category analysis method described above.
[0060] A readable storage medium stores a computer program, which, when executed by a processor, implements the various steps of the skill category analysis method described above.
[0061] By means of the above technical scheme, the present application discloses a skill category analysis method, apparatus, device and readable storage medium. When using the skill category analysis model to determine the probability that the user input information belongs to each skill category, the skill intention classification results of each skill category corresponding to the training data can be used as prior information to improve the accuracy of the output probability of the skill category analysis model, or the skill intention classification results of each skill category corresponding to the user input information can be used as auxiliary information to tune the output probability of the skill category analysis model, so that the obtained probability that the user input information belongs to each skill category can accurately characterize the degree to which the user input information may belong to a certain skill category. Therefore, based on the above probability, the skill category to which the user input information belongs can be accurately determined, and then the user's actual skill intention can be accurately determined from the multiple skill intentions corresponding to different skill categories that may be generated by the user input information. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0063] Figure 1 A schematic diagram of the structure of a human-computer interaction system disclosed in an embodiment of the present application;
[0064] Figure 2 A flowchart of a skill category analysis method disclosed in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a training method for a skill category analysis model disclosed in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of a specific implementation method disclosed in an embodiment of the present application of using the skill intention classification results of each skill category corresponding to the user input information as auxiliary information to tune the output probability of the skill category analysis model to obtain the probability that the user input information belongs to each skill category;
[0067] Figure 5 A flowchart of another skill category analysis method disclosed in an embodiment of the present application;
[0068] Figure 6 A schematic diagram of the structure of a skill category analysis device disclosed in an embodiment of the present application;
[0069] Figure 7 This is a schematic diagram of the structure of another skill category analysis device disclosed in an embodiment of the present application;
[0070] Figure 8 This is a hardware structure block diagram of a skill category analysis device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0072] In order to facilitate understanding of the technical solution of the present application, the skill categories and skill intents are first introduced. The skill categories refer to "Music", "Film and Television", "Navigation", etc. Each skill category contains multiple skill intents. For example, for the skill category "Music", there are skill intents such as playing specific music (Play_Music) and playing music randomly (Random_Music). For the skill category "Film and Television", there are skill intents such as playing specific videos (Play_Video) and playing music randomly (Random_Video). For the skill category "Navigation", there are skill intents such as Navigate (Navigate). In addition, each skill category also contains a rejection (Others) intent, which indicates the scope that does not belong to the skill category.
[0073] Then, the structure of the human-computer interaction system is briefly introduced as follows:
[0074] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a human-computer interaction system disclosed in an embodiment of the present application is shown in FIG. Figure 1As shown, the human-computer interaction system includes a data pre-processing module, a skill intention classification module, a source query module and a skill category analysis model. Among them, the skill intention classification module includes n single skill category skill intention classification models, each single skill category skill intention classification model corresponds to a skill category, and the function of each single skill category skill intention classification model is to perform fine-grained skill intention classification based on the corresponding skill category. n is an integer greater than or equal to 1. The skill category analysis model includes a pre-trained model module and a softmax module. The pre-trained model module can be a BERT (Bidirectional Encoder Representations from Transformers) model, or it can be other pre-trained models improved on the basis of the BERT model, such as the ALBERT model.
[0075] Based on the above human-computer interaction system, the process of human-computer interaction is briefly introduced as follows:
[0076] The user input information passes through the data pre-processing module to achieve data regularization, that is, to meet the requirements of the skill intention classification module for input data. The regularized user input information is input into the skill intention classification module. The intention classification models of each skill category in the skill intention classification module classify the user input information respectively, and obtain the skill intention classification results of each skill category corresponding to the user input information. The skill intention classification results of each skill category corresponding to the user input information represent the probability that the user input information belongs to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category; based on the skill intention classification results of each skill category, m skill intentions are output, where m is an integer greater than or equal to 1, and m is less than or equal to n. The m skill intentions are input into the information source processing module. The information source processing module queries the information source according to the unique logic, preliminarily screens the m skill intentions, and retains the skill intentions with information sources. If the number of skill intentions remaining after screening is the specified number (generally 1), the skill intentions remaining after screening are the actual skill intentions of the user. If the number of skill intentions remaining after screening exceeds the specified number (generally 1), the skill intentions remaining after screening are output to the skill category analysis model, and the skill category analysis model determines the specified number of skill intentions from the remaining skill intentions after screening. The determined specified number of skill intentions are the user's actual skill intentions.
[0077] At present, the skill category analysis model in the human-computer interaction system calculates the probability that the user input information belongs to each skill category, sorts it according to the probability, obtains a specified number of skill categories, and then determines the skill intentions corresponding to the specified number of skill categories from the remaining skill intentions after screening as the user's actual skill intentions.
[0078] However, when calculating the probability that the user input information belongs to each skill category, the existing skill category analysis model only processes the logits of multiple skill categories output by the skill category analysis model through the softmax function. The probability that the user input information belongs to each skill category obtained in this way cannot accurately represent the extent to which the user input information may belong to the skill category, which will result in a low accuracy in the actual skill intention of the user ultimately determined.
[0079] In view of the above problems, the inventors of this case conducted in-depth research and finally proposed two skill category analysis methods. One method can use the skill intention classification results of each skill category corresponding to the training data as prior information to improve the accuracy of the output probability of the skill category analysis model when using the skill category analysis model to determine the probability that the user input information belongs to each skill category. The other method can use the skill intention classification results of each skill category corresponding to the user input information as auxiliary information to tune the output probability of the skill category analysis model when using the skill category analysis model to determine the probability that the user input information belongs to each skill category, so that the obtained probability that the user input information belongs to each skill category is more accurate.
[0080] Next, the skill category analysis method provided in this application is introduced through the following embodiments.
[0081] Reference Figure 2 , Figure 2 The following is a flow chart of a skill category analysis method disclosed in an embodiment of the present application. The method may include:
[0082] Step S101: Obtain user input information.
[0083] In the present application, user input information may be in any form of voice, text, video, etc., and the present application does not impose any limitation on this.
[0084] Step S102: inputting the user input information into a skill category analysis model, and the skill category analysis model outputs the probability that the user input information belongs to each skill category;
[0085] Among them, the skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
[0086] It should be noted that the training data may be data belonging to various skill categories, and the training data has a label. The label of the training data is used to indicate that the training data belongs to a skill intent under a skill category. For example, the training data is "Play Wanjiang", which belongs to the music skill category, and the corresponding skill category label is music, and the corresponding skill intent label is Play_Music. The skill intent classification result of each skill category corresponding to the training data can be obtained by inputting the training data into the skill intent classification module in the aforementioned human-computer interaction system, and the skill intent classification module in the aforementioned human-computer interaction system processes the training data.
[0087] For ease of understanding, assume that a scenario involves three skill categories, namely music, film and television, and navigation. For example, for the skill category "music", there are skill intents such as play specific music (Play_Music) and play music randomly (Random_Music). For the skill category "film and television", there are skill intents such as play specific videos (Play_Video) and play music randomly (Random_Video). For the skill category "navigation", there are skill intents such as navigation (Navigate). In addition, each skill category also contains a rejection (Others) intent, which indicates that it does not belong to the scope of the skill category.
[0088] Assuming that the training data is "Play Wanjiang", the skill intent classification results for each skill category corresponding to the training data may be as follows:
[0089] Music skill categories: Play_Music: 0.5, Random_Music: 0.3, Others: 0.2
[0090] Film and TV skill categories: Play_Video: 0.25, Random_Video: 0.3, Others: 0.45
[0091] Navigation skill categories: Navigate: 0.1, Others: 0.9.
[0092] The training method of the skill category analysis model will be described in detail through the following embodiments and will not be described in detail here.
[0093] Step S103: Determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0094] After determining the probability that the user input information belongs to each skill category, the skill category to which the user input information belongs may be determined based on probability sorting.
[0095] This embodiment discloses a skill category analysis method. In this embodiment, by pre-training the skill category analysis model, the skill intention classification results of each skill category corresponding to the training data can be used as prior information to improve the accuracy of the output probability of the skill category analysis model. Therefore, the trained skill category analysis model can be used to accurately determine the skill category to which the user input information belongs, and then the user's actual skill intention can be accurately determined from the multiple skill intentions corresponding to different skill categories that may be generated by the user input information.
[0096] In another embodiment of the present application, the training method of the skill category analysis model is described in detail.
[0097] In the process of training the skill category analysis model, the traditional approach is to input the training data into the pre-training model module, calculate the classification probability through the softmax module, and then perform multi-classification cross entropy loss calculation with the skill category labels of the training data, and back-propagate to update the weights.
[0098] Reference Figure 3 , Figure 3 A schematic diagram of a training method for a skill category analysis model disclosed in an embodiment of the present application is shown in FIG. Figure 3 As shown, a training method for a skill category analysis model disclosed in an embodiment of the present application is, on the one hand, to input the training data into a pre-training model module according to traditional practices, and then calculate the classification probability through a softmax module; on the other hand, the skill intention classification results of each skill category corresponding to the training data are used to adjust the above classification probability as an additional penalty, and then the adjusted classification probability and the training data label are subjected to multi-classification cross entropy loss calculation, and the weights are updated by backpropagation.
[0099] Specifically, the training method of the skill category analysis model may include the following steps:
[0100] Step S201: input the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category.
[0101] It should be noted that the first probability that the training data belongs to each skill category is output by the softmax module in the skill category analysis model.
[0102] Step S202: For each skill category, based on the skill intention classification result of the skill category corresponding to the training data, calculate the probability that the training data does not belong to the skill category.
[0103] As an implementable embodiment, based on the skill intention classification result of the skill category corresponding to the training data, a specific implementation method for calculating the probability that the training data does not belong to the skill category may be to first use the skill intention classification result of the skill category corresponding to the training data to calculate the probability that the training data belongs to the skill category; and then use the probability that the training data belongs to the skill category to calculate the probability that the training data does not belong to the skill category.
[0104] The method of calculating the probability that the training data belongs to the skill category by using the skill intention classification result of the skill category corresponding to the training data may be:
[0105] The probability that the training data belongs to the skill category is calculated by using the maximum probability among the probabilities that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
[0106] As an implementable method, the sum of the maximum probability and the probability that the training data does not belong to the skill category may be calculated first, and then the ratio of the maximum probability to the sum may be calculated as the probability that the training data belongs to the skill category.
[0107] The method for calculating the probability that the training data does not belong to the skill category by using the probability that the training data belongs to the skill category may be:
[0108] The difference between 1 and the probability that the training data belongs to the skill category is calculated as the probability that the training data does not belong to the skill category.
[0109] For ease of understanding, the implementation method of calculating the probability that the training data belongs to a certain skill category is used as an example for explanation. Assume that the skill category includes n skill intents and rejected intents Others, and the probability that the training data belongs to each skill intent in the skill category is W intent1 , W intent2 ,……,W intentn , the probability that the training data belongs to the rejection intention in this skill category is W others The probability W of the training data belonging to the skill category can be calculated based on the following formula: skill :
[0110]
[0111] The probability that the training data does not belong to the skill category can be calculated based on the following formula:
[0112]
[0113] Step S203: using the probability that the training data does not belong to the skill category as a penalty item for the first probability that the training data belongs to each skill category, and calculating the second probability that the training data belongs to each skill category.
[0114] In the present application, the probability that the training data does not belong to the skill category may be multiplied by the first probability that the training data belongs to each skill category to obtain the second probability that the training data belongs to each skill category.
[0115] For ease of understanding, assume that the probability that the training data does not belong to each skill category is:
[0116]
[0117] The first probability that the training data belongs to each skill category is:
[0118]
[0119] The second probability that the training data belongs to each skill category can be calculated using the following formula:
[0120]
[0121] Step S204: The skill category analysis model is obtained by training with the second probability that the training data belongs to each of the skill categories and the label that is close to the training data belonging to each of the skill categories as a training target.
[0122] It should be noted that by training the skill category analysis model in this way, the model can be updated in the direction of greater differentiation. Taking "play Wanjiang" as an example, the direction of model update is It is known Therefore, the model can be and Distinguish larger directional updates. After the training is completed, the accuracy of the probability output by the skill category analysis model can be improved.
[0123] In the above embodiment, it is also pointed out that the skill intention classification results of each skill category corresponding to the user input information can be used as auxiliary information to tune the output probability of the skill category analysis model, so that the probability that the obtained user input information belongs to each skill category is more accurate. Next, in another embodiment of the present application, this method is described in detail as follows:
[0124] When calculating the probability that the user input information belongs to each skill category, the traditional approach is to process the logits of multiple skill categories output by the skill category analysis model through a softmax function. The probability that the user input information belongs to each skill category obtained in this way cannot accurately characterize the extent to which the user input information may belong to the skill category, which will result in a lower accuracy in the actual skill intention of the user ultimately determined.
[0125] Reference Figure 4 , Figure 4 A schematic diagram of a specific implementation method disclosed in an embodiment of the present application is to use the skill intention classification results of each skill category corresponding to the user input information as auxiliary information to tune the output probability of the skill category analysis model to obtain the probability that the user input information belongs to each skill category, such as Figure 4 As shown, the embodiment of the present application discloses using the skill intention classification results of each skill category corresponding to the user input information as auxiliary information to tune the output probability of the skill category analysis model to obtain the probability that the user input information belongs to each skill category. On the one hand, according to the traditional practice, the logits of multiple skill categories output by the skill category analysis model are obtained, and the probability that the user input information belongs to each skill category after being processed by the softmax function is obtained; on the other hand, the skill intention classification results of each skill category corresponding to the user input information are used as a reference to guide the probability that the user input information belongs to each skill category after the logits of multiple skill categories output by the skill category analysis model obtained according to the traditional practice are processed by the softmax function, and then the adjusted probability is used as the probability that the user input information belongs to each skill category.
[0126] Based on the above, the embodiment of the present application also discloses another skill category analysis method, which is specifically implemented as follows:
[0127] Reference Figure 5 , Figure 5 This is a flow chart of another skill category analysis method disclosed in an embodiment of the present application. The method may include:
[0128] Step S301: Obtain user input information.
[0129] Step S302: Obtain the skill intent classification results of each skill category corresponding to the user input information, wherein the skill intent classification results of each skill category corresponding to the user input information represent the probability that the user input information belongs to each skill intent included in the skill category and the probability that the user input information does not belong to the skill category.
[0130] For ease of understanding, assume that a scenario involves three skill categories, namely music, film and television, and navigation. For example, for the skill category "music", there are skill intents such as play specific music (Play_Music) and play music randomly (Random_Music). For the skill category "film and television", there are skill intents such as play specific videos (Play_Video) and play music randomly (Random_Video). For the skill category "navigation", there are skill intents such as navigation (Navigate). In addition, each skill category also contains a rejection (Others) intent, which indicates that it does not belong to the scope of the skill category.
[0131] Assuming that the user input information is "Play Wanjiang", the skill intent classification results for each skill category corresponding to the user input information may be as follows:
[0132] Music skill categories: Play_Music: 0.5, Random_Music: 0.3, Others: 0.2
[0133] Film and TV skill categories: Play_Video: 0.25, Random_Video: 0.3, Others: 0.45
[0134] Navigation skill categories: Navigate: 0.1, Others: 0.9.
[0135] It should be noted that the skill intention classification results of each skill category corresponding to the user input information can be obtained by inputting the user input information into the skill intention classification module in the aforementioned human-computer interaction system, and processing the user input information by the skill intention classification module in the aforementioned human-computer interaction system.
[0136] Step S303: Input the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category.
[0137] Step S304: Using the skill intention classification results of each skill category corresponding to the user input information, the first probability that the user input information belongs to each skill category is adjusted to obtain the probability that the user input information belongs to each skill category.
[0138] Specifically, the first probability that the user input information belongs to each skill category is adjusted by using the skill intention classification result of each skill category corresponding to the user input information, and the implementation method of obtaining the probability that the user input information belongs to each skill category may include:
[0139] Step S3031: For each skill category, using the skill intention classification result of the skill category corresponding to the user input information, calculate the second probability that the user input information belongs to the skill category.
[0140] The method for calculating the second probability that the user input information belongs to the skill category by using the skill intention classification result of the skill category corresponding to the user input information may be:
[0141] The second probability that the user input information belongs to the skill category is calculated by using the maximum probability among the probabilities of the user input information belonging to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category.
[0142] As an implementable method, the sum of the maximum probability and the probability that the user input information does not belong to the skill category may be calculated first, and then the ratio of the maximum probability to the sum may be calculated as the probability that the training data belongs to the skill category.
[0143] The specific calculation method can refer to the implementation method of calculating the probability that the training data belongs to a certain skill category in the above embodiment, and will not be repeated here.
[0144] Step S3032: For each skill category, the first probability that the user input information belongs to the skill category is adjusted using the second probability that the user input information belongs to the skill category to obtain the probability that the user input information belongs to the skill category.
[0145] In the present application, for each skill category, the first probability that the user input information belongs to the skill category and the second probability that the user input information belongs to the skill category can be multiplied to obtain the probability that the user input information belongs to the skill category.
[0146] Step S305: Determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0147] In this embodiment, the skill intention classification results of each skill category corresponding to the user input information are used as a reference for guiding the probability output by the skill category analysis model, so that the calculated probability that the user input information belongs to each skill category can accurately characterize the degree to which the user input information belongs to the skill category, and thus can accurately determine the skill category to which the user input information belongs, and further can accurately determine the user's actual skill intention from the multiple skill intentions corresponding to different skill categories that may be generated by the user input information.
[0148] The skill category analysis device disclosed in the embodiment of the present application is described below. The skill category analysis device described below and the skill category analysis method described above can be referenced to each other.
[0149] Reference Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a skill category analysis device disclosed in an embodiment of the present application. Figure 6 As shown, the skill category analysis device may include:
[0150] A first acquisition unit 11, used to acquire user input information;
[0151] A calculation unit 12 is used to input the user input information into a skill category analysis model, and the skill category analysis model outputs the probability that the user input information belongs to each skill category; wherein the skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category;
[0152] The first determining unit 13 is configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0153] Optionally, the device further comprises: a skill category analysis model training unit, wherein the skill category analysis model training unit comprises:
[0154] a first training data processing unit, configured to input the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category;
[0155] A second training data processing unit, configured to calculate, for each skill category, a probability that the training data does not belong to the skill category based on a skill intention classification result of the skill category corresponding to the training data;
[0156] a third training data processing unit, configured to use the probability that the training data does not belong to the skill category as a penalty term for the first probability that the training data belongs to each skill category, and calculate a second probability that the training data belongs to each skill category;
[0157] The training unit is used to train the skill category analysis model by taking the second probability that the training data belongs to each of the skill categories and approaching the label that the training data belongs to each of the skill categories as the training target.
[0158] Optionally, the second training data processing unit includes:
[0159] A probability calculation unit for the training data belonging to a skill category, used to calculate the probability that the training data belongs to the skill category using the skill intention classification result of the skill category corresponding to the training data;
[0160] The probability calculation unit that the training data does not belong to the skill category is used to calculate the probability that the training data does not belong to the skill category by using the probability that the training data belongs to the skill category.
[0161] Optionally, the probability calculation unit that the training data belongs to a skill category is specifically used to:
[0162] The probability that the training data belongs to the skill category is calculated by using the maximum probability among the probabilities that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
[0163] Reference Figure 7 , Figure 7 FIG. 1 is a schematic diagram of another skill category analysis device disclosed in an embodiment of the present application. Figure 7 As shown, the skill category analysis device may include:
[0164] The second acquisition unit 21 is used to acquire user input information;
[0165] A skill intention classification result acquisition unit 22 is used to acquire the skill intention classification result of each skill category corresponding to the user input information, and the skill intention classification result of each skill category corresponding to the user input information represents the probability that the user input information belongs to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category;
[0166] A skill category analysis unit 23, configured to input the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category;
[0167] An adjustment unit 24, configured to adjust the first probability that the user input information belongs to each skill category by using the skill intention classification result of each skill category corresponding to the user input information, so as to obtain the probability that the user input information belongs to each skill category;
[0168] The second determining unit 25 is configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
[0169] Optionally, the adjustment unit includes:
[0170] A probability calculation unit that the user input information belongs to a skill category, used to calculate, for each skill category, a second probability that the user input information belongs to the skill category using a skill intention classification result of the skill category corresponding to the user input information;
[0171] The adjustment subunit is used to adjust, for each skill category, the first probability that the user input information belongs to the skill category using the second probability that the user input information belongs to the skill category, so as to obtain the probability that the user input information belongs to the skill category.
[0172] Optionally, the probability calculation unit that the user input information belongs to a skill category is specifically used to:
[0173] The second probability that the user input information belongs to the skill category is calculated by using the maximum probability among the probabilities of the user input information belonging to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category.
[0174] Reference Figure 8 , Figure 8 A hardware structure block diagram of a skill category analysis device provided in an embodiment of the present application, referring to Figure 8 ,The hardware structure of the skill category analysis device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0175] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;
[0176] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;
[0177] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0178] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to:
[0179] Get user input information;
[0180] Inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category;
[0181] The skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category;
[0182] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0183] and / or,
[0184] Get user input information;
[0185] Obtaining a skill intent classification result for each skill category corresponding to the user input information, wherein the skill intent classification result for each skill category corresponding to the user input information represents a probability that the user input information belongs to each skill intent included in the skill category and a probability that the user input information does not belong to the skill category;
[0186] Inputting the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category;
[0187] Using the skill intention classification results of each skill category corresponding to the user input information, adjusting the first probability that the user input information belongs to each skill category, to obtain the probability that the user input information belongs to each skill category;
[0188] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0189] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0190] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:
[0191] Get user input information;
[0192] Inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category;
[0193] The skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category;
[0194] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0195] and / or,
[0196] Get user input information;
[0197] Obtaining a skill intent classification result for each skill category corresponding to the user input information, wherein the skill intent classification result for each skill category corresponding to the user input information represents a probability that the user input information belongs to each skill intent included in the skill category and a probability that the user input information does not belong to the skill category;
[0198] Inputting the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category;
[0199] Using the skill intention classification results of each skill category corresponding to the user input information, adjusting the first probability that the user input information belongs to each skill category, to obtain the probability that the user input information belongs to each skill category;
[0200] The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
[0201] Optionally, the detailed functions and extended functions of the program may refer to the above description.
[0202] 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 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 device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0203] 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.
[0204] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A skill category analysis method, characterized in that: The method comprises: Acquire user input information, where the user input information includes at least any one of voice, text, and video; Inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category; The skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, and the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category; when the skill category is music, the skill intention at least includes: playing specific music and playing music randomly; when the skill category is film and television, the skill intention at least includes: playing specific videos and playing videos randomly; when the skill category is navigation, the skill intention at least includes: navigation, and the skill intention of each skill category includes rejection intention; Determining the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category; The training method of the skill category analysis model includes: Inputting the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category; For each skill category, based on the skill intention classification result of the skill category corresponding to the training data, calculate the probability that the training data does not belong to the skill category; Using the probability that the training data does not belong to the skill category as a penalty term for the first probability that the training data belongs to each skill category, and calculating a second probability that the training data belongs to each skill category; The skill category analysis model is obtained by training with the second probability that the training data belongs to each of the skill categories and the label that is close to the training data belonging to each of the skill categories as the training target.
2. The method according to claim 1, characterized in that The calculating the probability that the training data does not belong to the skill category based on the skill intention classification result of the skill category corresponding to the training data includes: Calculate the probability that the training data belongs to the skill category by using the skill intention classification result of the skill category corresponding to the training data; The probability that the training data belongs to the skill category is used to calculate the probability that the training data does not belong to the skill category.
3. The method according to claim 2, characterized in that The calculating the probability that the training data belongs to the skill category by using the skill intention classification result of the skill category corresponding to the training data includes: The probability that the training data belongs to the skill category is calculated by using the maximum probability among the probabilities that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category.
4. A skill category analysis method, characterized in that: The method comprises: Acquire user input information, where the user input information includes at least any one of voice, text, and video; Obtain the skill intention classification results of each skill category corresponding to the user input information, the skill intention classification results of each skill category corresponding to the user input information represent the probability that the user input information belongs to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category; wherein, when the skill category is music, the skill intention at least includes: playing specific music and playing music randomly; when the skill category is film and television, the skill intention at least includes: playing specific videos and playing videos randomly; when the skill category is navigation, the skill intention at least includes: navigation, and the skill intention of each skill category includes rejection intention; Inputting the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category; Using the skill intention classification results of each skill category corresponding to the user input information, adjusting the first probability that the user input information belongs to each skill category, to obtain the probability that the user input information belongs to each skill category; The skill category to which the user input information belongs is determined based on the probability that the user input information belongs to each skill category.
5. The method according to claim 4, characterized in that The step of adjusting the first probability that the user input information belongs to each skill category by using the skill intention classification result of each skill category corresponding to the user input information to obtain the probability that the user input information belongs to each skill category includes: For each skill category, using the skill intention classification result of the skill category corresponding to the user input information, calculate a second probability that the user input information belongs to the skill category; For each skill category, the first probability that the user input information belongs to the skill category is adjusted using the second probability that the user input information belongs to the skill category to obtain the probability that the user input information belongs to the skill category.
6. The method according to claim 5, characterized in that The calculating a second probability that the user input information belongs to the skill category by using the skill intention classification result of the skill category corresponding to the user input information includes: The second probability that the user input information belongs to the skill category is calculated by using the maximum probability among the probabilities of the user input information belonging to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category.
7. A skill category analysis device, characterized in that: The device comprises: A first acquisition unit, configured to acquire user input information, wherein the user input information includes at least one of voice, text, and video; A computing unit, for inputting the user input information into a skill category analysis model, wherein the skill category analysis model outputs the probability that the user input information belongs to each skill category; wherein the skill category analysis model is trained using the skill intention classification results of each skill category corresponding to the training data, wherein the skill intention classification results of each skill category corresponding to the training data represent the probability that the training data belongs to each skill intention included in the skill category and the probability that the training data does not belong to the skill category; wherein, when the skill category is music, the skill intention at least includes: playing specific music and playing music randomly; when the skill category is film and television, the skill intention at least includes: playing specific videos and playing videos randomly; when the skill category is navigation, the skill intention at least includes: navigation, and the skill intention of each skill category includes a rejection intention; A first determining unit, configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category; The training method of the skill category analysis model includes: Inputting the training data into the skill category analysis model to obtain a first probability that the training data belongs to each skill category; For each skill category, based on the skill intention classification result of the skill category corresponding to the training data, calculate the probability that the training data does not belong to the skill category; Using the probability that the training data does not belong to the skill category as a penalty term for the first probability that the training data belongs to each skill category, and calculating a second probability that the training data belongs to each skill category; The skill category analysis model is obtained by training with the second probability that the training data belongs to each of the skill categories and the label that is close to the training data belonging to each of the skill categories as the training target.
8. A skill category analysis device, characterized in that: The device comprises: A second acquisition unit, configured to acquire user input information, wherein the user input information includes at least one of voice, text, and video; A skill intention classification result acquisition unit is used to obtain the skill intention classification results of each skill category corresponding to the user input information, and the skill intention classification result of each skill category corresponding to the user input information represents the probability that the user input information belongs to each skill intention included in the skill category and the probability that the user input information does not belong to the skill category; wherein, when the skill category is music, the skill intention at least includes: playing specific music and playing music randomly; when the skill category is film and television, the skill intention at least includes: playing specific videos and playing videos randomly; when the skill category is navigation, the skill intention at least includes: navigation, and the skill intention of each skill category includes rejection intention; a skill category analysis unit, configured to input the user input information into a skill category analysis model to obtain a first probability that the user input information belongs to each skill category; an adjusting unit, configured to adjust the first probability that the user input information belongs to each skill category by using the skill intention classification result of each skill category corresponding to the user input information, so as to obtain the probability that the user input information belongs to each skill category; The second determining unit is configured to determine the skill category to which the user input information belongs based on the probability that the user input information belongs to each skill category.
9. A skill category analysis device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the skill category analysis method as described in any one of claims 1 to 3, and / or the various steps of the skill category analysis method as described in any one of claims 4 to 6.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the skill category analysis method according to any one of claims 1 to 3 and / or the various steps of the skill category analysis method according to any one of claims 4 to 6 are implemented.
Citation Information
Patent Citations
Sentence category recognition method and device, storage medium, and processor
CN109033078A