WO2022048173A1 - 基于人工智能的客户意图识别方法、装置、设备及介质 - Google Patents

基于人工智能的客户意图识别方法、装置、设备及介质 Download PDF

Info

Publication number
WO2022048173A1
WO2022048173A1 PCT/CN2021/091339 CN2021091339W WO2022048173A1 WO 2022048173 A1 WO2022048173 A1 WO 2022048173A1 CN 2021091339 W CN2021091339 W CN 2021091339W WO 2022048173 A1 WO2022048173 A1 WO 2022048173A1
Authority
WO
WIPO (PCT)
Prior art keywords
intent
scene
recognition model
information
data
Prior art date
Application number
PCT/CN2021/091339
Other languages
English (en)
French (fr)
Inventor
陆凯
赵知纬
杨静远
高维国
黄海龙
刘广
毛宇兆
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022048173A1 publication Critical patent/WO2022048173A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present application relates to the technical field of artificial intelligence, and belongs to the application scenario of customer intention identification in smart cities, and in particular, relates to a method, device, equipment and medium for customer intention identification based on artificial intelligence.
  • enterprises can build intelligent interaction processing systems based on artificial intelligence. For example, they can provide services to customers by using the built intelligent interaction system as a customer intent recognition system.
  • the recognition system receives the information to be identified sent by the customer, performs intention recognition to obtain the specific intention of the customer, and performs subsequent processing based on the customer's intention, such as feeding back answer information corresponding to the customer's intention, and executing business operations corresponding to the customer's intention.
  • the business system contains a large number of business scenarios, and each business scenario involves multiple alternative intents.
  • Embodiments of the present application provide an artificial intelligence-based customer intent identification method, device, device, and medium, which aim to solve the problem of low identification accuracy in the customer intent identification system constructed by the prior art method.
  • an embodiment of the present application provides a method for identifying customer intent based on artificial intelligence, which includes:
  • the intent recognition model matched with each scene is trained to obtain a trained intent recognition model matched with each scene;
  • the information to be identified is identified according to the conversion dictionary and the intent recognition model matching the information to be identified, so as to obtain the information matching the information to be identified.
  • An intent category is
  • an embodiment of the present application provides an artificial intelligence-based device for identifying customer intent, including:
  • the model pre-training unit is used to receive the training data set input by the user, and pre-train the pre-stored recognition template according to the corpus data contained in each scene in the training data set, the preset conversion dictionary and the preset pre-training rules, Obtain a recognition model matching each scene;
  • an identification model configuration unit configured to configure the intent category information of the identification model according to the annotation data contained in each scene in the training data set, to obtain an intent identification model matching each scene;
  • the intent recognition model training unit is used to train the intent recognition model matched with each scene according to the labeling data contained in each scene in the training data set and the conversion dictionary, and obtain a post-training model that matches each scene.
  • the intent identification unit is configured to identify the information to be identified according to the conversion dictionary and the intent identification model matching the information to be identified, to obtain the information to be identified, if the information to be identified is received from the client. An intent category that matches the information to be identified.
  • an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer During the program, the artificial intelligence-based customer intention identification method described in the first aspect above is implemented.
  • an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when executed by a processor, the computer program causes the processor to execute the above-mentioned first step.
  • the artificial intelligence-based customer intent recognition method is described.
  • Embodiments of the present application provide a method, apparatus, device, and medium for identifying customer intent based on artificial intelligence.
  • the recognition template is pre-trained according to the corpus data, conversion dictionary and pre-training rules contained in each scene in the training data set input by the user to obtain a recognition model matching each scene;
  • the intent category information of the recognition model is configured to obtain an intent recognition model that matches each scene; the intent recognition model that matches each scene is trained according to the annotation data and conversion dictionary contained in each scene to obtain the trained intent recognition model. model; identify the information to be identified according to the conversion dictionary and the intent identification model matching the information to be identified, to obtain an intent category matching the information to be identified.
  • the recognition template is pre-trained by the massive corpus data contained in each scene in the training data set to obtain the recognition model corresponding to each scene, which improves the adaptability of the recognition model to the language environment of the specific scene.
  • the matching intent recognition model can identify the intent of the information to be identified, which can greatly improve the accuracy of identifying customer intent.
  • FIG. 1 is a schematic flowchart of a method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application scenario of the artificial intelligence-based customer intent identification method provided by the embodiment of the present application;
  • FIG. 3 is a schematic sub-flow diagram of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of another sub-flow of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application;
  • FIG. 5 is a schematic diagram of another sub-flow of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application;
  • FIG. 6 is a schematic diagram of another sub-flow of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application;
  • FIG. 7 is a schematic diagram of another sub-flow of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another sub-flow of the method for identifying customer intent based on artificial intelligence provided by an embodiment of the present application.
  • FIG. 9 is a schematic block diagram of an apparatus for identifying customer intent based on artificial intelligence provided by an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of an artificial intelligence-based customer intent identification method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an application scenario of the artificial intelligence-based client intent identification method provided by an embodiment of the present application.
  • This artificial intelligence-based client intention identification method is applied in the management server 10, the method is executed by the application software installed in the management server 10, and the client 20 realizes the transmission of data information by establishing a network connection with the management server 10,
  • the management server 10 is the server end used to identify the information to be identified from the client, and the client 20 is the terminal device for the client to send the information to be identified to the management server, such as a desktop computer, a laptop computer, a tablet computer or a mobile phone Wait.
  • the method includes steps S110-S140.
  • the training data set input by the user, and pre-train the pre-stored recognition template according to the corpus data contained in each scene in the training data set, the preset conversion dictionary and the preset pre-training rules, and obtain matching with each scene.
  • recognition model The user may be the administrator of the management server, the pre-training rules include proportional values, loss function calculation formulas and gradient calculation formulas, the pre-training rules are the rule information for pre-training the recognition templates, and the recognition templates are pre-stored
  • the recognition template can be applied to any scene;
  • the conversion dictionary is a dictionary for character conversion, and each character can be matched to a corresponding feature code in the conversion dictionary.
  • the training data set is input by the user to construct and train the intent recognition model.
  • the training data set contains multiple pieces of data, and each piece of data corresponds to a specific scenario.
  • Enterprises can divide multiple scenarios according to their own business scope. For example, Loan processing business scenarios, auto insurance processing business scenarios, etc.
  • Each scene contains multiple pieces of corpus data and multiple pieces of labeled data.
  • the amount of corpus data can be several times to several hundred times that of the labeled data.
  • the corpus data only contains the text information to be recognized sent by the customer, and the labeled data includes the customer
  • the sent text information to be recognized and the corresponding intent annotation, the intent annotation may be the annotation information obtained by manually identifying the text information to be recognized.
  • the recognition template can be constructed based on the BERT (Bidirectional Encoder Representations from Transformers) neural network. Using the corpus data of a scene to pre-train the recognition template is to train the BERT network in the recognition template to obtain a suitable A recognition model for the locale of the scene.
  • BERT Bidirectional Encoder Representations from Transformers
  • step S110 includes sub-steps S111 , S112 , S113 , S114 , S115 and S116 .
  • S111 Randomly select part of the corpus data corresponding to the ratio value from the corpus data of a scene as the target corpus data.
  • the pre-training rule also has a scale value, which can be randomly selected from the corpus data contained in a scene according to the scale value.
  • the amount of corpus data is used as the target corpus data, for example, the scale value can be set to 10-90%.
  • Each corpus is composed of multiple characters, and any character in each corpus can be masked to obtain corpus processing data including the masked characters.
  • a certain target corpus data is "I want to apply for a loan”
  • the corpus data obtained after random masking processing is "I want to apply for X loan”, where "X” represents the masked character.
  • step S1121 is further included after step S112 .
  • the masked characters in part of the corpus processing data can be randomly replaced with other characters according to the scale value.
  • a certain corpus processing data is "I want to apply for X loan", and the corpus processing data obtained after random replacement is "I want to apply for a loan”.
  • the target corpus data and the corpus processing data are respectively converted to obtain a first feature vector and a second feature vector.
  • Each character can be matched to a corresponding feature code in the conversion dictionary, then the characters contained in the target corpus data can be converted according to the conversion dictionary, and the feature codes corresponding to each character can be combined to obtain the first feature vector,
  • the obtained first feature vector represents the features of the target corpus data in a vector format, and the size of the first feature vector is (1, L), which indicates that the first feature vector is 1 row and L column, and the value of the first feature vector is
  • the length L can be preset by the user.
  • a piece of corpus processing data corresponding to the target corpus data is converted by the same conversion method to obtain a second feature vector.
  • the feature code corresponding to "I” in the conversion dictionary is “2769”; the feature code corresponding to “Think” is “2682”, the feature code corresponding to “Shen” is “4509”, and the feature code corresponding to “Ling” is “7566”, the feature code corresponding to “loan” is “6587”, and the feature code corresponding to "payment” is “3621”.
  • “101” represents the start feature code of the sentence, and "102” represents the end feature code of the sentence. Then the corresponding combination of "I want to apply for a loan” to obtain the first feature vector can be expressed as [101, 2769, 2682, 4509, 7566, 6587, 3621, 102..., 0].
  • the BERT network that recognizes the template consists of an input layer, multiple intermediate layers, and an output layer.
  • the relationship between the input layer and the intermediate layer, between the intermediate layer and other intermediate layers, and between the intermediate layer and the output layer is through association formulas.
  • the number of input nodes contained in the input layer corresponds to the length of the first feature vector, then each vector value in the first feature vector corresponds to one input node, and the first feature vector is input into the BERT network for calculation, which can be calculated from
  • the output layer obtains the output result, and the output result is represented by an array (L, H).
  • the output result corresponding to the first feature vector is the first array, and the size of the first array is L rows and H columns.
  • the second feature vector is input into the recognition template for calculation, and a second array is obtained.
  • the size of the second array is also (L, H), wherein each value in the first array and the second array belongs to [0, 1 ] This value range.
  • the loss value between the first array and the second array is calculated according to the loss function calculation formula in the pre-training rule.
  • the loss value can be used to quantify the time difference between the first array and the second array.
  • calculating the loss value between the first array S1 and the second array S2 can be obtained by calculating the loss function calculation formula Among them, Ls is the calculated loss value, axy is the value of the xth row and the yth column of the first array S1, bxy is the value of the xth row and the yth column of the second array S2, and L is the total row of the first array S1.
  • number, H is the total number of columns of the first array S1.
  • the update value of each parameter in the BERT network of the recognition template is calculated to update the parameter value of the parameter.
  • the calculated value obtained by calculating the first feature vector with a parameter in the BERT network of the identification template is input into the gradient calculation formula, and combined with the above loss value, the update value corresponding to the parameter can be calculated.
  • This calculation The process is also known as gradient descent calculation.
  • the gradient calculation formula can be expressed as:
  • ⁇ r + ⁇ r- ⁇ ( ⁇ L_z)/( ⁇ w_r); among them, ⁇ r + is the updated value of the calculated parameter r, ⁇ r is the original parameter value of the parameter r, ⁇ is the preset learning rate in the gradient calculation formula, ( ⁇ L_z)/( ⁇ w_r) is the partial derivative value of the parameter r based on the loss value and the calculated value corresponding to the parameter r (the calculated value corresponding to the parameter needs to be used in this calculation process).
  • a piece of target corpus data and a piece of corpus processing data corresponding to the piece of target corpus data can update the parameter values of the BERT network in the recognition template once, that is, to complete a pre-training process.
  • the corpus data and multiple pieces of corpus processing data iteratively pre-train the BERT network in the recognition template to obtain a recognition model corresponding to the scene.
  • the intent category information of the recognition model is configured according to the annotation data contained in each scene in the training data set, and an intent recognition model matching each scene is obtained.
  • the training data set also contains a number of annotation data corresponding to each scene.
  • the annotation data includes the text information to be recognized sent by the customer and the corresponding intent annotations.
  • the intent annotations of all the annotation data contained in a scene can be counted, that is, The intent statistical information corresponding to the scene can be obtained, and the intent identification model corresponding to the scene can be obtained by configuring the intent category information of a recognition model corresponding to the scene according to the intent statistical information. Then each intent recognition model can identify the customer intent in a scene individually.
  • step S120 includes sub-steps S121 and S122.
  • Each annotation data includes intent annotations, and the intent annotations of the annotation data included in a single scene can be counted to obtain intent statistical information of the scene.
  • the intent statistical information includes intent categories and statistics corresponding to each intent category.
  • the intent annotation of the annotation data contained in a scene is counted, and the obtained intent statistical information is shown in Table 1.
  • the intent category information of an associated recognition model can be configured according to the intent statistics to obtain an intent recognition model corresponding to the scene.
  • the process of recognizing intent in the recognition model is implemented based on Convolutional Neural Networks (CNN), and the output of the BERT network can be used as the input of the convolutional neural network. According to the output of the convolutional neural network, The intent category corresponding to the customer can be obtained.
  • CNN Convolutional Neural Networks
  • the intent recognition model According to the number of intent categories contained in the intent statistics, create a corresponding number of intent nodes in the recognition model and configure the intent nodes as the output nodes of the convolutional neural network to complete the configuration process of the intent category information of the recognition model. , obtain the intent recognition model; each intent node is associated with an intent category, and the node value of the intent node is the matching degree between the client and the intent category corresponding to the intent node.
  • the intent nodes corresponding to the six intent categories of "satisfied”, “dissatisfied”, “clear”, “unclear”, “what to do next”, and “exit” are respectively generated, And configure the six intent nodes as the output nodes of the convolutional neural network.
  • the intent recognition model matched with each scene is trained according to the conversion dictionary of the annotation dataset included in each scene in the training dataset, and a trained intent recognition model matched with each scene is obtained. Since the pre-training process only trains the language environment of the intent recognition model, that is, it only involves the training process of the BERT network and does not involve the training process of the convolutional neural network, in order to increase the recognition accuracy of the intent recognition model, it is possible to use
  • the annotation data corresponding to each scene trains the intent recognition model that matches the scene, and obtains the trained intent recognition model. In this training process, the gradient calculation formula still needs to be used.
  • step S130 includes sub-steps S131 , S132 , S133 and S134 .
  • Each character can be matched to a corresponding feature code in the conversion dictionary, then the characters contained in the labeled data can be converted according to the conversion dictionary, and the feature codes corresponding to each character can be combined to obtain the feature vector of the labeled data.
  • the conversion process has been described in detail above, and will not be repeated here.
  • S132 Input the feature vector of the annotation data into the intent recognition model for calculation to obtain a matching degree corresponding to each intent category.
  • the annotated data feature vector is input into the intent recognition model for calculation to obtain the matching degree corresponding to each intent category.
  • the feature vector of the labeled data is input into the intent recognition model, and the BERT network and the convolutional neural network are used to calculate the node value of each intent node, and the node value of the intent node is the one corresponding to the intent node.
  • the convolutional neural network can be composed of multiple intermediate layers and one output layer.
  • the output layer includes multiple output nodes.
  • S133 Calculate the loss value of the annotation data according to the intent annotation of the annotation data and the matching degree of each of the intent categories.
  • the update value of each parameter in the convolutional neural network of the intention recognition model is calculated according to the gradient calculation formula, the loss value of the annotation data and the calculation value of the intention recognition model to update the parameter value of the parameter.
  • the calculated value obtained by calculating a parameter in the convolutional neural network of the intent recognition model on the feature vector of the labeled data is input into the gradient calculation formula, and combined with the above-mentioned loss value of the labeled data, the update corresponding to the parameter can be calculated. value, this calculation process has been described in detail in the previous section, and will not be repeated here.
  • a piece of labeled data can update the parameter values of the convolutional neural network in the intent recognition model once, that is, to complete the training of the intent recognition model.
  • a trained intent recognition model corresponding to the scene can be obtained.
  • steps S135 and S136 are further included after step S134 .
  • the recognition of the intent recognition model is tested according to the pre-stored test data to determine whether the intent recognition model satisfies a preset accuracy threshold. Specifically, if the test data is the same as the scene of the intent recognition model, it is possible to test whether the accuracy of the intent recognition model meets the usage requirements according to the test data of the same scene.
  • multiple pieces of test data can be converted to obtain multiple test data feature vectors, and one test data feature vector can be input into the intent recognition model for calculation, so as to obtain the node corresponding to each intent node in the intent recognition model value, select the intent category corresponding to the intent node with the largest node value as the corresponding test intent category, judge whether the test intent category is the same as the target intent category of the test data, and calculate the test intent category in all the test data that is the same as the corresponding target intent category.
  • the intent recognition model Probability, to determine whether the probability is not less than the preset accuracy rate, if not less than, the intent recognition model meets the accuracy threshold, that is, to meet the actual use requirements, the intent recognition model is used as the trained intent recognition model; if it is less than , the intent recognition model does not meet the accuracy threshold, that is, does not meet the actual use requirements, and the intent recognition model that does not meet the accuracy threshold can be retrained.
  • the information to be identified from the client is received, the information to be identified is identified according to the conversion dictionary and the trained intent recognition model matching the information to be identified to obtain the information to be identified.
  • An intent category that matches.
  • the to-be-identified information from the client includes the to-be-recognized text information and scene type information, and through multiple trained intent recognition models, the to-be-identified information corresponding to multiple scenes can be identified, and an image matching the to-be-identified information can be obtained.
  • An intent category that, using the method described above, can improve the accuracy of identifying the intent of customers in multiple scenarios.
  • step S140 includes sub-steps S141 , S142 , S143 and S144 .
  • Each character can be matched to a corresponding feature code in the conversion dictionary, then the characters contained in the text information to be recognized can be converted according to the conversion dictionary, and the feature codes corresponding to each character can be combined to obtain the feature vector to be recognized.
  • the specific conversion process has been described in detail in the previous section, and will not be repeated here.
  • S142 Acquire one of the intent recognition models that matches the scene type information of the information to be identified as a target intent recognition model.
  • One of the intent recognition models matching the scene type information of the to-be-identified information is acquired as a target intent recognition model. Since a corresponding intent recognition model is trained for each scene, an intent recognition model that matches the information to be recognized is used as the target intent recognition model. Specifically, it can be obtained according to the scene type information of the information to be recognized. An intent recognition model that is the same as the scene of the information to be recognized.
  • S143 Input the feature vector to be identified into the target intent identification model for calculation to obtain a matching degree corresponding to each intent category.
  • the feature vector to be identified is input into the target intent identification model for calculation to obtain the matching degree corresponding to each intent category.
  • the feature vector of the labeled data is input into the intent recognition model, and the BERT network and the convolutional neural network are used to calculate the node value of each intent node, and the node value of the intent node is the one corresponding to the intent node. Intent category match.
  • An intent category with the highest matching degree is selected as an intent category matching the information to be identified. After obtaining an intent category that matches the information to be identified, you can clearly understand the current specific intent of the customer, and perform follow-up processing based on the customer's intent, such as feeding back answer information corresponding to the customer's intent, executing business operations corresponding to the customer's intent, etc. .
  • the technical methods in this application can be applied to smart government affairs/smart urban management/smart community/smart security/smart logistics/smart medical care/smart education/smart environmental protection/smart transportation and other application scenarios including identifying customer intentions, so as to promote smart Construction of the city.
  • the recognition template is pre-trained according to the corpus data, conversion dictionary and pre-training rules contained in each scene in the training data set input by the user to obtain the recognition matching each scene. model; configure the intent category information of the recognition model according to the annotation data contained in each scene in the training data set to obtain an intent recognition model that matches each scene;
  • the matching intent recognition model is trained to obtain the trained intent recognition model;
  • the to-be-identified information is identified according to the conversion dictionary and the intent-recognition model matching the to-be-identified information to obtain an intent category that matches the to-be-identified information.
  • the recognition template is pre-trained by the massive corpus data contained in each scene in the training data set to obtain the recognition model corresponding to each scene, which improves the adaptability of the recognition model to the language environment of the specific scene.
  • the matching intent recognition model can identify the intent of the information to be identified, which can greatly improve the accuracy of identifying customer intent.
  • Embodiments of the present application further provide an artificial intelligence-based customer intent identification device, which is used to execute any of the foregoing artificial intelligence-based customer intent identification methods.
  • FIG. 9 is a schematic block diagram of an apparatus for identifying customer intent provided by an embodiment of the present application.
  • the artificial intelligence-based customer intention identification device may be configured in the management server 10 .
  • the artificial intelligence-based customer intent recognition apparatus 100 includes a model pre-training unit 110 , a recognition model configuration unit 120 , an intent recognition model training unit 130 and an intent recognition unit 140 .
  • the model pre-training unit 110 is configured to receive the training data set input by the user, and pre-train the pre-stored recognition template according to the corpus data contained in each scene in the training data set, the preset conversion dictionary and the preset pre-training rules , to get a recognition model that matches each scene.
  • the model pre-training unit 110 includes subunits: a target corpus data acquisition unit, a corpus data processing unit, a conversion unit, a vector calculation unit, a loss value acquisition unit, and a first parameter value update unit.
  • the target corpus data acquisition unit is used to randomly select part of the corpus data corresponding to the ratio value from the corpus data of a scene as the target corpus data; the corpus data processing unit is used to randomly cover the target corpus data, Obtaining corpus processing data; a conversion unit for converting the target corpus data and the corpus processing data according to the conversion dictionary to obtain a first feature vector and a second feature vector; a vector computing unit for converting a The first eigenvector and the corresponding one of the second eigenvectors are input into the recognition template for calculation to obtain a first array and a second array respectively; a loss value obtaining unit is used to calculate the first array according to the loss function calculation formula. A loss value between an array and the second array; a first parameter value update unit, configured to calculate the corresponding value in the identification template according to the gradient calculation formula, the loss value and the calculation value of the identification template update value of the parameter to update the parameter value of the parameter.
  • the model pre-training unit 110 further includes a subunit: a character replacement unit.
  • a character replacement unit configured to randomly replace the covered characters in the part of the corpus processing data corresponding to the ratio value in the corpus processing data.
  • the recognition model configuration unit 120 is configured to configure the intent category information of the recognition model according to the annotation data included in each scene in the training data set, so as to obtain an intent recognition model matching each scene.
  • the recognition model configuration unit 120 includes subunits: an intent statistics information acquisition unit and an intent category configuration unit.
  • the intent statistics information acquisition unit is used to collect statistics on the intent annotations of the annotation data included in the scene to obtain the intent statistics information of the scene;
  • the intent category information of the recognition model is configured to obtain the intent recognition model corresponding to the scene.
  • the intent recognition model training unit 130 is configured to train the intent recognition model matched with each scene according to the labeling data contained in each scene in the training data set and the conversion dictionary, and obtain a training program matched with each scene The post-intent recognition model.
  • the intent recognition model training unit 130 includes subunits: a feature vector acquisition unit, a matching degree acquisition unit, an annotation data loss value acquisition unit, and a second parameter value update unit.
  • a feature vector acquisition unit configured to convert a piece of the labeled data according to the conversion dictionary to obtain a feature vector of labeled data
  • a matching degree acquisition unit used to input the feature vector of the labeled data into the intent recognition model for calculation to obtain a matching degree corresponding to each intent category
  • an annotation data loss value acquisition unit configured to calculate and obtain an annotation data loss value according to the intent annotation of the annotation data and the matching degree of each of the intent categories
  • a second parameter value updating unit which is used to calculate the update value of the corresponding parameter in the intention recognition model according to the gradient calculation formula, the loss value of the annotation data and the calculation value of the intention recognition model, so as to update the parameter value of the parameter.
  • the intent recognition model training unit 130 further includes subunits: an intent recognition model checking unit and a determination unit.
  • an intention recognition model checking unit used for checking the intention recognition model recognition according to the pre-stored test data, to judge whether the intention recognition model satisfies a preset accuracy threshold
  • a determination unit used for if the intention recognition model Whether the preset accuracy rate is satisfied, the intent recognition model is determined as the trained intent recognition model.
  • the intent identification unit 140 is configured to, if receiving the information to be identified from the client, identify the information to be identified according to the conversion dictionary and the intent identification model matched with the information to be identified, so as to obtain the information to be identified that matches the information to be identified. An intent category that matches the information to be identified.
  • the intent recognition unit 140 includes subunits: a text information conversion unit, a target intent recognition model acquisition unit, an intent category matching degree acquisition unit, and a determination unit.
  • the text information conversion unit is used to convert the text information to be recognized according to the conversion dictionary to obtain the feature vector to be recognized;
  • the target intent recognition model acquisition unit is used to acquire the scene type information that matches the information to be recognized.
  • One of the intent recognition models is used as a target intent recognition model;
  • an intent category matching degree acquisition unit is used to input the to-be-recognized feature vector into the target intent identification model for calculation to obtain a matching degree corresponding to each intent category;
  • an intent A category acquisition unit configured to select an intent category with the highest matching degree as an intent category matching the information to be identified.
  • the artificial intelligence-based customer intent recognition device provided by the embodiment of the present application applies the above artificial intelligence-based customer intent recognition method, and recognizes the user according to the corpus data, conversion dictionary and pre-training rules contained in each scene in the training data set input by the user.
  • the template is pre-trained to obtain a recognition model that matches each scene;
  • the intent category information of the recognition model is configured according to the labeled data contained in each scene in the training data set to obtain an intent recognition model that matches each scene;
  • the annotation data and conversion dictionary included in the scene train the intent recognition model that matches each scene to obtain the trained intent recognition model; Get an intent category that matches the information to be identified.
  • the recognition template is pre-trained by the massive corpus data contained in each scene in the training data set to obtain the recognition model corresponding to each scene, which improves the adaptability of the recognition model to the language environment of the specific scene.
  • the matching intent recognition model can identify the intent of the information to be identified, which can greatly improve the accuracy of identifying customer intent.
  • the above-mentioned customer intent recognition apparatus can be implemented in the form of a computer program, which can be executed on a computer device as shown in FIG. 10 .
  • FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the computer device may be a management server for executing an artificial intelligence-based client intent identification method to identify the intent of the information to be identified from the client.
  • the computer device 500 includes a processor 502 , a memory and a network interface 505 connected by a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
  • the nonvolatile storage medium 503 can store an operating system 5031 and a computer program 5032 .
  • the computer program 5032 when executed, can cause the processor 502 to perform an artificial intelligence-based customer intent recognition method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
  • the internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the artificial intelligence-based customer intent recognition method.
  • the network interface 505 is used for network communication, such as providing transmission of data information.
  • the network interface 505 is used for network communication, such as providing transmission of data information.
  • FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
  • the specific computer device 500 may include more or fewer components than shown, or combine certain components, or have a different arrangement of components.
  • the processor 502 is configured to run the computer program 5032 stored in the memory, so as to realize the corresponding functions in the above-mentioned artificial intelligence-based customer intent identification method.
  • the embodiment of the computer device shown in FIG. 10 does not constitute a limitation on the specific structure of the computer device. Either some components are combined, or different component arrangements.
  • the computer device may only include a memory and a processor.
  • the structures and functions of the memory and the processor are the same as those of the embodiment shown in FIG. 10 , which will not be repeated here.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like.
  • a computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, wherein when the computer program is executed by the processor, the steps included in the above-mentioned artificial intelligence-based customer intent recognition method are implemented.
  • the disclosed apparatus, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only logical function division.
  • there may be other division methods, or units with the same function may be grouped into one Units, such as multiple units or components, may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the read storage medium includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned computer-readable storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

一种基于人工智能的客户意图识别方法、装置、设备及介质。该方法包括:根据用户输入的训练数据集中每一场景包含的语料数据、转换词典及预训练规则对识别模板进行预训练得到与识别模型;根据训练数据集中每一场景包含的标注数据对识别模型进行配置得到与每一场景相匹配的意图识别模型;根据每一场景包含的标注数据及转换词典对意图识别模型进行训练得到意图识别模型;根据意图识别模型对待识别信息进行识别得到相应的一个意图类别。该方法通过预训练可提升识别模型对特定场景语言环境的适应性,通过与待识别信息的场景相匹配的意图识别模型对待识别信息进行意图识别,可大幅提升进行意图识别的精确性。

Description

基于人工智能的客户意图识别方法、装置、设备及介质
本申请要求于2020年9月4日提交中国专利局、申请号为202010921813.X,发明名称为“基于人工智能的客户意图识别方法、装置、计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,属于智慧城市中客户意图识别的应用场景,尤其涉及一种基于人工智能的客户意图识别方法、装置、设备及介质。
背景技术
随着人工智能的发展,企业可基于人工智能构建智能交互处理系统,例如,可通过使用所构建的智能交互系统作为一种客户意图识别系统为客户提供服务,通过全时段、智能化的客户意图识别系统接收客户所发送的待识别信息,进行意图识别以获取客户的具体意图,基于客户意图进行后续处理,例如反馈与客户意图对应的解答信息、执行与客户意图相应的业务操作等。大型企业由于业务系统十分复杂,业务系统所包含的业务场景数量较多,而每一个业务场景涉及多种备选意图,发明人发现采用传统技术方法将所有交互场景均纳入客户意图识别系统中虽然扩展了可适用的交互场景的数量,但所得到的系统中涉及海量备选意图,过于庞大的系统无法对客户意图进行精确识别。因此,现有技术方法所构建的客户意图识别系统存在识别准确率较低的问题。
发明内容
本申请实施例提供了一种基于人工智能的客户意图识别方法、装置、设备及介质,旨在解决现有技术方法所构建的客户意图识别系统所存在的识别准确率较低的问题。
第一方面,本申请实施例提供了一种基于人工智能的客户意图识别方法,其包括:
接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
第二方面,本申请实施例提供了一种基于人工智能的客户意图识别装置,其包括:
模型预训练单元,用于接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
识别模型配置单元,用于根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
意图识别模型训练单元,用于根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
意图识别单元,用于若接收到来自客户端的待识别信息,根据所述转换词典及与所述待 识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的基于人工智能的客户意图识别方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的基于人工智能的客户意图识别方法。
本申请实施例提供了一种基于人工智能的客户意图识别方法、装置、设备及介质。根据用户输入的训练数据集中每一场景包含的语料数据、转换词典及预训练规则对识别模板进行预训练得到与每一场景相匹配的识别模型;根据训练数据集中每一场景包含的标注数据对识别模型的意图类别信息进行配置得到与每一场景相匹配的意图识别模型;根据每一场景包含的标注数据及转换词典对与每一场景相匹配的意图识别模型进行训练得到训练后的意图识别模型;根据转换词典及与待识别信息相匹配的所述意图识别模型对待识别信息进行识别,以获取与待识别信息相匹配的一个意图类别。通过上述方法,通过训练数据集中每一场景包含的海量语料数据对识别模板进行预训练得到每一场景对应的识别模型,提升识别模型对特定场景语言环境的适应性,通过与待识别信息的场景相匹配的意图识别模型对待识别信息进行意图识别,可大幅提升对客户意图进行识别的精确性。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的基于人工智能的客户意图识别方法的流程示意图;
图2为本申请实施例提供的基于人工智能的客户意图识别方法的应用场景示意图;
图3为本申请实施例提供的基于人工智能的客户意图识别方法的子流程示意图;
图4为本申请实施例提供的基于人工智能的客户意图识别方法的另一子流程示意图;
图5为本申请实施例提供的基于人工智能的客户意图识别方法的另一子流程示意图;
图6为本申请实施例提供的基于人工智能的客户意图识别方法的另一子流程示意图;
图7为本申请实施例提供的基于人工智能的客户意图识别方法的另一子流程示意图;
图8为本申请实施例提供的基于人工智能的客户意图识别方法的另一子流程示意图;
图9为本申请实施例提供的基于人工智能的客户意图识别装置的示意性框图;
图10为本申请实施例提供的计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚 地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1及图2,图1是本申请实施例提供的基于人工智能的客户意图识别方法的流程示意图,图2为本申请实施例提供的基于人工智能的客户意图识别方法的应用场景示意图;该基于人工智能的客户意图识别方法应用于管理服务器10中,该方法通过安装于管理服务器10中的应用软件进行执行,客户端20通过与管理服务器10建立网络连接以实现数据信息的传输,管理服务器10即是用于对来自客户端的待识别信息进行意图识别的服务器端,客户端20即是供客户发送待识别信息至管理服务器的终端设备,例如台式电脑、笔记本电脑、平板电脑或手机等。如图1所示,该方法包括步骤S110~S140。
S110、接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型。
接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型。其中,用户可以是管理服务器的管理员,所述预训练规则包括比例值、损失函数计算公式及梯度计算公式,预训练规则即为对识别模板进行预训练的规则信息,识别模板即为预存的用于语言识别的通用模板,识别模板可应用于任意一个场景中;转换词典即为对字符进行转换的词典,每一字符均可在转换词典中匹配到对应的一个特征码。训练数据集即为用户所输入的用于构建及训练得到意图识别模型,训练数据集中包含多条数据,每一条数据均对应一个具体的场景,企业可根据自身业务范围划分多个场景,例如,贷款办理业务场景、车险办理业务场景等。每一场景均包含多条语料数据及多条标注数据,语料数据的数量可为标注数据的几倍至几百倍,语料数据中仅包含客户所发送的待识别文字信息,标注数据中包含客户所发送的待识别文字信息以及相应意图标注,意图标注可以是采用人工方式对待识别文字信息进行识别得到的标注信息。不同场景多涉及的语言环境不同,因此可采用一个场景所对应的海量语料数据对识别模板进行预训练,得到与该场景对应的一个识别模型。具体的,识别模板可基于BERT(Bidirectional Encoder Representations from Transformers)神经网络构建得到,采用一个场景的语料数据对识别模板进行预训练即为对该识别模板中的BERT网络进行训练,以得到一个适用于该场景的语言环境的识别模型。
在一实施例中,如图3所示,步骤S110包括子步骤S111、S112、S113、S114、S115及S116。
S111、从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据。
从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据。每一语料数据均是一个完整的句子,则每一语料数据均由多个字符组成,预训练规则中还设置有比例值,可根据比例值从一个场景所包含的语料数据中随机选择得到相应数量的语料数据作为目标语料数据,例如,比例值可设置为10-90%。
S112、对所述目标语料数据进行随机遮盖处理,得到语料处理数据。
对所述场景的语料数据进行随机遮盖处理,得到语料处理数据。每一语料均由多个字符组成,可对每一语料中的任意一个字符进行遮盖处理,得到包含遮盖字符的语料处理数据。
例如,某一目标语料数据为“我想申请贷款”,进行随机遮盖处理后得到的语料处理数据为“我想申X贷款”,其中“X”即表示被遮盖的字符。
在一实施例中,如图4所示,步骤S112之后还包括步骤S1121。
S1121、对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。
对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。为增强预训练效果,可根据比例值将部分语料处理数据中被遮盖的字符随机替换为其他字符。
例如,某一语料处理数据为“我想申X贷款”,进行随机替换后得到的语料处理数据为“我想申领贷款”。
S113、根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量。
根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量。每一字符均可在转换词典中匹配到对应的一个特征码,则可根据转换词典将目标语料数据中所包含的字符进行转换,将每一字符对应的特征码进行组合得到第一特征向量,所得到的第一特征向量将该目标语料数据的特征采用向量方式进行表示,第一特征向量的大小为(1,L),其表示第一特征向量为1行L列,第一特征向量的长度L可由用户预先设定,如可设定第一特征向量及第二特征向量中数值的数量为40(L=40),目标语料数据的特征码作为数值填充第一特征向量,第一特征向量中未被填充的数值记为“0”。采用同样转换方式对与目标语料数据相对应的一条语料处理数据进行转换,得到第二特征向量。
例如,“我”在转换词典中对应的特征码为“2769”;“想”对应的特征码为“2682”,“申”对应的特征码为“4509”,“领”对应的特征码为“7566”,“贷”对应的特征码为“6587”,“款”对应的特征码为“3621”。“101”代表句子的开始特征码,“102”代表句子的结束特征码。则“我想申领贷款”的对应组合得到第一特征向量可表示为[101,2769,2682,4509,7566,6587,3621,102……,0]。
S114、将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组。
将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组。识别模板的BERT网络由一个输入层、多个中间层及一个输出层组成,输入层与中间层之间、中间层与其他中间层之间、中间层与输出层之间均通过关联公式进行关联,例如某一关联公式可表示为y=r×x+t,r和t即为该关联公式中的参数值。输入层中包含的输入节点的数量与第一特征向量的长度相对应,则第一特征向量中每一向量值与一个输入节点相对应,将第一特征向量输入BERT网络进行计算,即可从其输出层获取输出结果,输出结果采用一个数组(L,H)进行表示,与第一特征向量对应的输出结果为第一数组,则第一数组的大小为L行H列。采用同样方式将第二特征向量输入识别模板进行计算,得到第二数组,第二数组的大小也为(L,H),其中第一数组及第二数组中每一数值均属于[0,1]这一取值范围。
S115、根据所述损失函数计算公式计算所述第一数组与所述第二数组之间的损失值。
根据所述预训练规则中的损失函数计算公式计算所述第一数组与所述第二数组之间的损失值。损失值可用于对第一数组与第二数组时间的差别进行量化表示,具体的,计算第一数组S1与第二数组S2之间的损失值可通过损失函数计算公式计算得到
Figure PCTCN2021091339-appb-000001
其中,Ls为计算得到的损失值,axy为第一数组S1中第x行第y列的数值,bxy为第二数组S2中第x行第y列的数值,L为第一数组S1的总行数,H为第一数组S1的总列数。
S116、根据所述梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板中相应参数的更新值以更新所述参数的参数值。
根据所述预训练规则中的梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板的BERT网络中每一参数的更新值以更新所述参数的参数值。具体的,将识别模板的BERT网络中一个参数对第一特征向量进行计算所得到的计算值输入梯度计算公式,并结合上述损失值,即可计算得到与该参数对应的更新值,这一计算过程也即为梯度下降计算。
具体的,梯度计算公式可表示为:
ωr +=ωr-γ×(δL_z)/(δw_r);其中,ωr +为计算得到的参数r的更新值,ωr为参数r的原始参数值,γ为梯度计算公式中预置的学习率,(δL_z)/(δw_r)为基于损失值及参数r对应的计算值对该参数r的偏导值(这一计算过程中需使用该参数对应的计算值)。
一条目标语料数据及与该条目标语料数据对应的一条语料处理数据可对识别模板中BERT网络的参数值进行一次更新,也即是完成一次预训练的过程,根据与一个场景对应的多条目标语料数据及多条语料处理数据对识别模板中的BERT网络进行迭代预训练,即可得到一个与该场景对应的识别模型。
S120、根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型。
根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型。训练数据集中还包含与每一场景对应的多条标注数据,标注数据中包括客户所发送的待识别文字信息以及相应意图标注,可对一个场景所包含的所有标注数据的意图标注进行统计,即可得到与该场景对应的意图统计信息,根据意图统计信息为与该场景对应的一个识别模型的意图类别信息进行配置,即可得到与该场景对应的意图识别模型。则每一个意图识别模型可单独针对一个场景中的客户意图进行识别。
在一实施例中,如图5所示,步骤S120包括子步骤S121和S122。
S121、对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息。
对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息。每一标注数据均包含意图标注,可对单一场景所包含的标注数据的意图标注进行统计,得到该场景的意图统计信息,意图统计信息包括意图类别以及与每一意图类别对应的统计数量。
例如,对某一场景所包含的标注数据的意图标注进行统计,得到的意图统计信息如表1所示。
意图类别 满意 不满意 清楚 不清楚 下一步怎么做 退出
统计数量 12 5 17 13 6 22
表1
S122、根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。
根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。由于经过预训练得到的识别模型仅能够适用于单一场景,因此可根据意图统计信息对与该意图统计信息相关联的一个识别模型的意图类别信息进行配置,得到一个与该场景对应的意图识别模型。具体的,识别模型中对意图进行识别的过程基于卷积神经网络(Convolutional Neural Networks,CNN)实现,则BERT网络的输出结果可作为卷积神经网络的输入,根据卷积神经网络的输出结果即可获取客户对应的意图类别。根据意图统计信息中所包含的意图类别的数量,在识别模型中创建对应数量的意图节点并将意图节点 配置为卷积神经网络的输出节点,即可完成该识别模型的意图类别信息的配置过程,得到意图识别模型;每一意图节点均与一个意图类别相关联,意图节点的节点值即为客户与该意图节点所对应的意图类别之间的匹配度。
例如,根据表1中的意图统计信息分别生成与“满意”、“不满意”、“清楚”、“不清楚”、“下一步怎么做”、“退出”六个意图类别对应的意图节点,并将六个意图节点配置为卷积神经网络的输出节点。
S130、根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型。
根据所述训练数据集中每一场景包含的标注数据集所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型。由于预训练过程仅仅是对意图识别模型的语言环境进行训练,也即是仅涉及BERT网络的训练过程,并不涉及卷积神经网络的训练过程,为增加意图识别模型的识别准确率,可采用每一场景对应的标注数据对与该场景相匹配的意图识别模型进行训练,得到训练后的意图识别模型,在此训练过程中依然需要使用梯度计算公式。
在一实施例中,如图6所示,步骤S130包括子步骤S131、S132、S133和S134。
S131、根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量。
根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量。每一字符均可在转换词典中匹配到对应的一个特征码,则可根据转换词典将标注数据中所包含的字符进行转换,将每一字符对应的特征码进行组合得到标注数据特征向量,具体转换过程已在前文中进行详细说明,在此不作赘述。
S132、将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的匹配度。
将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的匹配度。具体的,将标注数据特征向量输入意图识别模型,经BERT网络及卷积神经网络进行计算,即可得到每一意图节点的节点值,意图节点的节点值即为与该意图节点所对应的一个意图类别的匹配度。具体的,卷积神经网络可由多个中间层及一个输出层组成,输出层包含多个输出节点,中间层与其他中间层之间、中间层与输出层之间均通过关联公式进行关联,例如某一关联公式可表示为y=r×x+t,r和t即为该关联公式中的参数值。将标注特征向量输入意图识别模型进行计算后得到每一意图类别对应的匹配度,匹配度均属于[0,1]这一取值范围。
S133、根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值。
根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值。具体的,可获取与意图标注相同的一个意图类别的匹配度,根据公式Ly=1-Ps计算得到标注数据损失值,其中,Ly为计算得到的标注数据损失值,Ps为与意图标注相同的一个意图类别的匹配度。
S134、根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值。
根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型的卷积神经网络中每一参数的更新值以更新所述参数的参数值。具体的,将意图识别模型的卷积神经网络中一个参数对标注数据特征向量进行计算所得到的计算值输入梯度计算公式,并结合上述标注数据损失值,即可计算得到与该参数对应的更新值,这一计 算过程已在前文中进行详细说明,在此不作赘述。
一条标注数据可对意图识别模型中卷积神经网络的参数值进行一次更新,也即是完成对意图识别模型进行一次训练,根据与一个场景对应的多条标注数据对相应的一个意图识别模型中卷积神经网络进行迭代预训练,即可得到一个与该场景对应的训练后的意图识别模型。
在一实施例中,如图7所示,步骤S134之后还包括步骤S135和S136。
S135、根据预存的检验数据对所述意图识别模型识别进行检验,以判断所述意图识别模型是否满足预置的准确率阈值;S136、若所述意图识别模型是否满足所述准确率预置,将所述意图识别模型确定为训练后的意图识别模型。
根据预存的检验数据对所述意图识别模型识别进行检验,以判断所述意图识别模型是否满足预置的准确率阈值。具体的,检验数据与意图识别模型的场景相同,则可根据场景相同的检验数据检验意图识别模型的准确率是否满足使用需求。具体的,可根据上述步骤,将多条检验数据进行转换得到多个检验数据特征向量,将一个检验数据特征向量输入意图识别模型进行计算,以获取该意图识别模型中每一意图节点对应的节点值,选择节点值最大的一个意图节点对应的意图类别作为对应的检验意图类别,判断检验意图类别是否与检验数据的目标意图类别相同,计算所有检验数据中检验意图类别与相应目标意图类别相同的概率,判断该概率是否不小于准确率预置,若不小于,则该意图识别模型满足准确率阈值,也即是满足实际使用需求,将该意图识别模型作为训练后的意图识别模型;若小于,则该意图识别模型不满足准确率阈值,也即是不满足实际使用需求,可对不满足准确率阈值的该意图识别模型进行重新训练。
S140、若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述训练后的意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。其中,来自客户端的待识别信息中包含待识别文字信息及场景类型信息,通过多个训练后的意图识别模型即可对多个场景对应的待识别信息进行识别,得到与待识别信息相匹配的一个意图类别,采用上述方法,可提高对多场景中客户的意图进行识别的精确性。
在一实施例中,如图8所示,步骤S140包括子步骤S141、S142、S143和S144。
S141、根据所述转换词典对所述待识别文字信息进行转换得到待识别特征向量。
根据所述转换词典对所述待识别文字信息进行转换得到待识别特征向量。每一字符均可在转换词典中匹配到对应的一个特征码,则可根据转换词典将待识别文字信息中所包含的字符进行转换,将每一字符对应的特征码进行组合得到待识别特征向量,具体转换过程已在前文中进行详细说明,在此不作赘述。
S142、获取与所述待识别信息的场景类型信息相匹配的一个所述意图识别模型作为目标意图识别模型。
获取与所述待识别信息的场景类型信息相匹配的一个所述意图识别模型作为目标意图识别模型。由于针对每一场景均训练得到一个相应的意图识别模型,进行需获取与待识别信息相匹配的一个意图识别模型作为目标意图识别模型进行使用,具体的,可根据待识别信息的场景类型信息获取与待识别信息的场景相同的一个意图识别模型。
S143、将所述待识别特征向量输入所述目标意图识别模型进行计算以得到与每一意图类别对应的匹配度。
将所述待识别特征向量输入所述目标意图识别模型进行计算以得到与每一意图类别对应 的匹配度。具体的,将标注数据特征向量输入意图识别模型,经BERT网络及卷积神经网络进行计算,即可得到每一意图节点的节点值,意图节点的节点值即为与该意图节点所对应的一个意图类别的匹配度。
S144、选择匹配度最高的一个意图类别作为与所述待识别信息相匹配的一个意图类别。
选择匹配度最高的一个意图类别作为与所述待识别信息相匹配的一个意图类别。得到与待识别信息相匹配的一个意图类别后,即可清楚了解客户当前的具体意图,并基于客户意图进行后续处理,例如反馈与客户意图对应的解答信息、执行与客户意图相应的业务操作等。
本申请中的技术方法可应用于智慧政务/智慧城管/智慧社区/智慧安防/智慧物流/智慧医疗/智慧教育/智慧环保/智慧交通等包含对客户意图进行识别的应用场景中,从而推动智慧城市的建设。
在本申请实施例所提供的客户意图识别方法中,根据用户输入的训练数据集中每一场景包含的语料数据、转换词典及预训练规则对识别模板进行预训练得到与每一场景相匹配的识别模型;根据训练数据集中每一场景包含的标注数据对识别模型的意图类别信息进行配置得到与每一场景相匹配的意图识别模型;根据每一场景包含的标注数据及转换词典对与每一场景相匹配的意图识别模型进行训练得到训练后的意图识别模型;根据转换词典及与待识别信息相匹配的意图识别模型对待识别信息进行识别,以获取与待识别信息相匹配的一个意图类别。通过上述方法,通过训练数据集中每一场景包含的海量语料数据对识别模板进行预训练得到每一场景对应的识别模型,提升识别模型对特定场景语言环境的适应性,通过与待识别信息的场景相匹配的意图识别模型对待识别信息进行意图识别,可大幅提升对客户意图进行识别的精确性。
本申请实施例还提供一种基于人工智能的客户意图识别装置,该基于人工智能的客户意图识别装置用于执行前述基于人工智能的客户意图识别方法的任一实施例。具体地,请参阅图9,图9是本申请实施例提供的客户意图识别装置的示意性框图。该基于人工智能的客户意图识别装置可以配置于管理服务器10中。
如图9所示,基于人工智能的客户意图识别装置100包括模型预训练单元110、识别模型配置单元120、意图识别模型训练单元130和意图识别单元140。
模型预训练单元110,用于接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型。
在一实施例中,所述模型预训练单元110包括子单元:目标语料数据获取单元、语料数据处理单元、转换单元、向量计算单元、损失值获取单元和第一参数值更新单元。
目标语料数据获取单元,用于从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据;语料数据处理单元,用于对所述目标语料数据进行随机遮盖处理,得到语料处理数据;转换单元,用于根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量;向量计算单元,用于将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组;损失值获取单元,用于根据所述损失函数计算公式计算所述第一数组与所述第二数组之间的损失值;第一参数值更新单元,用于根据所述梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板中相应参数的更新值以更新所述参数的参数值。
在一实施例中,所述模型预训练单元110还包括子单元:字符替换单元。
字符替换单元,用于对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。
识别模型配置单元120,用于根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型。
在一实施例中,所述识别模型配置单元120包括子单元:意图统计信息获取单元和意图类别配置单元。
意图统计信息获取单元,用于对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息;意图类别配置单元,用于根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。
意图识别模型训练单元130,用于根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型。
在一实施例中,所述意图识别模型训练单元130包括子单元:特征向量获取单元、匹配度获取单元、标注数据损失值获取单元和第二参数值更新单元。
特征向量获取单元,用于根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量;匹配度获取单元,用于将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的匹配度;标注数据损失值获取单元,用于根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值;第二参数值更新单元,用于根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值。
在一实施例中,所述意图识别模型训练单元130还包括子单元:意图识别模型检验单元和确定单元。
意图识别模型检验单元,用于根据预存的检验数据对所述意图识别模型识别进行检验,以判断所述意图识别模型是否满足预置的准确率阈值;确定单元,用于若所述意图识别模型是否满足所述准确率预置,将所述意图识别模型确定为训练后的意图识别模型。
意图识别单元140,用于若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
在一实施例中,所述意图识别单元140包括子单元:文字信息转换单元、目标意图识别模型获取单元、意图类别匹配度获取单元和确定单元。
文字信息转换单元,用于根据所述转换词典对所述待识别文字信息进行转换得到待识别特征向量;目标意图识别模型获取单元,用于获取与所述待识别信息的场景类型信息相匹配的一个所述意图识别模型作为目标意图识别模型;意图类别匹配度获取单元,用于将所述待识别特征向量输入所述目标意图识别模型进行计算以得到与每一意图类别对应的匹配度;意图类别获取单元,用于选择匹配度最高的一个意图类别作为与所述待识别信息相匹配的一个意图类别。
在本申请实施例所提供的基于人工智能的客户意图识别装置应用上述基于人工智能的客户意图识别方法,根据用户输入的训练数据集中每一场景包含的语料数据、转换词典及预训练规则对识别模板进行预训练得到与每一场景相匹配的识别模型;根据训练数据集中每一场景包含的标注数据对识别模型的意图类别信息进行配置得到与每一场景相匹配的意图识别模型;根据每一场景包含的标注数据及转换词典对与每一场景相匹配的意图识别模型进行训练得到训练后的意图识别模型;根据转换词典及与待识别信息相匹配的意图识别模型对待识别信息进行识别,以获取与待识别信息相匹配的一个意图类别。通过上述方法,通过训练数据集中每一场景包含的海量语料数据对识别模板进行预训练得到每一场景对应的识别模型,提 升识别模型对特定场景语言环境的适应性,通过与待识别信息的场景相匹配的意图识别模型对待识别信息进行意图识别,可大幅提升对客户意图进行识别的精确性。
上述客户意图识别装置可以实现为计算机程序的形式,该计算机程序可以在如图10所示的计算机设备上运行。
请参阅图10,图10是本申请实施例提供的计算机设备的示意性框图。该计算机设备可以是用于执行基于人工智能的客户意图识别方法以对来自客户端的待识别信息进行意图识别的管理服务器。
参阅图10,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行基于人工智能的客户意图识别方法。
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行基于人工智能的客户意图识别方法。
该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现上述的基于人工智能的客户意图识别方法中对应的功能。
本领域技术人员可以理解,图10中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图10所示实施例一致,在此不再赘述。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现上述的基于人工智能的客户意图识别方法中所包含的步骤。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过 其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为逻辑功能划分,实际实现时可以有另外的划分方式,也可以将具有相同功能的单元集合成一个单元,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个计算机可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的计算机可读存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种基于人工智能的客户意图识别方法,应用于管理服务器中,所述管理服务器与至少一台客户端进行通信,其中,所述方法包括:
    接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
    根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
    根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
    若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
  2. 根据权利要求1所述的基于人工智能的客户意图识别方法,其中,所述预训练规则包括比例值、损失函数计算公式及梯度计算公式,所述根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型,包括:
    从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据;
    对所述目标语料数据进行随机遮盖处理,得到语料处理数据;
    根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量;
    将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组;
    根据所述损失函数计算公式计算所述第一数组与所述第二数组之间的损失值;
    根据所述梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板中相应参数的更新值以更新所述参数的参数值。
  3. 根据权利要求2所述的基于人工智能的客户意图识别方法,其中,所述对所述目标语料数据进行随机遮盖处理,得到语料处理数据之后,还包括:
    对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。
  4. 根据权利要求1所述的基于人工智能的客户意图识别方法,其中,所述根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型,包括:
    对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息;
    根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。
  5. 根据权利要求2所述的基于人工智能的客户意图识别方法,其中,所述根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型,包括:
    根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量;
    将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的 匹配度;
    根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值;
    根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值。
  6. 根据权利要求5所述的基于人工智能的客户意图识别方法,其中,所述根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值之后,还包括:
    根据预存的检验数据对所述意图识别模型识别进行检验,以判断所述意图识别模型是否满足预置的准确率阈值;
    若所述意图识别模型是否满足所述准确率预置,将所述意图识别模型确定为训练后的意图识别模型。
  7. 根据权利要求1所述的基于人工智能的客户意图识别方法,其中,所述待识别信息包含待识别文字信息及场景类型信息,所述根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别,包括:
    根据所述转换词典对所述待识别文字信息进行转换得到待识别特征向量;
    获取与所述待识别信息的场景类型信息相匹配的一个所述意图识别模型作为目标意图识别模型;
    将所述待识别特征向量输入所述目标意图识别模型进行计算以得到与每一意图类别对应的匹配度;
    选择匹配度最高的一个意图类别作为与所述待识别信息相匹配的一个意图类别。
  8. 一种基于人工智能的客户意图识别装置,包括:
    模型预训练单元,用于接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
    识别模型配置单元,用于根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
    意图识别模型训练单元,用于根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
    意图识别单元,用于若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
  9. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤:
    接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
    根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
    根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
    若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
  10. 根据权利要求9所述的计算机设备,其中,所述预训练规则包括比例值、损失函数计算公式及梯度计算公式,所述根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型,包括:
    从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据;
    对所述目标语料数据进行随机遮盖处理,得到语料处理数据;
    根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量;
    将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组;
    根据所述损失函数计算公式计算所述第一数组与所述第二数组之间的损失值;
    根据所述梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板中相应参数的更新值以更新所述参数的参数值。
  11. 根据权利要求10所述的计算机设备,其中,所述对所述目标语料数据进行随机遮盖处理,得到语料处理数据之后,还包括:
    对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。
  12. 根据权利要求9所述的计算机设备,其中,所述根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型,包括:
    对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息;
    根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。
  13. 根据权利要求10所述的计算机设备,其中,所述根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型,包括:
    根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量;
    将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的匹配度;
    根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值;
    根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值。
  14. 根据权利要求13所述的计算机设备,其中,所述根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值之后,还包括:
    根据预存的检验数据对所述意图识别模型识别进行检验,以判断所述意图识别模型是否满足预置的准确率阈值;
    若所述意图识别模型是否满足所述准确率预置,将所述意图识别模型确定为训练后的意图识别模型。
  15. 根据权利要求9所述的计算机设备,其中,所述待识别信息包含待识别文字信息及场景类型信息,所述根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别,包括:
    根据所述转换词典对所述待识别文字信息进行转换得到待识别特征向量;
    获取与所述待识别信息的场景类型信息相匹配的一个所述意图识别模型作为目标意图识别模型;
    将所述待识别特征向量输入所述目标意图识别模型进行计算以得到与每一意图类别对应的匹配度;
    选择匹配度最高的一个意图类别作为与所述待识别信息相匹配的一个意图类别。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下操作:
    接收用户输入的训练数据集,根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型;
    根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型;
    根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型;
    若接收到来自客户端的待识别信息,根据所述转换词典及与所述待识别信息相匹配的所述意图识别模型对所述待识别信息进行识别,以获取与所述待识别信息相匹配的一个意图类别。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述预训练规则包括比例值、损失函数计算公式及梯度计算公式,所述根据所述训练数据集中每一场景包含的语料数据、预置的转换词典及预置的预训练规则对预存的识别模板进行预训练,得到与每一场景相匹配的识别模型,包括:
    从一个场景的语料数据中随机选择与所述比例值对应的部分语料数据作为目标语料数据;
    对所述目标语料数据进行随机遮盖处理,得到语料处理数据;
    根据所述转换词典分别对所述目标语料数据及所述语料处理数据进行转换得到第一特征向量及第二特征向量;
    将一个所述第一特征向量与对应的一个所述第二特征向量输入所述识别模板进行计算分别得到第一数组及第二数组;
    根据所述损失函数计算公式计算所述第一数组与所述第二数组之间的损失值;
    根据所述梯度计算公式、所述损失值及所述识别模板的计算值计算得到所述识别模板中相应参数的更新值以更新所述参数的参数值。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述对所述目标语料数据进行随机遮盖处理,得到语料处理数据之后,还包括:
    对所述语料处理数据中与所述比例值对应的部分语料处理数据中被遮盖的字符进行随机替换。
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述根据所述训练数据集中每一场景包含的标注数据对所述识别模型的意图类别信息进行配置,得到与每一场景相匹配的意图识别模型,包括:
    对一个所述场景包含的标注数据的意图标注进行统计,得到所述场景的意图统计信息;
    根据所述意图统计信息对相关联的一个识别模型的意图类别信息进行配置,得到与所述场景对应的意图识别模型。
  20. 根据权利要求17所述的计算机可读存储介质,其中,所述根据所述训练数据集中每一场景包含的标注数据及所述转换词典对与每一场景相匹配的意图识别模型进行训练,得到与每一场景相匹配的训练后的意图识别模型,包括:
    根据所述转换词典对一条所述标注数据进行转换得到标注数据特征向量;
    将所述标注数据特征向量输入所述意图识别模型进行计算以得到与每一意图类别对应的匹配度;
    根据所述标注数据的意图标注及每一所述意图类别的匹配度计算得到标注数据损失值;
    根据所述梯度计算公式、所述标注数据损失值及所述意图识别模型的计算值计算得到所述意图识别模型中相应参数的更新值以更新所述参数的参数值。
PCT/CN2021/091339 2020-09-04 2021-04-30 基于人工智能的客户意图识别方法、装置、设备及介质 WO2022048173A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010921813.XA CN112036550B (zh) 2020-09-04 2020-09-04 基于人工智能的客户意图识别方法、装置、计算机设备
CN202010921813.X 2020-09-04

Publications (1)

Publication Number Publication Date
WO2022048173A1 true WO2022048173A1 (zh) 2022-03-10

Family

ID=73592078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091339 WO2022048173A1 (zh) 2020-09-04 2021-04-30 基于人工智能的客户意图识别方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112036550B (zh)
WO (1) WO2022048173A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115687934A (zh) * 2022-12-30 2023-02-03 智慧眼科技股份有限公司 意图识别方法、装置、计算机设备及存储介质
WO2023173554A1 (zh) * 2022-03-15 2023-09-21 平安科技(深圳)有限公司 坐席违规话术识别方法、装置、电子设备、存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036550B (zh) * 2020-09-04 2022-05-17 平安科技(深圳)有限公司 基于人工智能的客户意图识别方法、装置、计算机设备
CN112732880A (zh) * 2020-12-30 2021-04-30 平安科技(深圳)有限公司 用户画像生成方法、装置、计算机设备及存储介质
CN112734181A (zh) * 2020-12-30 2021-04-30 平安养老保险股份有限公司 业务信息审批方法、装置、计算机设备及存储介质
CN113240088A (zh) * 2021-05-17 2021-08-10 上海中通吉网络技术有限公司 文本意图识别模型的训练方法
CN113591881B (zh) * 2021-08-10 2023-06-02 平安银行股份有限公司 基于模型融合的意图识别方法、装置、电子设备及介质
CN113806485B (zh) * 2021-09-23 2023-06-23 厦门快商通科技股份有限公司 一种基于小样本冷启动的意图识别方法、装置及可读介质
CN114860912B (zh) * 2022-05-20 2023-08-29 马上消费金融股份有限公司 数据处理方法、装置、电子设备和存储介质
CN115665325B (zh) * 2022-09-14 2023-06-02 中信建投证券股份有限公司 一种智能外呼的方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109920429A (zh) * 2017-12-13 2019-06-21 上海擎感智能科技有限公司 一种用于车载的语音识别数据处理方法及系统
CN110287283A (zh) * 2019-05-22 2019-09-27 中国平安财产保险股份有限公司 意图模型训练方法、意图识别方法、装置、设备及介质
CN110750626A (zh) * 2018-07-06 2020-02-04 中国移动通信有限公司研究院 一种基于场景的任务驱动的多轮对话方法及系统
US20200242302A1 (en) * 2019-01-29 2020-07-30 Ricoh Company, Ltd. Intention identification method, intention identification apparatus, and computer-readable recording medium
CN112036550A (zh) * 2020-09-04 2020-12-04 平安科技(深圳)有限公司 基于人工智能的客户意图识别方法、装置、计算机设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110909543A (zh) * 2019-11-15 2020-03-24 广州洪荒智能科技有限公司 意图识别方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109920429A (zh) * 2017-12-13 2019-06-21 上海擎感智能科技有限公司 一种用于车载的语音识别数据处理方法及系统
CN110750626A (zh) * 2018-07-06 2020-02-04 中国移动通信有限公司研究院 一种基于场景的任务驱动的多轮对话方法及系统
US20200242302A1 (en) * 2019-01-29 2020-07-30 Ricoh Company, Ltd. Intention identification method, intention identification apparatus, and computer-readable recording medium
CN110287283A (zh) * 2019-05-22 2019-09-27 中国平安财产保险股份有限公司 意图模型训练方法、意图识别方法、装置、设备及介质
CN112036550A (zh) * 2020-09-04 2020-12-04 平安科技(深圳)有限公司 基于人工智能的客户意图识别方法、装置、计算机设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023173554A1 (zh) * 2022-03-15 2023-09-21 平安科技(深圳)有限公司 坐席违规话术识别方法、装置、电子设备、存储介质
CN115687934A (zh) * 2022-12-30 2023-02-03 智慧眼科技股份有限公司 意图识别方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
CN112036550A (zh) 2020-12-04
CN112036550B (zh) 2022-05-17

