Intention recognition method and device, electronic equipment and storage medium

CN117453889BActive Publication Date: 2026-10-16GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311526987.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2026-10-16
Estimated Expiration
2043-11-15

AI Technical Summary

Technical Problem

[0004]现有技术主要是利用意图识别模型进行意图识别,然而,在模型训练时,可能会引入一些包含不常见的词或短语的训练样本,或者,句子中存在语法错误的训练样本,导致模型预测的意图不准确

Benefits of technology

[0067] This application's embodiments determine the intent segmentation strategy based on the number of nouns and verbs in the sentence to be identified, and then perform intent recognition on the sentence based on the intent segmentation strategy to obtain the target intent. It fully utilizes the characteristics of the roles of verbs and nouns in sentences in natural language, and achieves intent recognition of the sentence to be identified by directly analyzing the interaction mechanism between verbs and nouns in the sentence to be identified. It can capture user intent more directly, comprehensively, and accurately. Moreover, since this application does not require model training or other processes, it does not require a large amount of labeled training data, avoiding the introduction of training data that is prone to errors and thus causing inaccurate intent recognition. At the same time, it avoids the time-consuming model training process, reduces the complexity of data processing before intent recognition, improves the accuracy and robustness of intent recognition, and shortens the intent recognition time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117453889B_ABST
    Figure CN117453889B_ABST
Patent Text Reader

Abstract

The present application relates to an intention recognition method, device, electronic equipment and storage medium, wherein the intention recognition method comprises: obtaining a to-be-recognized sentence for expressing an intention; determining a number of nouns and a number of verbs in the to-be-recognized sentence; determining an intention division strategy according to the number of nouns and the number of verbs; and performing intention recognition on the to-be-recognized sentence based on the intention division strategy to obtain a target intention. The embodiments of the present application can fully utilize the characteristics of the functions of verbs and nouns in natural language in a sentence, realize the intention recognition of the to-be-recognized sentence by directly analyzing the interaction mechanism between the verbs and nouns in the to-be-recognized sentence, can more directly, comprehensively and accurately capture the user intention, improve the accuracy of intention recognition, improve the robustness of intention recognition, and shorten the time of intention recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an intent recognition method, apparatus, electronic device, and storage medium. Background Technology

[0002] Intent recognition is a natural language processing technique used to determine a user's intent or purpose when conversing with a computer. It is a key step in building dialogue systems and intelligent assistants, helping computers understand user intent and thus provide appropriate answers, suggestions, or perform corresponding tasks.

[0003] The goal of intent recognition is to categorize user input text into one of predefined intent categories. For example, in a restaurant reservation dialogue system, a user might type "I want to reserve a table," which can be identified as the intent to "reserve a table at a restaurant." In another travel booking dialogue system, a user might type "I want to go on vacation to Paris," which can be identified as the intent to "book a trip."

[0004] Existing technologies mainly utilize intent recognition models for intent recognition. However, during model training, training samples containing uncommon words or phrases, or training samples with grammatical errors in the sentences, may be introduced, leading to inaccurate intent predictions by the model. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this application provides an intent recognition method, apparatus, electronic device and storage medium.

[0006] In a first aspect, this application provides an intent recognition method, including:

[0007] Obtain the statement to be recognized to express intent;

[0008] Determine the number of nouns and the number of verbs in the sentence to be identified;

[0009] The intention segmentation strategy is determined based on the number of nouns and the number of verbs;

[0010] The intent is identified by performing intent segmentation on the statement to be identified based on the intent segmentation strategy, and the target intent is obtained.

[0011] Optionally, the intention segmentation strategy is determined based on the number of nouns and the number of verbs, including:

[0012] Determine the relationship between the number of nouns and the number of verbs;

[0013] The intent segmentation strategy is determined based on the size relationship.

[0014] Optionally, determining the intent segmentation strategy based on the size relationship includes:

[0015] If the number of nouns is greater than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of nouns;

[0016] If the number of nouns is less than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of verbs.

[0017] If the number of nouns is equal to the number of verbs, the intent segmentation strategy is determined to be to segment intents based on either the number of nouns or the number of verbs.

[0018] Optionally, the intent of the statement to be identified is determined based on the intent segmentation strategy to obtain the target intent, including:

[0019] The statement to be identified is segmented according to the intent segmentation strategy to obtain candidate intents;

