Methods, apparatus, media, and program products for generating intent recognition models
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2026-08-14
AI Technical Summary
[0013]应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
Smart Images

Figure CN113886543B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer science, specifically to natural language processing, intelligent search and deep learning, and in particular to a method, apparatus, medium and program product for generating an intent recognition model. Background Technology
[0002] Intent recognition falls under the technical category of natural language understanding. It refers to identifying and processing user statements to output the true intent expressed by the user. Currently, the main methods for intent recognition include:
[0003] (1) Machine learning-based method. This method segments the search information into words and combines the characteristics of the Uniform Resource Locator (URL) and category characteristics of the search information for feature cross-referencing. Finally, it uses machine learning algorithms such as logistic regression (LR) / random forest (RF) for binary classification to achieve intent recognition.
[0004] (2) Deep learning-based methods, which are based on Long Short-Term Memory (LSTM) networks or BERT (Bidirectional Encoder Representations from Transformers) for pre-training to achieve intent recognition. Summary of the Invention
[0005] This disclosure presents a method, apparatus, medium, and program product for generating an intent recognition model.
[0006] In a first aspect, embodiments of this disclosure propose a method for generating an intent recognition model, comprising: obtaining a vector of search information, a vector of core words in the search information, and a vector of non-core words in the search information; obtaining a user type recognition feature vector based on the vector of search information and the vector of core words; and obtaining a question-and-answer request recognition feature vector based on the vector of search information and the vector of non-core words; and training the model using the user type recognition feature vector and the corresponding user type label, and the question-and-answer request recognition feature vector and the corresponding question-and-answer request label to obtain an intent recognition model.
[0007] Secondly, embodiments of this disclosure propose a method for generating question-and-answer responses, comprising: acquiring search information to be predicted, and core words and non-core words in the search information to be predicted; inputting the search information to be predicted, core words, and non-core words into a pre-trained word vector model to obtain vectors of the search information to be predicted, vectors of core words, and vectors of non-core words; obtaining user type identification feature vectors based on the vectors of the search information to be predicted and the vectors of core words; and obtaining question-and-answer request identification feature vectors based on the vectors of the search information to be predicted and the vectors of non-core words; inputting the user type identification feature vectors and the question-and-answer request identification feature vectors into a pre-trained intent recognition model to obtain user type labels corresponding to the user type identification feature vectors and question-and-answer request labels corresponding to the question-and-answer request identification feature vectors; and determining corresponding response information based on the user type labels, core words, and non-core words in response to the question-and-answer request label indicating a question-and-answer request.
[0008] Thirdly, embodiments of this disclosure propose an apparatus for generating an intent recognition model, comprising: a vector acquisition module configured to acquire vectors of search information, vectors of core words in the search information, and vectors of non-core words in the search information; a vector obtaining module configured to obtain user type recognition feature vectors based on the vectors of search information and the vectors of core words; and to obtain question-and-answer request recognition feature vectors based on the vectors of search information and the vectors of non-core words; and a model training module configured to train the intent recognition model using the user type recognition feature vectors and corresponding user type labels, and the question-and-answer request recognition feature vectors and corresponding question-and-answer request labels.
[0009] Fourthly, embodiments of this disclosure propose an apparatus for generating question-and-answer responses, comprising: an information acquisition module configured to acquire search information to be predicted, and core words and non-core words in the search information to be predicted; a vector extraction module configured to input the search information to be predicted, core words, and non-core words into a pre-trained word vector model to obtain vectors of the search information to be predicted, vectors of the core words, and vectors of the non-core words; and a vector obtaining module configured to obtain a user type identification feature vector based on the vectors of the search information to be predicted and the vectors of the core words; and to obtain a vector based on the vectors of the search information to be predicted and the vectors of the non-core words. The module obtains a question-and-answer request feature vector; the labeling module is configured to input the user type identification feature vector and the question-and-answer request identification feature vector into a pre-trained intent recognition model to obtain the user type label corresponding to the user type identification feature vector and the question-and-answer request label corresponding to the question-and-answer request identification feature vector, wherein the question-and-answer request label is used to characterize whether the search information to be predicted has a question-and-answer request; the response determination module is configured to determine the corresponding response information based on the user type label, core words, and non-core words corresponding to the user type identification feature vector, in response to the question-and-answer request request label corresponding to the question-and-answer request identification feature vector being a preset label indicating a question-and-answer request.
[0010] Fifthly, embodiments of this disclosure provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods described in the first or second aspect.
[0011] In a sixth aspect, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods described in the first or second aspect.
[0012] In a seventh aspect, embodiments of this disclosure provide a computer program product including a computer program that, when executed by a processor, implements the method as described in the first or second aspect.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. Wherein:
[0015] Figure 1 This is an exemplary system architecture diagram to which this disclosure can be applied;
[0016] Figure 2 This is a flowchart of an embodiment of a method for generating an intent recognition model according to the present disclosure;
[0017] Figure 3 This is a schematic diagram of a method for generating an intent recognition model;
[0018] Figure 4 This is a flowchart of an embodiment of a method for generating an intent recognition model according to the present disclosure;
[0019] Figure 5 This is a diagram illustrating the extraction of core words;
[0020] Figure 6 This is a flowchart of an embodiment of a method for generating question-and-answer responses according to this disclosure;
[0021] Figure 7 This is a schematic diagram of the structure of an embodiment of an apparatus for generating an intent recognition model according to the present disclosure;
[0022] Figure 8 This is a schematic diagram of one embodiment of the apparatus for generating question-and-answer responses according to the present disclosure;
[0023] Figure 9 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation
[0024] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] Figure 1 An exemplary system architecture 100 is shown, illustrating embodiments of methods and apparatus for generating intent recognition models or methods and apparatus for generating question-and-answer responses that can be applied according to the present disclosure.
[0027] like Figure 1As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0028] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to obtain vectors of search information, vectors of core words in the search information, and vectors of non-core words in the search information. Various client applications and intelligent interactive applications, such as search applications and search software, can be installed on terminal devices 101, 102, and 103.
[0029] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be electronic products that allow human-computer interaction with users through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting devices. Examples include PCs (Personal Computers), mobile phones, smartphones, PDAs (Personal Digital Assistants), wearable devices, PPCs (Pocket PCs), tablets, smart car systems, smart TVs, smart speakers, laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.
[0030] Server 105 can provide various services. For example, server 105 can obtain vectors of search information, vectors of core words in the search information, and vectors of non-core words in the search information; based on the vectors of search information and the vectors of core words, it can obtain user type identification feature vectors; and based on the vectors of search information and the vectors of non-core words, it can obtain question-and-answer request identification feature vectors; and by using the user type identification feature vectors and corresponding user type labels, and the question-and-answer request identification feature vectors and corresponding question-and-answer request labels, it can train an intent recognition model.
[0031] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0032] It should be noted that the method for generating an intent recognition model or the method for generating a question-and-answer response provided in this embodiment of the present disclosure is generally executed by the server 105. Accordingly, the apparatus for generating an intent recognition model or the apparatus for generating a question-and-answer response is generally located in the server 105.
[0033] It should be understood that Figure 1 The number of electronic devices, networks, and servers shown is merely illustrative. Any number of electronic devices, networks, and servers can be included depending on implementation needs.
[0034] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of a method for generating an intent recognition model according to the present disclosure. The method for generating an intent recognition model may include the following steps:
[0035] Step 201: Obtain the vector of the search information, the vector of the core words in the search information, and the vector of the non-core words in the search information.
[0036] In this embodiment, the execution entity of the method for generating the intent recognition model (e.g.) Figure 1 The server 105 shown can first be accessed from a terminal device (e.g., Figure 1 The terminal devices 101, 102, and 103 shown acquire search information; then, they segment the search information to obtain core words and non-core words, or extract core words and non-core words from the search information; subsequently, they convert the search information, core words, and non-core words into corresponding vectors to obtain vectors for the search information, vectors for the core words, and vectors for the non-core words. Alternatively, the execution entity of the method for generating the intent recognition model (e.g., Figure 1 The terminal devices 101, 102, and 103 shown can first obtain the search information entered by the user from the search box or interface of the map software or navigation software on the terminal device; then, the search information is segmented to obtain the core words and non-core words in the search information, or the core words and non-core words are extracted from the search information; then, the search information, core words, and non-core words are converted into corresponding vectors to obtain the vector of the search information, the vector of the core words, and the vector of the non-core words.
[0037] Here, information can be searched for on terminal devices (e.g., Figure 1The search information entered by the user of the terminal devices 101, 102, and 103 on their search box or interface; or the search information entered by the user through voice input, can be used to represent the user's search needs; or, the search information can include information composed of any characters, such as Chinese characters, English characters, symbols, etc.; wherein, the vector of the search information can be obtained by vector transformation of the search information. The aforementioned core words can be entity words used to represent the user's query needs, and these entity words generally have specific meanings, such as "ballpoint pen," and the vector of the core word can be obtained by vector transformation of the core word; the aforementioned non-core words can be words used to represent whether the user has a question-and-answer requirement, such as rhetorical questions in the search information, and the vector of the non-core word can be obtained by vector transformation of the non-core word.
[0038] In one example, pre-trained word vector models, such as word2vector, CBOW (Continuous Bag-of-Words Model), or Skip-Gram, are used to convert search information, core words, and non-core words into corresponding vectors of search information, vectors of core words, and vectors of non-core words.
[0039] The technical solutions disclosed herein involve the collection, storage, use, processing, transmission, provision, and disclosure of search information, core terms, and non-core terms, all of which comply with relevant laws and regulations and do not violate public order and good morals.
[0040] Step 202: Based on the vectors of search information and the vectors of core words, obtain the user type identification feature vector; and based on the vectors of search information and the vectors of non-core words, obtain the question-and-answer requirement identification feature vector.
[0041] In this embodiment, the aforementioned execution entity can obtain a user type identification feature vector based on the vector of search information and the vector of core words; and obtain a question-and-answer requirement identification feature vector based on the vector of search information and the vector of non-core words.
[0042] Here, the vectors of search information and core words are merged to obtain a user type identification feature vector. This user type identification feature vector can be used to identify terminal devices (e.g.,...). Figure 1 The user types of the terminal devices 101, 102, and 103 shown can be categorized as follows: To B (To Business) refers to services offered to businesses or specific user groups, such as providing related services to businesses. To C (To Customer) refers to services offered to end customers, such as individual consumers.
[0043] Taking the vectors of search information and core words as an example, vector merging methods can include: concatenating the vectors of search information and core words before and after; or averaging the vectors of search information and core words; or randomly selecting vector information from the vectors of search information and core words and concatenating these randomly selected information.
[0044] Here, the vectors of search information and non-core words are merged to obtain the question-and-answer request identification feature vector. This feature vector can be used to characterize whether the search information contains a question-and-answer request.
[0045] In one example, Figure 3 In this process, core words are extracted from the search information using BERT (Bidirectional Encoder Representations from Transformers) to obtain core words and non-core words. Then, using BERT, vector transformations are performed on the core words, search information, and non-core words to obtain vectors for the core words, search information, and non-core words. Next, the vectors of the core words and the search information are merged to obtain a user type identification feature vector, which can be used to identify the user type targeted by the search information. Finally, the vectors of the non-core words and the search information are merged to obtain a question-and-answer requirement identification feature vector, which can be used to identify whether the search information contains question-and-answer requirements.
[0046] Correspondingly, in this example, the core and non-core words extracted by BERT can be pre-trained using a BERT pre-training model to finally extract vectorized results (i.e., vectors of search information, vectors of core words, and vectors of non-core words). Then, to simultaneously identify user type and question-and-answer needs, the vectors of search information and core words can be merged to obtain a user type identification feature vector, and the vectors of search information and non-core words can be merged to obtain a question-and-answer need identification feature vector. This preserves the inherent feature vectors of the search information itself. Since the core words in the search information largely determine whether it corresponds to a user type or industry, using the vector of core words as a constraint on the vector of search information allows for more accurate identification of the user type. Because question-and-answer needs are largely composed of modifiers (words other than core words), these words largely determine whether the search information is relevant to a question and answer. Using the vector of non-core words as a constraint on the vector of search information allows for precise identification of whether the search information corresponds to a question and answer need. Therefore, it is possible to efficiently and accurately identify both the user type and the question-and-answer need of the search information simultaneously.
[0047] In the embodiments of this disclosure, feature extraction is performed on the same search information. Based on this, the extracted features are shared. Then, user type identification features are added to identify user types, and question-and-answer request identification features are added to identify question-and-answer requests. Finally, the user type identification and question-and-answer request identification are merged and trained to obtain an intent recognition model capable of highly accurate identification of both user types and question-and-answer requests. This allows for the identification of both the target user type of the search information and whether the search information contains question-and-answer requests.
[0048] Step 203: Train the intent recognition model using the user type recognition feature vector and the corresponding user type label, as well as the question-and-answer request recognition feature vector and the corresponding question-and-answer request label.
[0049] In this embodiment, the execution entity can train an intent recognition model using user type identification feature vectors and corresponding user type labels, as well as question-and-answer request identification feature vectors and corresponding question-and-answer request labels. During training, the execution entity can use the user type identification feature vectors and question-and-answer request identification feature vectors as inputs to the intent recognition model, and the user type labels corresponding to the user type identification feature vectors and the question-and-answer request labels corresponding to the question-and-answer request identification feature vectors as the expected outputs, thus obtaining the intent recognition model. The aforementioned machine learning model can be a probabilistic model, classification model, or other classifier from existing or future technologies. For example, the machine learning model can include any of the following: decision tree model (XGBoost), logistic regression model (LR), or deep neural network model (DNN).
[0050] It should be noted that the intent recognition model described above uses shared data (i.e., the same search information) for training. Furthermore, it adds user type recognition feature vectors to the shared features (i.e., the same search information) for user type recognition, and adds question-and-answer request recognition feature vectors to the shared features for question-and-answer request recognition. Therefore, this intent recognition model is an end-to-end model. This intent recognition model can be a multi-label recognition model.
[0051] The method for generating an intent recognition model provided in this disclosure first obtains the vector of search information, the vector of core words in the search information, and the vector of non-core words in the search information; then, based on the vector of search information and the vector of core words, a user type identification feature vector is obtained; and based on the vector of search information and the vector of non-core words, a question-and-answer request identification feature vector is obtained; finally, the user type identification feature vector and the corresponding user type label, and the question-and-answer request identification feature vector and the corresponding question-and-answer request label are used for training to obtain the intent recognition model. This method enables feature extraction from the same search information to share extracted features; based on the shared features, user type identification feature vectors are added to identify user types, and question-and-answer request identification feature vectors are added to identify question-and-answer requests; finally, the user type identification and question-and-answer request identification features are merged and trained to obtain a highly accurate intent recognition model for identifying user types and question-and-answer requests.
[0052] Further reference Figure 4 , Figure 4 A flow 400 of another embodiment of a method for generating an intent recognition model according to the present disclosure is shown. The method for generating an intent recognition model may include the following steps:
[0053] Step 401: Obtain the vector of the search information, the vector of the core words in the search information, and the vector of the non-core words in the search information.
[0054] Step 402: Based on the vector of search information and the vector of core words, obtain the user type identification feature vector; and based on the vector of search information and the vector of non-core words, obtain the question-and-answer requirement identification feature vector.
[0055] Step 403: Input the user type identification feature vector and the question-and-answer requirement identification feature vector into the intent recognition model to obtain the prediction results corresponding to the user type identification feature vector and the question-and-answer requirement identification feature vector.
[0056] In this embodiment, the execution entity of the method for generating the intent recognition model (e.g.) Figure 1 The terminal devices 101, 102, 103 or server 105 shown input the user type identification feature vector and the question-and-answer requirement identification feature vector into the intent recognition model respectively to obtain the prediction results corresponding to the user type identification feature vector and the prediction results corresponding to the question-and-answer requirement identification feature vector.
[0057] In one example, inputting user type identification feature vectors and question-and-answer request identification feature vectors into an intent recognition model to obtain prediction results for the user type identification feature vectors and the question-and-answer request identification feature vectors can include: inputting the user type identification feature vectors into a first network of the intent recognition model to obtain prediction results for the user type identification feature vectors; and inputting the question-and-answer request identification feature vectors into a second network of the intent recognition model to obtain prediction results for the question-and-answer request identification feature vectors. The first network can be used in a neural network for predicting user type identification feature vectors, such as a user type identification network. The second network can be used in a neural network for predicting question-and-answer request identification feature vectors, such as a question-and-answer request identification network.
[0058] Step 404: Determine the loss function based on the prediction results and user type labels corresponding to the user type identification feature vectors, and the prediction results and question-and-answer requirement labels corresponding to the question-and-answer requirement identification feature vectors.
[0059] In this embodiment, the execution entity can determine the loss function based on the prediction results and user type labels corresponding to the user type identification feature vector, and the prediction results and question-and-answer requirement labels corresponding to the question-and-answer requirement identification feature vector.
[0060] In one example, an initial loss function can be pre-established. Then, the predicted results and user type labels corresponding to the user type identification feature vector, as well as the predicted results and question-and-answer requirement labels corresponding to the question-and-answer requirement identification feature vector, are fed into the initial loss function to adjust the parameters of the initial loss function and obtain the final loss function.
[0061] Step 405: Adjust the parameters of the intent recognition model based on the loss function until the loss function converges, and obtain the trained intent recognition model.
[0062] In this embodiment, the execution entity can calculate whether the output of the loss function meets a preset iteration cutoff condition. If the output of the loss function does not meet the preset iteration cutoff condition, the parameters of the intent recognition model are adjusted until the output of the adjusted loss function meets the preset iteration cutoff condition. Only then is the model at this point considered the finally trained model. The preset iteration cutoff condition can be a preset number of iterations or set according to the recognition accuracy of the intent recognition model.
[0063] In this embodiment, the specific operations of steps 401-402 have been described in detail below. Figure 2 Steps 201-202 in the illustrated embodiments are described in detail and will not be repeated here.
[0064] from Figure 4 It can be seen from this that, with Figure 2 Compared to the corresponding embodiments, the method for generating the intent recognition model in this embodiment emphasizes the step of training the intent recognition model. Therefore, the scheme described in this embodiment inputs the user type identification feature vector and the question-and-answer request identification feature vector into the intent recognition model respectively, obtaining the prediction results corresponding to the user type identification feature vector and the question-and-answer request identification feature vector. Then, based on the prediction results and user type labels corresponding to the user type identification feature vector, and the prediction results and question-and-answer request labels corresponding to the question-and-answer request identification feature vector, a loss function is determined. Subsequently, the parameters of the intent recognition model are adjusted based on the loss function until the loss function converges, resulting in a trained intent recognition model. This model can identify user types based on user type identification features and question-and-answer request features based on question-and-answer request identification features. Finally, the identification of user types and question-and-answer requests are combined and trained to obtain an intent recognition model capable of highly accurate identification of user types and question-and-answer requests. Thus, it can identify both the user type targeted by the search information and whether the search information contains question-and-answer requests.
[0065] In some optional implementations of this embodiment, determining the loss function based on the prediction results and user type labels corresponding to the user type identification feature vector, and the prediction results and question-and-answer requirement labels corresponding to the question-and-answer requirement identification feature vector may include: determining the loss function based on the prediction results, user type labels, and corresponding first weights corresponding to the user type identification feature vector, and the prediction results, question-and-answer requirement labels, and corresponding second weights corresponding to the question-and-answer requirement identification feature vector.
[0066] In this implementation, the aforementioned execution entity can determine the loss function based on the prediction result corresponding to the user type identification feature vector, the user type label and the corresponding first weight, and the prediction result corresponding to the question-and-answer requirement identification feature vector, the question-and-answer requirement label and the corresponding second weight.
[0067] In this implementation, the aforementioned execution entity can set a first weight and a second weight based on the user's needs or the recognition accuracy of the intent recognition model.
[0068] In one example, the formula for the loss function is as follows:
[0069] loss all = a*loss1 + b*loss2
[0070] Where a (i.e., the first weight) and b (i.e., the second weight) are the weights of loss1 for user type identification and loss2 for question-and-answer requirement identification, respectively.
[0071] In this implementation, the aforementioned execution entity can determine the loss function based on the prediction results corresponding to the user type identification feature vector, the user type label and the corresponding first weight, and the prediction results corresponding to the question-and-answer requirement identification feature vector, the question-and-answer requirement label and the corresponding second weight.
[0072] In some optional implementations of this embodiment, the sum of the first weight and the second weight is 1.
[0073] In this implementation, the sum of the first weight and the second weight can be set to 1, thereby allowing for flexible adjustment of the recognition accuracy of the intent recognition model.
[0074] In some optional implementations of this embodiment, obtaining the vectors of search information, the vectors of core words in the search information, and the vectors of non-core words in the search information may include: obtaining search information; extracting core words and non-core words from the search information; and inputting the search information, core words, and non-core words into a pre-trained word vector model to obtain the vectors of search information, the vectors of core words, and the vectors of non-core words.
[0075] In this implementation, the execution entity can preprocess multiple search results, for example, by filtering out abnormal symbols; or by directly filtering out search results with a character count less than a first preset threshold or a character count greater than a second preset threshold. Then, the preprocessed search results are processed using BERT to extract core words, resulting in core words, non-core words, and the preprocessed search results themselves. The word vector model can be word2vector, CBOW (Continuous Bag-of-Words Model), or Skip-Gram.
[0076] It should be noted that the first preset character count threshold and the second preset character count threshold can be randomly set numbers or set according to the accuracy of the search information recognition. The aforementioned first preset character count threshold and second preset character count threshold can be used to filter out search information containing a character count less than the first preset character count threshold or greater than the second preset character count threshold.
[0077] In this implementation, multiple search information can be preprocessed to obtain processed search information; then, a pre-trained word vector model is used to determine the vectors of the search information, the vectors of the core words in the search information, and the vectors of the non-core words in the search information.
[0078] In some optional implementations of this embodiment, if there are multiple search information items, extracting core words and non-core words from the search information may include: in response to the proportion of non-Chinese characters in the target search information being less than or equal to a second preset value, extracting core words and non-core words from the target search information, wherein the target search information is the search information in which the ratio of the number of core words extracted from the target search information to the number of multiple search information items is greater than a first preset value.
[0079] In this implementation, the execution entity needs to determine in advance whether the ratio of the number of core words to the number of multiple search information is greater than a first preset value when extracting core words. If the ratio of the number of core words to the number of multiple search information in the target search is greater than the first preset value, it needs to determine whether the proportion of non-Chinese characters in the target search information is greater than a second preset value. If the proportion of non-Chinese characters in the target search information is greater than the second preset value, core words are not extracted from the target search information.
[0080] It should be noted that before extracting core words from the search information, it can be first determined whether the ratio of the number of core words in the target search information to the number of multiple search results is greater than a first preset value; if the ratio is determined to be greater than the first preset value, then it can be determined whether the proportion of non-Chinese characters in the target search information is greater than a second preset value. The first and second preset values can be set by the user or based on the recognition accuracy of the intent recognition model. Optionally, the first preset value can be 0.85, and the second preset value can be 0.85.
[0081] In one example, Figure 5 In the process of extracting core words from multiple search results, if the ratio of the number of core words in the target search result to the number of multiple search results is greater than a first preset value, and the proportion of non-Chinese characters in the target search result is greater than a second preset value, then core word extraction will not be performed on the target search result; if the proportion of non-Chinese characters in the target search result is less than or equal to the second preset value, core word extraction will be performed on the target search result to obtain core words and non-core words.
[0082] It should be noted that the non-Chinese percentage can be the proportion of all characters in the target search information that are not Chinese characters.
[0083] In this implementation, to retain all information in the search results, BERT is used to extract the search information, dividing the extracted results into core word and non-core word parts. Since search results for user types, such as the electronics and chemical industries, contain a large number of numbers and English characters, core word extraction can easily be ineffective. A common approach to this is to increase training samples, but search results composed of Chinese, English, and numbers are difficult to learn from, and adding more samples does not improve extraction performance. For the core word extraction results mentioned above, the method first calculates whether the ratio of the number of extracted core words to the number of search results is greater than a first preset value. For these target search results (i.e., the ratio of the number of core words to the number of search results is greater than the first preset value), the method then calculates the proportion of non-Chinese characters in the target search results. If the proportion of non-Chinese characters in the target search results is greater than a second preset value, core word extraction is not performed on these target search results. This method efficiently and conveniently addresses the problem of inaccurate core word extraction in industries such as electronics and chemicals due to the varied composition of search information.
[0084] Further reference Figure 6 , Figure 6 A flow 600 of an embodiment of a method for generating question-and-answer responses according to the present disclosure is shown. The method for generating question-and-answer responses may include the following steps:
[0085] Step 601: Obtain the search information to be predicted, as well as the core words and non-core words in the search information to be predicted.
[0086] In this implementation, the execution body of the method for generating question-and-answer responses (e.g.) Figure 1 The terminal devices 101, 102, and 103 shown can first acquire the search information to be predicted; then, they can extract the core words and non-core words from the search information. This search information can then be used by a pre-trained intent recognition model to predict user type and question-answering needs.
[0087] It should be noted that the core words and non-core words in the search information to be predicted can be extracted using a pre-trained BERT algorithm.
[0088] In one example, extracting core and non-core words from the search information to be predicted can include: using a pre-trained word vector model to extract core and non-core words from the search information to be predicted.
[0089] It should be noted that the executing entity of the method for generating question-and-answer responses and the executing entity of the method for generating the intent recognition model can be the same or different. When the executing entity of the method for generating question-and-answer responses and the executing entity of the method for generating the intent recognition model are different, the executing entity of the method for generating the intent recognition model can transmit the intent recognition model to the executing entity of the method for generating question-and-answer responses.
[0090] Step 602: Input the search information to be predicted, core words, and non-core words into the pre-trained word vector model to obtain the vectors of the search information to be predicted, the vectors of the core words, and the vectors of the non-core words.
[0091] In this embodiment, the execution entity inputs the search information to be predicted, as well as the core words and non-core words in the search information to be predicted, into a pre-trained word vector model to obtain the vectors of the search information to be predicted, the vectors of the core words, and the vectors of the non-core words.
[0092] It should be noted that the pre-trained word vector model can be referred to the description of the pre-trained word vector model above, and will not be repeated here.
[0093] Step 603: Based on the vector of the search information to be predicted and the vector of the core words, obtain the user type identification feature vector; and based on the vector of the search information to be predicted and the vector of the non-core words, obtain the question-answering requirement identification feature vector.
[0094] In this embodiment, the execution entity can merge the vector of the search information to be predicted with the vector of the core words to obtain the user type identification feature vector; and merge the vector of the search information to be predicted with the vector of the non-core words to obtain the question-answering requirement identification feature vector.
[0095] Step 604: Input the user type identification feature vector and the question-and-answer requirement identification feature vector into the pre-trained intent recognition model to obtain the user type label corresponding to the user type identification feature vector and the question-and-answer requirement label corresponding to the question-and-answer requirement identification feature vector.
[0096] In this embodiment, the aforementioned execution entity can input the user type identification feature vector and the question-and-answer requirement identification feature vector into a pre-trained intent recognition model to obtain the user type label corresponding to the user type identification feature vector and the question-and-answer requirement label corresponding to the question-and-answer requirement identification feature vector. The question-and-answer requirement label can be used to characterize whether the search information to be predicted has a question-and-answer requirement. This question-and-answer requirement label can be represented by 0 and 1; for example, 1 indicates a question-and-answer requirement, and 0 indicates no question-and-answer requirement.
[0097] Step 605: In response to the question-and-answer demand tag indicating a question-and-answer demand, determine the corresponding response information based on the user type tag, core keywords, and non-core keywords.
[0098] In this embodiment, when the question-and-answer request tag is determined to indicate a question-and-answer request, the corresponding response information is determined based on the user type tag, core words, and non-core words corresponding to the user type identification feature vector.
[0099] In one example, a knowledge graph can be pre-built based on user type and question-and-answer requirements. When the user type identification feature vector corresponds to the user type label, and the question-and-answer requirement feature vector corresponds to the question-and-answer requirement label, and the question-and-answer requirement label indicates a question-and-answer requirement, the corresponding response information is retrieved from the knowledge graph. This response information can be presented in different styles depending on the user type; for example, it can be presented as an email, an SMS, or a new interface, providing a customized experience for the user.
[0100] The method for generating question-and-answer responses provided in this embodiment can identify the user type and question-and-answer needs of the search information to be predicted through a pre-trained intent recognition model. When the question-and-answer need tag is "question-and-answer need", the corresponding question-and-answer response can be determined based on the user type tag, as well as core words and non-core words.
[0101] Further reference Figure 7 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an apparatus for generating an intent recognition model, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0102] like Figure 7 As shown, the apparatus 700 for generating an intent recognition model in this embodiment may include: a vector acquisition module 701, a vector acquisition module 702, and a model training module 703. The vector acquisition module 701 is configured to acquire vectors of search information, vectors of core words in the search information, and vectors of non-core words in the search information; the vector acquisition module 702 is configured to obtain user type recognition feature vectors based on the vectors of the search information and the vectors of the core words; and to obtain question-and-answer request recognition feature vectors based on the vectors of the search information and the vectors of the non-core words; the model training module 703 is configured to train the intent recognition model using the user type recognition feature vectors and corresponding user type labels, and the question-and-answer request recognition feature vectors and corresponding question-and-answer request labels.
[0103] In this embodiment, the specific processing of the vector acquisition module 701, the vector acquisition module 702, and the model training module 703 in the apparatus 700 for generating the intent recognition model, and the resulting technical effects, can be found in the following references: Figure 2 The relevant descriptions of steps 201-203 in the corresponding embodiments will not be repeated here.
[0104] In some optional implementations of this embodiment, the model training module 703 includes: a result prediction unit, configured to input user type identification feature vector and question-and-answer requirement identification feature vector into the intent recognition model respectively, to obtain the prediction result corresponding to the user type identification feature vector and the prediction result corresponding to the question-and-answer requirement identification feature vector; a function determination unit, configured to determine a loss function based on the prediction result corresponding to the user type identification feature vector and the user type label, and the prediction result corresponding to the question-and-answer requirement identification feature vector and the question-and-answer requirement label; and a model training unit, configured to adjust the parameters of the intent recognition model based on the loss function until the loss function converges, thereby obtaining the trained intent recognition model.
[0105] In some optional implementations of this embodiment, the function determination module is further configured to: determine the loss function based on the prediction result, user type label and corresponding first weight corresponding to the user type identification feature vector, and the prediction result, question and answer requirement label and corresponding second weight corresponding to the question and answer requirement identification feature vector.
[0106] In some optional implementations of this embodiment, the sum of the first weight and the second weight is 1.
[0107] In some optional implementations of this embodiment, the vector extraction module 701 includes: a search information acquisition unit configured to acquire search information; a word extraction unit configured to extract core words and non-core words from the search information; and a vector obtaining unit configured to input the search information, core words, and non-core words into pre-trained word vectors to obtain vectors of the search information, vectors of the core words, and vectors of the non-core words.
[0108] In some optional implementations of this embodiment, the word extraction unit is further configured to: in response to the ratio of the number of extracted core words to the number of search information being greater than a first preset value, and the proportion of non-Chinese characters in the search information being greater than a second preset value, not extract core words and non-core words from the search information.
[0109] Further reference Figure 8 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a device for generating question-and-answer responses, which is similar to... Figure 6Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0110] like Figure 8 As shown, the device 800 for generating question-and-answer responses in this embodiment may include: an information acquisition module 801, a vector extraction module 802, a vector acquisition module 803, a tag acquisition module 804, and a response determination module 805. The information acquisition module 801 is configured to acquire the search information to be predicted, as well as the core words and non-core words in the search information; the vector extraction module 802 is configured to input the search information to be predicted, the core words, and the non-core words into a pre-trained word vector model to obtain vectors of the search information to be predicted, vectors of the core words, and vectors of the non-core words; the vector acquisition module 803 is configured to obtain user type identification feature vectors based on the vectors of the search information to be predicted and the vectors of the core words; and to obtain user type identification feature vectors based on the vectors of the search information to be predicted and the vectors of the non-core words. The system obtains a question-and-answer request identification feature vector; the labeling module 804 is configured to input the user type identification feature vector and the question-and-answer request identification feature vector into the pre-trained intent recognition model generated by the device, respectively, to obtain the user type label corresponding to the user type identification feature vector and the question-and-answer request label corresponding to the question-and-answer request identification feature vector, wherein the question-and-answer request label is used to characterize whether the search information to be predicted has a question-and-answer request; the response determination module 805 is configured to determine the corresponding response information based on the user type label, core words, and non-core words in response to the question-and-answer request label indicating that there is a question-and-answer request.
[0111] In this embodiment, the specific processing and technical effects of the information acquisition module 801, vector extraction module 802, vector acquisition module 803, tag acquisition module 804, and response determination module 805 in the question-and-answer response generation device 800 can be found in the following references. Figure 6 The relevant descriptions of steps 601-605 in the corresponding embodiments will not be repeated here.
[0112] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0113] Figure 9A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0114] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0115] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as methods for generating intent recognition models or methods for generating question-and-answer responses. For example, in some embodiments, the methods for generating intent recognition models or generating question-and-answer responses can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the methods for generating intent recognition models or generating question-and-answer responses described above can be performed. Alternatively, in other embodiments, the computing unit 901 may be configured by any other suitable means (e.g., by means of firmware) to perform a method for generating an intent recognition model or a method for generating a question-and-answer response.
[0117] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0121] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0122] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0123] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0124] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution mentioned in this disclosure can be achieved, and this is not limited herein.
[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for generating an intent recognition model, comprising: The vectors of search information, the vectors of core words in the search information, and the vectors of non-core words in the search information are obtained. The core words are used to represent entity words that represent the user's query needs, and the non-core words are used to represent words that represent whether the user has a question-and-answer requirement. The user type identification feature vector is obtained by merging the vector of search information and the vector of core words; and the question-answering requirement identification feature vector is obtained based on the vector of search information and the vector of non-core words. An intent recognition model is trained using user type identification feature vectors and corresponding user type labels, as well as question-and-answer request identification feature vectors and corresponding question-and-answer request labels. The process includes: inputting the user type identification feature vectors into a first network of the intent recognition model to obtain a prediction result corresponding to the user type identification feature vectors; inputting the question-and-answer request identification feature vectors into a second network of the intent recognition model to obtain a prediction result corresponding to the question-and-answer request identification feature vectors; determining a loss function based on the prediction results and user type labels, and the prediction results and question-and-answer request identification feature vectors; and adjusting the parameters of the intent recognition model based on the loss function until the loss function converges, thus obtaining a trained intent recognition model. The vectors for obtaining search information, the vectors of core words in the search information, and the vectors of non-core words in the search information include: The search information is segmented using the BERT model, and core and non-core words are extracted from the search information based on the segmentation results. The search information, the core words, and the non-core words are respectively input into a pre-trained word vector model to obtain vectors of the search information, vectors of the core words, and vectors of the non-core words. Wherein, if the number of search information items is multiple, the extraction of core words and non-core words from the search information includes: In response to the fact that the proportion of non-Chinese characters in the target search information is less than or equal to a second preset value, core words and non-core words are extracted from the target search information, wherein the target search information is the search information in which the ratio of the number of core words extracted from the target search information to the number of multiple search information is greater than a first preset value; The merging of the search information vector and the core word vector includes: Connect the vector of the search information and the vector of the core words together; or The vectors of the search information and the vectors of the core words are averaged; or Vector information is randomly selected from the vector of search information and the vector of core words, and the randomly selected vector information is concatenated.
2. The method according to claim 1, wherein, The step of determining the loss function based on the prediction result corresponding to the user type identification feature vector and the user type label, and the prediction result corresponding to the question-and-answer request identification feature vector and the question-and-answer request label, includes: The loss function is determined based on the prediction results, user type labels and corresponding first weights of the user type identification feature vector, and the prediction results, question and answer requirement labels and corresponding second weights of the question and answer requirement identification feature vector.
3. The method according to claim 2, wherein, The sum of the first weight and the second weight is 1.
4. A method for generating question-and-answer responses, comprising: Obtain the search information to be predicted, as well as the core words and non-core words in the search information to be predicted; The search information to be predicted, core words, and non-core words are respectively input into a pre-trained word vector model to obtain vectors of the search information to be predicted, vectors of core words, and vectors of non-core words. Based on the vectors of the search information to be predicted and the vectors of the core words, a user type identification feature vector is obtained; and based on the vectors of the search information to be predicted and the vectors of the non-core words, a question-and-answer requirement identification feature vector is obtained. The user type identification feature vector and the question-and-answer requirement identification feature vector are respectively input into the intent recognition model generated by the method described in any one of claims 1-3 to obtain the user type label corresponding to the user type identification feature vector and the question-and-answer requirement label corresponding to the question-and-answer requirement identification feature vector, wherein the question-and-answer requirement label is used to characterize whether the search information to be predicted has a question-and-answer requirement. In response to the question-and-answer request tag indicating a question-and-answer request, the corresponding response information is determined based on the user type tag, the core keywords, and the non-core keywords.
5. An apparatus for generating an intent recognition model, comprising: The vector acquisition module is configured to acquire vectors of search information, vectors of core words in the search information, and vectors of non-core words in the search information. The core words are used to represent entity words that represent the user's query needs, and the non-core words are used to represent words that represent whether the user has a question-and-answer requirement. The vector acquisition module is configured to merge the vector of search information and the vector of core words to obtain a user type identification feature vector; and to obtain a question-answering requirement identification feature vector based on the vector of search information and the vector of non-core words. The model training module is configured to train the intent recognition model using user type recognition feature vectors and corresponding user type labels, as well as question-and-answer request recognition feature vectors and corresponding question-and-answer request labels. The vector acquisition module includes: The word extraction unit is configured to use the BERT model to segment the search information into words, and extract core words and non-core words from the search information based on the segmentation results. The vector acquisition unit is configured to input the search information, the core words, and the non-core words into a pre-trained word vector model to obtain vectors of the search information, vectors of the core words, and vectors of the non-core words. Wherein, if the number of search information items is multiple, the word extraction unit is further configured to: In response to the fact that the proportion of non-Chinese characters in the target search information is less than or equal to a second preset value, core words and non-core words are extracted from the target search information, wherein the target search information is the search information in which the ratio of the number of core words extracted from the target search information to the number of multiple search information is greater than a first preset value; The vector acquisition module is further configured as follows: Connect the vector of the search information and the vector of the core words together; or The vectors of the search information and the vectors of the core words are averaged; or Randomly select vector information from the vector of the search information and the vector of the core words, and then concatenate the randomly selected vector information. The model training module includes: The first prediction unit is configured to input the user type identification feature vector into the first network of the intent recognition model to obtain the prediction result corresponding to the user type identification feature vector. The second prediction unit is configured to input the question-and-answer requirement identification feature vector into the second network of the intent recognition model to obtain the prediction result corresponding to the question-and-answer requirement identification feature vector. The function determination unit is configured to determine a loss function based on the prediction result corresponding to the user type identification feature vector and the user type label, as well as the prediction result corresponding to the question-and-answer request identification feature vector and the question-and-answer request label. The parameter adjustment unit is configured to adjust the parameters of the intent recognition model based on the loss function until the loss function converges, thereby obtaining the trained intent recognition model.
6. The apparatus according to claim 5, wherein, The function determination unit is further configured to: The loss function is determined based on the prediction results, user type labels and corresponding first weights of the user type identification feature vector, and the prediction results, question and answer requirement labels and corresponding second weights of the question and answer requirement identification feature vector.
7. The apparatus according to claim 6, wherein, The sum of the first weight and the second weight is 1.
8. An apparatus for generating question-and-answer responses, comprising: The information acquisition module is configured to acquire the search information to be predicted, as well as the core words and non-core words in the search information to be predicted; The vector extraction module is configured to input the search information to be predicted, core words, and non-core words into a pre-trained word vector model to obtain vectors of the search information to be predicted, vectors of core words, and vectors of non-core words. The vector acquisition module is configured to obtain a user type identification feature vector based on the vector of the search information to be predicted and the vector of the core words; and to obtain a question-answering requirement identification feature vector based on the vector of the search information to be predicted and the vector of the non-core words. The tag acquisition module is configured to input the user type identification feature vector and the question-and-answer requirement identification feature vector into the intent recognition model generated by the device as described in any one of claims 5-7, respectively, to obtain the user type tag corresponding to the user type identification feature vector and the question-and-answer requirement tag corresponding to the question-and-answer requirement identification feature vector, wherein the question-and-answer requirement tag is used to characterize whether the search information to be predicted has a question-and-answer requirement; The response confirmation module is configured to respond to the question-and-answer request tag indicating a question-and-answer request by determining the corresponding response information based on the user type tag, the core keywords, and the non-core keywords.
9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.
Citation Information
Patent Citations
Intention recognition method, device and computer readable storage medium
CN110472027A
Search intention recognition method and device, electronic equipment and storage medium
CN111310008A