Intention recognition method and device, electronic equipment, storage medium and program product

CN122925532APending Publication Date: 2026-10-16CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510430577.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本发明实施例提供一种意图识别方法、装置、电子设备、存储介质及程序产品,以解决相关技术中存在对用户意图识别准确率较低,导致回复准确率低的问题

Benefits of technology

[0103]In a sixth aspect, the present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps in the intent recognition method described in the first aspect above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925532A_ABST
    Figure CN122925532A_ABST
Patent Text Reader

Abstract

The application provides an intention recognition method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of communication. The method comprises the following steps: encoding a user question to obtain a first encoding vector; calculating the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, the plurality of questions correspond to the plurality of second encoding vectors one by one, and the plurality of questions are preset questions or extended questions extended based on the preset questions; determining a target question from the plurality of questions, wherein the target question is a question corresponding to a second encoding vector with the maximum similarity, and the target question matches the intention of the user question. The application can improve the intention recognition accuracy and in turn improve the reply accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically to an intent recognition method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] Operations and maintenance (O&M) systems are crucial for equipment operation and maintenance in the communications field. In related technologies, O&M systems utilize Large Language Models (LLMs). Upon receiving user queries, the LLM analyzes the problem and generates corresponding solutions. However, in these technologies, LLM models require extensive training data to accurately respond to user queries, and they sometimes fail to accurately identify user intent, resulting in poor accuracy in responding to user requests.

[0003] It is evident that the relevant technologies suffer from low accuracy in recognizing user intent, leading to low response accuracy. Summary of the Invention

[0004] This invention provides an intent recognition method, apparatus, electronic device, storage medium, and program product to address the problem of low accuracy in recognizing user intent in related technologies, which leads to low response accuracy.

[0005] To solve the above problems, the present invention is implemented as follows:

[0006] In a first aspect, embodiments of the present invention provide an intent recognition method, comprising:

[0007] The user's question is encoded to obtain the first encoding vector;

[0008] Calculate the similarity between the first encoding vector and multiple second encoding vectors, wherein the multiple second encoding vectors are encoding vectors corresponding to multiple questions included in the preset question template set, and the multiple questions correspond one-to-one with the multiple second encoding vectors, and the multiple questions are preset questions or extended questions based on the preset questions;

[0009] A target question is determined from the plurality of questions. The target question is the question corresponding to the second encoding vector with the highest similarity. The target question matches the intent of the user's question.

[0010] In one embodiment, the preset question template set includes response content for each question, and after determining the target question from the plurality of questions, the method further includes:

[0011] Query the preset question template set to obtain the response content corresponding to the target question;

[0012] Output the response content corresponding to the target question.

[0013] In one embodiment, the preset question template set is obtained in the following way:

[0014] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0015] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0016] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0017] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0018] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0019] The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0020] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0021] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0022] In one embodiment, encoding the user question to obtain a first encoded vector includes:

[0023] The user question is encoded using a target recognition model to obtain the first encoded vector. The target recognition model is a model that identifies questions within the target domain to which the user question belongs.

[0024] The target recognition model is obtained in the following way:

[0025] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0026] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0027] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0028] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0029] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0030] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0031] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0032] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0033] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0034] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0035] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0036] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0037] The target recognition model is generated based on the target weight matrix.

[0038] Secondly, embodiments of the present invention also provide an intent recognition device, comprising:

[0039] The encoding module is used to encode the user's question to obtain the first encoding vector;

[0040] The calculation module is used to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, and the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions;

[0041] A determination module is used to determine a target question from the plurality of questions, wherein the target question is the question corresponding to the second encoding vector with the highest similarity, and the target question matches the intent of the user question.

[0042] In one embodiment, the preset question template set includes response content corresponding to each question, and after the determination module, the intent recognition device further includes:

[0043] The query module is used to query the preset question template set and obtain the response content corresponding to the target question;

[0044] The sending module is used to output the response content corresponding to the target question.

