Intent recognition methods, devices, electronic devices and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2026-08-14
AI Technical Summary
这样依赖单一置信度指标会导致选择片面性,从而降低意图识别的准确性
[0005]可以看出,本申请中,通过动态计算第一对话中每个第一意图的探索系数以调整MCTS算法中的探索与利用平衡,结合探索系数计算每个第一意图的上置信界值并选择最优的第二意图,进一步对第二意图进行扩展生成多个第三意图,通过蒙特卡洛模拟评估第二意图和第三意图的价值,综合前述得到的所有意图的评分确定目标意图,可以达到提高意图识别准确性和鲁棒性的技术效果。该方法通过动态调整探索系数,增强了对有着复杂需求的用户的理解能力,从而提升了用户体验。
Smart Images

Figure CN120688515B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an intent recognition method, apparatus, electronic device, and storage medium. Background Technology
[0002] In user dialogue, intent recognition is a core technology in Natural Language Processing (NLP) and dialogue systems. Its goal is to determine the underlying intent or need by analyzing user input (text, speech, etc.). Currently, multiple intents in user input can be identified based on rule matching or classification models. However, the optimal intent for multiple intents is currently determined solely based on the confidence level of each intent. This reliance on a single confidence metric leads to biased selection, thereby reducing the accuracy of intent recognition. Summary of the Invention
[0003] This application provides an intent recognition method, apparatus, electronic device, and storage medium that, by combining Monte Carlo Tree Search (MCTS), automatically selects the optimal intent from multiple candidate intents, thereby improving the accuracy of intent recognition.
[0004] In a first aspect, this application provides an intent recognition method, the method comprising: Based on the multiple first intentions corresponding to the first dialogue, determine the exploration coefficient of each first intention at the first moment; The upper confidence threshold for each first intention is determined based on the exploration coefficient of each first intention. Based on the upper confidence threshold corresponding to each first intent, a second intent is selected from multiple first intents and expanded to obtain multiple third intents; Monte Carlo simulations were performed based on the second intention and multiple third intentions to determine the first score of the second intention and the first score of each of the multiple third intentions; Based on multiple first scores and the second score for each fourth intent, the target intent is determined from the second intent, multiple third intents, and multiple fourth intents; Among them, the fourth intention is the intention that is different from the second intention in the first intention, and the second score is the average score of the fourth intention recorded before the first moment.
[0005] As can be seen, this application dynamically calculates the exploration coefficient of each first intent in the first dialogue to adjust the balance between exploration and exploitation in the MCTS algorithm. It then combines the exploration coefficient to calculate the upper confidence threshold of each first intent and selects the optimal second intent. Furthermore, it expands the second intent to generate multiple third intents. Monte Carlo simulation is used to evaluate the value of the second and third intents. Finally, the target intent is determined by comprehensively considering the scores of all the aforementioned intents. This approach achieves the technical effect of improving the accuracy and robustness of intent recognition. By dynamically adjusting the exploration coefficient, this method enhances the understanding of users with complex needs, thereby improving the user experience.
[0006] Secondly, this application provides an intent recognition device, the device comprising: The first processing unit is used to determine the exploration coefficient of each first intent at the first moment based on the multiple first intents corresponding to the first dialogue; The first processing unit is also used to determine the upper confidence threshold corresponding to each first intent based on the exploration coefficient of each first intent; The second processing unit is used to select a second intent from multiple first intents and expand the second intents to obtain multiple third intents based on the upper confidence threshold corresponding to each first intent; The third processing unit is used to perform Monte Carlo simulation based on the second intention and multiple third intentions, to determine the first score of the second intention, and the first score of each intention among the multiple third intentions; The fourth processing unit is used to determine the target intent from the second intent, the multiple third intents, and the multiple fourth intents based on the multiple first scores and the second score of each fourth intent; Among them, the fourth intention is the intention that is different from the second intention in the first intention, and the second score is the average score of the fourth intention recorded before the first moment.
[0007] Thirdly, this application provides an electronic device including a processor, a memory, and a communication interface. The processor, memory, and communication interface are interconnected and perform communication with each other. The memory stores executable program code, the communication interface is used for wireless communication, and the processor is used to retrieve the executable program code stored in the memory and execute some or all of the steps described in any of the methods in the first aspect.
[0008] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements some or all of the steps described in the first aspect of this application.
[0009] Fifthly, this application provides a computer program product, including a computer program that, when processed and executed, implements some or all of the steps described in the first aspect of this application. The computer program product may be a software installation package. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the structure of an intent recognition system provided in an embodiment of this application; Figure 2 A flowchart illustrating an intent recognition method provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the structure of an intent tree. Figure 4 A flowchart illustrating another intent recognition method provided in an embodiment of this application; Figure 5 A flowchart illustrating another intent recognition method provided in an embodiment of this application; Figure 6 A functional unit block diagram of an intent recognition device provided in an embodiment of this application; Figure 7 A functional unit block diagram of another intent recognition device provided in the embodiments of this application; Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0012] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0013] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps is not limited to the steps listed, but may optionally include steps not listed, or may optionally include other steps inherent to these processes, methods, products, or apparatuses.
[0014] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0015] In practical applications, especially in fields such as intelligent customer service and dialogue systems, user input text may involve multiple potential intents. Traditional intent recognition methods are mostly single-intent recognition methods. Even if they can identify multiple intent contents, there are still significant problems in selection, and they cannot fully handle complex multi-intent scenarios. For example, the user input may contain multiple intents. Figure 1 ,meaning Figure 2 ,meaning Figure 3 Wait, if we choose the option with the highest confidence level at this point... Figure 1 In the subsequent dialogue, it may be implied that... Figure 2 Most importantly, this leads to the initial choice not being optimal. If every user's intention is answered, the dialogue system becomes less intelligent and human-like, unable to respond to the user's intention through an effective dialogue process.
[0016] Based on this, this application provides an intent recognition method that combines Monte Carlo Tree Search (MCTS) to automatically select the optimal intent from multiple candidate intents. Specifically, it dynamically calculates the exploration coefficient of each first intent in the current dialogue to adjust the balance between exploration and utilization in the MCTS algorithm. The upper confidence threshold of each first intent is calculated based on the exploration coefficient, and the optimal second intent is selected. Furthermore, the second intent is expanded to generate multiple third intents. The value of the second and third intents is evaluated through Monte Carlo simulation. Finally, the target intent is determined by comprehensively considering the scores of the multiple intents obtained above. This method significantly improves the accuracy and robustness of intent recognition. By dynamically adjusting the exploration coefficient, this method enhances the understanding of users with complex needs, thereby improving the user experience.
[0017] The following describes the scenarios involved in the embodiments of this application.
[0018] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an intent recognition system provided in an embodiment of this application, as shown below. Figure 1 As shown, the intent recognition system 100 includes a terminal device 101 and a server 102.
[0019] Terminal device 101 is used to implement dialogue with the user, obtain the dialogue input by the user, and then send the dialogue input by the user to server 102.
[0020] After receiving a user's input dialogue, server 102 analyzes the dialogue and generates a response based on prior related dialogues and the corresponding database. Server 102 can be integrated into terminal device 101. Optionally, terminal device 101 is not limited to desktop computers, but can include laptops, tablets, smartphones, etc. Server 102 is not limited to servers, server clusters, cloud servers, cloud computing service centers, or other forms of computing devices.
[0021] Specifically, after receiving the user's input dialogue, terminal device 101 sends the dialogue to server 102. Server 102 first determines multiple first intentions corresponding to the dialogue and dynamically determines the exploration coefficient of each first intention at a first moment. Then, it combines the exploration coefficients of each first intention at the first moment to determine the upper confidence bound for each first intention, and selects the optimal second intention based on the upper confidence bound. Further, it expands the second intentions to generate multiple third intentions. By performing Monte Carlo simulations on the second intentions and multiple third intentions, it determines the first score of the second intention and the first score of each of the multiple third intentions. Finally, it combines the scores of all intentions to determine the target intention. This achieves a significant improvement in the accuracy and robustness of intention recognition. By dynamically adjusting the exploration coefficients, it enhances the understanding of users with complex needs, thereby improving the user experience.
[0022] The prior art involved in the embodiments of this application is described below.
[0023] Monte Carlo Tree Search (MCS): A branch of computational mathematics, MCS is based on probability and statistical theory and uses random numbers (or pseudo-random numbers) to solve complex decision problems. It uses a decision tree as a representation of the search space, repeatedly simulating the game or decision-making process to evaluate the value of different decisions and select the most valuable one. Its core idea is to optimize the search tree by iteratively selecting, expanding, simulating, and updating nodes. It combines the generality of stochastic simulation with the accuracy of tree search, enabling it to efficiently find optimal solutions even in scenarios with huge search spaces.
[0024] Monte Carlo tree search algorithms typically include the following stages.
[0025] Selection: Starting from the root node, the optimal child node is recursively selected according to a certain strategy until a leaf node is reached. The selection strategy usually balances two factors: exploration: selecting nodes that have not been explored before to obtain new information. Exploitation: selecting nodes that have already scored high or performed well to ensure the stability of the system's performance. For example, the Upper Confidence Bound (UCB) strategy can be used to balance exploration and exploitation.
[0026] Expansion: If a leaf node is not a terminal node, create one or more child nodes for it and select one of them to expand.
[0027] Simulation: Starting from the expanded nodes, a random simulation is performed, that is, a simulation of the game or decision-making process according to a certain strategy (such as random selection) until the game ends or a certain termination condition is reached. This step is often called "Monte Carlo simulation".
[0028] Backpropagation: The simulation results (such as game wins and losses, reward values, etc.) are backpropagated to the search tree to update the node statistics (such as the number of visits, average value, etc.) for subsequent selection and evaluation.
[0029] Based on this, the embodiments of this application provide an intent recognition method, and the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0030] Example 1: The main process of the intent recognition method will be described below.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating an intent recognition method provided in an embodiment of this application. The method is applied to the aforementioned server, such as... Figure 2 As shown, the method includes the following steps.
[0032] Step S201: Based on the multiple first intentions corresponding to the first dialogue, determine the exploration coefficient of each first intention at the first moment.
[0033] The first dialogue can be text or voice information input by the user, which serves as the raw data for intent recognition. It can be obtained from the user interface or generated by a speech-to-text module. For example, the first dialogue can include, but is not limited to, the user's natural language expression, keyword combination, or semantic vector representation.
[0034] Multiple first intents can be a set of possible intents predicted by a multi-label classification model. Each intent represents a user's possible need or goal. In a specific embodiment, features (such as keywords, semantic vectors, etc.) can be extracted from user input, and a trained multi-label classification model can be used to predict all possible first intents and their confidence levels, thereby generating multiple candidate intents to provide a basis for subsequent selection. The training of the multi-label classification model can be performed using traditional machine learning methods (such as Multi-Layer Perceptron (MLP), Support Vector Machine (SVM), etc.) or deep learning methods (such as Long Short-Term Memory (LSTM) networks or Bidirectional Encoder Representations from Transformers (BERT)).
[0035] The exploration coefficient (C) in the upper confidence bound strategy is used to balance exploration and exploitation. A larger C value tends to indicate more exploration, while a smaller C value tends to indicate more exploitation. In other words, a larger C value suggests that the subsequent second intention chosen might be the one with fewer prior visits among multiple first intentions; a smaller C value suggests that the subsequent second intention chosen might be the one with more prior visits among multiple first intentions. "First moment" can refer to the current moment, such as the moment the first dialogue is acquired.
[0036] Step S202: Determine the upper confidence threshold for each first intent based on the exploration coefficient of each first intent.
[0037] The upper confidence bound refers to the reference value corresponding to the upper confidence bound strategy. It can also be an indicator for measuring the value of a node. Combined with the current node score and exploration factors, it guides the selection strategy of MCTS. For example, the dynamic exploration coefficient is substituted into the UCB formula to calculate the upper confidence bound for each first intention. This value comprehensively considers the node's historical performance (score) and exploration needs, providing a quantitative basis for subsequent selection. It can be understood that each node corresponds to an intention, and the intention corresponding to the current node is obtained by expanding the intention corresponding to the current node's parent node.
[0038] The UCB formula is as follows:
[0039] Where average_reward_of_the_node represents the node score, in_parent_visits represents the number of times the current node's parent node has been visited, node_visits represents the number of times the current node has been visited, and C is the exploration coefficient.
[0040] Step S203: Select a second intent from multiple first intents based on the upper confidence threshold corresponding to each first intent, and expand the second intent to obtain multiple third intents.
[0041] The second intent is selected from multiple first intents as the starting point for the expansion phase. For example, the upper confidence bounds of all first intents can be compared, and the first intent corresponding to the largest upper confidence bound among all first intents can be selected as the second intent. This ensures that the selected intent aligns with historical performance while also considering exploration needs. Alternatively, the first intent corresponding to the second largest upper confidence bound among all first intents can be selected as the second intent, which avoids premature convergence and promotes global exploration. Another approach is to randomly select a single upper confidence bound from multiple high upper confidence bounds as the second intent, thus balancing resource allocation.
[0042] The third intent is a sub-intent derived from the second intent, representing a potential user demand path. For example, based on the second intent, a set of possible sub-intents is generated. These sub-intents expand the structure of the intent tree and provide more options for the simulation phase.
[0043] The aforementioned extensions can refer to semantic extensions. They can also be based on sub-intent refinement, contextual association, user behavior prediction, and other methods.
[0044] For example, please refer to Figure 3 , Figure 3 This application provides a schematic diagram of the structure of an intent tree, as shown in the embodiments of this application. Figure 3 As shown, the root node includes user input. Starting from the root node, the multi-label classification model obtains multiple intents corresponding to the user input, namely, querying loan amount, querying loan interest rate, and querying repayment method, which serve as three child nodes. For these three child nodes, after querying the loan amount, the user may further inquire about how the loan amount is calculated, which can be expanded to include the calculation method of the loan amount and the maximum loan amount. Querying the loan interest rate can be expanded to include the types of loan interest rates and preferential loan interest rate indicators. Querying the repayment method can be expanded to include the conditions and fees for early repayment and the repayment period.
[0045] Step S204: Perform Monte Carlo simulation based on the second intention and multiple third intentions to determine the first score of the second intention and the first score of each of the multiple third intentions.
[0046] The aforementioned Monte Carlo simulation primarily involves randomly selecting a path from multiple paths composed of extended third intentions and second intentions. This simulates a dialogue scenario based on the aforementioned intentions and user feedback. Finally, the first score for the second intention and the first score for each of the multiple third intentions are determined based on the simulation score corresponding to each intention. For example, a single intention from multiple third intentions is randomly selected to form a path with the second intention, and a Monte Carlo simulation is performed. User intention matching rate, interaction interest, information gain, and other indicators are recorded, and a weighted formula is used to calculate the first score for each intention.
[0047] Step S205: Determine the target intent from the second intent, multiple third intents, and multiple fourth intents based on multiple first scores and the second score of each fourth intent.
[0048] Here, the fourth intent is the intent that differs from the second intent among the first intents, and the second score is the average score of the fourth intent recorded up to the first moment. The target intent is the finally selected optimal intent, which serves as the basis for the system response. For example, by combining the scores of the second, third, and fourth intents, the intent with the highest score is selected as the target intent; this process ensures a globally optimal selection.
[0049] As can be seen, this application provides an intent recognition method that dynamically calculates the exploration coefficient of each first intent to adjust the balance between exploration and utilization in the MCTS algorithm. It then combines the exploration coefficients to calculate an upper confidence threshold and selects the optimal second intent. Furthermore, it expands the second intent to generate multiple third intents. Monte Carlo simulation is used to evaluate the value of the second and third intents, and the target intent is determined by comprehensively considering the scores of multiple intents. This method significantly improves the accuracy and robustness of intent recognition. By dynamically adjusting the exploration coefficients and expanding the intent tree structure, this method enhances the understanding of complex user needs, thereby improving the user experience.
[0050] Example 2: The intent recognition method will be described in detail below based on the details of determining the exploration coefficients.
[0051] Please see Figure 4 , Figure 4 This is a flowchart illustrating another intent recognition method provided in an embodiment of this application. This method is applied to the aforementioned server, such as... Figure 4 As shown, the method includes the following steps.
[0052] Step S401: Determine the exploration coefficient of each first intention based on the dialogue round corresponding to the first moment in the multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among the multiple first intentions corresponding to the first dialogue.
[0053] In this multi-turn dialogue, the dialogue turn corresponding to the first moment can be obtained through statistical analysis of historical dialogue records. The behavioral entropy of the second dialogue can be an indicator used to quantify the uncertainty and diversity of the user's dialogue intent in the second dialogue; a higher value indicates a less fixed user intent in the second dialogue. The second dialogue represents the dialogue between the user and the target user before the first moment, where the target user is the user corresponding to the first dialogue. In a specific embodiment, behavioral entropy can be obtained by calculating the probability-weighted information entropy of the user's intent distribution before the first moment. For example, behavioral entropy can reflect the frequency and pattern of user switching between different intents. Intent confidence can be the probability value corresponding to each intent output by a multi-label classification model, used to reflect the system's confidence in a particular intent. For example, intent confidence can include, but is not limited to, the probability value of the system predicting a specific intent or a similarity score.
[0054] The determination of the exploration coefficient can be achieved by combining the three factors mentioned above. Specifically, in one embodiment, the number of dialogue rounds influences the exploration intensity through an exponential decay term; as the dialogue progresses, the need for exploration gradually decreases. Behavioral entropy reflects the diversity of user intentions in the second dialogue; when user intentions frequently switch, the exploration weight needs to be increased to adapt to uncertainty. Intention confidence serves as a compensation term; when the system lacks confidence in a certain intention, the exploration scope needs to be expanded to find a better solution. This process ensures that the exploration factors can be dynamically adjusted to adapt to the needs of different dialogue stages, thereby improving the flexibility and accuracy of the selection strategy.
[0055] It can be seen that by comprehensively considering the dialogue turn number in the first moment of a multi-turn dialogue, the behavioral entropy of the second dialogue, and the intent confidence of each of the multiple first intents corresponding to the first dialogue, and dynamically adjusting the exploration coefficient based on these factors, the system can flexibly balance the relationship between exploration and exploitation during the dialogue process. Compared with the traditional fixed-value exploration factor, this method can better adapt to changes in the dialogue scenario, especially when the user's intent is ambiguous or diverse. The system can proactively adjust the balance between exploration and exploitation, avoiding premature convergence to erroneous intents. In addition, the design of dynamic exploration coefficients enhances the robustness of the system, enabling it to more accurately identify the user's true needs in complex dialogue environments, thereby significantly improving the overall dialogue quality and user experience.
[0056] Optionally, the exploration coefficient of each first intention is determined based on the dialogue turn corresponding to the first moment in the multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among the multiple first intentions corresponding to the first dialogue. This includes: constructing a first function based on the natural index and the dialogue turn corresponding to the first moment in the multi-turn dialogue; constructing a second function based on the difference between a first preset value and the intention confidence of each first intention among the multiple first intentions corresponding to the first dialogue; determining a third function based on the first function, the second function, the behavioral entropy of the second dialogue, and the second preset value; and determining the exploration coefficient of each first intention based on the preset exploration coefficient and the third function.
[0057] The natural exponent can be an exponential function with the mathematical constant e as its base, characterized by smooth change, and can be generated through mathematical modeling. For example, the natural exponent can include, but is not limited to, a power function with e as its base. In a specific embodiment, this can be achieved by modeling the dialogue turn corresponding to the first moment in a multi-turn dialogue using the natural exponential function. This allows the value of the first function to gradually decrease as the number of dialogue turns increases, reflecting the trend of diminishing exploration intensity as the dialogue progresses.
[0058] The first preset value can be a fixed benchmark value used to measure the influence of intent confidence. It can be obtained through manual setting or system default configuration. For example, the first preset value can include, but is not limited to, a value within a fixed numerical range. A second function is constructed based on the difference between the first preset value and the intent confidence of each of the multiple first intents corresponding to the first dialogue. In a specific embodiment, this can be achieved through difference calculation, so that when the intent confidence of each first intent is high, the difference is small, and the value of the second function is also small, indicating that the exploration intensity should be reduced; conversely, when the intent confidence of each first intent is low, the exploration scope needs to be expanded to find a better solution.
[0059] The second preset value can be another fixed benchmark value set to balance the influence of other factors. It can be obtained through manual setting or system default configuration. For example, the second preset value can include, but is not limited to, a value within a fixed numerical range. The third function is constructed by adding the first function, the second function, the behavioral entropy of the second dialogue, and the second preset value. In a specific embodiment, this can be achieved by direct summation, thereby comprehensively considering the impact of the current dialogue round, the intent confidence of the first intent in the current dialogue, and the diversity of user behavior on the exploration coefficient, ensuring that the dynamic adjustment mechanism can fully adapt to the needs of different dialogue scenarios.
[0060] The exploration coefficient for each first intention is determined by multiplying a preset exploration coefficient by a third function. The preset exploration coefficient can be an initially set fixed exploration factor, with a default value of 1, serving as the basis for dynamic adjustment. It can be obtained through manual setting or system default configuration. For example, the preset exploration coefficient can include, but is not limited to, a value within a fixed numerical range. The final exploration coefficient is obtained by multiplying the preset exploration coefficient by the third function. In a specific embodiment, this can be achieved through multiplication, thereby achieving the effect of dynamically adjusting the exploration factor by introducing a third function to correct the preset value.
[0061] The formula for calculating the exploration coefficient is as follows:
[0062] Where t represents the dialogue round, and the exploration intensity gradually decreases as the dialogue round increases; H represents the behavior entropy; S represents the current intent confidence; if the intent confidence is low, the exploration requirement is expanded, and the exploration of alternative intents needs to be strengthened. α, β, γ, and δ are weighting coefficients, which can be adjusted according to actual applications, for example, set to 0.5, 0.2, 0.3, and 0.4 respectively. C_base is the preset exploration coefficient, which can be set to 1 by default, i.e., default exploration.
[0063] For example, in the following scenario: In the fifth round of conversation, the user asked, "Can this plan be offered at a more favorable price?"
[0064] Dialogue rounds: .
[0065] Historical entropy (user's past intentions to frequently switch loan types, terms, etc.): .
[0066] Current confidence level: 0.6.
[0067] The formula for calculating the dynamic C value is as follows:
[0068] It can be seen that by constructing a first function based on the natural index and the number of dialogue rounds, the trend of exploration intensity decreasing as the dialogue deepens is reflected; a second function is constructed based on the difference between the first preset value and the intent confidence of each first intent, and the exploration intensity is dynamically adjusted according to the intent confidence; a third function is constructed by determining the sum of the first function, the second function, the behavioral entropy, and the second preset value, which comprehensively considers the impact of dialogue rounds, intent confidence, and user behavior diversity on the exploration coefficient; the exploration coefficient is determined by the product of the preset exploration coefficient and the third function, realizing the dynamic adjustment of the exploration factor. This can improve the flexibility and adaptability of the exploration strategy, avoid the problem of insufficient or excessive exploration caused by a single fixed value, and thus improve the accuracy of system intent recognition and user experience.
[0069] Optionally, the second dialogue includes multiple fifth intentions, and the number of times each fifth intention appears in the multiple fifth intentions is determined; the frequency of each fifth intention is determined based on the ratio between the number of times each fifth intention appears and the total number of times the multiple fifth intentions appear; and the behavioral entropy is determined based on the frequency of each fifth intention.
[0070] The second dialogue can refer to the history of conversations that precede the current first dialogue, including multiple rounds of interaction between the user and the system. By parsing the second dialogue, all intents (i.e., fifth intents) can be extracted, and the frequency of each fifth intent can be counted. For example, a fifth intent could be an interest or need expressed by the user in past conversations, such as purchasing goods, checking the weather, or booking services. The frequency of each fifth intent can be obtained by dividing its frequency by the total number of intents. This process captures preference patterns in the user's historical behavior, providing foundational data for subsequent calculations.
[0071] The logarithmic value, calculated with the natural logarithm as the base, is used to smooth out variations in frequency. For example, for each fifth intention, the fourth function value can be constructed by multiplying its natural logarithm by the original frequency. This process leverages a core idea from information entropy theory: low-frequency events carry more information, while high-frequency events carry relatively less. In this way, the information contribution of each fifth intention can be quantified more accurately.
[0072] Behavioral entropy is an indicator used to describe the diversity of a user's historical behavior; a higher value indicates more uncertain or diverse user behavior. For example, the final behavioral entropy is obtained by summing the fourth function values corresponding to all fifth intentions and taking their negative value. This process comprehensively considers the information content of all fifth intentions, reflecting the overall distribution characteristics of the user's historical behavior. A higher behavioral entropy value indicates that the user's intention choices are less fixed, and the system's exploration needs increase accordingly; conversely, a lower behavioral entropy indicates that user behavior is more stable, and the system can focus more on utilizing known information.
[0073] The formula for behavioral entropy is as follows:
[0074] in, Indicates the user's selection intent The frequency of the fifth intent indicates a significant need for exploration if the user's intent choices are varied, while a lower behavioral entropy value indicates a less significant need for exploration. N represents the number of fifth intents, and i represents the i-th fifth intent.
[0075] It can be seen that by determining the frequency of each fifth intent in the second dialogue, constructing a fourth function by multiplying the logarithmic value by the frequency, and further obtaining the behavioral entropy by summing the fourth function values corresponding to multiple fifth intents and taking the negative value, the system's ability to characterize the diversity of users' historical behavior can be enhanced. Compared to directly counting the frequency of intents, this method can more comprehensively reflect the uncertainty of user behavior, thus providing a more reliable basis for dynamically adjusting exploration factors. Especially in scenarios where user intents frequently switch or behavioral patterns are complex, the introduction of behavioral entropy can significantly improve the system's adaptability and accuracy, ensuring that the intent recognition process is more flexible and meets the actual dialogue needs.
[0076] Step S402: Determine the upper confidence threshold for each first intent based on the exploration coefficient of each first intent.
[0077] Step S403: Select a second intent from multiple first intents based on the upper confidence threshold corresponding to each first intent, and expand the second intent to obtain multiple third intents.
[0078] Step S404: Perform Monte Carlo simulation based on the second intention and multiple third intentions to determine the first score of the second intention and the first score of each of the multiple third intentions.
[0079] Step S405: Determine the target intent from the second intent, multiple third intents, and multiple fourth intents based on multiple first scores and the second score of each fourth intent.
[0080] It is understood that the explanation of the steps related to Embodiment 1 above can be found in Embodiment 1, and will not be repeated here.
[0081] Example 3: The intent recognition method will be described in detail below based on the scoring details of the second and third intents.
[0082] Please see Figure 5 , Figure 5 This is a flowchart illustrating another intent recognition method provided in an embodiment of this application. This method is applied to the aforementioned server, such as... Figure 5 As shown, the method includes the following steps.
[0083] Step S501: Determine the exploration coefficient of each first intention based on the dialogue round corresponding to the first moment in the multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among the multiple first intentions corresponding to the first dialogue.
[0084] Step S502: Determine the upper confidence threshold for each first intent based on the exploration coefficient of each first intent.
[0085] Step S503: Select a second intent from multiple first intents based on the upper confidence threshold corresponding to each first intent, and expand the second intent to obtain multiple third intents.
[0086] Step S504: Determine multiple intent combinations, each intent combination including a second intent and a third intent.
[0087] The intention combination can be a combination of a second intention and a third intention, used to simulate the possibilities of different dialogue paths. The third intention in the intention combination can be single or multiple.
[0088] Optionally, each third intent generated in the expansion phase is paired with a second intent one by one to form multiple intent combinations. This process ensures that every possible dialogue path is taken into account, providing comprehensive input data for subsequent Monte Carlo simulations.
[0089] Optionally, multiple combinations of third intents are determined from the multiple third intents generated in the expansion phase, with each combination of third intents including multiple third intents. Then, each combination of third intents is paired with a second intent one by one from the multiple combinations of third intents to form multiple intent combinations.
[0090] Step S505: Perform Monte Carlo simulation based on each intention combination to determine the third score for each intention combination.
[0091] The third rating can be achieved by evaluating the effectiveness of each intent combination through simulated dialogue scenarios, reflecting the combination's performance in actual conversation. For example, the third rating may include, but is not limited to, metrics such as intent matching rate and interaction interest. In one specific embodiment, for each intent combination, the system randomly selects a path and simulates a dialogue, records user feedback, and calculates the third rating for that intent combination according to a comprehensive scoring formula. This process quantifies the value of each intent combination, providing a basis for subsequent rating allocation.
[0092] For example, based on the foregoing Figure 3 The available intent combinations include root node → query interest rate → loan interest rate type.
[0093] Simulated Dialogue: User: What's your interest rate?
[0094] System: Our loan interest rates may be adjusted due to market changes. Would you like to know the difference between fixed and floating interest rates?
[0095] User: What's the difference between a fixed interest rate and a floating interest rate?
[0096] System: Fixed interest rates remain unchanged during the loan period, suitable for stable repayment plans; floating interest rates fluctuate with market interest rates, which may be higher or lower.
[0097] System score: 10 points.
[0098] Based on the aforementioned simulated dialogue, it can be seen that the user raised in-depth questions, indicating that the path guides the user to further understand the types of interest rates, and the path's benefit is positive (high score).
[0099] Based on the foregoing Figure 3 The available intent combinations also include root node → query interest rate → preferential indicators for loan interest rates.
[0100] Simulated Dialogue: User: What is your interest rate?
[0101] System: Our current annual interest rate is as low as 4.5%, and we have many preferential offers.
[0102] User: Oh, I'm not interested in preferential indicators; I wasn't talking about the annual interest rate.
[0103] System: Our daily interest rate is 1%.
[0104] User: Sigh.
[0105] System path assessment: 3 points.
[0106] Based on the aforementioned simulated dialogue, it can be seen that the user's response was not very satisfactory, the intent recognition was low, and the path benefit was low (low score).
[0107] Optionally, a Monte Carlo simulation is performed based on each intention combination to determine a third rating for each intention combination, including: performing a Monte Carlo simulation based on each intention combination to determine multiple rating factors for each intention combination; and performing a weighted summation of the multiple rating factors for each intention combination to determine a third rating for each intention combination.
[0108] The scoring factors can be metrics used to quantitatively evaluate the performance of intent combinations from different dimensions. They can be obtained by recording user feedback and extracting relevant information during Monte Carlo simulations. For example, scoring factors may include, but are not limited to, user intent matching rate, interaction interest, information gain, path completeness, and time and cost factors. These scoring factors can comprehensively capture the performance characteristics of each intent combination in actual dialogue, providing multi-faceted data support for subsequent scoring calculations.
[0109] The third score can be a final score that quantitatively evaluates the overall performance of each intent combination. For example, this score can be derived by combining the results of multiple scoring factors. In one specific embodiment, the system performs Monte Carlo simulation for each intent combination to simulate a dialogue scenario, record user feedback, and extract the aforementioned scoring factors from multiple dimensions. For example, the system can analyze whether the user's intent was accurately identified (intent matching rate), the user's level of participation in the dialogue (interaction interest), the amount of new information provided during the dialogue (information gain), whether the dialogue path is complete and smooth (path integrity), and the time and resource consumption required to complete the dialogue (time and cost factors). In this way, the system can obtain multiple scoring factors for each intent combination, thus laying the foundation for subsequent score calculations.
[0110] For example, the evaluation criteria may be as follows: 1: User intent matching rate (Complete match: +10 points, Partial match: +5 points, No match: +0 points).
[0111] 2: User interaction interest (user asks further questions or explores in depth: +10 points; user simply confirms: +5 points; user shows no interest: +0 points).
[0112] 3: Information Gain (Providing new information that meets user needs: +10 points, providing some new information: +5 points, no actual information gain: +0 points).
[0113] 4: Path completeness (Successful completion of interaction: +10 points, incomplete interaction: +0 points).
[0114] 5: Time and cost factors (few rounds (<3 rounds): +10 points, medium number of rounds (3~5 rounds): +5 points, many rounds (>5 rounds): +0 points).
[0115] Comprehensive scoring formula: Total score = w1 * intent matching degree + w2 * user interest + w3 * information gain + w4 * path integrity + w5 * time efficiency.
[0116] The aforementioned weight values can be flexibly adjusted according to actual needs, for example, w1=0.3, w2=0.3, w3=0.2, w4=0.1, w5=0.1. Through this weighted summation method, the system can ensure that the scoring results accurately reflect the actual value of the intended combination.
[0117] As can be seen, by performing Monte Carlo simulations on each intent combination to extract multiple scoring factors, and then calculating the third score for each intent combination using a weighted summation based on these factors, the scientific rigor and accuracy of the third score can be significantly improved. Compared to single-dimensional evaluation methods, this approach can more comprehensively capture the complex relationship between user needs and system responses, thus providing a more reliable basis for the final target intent selection. Furthermore, by flexibly adjusting the weights of the scoring factors, the system can better adapt to the needs of different dialogue scenarios, further improving the accuracy of intent recognition and user experience.
[0118] Step S506: Based on the third score of each intent combination, determine the fourth score of the second intent and the first score of the third intent corresponding to each intent combination.
[0119] In this context, the fourth score of the second intention and the first score of the third intention corresponding to each intention combination can be the same score, or they can be different scores determined based on different contribution values.
[0120] Optionally, the fourth score may reflect the value of the second intention's contribution to the current intention combination, and the first score may reflect the value of the third intention's contribution to the current intention combination. For example, the fourth score may include, but is not limited to, the proportion of the second intention's dominant role in the entire combination. In one specific embodiment, the third score of each intention combination is decomposed into the contribution portions of the second and third intentions. Specifically, the fourth score is assigned based on the second intention's dominant role in the entire combination, while the remaining portion is used as the first score for the corresponding third intention. This process ensures that the scores accurately reflect the actual contribution of each intention.
[0121] It can be seen that by identifying multiple intention combinations consisting of a second intention and a single third intention to simulate the possibilities of different dialogue paths; performing Monte Carlo simulation based on each intention combination, recording user feedback, and calculating a third score using a comprehensive scoring formula; and decomposing the third score into the contributions of the second and third intentions, and determining the fourth score of the second intention and the first score of the third intention respectively, the technical effects of significantly improving scoring accuracy, enhancing the refinement of the Monte Carlo simulation stage, and clearly identifying the actual value of each intention can be achieved.
[0122] Step S507: Determine the sum of the scores between the fourth and fifth scores of the second intent corresponding to each intent combination.
[0123] The fifth score is the cumulative score recorded before the first moment of the second intention.
[0124] Step S508: Determine the first score of the second intention based on the score and the ratio between the score and the first score.
[0125] The first number represents the number of Monte Carlo simulations performed for the second intention.
[0126] The determination of the score for the aforementioned intent can be equated to the backpropagation stage in the MCTS algorithm. For each node corresponding to an intent, after completing the Monte Carlo simulation, the number of simulations needs to be updated, and the score needs to be accumulated. That is, the fourth score obtained from the current Monte Carlo simulation is accumulated based on the historical scores, and finally the average score is calculated based on the accumulated final score and the updated number of simulations.
[0127] The following is based on Figure 3 The intent tree shown is used as an example.
[0128] Current intent tree structure: Root node (loan intent identification); ├── Check loan amount (N=3, W=15, Q=5); ├── Check loan interest rates (N=4, W=20, Q=5); └── Check repayment method (N=2, W=8, Q=4).
[0129] Where N represents the number of simulations, W represents the cumulative reward, and Q represents the average reward.
[0130] The simulation results are as follows.
[0131] Simulated path: Root node → Query loan interest rate → Types of loan interest rates.
[0132] The backpropagation steps are as follows.
[0133] 1. Update node: The parameters corresponding to the "Types of Loan Interest Rates" node are: N=1, W=10, Q=10.
[0134] 2. Update the parent node, namely the "Query Loan Interest Rate" node (if there are still parent nodes, continue updating): N=5 (original value 4 increased by 1); W=30 (original value 20 increased by 10); Q=30 / 5=6 (recalculate average reward).
[0135] Updated intent tree structure: Root node (loan intent identification); ├── Check loan amount (N=3, W=15, Q=5); ├── Check loan interest rates (N=5, W=30, Q=6); │└── Types of loan interest rates (N=1, W=10, Q=10); └── Check repayment method (N=2, W=8, Q=4).
[0136] As can be seen, by feeding the scoring results from the Monte Carlo simulation phase back to the relevant nodes in the tree, and by updating the number of simulations and cumulative rewards, the tree structure and selection strategy are optimized. Ultimately, this allows the system to gradually converge to a tree structure that can better recognize user intent.
[0137] Step S509: Determine the target intent from the second intent, multiple third intents, and multiple fourth intents based on multiple first scores and the second score of each fourth intent.
[0138] It is understood that the explanations of the relevant steps in Embodiment 1 and Embodiment 2 are provided in Embodiment 1 and Embodiment 2, and will not be repeated here.
[0139] As can be seen, the intent recognition method provided in this application extracts features from the user's initial dialogue and predicts multiple first intents using a multi-label classification model. It dynamically calculates the exploration coefficient of each first intent at the first moment to adjust the balance between exploration and utilization in the MCTS algorithm. Combining the exploration coefficients, it calculates an upper confidence threshold and selects the optimal second intent. Furthermore, it expands the second intent to generate multiple third intents. Monte Carlo simulation is used to evaluate the value of the second and third intents. The target intent is determined by comprehensively considering the scores of all the aforementioned intents. Simultaneously, the simulation results are fed back to the intent tree to optimize the decision-making strategy. This method can significantly improve the accuracy and robustness of intent recognition. By dynamically adjusting the exploration coefficients and expanding the intent tree structure, this method enhances the understanding of complex user needs and optimizes the decision path through a backpropagation mechanism, thereby improving the user experience.
[0140] For embodiments consistent with those shown above, please refer to... Figure 6 , Figure 6 This application provides a functional unit block diagram of an intent recognition device, which is a server or a part of a server, as described above. Figure 6 As shown, the intent recognition device 60 includes: The first processing unit 601 is used to determine the exploration coefficient of each first intent at the first moment based on the multiple first intents corresponding to the first dialogue. The first processing unit 601 is also used to determine the upper confidence threshold corresponding to each first intent based on the exploration coefficient of each first intent; The second processing unit 602 is used to select a second intent from multiple first intents and expand the second intents to obtain multiple third intents based on the upper confidence threshold corresponding to each first intent; The third processing unit 603 is used to perform Monte Carlo simulation based on the second intention and multiple third intentions to determine the first score of the second intention and the first score of each of the multiple third intentions; The fourth processing unit 604 is configured to determine a target intent from a second intent, a plurality of third intents, and a plurality of fourth intents based on a plurality of first scores and a second score for each fourth intent; Among them, the fourth intention is the intention that is different from the second intention in the first intention, and the second score is the average score of the fourth intention recorded before the first moment.
[0141] In a feasible embodiment, in determining the exploration coefficient of each first intent at a first moment based on multiple first intents corresponding to the first dialogue, the second processing unit 602 is specifically used for: Based on the dialogue round corresponding to the first moment in the multi-turn dialogue, the behavioral entropy of the second dialogue, and the intent confidence of each first intent among the multiple first intents corresponding to the first dialogue, the exploration coefficient of each first intent is determined. The second dialogue refers to the dialogue between the user and the target user before the first moment, where the target user is the user corresponding to the first dialogue.
[0142] In a feasible embodiment, in determining the exploration coefficient of each first intention based on the dialogue turn corresponding to the first moment in a multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among multiple first intentions corresponding to the first dialogue, the second processing unit 602 is specifically used for: The first function is constructed based on the natural index and the dialogue turn corresponding to the first moment in a multi-turn dialogue. A second function is constructed based on the difference in intent confidence between the first preset value and the multiple first intents corresponding to the first dialogue. The third function is determined based on the first function, the second function, the behavioral entropy of the second dialogue, and the second preset value; Based on the preset exploration coefficients and the third function, the exploration coefficients for each first intention are determined.
[0143] In one feasible embodiment, the second processing unit 602 is further configured to: Identify the multiple fifth intentions included in the second dialogue, and the number of times each fifth intention appears in the multiple fifth intentions; The frequency of each fifth intention is determined based on the ratio between the number of times each fifth intention appears and the total number of times it appears across multiple fifth intentions. The behavioral entropy is determined based on the frequency of occurrence of each fifth intention.
[0144] In a feasible embodiment, in terms of performing Monte Carlo simulation based on a second intention and multiple third intentions to determine a first score for the second intention and a first score for each of the multiple third intentions, the third processing unit 603 is specifically configured to: Identify multiple combinations of intents, each combination including a second intent and a third intent; A Monte Carlo simulation is performed for each intention combination to determine a third score for each intention combination; Based on the third score of each intent combination, determine the fourth score of the second intent and the first score of the third intent corresponding to each intent combination; The first score of the second intention is determined based on the fourth score of the second intention corresponding to each intention combination.
[0145] In a feasible embodiment, in determining the first score of the second intent based on the fourth score of the second intent corresponding to each intent combination, the third processing unit 603 is specifically used for: Determine the sum of the fourth and fifth scores of the second intention corresponding to each intention combination, where the fifth score is the cumulative score of the second intention recorded before the first moment; The first score of the second intention is determined based on the ratio between the score and the first number, where the first number is the number of Monte Carlo simulations of the second intention.
[0146] In one feasible embodiment, in the aspect of performing Monte Carlo simulation based on each intention combination to determine a third score for each intention combination, the third processing unit 603 is specifically configured to: Monte Carlo simulations were performed for each intention combination to determine multiple rating factors for each intention combination. The third score for each intent combination is determined by weighted summation of multiple rating factors.
[0147] It is understood that since the method embodiments and the device embodiments are different presentations of the same technical concept, the content of the method embodiment section in this application should be adapted to the device embodiment section in a synchronous manner, and will not be repeated here.
[0148] When using integrated units, such as Figure 7 As shown, Figure 7 This is a block diagram of the functional units of another intent recognition device 60 provided in an embodiment of this application. Figure 7 In this document, the intent recognition device 60 includes a processing module 712 and a communication module 711. The processing module 712 controls and manages the actions of the intent recognition device 60, such as the steps of the first processing unit 601, the second processing unit 602, the third processing unit 603, and the fourth processing unit 604, and / or other processes for executing the techniques described herein. The communication module 711 supports interaction between the intent recognition device 60 and other devices. Figure 7 As shown, the intent recognition device 60 may further include a storage module 713, which is used to store the program code and data of the intent recognition device 60.
[0149] The processing module 712 can be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication module 711 can be a transceiver, RF circuitry, or a communication interface, etc. The storage module 713 can be a memory.
[0150] All relevant content in each scenario involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here. The above-mentioned intent recognition device 60 can all execute the above-mentioned... Figure 2 The intent recognition method shown.
[0151] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0152] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 800 may include one or more of the following components: processor 801, memory 802 and communication interface 803. The processor 801, memory 802 and communication interface 803 are interconnected and perform communication between them. The memory 802 may store one or more computer programs, which may be configured to implement the methods described in the above embodiments when executed by one or more processors 801.
[0153] Processor 801 may include one or more processing cores. Processor 801 connects to various parts within the electronic device 800 using various interfaces and lines, and performs various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets, or instruction sets stored in memory 802, and by calling data stored in memory 802. Optionally, processor 801 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 801 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. It is understood that the aforementioned modem may also not be integrated into processor 801, but may be implemented separately through a communication chip.
[0154] The memory 802 may include random access memory (RAM) or read-only memory (ROM). The memory 802 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 802 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described above. The data storage area may also store data created by the electronic device 800 during use.
[0155] It is understood that the electronic device 800 may include more or fewer structural elements than those shown in the above block diagram, such as a power module, physical buttons, WiFi (Wireless Fidelity) module, speaker, Bluetooth module, sensor, etc., without limitation.
[0156] The aforementioned electronic device 800 may be a server or a part of a server.
[0157] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements some or all of the steps of any of the vehicle control unit diagnostic methods described in the above method embodiments.
[0158] This application also provides a computer program product, including a computer program that, when executed by a processor, implements some or all of the steps of any of the automotive control unit diagnostic methods described in the above method embodiments. This computer program product can be a software installation package.
[0159] It should be noted that, for the sake of simplicity, each of the aforementioned embodiments of the intent recognition method is described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.
[0160] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce a good effect.
[0161] Those skilled in the art will understand that all or part of the steps in the various method embodiments of any of the above-described intent recognition methods can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0162] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the intent recognition method, apparatus, electronic device, and storage medium of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas of this application. At the same time, for those skilled in the art, based on the ideas of the intent recognition method, apparatus, electronic device, and storage medium of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
[0163] This application is described with reference to flowchart illustrations and / or block diagrams of methods, hardware products, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0165] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0166] It is understood that any product that is controlled or configured to perform the processing method of the flowchart described in the method embodiment of the intent recognition method of this application, such as the terminal and computer program product of the above flowchart, falls within the scope of the related products described in this application.
[0167] Obviously, those skilled in the art can make various modifications and variations to the intent identification method, apparatus, electronic device, and storage medium provided in this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. An intent recognition method, characterized in that, The method includes: Based on the multiple first intentions corresponding to the first dialogue, determine the exploration coefficient of each first intention at the first moment; The upper confidence threshold corresponding to each first intention is determined based on the exploration coefficient of each first intention; Based on the upper confidence threshold corresponding to each first intent, a second intent is selected from the plurality of first intents and expanded to obtain a plurality of third intents; Monte Carlo simulation is performed based on the second intention and the plurality of third intentions to determine a first score for the second intention and a first score for each of the plurality of third intentions; Based on multiple first scores and a second score for each fourth intent, a target intent is determined from the second intent, multiple third intents, and multiple fourth intents; Wherein, the fourth intention is an intention that is different from the second intention in the first intention, and the second rating is the average rating of the fourth intention recorded before the first moment.
2. The method according to claim 1, characterized in that, The step of determining the exploration coefficient of each first intent at the first moment based on multiple first intents corresponding to the first dialogue includes: The exploration coefficient of each first intention is determined based on the dialogue round corresponding to the first moment in the multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among the multiple first intentions corresponding to the first dialogue. The second dialogue refers to a dialogue between a user and a target user prior to the first moment, where the target user is the user corresponding to the first dialogue.
3. The method according to claim 2, characterized in that, The step of determining the exploration coefficient of each first intention based on the dialogue turn corresponding to the first moment in a multi-turn dialogue, the behavioral entropy of the second dialogue, and the intention confidence of each first intention among multiple first intentions corresponding to the first dialogue includes: A first function is constructed based on the natural index and the dialogue turn corresponding to the first moment in the multi-turn dialogue. A second function is constructed based on the difference in intent confidence between the first preset value and the multiple first intents corresponding to the first dialogue. The third function is determined based on the first function, the second function, the behavioral entropy of the second dialogue, and the second preset value; The exploration coefficient for each first intention is determined based on the preset exploration coefficient and the third function.
4. The method according to claim 2 or 3, characterized in that, The method further includes: Determine the plurality of fifth intentions included in the second dialogue, and the number of times each of the plurality of fifth intentions appears; The frequency of occurrence of each fifth intention is determined based on the ratio between the number of occurrences of each fifth intention and the total number of occurrences corresponding to the plurality of fifth intentions; The behavioral entropy is determined based on the frequency of occurrence of each fifth intention.
5. The method according to claim 1, characterized in that, The step of performing a Monte Carlo simulation based on the second intention and the plurality of third intentions to determine a first score for the second intention and a first score for each of the plurality of third intentions includes: Multiple intent combinations are identified, each intent combination including the second intent and the third intent; A Monte Carlo simulation is performed based on each intention combination to determine a third score for each intention combination; Based on the third score of each intention combination, determine the fourth score of the second intention and the first score of the third intention corresponding to each intention combination; Based on the fourth score of the second intent corresponding to each intent combination, the first score of the second intent is determined.
6. The method according to claim 5, characterized in that, The determination of the first score of the second intent based on the fourth score of the second intent corresponding to each intent combination includes: Determine the sum of the fourth and fifth scores of the second intent corresponding to each intent combination, wherein the fifth score is the cumulative score of the second intent recorded before the first moment; A first score for the second intention is determined based on the ratio between the score and the first number, where the first number is the number of Monte Carlo simulations of the second intention.
7. The method according to claim 5, characterized in that, The step of performing a Monte Carlo simulation based on each intention combination to determine a third score for each intention combination includes: Monte Carlo simulation is performed based on each intention combination to determine multiple rating factors for each intention combination; The third score for each intention combination is determined by weighted summation of multiple scoring factors.
8. An intent recognition device, characterized in that, The device includes: The first processing unit is used to determine the exploration coefficient of each first intent at the first moment based on the multiple first intents corresponding to the first dialogue; The first processing unit is further configured to determine the upper confidence threshold corresponding to each first intention based on the exploration coefficient of each first intention; The second processing unit is configured to select a second intent from the plurality of first intents and expand the second intents to obtain a plurality of third intents based on the upper confidence threshold value corresponding to each first intent; The third processing unit is configured to perform Monte Carlo simulation based on the second intention and the plurality of third intentions, and determine a first score for the second intention and a first score for each of the plurality of third intentions; The fourth processing unit is configured to determine a target intent from the second intent, the plurality of third intents, and the plurality of fourth intents based on the plurality of first scores and the second score of each fourth intent; Wherein, the fourth intention is an intention that is different from the second intention in the first intention, and the second rating is the average rating of the fourth intention recorded before the first moment.
9. An electronic device, the device comprising a processor, a memory, and executable program code stored in the memory, characterized in that, The processor is configured to retrieve the executable program code stored in the memory to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for selecting decision
CN114615680A
Large-scale data generation method, device and equipment
CN119883657A