CN112163415A - User intention identification method and device for feedback content and electronic equipment - Google Patents

User intention identification method and device for feedback content and electronic equipment Download PDF

Info

Publication number
CN112163415A
CN112163415A CN202011062181.2A CN202011062181A CN112163415A CN 112163415 A CN112163415 A CN 112163415A CN 202011062181 A CN202011062181 A CN 202011062181A CN 112163415 A CN112163415 A CN 112163415A
Authority
CN
China
Prior art keywords
category
intention
feedback content
target
determining
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202011062181.2A
Other languages
Chinese (zh)
Inventor
张思睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Cheetah Mobile Technology Co Ltd
Original Assignee
Beijing Cheetah Mobile Technology Co Ltd
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 Beijing Cheetah Mobile Technology Co Ltd filed Critical Beijing Cheetah Mobile Technology Co Ltd
Priority to CN202011062181.2A priority Critical patent/CN112163415A/en
Publication of CN112163415A publication Critical patent/CN112163415A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services
    • G06Q30/015Providing customer assistance, e.g. assisting a customer within a business location or via helpdesk
    • G06Q30/016After-sales

Abstract

The embodiment of the invention provides a user intention identification method and device aiming at feedback content and electronic equipment, and is applied to the technical field of natural language processing. The method comprises the following steps: acquiring target feedback content to be identified; determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on a preset corresponding relation between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition; if the initial category is judged to be the designated category, determining an intention recognition result of the target feedback content by using a pre-trained intention classification model; otherwise, the initial category is determined as the intention recognition result of the target feedback content. By the scheme, the efficiency of determining the feedback intention of the user based on the feedback content of the user can be improved.

Description