[0045] In one embodiment, the preset question template set is obtained in the following way:

[0046] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0047] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0048] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0049] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0050] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of the following: synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0051] The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0052] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0053] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0054] In one embodiment, the encoding module includes:

[0055] An encoding unit is used to encode the user question based on a target recognition model to obtain a first encoding vector, wherein the target recognition model is a model for identifying questions in the target domain to which the user question belongs.

[0056] The target recognition model is obtained in the following way:

[0057] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0058] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0059] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0060] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0061] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0062] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0063] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0064] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0065] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0066] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0067] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0068] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0069] The target recognition model is generated based on the target weight matrix.

[0070] Thirdly, embodiments of the present invention also provide an electronic device, including a transceiver and a processor.

[0071] The processor is used to encode the user question to obtain a first encoding vector;

[0072] The processor is configured to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, wherein the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions;

[0073] The processor is configured to determine a target question from the plurality of questions, the target question being the question corresponding to the second encoding vector with the highest similarity, and the target question matching the intent of the user's question.

[0074] In one embodiment, the processor is further configured to query the preset question template set to obtain the response content corresponding to the target question;

[0075] The transceiver is used to output the response content corresponding to the target question.

[0076] In one embodiment, the preset question template set is obtained in the following way:

[0077] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0078] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0079] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0080] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0081] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of the following: synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0082] The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0083] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0084] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0085] In one embodiment, encoding the user question to obtain a first encoded vector includes:

[0086] The user question is encoded using a target recognition model to obtain the first encoded vector. The target recognition model is a model that identifies questions within the target domain to which the user question belongs.

[0087] The target recognition model is obtained in the following way:

[0088] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0089] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0090] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0091] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0092] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0093] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0094] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0095] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0096] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0097] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0098] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0099] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0100] The target recognition model is generated based on the target weight matrix.

[0101] Fourthly, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the intent recognition method described in the first aspect.

[0102] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the intent recognition method described in the first aspect.

[0103] In a sixth aspect, the present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps in the intent recognition method described in the first aspect above.

[0104] In this embodiment of the invention, the user question is encoded to obtain a first encoding vector; the similarity between the first encoding vector and a plurality of second encoding vectors is calculated, wherein the plurality of second encoding vectors are encoding vectors corresponding to multiple questions included in a preset question template set, and the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions; a target question is determined from the plurality of questions, and the target question is the question corresponding to the second encoding vector with the highest similarity, and the target question matches the intent of the user question. Thus, by expanding the preset question to obtain extended questions, the coverage of multiple questions in the domain is broadened; and by calculating similarity to determine the target question closest to the user question from the multiple questions, the accuracy of identifying the user question is improved, thereby increasing the accuracy of the response. Attached Figure Description

[0105] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0106] Figure 1 This is a flowchart of an intent recognition method provided in an embodiment of the present invention;

[0107] Figure 2 This is a flowchart of user problem identification provided in an embodiment of the present invention;

[0108] Figure 3 This is a structural diagram of an intent recognition device provided in an embodiment of the present invention;

[0109] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0110] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0111] In this embodiment of the invention, an intent recognition method, apparatus, electronic device, storage medium, and program product are provided to solve the problem of low accuracy in recognizing user intent in related technologies, which leads to low response accuracy.

[0112] See Figure 1 , Figure 1 This is a flowchart of an intent recognition method provided in an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0113] Step 101: Encode the user question to obtain the first encoding vector.

[0114] The aforementioned user questions are questions sent by the user through a terminal. These questions can be input by the user via voice, with the terminal directly sending the user's voice to the server, where the server recognizes the voice to obtain the text data of the user's question; or, the terminal recognizes the user's voice input to obtain the text data of the user's question, and then sends the text data of the user's question to the server.

[0115] The first encoding vector mentioned above is the encoding vector corresponding to the user question. By encoding the user question to obtain the first encoding vector, the first encoding vector can be compared with the encoding vectors of other questions to determine the other questions that are closest to the user question, thereby achieving accurate identification of the user question.