[0020] The target intent is determined based on the candidate intents and the preset mind map of intents.

[0021] Optionally, the mind map includes: nouns, verbs, and related relationships related to the intent; determining the target intent based on the candidate intents and a pre-defined mind map of intents includes:

[0022] Obtain the nouns and verbs from the candidate intents;

[0023] Match the nouns in the candidate intents with the nouns in the mind map;

[0024] If a noun in the candidate intent matches any noun in the mind map, the verb in the candidate intent is matched with the verb in the mind map associated with the noun.

[0025] If a verb in the candidate intent matches any verb associated with the noun in the mind map, the candidate intent is determined as the target intent.

[0026] Optionally, the number of nouns in the sentence to be identified is determined;

[0027] Each word in the sentence to be identified is matched with a noun in a preset mind map;

[0028] If any of the aforementioned words successfully matches a word in the mind map that is a noun, then the word is determined to be a noun;

[0029] The number of words identified as nouns is counted to obtain the total number of nouns.

[0030] Optionally, determining the number of verbs in the sentence to be identified includes:

[0031] Each word in the sentence to be identified is matched with a preset list of trigger words;

[0032] If any of the stated words successfully matches the list of trigger words, the word is determined to be a verb.

[0033] The number of words identified as verbs is counted to obtain the total number of verbs.

[0034] Secondly, this application provides an intent recognition device, comprising:

[0035] The statement acquisition module is used to acquire the statement to be recognized, which is used to express intent;

[0036] The first determining module is used to determine the number of nouns and the number of verbs in the sentence to be identified;

[0037] The second determining module is used to determine the intention segmentation strategy based on the number of nouns and the number of verbs;

[0038] The intent recognition module is used to perform intent recognition on the statement to be recognized based on the intent segmentation strategy to obtain the target intent.

[0039] Optionally, the second determining module includes:

[0040] The first determining unit is used to determine the size relationship between the number of nouns and the number of verbs;

[0041] The second determining unit is used to determine the intent segmentation strategy based on the size relationship.

[0042] Optionally, the second determining unit is further configured to:

[0043] If the number of nouns is greater than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of nouns;

[0044] If the number of nouns is less than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of verbs.

[0045] If the number of nouns is equal to the number of verbs, the intent segmentation strategy is determined to be to segment intents based on either the number of nouns or the number of verbs.

[0046] Optionally, the intent recognition module includes:

[0047] A segmentation unit is used to segment the statement to be identified according to the intent segmentation strategy to obtain candidate intents;

[0048] The third determining unit is used to determine the target intent based on the candidate intents and a preset mind map of intents.

[0049] Optionally, the third determining unit is further configured to:

[0050] Obtain the nouns and verbs from the candidate intents;

[0051] Match the nouns in the candidate intents with the nouns in the mind map;

[0052] If a noun in the candidate intent matches any noun in the mind map, the verb in the candidate intent is matched with the verb in the mind map associated with the noun.

[0053] If a verb in the candidate intent matches any verb associated with the noun in the mind map, the candidate intent is determined as the target intent.

[0054] Optionally, the first determining module includes:

[0055] The first matching unit is used to match each word in the sentence to be identified with words in the preset mind map that are nouns.

[0056] The fourth determining unit is used to determine that if any of the words successfully matches a word in the mind map that is a noun, the word is a noun.

[0057] The first statistical unit is used to count the number of words identified as nouns, thereby obtaining the number of nouns.

[0058] Optionally, the first determining module includes:

[0059] The second matching unit is used to match each word in the sentence to be identified with a preset list of trigger words.

[0060] The fifth determining unit is used to determine that if any of the words successfully matches the list of trigger words, the word is a verb;

[0061] The second statistical unit is used to count the number of words identified as verbs, thereby obtaining the number of verbs.

[0062] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0063] Memory, used to store computer programs;

[0064] When a processor executes a program stored in memory, it implements the intent recognition method described in any of the first aspects.

[0065] Fourthly, this application provides a computer-readable storage medium storing a program for an intent recognition method, wherein when the program for the intent recognition method is executed by a processor, it implements the steps of any of the intent recognition methods described in the first aspect.

[0066] The technical solutions provided in this application have the following advantages compared with the prior art:

[0067] This application's embodiments determine the intent segmentation strategy based on the number of nouns and verbs in the sentence to be identified, and then perform intent recognition on the sentence based on the intent segmentation strategy to obtain the target intent. It fully utilizes the characteristics of the roles of verbs and nouns in sentences in natural language, and achieves intent recognition of the sentence to be identified by directly analyzing the interaction mechanism between verbs and nouns in the sentence to be identified. It can capture user intent more directly, comprehensively, and accurately. Moreover, since this application does not require model training or other processes, it does not require a large amount of labeled training data, avoiding the introduction of training data that is prone to errors and thus causing inaccurate intent recognition. At the same time, it avoids the time-consuming model training process, reduces the complexity of data processing before intent recognition, improves the accuracy and robustness of intent recognition, and shortens the intent recognition time. Attached Figure Description

[0068] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 A flowchart illustrating an intent recognition method provided in an embodiment of this application;

[0071] Figure 2 for Figure 1 Flowchart of step S103;

[0072] Figure 3 for Figure 1 Flowchart of step S104;

[0073] Figure 4 A schematic diagram of a mind map provided in an embodiment of this application;

[0074] Figure 5 A structural diagram of an intent recognition device provided in an embodiment of this application;

[0075] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0077] Existing technologies primarily utilize intent recognition models for intent identification. However, during model training, training samples containing uncommon words or phrases, or training samples with grammatical errors, may be introduced, leading to inaccurate intent predictions by the model. Therefore, embodiments of this application provide an intent recognition method, apparatus, electronic device, and storage medium.

[0078] This application provides an intent recognition method, which is mainly used to recognize multiple user intents. It can be applied to smart devices or cloud servers. For example, smart devices can be home appliances, etc.

[0079] like Figure 1 As shown, the intent recognition method may include the following steps:

[0080] Step S101: Obtain the statement to be recognized to express intent;

[0081] In this step, users can input control commands via voice, text, or other means to express their intention to control the target device. The control commands contain a statement to be recognized. If the user inputs the control command via voice, the control command can be recognized by voice, and the statement to be recognized in the control command can be obtained. If the user inputs the control command via text, the statement to be recognized can be extracted directly from the control command.

[0082] In order to control the target device, the statement to be recognized contains at least two words, including verbs and nouns. Verbs represent the operation or event that the user wants to perform, while nouns specify the object of the operation.

[0083] Step S102: Determine the number of nouns and the number of verbs in the sentence to be identified;

[0084] Since verbs and nouns play important roles in natural language, recognizing verbs and nouns can help to understand multiple user intentions more directly. Therefore, classifying and recognizing based on the number of verbs and nouns is a simple and effective processing method. Based on a clear principle, "one verb corresponds to one operation, and one noun corresponds to one operation object," for example, the statement to be recognized, "turn on the light and the TV," can be directly determined by the number of verbs and nouns to indicate that the user's intention is (one operation, two objects). In other words, the number of nouns can be used as the main basis to determine that the statement to be recognized has two intentions.

[0085] Therefore, in this step, nouns and verbs can be identified in the sentence to be identified, and the number of nouns and verbs can be counted to determine the multiple intents of the sentence to be identified.

[0086] Step S103: Determine the intent segmentation strategy based on the number of nouns and the number of verbs;

[0087] Since the number of nouns corresponds to the number of nouns and the number of verbs corresponds to the number of verbs, the number of nouns and the number of verbs respectively reflect the number of objects of operation and the number of operations or events. Different numbers of nouns and verbs correspond to different intentions. Therefore, when multiple intentions are to be expressed in the sentence to be recognized, different intention segmentation strategies can be selected based on the number of nouns and the number of verbs to segment the sentence to be recognized, so as to determine what each intention is.

[0088] Step S104: Based on the intent segmentation strategy, perform intent recognition on the statement to be identified to obtain the target intent.

[0089] In this step, the statement to be identified can be segmented according to the intent segmentation strategy, and then the target intent can be determined based on the segmentation results.

[0090] In practical applications, after determining the target intent, control signals can be generated based on the target intent and sent to the target device so that the target device can perform the corresponding operation according to the user's intent.

