Method and device for updating intent template library, electronic equipment and storage medium

By retrieving statements with empty intent recall results from the historical dialogue database, determining slot tags, and generating semantic templates, the problems of low update efficiency and insufficient accuracy of the intent template library are solved, and automatic update and performance optimization of the intent template library are achieved.

CN117251462BActive Publication Date: 2026-05-22APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECH CO LTD
Filing Date
2023-09-28
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

The existing intent template library has low update efficiency and insufficient accuracy, resulting in insufficient semantic understanding ability of machines in human-computer interaction.

Method used

By retrieving target statements with empty intent recall results from the historical dialogue database, determining slot labels and sorting them according to preset rules, generating semantic templates and identifying intents, and then storing them in the intent template library.

Benefits of technology

The scale of the intent template library has been expanded, the update cost has been reduced, the accuracy and reliability of the intent template library have been improved, and the performance of machines in the human-computer interaction process has been optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117251462B_ABST
    Figure CN117251462B_ABST
Patent Text Reader

Abstract

The present disclosure provides an updating method and device of an intent template library, an electronic device and a storage medium, relating to the technical field of computers, in particular to the technical field of artificial intelligence such as deep learning, natural language understanding, voice interaction. The specific implementation scheme is: obtaining a target sentence with an empty intent recall result from a historical dialogue library; determining the word slot label corresponding to each word group in the target sentence; based on a preset word slot arrangement rule, sorting the word slot labels corresponding to the target sentence to obtain a semantic template corresponding to the target sentence; performing intent recognition on the semantic template or the target sentence to determine a target intent corresponding to the semantic template; and storing the semantic template and the target intent in the intent template library. Thus, the automatic updating of the intent template library is realized, which not only expands the size of the intent template library and reduces the cost of updating the intent template library, but also improves the accuracy and reliability of the intent template library and optimizes the performance of the machine in the human-computer interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to the fields of artificial intelligence technology such as deep learning, natural language understanding, and voice interaction. Specifically, it relates to a method, apparatus, electronic device, and storage medium for updating an intent template library. Background Technology

[0002] In the field of Natural Language Understanding (NLU), the size of the intent template library determines the performance of machine dialogue. Therefore, implementing periodic updates to the intent template library plays a significant role in improving the performance of machine dialogue and can meet the infinite and ever-growing needs of machines for knowledge and understanding. Summary of the Invention

[0003] This disclosure aims to at least partially address one of the technical problems in the related art.

[0004] According to a first aspect of this disclosure, a method for updating an intent template library is provided, comprising:

[0005] Retrieve target statements from the historical dialogue database where the intent recall result is empty;

[0006] Determine the slot label corresponding to each phrase in the target statement;

[0007] Based on the preset slot arrangement rules, the slot tags corresponding to the target sentence are sorted to obtain the semantic template corresponding to the target sentence;

[0008] The semantic template or the target statement is subjected to intent recognition in order to determine the target intent corresponding to the semantic template.

[0009] The semantic template and the target intent are associated and stored in the intent template library.

[0010] According to a second aspect of this disclosure, an apparatus for updating an intent template library is provided, comprising:

[0011] The first acquisition module is used to retrieve target statements from the historical dialogue database where the intent recall result is empty;

[0012] The first determining module is used to determine the slot label corresponding to each word group in the target statement;

[0013] The second acquisition module is used to sort the slot tags corresponding to the target sentence based on a preset slot arrangement rule in order to obtain the semantic template corresponding to the target sentence.

[0014] The second determining module is used to perform intent recognition on the semantic template or the target statement to determine the target intent corresponding to the semantic template.

[0015] The storage module is used to associate and store the semantic template and the target intent into the intent template library.

[0016] According to a third aspect of this disclosure, an electronic device is provided, comprising:

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the intention template library update method as described in the first aspect.

[0020] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform an update method for an intent template library as described in the first aspect.

[0021] According to a fifth aspect of this disclosure, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the intention template library update method as described in the first aspect.

[0022] The method, apparatus, electronic device, and storage medium for updating the intent template library disclosed herein have the following beneficial effects:

[0023] In this disclosure, the template library update system first retrieves target statements with empty intent recall results from the historical dialogue library. Then, it determines the slot tags corresponding to each phrase in the target statement and sorts the slot tags based on preset slot arrangement rules to obtain the semantic template corresponding to the target statement. Next, it performs intent recognition on the semantic template or the target statement to determine the target intent corresponding to the semantic template. Finally, it associates and stores the semantic template and the target intent in the intent template library. Thus, by determining slot tags and slot arrangement rules for statements with empty historical intent recall results, the system obtains semantic templates and corresponding template intents, achieving automatic updates to the intent template library. This not only expands the scale of the intent template library and reduces the cost of updating it, but also improves the accuracy and reliability of the intent template library, optimizing machine performance in human-computer interaction.

