Intention recognition method, device, apparatus and storage medium

By constructing an intent recognition filter chain using a combination of the chain of responsibility pattern and the finite state machine pattern, the problems of lack of versatility and high cost in NLP intent recognition algorithms are solved, achieving high accuracy and low cost intent recognition.

CN115862628BActive Publication Date: 2026-05-15北京中关村科金技术有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京中关村科金技术有限公司
Filing Date
2022-04-08
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing NLP intent recognition algorithms lack versatility, resulting in poor accuracy of intent recognition results, and retraining suitable NLP intent recognition algorithms is costly.

Method used

We construct an intent recognition filter chain using a combination of the chain of responsibility pattern and the finite state machine pattern. Intent matching is performed through speech recognition and an intent matcher, avoiding the need to manually construct training samples and train a suitable NLP intent recognition algorithm.

Benefits of technology

It improves the accuracy of intent recognition results while saving labor and time costs, and is suitable for intent recognition needs across different industries and businesses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115862628B_ABST
    Figure CN115862628B_ABST
Patent Text Reader

Abstract

The application discloses an intention recognition method, device and equipment and a storage medium. The intention recognition method comprises the following steps: obtaining an audio file to be recognized; performing speech recognition on the audio file to be recognized to obtain an audio recognition result; and executing a preset intention recognition filter chain to call an intention matcher to perform intention matching on the audio recognition result to obtain a first intention recognition result. The application can improve the accuracy of the intention recognition result while saving labor and time costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of AI technology, intelligent products are becoming increasingly capable at the perception level. They can perceive people's voice, body language, gestures, facial expressions, and eye contact, enabling the possibility of natural human-computer interaction. The future trend of intelligent products is to possess affective computing capabilities. By recognizing human voice information, facial expressions, and body movements, they can adjust their responses to adapt to people's needs at any given moment. Interaction will become increasingly easier, and they will understand you better.

[0003] Intelligent interaction technology has numerous applications, with common scenarios including smart homes, smart speakers, and self-service transactions. In each scenario, it's necessary to first identify the customer's intent, and then proceed with further interaction based on the intent recognition results. Currently, NLP (Natural Language Processing) intent recognition algorithms are generally used for intent recognition. However, existing NLP intent recognition algorithms are primarily trained on corpora specific to specific industries and scenarios, lacking universality. Directly using existing NLP algorithms for intent recognition leads to poor accuracy. Retraining a suitable NLP intent recognition algorithm from manually constructed training samples, on the other hand, incurs high labor and time costs. Summary of the Invention

[0004] The main objective of this invention is to provide an intent recognition method, apparatus, device, and storage medium, which aims to improve the accuracy of intent recognition results while saving labor and time costs.

[0005] To achieve the above objectives, the present invention provides an intent recognition method, the intent recognition method comprising:

[0006] Obtain the audio file to be recognized;

[0007] The audio file to be identified is subjected to speech recognition to obtain the audio recognition result;

[0008] Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the audio recognition result and obtain the first intent recognition result.

[0009] Preferably, before the step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result, the intent recognition method further includes:

[0010] The audio file to be identified is subjected to VAD detection to obtain the detection results;

[0011] Based on the detection results, determine whether the audio file to be identified is blank audio;

[0012] If the audio file to be identified is not blank, then the following steps are performed: perform speech recognition on the audio file to be identified to obtain the audio recognition result.

[0013] Preferably, before the step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result, the intent recognition method further includes:

[0014] Based on the detection results, determine whether there are silent segments at the beginning and / or end of the audio file to be identified;

[0015] If there are silent segments at the beginning and / or end of the audio file to be identified, the silent time period is determined based on the detection results.

[0016] The target audio file is obtained by truncating the audio file to be identified based on the silent period.

[0017] The step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result includes:

[0018] The target audio file is subjected to speech recognition to obtain the audio recognition result.