[0091] This application's embodiments determine the intent segmentation strategy based on the number of nouns and verbs in the sentence to be identified, and then perform intent recognition on the sentence based on the intent segmentation strategy to obtain the target intent. It fully utilizes the characteristics of the roles of verbs and nouns in sentences in natural language, and achieves intent recognition of the sentence to be identified by directly analyzing the interaction mechanism between verbs and nouns in the sentence to be identified. It can capture user intent more directly, comprehensively, and accurately. Moreover, since this application does not require model training or other processes, it does not require a large amount of labeled training data, avoiding the introduction of training data that is prone to errors and thus causing inaccurate intent recognition. At the same time, it avoids the time-consuming model training process, reduces the complexity of data processing before intent recognition, improves the accuracy and robustness of intent recognition, and shortens the intent recognition time.

[0092] In yet another embodiment of this application, as Figure 2 As shown, step S103 determines the intent segmentation strategy based on the number of nouns and the number of verbs, including:

[0093] Step S201: Determine the size relationship between the number of nouns and the number of verbs;

[0094] In this step, the number of nouns and the number of verbs can be compared to obtain the relationship between the number of nouns and the number of verbs. The relationship between the number of nouns and the number of verbs includes: the number of nouns is greater than the number of verbs, the number of nouns is less than the number of verbs, and the number of nouns is equal to the number of verbs.

[0095] Step S202: Determine the intent segmentation strategy based on the size relationship.

[0096] When the relationship between the number of nouns and the number of verbs is different, different methods are used to segment the sentences to be identified, that is, different intent segmentation strategies are used to segment the sentences to be identified.

[0097] In one embodiment of this application, determining the intent segmentation strategy based on the size relationship includes:

[0098] If the number of nouns is greater than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of nouns;

[0099] If the number of nouns is less than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of verbs.

[0100] If the number of nouns is equal to the number of verbs, the intent segmentation strategy is determined to be to segment intents based on either the number of nouns or the number of verbs.

[0101] For example, in the sentence "Help me turn on the air conditioner and fan in the living room", there is one verb "turn on" and two nouns "air conditioner" and "fan". Since the number of nouns is greater than the number of verbs, the sentence can be divided based on nouns.

[0102] For example, in the sentence "Help me turn on the TV in the living room and turn down the volume", there are two verbs "turn on" and "adjust" and one noun "TV". In this case, the number of verbs is greater than the number of nouns, so the sentence can be divided based on the verbs.

[0103] For example, in the sentence "Help me turn on the TV and close the curtains," there are two verbs, "turn on" and "close," and two nouns, "TV" and "curtains." In this case, the number of nouns equals the number of verbs, so the sentence can be segmented.

[0104] This application embodiment can determine the intent segmentation strategy of the sentence to be identified based on the relationship between the number of nouns and the number of verbs. By making full use of the sentence structure of the sentence to be identified, the corresponding intent segmentation strategy is determined. Different intent segmentation strategies are determined according to the different relationships between the number of nouns and the number of verbs in the sentence to be identified. This makes it easier to segment the sentence to be identified using different intent segmentation strategies in the future, and thus make it easier to obtain more accurate intent recognition results.

[0105] In yet another embodiment of this application, as Figure 3 As shown, step S104 performs intent recognition on the statement to be recognized based on the intent segmentation strategy to obtain the target intent, including:

[0106] Step S301: Divide the statement to be identified according to the intent segmentation strategy to obtain candidate intents;

[0107] Based on the foregoing embodiments, intent can be segmented according to the number of nouns, the number of verbs, or either the number of nouns or the number of verbs.

[0108] For example, in the sentence "Help me turn on the air conditioner and fan in the living room", there is a verb "turn on" and two nouns "air conditioner" and "fan". Since the number of nouns is greater than the number of verbs, the sentence to be recognized can be divided into two candidate intentions: "turn on" and "air conditioner" and "turn on" and "fan".

[0109] For example, in the sentence "Help me turn on the TV in the living room and turn down the volume", there are two verbs "turn on" and "adjust" and one noun "TV". Since the number of verbs is greater than the number of nouns, the sentence to be recognized can be divided based on the verbs. That is, the sentence to be recognized can be divided into two candidate intentions: "turn on" "TV" and "turn down" "TV".

[0110] For example, in the sentence "Help me turn on the TV and close the curtains", there are two verbs "turn on" and "close" and two nouns "TV" and "curtains". Since the number of nouns is equal to the number of verbs, the sentence can be divided into two candidate intentions: "turn on" "TV" and "close" "curtains".