[0116] Step 102: Calculate the similarity between the first encoding vector and multiple second encoding vectors. The multiple second encoding vectors are encoding vectors corresponding to multiple questions included in the preset question template set. The multiple questions correspond one-to-one with the multiple second encoding vectors. The multiple questions are preset questions or extended questions based on the preset questions.

[0117] The aforementioned multiple second encoding vectors are encoding vectors corresponding to multiple questions. These multiple questions are pre-acquired questions. It should be noted that these multiple questions are questions in the domain to which the user's question belongs. Furthermore, these multiple questions are common or key questions in various aspects of the domain. By pre-selecting multiple questions, it is possible to identify the question that is closest to the user's question from among these multiple questions, thereby achieving accurate identification of the user's question.

[0118] Several of the questions include pre-defined questions and extended questions. Pre-defined questions can be derived from the experience of domain professionals or maintenance personnel, or they can be collected from user-encountered issues through questionnaires. Understandably, pre-defined questions represent common problems in different aspects of the domain.

[0119] The extended question is a question obtained by expanding the preset question. It should be noted that the preset question is limited by the acquisition method and may not fully cover all aspects of the field; in the embodiments of the present invention, the preset question is expanded to obtain an extended question, which still belongs to the field and broadens the coverage of the question, thereby improving the accuracy of identifying the user question by determining the question that is closer to the user question from multiple questions.

[0120] The aforementioned similarity is used to characterize the degree of similarity between the first encoding vector and the second encoding vector. It should be noted that the higher the similarity, the closer the intentions represented by the first and second encoding vectors are. By calculating the similarity between the first encoding vector and multiple second encoding vectors, the second encoding vector that is closest to the first encoding vector can be selected from multiple second encoding vectors. This allows for the determination of the question that is closest to the user's question in the preset question template set, thereby achieving accurate identification of the user's question.

[0121] Step 103: Determine the target question from the plurality of questions. The target question is the question corresponding to the second encoding vector with the highest similarity. The target question matches the intent of the user's question.

[0122] The target question is the question corresponding to the second encoding vector with the highest similarity. At this point, it can be considered that the target question matches the intent of the user's question, that is, the intent of the user's question is the intent corresponding to the target question.

[0123] In this embodiment of the invention, the user question is encoded to obtain a first encoding vector; the similarity between the first encoding vector and a plurality of second encoding vectors is calculated, wherein the plurality of second encoding vectors are encoding vectors corresponding to multiple questions included in a preset question template set, and the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions; a target question is determined from the plurality of questions, and the target question is the question corresponding to the second encoding vector with the highest similarity, and the target question matches the intent of the user question. Thus, by expanding the preset question to obtain extended questions, the coverage of multiple questions in the domain is broadened; and by calculating similarity to determine the target question closest to the user question from the multiple questions, the accuracy of identifying the user question is improved, thereby increasing the accuracy of the response.

[0124] In one embodiment, the preset question template set includes response content for each question, and after determining the target question from the plurality of questions, the method further includes:

[0125] Query the preset question template set to obtain the response content corresponding to the target question;

[0126] Output the response content corresponding to the target question.

[0127] In this embodiment of the invention, by setting response content for each question, the response content corresponding to the target question can be quickly determined after the target question is identified, and the user question can be answered with the response content, thereby effectively improving the response efficiency while achieving accurate answers.

[0128] In some implementations, a similarity threshold can be set to determine whether to respond to the user's question with a preset response content.

[0129] Specifically, after determining the target question from the plurality of questions, if the similarity to the target question is less than the similarity threshold, the large model generates the response content corresponding to the user question, and then outputs the response content;

[0130] After determining the target question from the plurality of questions, if the similarity of the target question is greater than or equal to the similarity threshold, the preset question template set is queried to obtain the response content corresponding to the target question; the response content corresponding to the target question is then output.

