Artificial intelligence-based intention recognition method and device, computer equipment and medium
By adopting an artificial intelligence-based intention recognition method in the dialogue system, combining cleaning processing and semantic model, the problem of low accuracy in intention recognition in the prior art is solved, and high-precision intention recognition in different situations is achieved.
Patent Information
- Application Number
- CN202411368440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-31
AI Technical Summary
The existing dialogue systems in the financial field face the problem of low recognition accuracy when dealing with user intention recognition, especially when facing the diversity and complexity of natural language input, the keyword matching method is difficult to accurately capture the user's true intentions.
Using an artificial intelligence-based intent recognition method, the query text input by the user is cleaned and processed. Combined with the preset matching module and semantic model, the target text is matched and predicted to generate intent recognition results, including rule matching and exact matching. The use of fuzzy matching module ensures high-precision intent recognition in different situations.
It achieves a comprehensive coverage of intention recognition processing from simple to complex, improves the recognition accuracy of intention recognition, and ensures that high-precision intention recognition capabilities are provided in different situations.
Smart Images

Figure CN119226480A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to an intention recognition method, apparatus, computer equipment and storage medium based on artificial intelligence. Background Art
[0002] In today's rapidly developing financial technology field, dialogue systems are gaining increasing attention as one of the key technologies to improve user experience and achieve efficient financial services. However, existing dialogue systems in the financial field still face challenges and limitations in processing user intent recognition.
[0003] Current dialogue systems mostly use keyword matching technology to identify user intent. This method is simple and direct, and can quickly respond to structured or highly standardized query requests. However, faced with the diversity and complexity of natural language input, especially when users use synonyms, abbreviations, colloquial expressions or words with obscure meanings, keyword matching methods often have difficulty accurately capturing users' true intent, resulting in a decrease in recognition accuracy. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose an intention recognition method, apparatus, computer device and storage medium based on artificial intelligence to solve the technical problem that the existing dialogue system uses keyword matching technology to recognize user intentions, which has a low recognition accuracy.
[0005] In order to solve the above technical problems, the embodiment of the present application provides an intention recognition method based on artificial intelligence, which adopts the following technical solutions:
[0006] Get the query text entered by the user;
[0007] Cleaning the query text to obtain a corresponding target text;
[0008] Performing matching processing on the target text based on a preset matching module to obtain a corresponding matching result;
[0009] If the content of the matching result is a match failure, calling a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result;
[0010] Classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results;
[0011] Calling the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary label prediction result to obtain the corresponding rule matching result;
[0012] Based on the rule matching result, the secondary label prediction result is adjusted accordingly to obtain a target intent recognition result corresponding to the query text.
[0013] Furthermore, the matching module at least includes a rule matching module, an exact matching module and a fuzzy matching module; the step of performing matching processing on the target text based on the preset matching module to obtain the corresponding matching result specifically includes:
[0014] Performing rule matching on the target text based on the rule matching module;
[0015] If the rule matching fails, then accurately matching the target text based on the accurate matching module;
[0016] If the exact match fails, fuzzy matching is performed on the target text based on the fuzzy matching module;
[0017] If the fuzzy match is successful, the generated content is the matching result of the successful match;
[0018] If the fuzzy match fails, a matching result indicating the match failure is generated.
[0019] Furthermore, the step of performing corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text specifically includes:
[0020] Obtain the result content of the rule matching result;
[0021] Determine whether the result content is a successful rule match;
[0022] If so, modify the secondary label prediction result based on a preset modification strategy to obtain a corresponding modification result, and use the modification result as a target intent recognition result corresponding to the query text;
[0023] If not, the secondary tag prediction result is used as the target intent recognition result corresponding to the query text.
[0024] Furthermore, the step of cleaning the query text to obtain the corresponding target text specifically includes:
[0025] Performing rule processing on the query text to obtain a corresponding first text;
[0026] Performing error correction processing on the first text to obtain a corresponding second text;
[0027] performing disambiguation processing on the second text to obtain a corresponding third text;
[0028] The third text is used as the target text.
[0029] Furthermore, before the step of calling the preset semantic model to perform prediction processing on the target text to obtain the corresponding first-level label prediction result, it also includes:
[0030] Acquire pre-collected training text data; wherein the training text data includes query text data, and primary tags and secondary tags corresponding to the query text data;
[0031] Get the preset initial model;
[0032] Performing a first training on the initial model based on the training text data to obtain a corresponding first model;
[0033] Acquire primary label data corresponding to the first training, and perform secondary training on the first model based on the primary label data to obtain a corresponding second model;
[0034] Fine-tune the second model to obtain a fine-tuned third model;
[0035] The semantic model is generated based on the third model.
[0036] Furthermore, the artificial intelligence-based intention recognition method further includes:
[0037] Obtaining intent recognition service data corresponding to the intent recognition business;
[0038] Call the preset target database;
[0039] storing the intent recognition service data in the target database;
[0040] The target database is updated based on a preset processing interface.
[0041] Furthermore, after the step of performing corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain the target intent recognition result corresponding to the query text, it also includes:
[0042] Generate a cached intent result corresponding to the query text based on the target intent recognition result;
[0043] Obtaining the validity period corresponding to the cached intent result;
[0044] Cache the cache intention result based on the validity time;
[0045] After completing the caching of the cache intent result, the target intent identification result is returned to the user.
[0046] In order to solve the above technical problems, the embodiment of the present application also provides an intention recognition device based on artificial intelligence, which adopts the following technical solution:
[0047] A first acquisition module is used to acquire a query text input by a user;
[0048] A cleaning module, used for cleaning the query text to obtain a corresponding target text;
[0049] A matching module, used to perform matching processing on the target text based on a preset matching module to obtain a corresponding matching result;
[0050] A prediction module, for invoking a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result if the content of the matching result is a matching failure;
[0051] A classification module, used to classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results;
[0052] A processing module, used for calling a target post-processing rule corresponding to the semantic model to perform matching processing on the secondary tag prediction result to obtain a corresponding rule matching result;
[0053] An adjustment module is used to perform corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text.
[0054] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0055] Get the query text entered by the user;
[0056] Cleaning the query text to obtain a corresponding target text;
[0057] Performing matching processing on the target text based on a preset matching module to obtain a corresponding matching result;
[0058] If the content of the matching result is a match failure, calling a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result;
[0059] Classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results;
[0060] Calling the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary label prediction result to obtain the corresponding rule matching result;
[0061] Based on the rule matching result, the secondary label prediction result is adjusted accordingly to obtain a target intent recognition result corresponding to the query text.
[0062] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0063] Get the query text entered by the user;
[0064] Cleaning the query text to obtain a corresponding target text;
[0065] Performing matching processing on the target text based on a preset matching module to obtain a corresponding matching result;
[0066] If the content of the matching result is a match failure, calling a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result;
[0067] Classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results;
[0068] Calling the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary label prediction result to obtain the corresponding rule matching result;
[0069] Based on the rule matching result, the secondary label prediction result is adjusted accordingly to obtain a target intent recognition result corresponding to the query text.
[0070] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0071] This application first obtains the query text input by the user; then cleans the query text to obtain the corresponding target text; then matches the target text based on a preset matching module to obtain the corresponding matching result; if the content of the matching result is a match failure, then calls the preset semantic model to predict the target text to obtain the corresponding first-level label prediction result; then classifies the first-level label prediction result based on the semantic model to obtain the corresponding second-level label prediction result; further calls the target post-processing rule corresponding to the semantic model to match the second-level label prediction result to obtain the corresponding rule matching result; finally, based on the rule matching result, the second-level label prediction result is adjusted accordingly to obtain the target intent recognition result corresponding to the query text. This application obtains the target text by cleaning the query text input by the user, and then performs intent recognition on the target text by integrating the use of matching modules and semantic models, thereby achieving comprehensive coverage of intent recognition processing from simple to complex, ensuring that high-precision intent recognition capabilities can be provided in different situations, and effectively improving the recognition accuracy of intent recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0073] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0074] Figure 2 A flowchart of an embodiment of an artificial intelligence-based intention recognition method according to the present application;
[0075] Figure 3 is a schematic structural diagram of an embodiment of an intention recognition device based on artificial intelligence according to the present application;
[0076] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0078] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0079] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0080] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0081] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0082] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a desktop computer, etc.
[0083] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0084] It should be noted that the artificial intelligence-based intention recognition method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based intention recognition device is generally set in the server / terminal device.
[0085] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0086] Continue to refer Figure 2 , showing a flow chart of an embodiment of an intention recognition method based on artificial intelligence according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The intention recognition method based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario where intention recognition is required, and the intention recognition method based on artificial intelligence can be applied to products in these scenarios, for example, intention recognition in the field of finance and insurance. The intention recognition method based on artificial intelligence includes the following steps:
[0087] Step S201, obtaining the query text input by the user.
[0088] In this embodiment, the electronic device (e.g. Figure 1The server / terminal device shown in the figure) can obtain the query text input by the user through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future. The executor of the present application may be a dialogue system that provides intent recognition services, or simply referred to as a system. The system provides an intent recognition interface for receiving the original query input by the user, that is, the query text.
[0089] Step S202, cleaning the query text to obtain a corresponding target text.
[0090] In this embodiment, the above-mentioned specific implementation process of cleaning the query text to obtain the corresponding target text will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.
[0091] Step S203: performing matching processing on the target text based on a preset matching module to obtain a corresponding matching result.
[0092] In this embodiment, the specific implementation process of matching the target text based on the preset matching module to obtain the corresponding matching result will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0093] Step S204: If the content of the matching result is a matching failure, a preset semantic model is called to perform prediction processing on the target text to obtain a corresponding first-level label prediction result.
[0094] In this embodiment, by inputting the target text into the semantic model, in the first call of the semantic model, the semantic model will predict the first-level label to which the target text belongs based on the content of the target text, and output the corresponding first-level label prediction result. Among them, the first-level label usually represents a broader intent category, and the second-level label is a further subdivision of the first-level label. For example, under the first-level label "Query Weather", the second-level label may include more specific intents such as "Query Today's Weather", "Query Tomorrow's Weather", etc. In addition, for the construction process of the above-mentioned semantic model, this application will provide further detailed descriptions of this in subsequent specific embodiments, and will not be elaborated on here.
[0095] Step S205: classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results.
[0096] In this embodiment, by calling the semantic model twice, in the second call of the semantic model, the secondary label to which the target text belongs is further predicted based on the above-mentioned primary label prediction result and the detailed content of the target text, and the corresponding secondary label prediction result is output.
[0097] Step S206, calling the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary label prediction result to obtain a corresponding rule matching result.
[0098] In this embodiment, the preset post-processing rule base can be called, and the target post-processing rule corresponding to the semantic model can be found from the post-processing rule base. The post-processing rule base is a pre-built storage of post-processing rules corresponding to a variety of intent matching methods (rule matching, exact matching, fuzzy matching, semantic model matching). In addition, the result content of the above rule matching result includes rule matching success or rule matching failure.
[0099] Step S207: performing corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text.
[0100] In this embodiment, the above-mentioned specific implementation process of performing corresponding adjustment processing on the secondary label prediction result based on the rule matching result to obtain the target intent recognition result corresponding to the query text will be described in further details in subsequent specific embodiments of the present application and will not be elaborated in detail here.
[0101] This application obtains the target text by cleaning the query text input by the user, and then performs intent recognition on the target text by integrating the use of matching modules and semantic models, achieving comprehensive coverage of intent recognition processing from simple to complex, ensuring high-precision intent recognition capabilities in different situations, and effectively improving the recognition accuracy of intent recognition.
[0102] In some optional implementations, the matching module includes at least a rule matching module, an exact matching module and a fuzzy matching module; step S203 includes the following steps:
[0103] The target text is subjected to rule matching based on the rule matching module.
[0104] In this embodiment, the system adopts a modular design, and each matching module (such as rule matching module, exact matching module, fuzzy matching module, and also semantic model matching module, etc.) can operate independently and can be freely plugged in and out. This not only greatly improves the maintainability and scalability of the system's intent recognition service, but also allows developers to quickly iterate and optimize a single module for specific scenarios or needs without changing the entire system, thereby reducing complexity and accelerating iteration speed.
[0105] The above rule matching module is a pre-built functional module that performs rule matching according to preset rule code data. Specifically, the first stage of intent recognition is rule matching, the purpose of which is to use rule codes for matching in some cases where comprehensive judgment of query (query text) and other information is required. Rule matching has the highest priority. If any of the pre-rules is matched, it will directly enter the unified post-processing. Among them, other information includes: robot entrance (APP, WeChat, web page, etc.), robot id (specifically which robot, multiple robots are independent of each other, and different robots have different processing logic), current number of dialogue rounds, additional information (parameters agreed by the entire system), etc. Rule example: When a user breaks when purchasing insurance, the query will be some special fixed characters, such as "$Secondary Entry Task$", and the entrance information contains "Good Car Owner APP", and the extended information contains "Purchase Breakpoint", it will be directly identified as the purchase breakpoint intention and directly enter the unified post-processing.
[0106] Among them, the purpose of unified post-processing is to uniformly control the output intent recognition results. All matching results of rule matching, exact matching, and fuzzy matching must undergo unified post-processing. If the post-processing rules are not matched, the intent recognition results will not be modified. Among them, there is no specific limitation on the setting of post-processing rules corresponding to rule matching, exact matching, fuzzy matching, and semantic model matching, which can be determined according to actual business usage requirements. Exemplarily, the post-processing rules for fuzzy matching include: different robots are set with different fuzzy matching thresholds, such as robot A has lower matching requirements, fuzzy matching sentence similarity is lower, or the number of concepts in the sentence can be less. Alternatively, the post-processing rules for semantic model matching include: if the similarity score of the semantic model matching is lower than a certain value, the intent recognition result is directly modified to no intent.
[0107] If the rule matching fails, the target text is accurately matched based on the accurate matching module.
[0108] In this embodiment, the above-mentioned precise matching module is a pre-built functional module for precise matching based on preset precise query data. Specifically, if the rule matching fails, the precise matching link is entered to find a standard question that is completely consistent with the query of the current round. If the precise matching is successful, the unified post-processing is directly entered. If the matching fails, the fuzzy matching is continued. Among them, since only the query of the current round is matched, it may not necessarily represent the user's true intention, it is necessary to carefully set the precise query data.
[0109] If the exact match fails, a fuzzy match is performed on the target text based on the fuzzy matching module.
[0110] In this embodiment, the fuzzy matching module is a pre-built functional module for fuzzy matching based on preset concept data and sentence data. Specifically, the fuzzy matching process includes: 1. Word segmentation. First, the user's current query is segmented, and the word segmentation uses a word segmentation tool configured with a custom dictionary. 2. Obtain concepts based on word segmentation. Find the concept corresponding to each word in the word segmentation result based on the concept graph, and save all concepts after deduplication. The specific steps are: a. For each word in the word segmentation result, based on the edge of "word"-->"concept", find the concepts corresponding to these words, and record the position index of these words in the original query. b. Expand the acquired concepts, based on the edge of "concept"-->"concept", expand according to the acquired concepts; c. Combine and expand concepts, that is, combine the concepts acquired according to the first two steps in pairs, and judge whether the combination is in the concept graph. If it is in the concept graph, take the combined new concept as the starting point, and based on the edge of "concept"-->"concept", obtain more concepts. 3. Extract entities and obtain concepts based on entities. Based on regular expressions, entities are extracted, including: license plate number, mobile phone number, ID card number, money (1,000 yuan, 50 yuan, etc.), time (2024, December, etc.). Each type of entity corresponds to a concept, such as "-license plate number", "-mobile phone number", etc., so that some concepts are obtained based on the entity. Then, based on the edge "concept"-->"concept", the concepts obtained from the entity are expanded. 4. Recall sentences based on concepts. Based on the acquired concept set, search for sentences from the sentence library. The concepts contained in these sentences should be a subset of the acquired concept set. 5. Sort the sentences. For each recalled sentence, record the number of concepts of the sentence and the number of characters of the original query matched (because the position index of the original word corresponding to the concept in the original query has been saved), and then sort the sentences according to the number of characters covering the original query and the number of concepts contained. If multiple sentences appear, but correspond to different intentions, no intention is returned. At this time, it is necessary to check whether the sentence design is reasonable. If there is no problem, the ratio of the number of original query characters covered by the top-ranked sentence to the number of original query characters is recorded as the matching similarity. Additional note: If multiple words correspond to the same concept, these multiple words are considered matched when calculating the number of original query characters matched by the sentence. For example: "Buy insurance for my Corgi and Husky", the Corgi is matched while the Husky is matched. Therefore, the similarity is 9 / 11 = 0.82.
[0111] If the fuzzy match is successful, the generated content is the matching result of the successful match.
[0112] In this embodiment, if one of the above rule matching, exact matching, and fuzzy matching is successfully matched, a corresponding matching result indicating successful matching will be generated.
[0113] If the fuzzy match fails, a matching result indicating the match failure is generated.
[0114] In this embodiment, if the matching process fails in the above rule matching, exact matching, and fuzzy matching, a matching result indicating that the matching failed will be generated accordingly.
[0115] The present application combines the use of rule matching module, exact matching module and fuzzy matching module to perform rule matching, exact matching and fuzzy matching on the target text respectively, which can realize intelligent and accurate matching of the target text, ensure the accuracy of the matching processing, and improve the accuracy of the generated matching results.
[0116] In some optional implementations of this embodiment, step S207 includes the following steps:
[0117] Get the result content of the rule matching result.
[0118] In this embodiment, the result content of the rule matching result may include rule matching success or rule matching failure.
[0119] Determine whether the result content is a successful rule match.
[0120] In this embodiment, the actual result content corresponding to the rule matching result can be identified by performing content analysis on the result content.
[0121] If so, the secondary label prediction result is modified based on a preset modification strategy to obtain a corresponding modification result, and the modification result is used as a target intent recognition result corresponding to the query text.
[0122] In the present embodiment, the above-mentioned target post-processing rules are rules for verifying and adjusting the rule matching results, specifically the threshold judgment of the model prediction score. Specifically, for the prediction results output by the semantic model, the prediction score (intent similarity score) is checked by using the above-mentioned target post-processing rules to see whether it reaches the preset threshold. The prediction score reflects the confidence level of the semantic model in the prediction results. If the prediction score is lower than the threshold, the prediction result may be considered unreliable, and a rule matching result of successful rule matching is generated. The prediction results output by the semantic model will be adjusted subsequently, specifically by modifying the prediction result to a modified result without intent, and using the modified result as the final target intent recognition result corresponding to the query text.
[0123] If not, the secondary tag prediction result is used as the target intent recognition result corresponding to the query text.
[0124] In this embodiment, if the result content of the rule matching result is that the rule matching fails, it means that the prediction result output by the semantic model is a reliable intent recognition result, and the secondary label prediction result output by the semantic model will be directly used as the target intent recognition result corresponding to the query text.
[0125] After calling the target post-processing rules corresponding to the semantic model to match the secondary label prediction results and obtain the rule matching results, the present application will also intelligently adjust the secondary label prediction results based on the specific content of the rule matching results to obtain the final target intent recognition results corresponding to the query text, effectively ensuring the accuracy and rationality of the output target intent recognition results.
[0126] In some optional implementations, step S202 includes the following steps:
[0127] The query text is processed according to rules to obtain a corresponding first text.
[0128] In this embodiment, the above rule processing may specifically include converting English uppercase and lowercase, converting Chinese traditional characters to simplified characters, converting characters (full-width characters to half-width characters), deleting special symbols, deleting unnecessary spaces, line breaks, tabs, etc., to obtain the corresponding first text.
[0129] Perform error correction processing on the first text to obtain a corresponding second text.
[0130] In this embodiment, the error correction process may include using a language model to perform spelling check and correction on the first text, thereby obtaining a processed second text.
[0131] The second text is disambiguated to obtain a corresponding third text.
[0132] In this embodiment, the above-mentioned disambiguation processing may include rewriting the second text with the help of an external knowledge base or historical conversation records, and using the reference resolution technology in natural language processing, and rewriting the text according to the above context so that it contains complete information, thereby obtaining a corresponding third text.
[0133] The third text is used as the target text.
[0134] The present application performs rule processing, error correction processing and disambiguation processing on the query text, thereby quickly and accurately completing the cleaning processing of the query text and generating the corresponding target text, effectively ensuring the data accuracy and data integrity of the obtained target text.
[0135] In some optional implementations, before step S204, the electronic device may further perform the following steps:
[0136] Get pre-collected training text data.
[0137] In this embodiment, the training text data includes a large amount of pre-labeled query text data, as well as primary and secondary labels corresponding to the query text data. Among them, the sources of training data may include: 1. According to the dialogue log, large model, manual annotation (multiple rounds, single round); 2. Existing precise question corpus (single round); 3. Existing sentence patterns and concepts, restored to questions (single round); 4. Use a large model to create historical dialogue records (multiple rounds, single round). In addition, the label design for primary and secondary labels can be determined according to the actual intention recognition needs. Exemplarily, the primary labels include buying insurance, checking information, and claims. Secondary labels include: buying health insurance, buying property insurance, buying pet insurance, buying accident insurance, checking policyholder information, checking policy information, etc.
[0138] Among them, both exact matching and fuzzy matching can only process the user's current query, but the contextual information is missing. For example, in this round, the user said: "Tell me about it", and in the previous round, health insurance was recommended to the user. Now the intention of interpreting health insurance should be recognized, but due to the loss of contextual information, the intention cannot be recognized. For another example, in this round, the user said: "Buy this", and the object referred to by this "this" is "a certain insurance" mentioned by the user in the previous round of dialogue, which will also lead to intention recognition errors. In addition, fuzzy matching involves maintaining sentence patterns and concepts, which is time-consuming and labor-intensive, and the effect is not as good as the semantic model, and the production efficiency is low.
[0139] Get the preset initial model.
[0140] In this embodiment, the initial model may be a large model suitable for classification tasks corresponding to the primary solution. Alternatively, the initial model may be a small model with a Transformer encoder architecture corresponding to the alternative solution, which has lower computational complexity and faster reasoning speed while maintaining certain performance.
[0141] Specifically, the main solution includes: Solution design: Write an agent application based on the big model, call the big model twice, the first time to classify the first-level labels and let the big model give a classification explanation to improve the classification accuracy, and the second time based on the result of the first classification, classify the second-level labels and let the big model give an explanation. The purpose of calling the big model twice is to reduce the difficulty of classification and improve the classification accuracy. Model selection: In the specific selection of the big model, considering the timeliness issue, choose a large model of 10B or less. Model fine-tuning: If the classification effect of directly using the big model is not ideal, it is necessary to construct training data to fine-tune the big model. The main solution is fast to build, and only needs to write a prompt, and a high accuracy rate can be achieved without fine-tuning.
[0142] The alternative solution includes: Solution design: A small model based on the Transformer encoder, with the input format of: user's first round query [SEP] user's second round query [SEP]... [SEP] user's current round query. The robot's reply is not added to the input because the robot's reply may contain pictures, cards, etc., not pure text, which may introduce noise. The model is called twice during model inference, the first time to classify the first-level labels, and the second time to classify the second-level labels based on the results of the first-level labels. Model selection: Choose to use a small model after model distillation to reduce the time consumption of intent recognition service. The alternative solution has a fast response speed, and the training data can be quickly customized for fine-tuning, so that the upper limit of the accuracy rate is higher than the main solution.
[0143] The initial model is trained for the first time based on the training text data to obtain a corresponding first model.
[0144] In this embodiment, the model construction of the main selection scheme is used as an example for explanation. The training process of the first training may include: using the full amount of training text data to train the initial model, with the goal of distinguishing different primary labels. During the training process, the model performance can be optimized by adjusting hyperparameters such as learning rate, batch size, and training rounds.
[0145] Acquire primary label data corresponding to the first training, and perform secondary training on the first model based on the primary label data to obtain a corresponding second model.
[0146] In this embodiment, the training process of the secondary training includes: based on the first training, the model is trained again for the data under each primary label. Specifically, it can be achieved through multi-task learning (predicting primary and secondary labels at the same time) or model cascading (predicting the primary label first, and then predicting the secondary label based on the primary label).
[0147] The second model is fine-tuned to obtain a fine-tuned third model.
[0148] In this embodiment, the third model obtained by pre-training can be fine-tuned according to the business scenario, specifically by continuing to train the model on a specific data set and adjusting the model architecture or parameters to meet the needs of a specific task.
[0149] The semantic model is generated based on the third model.
[0150] In this embodiment, the third model can be used as the final semantic model, and the trained semantic model can be deployed to the online service. Specifically, the prediction service can be provided through the API interface. When deploying, factors such as the response time, concurrency, and resource consumption of the model need to be considered, and the deployed model should be monitored and evaluated to ensure the stability and accuracy of the semantic model.
[0151] The present application obtains a first model by performing a first training on an initial model using pre-collected training text data, then obtains a second model by performing a second training on the first model according to the primary label data corresponding to the first training, and then fine-tunes the second model to obtain a final semantic model to complete the semantic model construction process, thereby effectively improving the semantic model construction efficiency and ensuring the model effect of the obtained semantic model.
[0152] In other embodiments, the process of training and deploying a small model is similar to the main option. The small model may require more training rounds or data augmentation techniques to improve performance. In addition, if resources are limited and you want to further improve the performance of the small model, you can use knowledge distillation technology. Use the large model as the teacher model and the small model as the student model to improve the performance of the student model by letting the teacher model guide the learning of the student model. During the distillation process, you can pay attention to key information such as the probability distribution of the model output and the attention map. By choosing to use a small model after model distillation, you can effectively reduce the service time of intent recognition.
[0153] In some optional implementations of this embodiment, the electronic device may further perform the following steps:
[0154] Obtain the intent recognition service data corresponding to the intent recognition business.
[0155] In this embodiment, the above-mentioned intent recognition service data is the data required by the system to perform service processing of intent recognition business, which may specifically include intent type data of all intents, rule code data of rule matching, precise question data of exact matching, concept data of fuzzy matching, sentence data of fuzzy matching, and post-processing rule code data.
[0156] Specifically, the intent type data includes: a robot has multiple intents, such as: buying car insurance, checking insurance policies, applying for claims, investigating rescue, etc. Each intent belongs to a specific robot, there is no hierarchical relationship between intents, and the intents of each robot are independent of each other. Rule code data includes: rule code used in the rule matching stage. Some matching rules require comprehensive judgment of query and other incoming information. For example, for the same query, different robots and different additional information need to be identified as different intents. Or clickable links and buttons on the front-end page. Precise question data includes: in the precise matching stage, it is fully matched with the current round of user queries. The purpose of setting precise questions is to quickly identify some common user questions and reduce service response time. Concept data includes: concept data required for fuzzy matching, and concept data will be stored in a directed graph. Concepts are used to match the word segmentation results of queries and serve as the basis for sentence selection. Sentence data includes: sentence data required for fuzzy matching. Based on the acquired concept sets, sentences matching these concept sets are selected from the sentence library, and then the fuzzy matching results are given according to the matching scores between the sentences and the original query. The post-processing rule code data includes: the rule code for unified post-processing of the intent recognition results after each stage of intent recognition. Among them, some matching rules are based on the matching process information, for example, if the requirements of robot A are lower, the fuzzy matching threshold can be lower or the number of concepts in the sentence can be less; for example, if the similarity score of the intent model matching is lower than a certain value, the intent recognition result will be directly modified to no intent.
[0157] Fuzzy matching can bring a certain degree of generalization capability under the framework of rule-based matching. The response time of fuzzy matching is very low and does not require GPU resources.
[0158] Call the preset target database.
[0159] In this embodiment, the target database is a pre-built external database for realizing the functions of flexible management and real-time update of intent recognition service data.
[0160] The intent recognition service data is stored in the target database.
[0161] In this embodiment, the intention identification service data can be stored in the target database by acquiring the location information of the target database and then based on the location information.
[0162] The target database is updated based on a preset processing interface.
[0163] In this embodiment, the above-mentioned processing interface includes the add, delete, modify and query interfaces corresponding to the above-mentioned various intent recognition service data. Developers can perform maintenance at any time, and then update the intent recognition service at any time without publishing. Specifically, developers can easily add, delete, modify and query the data in the target database, and the system automatically synchronizes the latest information in the target database regularly, ensuring the timeliness and accuracy of intent recognition, and providing users with the most appropriate interactive experience for the current situation. In addition, the system will provide an interface for these data modification times to determine whether the data has been modified, and then the interface can be used to determine whether the data needs to be updated, rather than pulling all the data at regular intervals.
[0164] This application obtains the intent recognition service data corresponding to the intent recognition business and stores the intent recognition service data in the target database, thereby effectively ensuring the data security of the intent recognition service data. In addition, it will also intelligently implement automatic data updates for the target database based on the processing interface, effectively ensuring the timeliness and accuracy of intent recognition, which is conducive to providing users with the most appropriate interactive experience for the current situation.
[0165] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:
[0166] Generate a cached intent result corresponding to the query text based on the target intent recognition result.
[0167] In this embodiment, a unique key may be set for the query text, such as a hash value of the query text or a character string after some transformation, and the target intent recognition result is used as the key value corresponding to the key of the query text, thereby obtaining a cache intent result corresponding to the query text.
[0168] Get the validity time corresponding to the cache intent result.
[0169] In this embodiment, the validity period (ie, validity period) of the cached intent result may be set according to actual business needs, for example, may be set to 10 minutes.
[0170] The cache intent result is cached based on the validity time.
[0171] In this embodiment, the cached intent result is cached by using the effective time, so that the cached intent result will automatically become invalid after its corresponding effective time expires, so as to re-acquire the latest intent recognition result later. Among them, suitable caching technology can be selected according to the actual application scenario, such as Red is, Memcached, etc., to provide the system with fast data access capabilities.
[0172] After completing the caching of the cache intent result, the target intent identification result is returned to the user.
[0173] In this embodiment, the target intent recognition result can be returned to the user by SMS, email, interface display, etc. In addition, by integrating cache logic in the system, first check whether there is a cached intent result of the query text in the cache. If it exists and has not expired, the cached intent result is directly returned to the user; otherwise, the semantic model is called to predict the intent, and the predicted intent result is cached for subsequent use.
[0174] After obtaining the target intent recognition result corresponding to the query text, the present application will automatically and intelligently generate a cached intent result corresponding to the query text based on the target intent recognition result, and cache the cached intent result according to a preset effective time, so as to implement the caching strategy of the intent result to reduce the overhead of repeated calculations of the system, thereby helping to improve the processing efficiency of the system for intent recognition to achieve performance optimization of the system.
[0175] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0176] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.
[0177] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0178] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target intent recognition results, the above-mentioned target intent recognition results can also be stored in a node of a blockchain.
[0179] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0180] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0181] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0182] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0183] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0184] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of an intention recognition device based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0185] like Figure 3As shown, the artificial intelligence-based intention recognition device 300 described in this embodiment includes: a first acquisition module 301, a cleaning module 302, a matching module 303, a prediction module 304, a classification module 305, a processing module 306 and an adjustment module 307. Among them:
[0186] The first acquisition module 301 is used to acquire the query text input by the user;
[0187] A cleaning module 302 is used to clean the query text to obtain a corresponding target text;
[0188] The matching module 303 is used to perform matching processing on the target text based on a preset matching module to obtain a corresponding matching result;
[0189] The prediction module 304 is used to call a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result if the content of the matching result is a matching failure;
[0190] A classification module 305 is used to classify the first-level label prediction result based on the semantic model to obtain a corresponding second-level label prediction result;
[0191] The processing module 306 is used to call the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary tag prediction result to obtain a corresponding rule matching result;
[0192] The adjustment module 307 is used to perform corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text.
[0193] In some optional implementations of this embodiment, the matching module includes at least a rule matching module, an exact matching module and a fuzzy matching module; the matching module 303 includes:
[0194] A first matching submodule, used for performing rule matching on the target text based on the rule matching module;
[0195] A second matching submodule, used for performing an exact match on the target text based on the exact matching module if the rule matching fails;
[0196] A third matching submodule, configured to perform fuzzy matching on the target text based on the fuzzy matching module if the exact matching fails;
[0197] The first generation submodule is used to generate a matching result indicating that the fuzzy match is successful if the fuzzy match is successful;
[0198] The second generating submodule is used to generate a matching result indicating that the matching has failed if the fuzzy matching fails.
[0199] In some optional implementations of this embodiment, the adjustment module 307 includes:
[0200] An acquisition submodule, used to obtain the result content of the rule matching result;
[0201] A judgment submodule is used to judge whether the result content is a successful rule match;
[0202] A modification submodule, for modifying the secondary tag prediction result based on a preset modification strategy to obtain a corresponding modification result, and using the modification result as a target intent recognition result corresponding to the query text;
[0203] The first determination submodule is used to, if not, use the secondary tag prediction result as the target intent recognition result corresponding to the query text.
[0204] In some optional implementations of this embodiment, the cleaning module 302 includes:
[0205] A first processing submodule, configured to perform rule processing on the query text to obtain a corresponding first text;
[0206] A second processing submodule, configured to perform error correction processing on the first text to obtain a corresponding second text;
[0207] A third processing submodule, configured to perform disambiguation processing on the second text to obtain a corresponding third text;
[0208] The second determining submodule is used to use the third text as the target text.
[0209] In some optional implementations of this embodiment, the artificial intelligence-based intention recognition device further includes:
[0210] A second acquisition module is used to acquire pre-collected training text data; wherein the training text data includes query text data, and primary tags and secondary tags corresponding to the query text data;
[0211] The third acquisition module is used to acquire a preset initial model;
[0212] A first training module, used for performing a first training on the initial model based on the training text data to obtain a corresponding first model;
[0213] A second training module, used to obtain primary label data corresponding to the first training, and perform secondary training on the first model based on the primary label data to obtain a corresponding second model;
[0214] A fine-tuning module, used to perform fine-tuning on the second model to obtain a fine-tuned third model;
[0215] The first generating module is used to generate the semantic model based on the third model.
[0216] In some optional implementations of this embodiment, the artificial intelligence-based intention recognition device further includes:
[0217] A fourth acquisition module, used to acquire intent recognition service data corresponding to the intent recognition business;
[0218] A calling module is used to call a preset target database;
[0219] A storage module, used for storing the intent recognition service data in the target database;
[0220] The update module is used to perform data update processing on the target database based on a preset processing interface.
[0221] In some optional implementations of this embodiment, the artificial intelligence-based intention recognition device further includes:
[0222] A second generating module, configured to generate a cache intent result corresponding to the query text based on the target intent recognition result;
[0223] A fifth acquisition module, used to acquire the validity time corresponding to the cache intention result;
[0224] A cache module, used for caching the cache intention result based on the validity time;
[0225] The return module is used to return the target intent recognition result to the user after completing the caching of the cache intent result.
[0226] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0227] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0228] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0229] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the intention recognition method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0230] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for running the artificial intelligence-based intention recognition method.
[0231] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0232] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the artificial intelligence-based intention recognition method as described above.
[0233] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0234] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. An intention recognition method based on artificial intelligence, characterized in that: The steps include: Get the query text entered by the user; Cleaning the query text to obtain a corresponding target text; Performing matching processing on the target text based on a preset matching module to obtain a corresponding matching result; If the content of the matching result is a match failure, calling a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result; Classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results; Calling the target post-processing rule corresponding to the semantic model to perform matching processing on the secondary label prediction result to obtain the corresponding rule matching result; Based on the rule matching result, the secondary label prediction result is adjusted accordingly to obtain a target intent recognition result corresponding to the query text.
2. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: The matching module at least includes a rule matching module, an exact matching module and a fuzzy matching module; the step of performing matching processing on the target text based on the preset matching module to obtain the corresponding matching result specifically includes: Performing rule matching on the target text based on the rule matching module; If the rule matching fails, then accurately matching the target text based on the accurate matching module; If the exact match fails, fuzzy matching is performed on the target text based on the fuzzy matching module; If the fuzzy match is successful, the generated content is the matching result of the successful match; If the fuzzy match fails, a matching result indicating the match failure is generated.
3. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: The step of performing corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text specifically includes: Obtain the result content of the rule matching result; Determine whether the result content is a successful rule match; If so, modify the secondary label prediction result based on a preset modification strategy to obtain a corresponding modification result, and use the modification result as a target intent recognition result corresponding to the query text; If not, the secondary tag prediction result is used as the target intent recognition result corresponding to the query text.
4. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: The step of cleaning the query text to obtain the corresponding target text specifically includes: Performing rule processing on the query text to obtain a corresponding first text; Performing error correction processing on the first text to obtain a corresponding second text; performing disambiguation processing on the second text to obtain a corresponding third text; The third text is used as the target text.
5. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: Before the step of calling the preset semantic model to perform prediction processing on the target text to obtain the corresponding first-level label prediction result, the method further includes: Acquire pre-collected training text data; wherein the training text data includes query text data, and primary tags and secondary tags corresponding to the query text data; Get the preset initial model; Performing a first training on the initial model based on the training text data to obtain a corresponding first model; Acquire primary label data corresponding to the first training, and perform secondary training on the first model based on the primary label data to obtain a corresponding second model; Fine-tune the second model to obtain a fine-tuned third model; The semantic model is generated based on the third model.
6. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: The artificial intelligence-based intention recognition method further includes: Obtaining intent recognition service data corresponding to the intent recognition business; Call the preset target database; storing the intent recognition service data in the target database; The target database is updated based on a preset processing interface.
7. The intention recognition method based on artificial intelligence according to claim 1, characterized in that: After the step of performing corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain the target intent recognition result corresponding to the query text, the method further includes: Generate a cached intent result corresponding to the query text based on the target intent recognition result; Obtaining the validity period corresponding to the cached intent result; Cache the cache intention result based on the validity time; After completing the caching of the cache intent result, the target intent identification result is returned to the user.
8. An intention recognition device based on artificial intelligence, characterized in that: include: A first acquisition module is used to acquire a query text input by a user; A cleaning module, used for cleaning the query text to obtain a corresponding target text; A matching module, used to perform matching processing on the target text based on a preset matching module to obtain a corresponding matching result; A prediction module, for invoking a preset semantic model to perform prediction processing on the target text to obtain a corresponding first-level label prediction result if the content of the matching result is a matching failure; A classification module, used to classify the first-level label prediction results based on the semantic model to obtain corresponding second-level label prediction results; A processing module, used for calling a target post-processing rule corresponding to the semantic model to perform matching processing on the secondary tag prediction result to obtain a corresponding rule matching result; An adjustment module is used to perform corresponding adjustment processing on the secondary tag prediction result based on the rule matching result to obtain a target intent recognition result corresponding to the query text.
9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the artificial intelligence-based intention recognition method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based intention recognition method as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Intention recognition method and device and electronic equipment
CN120611011A
Speech recognition processing method and device
CN120954401A