[0019] Preferably, before the step of executing a preset intent recognition filter chain to call an intent matcher to perform intent matching on the audio recognition result and obtain a first intent recognition result, the intent recognition method further includes:

[0020] Obtain answer intent information, wherein the answer intent information includes the expected answer and intent type;

[0021] The expected answer is constructed into a state tree of a finite state machine based on the finite state machine algorithm, and the intent matcher corresponding to each intent type is obtained based on the state tree.

[0022] The intent matcher is assembled according to the preset filter order and the intent type to obtain the preset intent recognition filter chain.

[0023] Preferably, the step of executing a preset intent recognition filter chain to call an intent matcher to perform intent matching on the audio recognition result and obtain a first intent recognition result includes:

[0024] Execute a preset intent recognition filter chain to sequentially call the corresponding intent matchers in the preset filter order to perform intent matching on the audio recognition result until the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and then stop matching and output the first intent recognition result.

[0025] Preferably, the intent recognition method further includes:

[0026] Check if the first intent recognition result is empty;

[0027] If the first intent recognition result is empty, the audio recognition result is converted from Chinese characters to Pinyin to obtain the first Pinyin text;

[0028] Obtain the similar pinyin of each pinyin in the first pinyin text, and construct the second pinyin text based on the first pinyin text and the similar pinyin;

[0029] Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the second pinyin text and obtain the second intent recognition result.

[0030] Furthermore, to achieve the above objectives, the present invention also provides an intent recognition device, the intent recognition device comprising:

[0031] The file acquisition module is used to acquire the audio file to be recognized;

[0032] The speech recognition module is used to perform speech recognition on the audio file to be recognized and obtain the audio recognition result;

[0033] The intent recognition module is used to execute a preset intent recognition filter chain to call the intent matcher to perform intent matching on the audio recognition result and obtain the first intent recognition result.

[0034] In addition, to achieve the above objectives, the present invention also provides an intent recognition device, the intent recognition device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the intent recognition method as described above.

[0035] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the intent recognition method as described above.

[0036] In addition, to achieve the above objectives, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the intent recognition method as described above.

[0037] This invention provides an intent recognition method, apparatus, device, storage medium, and product. First, an audio file to be recognized is acquired. Then, speech recognition is performed on the audio file to obtain an audio recognition result. Next, a preset intent recognition filter chain is executed to call an intent matcher to match the audio recognition result with the intent, resulting in a first intent recognition result. The preset intent recognition filter chain is constructed using the chain of responsibility pattern, and the intent matcher is based on a finite state machine. This invention constructs an intent recognition filter chain using a combination of the chain of responsibility pattern and the finite state machine pattern to complete intent recognition. Compared to using NLP intent recognition algorithms, this significantly improves the accuracy of intent recognition results. Furthermore, this invention eliminates the need for manually constructing training samples or training a suitable NLP intent recognition algorithm, thus greatly saving labor and time costs. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention;

[0039] Figure 2 This is a flowchart illustrating the first embodiment of the intent recognition method of the present invention;

[0040] Figure 3 This is a schematic diagram of the functional modules of the first embodiment of the intent recognition device of the present invention.

[0041] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0042] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0043] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0044] The intent recognition device in this embodiment of the invention can be a server, or a terminal device such as a PC (Personal Computer), tablet computer, or portable computer.

[0045] like Figure 1As shown, the intent recognition device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to establish communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0046] Those skilled in the art will understand that Figure 1 The intent recognition device structure shown does not constitute a limitation on the intent recognition device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0047] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and computer programs.

[0048] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate with it; user interface 1003 is mainly used to connect to the client and communicate with it; and processor 1001 can be used to call computer programs stored in memory 1005 and perform the following operations:

[0049] Obtain the audio file to be recognized;

[0050] The audio file to be identified is subjected to speech recognition to obtain the audio recognition result;

[0051] Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the audio recognition result and obtain the first intent recognition result.

[0052] Furthermore, the processor 1001 can call a computer program stored in the memory 1005 and also perform the following operations:

[0053] The audio file to be identified is subjected to VAD detection to obtain the detection results;

[0054] Based on the detection results, determine whether the audio file to be identified is blank audio;

[0055] If the audio file to be identified is not blank, then speech recognition is performed on the audio file to be identified to obtain the audio recognition result.

[0056] Furthermore, the processor 1001 can call a computer program stored in the memory 1005 and also perform the following operations:

[0057] Based on the detection results, determine whether there are silent segments at the beginning and / or end of the audio file to be identified;

[0058] If there are silent segments at the beginning and / or end of the audio file to be identified, the silent time period is determined based on the detection results.

[0059] The target audio file is obtained by truncating the audio file to be identified based on the silent period.

[0060] The target audio file is subjected to speech recognition to obtain the audio recognition result.

[0061] Furthermore, the processor 1001 can call a computer program stored in the memory 1005 and also perform the following operations:

[0062] Obtain answer intent information, wherein the answer intent information includes the expected answer and intent type;

[0063] The expected answer is constructed into a state tree of a finite state machine based on the finite state machine algorithm, and the intent matcher corresponding to each intent type is obtained based on the state tree.

[0064] The intent matcher is assembled according to the preset filter order and the intent type to obtain the preset intent recognition filter chain.

[0065] Furthermore, the processor 1001 can call a computer program stored in the memory 1005 and also perform the following operations:

[0066] Execute a preset intent recognition filter chain to sequentially call the corresponding intent matchers in the preset filter order to perform intent matching on the audio recognition result until the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and then stop matching and output the first intent recognition result.

[0067] Furthermore, the processor 1001 can call a computer program stored in the memory 1005 and also perform the following operations:

[0068] Check if the first intent recognition result is empty;

[0069] If the first intent recognition result is empty, the audio recognition result is converted from Chinese characters to Pinyin to obtain the first Pinyin text;

[0070] Obtain the similar pinyin of each pinyin in the first pinyin text, and construct the second pinyin text based on the first pinyin text and the similar pinyin;

[0071] Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the second pinyin text and obtain the second intent recognition result.

[0072] Based on the above hardware structure, various embodiments of the intent recognition method of the present invention are proposed.

[0073] This invention provides an intent recognition method.

[0074] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the intent recognition method of the present invention.

[0075] In this embodiment, the intent recognition method includes:

[0076] Step S10: Obtain the audio file to be recognized;

[0077] The intent recognition method in this embodiment is implemented by an intent recognition device, which can be a server, or a terminal device such as a PC (Personal Computer), tablet computer, or portable computer.

[0078] In this embodiment, the audio file to be identified is first obtained. The audio file to be identified is a recorded audio file, the content of which is the customer's answer to the question.

[0079] Step S20: Perform speech recognition on the audio file to be recognized to obtain the audio recognition result;

[0080] After obtaining the audio file to be recognized, speech recognition is performed on it to obtain the audio recognition result. During speech recognition, an ASR (Automatic Speech Recognition) algorithm can be used, and the corresponding interface can be called. Alternatively, in practice, the audio file can be sent to a professional platform for speech recognition, and the audio recognition result returned by the platform can be received. This audio recognition result is the text corresponding to the customer's answer to the question.

[0081] Step S30: Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the audio recognition result and obtain the first intent recognition result.

[0082] After obtaining the audio recognition result through speech recognition, a preset intent recognition filter chain is executed. This preset intent recognition filter chain is pre-assembled, and the specific assembly process can be referred to the fourth embodiment below, which will not be elaborated here.

[0083] This preset intent recognition filter chain contains filters and intent matchers corresponding to various intent types. When executing this preset intent recognition filter chain, the filter corresponding to each intent type can be entered sequentially according to the preset filter order. After entering the corresponding filter, the corresponding intent matcher can be called. The expected answer in the state tree of the called intent matcher is matched with the audio recognition result. The matching stops when the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result. The intent recognition result is output (to distinguish it from the subsequent intent recognition result obtained based on the second pinyin text, the intent recognition result here is recorded as the first intent recognition result), which is the intent type corresponding to the successfully matched intent matcher.

[0084] For example, if the preset intent recognition filter chain includes n filters, and the corresponding intent types are: negative intent, loop intent, positive intent, ..., other intents, then during intent recognition, the filter corresponding to the negative intent is entered first. When the filter corresponding to the negative intent is working, the corresponding intent matcher for the negative intent is dynamically obtained and matched. If the intent matcher for the negative intent fails, the filter corresponding to the loop intent is entered. When the filter corresponding to the loop intent is working, the corresponding intent matcher for the loop intent is dynamically obtained and matched. If the intent matcher for the loop intent succeeds, the first intent recognition result is output as a loop intent. If the intent matcher for the loop intent fails, the next filter (i.e., the positive filter) is entered, and so on, until a match is successful. If all matches fail, the first intent recognition result is empty.

[0085] This invention provides an intent recognition method. First, an audio file to be recognized is acquired. Then, speech recognition is performed on the audio file to obtain an audio recognition result. Next, a preset intent recognition filter chain is executed to call an intent matcher to match the audio recognition result with the intent, resulting in a first intent recognition result. The preset intent recognition filter chain is constructed using the chain of responsibility pattern, and the intent matcher is based on a finite state machine. This invention constructs an intent recognition filter chain using a combination of the chain of responsibility pattern and the finite state machine pattern to complete intent recognition. Compared to using NLP intent recognition algorithms, this significantly improves the accuracy of intent recognition results. Furthermore, this invention eliminates the need for manually constructing training samples or training a suitable NLP intent recognition algorithm, thus greatly saving labor and time costs.

[0086] Furthermore, based on the first embodiment described above, a second embodiment of the intent recognition method of the present invention is proposed.

[0087] In this embodiment, prior to step S20, the intent recognition method further includes:

[0088] Step A: Perform VAD detection on the audio file to be identified and obtain the detection result;

[0089] In this embodiment, after obtaining the audio file to be recognized, before calling the algorithm to perform speech recognition, the audio file to be recognized is first subjected to VAD (Voice Activity Detection, also known as speech endpoint detection or speech boundary detection) detection to obtain the detection results in order to identify silent segments from the sound signal stream.

[0090] Step B: Determine whether the audio file to be identified is blank audio based on the detection results;

[0091] If the audio file to be identified is not blank, then step S20 is executed: speech recognition is performed on the audio file to be identified to obtain the audio recognition result.

[0092] After obtaining the VAD detection results, the system determines whether the audio file to be identified is blank audio based on the detection results. Specifically, it checks whether the total duration of the silent segments in the audio file to be identified is greater than or equal to the product of the total duration and a preset ratio (which can be set according to actual needs). If the total duration of the silent segments is greater than or equal to the product value, the audio file to be identified is determined to be blank audio; if the total duration of the silent segments is less than the product value, the audio file to be identified is determined not to be blank audio.

[0093] Furthermore, if the audio file to be identified is not blank, the next step is to perform speech recognition on the audio file to obtain the audio recognition result. The specific execution process can be referred to the first embodiment described above, and will not be repeated here.

[0094] Furthermore, if the audio file to be identified is blank, the subsequent steps are stopped, and an error message is generated to indicate that the audio file to be identified is blank and does not need to be detected, so as to avoid wasting algorithm resources.

[0095] In this embodiment, by performing VAD detection on the audio file to be recognized, subsequent detection can be skipped when blank audio is detected. Subsequent detection will only be performed when the audio file to be recognized is not blank audio. In this way, the waste of algorithm resources can be reduced while the cost incurred by enterprises due to calling speech recognition algorithms can be reduced.

[0096] Furthermore, based on the second embodiment described above, a third embodiment of the intent recognition method of the present invention is proposed.

[0097] In this embodiment, prior to step S20, the intent recognition method further includes:

[0098] Step C: Determine whether there are silent segments at the beginning and / or end of the audio file to be identified based on the detection results;

[0099] In this embodiment, after obtaining the VAD detection result and detecting blank audio, if the audio file to be identified is not blank audio, it can be further determined whether there are silent segments at the beginning and / or end of the audio file to be identified based on the detection result.

[0100] Step D: If there are silent segments at the beginning and / or end of the audio file to be identified, the silent time period is determined based on the detection results.

[0101] Step E: Extract the audio file to be identified based on the silent period to obtain the target audio file;

[0102] At this point, step S20 may include:

[0103] The target audio file is subjected to speech recognition to obtain the audio recognition result.

[0104] If there are silent segments at the beginning and / or end of the audio file to be identified, the silent time period is determined based on the detection results, that is, the time period corresponding to the silent segments at the beginning and / or end. Then, the audio file to be identified is truncated according to the silent time period, that is, the silent segments at the beginning and / or end are removed, and the non-silent segments in the middle are retained to obtain the target audio file. Then, speech recognition is performed on the target audio file to obtain the audio recognition result, and subsequent steps are further executed. The specific execution process can be referred to the first embodiment above, and will not be repeated here.

[0105] By using the above method, the presence of silent segments at the beginning and / or end of the audio file to be recognized is detected. If such segments are found, they are segmented out, thereby further avoiding the waste of some algorithm resources and the waste of enterprise costs in calling speech recognition algorithms, thus saving enterprise costs.

[0106] Furthermore, based on the first to third embodiments described above, a fourth embodiment of the intent recognition method of the present invention is proposed.

[0107] In this embodiment, prior to step S30, the intent recognition method further includes:

[0108] Step F: Obtain answer intent information, wherein the answer intent information includes the expected answer and intent type;

[0109] Step G: Construct the expected answer into a state tree of a finite state machine according to the finite state machine algorithm, and obtain the intent matcher corresponding to each intent type based on the state tree;

[0110] Step H: Assemble the intent matcher according to the preset filter order and the intent type to obtain the preset intent recognition filter chain.

[0111] In this embodiment, answer intent information is obtained, which includes the expected answer and intent type. The answer intent information can be expressed as a rule array. For example, the answer intent information can be:

[0112]

[0113]

[0114] It should be noted that "answer" refers to the expected answer, which can include one or more. When there are multiple expected answers, they can be separated by " / " (backslash). "purposeType" refers to the intent type. Different numbers can be set for different intent types, such as 1 for affirmation, 2 for negation, 3 for loop, and 4 for silence.

[0115] After obtaining the answer intent information, the expected answer can be constructed into a state tree of a finite state machine using a finite state machine algorithm, and the intent matcher corresponding to each filter can be obtained based on the state tree.

[0116] Specifically, the expected answers can be divided into arrays along backslashes, and then the elements in the arrays can be used to build an intent matching tree, with the root node being root and each expected answer being a leaf node on the state tree corresponding to the intent matcher.

[0117] Furthermore, to reduce the impact of dialects or accents on the accuracy of intent recognition results, when constructing the intent matcher, in addition to building the state tree of the intent matcher based on the expected answers, all elements in the arrays corresponding to all expected answers can be converted into pinyin. Then, the pinyin of all elements can be constructed into the state tree of the intent matcher. Constructing the intent matcher in this way can further improve the accuracy of subsequent intent recognition results.

[0118] After constructing the intent matcher, the intent matcher is assembled according to the chain of responsibility pattern based on the preset filter order and intent type to obtain the preset intent recognition filter chain. Finally, the preset intent recognition filter chain contains filters and intent matchers corresponding to various intent types.