Similar Documents

Publication Publication Date Title
WO2022048173A1 (zh) 基于人工智能的客户意图识别方法、装置、设备及介质
US11157693B2 (en) Stylistic text rewriting for a target author
WO2022095378A1 (zh) 基于人工智能的培训方法、装置、计算机设备及存储介质
CN107704625B (zh) 字段匹配方法和装置
US11341417B2 (en) Method and apparatus for completing a knowledge graph
WO2020007138A1 (zh) 一种事件识别的方法、模型训练的方法、设备及存储介质
CN109740620B (zh) 人群画像分类模型的建立方法、装置、设备和存储介质
EP3680850A1 (en) Method and system for determining risk score for a contract document
WO2023134084A1 (zh) 多标签识别方法、装置、电子设备及存储介质
CN110705301A (zh) 实体关系抽取方法及装置、存储介质、电子设备
WO2020224115A1 (zh) 图片处理方法、装置、计算机设备及存储介质
CN110377733B (zh) 一种基于文本的情绪识别方法、终端设备及介质
CN115082920B (zh) 深度学习模型的训练方法、图像处理方法和装置
EP4006909B1 (en) Method, apparatus and device for quality control and storage medium
WO2021208727A1 (zh) 基于人工智能的文本错误检测方法、装置、计算机设备
WO2020215683A1 (zh) 基于卷积神经网络的语义识别方法及装置、非易失性可读存储介质、计算机设备
WO2021000745A1 (zh) 一种知识图谱的嵌入表示方法及相关设备
WO2022095379A1 (zh) 数据降维处理方法、装置、计算机设备及存储介质
WO2019201024A1 (zh) 用于更新模型参数的方法、装置、设备和存储介质
CN113239668B (zh) 关键词智能提取方法、装置、计算机设备及存储介质
CN110969005A (zh) 一种确定实体语料之间的相似性的方法及装置
CN112487813A (zh) 命名实体识别方法及系统、电子设备及存储介质
CN113806541A (zh) 情感分类的方法和情感分类模型的训练方法、装置
CN113963235A (zh) 一种跨类别图像识别模型重用方法和系统
CN112861962A (zh) 样本处理方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21863243

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863243

Country of ref document: EP

Kind code of ref document: A1