[0111] Step S302: Determine the target intent based on the candidate intents and the preset mind map of intents.

[0112] In this embodiment, the mind map includes nouns, verbs, and related relationships related to the intent. Mind maps can be pre-built according to different application scenarios. In one embodiment, different smart devices can have different mind maps pre-set, such as a mind map for an air conditioner, a mind map for a television, etc. In another embodiment, different mind maps can also be pre-set for different operational needs, for example: Figure 4 As shown, in the mind map of the intention to turn home appliances on / off, you can list the names of common home appliances (such as "TV", "light", "air conditioner") and label the corresponding actions (such as "turn on" and "turn off") and attributes.

[0113] In this step, candidate intentions can be matched with the nouns and verbs associated with each group in the mind map. Then, when a candidate intention matches any group of nouns and verbs associated with any group in the mind map, the candidate intention is determined as the target intention.

[0114] In one embodiment of this application, determining the target intent based on the candidate intents and a preset mind map of intents includes:

[0115] 1. Obtain the nouns and verbs from the candidate intents;

[0116] 2. Match the nouns in the candidate intents with the nouns in the mind map;

[0117] 3. If a noun in the candidate intent matches any noun in the mind map, the verb in the candidate intent is matched with the verb in the mind map associated with the noun.

[0118] Fourth, if a verb in the candidate intent matches any verb associated with the noun in the mind map, the candidate intent is determined as the target intent.

[0119] For example, in the sentence "Help me turn on the air conditioner and fan in the living room," there is one verb "turn on" and two nouns "air conditioner" and "fan." Since the number of nouns is greater than the number of verbs, the sentence can be divided based on the nouns. That is, the sentence can be divided into two candidate intentions: "turn on" and "air conditioner" versus "turn on" and "fan." According to the mind map of the home appliance field, "turn on the air conditioner" and "turn on the fan" are both correct intentions. Therefore, the final recognition is as two target intentions: "turn on the TV" and "turn on the fan."

[0120] For example, in the sentence "Help me turn on the TV in the living room and turn down the volume," there are two verbs, "turn on" and "adjust," and one noun, "TV." Since the number of verbs is greater than the number of nouns, the sentence can be divided based on the verbs. That is, the sentence can be divided into two candidate intentions: "turn on" and "TV" and "turn down" and "TV." According to the mind map of the home appliance field, "turn on the TV" is the correct intention, while "turn down" is the correct intention because it corresponds to the TV attribute "volume" in the sentence. Therefore, the final identification results in two target intentions: "turn on the TV" and "turn down the TV volume."

[0121] For example, in the sentence "Help me turn on the TV and close the curtains," there are two verbs, "turn on" and "close," and two nouns, "TV" and "curtains." Since the number of nouns equals the number of verbs, the sentence can be sequentially divided into two candidate intentions: "turn on the TV" and "close the curtains." According to the mind map of the home appliance field, both "turn on the TV" and "close the curtains" are correct intentions. Therefore, the final identification results in two target intentions: "turn on the TV" and "close the curtains."

[0122] This application embodiment can segment the statement to be identified based on an intent segmentation strategy, and then determine the target intent from the segmented candidate statements based on a mind map. It can accurately segment multiple different intents of the statement to be identified according to the sentence structure, and then verify the legality of the candidate statements through the mind map. If the candidate statement is legal, it is directly used as the target intent. If the candidate statement is illegal, the verb corresponding to the next-level attribute can be further searched under the branch where the noun of the candidate statement is located in the mind map. If the verb of the candidate statement can match the verb corresponding to the next-level attribute, the candidate statement can be determined to be legal and then used as the target intent. This realizes the close connection between intent recognition and mind map, avoids the identification of incorrect target intents, and improves the accuracy of intent recognition.

[0123] In another embodiment of this application, step S102 determines the number of nouns in the sentence to be identified;

[0124] Step S401: Match each word in the sentence to be identified with words in the preset mind map that are nouns.

[0125] In this embodiment of the application, the part of speech of each word can be marked in the mind map so as to match the words in the sentence to be identified with it, thereby determining the words in the sentence to be identified that are nouns.

[0126] Step S402: If any of the words successfully matches a word in the mind map that is a noun, then the word is determined to be a noun;

[0127] Step S403: Count the number of words identified as nouns to obtain the number of nouns.

[0128] This application embodiment can identify words with noun parts of speech in a sentence by means of mind maps. Since the parts of speech of words in mind maps are necessarily accurate and are the operation objects corresponding to the user's control intentions, the nouns identified in the sentence by this method are more accurate.

[0129] In another embodiment of this application, step S102, determining the number of verbs in the sentence to be identified, includes:

[0130] Step S501: Match each word in the sentence to be identified with a preset list of trigger words;

[0131] In this embodiment, a list of trigger words can be pre-constructed. Each trigger word is a verb and is a keyword or phrase related to each intent type. For example, for the intent to turn home appliances on / off, relevant trigger words might include: "on," "off," "start," "stop," etc. For the intent to adjust volume, trigger words could be: "adjust," "increase," "decrease," etc.

[0132] Since the words in the trigger word list are all verbs and represent the operations or events corresponding to the user's control intentions, each word in the sentence to be identified can be matched with the trigger word list to obtain the verbs in the sentence to be identified.

[0133] Step S502: If any of the words matches the trigger word list, the word is determined to be a verb;

[0134] Step S503: Count the number of words identified as verbs to obtain the number of verbs.

[0135] This application embodiment can identify words with verb parts of speech in the sentence to be identified by means of a trigger word list. Since the trigger word list must contain verbs and are operations or events corresponding to the user's control intentions, the verbs identified in the sentence to be identified can be more accurate based on this method.

[0136] In yet another embodiment of this application, as Figure 5 As shown, an intent recognition device is also provided, comprising:

[0137] The statement acquisition module 11 is used to acquire the statement to be recognized to express intent;

[0138] The first determining module 12 is used to determine the number of nouns and the number of verbs in the sentence to be identified;

[0139] The second determining module 13 is used to determine the intention segmentation strategy based on the number of nouns and the number of verbs;

[0140] The intent recognition module 14 is used to perform intent recognition on the statement to be recognized based on the intent segmentation strategy to obtain the target intent.

[0141] Optionally, the second determining module includes:

[0142] The first determining unit is used to determine the size relationship between the number of nouns and the number of verbs;

[0143] The second determining unit is used to determine the intent segmentation strategy based on the size relationship.

[0144] Optionally, the second determining unit is further configured to:

[0145] If the number of nouns is greater than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of nouns;

[0146] If the number of nouns is less than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of verbs.

[0147] If the number of nouns is equal to the number of verbs, the intent segmentation strategy is determined to be to segment intents based on either the number of nouns or the number of verbs.

[0148] Optionally, the intent recognition module includes:

[0149] A segmentation unit is used to segment the statement to be identified according to the intent segmentation strategy to obtain candidate intents;

[0150] The third determining unit is used to determine the target intent based on the candidate intents and a preset mind map of intents.

[0151] Optionally, the third determining unit is further configured to:

[0152] Obtain the nouns and verbs from the candidate intents;

[0153] Match the nouns in the candidate intents with the nouns in the mind map;

[0154] If a noun in the candidate intent matches any noun in the mind map, the verb in the candidate intent is matched with the verb in the mind map associated with the noun.

[0155] If a verb in the candidate intent matches any verb associated with the noun in the mind map, the candidate intent is determined as the target intent.

[0156] Optionally, the first determining module includes:

[0157] The first matching unit is used to match each word in the sentence to be identified with words in the preset mind map that are nouns.

[0158] The fourth determining unit is used to determine that if any of the words successfully matches a word in the mind map that is a noun, the word is a noun.

[0159] The first statistical unit is used to count the number of words identified as nouns, thereby obtaining the number of nouns.

[0160] Optionally, the first determining module includes:

[0161] The second matching unit is used to match each word in the sentence to be identified with a preset list of trigger words.

[0162] The fifth determining unit is used to determine that if any of the words successfully matches the list of trigger words, the word is a verb;

[0163] The second statistical unit is used to count the number of words identified as verbs, thereby obtaining the number of verbs.

[0164] In another embodiment of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0165] Memory, used to store computer programs;

[0166] When a processor executes a program stored in memory, it implements the intent recognition method described in any of the foregoing method embodiments.

[0167] The electronic device provided in this invention allows the processor to execute a program stored in memory to determine an intent segmentation strategy based on the number of nouns and verbs in the sentence to be identified. Then, based on the intent segmentation strategy, the processor performs intent recognition on the sentence to be identified, obtaining the target intent. This fully utilizes the characteristics of verbs and nouns in natural language sentences, directly analyzing the interaction mechanism between verbs and nouns in the sentence to be identified to achieve intent recognition. This allows for more direct, comprehensive, and accurate capture of user intent. Furthermore, since this application eliminates the need for model training and other processes, it avoids the introduction of erroneous training data that could lead to inaccurate intent recognition. It also avoids the time-consuming model training process, reducing the complexity of data processing before intent recognition, improving the accuracy and robustness of intent recognition, and shortening the intent recognition time.

[0168] The communication bus 1140 mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0169] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.

[0170] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0171] The processor 1110 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0172] In another embodiment of this application, a computer-readable storage medium is also provided, on which a program for an intent recognition method is stored, wherein when the program for the intent recognition method is executed by a processor, it implements the steps of the intent recognition method described in any of the foregoing method embodiments.

[0173] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0174] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. An intent recognition method, characterized in that, include: Obtain the statement to be recognized to express intent; Determine the number of nouns and the number of verbs in the sentence to be identified; The intention segmentation strategy is determined based on the number of nouns and the number of verbs; The intent is identified by performing intent segmentation on the statement to be identified based on the intent segmentation strategy, and the target intent is obtained.

2. The intent recognition method according to claim 1, characterized in that, The intention segmentation strategy is determined based on the number of nouns and the number of verbs, including: Determine the relationship between the number of nouns and the number of verbs; The intent segmentation strategy is determined based on the size relationship.

3. The intent recognition method according to claim 2, characterized in that, Determining the intent segmentation strategy based on the aforementioned size relationship includes: If the number of nouns is greater than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of nouns; If the number of nouns is less than the number of verbs, the intent segmentation strategy is determined to be intent segmentation based on the number of verbs. If the number of nouns is equal to the number of verbs, the intent segmentation strategy is determined to be to segment intents based on either the number of nouns or the number of verbs.

4. The intent recognition method according to claim 1, characterized in that, Based on the intent segmentation strategy, the intent of the statement to be identified is determined to obtain the target intent, including: The statement to be identified is segmented according to the intent segmentation strategy to obtain candidate intents; The target intent is determined based on the candidate intents and the preset mind map of intents.

5. The intent recognition method according to claim 4, characterized in that, The mind map includes: nouns, verbs, and relationships related to the intent. Based on the candidate intents and the pre-defined mind map of intents, the target intent is determined, including: Obtain the nouns and verbs from the candidate intents; Match the nouns in the candidate intents with the nouns in the mind map; If a noun in the candidate intent matches any noun in the mind map, the verb in the candidate intent is matched with the verb in the mind map associated with the noun. If a verb in the candidate intent matches any verb associated with the noun in the mind map, the candidate intent is determined as the target intent.

6. The intent recognition method according to claim 1, characterized in that, Determine the number of nouns in the sentence to be identified; Each word in the sentence to be identified is matched with a noun in a preset mind map; If any of the aforementioned words successfully matches a word in the mind map that is a noun, then the word is determined to be a noun; The number of words identified as nouns is counted to obtain the total number of nouns.

7. The intent recognition method according to claim 1, characterized in that, Determining the number of verbs in the sentence to be identified includes: Each word in the sentence to be identified is matched with a preset list of trigger words; If any of the stated words successfully matches the list of trigger words, the word is determined to be a verb. The number of words identified as verbs is counted to obtain the total number of verbs.

8. An intent recognition device, characterized in that, include: The statement acquisition module is used to acquire the statement to be recognized, which is used to express intent; The first determining module is used to determine the number of nouns and the number of verbs in the sentence to be identified; The second determining module is used to determine the intention segmentation strategy based on the number of nouns and the number of verbs; The intent recognition module is used to perform intent recognition on the statement to be recognized based on the intent segmentation strategy to obtain the target intent.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the intent recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for an intent recognition method, which, when executed by a processor, implements the steps of the intent recognition method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Search word processing method and device and computer readable storage medium

    CN110019738A

  • Method and device for obtaining response verbal skill, computer equipment and storage medium

    CN110765244A