Text information intention determination method and device, computer equipment and storage medium
By identifying and analyzing the probability of matching preset entities and intentions in user text information, the problem of difficulty in quickly and accurately determining customer intentions is solved, and the response speed and quality of customer service is improved.
Patent Information
- Application Number
- CN202411554207.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
In the modern customer service field, customer service agents face the problem of how to quickly and accurately determine the intentions expressed by customers in text information, resulting in limited response speed and service quality.
By obtaining user text information, identifying preset entities therein, calculating their matching probability relative to each preset intention, and classifying the text information into first text information or second text information according to classification confidence, thereby determining its target intention .
This method reduces the amount of calculations for determining target intentions and improves the accuracy of intention recognition, especially when the probability of matching is unclear.
Smart Images

Figure CN119474376A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method, apparatus, computer device and storage medium for determining the intent of text information. Background Art
[0002] In the field of modern customer service, customer service agents are an important bridge for communication between enterprises and customers. Customer service agents need to interact directly with customers and ensure that every contact can achieve the best results with limited resources. However, faced with the growing number of customer consultations, the limited number of customer service agents has become a major challenge in improving service quality. How to determine the intentions expressed by customers in text messages, thereby improving the response speed and service quality of customer service agents, and enabling customer service agents to focus more on providing personalized and high-quality services has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of the present application is to provide a method, device, equipment and computer storage medium for determining the intent of text information, aiming to determine the intent of the text information based on its content.
[0004] In a first aspect, the present application provides a method for determining the intent of a text message, the method comprising the following steps:
[0005] Acquire user text information, and identify a preset entity in the user text information to obtain a target preset entity in the user text information;
[0006] Determining the matching probability of the user text information relative to each preset intention according to the target preset entity;
[0007] Calculating the classification confidence of the user text information according to the matching probability, and determining the user text information as the first text information or the second text information according to the classification confidence;
[0008] determining the target intent of the first text information according to the matching probability; or
[0009] Performing named entity recognition on the second text information to obtain a target named entity in the user text information;
[0010] According to the target preset entity and the target named entity in the second text information, the second text information is matched with the intent to obtain the target intent of the second text information.
[0011] In a second aspect, the present application further provides a device for determining the intent of text information, the device for determining the intent of text information comprising:
[0012] A first entity recognition module, used to obtain user text information, and recognize a preset entity in the user text information to obtain a target preset entity in the user text information;
[0013] A matching probability calculation module, used to determine the matching probability of the user text information relative to each preset intention according to the target preset entity;
[0014] A preset intention matching module is used to calculate the classification confidence of the user text information according to the matching probability, and determine the user text information as the first text information or the second text information according to the classification confidence;
[0015] A first intention determination module, used to determine the target intention of the first text information according to the matching probability;
[0016] A second entity recognition module, configured to perform named entity recognition on the second text information to obtain a target named entity in the user text information;
[0017] The second intention determination module is used to perform intention matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intention of the second text information.
[0018] In a third aspect, the present application also provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the method for determining the intent of text information as described above is implemented.
[0019] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for determining the intent of text information as described above is implemented.
[0020] The present application provides a method, device, equipment and computer storage medium for determining the intention of text information. The present application obtains user text information and identifies preset entities in the user text information to obtain target preset entities in the user text information; determines the matching probability of the user text information relative to each preset intention according to the target preset entity; calculates the classification confidence of the user text information according to the matching probability, and determines the user text information as the first text information or the second text information according to the classification confidence; determines the target intention of the first text information according to the matching probability; or performs named entity recognition on the second text information to obtain the target named entity in the user text information; performs intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intention of the second text information. Since the user text information is analyzed for intention according to the size of the classification confidence, the calculation amount of determining the target intention of the first text information is reduced, and the accuracy of determining the target intention of the second text information is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A flowchart of a method for determining the intent of text information provided by an embodiment of the present application;
[0023] Figure 2 A usage scenario diagram of a method for determining the intent of text information provided in one embodiment of the present application;
[0024] Figure 3 A schematic block diagram of a device for determining the intent of text information provided by an embodiment of the present application;
[0025] Figure 4 The present invention is a block diagram showing the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0028] Embodiments of the present application provide a method, apparatus, computer device, and computer-readable storage medium for determining the intent of text information.
[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0030] Please refer to Figure 1 , Figure 1 A flow chart of a method for determining the intent of a text message provided in an embodiment of the present application. The method for determining the intent of a text message can be used in a terminal or a server to analyze the target intent expressed by the user's text message. The terminal can be an electronic device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device; the server can be an independent server, a server cluster, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0031] Please refer to Figure 2 , Figure 2 This is a usage scenario diagram provided by an embodiment of the present application. Figure 2 As shown, the terminal or the server can obtain the user text information output by the user, and classify the user text information into two types of first text information and second text information that determine the target intention by different methods.
[0032] like Figure 1 As shown, the method for determining the intention of text information includes steps S101 to S106.
[0033] Step S101: Obtain user text information, and identify preset entities in the user text information to obtain target preset entities in the user text information.
[0034] Exemplarily, user text information is obtained in the process of contacting the user, which can be through a voice call with the user through an artificial intelligence based on voice output or a real customer service agent, and converting the user's voice information into text information; or it can be directly contacting the user by sending text and then obtaining the text output by the user, which is not limited here.
[0035] Exemplarily, named entities that may be involved in the user's conversation are pre-set, such as the name of a product. Taking the customer service seat of an insurance company as an example, the name of the company's insurance type can be used as a preset entity, and the preset entity is matched in the user's text information to obtain the target preset entity contained in the target text information. Of course, it is not limited to this. The preset entity can also include the name of a competitor, a place name, etc., which are not limited here.
[0036] Step S102: determining the matching probability of the user text information relative to each preset intention according to the target preset entity.
[0037] For example, during the communication between the customer service agent and the user, the customer service agent needs to remember a large amount of information to meet the user's needs. In order to reduce the amount of relevant information that the customer service agent has to remember, the target intent of the user's text information can be identified in real time during the communication process, so that the corresponding information prompts can be displayed to the customer service agent according to the target intent. Therefore, it is necessary to set multiple preset intents and corresponding prompt information. The content of the preset intent is not limited here, for example, it can be consulting information for different products, claim services, policy changes, complaint feedback, etc.
[0038] Exemplarily, a multi-classification task can be performed through a convolutional neural network to match user text information with each preset intent, and determine the matching probability between the user text information and each preset intent. Specifically, a softmax layer for determining the probability distribution can be set in the output layer of the convolutional neural network. The softmax layer can convert the output of the neurons corresponding to each preset intent in the convolutional neural network into a probability distribution, where the preset intent corresponding to the neuron with the largest classification probability is the most likely matching result.
[0039] In some implementations, before determining the matching probability of the user text information with respect to each preset intention according to the target preset entity, the method further includes:
[0040] Acquire text sample information, and extract entity sample information from the text sample information;
[0041] According to the entity sample information, clustering processing is performed on the text sample information to obtain at least one preset category;
[0042] Obtain the intent label corresponding to each of the preset categories to obtain at least one of the preset intents.
[0043] For example, in order to ensure that the setting of the preset intent can cover the actual needs of users for consulting customer service agents, the preset intent can be set by clustering text sample information obtained from historical communications.
[0044] Specifically, the preset entities in the text sample information are identified as entity sample information, and the text sample information is clustered based on the entity sample information based on the k-means clustering algorithm to determine the boundaries between different preset categories. After the preset categories are determined, the text sample information in each preset category can be checked by staff or artificial intelligence, and intent labels and corresponding prompt information can be set for each preset category.
[0045] Step S103: Calculate the classification confidence of the user text information according to the matching probability, and determine the user text information as the first text information or the second text information according to the classification confidence.
[0046] Exemplarily, the matching probability can usually reflect the probability that the preset intent is the target intent of the user text information. However, if the preset intent with the highest matching probability is directly used as the target intent, when the matching probabilities are not much different, the target intent may be inaccurate. Therefore, in the method for determining the intention of text information provided in an embodiment of the present application, before determining the target intent based on the matching probability, the classification confidence is first calculated based on the matching probability, and the user text information is classified based on the classification confidence. Among them, the first text information represents user text information that can directly determine the target intent based on the matching probability, and the second text information represents user text information that may have a lower accuracy rate in directly determining the target intent based on the matching probability.
[0047] In some implementations, the calculating the classification confidence of the user text information according to the matching probability, and determining the user text information as the first text information or the second text information according to the classification confidence, includes:
[0048] Determine the classification confidence according to at least one of the maximum probability value of the matching probability, the probability distribution information entropy, and the probability standard deviation;
[0049] The user text information is determined as the first text information or the second text information according to the classification confidence and a preset confidence threshold.
[0050] For example, in the probability distribution of Softmax output, the category corresponding to the maximum probability value is usually considered to be the prediction result of the model. Therefore, the maximum probability value in the matching probability can be regarded as the confidence of the model in the matching result. The closer the maximum probability value is to 1, the more confident the model is in the matching result. The maximum probability value has a positive correlation with the classification confidence.
[0051] For example, information entropy is an indicator to measure the uncertainty of probability distribution. In classification problems, if the probability distribution of Softmax output is concentrated on a certain category, then the entropy will be very low, indicating that the model's prediction is very certain; on the contrary, if the probability distribution is relatively uniform, the entropy will be very high, indicating that the model's prediction uncertainty is large. The information entropy of probability distribution has a negative correlation with the classification confidence.
[0052] For example, the standard deviation of the probability distribution can also reflect the confidence of the model. The smaller the standard deviation, the more concentrated the probability distribution and the higher the confidence of the model. The larger the standard deviation, the more dispersed the probability distribution and the lower the confidence of the model. The probability standard deviation has a negative correlation with the classification confidence.
[0053] Exemplarily, the classification confidence may be determined based on one or more of the maximum probability value, the probability distribution information entropy, and the probability standard deviation, such as taking a weighted average of two or three of them, but is certainly not limited thereto and is not limited here.
[0054] In some implementations, determining the user text information as the first text information or the second text information according to the classification confidence and a preset confidence threshold includes:
[0055] Determining the user text information whose classification confidence is greater than the confidence threshold as the first text information;
[0056] The user text information whose classification confidence is less than or equal to the confidence threshold is determined as the second text information.
[0057] Exemplarily, if the classification confidence of the user text information is greater than a preset confidence threshold, indicating that the target intent of the user text information can be directly determined through the matching probability, the user text information is classified as the first text information; conversely, if the classification confidence of the user text information is less than or equal to the preset confidence threshold, the user text information is classified as the second text information, and further analysis is required to determine the accurate target intent.
[0058] Step S104: Determine the target intent of the first text information according to the matching probability.
[0059] Exemplarily, for the first text information, since the matching probability has a greater classification confidence, the target intent of the user text information can be directly determined from the preset intents through the matching probability.
[0060] In some implementations, determining the target intent of the first text information according to the matching probability includes:
[0061] The preset intention with the highest matching probability is determined as the target intention of the first text information.
[0062] Exemplarily, the size of the matching probability corresponding to the preset intent reflects the probability size of it as the target intent of the user text information. Therefore, for the first text information, the preset intent with the highest matching probability is directly determined as the target intent.
[0063] Step S105: Perform named entity recognition on the second text information to obtain a target named entity in the user text information.
[0064] Exemplarily, in order to improve the accuracy of intent recognition for the second text information, named entity recognition is performed on the second text information to identify named entities that may exist in the second text information in addition to the target preset entity in step 101, avoid missing entity information in the second text information, and increase the basis for intent recognition.
[0065] In some implementations, performing named entity recognition on the second text information to obtain a target named entity in the user text information includes:
[0066] Inputting the second text information into a preset bidirectional long short-term memory network to obtain context information of the second text information;
[0067] The context information is input into a conditional random field layer, and a target named entity output by the conditional random field layer is obtained.
[0068] For example, a bidirectional long short-term memory network (LSTM) is a special recurrent neural network that can learn and remember long-distance dependencies, which makes it very suitable for processing sequence data, such as capturing contextual information between words in user text information. Conditional random field (CRF) is a sequence modeling tool that can define the conditional probability distribution of a set of output random variables and assume that the output random variables constitute a Markov random field. The CRF layer can receive the output of the LSTM layer and learn the transition probability between labels to optimize the label assignment of the entire sequence and output the target named entity identified in the user text information.
[0069] Step S106: perform intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intent of the second text information.
[0070] Exemplarily, the target intent of the second text information is determined based on the target preset entity identified in step S101 and the target named entity identified in step S105. In this way, only the second text information needs to be processed by steps S105 and S106, which reduces the amount of calculation of the text information intent determination method for the first text information and improves the accuracy of intent recognition of the second text information.
[0071] In some implementations, performing intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intent of the second text information includes:
[0072] Get the preset category corresponding to each preset intent;
[0073] Based on the preset categories, determining the similarity between the second text information and each preset category according to the target preset entity and the target named entity in the second text information, and determining the target category to which the second text information belongs according to the similarity;
[0074] The preset intention corresponding to the target category is determined as the target intention of the second text information.
[0075] Exemplarily, the preset categories are the categories obtained by reducing the clustering processing of the text sample information, wherein the preset categories include multiple text sample information, and the target category with the highest similarity to the second text information is determined by calculating the similarity between the target preset entity and the target named entity in the second text information and the text sample information in each preset category, and the intent label corresponding to the target category is determined as the target intent of the second text information, wherein the similarity can be the cosine similarity with the text sample information in the preset category, but of course it is not limited to this and is not limited here.
[0076] The method for determining the intention of text information provided in the above embodiment obtains user text information and identifies preset entities in the user text information to obtain target preset entities in the user text information; determines the matching probability of the user text information relative to each preset intention according to the target preset entity; calculates the classification confidence of the user text information according to the matching probability, and determines the user text information as the first text information or the second text information according to the classification confidence; determines the target intention of the first text information according to the matching probability; or performs named entity recognition on the second text information to obtain the target named entity in the user text information; performs intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intention of the second text information. Since the user text information is analyzed for intention according to the size of the classification confidence, the amount of calculation for determining the target intention of the first text information is reduced, and the accuracy of determining the target intention of the second text information is improved.
[0077] See also Figure 3 , Figure 3 It is a schematic diagram of a text message intent determination device provided in one embodiment of the present application. The text message intent determination device can be configured in a server or a terminal to execute the aforementioned text message intent determination method.
[0078] like Figure 3 As shown, the device for determining the intention of text information includes: a first entity recognition module 110, a matching probability calculation module 120, a preset intention matching module 130, a first intention determination module 140, a second entity recognition module 150, and a second intention determination module 160.
[0079] The first entity recognition module 110 is used to obtain user text information and recognize a preset entity in the user text information to obtain a target preset entity in the user text information;
[0080] A matching probability calculation module 120, configured to determine the matching probability of the user text information relative to each preset intention according to the target preset entity;
[0081] A preset intention matching module 130 is used to calculate the classification confidence of the user text information according to the matching probability, and determine the user text information as the first text information or the second text information according to the classification confidence;
[0082] A first intention determination module 140, configured to determine a target intention of the first text information according to the matching probability;
[0083] A second entity recognition module 150, configured to perform named entity recognition on the second text information to obtain a target named entity in the user text information;
[0084] The second intention determination module 160 is used to perform intention matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intention of the second text information.
[0085] In some embodiments, the preset intention matching module 130 is used, in the process of calculating the classification confidence of the user text information according to the matching probability and determining the user text information as the first text information or the second text information according to the classification confidence:
[0086] Determine the classification confidence according to at least one of the maximum probability value of the matching probability, the probability distribution information entropy, and the probability standard deviation;
[0087] The user text information is determined as the first text information or the second text information according to the classification confidence and a preset confidence threshold.
[0088] In some embodiments, the preset intention matching module 130 is used, in the process of determining the user text information as the first text information or the second text information according to the classification confidence and the preset confidence threshold, to:
[0089] Determining the user text information whose classification confidence is greater than the confidence threshold as the first text information;
[0090] The user text information whose classification confidence is less than or equal to the confidence threshold is determined as the second text information.
[0091] In some embodiments, the first intention determination module 140, in the process of determining the target intention of the first text information according to the matching probability, is used to:
[0092] The preset intention with the highest matching probability is determined as the target intention of the first text information.
[0093] In some embodiments, the second entity recognition module, in the process of performing named entity recognition on the second text information to obtain a target named entity in the user text information, is used to:
[0094] Inputting the second text information into a preset bidirectional long short-term memory network to obtain context information of the second text information;
[0095] The context information is input into a conditional random field layer, and a target named entity output by the conditional random field layer is obtained.
[0096] In some embodiments, the second intent determination module 160, in the process of performing intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intent of the second text information, is used to:
[0097] Get the preset category corresponding to each preset intent;
[0098] Based on the preset categories, determining the similarity between the second text information and each preset category according to the target preset entity and the target named entity in the second text information, and determining the target category to which the second text information belongs according to the similarity;
[0099] Determine the preset intent corresponding to the target category as the target intent of the second text information
[0100] In some embodiments, before determining the matching probability of the user text information with respect to each preset intention according to the target preset entity, the text information intention determination device is used to:
[0101] Acquire text sample information, and extract entity sample information from the text sample information;
[0102] According to the entity sample information, clustering processing is performed on the text sample information to obtain at least one preset category;
[0103] Obtain the intent label corresponding to each of the preset categories to obtain at least one of the preset intents.
[0104] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0105] The method and apparatus of the present application can be used in many general or special computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0106] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in Figure 4 Runs on the computer device shown.
[0107] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.
[0108] like Figure 4 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and an internal memory.
[0109] The storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the methods for determining the intention of text information.
[0110] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0111] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any method for determining the intention of text information.
[0112] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0113] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0114] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0115] Acquire user text information, and identify a preset entity in the user text information to obtain a target preset entity in the user text information;
[0116] Determining the matching probability of the user text information relative to each preset intention according to the target preset entity;
[0117] Calculating the classification confidence of the user text information according to the matching probability, and determining the user text information as the first text information or the second text information according to the classification confidence;
[0118] determining the target intent of the first text information according to the matching probability; or
[0119] Performing named entity recognition on the second text information to obtain a target named entity in the user text information;
[0120] According to the target preset entity and the target named entity in the second text information, the second text information is matched with the intent to obtain the target intent of the second text information.
[0121] In some embodiments, the processor, in the process of calculating the classification confidence of the user text information according to the matching probability and determining the user text information as the first text information or the second text information according to the classification confidence, is used to implement:
[0122] Determine the classification confidence according to at least one of the maximum probability value of the matching probability, the probability distribution information entropy, and the probability standard deviation;
[0123] The user text information is determined as the first text information or the second text information according to the classification confidence and a preset confidence threshold.
[0124] In some embodiments, the processor, in the process of determining the user text information as the first text information or the second text information according to the classification confidence and the preset confidence threshold, is used to implement:
[0125] Determining the user text information whose classification confidence is greater than the confidence threshold as the first text information;
[0126] The user text information whose classification confidence is less than or equal to the confidence threshold is determined as the second text information.
[0127] In some embodiments, the processor, in the process of determining the target intent of the first text information according to the matching probability, is used to implement:
[0128] Determine the preset intent with the highest matching probability as the target intent of the first text information
[0129] In some embodiments, the processor, in the process of performing named entity recognition on the second text information to obtain a target named entity in the user text information, is used to implement:
[0130] Inputting the second text information into a preset bidirectional long short-term memory network to obtain context information of the second text information;
[0131] The context information is input into a conditional random field layer, and a target named entity output by the conditional random field layer is obtained.
[0132] In some embodiments, the processor, in the process of performing intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intent of the second text information, is used to implement:
[0133] Get the preset category corresponding to each preset intent;
[0134] Based on the preset categories, determining the similarity between the second text information and each preset category according to the target preset entity and the target named entity in the second text information, and determining the target category to which the second text information belongs according to the similarity;
[0135] The preset intention corresponding to the target category is determined as the target intention of the second text information.
[0136] In some embodiments, before implementing the method of determining the matching probability of the user text information relative to each preset intention according to the target preset entity, the processor is used to implement:
[0137] Acquire text sample information, and extract entity sample information from the text sample information;
[0138] According to the entity sample information, clustering processing is performed on the text sample information to obtain at least one preset category;
[0139] Obtain the intent label corresponding to each of the preset categories to obtain at least one of the preset intents.
[0140] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of determining the intention of the text information described above can refer to the corresponding process in the aforementioned text information intention determination control method embodiment, and will not be repeated here.
[0141] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the various embodiments of the method for determining the intention of the text information of the present application.
[0142] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0143] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0144] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0145] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for determining the intention of text information, characterized in that: The method comprises: Acquire user text information, and identify a preset entity in the user text information to obtain a target preset entity in the user text information; Determining the matching probability of the user text information relative to each preset intention according to the target preset entity; Calculating the classification confidence of the user text information according to the matching probability, and determining the user text information as the first text information or the second text information according to the classification confidence; determining the target intent of the first text information according to the matching probability; or Performing named entity recognition on the second text information to obtain a target named entity in the user text information; According to the target preset entity and the target named entity in the second text information, the second text information is matched with the intent to obtain the target intent of the second text information.
2. The method for determining the intention of text information according to claim 1, characterized in that: The calculating the classification confidence of the user text information according to the matching probability, and determining the user text information as the first text information or the second text information according to the classification confidence, includes: Determine the classification confidence according to at least one of the maximum probability value of the matching probability, the probability distribution information entropy, and the probability standard deviation; The user text information is determined as the first text information or the second text information according to the classification confidence and a preset confidence threshold.
3. The method for determining the intention of text information according to claim 2, characterized in that: The step of determining the user text information as the first text information or the second text information according to the classification confidence and a preset confidence threshold includes: Determining the user text information whose classification confidence is greater than the confidence threshold as the first text information; The user text information whose classification confidence is less than or equal to the confidence threshold is determined as the second text information.
4. The method for determining the intention of text information according to claim 1, characterized in that: The determining the target intent of the first text information according to the matching probability includes: The preset intention with the highest matching probability is determined as the target intention of the first text information.
5. The method for determining the intention of text information according to claim 1, characterized in that: The performing named entity recognition on the second text information to obtain a target named entity in the user text information includes: Inputting the second text information into a preset bidirectional long short-term memory network to obtain context information of the second text information; The context information is input into a conditional random field layer, and a target named entity output by the conditional random field layer is obtained.
6. The method for determining the intention of text information according to claim 1, characterized in that: The performing intent matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intent of the second text information includes: Get the preset category corresponding to each preset intent; Based on the preset categories, determining the similarity between the second text information and each preset category according to the target preset entity and the target named entity in the second text information, and determining the target category to which the second text information belongs according to the similarity; The preset intention corresponding to the target category is determined as the target intention of the second text information.
7. The method for determining the intention of text information according to claim 1, characterized in that: Before determining the matching probability of the user text information with respect to each preset intention according to the target preset entity, the method further includes: Acquire text sample information, and extract entity sample information from the text sample information; According to the entity sample information, clustering processing is performed on the text sample information to obtain at least one preset category; Obtain the intent label corresponding to each of the preset categories to obtain at least one of the preset intents.
8. A device for determining the intention of text information, characterized in that: The text information intention determination device comprises: A first entity recognition module, used to obtain user text information, and recognize a preset entity in the user text information to obtain a target preset entity in the user text information; A matching probability calculation module, used to determine the matching probability of the user text information relative to each preset intention according to the target preset entity; A preset intention matching module is used to calculate the classification confidence of the user text information according to the matching probability, and determine the user text information as the first text information or the second text information according to the classification confidence; A first intention determination module, used to determine the target intention of the first text information according to the matching probability; A second entity recognition module, configured to perform named entity recognition on the second text information to obtain a target named entity in the user text information; The second intention determination module is used to perform intention matching on the second text information according to the target preset entity and the target named entity in the second text information to obtain the target intention of the second text information.
9. A computer device, characterized in that: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method for determining the intention of text information according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for determining the intention of text information according to any one of claims 1 to 7 are implemented.