Text intention recognition method and refrigeration equipment
By obtaining semantic template information, generalizing text data and generating semantic similar text, the problem of insufficient intent recognition ability of emerging text in the prior art is solved, and a more accurate and comprehensive intent recognition effect is achieved.
Patent Information
- Application Number
- CN202311155483.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the recognition of text intentions depends on learning a large number of expectations, and the ability to understand emerging vocabulary and semantics is weak, and the inability to adapt to emerging text forms, resulting in the recognition being lagging and one-sided.
By obtaining semantic template information, the first text data is summarized, several second text data similar to the semantics of the first general information are generated, and the corresponding text intention is determined based on these data.
It overcomes the problems of insufficient understanding of new text data and weak intent recognition capabilities, improves the ability to understand text intentions, realizes the coverage of autonomous understanding and intention expression of new text forms, and makes up for the passivity and lag of new intention recognition.
Smart Images

Figure CN119621963A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a text intention recognition method and refrigeration equipment. Background Art
[0002] Recognition of text intent is an important task in natural language processing. Its purpose is to predict the real intention corresponding to the text data based on the existing text content, so as to obtain the real purpose of the user. Recognition of text intent is widely used, especially in smart home appliances such as refrigerators, for example, smart refrigerators. With the continuous increase in the number of smart refrigerator users, the number of smart refrigerator interaction expectations has increased exponentially, greatly increasing the difficulty of intent recognition. In order to accurately grasp the real intention of users, it is necessary to have real-time insight into the actual needs of users, explore the potential new intentions of users in a short period of time, optimize products in a timely manner, and improve product competitiveness.
[0003] At present, the methods for mining or identifying user intentions include the following: First, predicting the user's upcoming behavior or intention based on the user's behavior trajectory. This method requires historical data and has a lag in the recognition of intent. Second, searching based on keywords in text data to determine user intentions. This method only queries historical sentences by comparing the same text words, and it is difficult to obtain sentences with the same meaning but different vocabulary. It has low sensitivity and poor accuracy. For example, "add beef" and "I put beef in the refrigerator" have the same meaning but do not have exactly the same keywords. The third is a model built based on a clustering algorithm. This method divides text data into several categories and performs model training. A large amount of text prediction is required during the training process, so it is impossible to capture new intentions in a timely and accurate manner when there are fewer predictions. Summary of the invention
[0004] One of the purposes of the present invention is to provide a method for identifying text intent, so as to solve the technical problems in the prior art that the recognition of text intent relies on a large amount of anticipated learning, has a weak ability to understand new vocabulary and semantics in the text, cannot adapt to new text forms, and has a lagging and one-sided recognition of intent.
[0005] One of the objects of the present invention is to provide a refrigeration device.
[0006] In order to achieve one of the above-mentioned invention purposes, the present invention provides a text intention recognition method, comprising: when the intention recognition of first text data is inaccurate, obtaining semantic template information, and summarizing the first text data according to the first text data and the semantic template information as a whole to obtain first summary information; determining first semantic pattern information corresponding to the first text data according to the first summary information and the semantic template information; generating a plurality of second text data having semantically similar characteristics to the first summary information based on the first semantic pattern information, and determining corresponding text intentions according to the plurality of second text data respectively.
[0007] As a further improvement of an embodiment of the present invention, the method further includes: the semantic template information is: a semantic structure framework for hiding user intention; and the semantic pattern information is configured as a generalized expression based on text data.
[0008] As a further improvement of an embodiment of the present invention, the first text data includes at least one of voice text data, video text data and original text data.
[0009] As a further improvement of an embodiment of the present invention, the "when the intention recognition of the first text data is inaccurate" specifically includes: determining whether the predicted probability of the first text data corresponding to the first intention category is greater than the intention prediction probability threshold; wherein the predicted probability is used to represent the confidence that the first text data belongs to the first intention category; if not, it is determined that the intention recognition of the first text data is inaccurate.
[0010] As a further improvement of an embodiment of the present invention, before “determining whether the prediction probability that the first text data corresponds to the first intent category is greater than the intent prediction probability threshold”, the method further includes:
[0011] Acquire multi-source heterogeneous data and extract data features of the multi-source heterogeneous data; wherein the multi-source heterogeneous data includes at least one of voice data and video data; input the data features into a convolutional neural network model to obtain corresponding first text data; perform an intent recognition operation on the first text data based on a bidirectional pre-trained model to obtain a first intent category and a corresponding prediction probability.
[0012] As a further improvement of an embodiment of the present invention, before the "extracting data features of the multi-source heterogeneous data", the method also includes: determining whether the multi-source heterogeneous data includes speech data; the "inputting the data features into a convolutional neural network model to obtain the corresponding first text information" specifically includes: if so, inputting the speech features into a Transformer network model with MFCC features and an attention mechanism to obtain first text data corresponding to the speech data; wherein the data features include the speech features.
[0013] As a further improvement of an embodiment of the present invention, the "summarizing the first text data according to the whole of the first text data and the semantic template information to obtain first summarized information" specifically includes: parsing and extracting key information corresponding to the first text data; wherein the key information includes at least one of key entities, key events and association relationships; based on a pre-trained language model, summarizing the key information according to the user intention abstractly expressed in the semantic template information to obtain the first summarized information; wherein the pre-trained language model is a language model trained and optimized using the Prompt mechanism.
[0014] As a further improvement of an embodiment of the present invention, the "determining the first semantic pattern information corresponding to the first text data based on the first summary information and the semantic template information" specifically includes: parsing the semantic template information to determine the position distribution of the abstract intention expression information in the semantic template information; wherein the position distribution includes the starting position and the ending position of the abstract intention expression information; according to the position distribution, replacing the abstract intention expression information with the first summary information to obtain the first semantic pattern information.
[0015] As a further improvement of an embodiment of the present invention, the "generating a number of second text data with semantics similar to the first summary information based on the first semantic pattern information" specifically includes: performing semantic analysis and extraction operations on the first semantic pattern information to obtain a number of key semantic fields; constructing corresponding semantic vectors based on the several key semantic fields; inputting the semantic vectors into a pre-trained large language model to generate a number of second text data with semantics similar to the first summary information; wherein the pre-trained large language model includes a ChatGPT model.
[0016] As a further improvement of an embodiment of the present invention, the "determining the corresponding text intentions according to the several second text data" specifically includes: based on a text intention classification model, identifying several text intentions corresponding to the second text data respectively; wherein the several text intentions include a first text intention; after the "determining the corresponding text intentions according to the several second text data respectively", the method also includes: searching in a preset intention knowledge base according to the obtained several text intentions, and determining whether to update the preset intention knowledge base according to the search results.
[0017] As a further improvement of an embodiment of the present invention, the "determining whether the first text intent is a new text intent based on a preset intent knowledge base" specifically includes: performing an entity extraction operation on the second text data to obtain an entity field; wherein the entity field is used to represent a keyword or key word of a core action or intent of the second text data; the entity field includes a first entity field; querying the preset intent knowledge base according to the first entity field, and determining whether the first entity field matches at least one of the query results; if so, calculating the semantic similarity between the first text intent and the second text intent corresponding to the first entity field, and when the semantic similarity does not meet the preset similarity threshold, determining that the first text intent is a new intent, and adding the first entity field and the first text intent to the preset intent knowledge base; if not, determining that the first text intent is a new intent, and adding the first entity field and the first text intent to the preset intent knowledge base.
[0018] In order to achieve one of the above-mentioned purposes of the invention, the present invention also provides a refrigeration device, comprising: a memory for storing executable instructions; and a processor for implementing the steps of any of the above-mentioned text intent recognition methods when running the executable instructions stored in the memory.
[0019] Compared with the prior art, the embodiments of the present invention have at least one of the following beneficial effects:
[0020] The present invention adopts a text intention recognition method. When the intention recognition of the first text data is inaccurate, by obtaining semantic template information and summarizing the first text data according to the first text data and the semantic template information, the key information and semantic structure in the summarized text data can be guided, irrelevant detail information can be filtered out, the central semantics of the text can be grasped, the difficulties of insufficient understanding of the newly emerged text data and weak intention recognition ability can be overcome, and the ability to understand the text intention can be improved; at the same time, a number of second text data are generated based on the first semantic pattern information, which can realize autonomous understanding of the new text form, expand the coverage of intention expression, and make up for the passivity and lag of new intention recognition. In addition, the use of a large language model is conducive to hiding the real information of the original text data (i.e., the first text data) well, and the confidentiality is good; the scheme integrates semantic summarization, generation of semantically similar texts and semantic matching, realizes multi-angle analysis of text intentions, and makes the intention recognition results more accurate and comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the steps of a text intent recognition method in one embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of some steps of the text intent recognition method in the first embodiment of the present invention.
[0023] Figure 3 It is a schematic diagram of some steps of the text intent recognition method in the second embodiment of the present invention.
[0024] Figure 4 It is a partial step schematic diagram of step S2 of the text intent recognition method in one embodiment of the present invention.
[0025] Figure 5 It is a partial step schematic diagram of step S3 of the text intent recognition method in one embodiment of the present invention.
[0026] Figure 6 It is a partial step schematic diagram of step S4 of the text intent recognition method in one embodiment of the present invention.
[0027] FIG. 7( a ) is a principle block diagram of a preferred embodiment of an information distribution matching method in one embodiment of the present invention.
[0028] FIG. 7( b ) is a data conversion diagram of a preferred embodiment of an information distribution matching method in one embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0030] It should be noted that the term "comprises" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In addition, the terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0031] In the process of identifying text intent, data analysis or model training may be performed through massive interactive text predictions, which may lead to weak understanding of new words and semantics in the text, and inability to mine new user intent in real time. Therefore, how to mine and identify text intent in a real-time and comprehensive manner is of great practical significance.
[0032] Based on this, the present invention provides a text intent recognition method, such as Figure 1 As shown, the specific steps include:
[0033] Step S1, when the intention recognition of the first text data is inaccurate, semantic template information is obtained, and the first text data is summarized according to the first text data and the semantic template information as a whole to obtain first summary information.
[0034] Step S2: determining first semantic pattern information corresponding to the first text data according to the first summary information and the semantic template information.
[0035] Step S3: generating a plurality of second text data having semantic similarity to the first semantic pattern information based on the first semantic pattern information, and determining corresponding text intentions according to the plurality of second text data respectively.
[0036] In this way, by summarizing the first text data, we can guide the key information and semantic structure in the summarized text data, filter out irrelevant details, grasp the central semantics of the text, overcome the difficulties of insufficient understanding of newly emerged text data and weak intention recognition ability, and improve the ability to understand the text intention. In addition, generating several second text data with similar semantics to the first summarized information can expand the coverage of intention expression and make up for the passivity and lag of new intention recognition.
[0037] The semantic template information may be a semantic structure framework for hiding the user's intention. For example, "the user wants xxx", where "xxx" is a keyword or key word for hiding the user's intention. The semantic template information may be constructed based on the prompt mechanism, which may be manually defined and based on human natural language knowledge to obtain a semantically fluent and efficient template; in addition, it may also be based on model training to automatically learn the template and obtain the semantic template information. In this regard, it can be freely selected according to the actual application scenario.
[0038] Specifically, the semantic template information can output a template form that specifies hidden information or hidden positions through model training, or can manually set the required template form. The present invention does not make specific limitations on this. In this way, the semantic template information and semantic pattern information can hide the true intention, avoid directly exposing sensitive information, and generalize the specific information, which is conducive to knowledge representation and reasoning.
[0039] The semantic pattern information is configured as a generalized expression based on the text data. Specifically, the semantic pattern information abstracts the general semantic structure behind the text data to form a common semantic expression pattern. These structures or patterns are used to reflect the basic semantic relationship of the text data, which is convenient for subsequent generation of stronger semantic expression and understanding capabilities. For example, if the first text data is "add apples", then according to the semantic template information (for example, "the user wants xxx"), it is summarized to generate semantic pattern information as "the user wants to store fruit".
[0040] The first text data may include at least one of voice text data, video text data and original text data. In one embodiment, a voice receiver, such as a microphone, a microphone or a mobile phone, is used to collect real-time voice information; the collected real-time voice is subjected to noise reduction, echo removal, reverberation and other operations, and the format is converted into valid text data, that is, voice text data is obtained. In one embodiment, a video acquisition device, such as a mobile phone, a camera, a Bluetooth acquisition device, is used to collect a continuous image sequence, and a video-to-text operation is performed to obtain the video text data. In one embodiment, the original text data can be directly obtained, and the initial text processing is performed on it, such as removing duplicate data, irrelevant data and missing abnormal data, so as to achieve the cleaning of the text data. In a preferred embodiment, any two or three of the above embodiments can be used in combination.
[0041] Combination Figure 1 and Figure 2 As shown, in the first embodiment of the present invention, the part of "when the intention recognition of the first text data is inaccurate" in step S1 may specifically include:
[0042] Step S11, determining whether the prediction probability of the first text data corresponding to the first intent category is greater than an intent prediction probability threshold;
[0043] If not, the process jumps to step S12 to determine that the intention recognition of the first text data is inaccurate.
[0044] In this way, whether the intent category of the text data is accurate is determined by calculating the predicted probability of the intent category of the text data. This method is simple and intuitive, and has high accuracy.
[0045] Furthermore, combined with Figure 1 , Figure 2 and Figure 3 As shown, in the second embodiment of the present invention, the intention recognition method may further specifically include:
[0046] Step P121, acquiring multi-source heterogeneous data, and extracting data features of the multi-source heterogeneous data;
[0047] Step P122, inputting the data features into a convolutional neural network model to obtain corresponding first text data;
[0048] Step P123, performing an intent recognition operation on the first text data based on the bidirectional pre-training model to obtain a first intent category and a corresponding prediction probability.
[0049] In this way, by extracting data features from multi-source heterogeneous data and achieving diversity in text data, the robustness of intent understanding can be improved. In addition, the use of a bidirectional pre-training model can capture the contextual information of text data. In the intent recognition task, the contextual semantics provided by the surrounding words can be used to extract the deep semantic information of the text, greatly improving the accuracy of intent recognition.
[0050] The predicted probability is used to represent the confidence that the first text data belongs to the first intent category; and the multi-source heterogeneous data includes at least one of voice data and video data.
[0051] Before the step of "extracting the data features of the multi-source heterogeneous data" in step P121, the method may further include step P121'; and the step of "inputting the data features into the convolutional neural network model to obtain the corresponding first text data" may further specifically include step P122' corresponding to step P121'. Steps P121' and P122' are specifically:
[0052] Step P121', determining whether the multi-source heterogeneous data includes voice data;
[0053] If so, jump to step P122', input the speech features into the Transformer network model with MFCC features (Mel-scale Frequency Cepstral Coefficients, full name Mel frequency cepstral coefficient features) and attention mechanism, and obtain the first text data corresponding to the speech data; wherein the data features include the speech features.
[0054] In this way, the audio information in the speech data can be well represented through MFCC features and attention mechanism, that is, the dependency between speech features can be learned to guide the generation of text data.
[0055] The predicted probability refers to the probability that a given text data belongs to a certain intent category predicted by the classification model. This probability reflects the confidence level of the classification model that the text data belongs to the intent category. The predicted probability is positively correlated with the confidence level, that is, the greater the predicted probability, the higher the confidence level and the more accurate the intent recognition. For example, when performing intent recognition on the text data "The user wants to store fruit", the model outputs the probability of intent category 1 (querying for fruit) as 0.2 and the probability of intent category 2 (storing fruit) as 0.8. The model can understand the text data as belonging to intent category 2.
[0056] The bidirectional pre-training model is a relatively advanced pre-training model in natural language processing. Its key feature is that the model is bidirectional, that is, it can obtain the contextual information before and after a word. The bidirectional pre-training model includes the Bert pre-training model. The model includes two pre-training tasks: one is Masked LM (Masked Language Model), that is, randomly replacing the input words with "masks" according to a certain percentage, and then predicting these "masks". The "masked" words will be input into a classifier, and the classifier will predict the probability of the "masked" words, and determine the "masked" words according to the maximum predicted probability value.
[0057] It should be noted that the multi-source heterogeneous data may include multi-source data (i.e., data with diverse sources), or heterogeneous data (i.e., data with different storage structure types), or multi-source and heterogeneous data, and the present invention does not impose specific limitations on this.
[0058] It is understandable that in order to enrich the training data set and facilitate accurate intent recognition of text data, the text data may also include historical voice, video and text data, and the present invention does not impose specific limitations on this.
[0059] The convolutional neural network model is a deep learning model for images and videos. It includes a convolutional layer and a pooling layer. The convolutional layer can be used to extract local correlation features from the input image or video, thereby automatically learning the input feature representation, and performing feature vector conversion and feature vector encoding on the feature representation to obtain the corresponding text sequence. The attention mechanism is introduced into the convolutional neural network model, so that the neural network model can not only autonomously learn the attention mechanism, focus on the key features or related features of the speech data and ignore other non-critical or non-related feature information, and enhance the speech features; but also the attention mechanism can in turn help the computer to understand the neural network. The two complement each other and are conducive to improving the efficiency and effect of speech-to-text conversion.
[0060] The MFCC is a recognizable component in a speech signal, which is a cepstrum parameter extracted in the Mel scale frequency domain. The pre-processed speech data is subjected to Fourier transform to obtain the energy spectrum of multiple frames of speech data signals, and the energy spectrum is smoothed by a set of Mel scale triangular filter groups to eliminate harmonics, and then further logarithmic operations and discrete cosine transforms are performed to obtain MFCC coefficient features. Among them, the Mel scale is used to describe the nonlinear characteristics of human ear frequency, and the MFCC parameters take into account the degree of sensitivity of the human ear to different frequencies, and are particularly suitable for speech recognition and speaker identification.
[0061] For the part of "summarizing the first text data according to the first text data and the semantic template information as a whole to obtain first summary information" in step S1, the present invention provides detailed steps, which may specifically include:
[0062] Step S11', parsing and extracting key information corresponding to the first text data;
[0063] Step S12', based on the pre-trained language model, summarize the key information according to the user intention abstractly expressed in the semantic template information to obtain the first summarized information.
[0064] In this way, by abstracting and summarizing the first text data, redundant information in the text can be filtered out, only key information is retained, and text compression and refinement are achieved, which helps users browse and understand key information in the text more efficiently, making the text information more refined and efficient; in addition, by adopting a pre-trained language model, end-to-end automated processing can be achieved, reducing manual participation and improving work efficiency.
[0065] The key information includes at least one of key entities, key events and association relationships; the pre-trained language model is a language model trained and optimized using the Prompt mechanism. The key entities may refer to entities in the text data that belong to key information, including the main participants in the text data and objects affected by the main events. For example, the main names of people, places, etc.; the key events may refer to events that belong to key information in the text data, which may include actions or state changes that drive the development of things; the association relationship may refer to the semantic relationship connecting key entities and key events, reflecting the interaction between entities and events.
[0066] The Prompt mechanism is to add prompt information to the input end of the pre-trained language model to guide the model to better understand the input text data. Specifically, the input and output requirements of the model are clarified, the required key information is evaluated, and the Prompt template (that is, the semantic template information) is constructed based on the key information. A template containing a "mask" tag related to the first text data can be generated by manual definition, text generation, etc.; and then a mapping relationship is constructed based on some of the words of interest in the "mask" to help the model predict the words of the "mask" more accurately. For example, "This movie has many people watching it, it should be xxx", if the word predicted by "xxx" is "wonderful", it is considered to be a positive class, and if it is "bad", it is considered to be a negative class. Therefore, by adjusting the Prompt template, different task requirements can be adapted without retraining the entire model. In this way, in the case of insufficient new intent corpus, the user's new intent can also be normally identified based on the Prompt mechanism, which improves the user's functional experience and improves user satisfaction.
[0067] like Figure 4 As shown, in one embodiment of the present invention, for step S2, the present invention provides detailed steps, which may specifically include:
[0068] Step S21, parsing the semantic template information to determine the position distribution of the abstract intention expression information in the semantic template information;
[0069] Step S22: replacing the abstract intention expression information with the first summary information according to the position distribution to obtain the first semantic pattern information.
[0070] The position distribution includes the starting position and the ending position of the abstract intention expression information. In this way, by locating and replacing the abstract intention expression, a more abstract and general expression than the original text data can be generated, thereby improving the understanding of the text semantics and structure.
[0071] Combination Figure 1 and Figure 5As shown, in one embodiment of the present invention, step S3 may specifically include:
[0072] Step S31, performing semantic analysis and extraction operations on the first semantic pattern information to obtain a number of key semantic fields;
[0073] Step S32, constructing corresponding semantic vectors according to the plurality of key semantic fields;
[0074] Step S33: input the semantic vector into a pre-trained large language model to generate a plurality of second text data having semantics similar to the first summary information.
[0075] The pre-trained large language model includes a ChatGPT model. In this way, by generating similar texts with relatively consistent semantic expressions through a large language model, the scale of the data set can be expanded, the diversity of text data can be enriched, and the ability of semantic expression can be expanded; in addition, the use of a large language model can also prevent the real information of the first text data from being exposed, and has better confidentiality.
[0076] The pre-trained large language model is a neural network model that is pre-trained on large-scale text predictions and learns general language representation capabilities. ChatGPT is a typical pre-trained large language model that can understand and generate natural language and support multiple rounds of dialogue. It is trained by combining deep learning with supervised learning to generate more friendly and accurate responses. It can also support obtaining information in the form of questions and answers, and perform knowledge extraction and reasoning.
[0077] Further, continue to refer to Figure 5 As shown, for the part of "determining the corresponding text intentions according to the plurality of second text data" in step S3, the present invention provides detailed steps, which may specifically include:
[0078] Step S34, based on the text intention classification model, respectively identifying a plurality of text intentions corresponding to the second text data;
[0079] In order to further determine whether the plurality of intentions of the second text data are new intentions, the determination may be made based on a preset intention knowledge base. Based on this, after step S3, the text intention recognition method may further include the following steps:
[0080] Step S4, searching in a preset intention knowledge base according to the obtained plurality of text intentions, and determining whether to update the preset intention knowledge base according to the search results.
[0081] In this way, the preset intent knowledge base is updated according to the several text intents of the second text data, and the intent knowledge base can be sustainably enriched and improved to cover more actual user intents.
[0082] Among them, the several text intentions include a first text intention; the first semantic pattern information may include multiple semantic pattern information; each semantic pattern information can generate multiple text data with similar intentions or semantics with the help of a pre-trained large language model; that is, the second text data may include multiple text information, and the intent recognition can be performed on each text information separately to obtain multiple text intentions.
[0083] Specifically, if Figure 6 As shown, for step S4, the present invention provides detailed steps, which may specifically include:
[0084] Step S41, performing an entity extraction operation on the second text data to obtain an entity field;
[0085] Step S42, querying a preset intent knowledge base according to the first entity field, and determining whether the first entity field matches at least one of the query results;
[0086] If yes, jump to step S43A, calculate the semantic similarity between the first text intent and the second text intent corresponding to the first entity field, and when the semantic similarity does not meet the preset similarity threshold, determine that the first text intent is a new intent, and add the first entity field and the first text intent to the preset intent knowledge base;
[0087] If not, jump to step S43B, determine that the first text intent is a new intent, and add the first entity field and the first text intent to the preset intent knowledge base.
[0088] In this way, by querying the entity field in the existing intent knowledge base and judging the novelty of the text intent, we can avoid the existence of repeated highly similar intents in the knowledge base. At the same time, we can continuously absorb newly emerging user intents, enrich the text knowledge base, and reduce the cost of intent maintenance.
[0089] Among them, the entity field is used to represent the keywords or key words of the core action or intention of the second text data; the entity field includes the first entity field. The entity field extracted from the text data can be marked in the form of "labelword", and the mapping label of the "label word" can be stored in the preset intention knowledge base, for example, it can be stored in the form of "label word-mapping label-user intention", wherein the "mapping label" can be understood as the association relationship between two entity nodes in the preset intention knowledge base, such as an attribute relationship. Of course, it can also be stored directly in the form of "labelword-user intention" (for example, "storage"-"add food"), and the present invention does not make specific restrictions on this.
[0090] Entity extraction is to identify entities with specific meanings (such as names of people, places, institutions, time, quantity, events, etc.) from unstructured text data and extract them. The identified entities can be classified to determine the category they belong to; the boundaries of the entities in the text can also be accurately located to facilitate extraction.
[0091] It should be noted that querying the preset intent knowledge base based on the extracted entity field can not only accurately match the corresponding text intent, but also calculate and match the text intent corresponding to the entity field with the similarity with the "user intent" stored in the knowledge base, so as to improve the accuracy and reliability of new intent updates in the preset intent knowledge base.
[0092] Among them, steps S11 to S12, and steps S11' to S12' can be understood as derived steps of step S1. Steps S31 to S34 can be understood as derived steps of step S3; step S34 is a further extension based on step S3, and steps S41 to S44 can be understood as derived steps of step S4. The above-mentioned various implementation methods, embodiments or specific examples provided by the present invention can be combined with each other to ultimately form multiple better implementation methods.
[0093] For example, FIG7(a) shows a principle block diagram of a text intent recognition method under a preferred embodiment, and FIG7(b) shows the conversion process of text data involved in the text intent recognition method when executing the preferred embodiment. The following will summarize the processing process of the preferred embodiment in combination with FIG7(a) and FIG7(b), and illustrate it by taking user voice data as an example.
[0094] First, user voice data 101 is collected through a microphone or microphone array; the user voice data 101 is transcribed into text, for example, the voice is preprocessed (data cleansed) and feature extracted, and the feature is input into a Transformer network model with MFCC for processing, completing the task of extracting voice features and transcribe voice into text. In addition, the voice-strongly related features are obtained through the Attention encoding work to generate the corresponding voice text data 102.
[0095] Secondly, the speech text data 102 is input into a bidirectional pre-training model, and the model is used to perform online inference of user intent, and output a user intent label and a corresponding intent category prediction probability 103 (ie, user intent confidence).
[0096] The intention category prediction probability 103 is compared with an manually set intention prediction probability threshold. If it is lower than the threshold, the speech text data is input into a pre-trained language model based on the Prompt mechanism, and the first text data is summarized according to the semantic template information to obtain first summary information 104, and the first semantic pattern information 105 is obtained according to the semantic template information.
[0097] According to the first semantic pattern information 105, a ChatGPT model is used to generate a number of second text data 106 that are semantically similar to the first summary information 104; and the user intentions of the second text data 106 are respectively identified to obtain a number of text intentions 107; according to each text intention 107, a matching preset intention knowledge base is searched to determine a new text intention 108 and update the preset intention knowledge base.
[0098] The present invention also provides a refrigeration device, comprising: a memory for storing executable instructions; and a processor for implementing any of the steps of the above-mentioned text intent recognition method when running the executable instructions stored in the memory.
[0099] To sum up, when the intent recognition of the first text data is inaccurate, the present invention obtains semantic template information and summarizes the first text data according to the first text data and the semantic template information, which can guide the key information and semantic structure in the summarized text data, filter out irrelevant detail information, grasp the central semantics of the text, overcome the difficulties of insufficient understanding of the newly emerged text data and weak intent recognition ability, and improve the ability to understand the text intent; at the same time, based on the first semantic pattern information, a number of second text data are generated, which can realize autonomous understanding of the new text form, expand the coverage of intent expression, and make up for the passivity and lag of new intent recognition. Moreover, the use of a large language model is conducive to hiding the real information of the original text data (i.e., the first text data) well, and the confidentiality is better.
[0100] In addition, the intent recognition method uses the prompt mechanism to complete the new intent recognition, so that even if the new intent is not expected, the user's new intent can be correctly identified, the user's functional experience is improved, and the user's satisfaction is increased. Therefore, the solution integrates semantic summarization, generation of semantically similar texts, and semantic matching, and realizes multi-angle analysis of text intent, making the intent recognition result more accurate and comprehensive.
[0101] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0102] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
Claims
1. A text intent recognition method, characterized in that: include: When the intention recognition of the first text data is inaccurate, obtaining semantic template information, and summarizing the first text data according to the first text data and the semantic template information as a whole to obtain first summary information; Determining first semantic pattern information corresponding to the first text data according to the first summary information and the semantic template information; A plurality of second text data having semantic similarity to the first summary information is generated based on the first semantic pattern information, and corresponding text intentions are determined respectively according to the plurality of second text data.
2. The text intent recognition method according to claim 1, characterized in that: The semantic template information is: a semantic structure framework for hiding user intentions; the semantic pattern information is configured as a generalized expression based on text data.
3. The text intent recognition method according to claim 1, characterized in that: The first text data includes at least one of voice text data, video text data and original text data.
4. The text intent recognition method according to claim 1, characterized in that: The “when the intention recognition of the first text data is inaccurate” specifically includes: Determine whether the predicted probability that the first text data corresponds to the first intent category is greater than an intent prediction probability threshold; wherein the predicted probability is used to indicate the confidence that the first text data belongs to the first intent category; If not, it is determined that the intention recognition of the first text data is inaccurate.
5. The text intent recognition method according to claim 4, characterized in that: Before the step of "determining whether the predicted probability that the first text data corresponds to the first intent category is greater than the intent prediction probability threshold", the method further includes: Acquire multi-source heterogeneous data, and extract data features of the multi-source heterogeneous data; wherein the multi-source heterogeneous data includes at least one of voice data and video data; Inputting the data features into a convolutional neural network model to obtain corresponding first text data; An intent recognition operation is performed on the first text data based on the bidirectional pre-trained model to obtain a first intent category and a corresponding prediction probability.
6. The information distribution matching method according to claim 5, characterized in that: Before the step of "extracting data features of the multi-source heterogeneous data", the method further includes: Determining whether the multi-source heterogeneous data includes voice data; The “inputting the data features into the convolutional neural network model to obtain the corresponding first text data” specifically includes: If so, the speech features are input into a Transformer network model with MFCC features and an attention mechanism to obtain first text data corresponding to the speech data; wherein the data features include the speech features.
7. The text intent recognition method according to claim 1, characterized in that: The “summarizing the first text data according to the first text data and the semantic template information as a whole to obtain first summary information” specifically includes: Parsing and extracting key information corresponding to the first text data; wherein the key information includes at least one of a key entity, a key event, and an association relationship; Based on a pre-trained language model, the key information is summarized according to the user intention abstractly expressed in the semantic template information to obtain the first summarized information; wherein the pre-trained language model is a language model trained and optimized using a Prompt mechanism.
8. The text intent recognition method according to claim 1, characterized in that: The “determining first semantic pattern information corresponding to the first text data according to the first summary information and the semantic template information” specifically includes: Parsing the semantic template information to determine the position distribution of the abstract intention expression information in the semantic template information; wherein the position distribution includes the starting position and the ending position of the abstract intention expression information; According to the position distribution, the abstract intention expression information is replaced with the first summary information to obtain the first semantic pattern information.
9. The text intent recognition method according to claim 1, characterized in that: The “generating a plurality of second text data having semantic similarity with the first summary information based on the first semantic pattern information” specifically includes: Performing semantic analysis and extraction operations on the first semantic pattern information to obtain a number of key semantic fields; According to the several key semantic fields, construct corresponding semantic vectors; The semantic vector is input into a pre-trained large language model to generate a plurality of second text data having semantic similarity to the first summary information; wherein the pre-trained large language model includes a ChatGPT model.
10. The text intent recognition method according to claim 1, characterized in that: The “determining the corresponding text intentions respectively according to the plurality of second text data” specifically includes: Based on the text intent classification model, a plurality of text intents corresponding to the second text data are respectively identified; wherein the plurality of text intents include the first text intent; After the step of "respectively determining corresponding text intentions according to the plurality of second text data", the method further includes: A search is performed in a preset intention knowledge base based on the obtained text intentions, and it is determined whether to update the preset intention knowledge base based on the search results.
11. The text intention recognition method according to claim 10, characterized in that: The “determining whether the first text intent is a new text intent based on a preset intent knowledge base” specifically includes: Performing an entity extraction operation on the second text data to obtain an entity field; wherein the entity field is used to represent a keyword or key word of a core action or intention of the second text data; the entity field includes a first entity field; Querying a preset intent knowledge base according to the first entity field, and determining whether the first entity field matches at least one of the query results; If so, the semantic similarity between the first text intent and the second text intent corresponding to the first entity field is calculated, and when the semantic similarity does not meet a preset similarity threshold, the first text intent is determined to be a new intent, and the first entity field and the first text intent are added to the preset intent knowledge base; If not, it is determined that the first text intent is a new intent, and the first entity field and the first text intent are added to the preset intent knowledge base.
12. A refrigeration device, characterized in that: include: A memory for storing executable instructions; The processor is used to implement the steps of the text intent recognition method described in any one of claims 1-11 when running the executable instructions stored in the memory.