[go: up one dir, main page]

CN112163415B - Method, device and electronic device for identifying user intention based on feedback content - Google Patents

Method, device and electronic device for identifying user intention based on feedback content Download PDF

Info

Publication number
CN112163415B
CN112163415B CN202011062181.2A CN202011062181A CN112163415B CN 112163415 B CN112163415 B CN 112163415B CN 202011062181 A CN202011062181 A CN 202011062181A CN 112163415 B CN112163415 B CN 112163415B
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.)
Active
Application number
CN202011062181.2A
Other languages
Chinese (zh)
Other versions
CN112163415A (en
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/CN112163415B/en
Publication of CN112163415A publication Critical patent/CN112163415A/en
Application granted granted Critical
Publication of CN112163415B publication Critical patent/CN112163415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供了针对反馈内容的用户意图识别方法、装置及电子设备,应用于自然语言处理技术领域。该方法包括:获取待识别的目标反馈内容;基于预设的关于各个分类条件与意图类别的对应关系,确定与目标反馈内容所满足的分类条件相对应的意图类别,作为初始类别;其中,每一分类条件对应的意图类别为满足该分类条件的反馈内容所能够表征的意图类别;若判断出初始类别为指定类别,利用预先训练的意图分类模型,确定目标反馈内容的意图识别结果;否则,将初始类别确定为目标反馈内容的意图识别结果。通过本方案,可以提高基于用户的反馈内容确定用户的反馈意图的效率。

The embodiments of the present invention provide a method, device and electronic device for identifying user intent for feedback content, which are applied to the field of natural language processing technology. The method includes: obtaining the target feedback content to be identified; based on the preset correspondence between each classification condition and the intent category, determining the intent category corresponding to the classification condition satisfied by the target feedback content as the initial category; wherein the intent category corresponding to each classification condition is the intent category that can be represented by the feedback content that satisfies the classification condition; if the initial category is judged to be a specified category, the intent recognition result of the target feedback content is determined using a pre-trained intent classification model; otherwise, the initial category is determined as the intent recognition result of the target feedback content. Through this solution, the efficiency of determining the user's feedback intent based on the user's feedback content can be improved.

Description

User intention recognition 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 user intention for feedback content, and an electronic device.
Background
In order to better promote user experience, a product provider often sets a product opinion feedback center to receive feedback content of a user aiming at a product, and staff needs to determine feedback intention of the user according to the feedback content of the user, for example, the user is not full of a certain function of the product or the user is seeking help, and the like, so that targeted processing can be performed according to the feedback intention of the user.
In the prior art, a worker is required to determine the feedback intention of the user based on 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 recognition 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 user intention with respect to 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, wherein the intention category corresponding to each classification condition is an intention category which can be represented by the feedback content meeting the classification condition;
If the initial category is judged to be the appointed category, determining an intention recognition result of the target feedback content by utilizing a pre-trained intention classification model;
otherwise, determining the initial category as an intention recognition result of the target feedback content;
the intention classification model is a classification model trained based on a plurality of sample feedback contents, wherein the sample feedback contents can represent the sample feedback contents of the specified category and the sample feedback contents can represent the similar intention category of the specified category.
Optionally, before determining, as the initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset correspondence relation between each classification condition and the intention category, the method further includes:
generating sentence vectors representing the target feedback content as target vectors;
Calculating the distance between the target vector and each type of cluster in a clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
determining a target class cluster with a distance from the target vector smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the determining, based on a preset correspondence relation between each classification condition and an intention category, the intention category corresponding to the classification condition satisfied by the target feedback content as an initial category includes:
and 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 pre-selected category.
Optionally, the determining, based on the preset correspondence between each classification condition and the intent category and the pre-selected category, the intent category corresponding to the classification condition satisfied by the target feedback content, as the initial category includes:
Searching classification conditions corresponding to the preselected categories from preset corresponding relations of the classification conditions and the intention categories;
And determining the classification condition met by the target feedback content from the searched classification conditions, and determining the intention category corresponding to the classification condition met by the target feedback content based on the corresponding relation as an initial category.
Optionally, the generating a sentence vector representing the target feedback content includes:
Determining key word segmentation contained in the target feedback content, wherein the key word segmentation is a word segmentation belonging to a preset word segmentation type;
Generating word vectors of the key word segments, and generating sentence vectors representing the target feedback content based on the word vectors of the key word segments.
Optionally, the intention classification model is an intention classification model trained based on a random forest classification model.
Optionally, the method further comprises:
and determining the sub-category with the mapping relation with the preset segmentation included in the target feedback content as the sub-category of the target feedback content according to the preset mapping relation between the preset segmentation and the sub-category under the intention recognition result.
In a second aspect, an embodiment of the present invention provides a user intention recognition apparatus for feedback content, including:
The content acquisition module is used for acquiring target feedback content to be identified;
the system comprises a category determining module, a target feedback content determining module and a feedback content determining module, wherein the category determining module is used for determining an intention category corresponding to a 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, wherein 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 result determining module is used for determining the 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 the intention recognition result of the target feedback content;
the intention classification model is a classification model trained based on a plurality of sample feedback contents, wherein the sample feedback contents can represent the sample feedback contents of the specified category and the sample feedback contents can represent the similar intention category of the specified category.
Optionally, the apparatus further includes:
A vector generation module, configured to, before the category determination module performs determining, based on a preset correspondence relation between each classification condition and an intention category, an intention category corresponding to a classification condition satisfied by the target feedback content, as an initial category, generate, as a target vector, a sentence vector representing the target feedback content;
The distance calculation module is used for calculating the distance between the target vector and each type of cluster in a clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
The class cluster determining module is used for determining a target class cluster with the distance between the target cluster and the target vector being 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 a classification condition satisfied by the target feedback content based on a preset correspondence between each classification condition and the intention category and the pre-selected category.
Optionally, the category determining module is specifically configured to search for a classification condition corresponding to the pre-selected category from preset correspondence between each classification condition and an intention category, determine a classification condition satisfied by the target feedback content from the searched classification conditions, and determine, based on the correspondence, the intention category corresponding to the classification condition satisfied by the target feedback content as the initial category.
Optionally, the vector generation module is specifically configured to determine a keyword that is included in the target feedback content, where the keyword is a word that belongs to a preset word type, generate a word vector of the keyword, and generate, based on the word vector of the keyword, a sentence vector that represents the target feedback content.
Optionally, the intention classification model is an intention classification model trained based on a random forest classification model.
Optionally, the apparatus further includes:
The subcategory determining module is used for determining the subcategory which has a mapping relation with the preset word included in the target feedback content as the subcategory of the target feedback content according to the preset mapping relation between the preset word and the subcategory under the intention recognition result.
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, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps provided in the first aspect when executing a program stored on a memory.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the method steps provided by the first aspect.
In the user intention recognition method for the feedback content provided by the embodiment of the invention, because the corresponding relation between each classification condition and the intention category is established in advance, 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 recognition result of the target feedback content is determined by using the intention classification model, and otherwise, the initial category is determined as the intention recognition 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 realize automatic recognition of the user intention of the target feedback content, so that the recognition efficiency can be improved.
In addition, the method adopts the mode of combining the corresponding relation between each classification condition and the intention category and the intention classification model, so that when the initial category obtained through the corresponding relation has similar categories, the initial category is corrected, and therefore, the accuracy of the intention recognition can be further ensured. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
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 flow chart of a method for identifying user intent for feedback content according to one embodiment of the present invention;
FIG. 2 is another flow chart of a method for identifying user intent for feedback content according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a user intention recognition device 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 following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to improve efficiency of determining feedback intention of a user based on feedback content of the user, the embodiment of the invention provides a user intention identification method and device for feedback content and electronic equipment.
The user intention recognition method for the feedback content is applied to the electronic equipment. In a specific application, the electronic device may be a server, or may be a terminal device such as a smart phone, a tablet computer, or the like.
In one embodiment of the present invention, there is provided a user intention recognition method for feedback content, as shown in fig. 1, the method including the steps of:
s101, acquiring target feedback content to be identified.
In this step, the electronic device may receive feedback content, that is, feedback text, that is, feedback content that is fed back by the user for the product, and use the received feedback content as the target feedback content. Of course, the electronic device may also acquire the target feedback content from the opinion feedback center. The opinion feedback center is a data center for collecting and storing feedback contents such as comments, suggestions and questions of a user aiming at a product, so that the electronic equipment can read the feedback contents from a database used for storing the feedback contents of the user aiming at the product in the opinion feedback center and take the read feedback contents as target feedback contents.
The target feedback content can be comments, opinions, questions and the like of the user aiming at the product. For example, for cleaning tool class applications, the target feedback content may be "how to clean up application garbage", "how to misdelete a file", etc.
The target feedback content may be feedback content obtained by preprocessing the received and obtained feedback content, where the preprocessing is used to remove special characters, such as expressions, symbols, nonsensical repeated characters, and the like, contained 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 a preset corresponding relation between each classification condition and the intention category, wherein 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, illustrated with chat software, opinion categories may include chat categories, address book categories, group chat categories, and the like. Of course, the intent category may also be determined based on the collected sample feedback content.
In order to automatically identify the intention category, a large amount of feedback contents can be collected in advance, and the corresponding relation between each classification condition and the intention category is established by utilizing the intention category characterized by the feedback contents and the text information of the feedback contents, wherein the intention category corresponding to each classification condition is the intention category which can be characterized by the feedback contents meeting the classification condition. Based on the correspondence, when the user intention of the target feedback content needs to be identified, it may be determined that, among the preset classification conditions, the classification condition satisfied by the target feedback content is satisfied, and then 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 keywords related to feedback content that may characterize the intent category, such as words that may be included in the feedback content that may 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 graph, and the corresponding intention category may be determined by the classification condition of the keyword in the keyword graph.
For example, the intent category includes an interface display category and a document processing category, and when "icon", "font", "background" vocabulary appears in the feedback content, the feedback content is highly probable to be the interface display category. Accordingly, the classification condition corresponding to the interface display category is set with "icon", "font", "background" as a keyword. For example, the classification condition corresponding to the interface display category may be that the feedback content includes "background", and 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 can be further set by combining sentence patterns of the feedback content, emotion tendencies of the feedback content, positions of keywords in the feedback content, actual requirements and other different dimensional information, and the invention is not particularly limited to this.
S103, determining an intention recognition result of target feedback content by utilizing a pre-trained intention classification model if the initial category is judged to be a designated category, otherwise, determining the initial category as the intention recognition result of the target feedback content, wherein the designated category is an intention category with similar intention category, 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 contents capable of representing the designated category and sample feedback contents capable of representing the similar intention category of the designated category.
The classification condition and the corresponding relation are manually set based on experience and requirements, and feedback opinions touched by the manual are limited, so that the set classification condition may not cover all possible situations, especially for a plurality of similar intention categories, when the target feedback content is often caused to meet a certain classification condition literally, the intention category which may be actually represented is the similar category of the intention category corresponding to the classification condition.
In order to improve accuracy of feedback intention recognition, a more similar intention category can be used as a designated category, and then an intention recognition result of target feedback content is determined by using a pre-trained intention classification model so as to correct an initial category. If the initial category is judged to be the designated category, the intention recognition result of the target feedback content is determined by utilizing a pre-trained intention classification model, specifically, the target feedback content is input into the pre-trained intention classification model, and the intention recognition result of the target feedback content is obtained. When the initial category is not the specified 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 class and the application lock class are similar two intention classes, both the desktop lock class and the application lock class may be designated classes. When the desktop lock class is the specified class, the similar class is the application class, and when the application lock class is the specified class, the similar class is the desktop class. When the initial category is a desktop lock category, the intent classification module is used for redefining whether the target feedback content is characterized by the desktop lock category or the application category.
Alternatively, the intention classification model of each of the multiple groups of categories may be preset, where each group of categories includes multiple similar intention categories.
In one implementation, the way the classification model is trained based on the multiple sample feedback content may include:
The method comprises the steps of 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 sample feedback contents capable of representing a specified category and sample feedback contents capable of representing similar intention categories of the specified category, the calibration contents of each sample feedback content are intention categories which can be represented by the sample feedback contents, and the calibration contents can be obtained through manual mode and the like;
And training the initial intention classification model by taking the feedback content and the calibration content of each sample as training data. The method comprises the steps of inputting feedback content of each sample into an initial intention classification model to obtain an intention recognition result of the feedback content of each sample, calculating a loss value based on the difference between the intention recognition result of the feedback content of each sample and calibration content, judging that the intention classification model converges to obtain a trained intention classification model if the loss value is smaller than a preset loss threshold, adjusting network parameters of the intention classification model if the loss value is not smaller than the preset loss value, and returning to the step of inputting the feedback content of each sample into the initial intention classification model to obtain the intention recognition result of the feedback content of each sample, so that the intention classification model is continuously trained. The generation method of the sample feedback content may refer to the generation method of the target feedback content, and will not be described herein.
The intent classification model may be an intent classification model trained based on a random forest classification model. The random forest classification model is formed by combining a series of independent decision trees, and each decision tree forms the minimum composition of the whole random forest algorithm. When the random forest classification model gives a piece of data to be classified, each decision tree can independently judge the input without influencing each other, and finally, the optimal classification result of the whole classifier is selected through voting. Individual decision trees tend to be weaker in decision making capability, but the decision making capability will be quite powerful by aggregating a series of decision trees.
In the scheme provided by the embodiment, the corresponding relation between each classification condition and the intention category can be established in advance, 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 recognition result of the target feedback content is determined by using the intention classification model, and otherwise, the initial category is determined as the intention recognition 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 realize automatic recognition of the user intention of the target feedback content, so that the recognition efficiency can be improved.
In addition, the method adopts the mode of combining the corresponding relation between each classification condition and the intention category and the intention classification model, so that when the initial category obtained through the corresponding relation has similar categories, the initial category is corrected, and therefore, the accuracy of the intention recognition can be further ensured.
Based on the embodiment of fig. 1, as shown in fig. 2, the user intention recognition method for feedback content according to another embodiment of the present invention may further include, before S102:
s104, generating sentence vectors representing target feedback contents as target vectors;
Wherein, sentence vectors representing the target feedback content can be generated based on word vectors of the segmented words contained in the target feedback content. Specifically, the word segmentation of the target feedback content can be obtained through text segmentation and other modes, the word vector of each word segmentation is further determined, and sentence vectors representing the target feedback content are generated through the determined word vectors.
S105, calculating the distance between the target vector and each type of cluster in a clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
Wherein, as can be seen from the foregoing embodiments, the intention category corresponding to each classification condition can 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 according to actual use scenes and requirements.
After determining the target vector of the target feedback content, the distance between the target vector and each type of cluster can be calculated in the cluster space. The distance between the target vector and each cluster may be the cosine distance between the adjacent target and the centroid of each cluster. And the centroid of each cluster is the average value of sentence vectors contained in each cluster.
S106, determining a target class cluster with the distance between the target class cluster and the target vector being 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.
The clustering space includes three clusters, namely a cluster A, a cluster B and a cluster C, wherein the intention category associated with the cluster A is an intention category A, the intention category associated with the cluster B is an intention category B, and the intention category associated with the cluster C is an intention category C. By calculation, the distance between the adjacent target and the cluster A is 0.2, the distance between the adjacent target and the cluster B is 0.4 and the distance between the adjacent target and the cluster C is 0.6. When the preset threshold is 0.5, the class cluster A and the class cluster B can be determined to be target class clusters. And further determining the intent category a and the intent category as preselected categories.
Accordingly, after obtaining the pre-category, in one implementation, the step S102 may include the following steps:
S102A, 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 pre-selected category.
Wherein optionally, in an implementation manner, in order to improve accuracy of user intention recognition, a classification condition satisfied by the target feedback content may be determined from each classification condition, and when there are a plurality of classification conditions 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, and it may be determined whether or not a preselected category exists in the determined intention category, and when the preselected category exists, the preselected category may be regarded as an initial category.
For example, the preset classification conditions include a condition 1, a condition 2, and a condition 3, the intent category corresponding to the condition 1 is a category 1, the intent category corresponding to the condition 2 is a category 2, and the intent 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 preselected category is category 1, category 1 may be taken as the initial category.
Alternatively, in another implementation, to increase the efficiency of user intent recognition, the initial category may be determined as follows:
searching for the classification condition corresponding to the pre-selected category from the preset corresponding relation between each classification condition and the intention category, determining the classification condition met by the target feedback content from the searched classification conditions, and determining the intention category corresponding to the classification condition met by the target feedback content based on the corresponding relation as the initial category.
For example, the preset classification conditions include a condition 1, a condition 2, and a condition, the intent category corresponding to the condition 1 is a category 1, the intent category corresponding to the condition 2 is a category 2, and the intent category corresponding to the condition 3 is a category 3. When the pre-selected category is category 1 and category 2, the classification condition satisfied by the target feedback content is determined from the conditions 1 and 2, and the intention category corresponding to the classification condition satisfied by the target feedback content is taken as the initial category.
In the scheme provided by the embodiment, the pre-selected category possibly met by the target feedback content can be screened from all the intention categories based on the sentence vector of the target feedback content, and the initial category of the target feedback content is further determined by combining the pre-selected category and the classification condition, so that the accuracy and the efficiency of user intention recognition can be improved.
Alternatively, in another embodiment of the present invention, the step S104 may include the following steps:
The method comprises the steps of determining key word segmentation contained in target feedback content, wherein the key word segmentation is a word segmentation belonging to a preset word segmentation type, generating word vectors of the key word segmentation, and generating sentence vectors representing the target feedback content based on the word vectors of the key word segmentation.
Before determining the keyword, the data processing may be performed on the target feedback content to remove special characters such as expressions in the target feedback content.
The keyword segmentation is a vocabulary belonging to a preset type, wherein the preset type 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 function points of the application program, such as "interface", "application lock", "garbage collection", and the like. The emotion type vocabulary may be a vocabulary describing emotion tendencies, such as "good", "like", "bad", "too bad", "dislike", etc., and the request type vocabulary may be a vocabulary describing a desired request, such as "how to do", "how to set", "how to recover", etc.
In order to accurately determine the key word segmentation contained in the target feedback content, a key dictionary is pre-established, wherein the key dictionary contains word segmentation of a preset type. The key dictionary may be built based on a barker custom dictionary. For example, the custom keyword part in the barker custom dictionary is used as the keyword dictionary. After the target feedback content is obtained, the word segmentation appearing in the keyword dictionary in the target feedback content can be searched, namely the keyword segmentation 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 predetermined, the word vectors of the keyword segmentations may be generated in a variety of ways, for example, the word vectors of the keyword segmentations may be generated in one of two ways:
in the first way, word vectors of key words can be generated using the TF-IDF (Term Frequency-inverse document Frequency) algorithm.
In a second way, word vectors for the keyword segmentations may be generated based on the word vector model. The word vector model may be a word2vec word vector model, or may be a GloVe (Global vectors for word representation, global vector represented by a word) word vector model, and the model to be selected may be determined in combination with actual requirements.
After generating the word vector of the keyword, 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 keyword have the same dimensions.
Alternatively, in one implementation, the sentence vector of the target feedback content may be calculated based on the word vector of the keyword and the word vector of the non-keyword, where the non-keyword is a word except the keyword in the words included in the target feedback content.
The keyword dictionary which is introduced into the junction word custom dictionary can be pre-built, the keyword dictionary contains custom keywords, the custom keywords can be determined by combining actually used scenes, experiences and sample sets, and meanwhile, a general dictionary also exists in the junction word custom dictionary. After the target feedback content is obtained, the key word segments contained in the resultant word segment custom dictionary and the non-key word segments contained in the universal dictionary can be screened out.
And generating word vectors of the keyword and word vectors of the non-keyword according to the same dimension, and performing vector operation on the word vectors of the keyword and the word vectors of the non-keyword to calculate sentence vectors of the target feedback content.
Alternatively, the sentence vector of the target feedback content may be calculated in one of two ways:
The first mode comprises the steps of calculating the product of word length of target feedback content and word vector of keyword segmentation to obtain a first word vector, and carrying out weighted average on the first word vector and word vector of non-keyword segmentation to generate sentence vector of the target feedback content.
In this way, the word length of the target feedback content is the number of divided words, i.e. the sum of the number of key words and non-key words, of the target feedback content. The ratio of the word vector of the keyword in the sentence vector can be enhanced by multiplying the word length by the word vector of the keyword, so that the emotion tendency carried by the keyword is prevented from being covered by the non-keyword, and the user intention recognition is more accurate.
The second mode is that the product of the preset multiple, the word length of the target feedback content and the word vector of the keyword is calculated to obtain a second word vector, and the second word vector and the word vector of the non-keyword are weighted and averaged to generate the sentence vector of the target feedback content.
In the mode, the ratio of the word vector of the keyword segmentation to the sentence vector is further improved through the preset multiple, and the accuracy of user intention recognition is further improved. The preset multiple may be determined based on actual requirements and experience, for example, may be 3 times.
Optionally, in another embodiment of the present invention, the method for identifying user intention for feedback content may further include:
According to a preset mapping relation between preset segmentation words and sub-categories under the intention recognition result, determining sub-categories with mapping relation with preset segmentation words contained in target feedback content as sub-categories of the target feedback content.
Wherein the intent category may include a plurality of subcategories. For example, the intent category may include a file cleaning sub-category, a picture cleaning sub-category, and a video cleaning sub-category under the cleaning category. Different sub-categories are used to further subdivide the user intent of the feedback content so that the user intent is identified more accurately.
Each subcategory which can be contained in the intention category is pre-established with a mapping relation with a preset word segmentation. Under the same intention category, preset word segmentation mapped by different subcategories are mutually different. The preset word segmentation of each subcategory can be recorded by establishing a subcategory keyword dictionary.
The intent class is exemplified by the clean class. Each subcategory which can be contained in the cleaning category is pre-established with a mapping relation with a preset word segmentation. Under the same intention category, preset word segmentation mapped by different subcategories are mutually different. For example, the intent category is a cleaning category that includes three subcategories of file cleaning subcategories, picture cleaning subcategories, and video cleaning subcategories. The preset word having a mapping relation with the file cleaning sub-category may be "file", "manuscript", etc., the preset word having a mapping relation with the picture cleaning sub-category may be "picture", "photo", etc., and the preset word having a mapping relation with the video cleaning sub-category may be "video", "movie", etc. When the target feedback content contains "video", then 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 relation between the segmentation word and the sub-category under the intention recognition result. The target feedback content can be further subdivided, so that the user intention can be accurately identified.
Corresponding to the method for identifying user intention for feedback content provided in the above embodiment, as shown in fig. 3, an embodiment of the present invention further provides a device for identifying user intention for feedback content, where the device includes:
the content acquisition module 301 is configured to acquire target feedback content to be identified;
The category determining module 302 is 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 between each classification condition and the intention category, where the intention category corresponding to each classification condition is an intention category that can be represented by the feedback content that satisfies the classification condition;
The result determining module 303 is configured to determine, if the initial category is determined to be the specified category, an intention recognition result of the target feedback content by using a pre-trained intention classification model, otherwise, determine the initial category as the intention recognition result of the target feedback content;
The intention classification model is a classification model trained based on a plurality of sample feedback contents, wherein the plurality of sample feedback contents comprise sample feedback contents capable of representing the designated category and sample feedback contents capable of representing the similar intention category of the designated category.
Further, the apparatus further comprises:
The vector generation module is used for generating sentence vectors representing the target feedback content as target vectors before the category determination module executes the determination of the intention category corresponding to the classification condition met by the target feedback content as the initial category based on the preset corresponding relation between each classification condition and the intention category;
The distance calculation module is used for calculating the distance between the target vector and each type of cluster in the clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
the class cluster determining module is used for determining a target class cluster with the distance between the target class cluster and the target vector being 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 satisfied by the target feedback content based on a preset correspondence between each classification condition and the intention category and a pre-selected category.
Further, the category determining module is specifically configured to search for a classification condition corresponding to the pre-selected category from a preset correspondence relation between each classification condition and the intention category, determine a classification condition satisfied by the target feedback content from the searched classification conditions, and determine, as the initial category, the intention category corresponding to the classification condition satisfied by the target feedback content based on the correspondence relation.
Further, the vector generation module is specifically configured to determine a keyword that is included in the target feedback content, where the keyword is a word that belongs to a preset word type, generate a word vector of the keyword, and generate a sentence vector that represents the target feedback content based on the word vector of the keyword.
Further, the intention classification model is a intention classification model trained based on a random forest classification model.
Further, the apparatus further comprises:
The sub-category determining module is used for determining sub-categories with mapping relation with preset segmentation words contained in the target feedback content according to preset mapping relation between the preset segmentation words and sub-categories under the intention recognition result, and the sub-categories are used as sub-categories of the target feedback content.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404,
A memory 403 for storing a computer program;
The processor 401 is configured to implement the above-mentioned user intention recognition method steps for the feedback content when executing the program stored in the memory 403.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include 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 aforementioned processor.
The processor may be a general-purpose processor including a central Processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc., or may be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above methods for identifying user intention with respect to feedback content.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the user intent recognition methods for feedback content of the above embodiments.
In the above embodiments, it may be implemented in whole or in part 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for an apparatus, an electronic device, a computer readable storage medium, a computer program product, a description is relatively simple, as it is substantially similar to the method embodiments, as relevant see also part of the description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A user intention recognition method 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, wherein the intention category corresponding to each classification condition is an intention category which can be represented by the feedback content meeting the classification condition;
If the initial category is judged to be the appointed category, determining an intention recognition result of the target feedback content by utilizing a pre-trained intention classification model;
otherwise, determining the initial category as an intention recognition result of the target feedback content;
The intention classification model is a classification model trained based on a plurality of sample feedback contents, wherein the sample feedback contents can represent the sample feedback contents of the specified category and the sample feedback contents can represent the similar intention category of the specified category;
Before determining, as an initial category, an intention category corresponding to the classification condition satisfied by the target feedback content based on a preset correspondence relation between each classification condition and the intention category, the method further includes:
generating sentence vectors representing the target feedback content as target vectors;
Calculating the distance between the target vector and each type of cluster in a clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
determining a target class cluster with a distance from the target vector smaller than a preset threshold value, and determining an intention class associated with the target class cluster as a preselected class;
the determining, based on a preset correspondence relation between each classification condition and an intention category, the intention category corresponding to the classification condition satisfied by the target feedback content as an initial category includes:
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 pre-selected category;
The determining, based on the preset correspondence between the respective classification conditions and the intent categories and the pre-selected categories, the intent category corresponding to the classification condition satisfied by the target feedback content, as an initial category, includes:
Searching classification conditions corresponding to the preselected categories from preset corresponding relations of the classification conditions and the intention categories;
And determining the classification condition met by the target feedback content from the searched classification conditions, and determining the intention category corresponding to the classification condition met by the target feedback content based on the corresponding relation as an initial category.
2. The method of claim 1, wherein the generating sentence vector representing the target feedback content comprises:
Determining key word segmentation contained in the target feedback content, wherein the key word segmentation is a word segmentation belonging to a preset word segmentation type;
Generating word vectors of the key word segments, and generating sentence vectors representing the target feedback content based on the word vectors of the key word segments.
3. The method of any one of claims 1-2, wherein the intent classification model is an intent classification model trained based on a random forest classification model.
4. The method according to any one of claims 1-2, wherein the method further comprises:
and determining the sub-category with the mapping relation with the preset segmentation included in the target feedback content as the sub-category of the target feedback content according to the preset mapping relation between the preset segmentation and the sub-category under the intention recognition result.
5. A user intention recognition apparatus for feedback content, comprising:
The content acquisition module is used for acquiring target feedback content to be identified;
the system comprises a category determining module, a target feedback content determining module and a feedback content determining module, wherein the category determining module is used for determining an intention category corresponding to a 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, wherein 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 result determining module is used for determining the 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 the intention recognition result of the target feedback content;
The intention classification model is a classification model trained based on a plurality of sample feedback contents, wherein the sample feedback contents can represent the sample feedback contents of the specified category and the sample feedback contents can represent the similar intention category of the specified category;
The apparatus further comprises:
A vector generation module, configured to, before the category determination module performs determining, based on a preset correspondence relation between each classification condition and an intention category, an intention category corresponding to a classification condition satisfied by the target feedback content, as an initial category, generate, as a target vector, a sentence vector representing the target feedback content;
the example calculation module is used for calculating the distance between the target vector and each type of cluster in a clustering space, wherein the clustering space is established based on sentence vectors of sample feedback content, and each type of cluster in the clustering space is associated with an intention type;
The class cluster determining module is used for determining a target class cluster with the distance between the target cluster and the target vector being 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 a classification condition satisfied by the target feedback content based on a preset correspondence between each classification condition and the intention category and the pre-selected category;
The category determining module is specifically configured to search for a classification condition corresponding to the pre-selected category from preset correspondence relation between each classification condition and an intention category, determine a classification condition satisfied by the target feedback content from the searched classification conditions, and determine, based on the correspondence relation, the intention category corresponding to the classification condition satisfied by the target feedback content as an initial category.
6. The apparatus according to claim 5, wherein the vector generation module is specifically configured to determine a keyword that is included in the target feedback content, where the keyword is a word that belongs to a preset word type, generate a word vector of the keyword, and generate a sentence vector that represents the target feedback content based on the word vector of the keyword.
7. The apparatus of any one of claims 5-6, wherein the intent classification model is an intent classification model trained based on a random forest classification model.
8. The apparatus according to any one of claims 5-6, further comprising:
The subcategory determining module is used for determining the subcategory which has a mapping relation with the preset word included in the target feedback content as the subcategory of the target feedback content according to the preset mapping relation between the preset word and the subcategory under the intention recognition result.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
A processor for carrying out the method steps of any one of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
CN202011062181.2A 2020-09-30 2020-09-30 Method, device and electronic device for identifying user intention based on feedback content Active CN112163415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011062181.2A CN112163415B (en) 2020-09-30 2020-09-30 Method, device and electronic device for identifying user intention based on feedback content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011062181.2A CN112163415B (en) 2020-09-30 2020-09-30 Method, device and electronic device for identifying user intention based on feedback content

Publications (2)

Publication Number Publication Date
CN112163415A CN112163415A (en) 2021-01-01
CN112163415B true CN112163415B (en) 2024-12-24

Family

ID=73860862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011062181.2A Active CN112163415B (en) 2020-09-30 2020-09-30 Method, device and electronic device for identifying user intention based on feedback content

Country Status (1)

Country Link
CN (1) CN112163415B (en)

Families Citing this family (2)

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

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 北京金山安全软件有限公司 A method, device and electronic device for identifying user intent

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11061955B2 (en) * 2018-09-21 2021-07-13 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 北京金山安全软件有限公司 A method, device and electronic device for identifying user intent

Also Published As

Publication number Publication date
CN112163415A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN110888990B (en) Text recommendation method, device, equipment and medium
CN108073568B (en) Keyword extraction method and device
CN108491529B (en) Information recommendation method and device
CN112163424B (en) Data labeling method, device, equipment and medium
CN109189990B (en) Search word generation method and device and electronic equipment
CN112347778A (en) Keyword extraction method and device, terminal equipment and storage medium
CN108376129B (en) Error correction method and device
CN111460153A (en) Hot topic extraction method and device, terminal device and storage medium
US20230214679A1 (en) Extracting and classifying entities from digital content items
CN110210028A (en) For domain feature words extracting method, device, equipment and the medium of speech translation text
CN111767713A (en) Keyword extraction method and device, electronic equipment and storage medium
CN109388634B (en) Address information processing method, terminal device and computer readable storage medium
CN109492217B (en) Word segmentation method based on machine learning and terminal equipment
CN112528703B (en) Method and device for identifying table structure and electronic equipment
CN108027814A (en) Disable word recognition method and device
Bykau et al. Fine-grained controversy detection in Wikipedia
CN112163415B (en) Method, device and electronic device for identifying user intention based on feedback content
CN108021713B (en) Document clustering method and device
CN111984867B (en) Network resource determining method and device
CN112199500A (en) Emotional tendency identification method and device for comments and electronic equipment
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium
CN113282831B (en) Recommendation method, device, electronic device and storage medium for searching information
CN111191095A (en) Web page data acquisition method, device, equipment and medium
CN115526173A (en) A method and system for extracting feature words based on computer information technology
CN113761196A (en) Text clustering method and system, electronic device and storage 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
GR01 Patent grant
GR01 Patent grant