[0024] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0025] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, which are provided for a better understanding of the present invention and are not intended to limit the scope of this disclosure, wherein:

[0026] Figure 1 This is a flowchart illustrating a method for updating an intent template library according to an embodiment of this disclosure;

[0027] Figure 2 This is a flowchart illustrating a method for updating an intent template library according to another embodiment of this disclosure;

[0028] Figure 3 This is a flowchart illustrating a method for updating an intent template library according to another embodiment of this disclosure;

[0029] Figure 4 This is a schematic diagram of the structure of an intent template library update device according to an embodiment of the present disclosure;

[0030] Figure 5 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0031] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0032] This disclosure relates to the fields of artificial intelligence technology, such as deep learning and natural language understanding.

[0033] Artificial Intelligence (AI) is a new technical science that studies, develops, and applies theories, methods, technologies, and application systems to simulate, extend, and expand human intelligence.

[0034] Deep learning learns the inherent patterns and hierarchical representations of sample data. The information gained during this learning process greatly aids in interpreting data such as text, images, and sound. The ultimate goal of deep learning is to enable machines to possess analytical and learning capabilities similar to humans, allowing them to recognize data such as text, images, and sound.

[0035] Natural Language Understanding (NLU) is a general term for all methods, models, or tasks that support machines in understanding text content. NLU plays a crucial role in text information processing systems and is an essential module for systems such as recommendation, question answering, and search.

[0036] Voice interaction is a technology that allows communication between users and computers via voice. It utilizes Natural Language Processing (NLP) technology to enable computers to understand user voice commands and respond by displaying corresponding results on the user's screen. In short, voice interaction is a voice-based human-computer interaction technology that helps people operate more quickly and easily. The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this disclosed technical solution comply with relevant laws and regulations and do not violate public order and good morals.

[0037] The following description, with reference to the accompanying drawings, outlines a method, apparatus, electronic device, and storage medium for updating an intent template library according to embodiments of this disclosure.

[0038] It should be noted that the execution entity of the intent template library update method in this embodiment is an intent template library update device. This device can be implemented by software and / or hardware, and can be configured in an electronic device, which may include, but is not limited to, a terminal or a server. This embodiment uses the example of an intent template library update device being configured into a template library update system for illustration.

[0039] Figure 1 This is a flowchart illustrating a method for updating an intent template library according to an embodiment of this disclosure.

[0040] like Figure 1 As shown, the update method for this intent template library includes:

[0041] S101: Retrieve the target statement from the historical dialogue database where the intent recall result is empty.

[0042] The historical dialogue database refers to a database that stores the historical statements entered by the user and the corresponding output results of the machine during language interaction between the user and the machine.

[0043] In this embodiment of the disclosure, during user interaction with the machine, if the machine cannot match the user's input statement to an existing template in the intent template library, the machine may be unable to understand and process the user's input statement, resulting in an empty intent recall result for that input statement. Therefore, the template library update system can obtain historical input statements with empty intent recall results from the historical dialogue library as target statements for template updates, thereby addressing the problem of insufficient semantic understanding ability of machines in human-computer interaction.

[0044] It should be noted that when an input statement with an empty intent recall result appears infrequently in the historical dialogue database, the input statement may be abnormal data or noisy data. Using it for template updates may not only affect the confidence of the template database update, but also waste a lot of time and memory resources. Therefore, the template database update system can filter statements with empty intent recall results and high frequency in the historical dialogue database when obtaining target statements.

[0045] Optionally, multiple candidate statements with empty intent recall results can be obtained from the historical dialogue database, and the usage frequency of each candidate statement can be determined. Then, at least one candidate statement with a usage frequency greater than a first threshold can be identified as the target statement.

[0046] The first threshold can be a fixed value preset in the template library update system, or it can be a value determined according to the needs of the number of template updates. This disclosure does not limit it in this way.

[0047] In this embodiment, the template library update system can, after obtaining all candidate statements with empty intent recall results in the historical dialogue library, determine the usage frequency of each candidate statement through methods such as querying or statistical counting, and then identify at least one candidate statement with a usage frequency greater than a first threshold as the target statement. By selecting candidate statements with higher usage frequencies as target statements, not only is the representativeness and reliability of the statements used for template updating guaranteed, but the accuracy and efficiency of intent template library updates are also improved.