User intention identification method and device for feedback content and electronic equipment
Technical Field
The present invention relates to the field of natural language processing technologies, and in particular, to a method and an apparatus for identifying a user intention for feedback content, and an electronic device.
Background
In order to better improve user experience, product suppliers often set a product opinion feedback center to receive feedback content of a user for a product, and a worker needs to determine a feedback intention of the user according to the feedback content of the user, for example, the user is unsatisfied with a certain function of the product or the user is seeking help, and the like, so that the user can perform targeted processing according to the feedback intention of the user.
In the prior art, the feedback intention of the user needs to be determined by the staff on the basis of the feedback content of the user, and the efficiency is low.
Disclosure of Invention
The embodiment of the invention aims to provide a user intention identification method aiming at feedback content, so as to improve the efficiency of determining the feedback intention of a user based on the feedback content of the user. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for identifying a user intention for feedback content, including:
acquiring target feedback content to be identified;
determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on a preset corresponding relation between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition;
if the initial category is judged to be the designated category, determining an intention recognition result of the target feedback content by using a pre-trained intention classification model;
otherwise, determining the initial category as an intention recognition result of the target feedback content;
wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model trained based on a plurality of sample feedback contents, and the plurality of sample feedback contents comprise: sample feedback content that can characterize the specified category, and sample feedback content that can characterize a similar intent category of the specified category.
Optionally, before determining, as an initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset corresponding relationship between each classification condition and the intention category, the method further includes:
generating a sentence vector representing the target feedback content as a target vector;
calculating the distance between the target vector and each cluster in a clustering space, wherein the clustering space is established by sentence vectors based on sample feedback content, and each cluster in the clustering space is associated with an intention category;
determining a target class cluster of which the distance from the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the determining, as an initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category includes:
and determining the intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category and the pre-selected category.
Optionally, the determining, based on the preset corresponding relationship between each classification condition and the intention category and the preselected category, an intention category corresponding to the classification condition satisfied by the target feedback content as an initial category includes:
searching for the classification condition corresponding to the pre-selected category from the preset corresponding relation between each classification condition and the intention category;
and determining the classification condition met by the target feedback content from the searched classification conditions, and determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the corresponding relation.
Optionally, the generating a sentence vector representing the target feedback content includes:
determining key participles contained in the target feedback content, wherein the key participles are participles belonging to a preset participle type;
and generating a word vector of the key word segmentation, and generating a sentence vector representing the target feedback content based on the word vector of the key word segmentation.
Optionally, the intention classification model is: and training an intention classification model based on the random forest classification model.
Optionally, the method further includes:
and determining a subcategory having a mapping relation with the preset participle contained in the target feedback content according to a preset mapping relation between the preset participle and the subcategory under the intention recognition result, and taking the subcategory as the subcategory of the target feedback content.
In a second aspect, an embodiment of the present invention provides an apparatus for recognizing a user intention for feedback content, including:
the content acquisition module is used for acquiring target feedback content to be identified;
the category determination module is used for determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition;
the result determining module is used for determining an intention recognition result of the target feedback content by utilizing a pre-trained intention classification model if the initial category is judged to be the designated category; otherwise, determining the initial category as an intention recognition result of the target feedback content;
wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model trained based on a plurality of sample feedback contents, and the plurality of sample feedback contents comprise: sample feedback content that can characterize the specified category, and sample feedback content that can characterize a similar intent category of the specified category.
Optionally, the apparatus further comprises:
a vector generation module, configured to generate a sentence vector representing the target feedback content as a target vector before the category determination module performs determining, as an initial category, an intention category corresponding to the classification condition that is satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category;
the distance calculation module is used for calculating the distance between the target vector and each cluster in a clustering space, wherein the clustering space is established by sentence vectors based on sample feedback content, and each cluster in the clustering space is associated with an intention category;
the class cluster determining module is used for determining a target class cluster of which the distance between the target class cluster and the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the category determining module is specifically configured to determine, as an initial category, an intention category corresponding to the classification condition that is satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category and the preselected category.
Optionally, the category determining module is specifically configured to search a preset corresponding relationship between each classification condition and an intention category for the classification condition corresponding to the preselected category, determine the classification condition that is satisfied by the target feedback content from the searched classification condition, and determine, based on the corresponding relationship, the intention category that is corresponding to the classification condition that is satisfied by the target feedback content and serves as an initial category.
Optionally, the vector generation module is specifically configured to determine a key word segmentation included in the target feedback content, where the key word segmentation is a word segmentation belonging to a preset word segmentation type, generate a word vector of the key word segmentation, and generate a sentence vector representing the target feedback content based on the word vector of the key word segmentation.
Optionally, the intention classification model is: and training an intention classification model based on the random forest classification model.
Optionally, the apparatus further comprises:
and the subcategory determining module is used for determining a subcategory which has a mapping relation with the preset participle contained in the target feedback content according to a preset mapping relation between the preset participle and the subcategory under the intention recognition result, and the subcategory is used as the subcategory of the target feedback content.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps as provided by the first aspect of the claims when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps provided in the first aspect.
In the method for identifying the user intention for the feedback content provided by the embodiment of the invention, the corresponding relation between each classification condition and the intention category is pre-established, so that the intention category corresponding to the classification condition met by the target feedback content can be determined, and further, when the initial category is the designated category, the intention identification result of the target feedback content is determined by using the intention classification model, otherwise, the initial category is determined as the intention identification result of the target feedback content. Therefore, the scheme can avoid manually determining the feedback intention of the user based on the feedback content of the user, and realizes the automatic recognition of the user intention of the target feedback content, thereby improving the recognition efficiency.
In addition, the corresponding relation between each classification condition and the intention category is adopted in the scheme, and the intention classification model is combined, so that the initial categories obtained through the corresponding relation can be corrected when similar categories exist, and therefore the accuracy of intention identification can be further ensured. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flowchart of a user intent recognition method for feedback content according to an embodiment of the present invention;
FIG. 2 is another flow chart of a method for identifying user intent with respect to feedback content according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a user intention recognition apparatus for feedback content according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to improve the efficiency of determining the feedback intention of a user based on the feedback content of the user, the embodiment of the invention provides a method and a device for identifying the user intention aiming at the feedback content, and electronic equipment.
The user intention identification method for the feedback content provided by the embodiment of the invention is applied to the electronic equipment. In specific application, the electronic device may be a server, or may also be a terminal device such as a smart phone or a tablet computer.
In one embodiment of the present invention, a method for identifying a user intention for feedback content is provided, as shown in fig. 1, the method comprising the steps of:
s101, obtaining target feedback content to be identified.
In this step, the electronic device may receive feedback content, i.e., a feedback text, fed back by the user for the product, and use the received feedback content as target feedback content. Of course, the electronic device may also obtain the target feedback content from the opinion feedback center. The opinion feedback center is a data center used for collecting and storing feedback contents such as comments, suggestions and questions of users for products, so that the electronic equipment can read the feedback contents from a database used for storing the feedback contents of the users for the products in the opinion feedback center and take the read feedback contents as target feedback contents.
The target feedback content can be the comment, the comment and the question of the user for the product. For example, for cleaning tool-class application software, the target feedback content may be "how to clean up application garbage", "what to do if a file is deleted by mistake", and the like.
The target feedback content may also be a feedback content obtained by preprocessing the received and acquired feedback content, where the preprocessing is used to remove special characters such as expressions, symbols, meaningless repeated characters, and the like included in the feedback content.
S102, determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category; and the intention category corresponding to each classification condition is an intention category which can be represented by the feedback content meeting the classification condition.
The intention category may be preset based on the function points of the product. For example, as illustrated by the chat software, the opinion category may include a chat category, an address book category, a group chat category, and the like. Of course, the intent categories may also be determined based on the collected sample feedback content.
In order to automatically identify the intention category, a large number of feedback contents can be collected in advance, and the intention categories represented by the large number of feedback contents and the text information of the feedback contents are utilized to establish the corresponding relation between each classification condition and the intention category, wherein the intention category corresponding to each classification condition is the intention category which can be represented by the feedback contents meeting the classification condition. Based on the corresponding relationship, when the user intention of the target feedback content needs to be identified, the classification condition satisfied by the target feedback content in the preset classification conditions can be judged, and the intention category corresponding to the classification condition satisfied by the target feedback content is determined as the initial category. The classification condition corresponding to each intent category may be set based on a keyword associated with feedback content that can characterize the intent category, such as a vocabulary that may be included in the feedback content that can characterize the intent category. At this time, the correspondence relation between each classification condition and the intention category may be referred to as a keyword map, and the corresponding intention category may be determined by the classification condition about the keyword in the keyword map.
For example, the intent category includes an interface display category and a document processing category, and when the words "icon", "font", and "background" appear in the feedback content, the feedback content is most likely the interface display category. Therefore, the classification condition corresponding to the interface display category is set with "icon", "font", and "background" as keywords. For example, the classification condition corresponding to the interface display category may be: if the feedback content includes "background", then when the target feedback content includes "background", it is determined that the target feedback content belongs to the interface display category.
In addition, the setting of the classification condition corresponding to each intention category may also be set in combination with different dimensional information such as a sentence pattern of the feedback content, an emotional tendency of the feedback content, a position of the keyword in the feedback content, and an actual requirement, which is not specifically limited by the present invention.
S103, if the initial category is judged to be the designated category, determining an intention recognition result of the target feedback content by using a pre-trained intention classification model; otherwise, determining the initial category as an intention recognition result of the target feedback content; wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model obtained by training based on a plurality of sample feedback contents, wherein the plurality of sample feedback contents comprise: sample feedback content that can characterize a specified category, and sample feedback content that can characterize a similar intent category of the specified category.
The classification conditions and the corresponding relations are manually set based on experience and requirements, and feedback opinions touched manually are limited, so that the set classification conditions may not cover all possible situations, and particularly for a plurality of similar intention categories, when target feedback content literally meets a certain classification condition, the intention categories possibly actually characterized are similar categories of the corresponding intention categories of the classification conditions.
In order to improve the accuracy of feedback intention recognition, a relatively similar intention category can be used as a designated category, and an intention recognition result of target feedback content is determined by using a pre-trained intention classification model so as to correct the initial category. If the initial category is judged to be the designated category, determining an intention recognition result of the target feedback content by using a pre-trained intention classification model, specifically: and inputting the target feedback content into a pre-trained intention classification model to obtain an intention identification result of the target feedback content. When the initial category is not the designated category, the initial category obtained by step S102 is also accurate, and therefore, the initial category can be determined as the intention recognition result of the target feedback content.
For example, if the desktop lock category and the application lock category are two similar intent categories, then both the desktop lock category and the application lock category can be designated categories. When the desktop lock category is the designated category, the similar category is the application category, and when the application lock category is the designated category, the similar category is the desktop category. And when the initial category is the desktop lock category, re-determining whether the target feedback content represents the desktop lock category or the application category through the intention classification module.
Optionally, an intention classification model for each of a plurality of groups of categories may be preset, where each group of categories includes a plurality of similar intention categories.
In one implementation, the method for training the classification model based on the feedback content of the plurality of samples may include:
obtaining a plurality of sample feedback contents of a user aiming at a product, which are collected in advance, and calibration contents of each feedback content; wherein each sample feedback content comprises: the method comprises the following steps that sample feedback contents of an appointed class and sample feedback contents of similar intention classes of the appointed class can be characterized, the calibration content of each sample feedback content is the intention class which can be characterized by the sample feedback content, and the calibration content can be determined and obtained in a manual mode or the like;
and taking the feedback content and the calibration content of each sample as training data to train the initial intention classification model. The method specifically comprises the following steps: inputting each sample feedback content into an initial intention classification model to obtain an intention identification result of the sample feedback content; calculating a loss value based on the intention recognition result of each sample feedback content and the difference of the calibration content; and if the loss value is less than the preset loss threshold value, judging that the intention classification model is converged to obtain a trained intention classification model, if the loss value is not less than the preset loss value, adjusting network parameters of the intention classification model, returning to the step of inputting the feedback content of each sample into the initial intention classification model to obtain an intention recognition result of the feedback content of the sample, and further training the intention classification model. For the generation manner of the sample feedback content, reference may be made to the generation manner of the target feedback content, which is not described herein again.
The intention classification model may be an intention classification model trained based on a random forest classification model. The random forest classification model is formed by combining a series of decision trees which are independent from each other, and each decision tree forms the minimum component of the whole random forest algorithm. After a random forest classification model gives data to be classified, each decision tree independently judges input without mutual influence, and finally, the optimal classification result of the whole classifier is selected through voting. The decision-making ability of a single decision tree is weak, but the decision-making ability of a series of decision trees is strong when the decision trees are combined.
In the scheme provided by this embodiment, the corresponding relationship between each classification condition and the intention category may be pre-established, and then the intention category corresponding to the classification condition that is satisfied by the target feedback content may be determined, and further, when the initial category is the designated category, the intention identification result of the target feedback content is determined by using the intention classification model, otherwise, the initial category is determined as the intention identification result of the target feedback content. Therefore, the scheme can avoid manually determining the feedback intention of the user based on the feedback content of the user, and realizes the automatic recognition of the user intention of the target feedback content, thereby improving the recognition efficiency.
In addition, the corresponding relation between each classification condition and the intention category is adopted in the scheme, and the intention classification model is combined, so that the initial categories obtained through the corresponding relation can be corrected when similar categories exist, and therefore the accuracy of intention identification can be further ensured.
Based on the embodiment of fig. 1, as shown in fig. 2, a method for identifying a user intention for feedback content according to another embodiment of the present invention may further include, before S102:
s104, generating a sentence vector representing target feedback content as a target vector;
the sentence vector representing the target feedback content can be generated based on the word vector of the participle contained in the target feedback content. Specifically, the segmentation of the target feedback content can be obtained by text segmentation and the like, so as to determine a word vector of each segmentation, and then a sentence vector representing the target feedback content is generated by the determined word vector.
S105, calculating the distance between the target vector and each cluster in a clustering space, wherein the clustering space is established by sentence vectors based on sample feedback contents, and each cluster in the clustering space is associated with an intention category;
as can be seen from the foregoing embodiments, the intention category corresponding to each classification condition may be determined based on the collected sample feedback content. Specifically, sentence vectors of the collected sample feedback content can be clustered to generate a clustering space, a plurality of clustered clusters are obtained, and further, associated intention categories can be set for each cluster by combining actual use scenes and requirements.
After determining the target vector of the target feedback content, the distance between the target vector and each cluster can be calculated in the clustering space. The distance between the target vector and each cluster type can be the cosine distance between the centers of mass of adjacent targets and each cluster type. And the centroid of each cluster type is the mean value of the sentence vectors contained in each cluster type.
S106, determining a target class cluster of which the distance between the target class cluster and the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class.
Wherein the preset threshold may be determined based on demand and experience.
Illustratively, the clustering space contains three class clusters, namely class cluster a, class cluster B, and class cluster C, and the intention category associated with class cluster a is intention category a, the intention category associated with class cluster B is intention category B, and the intention category associated with class cluster C is intention category C. By calculation, it was determined that the target neighbors were at a distance of 0.2 from class cluster a, 0.4 from class cluster B, and 0.6 from class cluster C. When the preset threshold is 0.5, it may be determined that the class cluster a and the class cluster B are the target class cluster. And further determines the intent category a and the intent category as preselected categories.
Accordingly, after obtaining the pre-classification, in an implementation manner, the step S102 may include the following steps:
S102A, based on the preset corresponding relation between each classification condition and the intention category and the pre-selected category, determines the intention category corresponding to the classification condition satisfied by the target feedback content as the initial category.
Optionally, in an implementation manner, in order to improve the accuracy of the user intention recognition, a classification condition that is satisfied by the target feedback content may be determined from various classification conditions, and when there are a plurality of classification conditions that are satisfied by the target feedback content, an initial category may be determined from the determined plurality of classification conditions based on a preselected category. For example, an intention category corresponding to each of a plurality of classification conditions may be determined first, it may be determined whether a preselected category exists among the determined intention categories, and when existing, the preselected category may be taken as an initial category.
Illustratively, the preset classification conditions include a condition 1, a condition 2, and a condition 3, and the intention category corresponding to the condition 1 is a category 1, the intention category corresponding to the condition 2 is a category 2, and the intention category corresponding to the condition 3 is a category 3. When the target feedback content satisfies both the condition 1 and the condition 2 and the pre-selected category is category 1, the category 1 may be taken as the initial category.
Optionally, in another implementation manner, in order to improve the efficiency of the user intention identification, the initial category may be determined as follows:
searching for classification conditions corresponding to the pre-selected categories from the preset corresponding relation between each classification condition and the intention category; and determining the classification condition met by the target feedback content from the searched classification conditions, and determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the corresponding relation.
Illustratively, the preset classification conditions include a condition 1, a condition 2 and a condition, and the intention category corresponding to the condition 1 is a category 1, the intention category corresponding to the condition 2 is a category 2, and the intention category corresponding to the condition 3 is a category 3. When the pre-selected categories are category 1 and category 2, the classification condition met by the target feedback content can be determined from condition 1 and condition 2, and the intention category corresponding to the classification condition met by the target feedback content is used as the initial category.
In the scheme provided by the embodiment, the preselection categories which may be met by the target feedback content can be screened from all intention categories based on the sentence vectors of the target feedback content, and the initial categories of the target feedback content are further determined by combining the preselection categories and the classification conditions, so that the accuracy and efficiency of user intention identification can be improved.
Optionally, in another embodiment of the present invention, the step S104 may include the following steps:
determining key participles contained in the target feedback content, wherein the key participles are participles belonging to a preset participle type; and generating a word vector of the key word segmentation, and generating a sentence vector representing the target feedback content based on the word vector of the key word segmentation.
Before determining the key word segmentation, data processing can be performed on the target feedback content to remove special characters such as expressions and the like in the target feedback content.
The key participles are vocabularies belonging to preset types, wherein the preset types can be determined according to actual requirements and experience. For example, the preset types may include a function type, an emotion type and a request type, wherein the vocabulary of the function type may be a vocabulary describing the function point of the application program, such as "interface", "application lock", "garbage cleaning", and the like. The words of the emotional type may be words describing emotional tendency, such as "good", "like", "bad", "too bad", "dislike", etc., and the words of the request type may be words describing the required request, such as "how to do", "how to set", "how to restore", etc.
In order to accurately determine the key segmentation words contained in the target feedback content, a key dictionary is established in advance, wherein the key dictionary contains segmentation words of a preset type. The key dictionary can be established based on the final segmentation self-defining dictionary. For example, the part of the custom keywords in the final segmentation custom dictionary is used as the key dictionary. After the target feedback content is obtained, the participles appearing in the keyword dictionary in the target feedback content can be found out, namely the keyword participles of the target feedback content.
The dimensions of the generated word vectors described above may be determined based on experience and context. After the dimensions of the word vectors are determined in advance, the word vectors of the key participles can be generated in a plurality of ways, for example, the word vectors of the key participles can be generated in one of two ways:
the first mode is as follows: the word vectors of the key participles may be generated using a TF-IDF (Term Frequency-Inverse Document Frequency) algorithm.
The second mode is as follows: word vectors for key participles may be generated based on the word vector model. The word vector model may be a word2vec word vector model, or may be a Global vector for word representation (Global vector represented by a word) word vector model, and which model is selected may be determined in combination with actual requirements.
After generating the word vector of the key participle, a sentence vector representing the target feedback content may be generated based on the word vector, wherein the sentence vector representing the target feedback content and the word vector of the key participle have the same dimension.
Optionally, in an implementation manner, the sentence vector of the target feedback content may be calculated based on the word vector of the key participle and the word vector of the non-key participle, where the non-key participle is a participle other than the key participle in the participles included in the target feedback content.
The method comprises the steps of establishing a keyword dictionary of a self-defined dictionary of the ending participle in advance, wherein the keyword dictionary comprises the self-defined keyword participles, the self-defined keyword participles can be determined by combining scenes, experiences and sample sets which are actually used, and meanwhile, a general dictionary also exists in the self-defined dictionary of the ending participle. After the target feedback content is obtained, the key participles contained in the final participle custom dictionary and the non-key participles contained in the general dictionary can be screened out.
And further generating word vectors of key participles and word vectors of non-key participles according to the same dimension, and performing inter-vector operation on the word vectors of the key participles and the word vectors of the non-key participles to calculate sentence vectors of target feedback contents.
Optionally, the sentence vector of the target feedback content may be calculated in one of the following two ways:
the first mode is as follows: calculating the product of the word length of the target feedback content and the word vector of the key participle to obtain a first word vector; and carrying out weighted average on the first word vector and the word vectors of the non-key participles to generate a sentence vector of the target feedback content.
In this way, the word length of the target feedback content is the number of the segmented words of the target feedback content, i.e. the sum of the number of the key segmented words and the number of the non-key segmented words. The word length is multiplied by the word vector of the key word segmentation, so that the proportion of the word vector of the key word segmentation in the sentence vector can be enhanced, the emotional tendency carried by the key word segmentation is prevented from being covered by non-key word segmentation, and the subsequent user intention identification is more accurate.
The second mode is as follows: calculating the product of the preset multiple, the word length of the target feedback content and the word vector of the key participle to obtain a second word vector; and carrying out weighted average on the second word vector and the word vectors of the non-key participles to generate a sentence vector of the target feedback content.
In the method, the proportion of the word vectors of the key participles in the sentence vectors is further improved through the preset multiple, and the accuracy of the user intention identification is further improved. The preset multiple may be determined based on actual requirements and experience, and may be 3 times, for example.
Optionally, in another embodiment of the present invention, the method for identifying a user intention for feedback content may further include:
and determining the subcategory which has a mapping relation with the preset participle contained in the target feedback content according to the preset mapping relation between the preset participle and the subcategory under the intention recognition result, and taking the subcategory as the subcategory of the target feedback content.
Wherein an intent category may contain multiple subcategories. For example, the intention category may include a file cleaning sub-category, a picture cleaning sub-category, and a video cleaning sub-category under the cleaning category. The different sub-categories are used to further subdivide the user intent of the feedback content, resulting in more accurate user intent recognition.
Each sub-category which can be contained in the intention category is mapped with a preset word segmentation in advance. The preset segmentation words mapped by different sub-categories are different from each other under the same intention category. The preset participles of each subcategory can be recorded in a way of establishing a subcategory keyword dictionary.
Illustratively, the intention category is exemplified as the cleaning category. Each sub-category which can be contained in the cleaning category is mapped with a preset word segmentation in advance. The preset segmentation words mapped by different sub-categories are different from each other under the same intention category. For example, the intention category is a cleaning category that includes three sub-categories, a document cleaning sub-category, a picture cleaning sub-category, and a video cleaning sub-category. The preset participles which are in mapping relation with the file cleaning subcategory can be files, manuscripts and the like, the preset participles which are in mapping relation with the picture cleaning subcategory can be pictures, photos and the like, and the preset participles which are in mapping relation with the video cleaning subcategory can be videos, movies and the like. When the target feedback content contains "video", the video cleaning subcategory may be determined to be a subcategory of the target feedback content.
In the scheme provided by the embodiment, the sub-category of the target feedback content can be determined on the basis of the intention recognition result by presetting the mapping relationship between the participles and the sub-category under the intention recognition result. The target feedback content can be further subdivided, so that the user intention can be more accurately identified.
Corresponding to the method for identifying the user intention of the feedback content provided by the above embodiment, as shown in fig. 3, an embodiment of the present invention further provides an apparatus for identifying the user intention of the feedback content, the apparatus including:
a content obtaining module 301, configured to obtain target feedback content to be identified;
a category determining module 302, configured to determine, as an initial category, an intention category corresponding to a classification condition that is satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition;
a result determining module 303, configured to determine an intention recognition result of the target feedback content by using a pre-trained intention classification model if the initial category is determined to be the designated category; otherwise, determining the initial category as an intention recognition result of the target feedback content;
wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model obtained by training based on a plurality of sample feedback contents, and the plurality of sample feedback contents comprise: sample feedback content that can characterize a specified category, and sample feedback content that can characterize a similar intent category of the specified category.
Further, the apparatus further comprises:
a vector generation module for generating a sentence vector representing the target feedback content as a target vector before the category determination module performs determination of an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset correspondence relationship regarding each classification condition and the intention category as an initial category;
the distance calculation module is used for calculating the distance between the target vector and each cluster in the clustering space, wherein the clustering space is established by sentence vectors based on sample feedback contents, and each cluster in the clustering space is associated with an intention category;
the class cluster determining module is used for determining a target class cluster of which the distance between the target class cluster and the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
and the category determining module is specifically used for determining the intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category and the pre-selected category.
Further, the category determining module is specifically configured to search for a classification condition corresponding to the preselected category from a preset corresponding relationship between each classification condition and an intention category, determine a classification condition that is satisfied by the target feedback content from the searched classification conditions, and determine, based on the corresponding relationship, the intention category corresponding to the classification condition that is satisfied by the target feedback content as the initial category.
Further, the vector generation module is specifically configured to determine key participles included in the target feedback content, where the key participles are participles belonging to a preset participle type, generate word vectors of the key participles, and generate a sentence vector representing the target feedback content based on the word vectors of the key participles.
Further, the intention classification model is: and training an intention classification model based on the random forest classification model.
Further, the apparatus further comprises:
and the subcategory determining module is used for determining a subcategory which has a mapping relation with the preset participle contained in the target feedback content as the subcategory of the target feedback content according to the preset mapping relation between the preset participle and the subcategory under the intention recognition result.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401 is configured to implement the above-mentioned steps of the method for recognizing the user's intention with respect to the feedback content when executing the program stored in the memory 403.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned user intention identification methods for feedback content.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform any of the above-described user intention identification methods for feedback content.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for identifying user intention for feedback content, comprising:
acquiring target feedback content to be identified;
determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on a preset corresponding relation between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition;
if the initial category is judged to be the designated category, determining an intention recognition result of the target feedback content by using a pre-trained intention classification model;
otherwise, determining the initial category as an intention recognition result of the target feedback content;
wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model trained based on a plurality of sample feedback contents, and the plurality of sample feedback contents comprise: sample feedback content that can characterize the specified category, and sample feedback content that can characterize a similar intent category of the specified category.
2. The method according to claim 1, wherein before determining an intention category corresponding to the classification condition satisfied by the target feedback content as an initial category based on a preset correspondence relationship regarding each classification condition and intention category, the method further comprises:
generating a sentence vector representing the target feedback content as a target vector;
calculating the distance between the target vector and each cluster in a clustering space, wherein the clustering space is established by sentence vectors based on sample feedback content, and each cluster in the clustering space is associated with an intention category;
determining a target class cluster of which the distance from the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the determining, as an initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category includes:
and determining the intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category and the pre-selected category.
3. The method according to claim 2, wherein the determining, as an initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on the pre-set correspondence relationship between each classification condition and the intention category and the pre-selected category, comprises:
searching for the classification condition corresponding to the pre-selected category from the preset corresponding relation between each classification condition and the intention category;
and determining the classification condition met by the target feedback content from the searched classification conditions, and determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the corresponding relation.
4. The method of claim 2, wherein generating a sentence vector representing the target feedback content comprises:
determining key participles contained in the target feedback content, wherein the key participles are participles belonging to a preset participle type;
and generating a word vector of the key word segmentation, and generating a sentence vector representing the target feedback content based on the word vector of the key word segmentation.
5. The method of any of claims 1-4, wherein the intent classification model is: and training an intention classification model based on the random forest classification model.
6. The method according to any one of claims 1-4, further comprising:
and determining a subcategory having a mapping relation with the preset participle contained in the target feedback content according to a preset mapping relation between the preset participle and the subcategory under the intention recognition result, and taking the subcategory as the subcategory of the target feedback content.
7. An apparatus for recognizing a user's intention with respect to feedback contents, comprising:
the content acquisition module is used for acquiring target feedback content to be identified;
the category determination module is used for determining an intention category corresponding to the classification condition met by the target feedback content as an initial category based on the preset corresponding relation between each classification condition and the intention category; the intention category corresponding to each classification condition is an intention category which can be represented by feedback content meeting the classification condition;
the result determining module is used for determining an intention recognition result of the target feedback content by utilizing a pre-trained intention classification model if the initial category is judged to be the designated category; otherwise, determining the initial category as an intention recognition result of the target feedback content;
wherein the designated category is an intention category in which similar intention categories exist; the intention classification model is a classification model trained based on a plurality of sample feedback contents, and the plurality of sample feedback contents comprise: sample feedback content that can characterize the specified category, and sample feedback content that can characterize a similar intent category of the specified category.
8. The apparatus of claim 7, further comprising:
a vector generation module, configured to generate a sentence vector representing the target feedback content as a target vector before the category determination module performs determining, as an initial category, an intention category corresponding to the classification condition that is satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category;
the distance calculation module is used for calculating the distance between the target vector and each cluster in a clustering space, wherein the clustering space is established by sentence vectors based on sample feedback content, and each cluster in the clustering space is associated with an intention category;
the class cluster determining module is used for determining a target class cluster of which the distance between the target class cluster and the target vector is smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the category determining module is specifically configured to determine, as an initial category, an intention category corresponding to the classification condition that is satisfied by the target feedback content based on a preset correspondence relationship between each classification condition and the intention category and the preselected category.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202011062181.2A 2020-09-30 2020-09-30 User intention identification method and device for feedback content and electronic equipment Pending CN112163415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011062181.2A CN112163415A (en) 2020-09-30 2020-09-30 User intention identification method and device for feedback content and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011062181.2A CN112163415A (en) 2020-09-30 2020-09-30 User intention identification method and device for feedback content and electronic equipment