[0119] It's important to note that the Chain of Responsibility pattern aims to avoid coupling the request sender with multiple request handlers. It links all request handlers into a chain by having each object remember a reference to the next object. When a request occurs, it is passed along this chain until an object handles it. The Chain of Responsibility pattern is a behavioral design pattern. In it, clients only need to send requests to the chain; they don't need to worry about the processing details or the request's propagation process, which is handled automatically. Therefore, the Chain of Responsibility decouples the request sender from the request handler.

[0120] Further, step S30 may include:

[0121] Step a31: Execute the preset intent recognition filter chain to sequentially call the corresponding intent matchers in the preset filter order to perform intent matching on the audio recognition result until the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and then stop matching and output the first intent recognition result.

[0122] In this embodiment, when performing intent recognition on the audio recognition result obtained based on speech recognition, the specific recognition process is as follows: Execute a preset intent recognition filter chain, thereby sequentially entering the filters corresponding to each intent type according to the preset filter order. After entering the corresponding filter, the corresponding intent matcher can be called, and the expected answer in the state tree of the called intent matcher is matched with the audio recognition result. The matching stops when the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and the intent recognition result is output (to distinguish it from the subsequent intent recognition result obtained based on the second pinyin text, the intent recognition result here is recorded as the first intent recognition result), which is the intent type corresponding to the successfully matched intent matcher.

[0123] In this embodiment, an intent recognition filter chain is dynamically constructed using the chain of responsibility pattern. Then, a finite state machine algorithm is used to build a state tree of the expected answers to be matched, performing intent matching one by one until a successful match is obtained, thus achieving the intent recognition result. By combining the chain of responsibility pattern with the finite state machine pattern, an intent recognition filter chain is constructed to complete intent recognition. Compared to using NLP intent recognition algorithms, this significantly improves the accuracy of intent recognition results. Furthermore, this invention eliminates the need for manually constructing training samples or training a suitable NLP intent recognition algorithm, thus greatly saving labor and time costs.

[0124] Furthermore, the intent recognition filter chain formed by combining the chain of responsibility pattern and the finite state machine combination pattern is an extensible filter chain that can be used to load multiple intent recognition rules for dynamic intent recognition, thereby achieving compatibility with the intent recognition needs of different industries and business processes. In other words, the aforementioned intent recognition method has broader applicability.

[0125] Furthermore, based on the first to third embodiments described above, a fifth embodiment of the intent recognition method of the present invention is proposed.

[0126] In this embodiment, after step S30, the intent recognition method further includes:

[0127] Step 1: Detect whether the first intent recognition result is empty;

[0128] In this embodiment, after obtaining the first intent recognition result, it is detected whether the first intent recognition result is empty, that is, whether the intent recognition is successful.

[0129] Step J: If the first intent recognition result is empty, the audio recognition result is converted from Chinese characters to Pinyin to obtain the first Pinyin text;

[0130] Step K: Obtain the similar pinyin of each pinyin in the first pinyin text, and construct the second pinyin text based on the first pinyin text and the similar pinyin;

[0131] Step L: Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the second pinyin text and obtain the second intent recognition result.

[0132] If the first intent recognition result is empty, it indicates that the intent recognition failed. This may be due to the influence of dialect or accent, leading to inaccurate speech recognition results. In this case, the audio recognition result can be converted from Chinese characters to Pinyin to obtain the first Pinyin text. Further, similar Pinyin to each Pinyin in the first Pinyin text is obtained. Specifically, similar Pinyin to each Pinyin in the first Pinyin text can be determined based on a preset list of similar Pinyin. Then, a second Pinyin text is constructed based on the first Pinyin text and the similar Pinyin. Next, a preset intent recognition filter chain is executed to call the intent matcher to perform intent matching on the second Pinyin text, obtaining the second intent recognition result. The specific intent recognition process is similar to the above process and will not be elaborated here.

[0133] In this embodiment, the audio recognition result is converted from Chinese characters to Pinyin to obtain the first Pinyin text. Then, the corresponding similar Pinyin is obtained to expand the second Pinyin text. Finally, a preset intent recognition filter chain is executed to perform intent recognition on the second Pinyin text to obtain the second intent recognition result. This method can further improve the accuracy of the intent recognition result.

[0134] The present invention also provides an intent recognition device.

[0135] Reference Figure 3 , Figure 3 This is a schematic diagram of the functional modules of the first embodiment of the intent recognition device of the present invention.

[0136] like Figure 3 As shown, the intent recognition device includes:

[0137] File acquisition module 10 is used to acquire the audio file to be recognized;

[0138] The speech recognition module 20 is used to perform speech recognition on the audio file to be recognized and obtain the audio recognition result;

[0139] The intent recognition module 30 is used to execute a preset intent recognition filter chain to call the intent matcher to perform intent matching on the audio recognition result and obtain a first intent recognition result.

[0140] Furthermore, the intent recognition device also includes:

[0141] The VAD detection module is used to perform VAD detection on the audio file to be identified and obtain the detection result;

[0142] The first judgment module is used to determine whether the audio file to be identified is blank audio based on the detection result;

[0143] The speech recognition module 20 is specifically used to perform speech recognition on the audio file to be recognized if the audio file to be recognized is not blank audio, and obtain the audio recognition result.

[0144] Furthermore, the intent recognition device also includes:

[0145] The second judgment module is used to determine whether there are silent segments at the beginning and / or end of the audio file to be identified based on the detection results.

[0146] The time period determination module is used to determine the silent time period based on the detection result if there is a silent segment at the beginning and / or end of the audio file to be identified.

[0147] An audio extraction module is used to extract the audio file to be identified based on the silent period to obtain the target audio file;

[0148] The speech recognition module 20 is also specifically used for:

[0149] The target audio file is subjected to speech recognition to obtain the audio recognition result.

[0150] Furthermore, the intent recognition device also includes:

[0151] The information acquisition module is used to acquire answer intent information, wherein the answer intent information includes the expected answer and intent type;

[0152] The construction module is used to construct the expected answer into a state tree of a finite state machine according to the finite state machine algorithm, and obtain the intent matcher corresponding to each intent type based on the state tree;

[0153] An assembly module is used to assemble the intent matcher according to a preset filter order and the intent type to obtain the preset intent recognition filter chain.

[0154] Furthermore, the intent recognition module 30 is specifically used for:

[0155] Execute a preset intent recognition filter chain to sequentially call the corresponding intent matchers in the preset filter order to perform intent matching on the audio recognition result until the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and then stop matching and output the first intent recognition result.

[0156] Furthermore, the intent recognition device also includes:

[0157] The result detection module is used to detect whether the first intent recognition result is empty;

[0158] The result conversion module is used to convert the audio recognition result from Chinese characters into pinyin to obtain the first pinyin text if the first intent recognition result is empty.

[0159] The similar pinyin acquisition module is used to acquire similar pinyin to each pinyin in the first pinyin text, and construct a second pinyin text based on the first pinyin text and the similar pinyin;

[0160] The intent recognition module 30 is further configured to execute a preset intent recognition filter chain to call the intent matcher to perform intent matching on the second pinyin text and obtain the second intent recognition result.

[0161] The functions of each module in the aforementioned intent recognition device correspond to the steps in the aforementioned intent recognition method embodiments, and their functions and implementation processes will not be described in detail here.

[0162] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the intent recognition method as described in any of the foregoing embodiments.

[0163] The specific embodiments of the computer-readable storage medium of the present invention are basically the same as the embodiments of the intent recognition method described above, and will not be repeated here.

[0164] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the intent recognition method as described in any of the preceding claims.

[0165] The specific embodiments of the computer program product of the present invention are basically the same as the embodiments of the intent recognition method described above, and will not be repeated here.

[0166] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system 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 system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0167] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

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

[0169] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An intent recognition method, characterized in that, The intent recognition method includes: Obtain the audio file to be recognized; The audio file to be identified is subjected to speech recognition to obtain the audio recognition result; The system executes a preset intent recognition filter chain constructed using the chain of responsibility pattern, which calls the intent matcher to perform intent matching on the audio recognition results sequentially according to the preset filter order. Once a match is successful, the matching stops, and the first intent recognition result is output. The intent matcher is obtained by constructing the expected answer into a state tree of a finite state machine based on a finite state machine algorithm.

2. The intent recognition method as described in claim 1, characterized in that, Before the step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result, the intent recognition method further includes: The audio file to be identified is subjected to VAD detection to obtain the detection results; Based on the detection results, determine whether the audio file to be identified is blank audio; If the audio file to be identified is not blank, then the following steps are performed: perform speech recognition on the audio file to be identified to obtain the audio recognition result.

3. The intent recognition method as described in claim 2, characterized in that, Before the step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result, the intent recognition method further includes: Based on the detection results, determine whether there are silent segments at the beginning and / or end of the audio file to be identified; If there are silent segments at the beginning and / or end of the audio file to be identified, the silent time period is determined based on the detection results. The target audio file is obtained by truncating the audio file to be identified based on the silent period. The step of performing speech recognition on the audio file to be recognized to obtain the audio recognition result includes: The target audio file is subjected to speech recognition to obtain the audio recognition result.

4. The intent recognition method as described in any one of claims 1 to 3, characterized in that, Before the step of executing a preset intent recognition filter chain constructed using the chain of responsibility pattern, invoking an intent matcher to sequentially match the audio recognition results according to the preset filter order, stopping the matching upon successful matching, and outputting the first intent recognition result, the intent recognition method further includes: Obtain answer intent information, wherein the answer intent information includes the expected answer and intent type; The expected answer is constructed into a state tree of a finite state machine based on the finite state machine algorithm, and the intent matcher corresponding to each intent type is obtained based on the state tree. The intent matcher is assembled according to the preset filter order and the intent type to obtain the preset intent recognition filter chain.

5. The intent recognition method as described in claim 4, characterized in that, The step of executing a preset intent recognition filter chain constructed using the chain of responsibility pattern, calling the intent matcher to sequentially match the audio recognition results according to the preset filter order, stopping the matching process upon successful matching, and outputting the first intent recognition result includes: Execute a preset intent recognition filter chain to sequentially call the corresponding intent matchers in the preset filter order to perform intent matching on the audio recognition result until the expected answer in the state tree of the called intent matcher is successfully matched with the audio recognition result, and then stop matching and output the first intent recognition result.

6. The intent recognition method as described in any one of claims 1 to 3, characterized in that, The intent recognition method further includes: Check if the first intent recognition result is empty; If the first intent recognition result is empty, the audio recognition result is converted from Chinese characters to Pinyin to obtain the first Pinyin text; Obtain the similar pinyin of each pinyin in the first pinyin text, and construct the second pinyin text based on the first pinyin text and the similar pinyin; Execute the preset intent recognition filter chain to call the intent matcher to perform intent matching on the second pinyin text and obtain the second intent recognition result.

7. An intent recognition device, characterized in that, The intent recognition device includes: The file acquisition module is used to acquire the audio file to be recognized; The speech recognition module is used to perform speech recognition on the audio file to be recognized and obtain the audio recognition result; The intent recognition module is used to execute a preset intent recognition filter chain constructed using the chain of responsibility pattern, so as to call the intent matcher to perform intent matching on the audio recognition results in the order of the preset filters. When a match is successful, the matching stops and the first intent recognition result is output. The intent matcher is obtained by constructing the expected answer into a state tree of a finite state machine based on the finite state machine algorithm.

8. An intent recognition device, characterized in that, The intent recognition device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the intent recognition method as described in any one of claims 1 to 6.

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