[0048] S102: Determine the slot label corresponding to each phrase in the target statement.

[0049] In this context, slots are variables that store key information needed for intent. They can be inherited during dialogue. Based on the values ​​in the slots, the robot can understand the intent of the statement and provide subsequent actions and feedback. Slots can also be referred to as constraints on the intent of the statement. Slot labels are used to indicate the type of constraint, such as date, departure point, destination, mode of transportation, etc. This disclosure does not limit the specific constraints.

[0050] In this embodiment, the template library update system can first decompose and segment the target statement, then determine the word groups contained in the target statement based on the part of speech of the segmented words, and then determine the slot tags corresponding to the word groups by defining and naming the word groups or matching them with reference word groups in a preset word group library. For example, the slot tags corresponding to the word groups "Shanghai, Jilin, Beijing" can be "departure place" or "destination".

[0051] For example, when the target statement is "Open the smart record", word segmentation of the target statement may yield word segmentation results such as "open, once, smart, record", "open, open once, smart record", "open once, smart record", etc. Based on the part of speech, we can determine that the word group A contained in the target statement may be "open, open, open once, open once", and the word group B may be "record, smart record". Therefore, the slot label corresponding to word group A can be "operation intention", and the slot label corresponding to word group B can be "operation object".

[0052] Optionally, the target statement can be segmented and part-of-speech tagged to determine the word groups contained in the target statement. Then, based on the matching degree between each word group and the reference word group associated with each slot tag, the slot tag corresponding to each word group can be determined.

[0053] The parts of speech can be categorized into nouns, verbs, adverbs, quantifiers, function words, etc. Reference phrases can be pre-set in the template library update system, and different reference phrases can be associated with the same or different slot tags.

[0054] It should be noted that when performing word segmentation on the target sentence, one can use dictionary-based segmentation methods (such as forward maximum matching, backward maximum matching, and bidirectional matching), statistical segmentation methods (such as Hidden Markov Model (HMM), Conditional Random Field (CRF), Support Vector Machine (SVM), deep learning algorithms, etc.), or deep learning-based methods (such as implementing a word segmenter using Long Short-Term Memory (LSTM) + Conditional Random Field (CRF), etc. This disclosure does not limit the scope of the methods used.

[0055] In the embodiments of the present disclosure, a slot library can be preset in the template library update system to store reference phrases associated with different slot labels. Then, after the template library update system obtains the phrases included in the target statement, it can determine the slot label associated with the reference phrase with the highest matching degree as the slot label corresponding to the phrase according to the matching situation between each phrase and the reference phrases in the slot library, which can improve the accuracy of the slot label and provide conditions for improving the accuracy and reliability of the generated semantic template.

[0056] It can be understood that there may be a situation where the matching degree between a phrase and the reference phrases associated with each slot label is relatively low. At this time, the slot label associated with the reference phrase with the highest matching degree is not suitable as the slot label corresponding to the phrase. Therefore, a value can be set to compare the matching degree between the phrase and the reference phrases associated with each slot label with this value to determine the slot label corresponding to the phrase in different situations.

[0057] Optionally, when the matching degree between the first phrase and at least one reference phrase associated with any slot label is greater than a third threshold, it can be determined that the slot label corresponding to the first phrase is any slot label.

[0058] Or, when the matching degree between the second phrase and the reference phrases associated with each slot label is less than or equal to the third threshold, an extended phrase associated with the second phrase is obtained from a preset phrase library, and the slot label corresponding to the second phrase is determined according to the first matching degree between the extended phrase and the reference phrases associated with each slot label.

[0059] Among them, the first phrase and the second phrase refer to any phrase included in the target statement.

[0060] In the embodiments of the present disclosure, if there is a reference phrase with a matching degree greater than the third threshold among the phrases segmented from the target statement, it means that the slot label associated with the reference phrase can be directly determined as the slot label corresponding to the phrase. Otherwise, based on the phrase library, the segmented phrases can be extended. For example, for "hit", the extended phrases may include "open", "open up", "open it", "open it up", etc. Then, according to the matching situation between the extended phrases and the reference phrases associated with the slot labels, the slot label corresponding to the phrase can be determined. Thus, by comparing the matching degree between the phrase and the reference phrase with the threshold value, the corresponding slot label is obtained in different situations, further improving the accuracy and reliability of the slot label and making the semantic template generated based on the slot label more accurate.

[0061] S103: Based on a preset slot arrangement rule, sort the slot labels corresponding to the target statement to obtain the semantic template corresponding to the target statement.

[0062] It should be noted that the preset slot order may be the same or different for the target statement in different business scenarios.

[0063] Optionally, the context information associated with the target statement can be obtained, and then the business type associated with the target statement can be determined based on the context information. After that, the preset slot arrangement rules can be determined based on the business type.

[0064] The contextual information may include the dialogue history, the location of the user who entered the statement, the time the statement was entered, and so on.

[0065] In this embodiment, since semantic templates may have different linguistic expressions and sentence structures under different business scenarios, corresponding slot arrangement rules can be formulated according to the needs of different business types. After determining the slot tags corresponding to the target statement, the template library update system can determine the business type associated with the target statement by acquiring and analyzing the context information associated with the target statement. Then, according to the slot arrangement rules corresponding to the business type, the system can sort the slot tags corresponding to the target statement to generate the semantic template corresponding to the target statement. By determining the corresponding slot arrangement order based on different business scenarios associated with the target statement and generating semantic templates, the diversity and accuracy of semantic templates are further improved.

[0066] S104: Perform intent recognition on the semantic template or target statement to determine the target intent corresponding to the semantic template.

[0067] In this embodiment of the disclosure, the template library update system can determine the template intent corresponding to the semantic template by matching the semantic template with the existing templates in the intent template library. Alternatively, it can determine the target intent corresponding to the semantic template by judging the sentence structure that the semantic template conforms to and the intent of the sentence structure. Alternatively, it can analyze and identify the user intent based on information such as the dialogue history associated with the target statement that generated the semantic template, and determine it as the target intent corresponding to the semantic template, etc., and this disclosure does not limit this.

[0068] S105: Associate the semantic template and the target intent and store them in the intent template library.

[0069] In this embodiment of the disclosure, the generated semantic template and the corresponding target intent can be associated and stored in the intent template library, thereby completing an update of the intent template library.

[0070] In this embodiment, the template library update system first retrieves target statements with empty intent recall results from the historical dialogue library. Then, it determines the slot tags corresponding to each word group in the target statement and sorts the slot tags based on preset slot arrangement rules to obtain the semantic template corresponding to the target statement. Next, it performs intent recognition on the semantic template or target statement to determine the target intent corresponding to the semantic template. Finally, it associates and stores the semantic template and target intent in the intent template library. Thus, by determining slot tags and slot arrangement rules for statements with empty historical intent recall results, the system obtains semantic templates and corresponding template intents, achieving automatic updates to the intent template library. This not only expands the scale of the intent template library and reduces the cost of updating it but also improves the accuracy and reliability of the intent template library, optimizing machine performance in human-computer interaction.

[0071] Figure 2 This is a flowchart illustrating an intention template library update method according to another embodiment of this disclosure.

[0072] like Figure 2 As shown, the update method for this intent template library includes:

[0073] S201: Traverse the historical dialogue database at a preset period to obtain multiple input statements whose intent recall results are empty within the current period.

[0074] The preset period can be a time interval determined according to the update needs of the intent template library, and can be in the form of weeks, months or years. This disclosure does not limit this.

[0075] S202: Determine the similarity between each input statement and other input statements.

[0076] It is understandable that among all the input statements that result in an empty intent recall within a period, there may be multiple input statements that express the same intent of the user. Therefore, processing all the obtained input statements would involve a large number of repetitive operations, causing unnecessary waste of time and resources. So, the template library update system can improve the update efficiency of intent templates by determining the similarity between input statements and filtering statements with a high degree of similarity.

[0077] In this embodiment of the disclosure, the template library update system can employ various methods to calculate the similarity between each input statement and other input statements. For example, the similarity between each input statement and other input statements can be determined by calculating the distance between the word vectors of each input statement and the word vectors of other input statements; alternatively, the similarity between each input statement and other input statements can be calculated by analyzing the semantics of the statements, etc. This disclosure does not limit the scope of the method.

[0078] S203: Based on each similarity, multiple input statements are deduplicated to obtain multiple candidate statements.

[0079] In this embodiment of the disclosure, the template library update system can pre-set a similarity threshold. When the similarity between any two input statements is greater than the similarity threshold, the two input statements can be determined to be duplicate statements. Thus, when multiple input statements are duplicate statements, redundant statements can be removed and only one statement can be retained. The retained input statement after deduplication is then used as a candidate statement.

[0080] It should be noted that when determining which statements to retain, any one can be retained, or the one with the most complete sentence structure can be retained, or the one with the highest frequency of use can be retained, etc. This disclosure does not limit this.

[0081] S204: Determine the usage frequency of each candidate statement based on the first occurrence frequency of each candidate statement among multiple input statements and the second occurrence frequency of other input statements whose similarity to the candidate statement is greater than a second threshold among multiple input statements.

[0082] The second threshold is used to determine whether other input statements have a high similarity to candidate statements. It may be the same as or different from the similarity threshold used in the deduplication process.

[0083] In this embodiment of the disclosure, the template library update system can calculate the sum of the first occurrence frequency and the second occurrence frequency to obtain the usage frequency of each candidate statement.

[0084] S205: Identify at least one candidate statement whose usage frequency is greater than the first threshold as the target statement.

[0085] S206: Determine the slot label corresponding to each phrase in the target statement.

[0086] S207: Based on the preset slot arrangement rules, sort the slot tags corresponding to the target sentence to obtain the semantic template corresponding to the target sentence.

[0087] S208: Perform intent recognition on the semantic template or target statement to determine the target intent corresponding to the semantic template.

[0088] S209: Associate the semantic template and the target intent and store them in the intent template library.

[0089] The descriptions of S205-S209 above can be found in the above embodiments, and will not be repeated here.

[0090] In this embodiment, the template library update system first traverses the historical dialogue library at a preset period to obtain multiple input statements whose intent recall results are empty within the current period. Then, it determines the similarity between each input statement and other input statements, and based on each similarity, deduplicates the multiple input statements to obtain multiple candidate statements. Next, based on the first occurrence frequency of each candidate statement among the multiple input statements and the second occurrence frequency of other input statements whose similarity to the candidate statement is greater than a second threshold among the multiple input statements, it determines the usage frequency of each candidate statement. At least one candidate statement with a usage frequency greater than the first threshold is then identified as the target statement. Therefore, obtaining statements to update the template library based on a preset period ensures timely updates to the intent template library, and determining the target statement based on the similarity and usage frequency of input statements further improves the efficiency and reliability of template updates.

[0091] Figure 3 This is a flowchart illustrating an intention template library update method according to another embodiment of this disclosure.

[0092] like Figure 3 As shown, the update method for this intent template library includes:

[0093] S301: Retrieve the target statement from the historical dialogue database where the intent recall result is empty.

[0094] S302: Determine the slot label corresponding to each phrase in the target statement.

[0095] S303: Based on the preset slot arrangement rules, sort the slot tags corresponding to the target sentence to obtain the semantic template corresponding to the target sentence.

[0096] The descriptions of S301-S303 above can be found in the above embodiments, and will not be repeated here.

[0097] S304: Match the semantic template with each reference template in the intent template library to determine the second degree of matching between the semantic template and each reference template.

[0098] The reference template refers to the original intent template contained in the intent template library.

[0099] In this embodiment of the disclosure, the template library update system can determine the second matching degree between the semantic template and each reference template based on the matching between the semantic template and the slot tags contained in each reference template.

[0100] Optionally, if the second matching degree between the semantic template and each reference template is less than or equal to the fourth threshold, the semantic template can be matched with each sentence template to determine the third matching degree between the semantic template and each sentence template.

[0101] Sentence templates refer to commonly used syntactic structures set according to actual situations. Each sentence template can define an associated intent. For example, the sentence template for "help me turn on the electric fan" can be [function word] + [switch verb] + [machine noun]. The associated intent of this sentence template may be to control a specific machine to start or stop.

[0102] In this embodiment of the disclosure, when the second matching degree between the semantic template and each reference template is less than or equal to the fourth threshold, the intent associated with the reference template no longer has reference value for determining the intent corresponding to the semantic template. Then, the template library update system can match the sentence structure of the semantic template with each sentence template and calculate the third matching degree between the semantic template and each sentence template.

[0103] Then, if the third matching degree between the semantic template and any sentence template is greater than the fifth threshold, the intent associated with any sentence template is determined as the template intent corresponding to the semantic template. Thus, even when the matching degree between the semantic template and existing reference templates is low, the target intent of the template can be determined based on the matching with the sentence template, improving the flexibility of inferring template intent and the reliability of the inference results.

[0104] Alternatively, if the third matching degree between the semantic template and each sentence template is less than or equal to the fifth threshold, obtain the context information associated with the target sentence, and then perform intent recognition on the target sentence based on the context information to determine the target intent.

[0105] In this embodiment of the disclosure, when the matching degree between the semantic template and all reference templates and sentence templates is lower than the threshold, the template library update system can also infer the target intent based on the context information of the target statement that generates the semantic template, thereby further improving the flexibility of inferring the template intent and improving the reliability of the template intent inference result.

[0106] S305: If the second matching degree between the semantic template and any reference template is greater than the fourth threshold, the intent associated with any reference template is determined as the target intent corresponding to the semantic template.

[0107] S306: Associate the semantic template and the target intent and store them in the intent template library.

[0108] The description of S306 above can be found in the above embodiments, and will not be repeated here.

[0109] In this embodiment, after generating the semantic template corresponding to the target statement, the template library update system can match the semantic template with each reference template in the intent template library to determine a second matching degree between the semantic template and each reference template. Then, if the second matching degree between the semantic template and any reference template is greater than a fourth threshold, the intent associated with any reference template is determined as the target intent corresponding to the semantic template. Thus, by determining the target intent corresponding to the semantic template based on the matching degree between the semantic template and each reference template in the intent template library, the efficiency and accuracy of intent recognition are improved, and the reliability of intent template library updates is further enhanced.

[0110] Figure 4 This is a schematic diagram of the structure of an intent template library update device proposed in one embodiment of the present disclosure.

[0111] like Figure 4 As shown, the intention template library update device 400 includes:

[0112] The first acquisition module 401 is used to acquire target statements from the historical dialogue database where the intent recall result is empty;

[0113] The first determining module 402 is used to determine the slot label corresponding to each phrase in the target statement;

[0114] The second acquisition module 403 is used to sort the slot tags corresponding to the target sentence based on the preset slot arrangement rules in order to obtain the semantic template corresponding to the target sentence.

[0115] The second determining module 404 is used to perform intent recognition on the semantic template or target statement in order to determine the target intent corresponding to the semantic template.

[0116] The storage module 405 is used to associate semantic templates and target intents and store them in the intent template library.

[0117] In some embodiments, the first acquisition module 401 described above is further configured to:

[0118] Retrieve multiple candidate statements from the historical dialogue database that have no intent recall results, and determine the usage frequency of each candidate statement;

[0119] At least one candidate statement whose usage frequency is greater than a first threshold is identified as the target statement.

[0120] In some embodiments, the first acquisition module 401 described above is further configured to:

[0121] The historical dialogue database is traversed at a preset period to obtain multiple input statements whose intent recall results are empty within the current period.

[0122] Determine the similarity between each input statement and other input statements;

[0123] Based on the similarity scores, multiple input statements are deduplicated to obtain multiple candidate statements;

[0124] The usage frequency of each candidate statement is determined based on its first occurrence frequency among multiple input statements and the second occurrence frequency of other input statements whose similarity to the candidate statement is greater than a second threshold among multiple input statements.

[0125] In some embodiments, the first determining module 402 described above is further configured to:

[0126] The target statement is segmented and part-of-speech tagged to determine the word groups contained in the target statement;

[0127] The corresponding slot tag for each word group is determined based on the matching degree between each word group and the reference word group associated with each slot tag.

[0128] In some embodiments, the first determining module 402 described above is further configured to:

[0129] If the matching degree between the first word group and at least one reference word group associated with any slot label is greater than the third threshold, then the slot label corresponding to the first word group is determined to be any slot label; or,

[0130] If the matching degree between the second word group and the reference word group associated with each slot tag is less than or equal to the third threshold, the extended word group associated with the second word group is obtained from the preset word group library. Based on the first matching degree between the extended word group and the reference word group associated with each slot tag, the slot tag corresponding to the second word group is determined.

[0131] In some embodiments, the second acquisition module 403 described above is further configured to:

[0132] Obtain the context information associated with the target statement;

[0133] Based on the context information, determine the business type associated with the target statement;

[0134] Determine the preset slot arrangement rules based on the business type.

[0135] In some embodiments, the second determining module 404 described above is further configured to:

[0136] The semantic template is matched against each reference template in the intent template library to determine the second degree of matching between the semantic template and each reference template;

[0137] If the second matching degree between the semantic template and any reference template is greater than the fourth threshold, the intent associated with any reference template is determined as the target intent corresponding to the semantic template.

[0138] In some embodiments, the second determining module 404 described above is further configured to:

[0139] If the second matching degree between the semantic template and each reference template is less than or equal to the fourth threshold, the semantic template is matched with each sentence template to determine the third matching degree between the semantic template and each sentence template.

[0140] If the third matching degree between the semantic template and any sentence template is greater than the fifth threshold, the intent associated with any sentence template is determined as the target intent corresponding to the semantic template.

[0141] In some embodiments, the second determining module 404 described above is further configured to:

[0142] When the third matching degree between the semantic template and each sentence template is less than or equal to the fifth threshold, obtain the context information associated with the target sentence;

[0143] Based on contextual information, the intent of the target statement is identified to determine the target intent.

[0144] It should be noted that the foregoing explanation of the method for updating the intent template library also applies to the intent template library updating device of this embodiment, and will not be repeated here.

[0145] In this embodiment, the template library update system first retrieves target statements with empty intent recall results from the historical dialogue library. Then, it determines the slot tags corresponding to each word group in the target statement and sorts the slot tags based on preset slot arrangement rules to obtain the semantic template corresponding to the target statement. Next, it performs intent recognition on the semantic template or target statement to determine the target intent corresponding to the semantic template. Finally, it associates and stores the semantic template and target intent in the intent template library. Thus, by determining slot tags and slot arrangement rules for statements with empty historical intent recall results, the system obtains semantic templates and corresponding template intents, achieving automatic updates to the intent template library. This not only expands the scale of the intent template library and reduces the cost of updating it but also improves the accuracy and reliability of the intent template library, optimizing machine performance in human-computer interaction.

[0146] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0147] Figure 5A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0148] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0149] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0150] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the intention template library update method. For example, in some embodiments, the intention template library update method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the intention template library update method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the intention template library update method by any other suitable means (e.g., by means of firmware).

[0151] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0152] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0153] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0154] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0155] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.

[0156] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0157] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0158] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified. In the description of this disclosure, the words "if" and "suppose" as used may be interpreted as "when," "when," "in response to determination," or "in the circumstances."

[0159] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for updating an intent template library, comprising: Retrieve target statements from the historical dialogue database where the intent recall result is empty; Determine the slot label corresponding to each phrase in the target statement; Based on the preset slot arrangement rules, the slot tags corresponding to the target sentence are sorted to obtain the semantic template corresponding to the target sentence; The semantic template or the target statement is subjected to intent recognition in order to determine the target intent corresponding to the semantic template; The semantic template and the target intent are associated and stored in the intent template library; The step of retrieving the target statement from the historical dialogue database where the intent recall result is empty includes: Retrieve multiple candidate statements from the historical dialogue database that have an empty intent recall result, and determine the usage frequency of each candidate statement; At least one candidate statement whose usage frequency is greater than a first threshold is identified as the target statement.

2. The method as described in claim 1, wherein, The step of retrieving multiple candidate statements from the historical dialogue database where the intent recall result is empty, and determining the usage frequency of each candidate statement, includes: The historical dialogue database is traversed at a preset period to obtain multiple input statements whose intent recall results are empty within the current period. Determine the similarity between each input statement and other input statements; Based on the aforementioned similarity scores, the multiple input statements are deduplicated to obtain the multiple candidate statements; The usage frequency of each candidate statement is determined based on a first occurrence frequency of each candidate statement in the plurality of input statements and a second occurrence frequency of other input statements in the plurality of input statements whose similarity to the candidate statement is greater than a second threshold.

3. The method as described in claim 1, wherein, Determining the slot label corresponding to each phrase in the target statement includes: The target statement is segmented and part-of-speech tagged to determine the word groups contained in the target statement; The slot label corresponding to each word group is determined based on the matching degree between each word group and the reference word group associated with each slot label.

4. The method of claim 3, wherein, The step of determining the slot tag corresponding to each word group based on the matching degree between each word group and the reference word group associated with each slot tag includes: If the matching degree between the first word group and at least one reference word group associated with any slot label is greater than a third threshold, then the slot label corresponding to the first word group is determined to be the any slot label; or, If the matching degree between the second word group and the reference word group associated with each slot tag is less than or equal to the third threshold, the extended word group associated with the second word group is obtained from the preset word group library, and the slot tag corresponding to the second word group is determined according to the first matching degree between the extended word group and the reference word group associated with each slot tag.

5. The method of claim 1, wherein, Before sorting the slot tags corresponding to the target sentence based on a preset slot arrangement rule to obtain the semantic template corresponding to the target sentence, the method further includes: Obtain the context information associated with the target statement; Based on the context information, determine the business type associated with the target statement; Based on the business type, determine the preset word slot arrangement rule.

6. The method of claim 1, wherein, The step of performing intent recognition on the semantic template or the target statement to determine the target intent corresponding to the semantic template includes: The semantic template is matched with each reference template in the intent template library to determine a second matching degree between the semantic template and each reference template; If the second matching degree between the semantic template and any reference template is greater than the fourth threshold, the intent associated with the any reference template is determined as the target intent corresponding to the semantic template.

7. The method of claim 6, wherein, After determining the second matching degree between the semantic template and each reference template, the method further includes: If the second matching degree between the semantic template and each reference template is less than or equal to the fourth threshold, the semantic template is matched with each sentence template to determine the third matching degree between the semantic template and each sentence template. If the third matching degree between the semantic template and any sentence template is greater than the fifth threshold, the intent associated with the sentence template is determined as the target intent corresponding to the semantic template.

8. The method of claim 7, wherein, After determining the third matching degree between the semantic template and each sentence pattern template, the method further includes: If the third matching degree between the semantic template and each sentence template is less than or equal to the fifth threshold, obtain the context information associated with the target sentence; Based on the context information, the target statement is subjected to intent recognition to determine the target intent.

9. An apparatus for updating an intent template library, comprising: The first acquisition module is used to retrieve target statements from the historical dialogue database where the intent recall result is empty; The first determining module is used to determine the slot label corresponding to each word group in the target statement; The second acquisition module is used to sort the slot tags corresponding to the target sentence based on a preset slot arrangement rule in order to obtain the semantic template corresponding to the target sentence. The second determining module is used to perform intent recognition on the semantic template or the target statement to determine the target intent corresponding to the semantic template. The storage module is used to associate and store the semantic template and the target intent in the intent template library; The first acquisition module is further configured to: Retrieve multiple candidate statements from the historical dialogue database that have an empty intent recall result, and determine the usage frequency of each candidate statement; At least one candidate statement whose usage frequency is greater than a first threshold is identified as the target statement.

10. The apparatus of claim 9, wherein, The first acquisition module is further configured to: The historical dialogue database is traversed at a preset period to obtain multiple input statements whose intent recall results are empty within the current period. Determine the similarity between each input statement and other input statements; Based on the aforementioned similarity scores, the multiple input statements are deduplicated to obtain the multiple candidate statements; The usage frequency of each candidate statement is determined based on a first occurrence frequency of each candidate statement in the plurality of input statements and a second occurrence frequency of other input statements in the plurality of input statements whose similarity to the candidate statement is greater than a second threshold.

11. The apparatus of claim 9, wherein, The first determining module is further configured to: The target statement is segmented and part-of-speech tagged to determine the word groups contained in the target statement; The slot label corresponding to each word group is determined based on the matching degree between each word group and the reference word group associated with each slot label.

12. The apparatus of claim 11, wherein, The first determining module is further configured to: If the matching degree between the first word group and at least one reference word group associated with any word slot label is greater than the third threshold, the word slot label corresponding to the first word group is determined to be the any word slot label. or, If the matching degree between the second word group and the reference word group associated with each slot tag is less than or equal to the third threshold, the extended word group associated with the second word group is obtained from the preset word group library, and the slot tag corresponding to the second word group is determined according to the first matching degree between the extended word group and the reference word group associated with each slot tag.

13. The apparatus of claim 9, wherein, The second acquisition module is further configured to: Obtain the context information associated with the target statement; Based on the context information, determine the business type associated with the target statement; Based on the business type, determine the preset word slot arrangement rule.

14. The apparatus of claim 9, wherein, The second determining module is further configured to: The semantic template is matched with each reference template in the intent template library to determine a second matching degree between the semantic template and each reference template; If the second matching degree between the semantic template and any reference template is greater than the fourth threshold, the intent associated with the any reference template is determined as the target intent corresponding to the semantic template.

15. The apparatus of claim 14, wherein, The second determining module is further configured to: If the second matching degree between the semantic template and each reference template is less than or equal to the fourth threshold, the semantic template is matched with each sentence template to determine the third matching degree between the semantic template and each sentence template. If the third matching degree between the semantic template and any sentence template is greater than the fifth threshold, the intent associated with the sentence template is determined as the target intent corresponding to the semantic template.

16. The apparatus of claim 15, wherein, The second determining module is further configured to: If the third matching degree between the semantic template and each sentence template is less than or equal to the fifth threshold, obtain the context information associated with the target sentence; Based on the context information, the target statement is subjected to intent recognition to determine the target intent.

17. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for updating the intent template library according to any one of claims 1-8.

18. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to execute the method for updating the intent template library according to any one of claims 1-8.

19. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method for updating the intent template library according to any one of claims 1-8.