[0131] In this way, the similarity threshold was used to further optimize the response to user questions and improve the accuracy of the response.

[0132] In one embodiment, the preset question template set is obtained in the following way:

[0133] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0134] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0135] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0136] The aforementioned pre-set questions are derived from the experience of users, professionals, or maintenance personnel in the target domain. For example, by collecting and analyzing user query logs, new questions can be automatically extracted to enrich the set of pre-set question templates, thereby improving the ability to recognize user intent and enabling the handling of more flexible and complex question expressions. It should be noted that different pre-set questions target different scenarios in the target domain, requiring further categorization into multiple type subsets, each containing at least one pre-set question.

[0137] In some implementations, different preset questions can be categorized during the collection of preset questions. Specifically, during the collection of preset questions, a series of standard question templates are defined for each submodule by analyzing common wireless network operation and maintenance issues and user queries. These question templates are designed based on summaries of operation and maintenance personnel's experience, analysis of common operation and maintenance scenarios, and existing operation and maintenance documentation, ensuring coverage of common user query intents across various modules. The question template submodules include, but are not limited to, configuration management, service outage prediction, health analysis, root cause analysis, fault diagnosis, network optimization, and traffic prediction.

[0138] For example, for the base station configuration management submodule, the question templates are defined as "How to configure the antenna standing wave ratio of the base station?", "How to access signaling?", "How to modify the XXX parameter of the base station?", etc.; in the base station outage prediction submodule, the question templates are defined as "Please analyze the future outage probability of XXX base station in real time", "Please predict the future outage situation of XXX base station", "Please analyze the outage probability of XXX base station on June 13, 2024 in real time", etc.; for the base station health analysis submodule, the question templates are defined as "Please perform real-time health analysis on the current status of XXX base station", "Please perform real-time health analysis on the status of XXX base station on June 13, 2024", "Please analyze the current health status of XXX base station", etc.

[0139] In this way, by defining different types of question templates during the collection process, the multiple preset questions collected can be of different types corresponding to different type subsets, thus achieving the division of preset questions.

[0140] In this embodiment of the invention, multiple preset questions are obtained, which are questions in a target domain, and the target domain is the domain to which the user's question belongs. The multiple preset questions are classified to obtain multiple type subsets, each type subset including at least one preset question. The preset questions are then expanded to obtain at least one extended question corresponding to each preset question. In this way, by expanding each preset question, at least one extended question exists in each type subset, thus achieving question expansion for each type subset.

[0141] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0142] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0143] The preset questions are rewritten based on Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0144] The above method rewrites the preset questions based on NLP to obtain at least one extended question corresponding to each preset question. Specifically, it can be to pre-set prompt words and rewrite the initially defined preset questions using prompt word engineering.

[0145] In this embodiment of the invention, at least one extended question corresponding to each preset question is obtained by adjusting the preset question based on preset rules. The preset rules include at least one of synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information; and / or, at least one extended question corresponding to each preset question is obtained by rewriting the preset question based on NLP, thereby realizing the expansion of the preset question.

[0146] For example, the preset question can be expanded as shown in the table below.

[0147]

[0148] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0149] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0150] In this embodiment of the invention, by setting at least one preset question and at least one extended question corresponding to each preset question in each type subset, the user can be quickly replied to based on the response content corresponding to the target question after the target question is determined, thereby improving reply efficiency.

[0151] In some implementations, the response content includes a response code and / or response text content, whereby the response code is used to characterize the identification of a specific intent and the execution of an action, and the response text content is a response to the target question or a description of the target question.

[0152] For example, the response content can be shown in the table below.

[0153]

[0154]

[0155] In one embodiment, encoding the user question to obtain a first encoded vector includes:

[0156] The user question is encoded using a target recognition model to obtain the first encoded vector. The target recognition model is a model that identifies questions within the target domain to which the user question belongs.

[0157] The target recognition model is obtained in the following way:

[0158] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0159] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0160] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0161] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0162] The aforementioned target recognition model is used to encode user questions, obtaining a first encoded vector. This target recognition model is trained based on an initial model. The initial model is a general word embedding model, using pre-trained word embedding models such as bge-m3 and m3e-base to generate fixed-length semantic vectors for tasks such as semantic similarity calculation, text clustering, and information retrieval. The final trained target recognition model is determined by evaluating the correctness of the responses to each question in a predefined question template set, and by combining the accuracy rates of all question responses.

[0163] The first and second samples mentioned above are sample data collected from the target domain. The first sample data does not include specialized vocabulary, while the second sample data does. The first sample data enables intent recognition, while the second sample data trains the model to better recognize specialized vocabulary.

[0164] Specifically, an initial model is trained based on a first sample to obtain a first intermediate training model, which can meet the general recognition requirements of problems in the target domain. Then, the first intermediate training model is trained based on at least one second sample to obtain at least one second intermediate training model, which improves the recognition rate of professional terms. The first intermediate training model and the at least one second intermediate training model are then merged to obtain the target recognition model, which enables the target recognition model to have the generalization ability to recognize problems in the target domain while also having the ability to recognize professional terms.

[0165] In this embodiment of the invention, a first sample and at least one second sample are obtained. The first sample does not include specialized terms, and each of the at least one second sample includes a specialized term, which is a term from the target domain. An initial model is trained based on the first sample to obtain a first intermediate training model. The first intermediate training model is then trained based on the at least one second sample to obtain at least one second intermediate training model. The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model. In this way, the target recognition model can simultaneously identify questions within the target domain and enhance the recognition effect of specialized terms. Furthermore, the user question is encoded using the target recognition model to obtain a first encoding vector, which retains the characteristics of the target domain and specialized terms.

[0166] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0167] In this embodiment of the invention, by scoring the level of detail between different sample questions in the first sample, the first intermediate training model trained based on the first sample can better encode the questions, making the encoding vectors corresponding to questions with high similarity close, thereby improving the encoding effect of the target recognition model.

[0168] Specifically, we collect and organize domain-specific corpora, including operation and maintenance documents, technical manuals, fault reports, alarm information, operation and maintenance logs, and historical work order data. The dataset should cover issues related to configuration management, alarm work order descriptions, fault diagnosis, service outage prediction, root cause analysis, base station health analysis, and performance optimization, resulting in sample questions. These sample questions are then cleaned and preprocessed to remove noise and invalid information. Finally, the sample questions are divided into multiple subsamples, and the two sample questions in each subsample are scored to obtain the first sample, as shown in the table below:

[0169]

[0170] In the table above, different scores represent different levels of similarity, with higher scores indicating higher similarity. In some implementations, scoring can be achieved through expert annotation or by using a large model to score two sample questions.

[0171] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0172] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0173] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0174] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0175] The above loss value can be calculated using the formula:

[0176]

[0177] In the formula, L is the loss value, N is the batch size used to represent the current training batch, M is the sequence length of the sample problem, and y ij Let X be the label of the subtype to which the sample problem belongs, X be the sample problem, and θ be the model parameters. θ includes the weight matrix W0 of the first intermediate training model, the first matrix S, and the second matrix T, where the weight matrix of the first intermediate training model is W0∈R. p×q The first matrix is ​​S∈R p×r The second matrix is ​​T∈R r×q , r = min(p, q).

[0178] Where W1 = W0 + ΔW, W1 is the weight matrix of the second intermediate training model, ΔW is the weight matrix for updating parameters, and ΔW = S·T.

[0179] In this embodiment of the invention, the loss value corresponding to the target third intermediate training model is calculated based on the model parameters, training times, and data volume of the target second sample using the gradient descent method. If the loss value is less than a set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample, so that the second intermediate training model can meet the requirements for recognizing professional terms.

[0180] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0181] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0182] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0183] The target recognition model is generated based on the target weight matrix.

[0184] The target weight matrix described above is obtained by weighting the first weight matrix and at least one second weight matrix. Specifically, when only one second weight matrix is ​​included, the mean target weight can be calculated using the following formula:

[0185] W f =γW0+(1-γ)W1;

[0186] Among them, W f W1 is the target weight matrix, W1 is the second weight matrix, and γ is the weight coefficient, which can be determined by the amount of data in the first and second samples.

[0187] When multiple second weight matrices are included, the mean target weight can be calculated using the following formula:

[0188]

[0189] Among them, W i0 W is the first weight matrix. i1 Let T be the number of second weight matrices, and α be the weight matrix. i β i represents the weighting coefficient. Wherein,

[0190] In this embodiment of the invention, a first weight matrix and at least one second weight matrix are obtained. The first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model. The first weight matrix and the at least one second weight matrix are weighted to obtain a target weight matrix. The target recognition model is generated based on the target weight matrix. In this way, the target weight matrix is ​​obtained by weighting the first weight matrix and at least one second weight matrix, thereby generating the target recognition model. This allows the target recognition model to retain both the generalization ability to recognize common words in the target domain and the ability to recognize specialized vocabulary.

[0191] For example, such as Figure 2 As shown, in this embodiment of the invention, after receiving a user question, the user question is encoded using a target recognition model to obtain a first encoded vector; the similarity between the first encoded vector and the second encoded vector corresponding to each question in the preset question template set is calculated; if the maximum similarity is greater than or equal to a set similarity threshold, the response content of the question corresponding to the maximum similarity threshold is output; if the maximum similarity is less than the similarity threshold, the user question is answered using a large model.

[0192] Specifically, the user question is encoded using a target recognition model to obtain the first encoding vector, which is defined as each word s in the user question. i A fixed-dimensional vector v mapped to a vector space by a target recognition model. i vR d , where d is the dimension of the vector encoding output by the word embedding model. Assume the user question is (s i1 ,s i2 ,...,s iT ), where T is the length of the text sequence, and each word s it Mapped to vector v it Then the first vector code corresponding to the user question can be obtained as X. seq Specifically, it is represented by the following formula:

[0193]

[0194] In the formula v it It is a participle s it The corresponding word vectors are encoded as follows: the first vector encoding for the user question is the sum of the word vectors for each word segment. For example, the word vector encoding for the user question is shown in the table below.

[0195]

[0196]

[0197] Determining the target problem based on similarity can be expressed by the following formula:

[0198] C p = (M·N) p ) / (||M||·||N p ||);

[0199] In the formula, C is... p Similarity, where p is the number of questions, M is the first vector encoding, and N is the number of similar questions. p This is the second vector encoding of the p-th question in the preset question template set.

[0200] Furthermore, a similarity threshold is set to determine whether to output a response. Specifically, if the maximum similarity is greater than or equal to the set similarity threshold, the response corresponding to the target question is output; if the maximum similarity is less than the set similarity threshold, the user's intent in the question cannot be identified, and the user question can be answered using a larger model, as expressed by the following formula:

[0201]

[0202] Where intent is the response content, q is the target question, and C is the target question. q C0 represents the similarity to the target question, and C0 is the set similarity threshold.

[0203] Please see Figure 3 , Figure 3 This is a structural diagram of an intent recognition device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the intent recognition device 300 includes:

[0204] Encoding module 301 is used to encode the user question to obtain the first encoding vector;

[0205] The calculation module 302 is used to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, and the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions;

[0206] The determining module 303 is used to determine a target question from the plurality of questions, wherein the target question is the question corresponding to the second encoding vector with the highest similarity, and the target question matches the intent of the user question.

[0207] In one embodiment, the preset question template set includes response content corresponding to each question, and after the determination module, the intent recognition device 300 further includes:

[0208] The query module is used to query the preset question template set and obtain the response content corresponding to the target question;

[0209] The sending module is used to output the response content corresponding to the target question.

[0210] In one embodiment, the preset question template set is obtained in the following way:

[0211] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0212] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0213] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0214] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0215] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of the following: synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0216] The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0217] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0218] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0219] In one embodiment, the encoding module 301 includes:

[0220] An encoding unit is used to encode the user question based on a target recognition model to obtain a first encoding vector, wherein the target recognition model is a model for identifying questions in the target domain to which the user question belongs.

[0221] The target recognition model is obtained in the following way:

[0222] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0223] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0224] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0225] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0226] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0227] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0228] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0229] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0230] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0231] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0232] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0233] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0234] The target recognition model is generated based on the target weight matrix.

[0235] The intent recognition device provided in this embodiment of the invention can implement each process of the above-described intent recognition method, with one-to-one correspondence of technical features and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0236] It should be noted that the intent recognition device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.

[0237] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the various processes of the above-described intent recognition method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0238] For details, see Figure 4 As shown, this embodiment of the invention also provides an electronic device, including a bus 401, a transceiver 402, an antenna 403, a bus interface 404, a processor 405, and a memory 406.

[0239] The processor 405 is used to encode the user question to obtain a first encoding vector;

[0240] The processor 405 is used to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, wherein the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions;

[0241] The processor 405 is configured to determine a target question from the plurality of questions, the target question being the question corresponding to the second encoding vector with the highest similarity, and the target question matching the intent of the user's question.

[0242] In one embodiment, the processor 405 is further configured to query the preset question template set to obtain the response content corresponding to the target question;

[0243] The transceiver 402 is used to output the response content corresponding to the target question.

[0244] In one embodiment, the preset question template set is obtained in the following way:

[0245] Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs;

[0246] The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question;

[0247] The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

[0248] In one embodiment, expanding the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following:

[0249] Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of the following: synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information.

[0250] The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

[0251] In one embodiment, after expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes:

[0252] Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

[0253] In one embodiment, encoding the user question to obtain a first encoded vector includes:

[0254] The user question is encoded using a target recognition model to obtain the first encoded vector. The target recognition model is a model that identifies questions within the target domain to which the user question belongs.

[0255] The target recognition model is obtained in the following way:

[0256] Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field;

[0257] The initial model is trained based on the first sample to obtain the first intermediate training model;

[0258] The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model;

[0259] The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

[0260] In one embodiment, the first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the degree of similarity between the two sample questions.

[0261] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0262] The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample;

[0263] The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample.

[0264] If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

[0265] In one embodiment, merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes:

[0266] Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model;

[0267] The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix;

[0268] The target recognition model is generated based on the target weight matrix.

[0269] exist Figure 4In this document, a bus architecture (represented by bus 401) is used. Bus 401 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 405 is transmitted over a wireless medium via antenna 403, which further receives data and transmits data to processor 405.

[0270] Processor 405 is responsible for managing bus 401 and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 406 can be used to store data used by processor 405 during operation.

[0271] Optionally, the processor 405 can be a CPU, ASIC, FPGA, or CPLD.

[0272] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described intent recognition method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0273] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 The various processes of the corresponding intent recognition method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.

[0274] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0275] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0276] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. An intent recognition method, characterized in that, include: The user's question is encoded to obtain the first encoding vector; Calculate the similarity between the first encoding vector and multiple second encoding vectors, wherein the multiple second encoding vectors are encoding vectors corresponding to multiple questions included in the preset question template set, and the multiple questions correspond one-to-one with the multiple second encoding vectors, and the multiple questions are preset questions or extended questions based on the preset questions; A target question is determined from the plurality of questions. The target question is the question corresponding to the second encoding vector with the highest similarity. The target question matches the intent of the user's question.

2. The method as described in claim 1, characterized in that, The preset question template set includes response content for each question. After determining the target question from the plurality of questions, the method further includes: Query the preset question template set to obtain the response content corresponding to the target question; Output the response content corresponding to the target question.

3. The method as described in claim 1 or 2, characterized in that, The set of preset question templates is obtained in the following way: Obtain multiple preset questions, which are questions in a target domain, and the target domain is the domain to which the user's question belongs; The multiple preset questions are classified into multiple type subsets, and each type subset includes at least one preset question; The preset questions are expanded to obtain at least one extended question corresponding to each preset question.

4. The method as described in claim 3, characterized in that, The expansion of the preset problem to obtain at least one extended problem corresponding to each preset problem includes at least one of the following: Based on preset rules, preset questions are adjusted to obtain at least one extended question corresponding to each preset question. The preset rules include at least one of the following: synonym replacement, word order adjustment, phrase transformation, sentence restructuring, question rewriting, and adding contextual information. The preset questions are rewritten using Natural Language Processing (NLP) to obtain at least one extended question corresponding to each preset question.

5. The method as described in claim 3, characterized in that, After expanding the preset problem to obtain at least one expanded problem corresponding to each preset problem, the method further includes: Set the response content for at least one preset question and at least one extended question corresponding to each preset question in each type subset.

6. The method as described in claim 1 or 2, characterized in that, The process of encoding the user question to obtain a first encoded vector includes: The user question is encoded using a target recognition model to obtain the first encoded vector. The target recognition model is a model that identifies questions within the target domain to which the user question belongs. The target recognition model is obtained in the following way: Obtain a first sample and at least one second sample, wherein the first sample does not include technical terms, and each of the at least one second sample includes a technical term, which is a term in the target field; The initial model is trained based on the first sample to obtain the first intermediate training model; The first intermediate training model is trained based on the at least one second sample to obtain at least one second intermediate training model; The first intermediate training model and the at least one second intermediate training model are merged to obtain the target recognition model.

7. The method as described in claim 6, characterized in that, The first sample includes multiple subsamples, each subsample including two sample questions and a score between the two sample questions, the score being used to characterize the similarity between the two sample questions.

8. The method as described in claim 6, characterized in that, The step of merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes: The first intermediate training model is trained based on the target second sample to obtain the target third intermediate training model, wherein the target second sample is one of the at least one second sample; The loss value corresponding to the target third intermediate training model is calculated using the gradient descent method based on the model parameters, training times, and data volume of the target second sample. If the loss value is less than the set loss threshold, the target third intermediate training model is set as the second intermediate training model corresponding to the target second sample.

9. The method as described in claim 6, characterized in that, The step of merging the first intermediate training model and the at least one second intermediate training model to obtain the target recognition model includes: Obtain a first weight matrix and at least one second weight matrix, wherein the first weight matrix is ​​the weight matrix corresponding to the first intermediate training model, and each of the at least one second weight matrix is ​​the weight matrix corresponding to a second intermediate training model; The first weight matrix and the at least one second weight matrix are weighted together to obtain the target weight matrix; The target recognition model is generated based on the target weight matrix.

10. An intent recognition device, characterized in that, include: The encoding module is used to encode the user's question to obtain the first encoding vector; The calculation module is used to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, and the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions; A determination module is used to determine a target question from the plurality of questions, wherein the target question is the question corresponding to the second encoding vector with the highest similarity, and the target question matches the intent of the user question.

11. An electronic device, characterized in that, Including transceivers and processors, The processor is used to encode the user question to obtain a first encoding vector; The processor is configured to calculate the similarity between the first encoding vector and a plurality of second encoding vectors, wherein the plurality of second encoding vectors are encoding vectors corresponding to a plurality of questions included in a preset question template set, wherein the plurality of questions correspond one-to-one with the plurality of second encoding vectors, and the plurality of questions are preset questions or extended questions based on the preset questions; The processor is configured to determine a target question from the plurality of questions, the target question being the question corresponding to the second encoding vector with the highest similarity, and the target question matching the intent of the user's question.

12. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the intent recognition method as described in any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the intent recognition method as described in any one of claims 1 to 9.

14. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the intent recognition method as described in any one of claims 1 to 9.