Publications (1)

Publication Number Publication Date
CN112163415A true CN112163415A (en) 2021-01-01

Family

ID=73860862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011062181.2A Pending CN112163415A (en) 2020-09-30 2020-09-30 User intention identification method and device for feedback content and electronic equipment

Country Status (1)

Country Link
CN (1) CN112163415A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562038A (en) * 2022-11-01 2023-01-03 南栖仙策(南京)科技有限公司 Early warning method, device, equipment and medium for feedback control system change
CN116340831A (en) * 2023-05-24 2023-06-27 京东科技信息技术有限公司 Information classification method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815492A (en) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 A kind of intension recognizing method based on identification model, identification equipment and medium
US20200097496A1 (en) * 2018-09-21 2020-03-26 Salesforce.Com, Inc. Intent classification system
CN111159346A (en) * 2019-12-27 2020-05-15 深圳物控智联科技有限公司 Intelligent answering method based on intention recognition, server and storage medium
CN111428506A (en) * 2020-03-31 2020-07-17 联想(北京)有限公司 Entity classification method, entity classification device and electronic equipment
CN111581388A (en) * 2020-05-11 2020-08-25 北京金山安全软件有限公司 User intention identification method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200097496A1 (en) * 2018-09-21 2020-03-26 Salesforce.Com, Inc. Intent classification system
CN109815492A (en) * 2019-01-04 2019-05-28 平安科技(深圳)有限公司 A kind of intension recognizing method based on identification model, identification equipment and medium
CN111159346A (en) * 2019-12-27 2020-05-15 深圳物控智联科技有限公司 Intelligent answering method based on intention recognition, server and storage medium
CN111428506A (en) * 2020-03-31 2020-07-17 联想(北京)有限公司 Entity classification method, entity classification device and electronic equipment
CN111581388A (en) * 2020-05-11 2020-08-25 北京金山安全软件有限公司 User intention identification method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562038A (en) * 2022-11-01 2023-01-03 南栖仙策(南京)科技有限公司 Early warning method, device, equipment and medium for feedback control system change
CN115562038B (en) * 2022-11-01 2023-08-29 南栖仙策(南京)高新技术有限公司 Early warning method, device, equipment and medium for feedback control system change
CN116340831A (en) * 2023-05-24 2023-06-27 京东科技信息技术有限公司 Information classification method and device, electronic equipment and storage medium
CN116340831B (en) * 2023-05-24 2024-02-06 京东科技信息技术有限公司 Information classification method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110413780B (en) Text emotion analysis method and electronic equipment
CN108073568B (en) Keyword extraction method and device
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
CN110232149B (en) Hot event detection method and system
CN110888990B (en) Text recommendation method, device, equipment and medium
CN109189990B (en) Search word generation method and device and electronic equipment
CN108376129B (en) Error correction method and device
CN111797214A (en) FAQ database-based problem screening method and device, computer equipment and medium
CN112148889A (en) Recommendation list generation method and device
CN112347778A (en) Keyword extraction method and device, terminal equipment and storage medium
CN111460153A (en) Hot topic extraction method and device, terminal device and storage medium
CN112163424A (en) Data labeling method, device, equipment and medium
CN110688452B (en) Text semantic similarity evaluation method, system, medium and device
CN110134777B (en) Question duplication eliminating method and device, electronic equipment and computer readable storage medium
CN111753082A (en) Text classification method and device based on comment data, equipment and medium
CN112163415A (en) User intention identification method and device for feedback content and electronic equipment
CN110795942B (en) Keyword determination method and device based on semantic recognition and storage medium
CN108021713B (en) Document clustering method and device
CN115794898B (en) Financial information recommendation method and device, electronic equipment and storage medium
CN112199500A (en) Emotional tendency identification method and device for comments and electronic equipment
CN107291686B (en) Method and system for identifying emotion identification
CN112528703A (en) Method and device for identifying table structure and electronic equipment
CN112487181A (en) Keyword determination method and related equipment
CN110837732A (en) Method and device for identifying intimacy between target people, electronic equipment and storage medium
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination