CN114911929A - Classification model training method, text mining equipment and storage medium - Google Patents

Classification model training method, text mining equipment and storage medium Download PDF

Info

Publication number
CN114911929A
CN114911929A CN202210372329.5A CN202210372329A CN114911929A CN 114911929 A CN114911929 A CN 114911929A CN 202210372329 A CN202210372329 A CN 202210372329A CN 114911929 A CN114911929 A CN 114911929A
Authority
CN
China
Prior art keywords
training
text
classification model
scene
training data
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
CN202210372329.5A
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 Sinovoice Technology Co Ltd
Original Assignee
Beijing Sinovoice 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 Sinovoice Technology Co Ltd filed Critical Beijing Sinovoice Technology Co Ltd
Priority to CN202210372329.5A priority Critical patent/CN114911929A/en
Publication of CN114911929A publication Critical patent/CN114911929A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a classification model training method, a text mining method, equipment and a medium, and relates to the technical field of computers. The training method takes the obtained plurality of dialog texts as training data, and carries out training on the classification model according to the training data to obtain the classification model finished by stage training. The training data are screened in a clustering analysis mode, and are labeled according to scene categories, so that the labeling amount of the training data can be greatly reduced. And judging whether the classification model trained in the stage needs to be trained continuously or not according to the difference information determined by the training data. Therefore, under the condition that the difference information accords with the scene mining conditions, more scene categories can be mined by continuous training, so that more detailed scene categories and related texts with less information can be mined in the text mining process, and the statistical analysis of the related dialog texts is facilitated.

Description

Classification model training method, text mining equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a classification model training method, a text mining method, a device and a storage medium.
Background
In some online business scenarios, business personnel may retain a large amount of consulting data when providing business consultations for clients. Professional speaking in consulting data is worth learning for the less senior business personnel. In the prior art, a classification model is commonly used to perform statistical analysis on the advisory data, so that learning can be performed based on different scene categories. However, the classification model requires a large amount of labeled data in the training process, and lacks the ability to find new scenes after the fixed scene classification.
Disclosure of Invention
In view of the above, the present invention has been made to provide a classification model training method, a text mining method, an apparatus, and a storage medium that overcome or at least partially solve the above problems.
According to a first aspect of the present invention, there is provided a classification model training method, the method comprising:
acquiring a plurality of dialog texts as training data;
training the classification model according to the training data to obtain a classification model after stage training;
determining difference information based on the training data, and judging whether the classification model finished by the stage training meets scene mining conditions or not according to the difference information;
if the difference information accords with the scene mining condition, updating training data according to the training data and the classification model finished by the stage training and continuing training;
if the difference information does not accord with the scene mining condition, the classification model trained in the stage is used as the trained classification model;
wherein, training is carried out on the classification model according to the training data to obtain the classification model with the stage training completed, and the method comprises the following steps:
performing cluster analysis on the training data to determine a plurality of training clusters;
determining a scene category corresponding to a training class cluster, and marking a text in the training class cluster as the scene category;
and training a classification model by using the labeled text data to obtain a classification model after stage training.
According to a second aspect of the present invention, there is also provided a text mining method, the method comprising:
receiving conversation information, and acquiring a conversation text of a first user from the conversation information;
inputting the dialog text into a classification model for classification and recognition to determine a corresponding target scene category, executing training by the classification model through training data to obtain a classification model finished by stage training, determining difference information based on the training data, judging whether the classification model finished by stage training meets scene mining conditions, and determining whether to update the training data according to a judgment result to continue to obtain the classification model finished by stage training;
inquiring a target reply text corresponding to the target scene category;
and adopting the target reply text as a dialog text of a second user, and feeding back the dialog text of the first user.
According to a third aspect of the present invention, there is also provided an electronic apparatus comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform any of the methods described above.
According to a fourth aspect of the invention, there is also provided a computer readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform any of the methods described above.
According to the scheme of the invention, the obtained plurality of dialog texts are used as training data, and training is performed on the classification model according to the training data to obtain the classification model finished by stage training. The training data are screened in a clustering analysis mode, and are labeled according to scene categories, so that the labeling amount of the training data can be greatly reduced. And judging whether the classification model trained in the stage needs to be trained continuously or not according to the difference information determined by the training data. More scene categories can be mined by continuing training under the condition that the difference information meets the scene mining conditions. In the text mining process, more detailed scene types and related texts with less information amount can be mined, so that the statistical analysis of the related dialog texts is facilitated.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
In the drawings:
FIG. 1 is a flowchart illustrating steps of a classification model training method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of another classification model training method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a text mining method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of display contents of a display page of a first client according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a display content of a display page of a first client according to an embodiment of the present invention;
fig. 6 is a schematic diagram of another display content of a display page of the first client according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a display content of a display page of a client according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of another display content of a display page of a client according to an embodiment of the present invention;
FIG. 9 is a block diagram of a classification model training apparatus according to an embodiment of the present invention;
fig. 10 is a block diagram of a text data mining apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Referring to fig. 1, a classification model training method provided in an embodiment of the present invention is shown, where the method may include:
s101, a plurality of dialog texts are obtained to serve as training data.
And S102, training the classification model according to the training data to obtain the classification model finished by stage training.
In the embodiment of the invention, in some voice conversation scenes or text conversation scenes, conversation records in the conversation process are stored under the authorization of a client. Therefore, a plurality of dialog texts can be determined based on the collected dialog records. The customer can be used as a first user, and the service personnel can be used as a second user. If the dialog notes are stored in the form of speech data, the dialog notes can be subjected to a speech conversion, so that a corresponding dialog text is obtained. After a plurality of dialog texts are obtained, the dialog texts are used as training data, training is carried out on a preset classification model until the classification model meets a first training condition, the training on the classification model is stopped, and the classification model after the training is stopped is determined to be a classification model after stage training is finished. In one example, the first training condition may be that the loss function of the classification model no longer falls or that the magnitude of the fall is small.
Training the classification model according to the training data to obtain a classification model finished by stage training, and the method comprises the following steps of:
and performing cluster analysis on the training data to determine a plurality of training clusters.
Determining a scene category corresponding to a training class cluster, and marking the text in the training class cluster as the scene category.
And training a classification model by using the labeled text data to obtain a classification model after stage training.
In the embodiment of the invention, the training data can be subjected to cluster analysis to determine a plurality of training clusters, and corresponding scene types can be determined from the plurality of training clusters. Wherein, each scene category can be determined according to the text semantic information in each training category cluster. After the scene category corresponding to the training class cluster is determined, the text in each training class cluster can be labeled as the corresponding scene category. And marking scene categories for each training category cluster to form text data with marks. Therefore, each dialog text is prevented from being labeled, and the labeling amount of the training data is greatly reduced. And then training the labeled text data on a preset classification model to obtain a classification model finished by stage training.
S103, determining difference information based on the training data, and judging whether the classification model finished in the stage training meets scene mining conditions or not according to the difference information.
And S104, if the difference information accords with scene mining conditions, updating training data according to the training data and the classification model finished by the stage training and continuing training.
And S105, if the difference information does not accord with the scene mining condition, taking the classification model finished in the stage training as the classification model finished in the training.
In the embodiment of the invention, after the scene category corresponding to the training class cluster is determined, the difference information of the text data in the same training class cluster can be determined. Wherein, the difference information can be understood as semantic similarity of semantic information of different texts. Therefore, whether the classification model finished by the stage training meets the scene mining condition or not can be judged according to the difference information.
In one example, the scene mining condition is used to evaluate whether the scene classification of the classification model finished by the stage training needs to be refined. For example, when the semantic similarity of semantic information of different texts in the same training class cluster is high, it is indicated that the boundary between the two corresponding texts is not clear, and the classification effect is not obvious. Therefore, a semantic threshold value can be preset, and when the semantic similarity is smaller than the semantic threshold value, the difference information is determined to be not in accordance with the scene mining condition, namely the classification effect is obvious, so that the classification model trained in the stage is directly used as the trained classification model. And when the semantic similarity is equal to or greater than the semantic threshold, determining that the difference information meets scene mining conditions, at the moment, updating training data, continuing to train the classification model after the stage training is finished by the updated training data until the classification model after the stage training is finished meets the first training condition, stopping training the classification model, and determining the classification model after the stage training is finished as the trained classification model.
To sum up, in the classification model training method provided by the embodiment of the present invention, the obtained multiple dialog texts are used as training data, and training is performed on the classification model according to the training data, so as to obtain a classification model completed by stage training. The training data are screened in a clustering analysis mode, and are labeled according to scene categories, so that the labeling amount of the training data can be greatly reduced. And judging whether the classification model trained in the stage needs to be trained continuously or not according to the difference information determined by the training data. Therefore, under the condition that the difference information accords with the scene mining conditions, more scene categories can be mined by continuous training, so that more detailed scene categories and related texts with less information can be mined in the text mining process, and the statistical analysis of the related dialog texts is facilitated.
Referring to fig. 2, another classification model training method provided in an embodiment of the present invention is shown, where the method may include:
s201, acquiring a plurality of dialog texts as training data.
S202, training the classification model according to the training data to obtain the classification model finished by stage training.
In the embodiment of the invention, after a plurality of dialog texts are obtained, the dialog texts are used as training data, the preset classification model is trained until the classification model meets the first training condition, the training of the classification model is stopped, and the classification model after the training is stopped is determined as the classification model after the stage training is finished.
And performing cluster analysis on the training data to determine a plurality of training clusters, and determining corresponding scene categories from the plurality of training clusters. The first clustering model may be preset to perform a first clustering analysis on the training data. For example, the first clustering model may employ a K-means clustering algorithm. According to the clustering quantity, two dialog texts with a close distance can be determined as a cluster. Therefore, when performing a statistical analysis of scene categories for a plurality of dialog texts, the number of class clusters m1 that the first clustering model outputs may be predetermined, wherein the number of class clusters m1 may be determined according to the actual number of scene categories n1, and is not limited herein. However, the number of class clusters m1 is larger than the number of scene classes n 1. The number m of the class clusters may be the number n of the scene categories plus a preset threshold. Wherein the range of the preset threshold value can be set to be between 3 and 10. For example, when it is clear that the initial service scenario includes a sales scenario and an after-sales scenario, the corresponding scenario category number n1 is determined to be 2. The number m1 of clusters may be 3, 4, 5 or 12, so as to avoid the clustering result from being too divergent.
After a first cluster analysis of the first cluster model, m1 training class clusters are determined. In one example, after a plurality of training clusters are determined, a display page can be provided to display the plurality of training clusters, so that the clusters with clear scene categories can be screened out from the plurality of training clusters based on triggering of a screening control, and the training clusters can be subjected to category marking according to a preset service scene. For example, 2 training class clusters with clear service scenarios are screened from 3 training class clusters and are respectively subjected to class marking. When the category marking is carried out, an editing control can be provided in the display page so that a user can define the corresponding scene category by self. And finishing the class marking of the training class cluster based on the triggering of the editing control. For example, after completing the category labeling, the text data corresponding to the sales scene and the text data corresponding to the after-sales scene are obtained.
And labeling the scene category of each training class cluster, so that texts in the training class clusters subjected to category labeling respectively form text data with labels. Therefore, the step of labeling each dialog text in the model training process is avoided. The amount of training data annotated is greatly reduced. And then training the labeled text data on a preset classification model to obtain a classification model M1 which is trained in stages. The classification model may be a BERT-base model comprising N hidden layers. When the classification model is trained for the first time, the text features output by the nth hidden layer can be classified, the number of the scene classes corresponding to the classification is N1, and the obtained classification model is the classification model M1 trained in the stage.
In an optional embodiment of the present invention, in the process of inputting the training data into the first clustering model to perform the first clustering analysis and outputting a plurality of training clusters, firstly, word division may be performed on each dialog text in the training data to determine a plurality of corresponding text segments. And performing clustering analysis according to semantic information of the text participles of each dialog text. In some dialogue texts, semantic information corresponding to some text participles is classified, and the clustering analysis effect can be improved. For example, the intentions of the user asking for "how long to get express to Beijing" and "how long to get express to Shanghai" are consistent. Both Shanghai and Beijing may be categorized as addresses. Therefore, before semantic analysis, named entity recognition is carried out on a plurality of text participles, and therefore the target named entity needing to be classified is determined. Wherein the target named entity comprises at least one of: person name, organization name, and place name. After the target named entity is determined, the target named entity can be replaced by the corresponding target keyword. The target keyword may be a word associated with the target named entity.
After the target named entity is completely replaced, the replaced text participles are respectively converted into text word vector or text TFIDF (term frequency-inverse text frequency index) values. And then inputting a plurality of text word vectors or text TFIDF values into the first clustering model, and executing the clustering analysis operation.
S203, determining difference information based on the training data.
And S204, providing a display page to display the difference information, and acquiring mining operation information based on the display page.
And S205, determining whether the classification model after the stage training meets the scene mining condition or not according to the mining operation information.
According to the embodiment of the invention, after the scene type corresponding to the training class cluster is determined, the difference information of the text data in the same training class cluster can be determined. Wherein, the difference information can be understood as semantic similarity of semantic information of different texts. Therefore, whether the classification model finished by the stage training meets the scene mining condition or not can be judged according to the difference information.
In one example, a display page may be provided, the difference information is displayed in the display page, a first selection control is arranged in the display page, and mining operation information corresponding to the display page is acquired based on triggering of the first selection control. For example, the mining operation information may include yes or no, and when the mining operation information is yes, it is determined that the classification model after the stage training is completed meets the scene mining condition, and step S206 is executed; and when the mining operation information is negative, determining that the classification model trained in the stage does not accord with the scene mining condition, and executing the step S208.
And S206, inputting the labeled text data into the classification model after stage training, and performing feature extraction to obtain a corresponding feature text.
And S207, adopting the characteristic text as training data.
In the embodiment of the invention, the labeled text data is input into a classification model which is trained in a stage, and feature extraction is carried out. The feature extraction can be understood as a hidden layer in a classification model finished through stage training, and corresponding feature texts are directly output. In one example, when feature extraction is performed for the first time, the output feature of the 1 st hidden layer is determined as a corresponding feature text, and the feature text is used as new training data. Consider that the closer the hidden layer to the output layer, the more accurate the text features are output. When the first feature extraction is performed, the text features output by the (N-1) th hidden layer can be determined as feature texts, and the training data is updated according to the feature texts. Step S202 is then performed to continue training the classification model after the training of the stage by the updated training data.
And after the feature text is used as new training data, training a classification model according to the training data. Due to the fact that further mining is needed for scene categories, when first clustering analysis is conducted on training data according to a first clustering model, the number of clusters output by the first clustering model is adjusted to be m2, wherein the number m2 of clusters is larger than the number n1 of scene categories. After a first cluster analysis by the first cluster model, m2 training class clusters are determined. The m2 training class clusters are displayed on the display page, so that class clusters with definite scene classes can be screened from the m2 training class clusters based on triggering of the screening control, the scene class number n2 can be obtained at the moment according to the marking of the scene classes on the training class clusters, and the scene class number n2 is larger than the scene class number n 1. For example, based on a sales scenario and an after-sales scenario, the scenario categories are further divided into: a product consultation scene, a purchase approval scene, an after-sale approval scene, a goods exchange refusal scene and the like.
And marking the scene type of each training type cluster, so that texts in the training type clusters subjected to type marking respectively form text data with marks. And then continuously training the classification model M1 which is trained in the stage by using the labeled text data to obtain a classification model M2 which is trained in the stage and can classify n2 scene classes, so that the number of the scene classes is increased by the classification model M2 which is trained in the stage compared with the classification model M1 which is trained in the stage.
Then, determining difference information based on training data of a classification model M2 which is used for training the stage, judging whether the classification model M2 which is trained in the stage meets the scene mining condition according to the difference information, and executing the step S206 when the classification model M2 which is trained in the stage meets the scene mining condition; when it is determined that the classification model M2 after the stage training does not meet the scene mining condition, step S208 is performed. For example, when the classification model M2 trained in the stage is determined to meet the scene mining conditions, the scene category needs to be further refined. If the product consultation scene is further divided into: a query price scenario, a query size scenario, a query style scenario, etc. And by analogy, finally obtaining the trained classification model. The trained classification model is applied to text mining, so that accurate classification of the dialog text of the client can be realized, and the target reply text with high matching degree can be determined based on the scene category obtained by accurate classification, so that the service level of business personnel can be improved, and the user experience is improved.
And S208, taking the classification model after the stage training as the trained classification model.
In the embodiment of the invention, the difference information is determined to be not in accordance with the scene mining condition, namely the classification effect is obvious, so that the classification model trained in the stage is directly used as the trained classification model.
Referring to fig. 3, a flowchart illustrating steps of a text mining method according to an embodiment of the present invention is shown, where the method may include:
s301, receiving dialog information, and acquiring a dialog text of a first user from the dialog information.
S302, inputting the dialog text into a classification model for classification and recognition, determining a corresponding target scene category, executing training by the classification model through training data to obtain a classification model finished by stage training, determining difference information based on the training data, judging whether the classification model finished by stage training meets scene mining conditions, and determining whether to update the training data according to a judgment result to continue to obtain the classification model finished by training in the stage.
S303, inquiring a target reply text corresponding to the target scene type.
S304, the target reply text is adopted as the dialog text of the second user, and the dialog text of the first user is fed back.
In the embodiment of the invention, the classification model is obtained by training through the classification model training method. And after the dialog information is acquired, acquiring the dialog text of the first user from the dialog information. And inputting the dialog text of the first user into the classification model for classification and identification to obtain a target scene category corresponding to the dialog text of the first user. And then acquiring the historical dialogue text of the second user in the dialogue record, wherein the scene category corresponding to the historical dialogue text of the second user is labeled, and the quantity and the type of the scene category corresponding to the historical dialogue text of the second user are consistent with the quantity and the type of the scene category identified by the classification model.
Therefore, after the target scene type corresponding to the dialog text of the first user is determined, the historical dialog text of the second user in the target scene type is inquired in the database and determined as the target reply text, and the target reply text is used as the dialog text of the second user and used for feedback of the dialog text of the first user. The target reply text may be multiple pieces, and may be presented in a manner of at least one cluster. In one example, when the target reply text is multiple, one of the target reply texts can be determined as the dialog text of the second user through a clicking operation on a selection control in the display page, and the dialog text is fed back to the first user. Therefore, even a business person with low seniority can dig out the dialogs which are most suitable for responding to the dialog text of the first user from the historical dialog text of the second user. Therefore, business personnel can learn conveniently, the service level is improved, and meanwhile, the user experience of the first user is improved.
In another example, if there are a large number of target reply texts in the same target scene category, in order to facilitate mining of distinctive reply methods, a preset second clustering model may be used to perform second clustering analysis on the target reply texts. The number of the class clusters output by the second clustering model dynamically changes with the difference of the semantic information of the target reply text. It can adopt DBSCAN (Density-Based Spatial Clustering of Applications with Noise, Density-Based Noise application Spatial Clustering) algorithm. Therefore, in the second clustering analysis process, a plurality of target reply texts with different reply modes are obtained without setting the specific cluster number. Therefore, one of the target reply texts can be determined as the dialog text of the second user through clicking operation on the selection control in the display page and fed back to the first user.
In one example, referring to fig. 4 and 5, a display page is provided at a first client of a first user and a second client of a second user to display the dialog message. And a classification control (such as a circle in the middle of the page) corresponding to each dialog text of the first user is arranged in the display page corresponding to the second user, and a classification instruction is generated and sent to the server according to the triggering of the classification control. And inputting the dialog text corresponding to the classification control into a classification model for classification recognition, determining a target reply text determined by the target scene classification, and sending the target reply text to a second client. And displaying the corresponding target reply text in the display page corresponding to the second user. Referring to fig. 6, each target reply text matches with a reply selection control (such as an arrow in the middle of a page), and based on the triggering of the reply selection control, the target reply text corresponding to the reply selection control is sent to the first user as the dialog text of the second user.
In another example, the first client and the second client may be the same client. Referring to fig. 7, a user may input dialog text, which defaults to the dialog text of the first user, in a display page of the client. And inputting the dialog text of the first user into the classification model for classification and identification based on the trigger of the classification control in the display page, and obtaining the target scene category corresponding to the dialog text of the first user. And then acquiring the historical dialogue text of the second user in the dialogue record, wherein the scene category corresponding to the historical dialogue text of the second user is labeled, and the quantity and the type of the scene category corresponding to the historical dialogue text of the second user are consistent with the quantity and the type of the scene category identified by the classification model.
Therefore, after the target scene type corresponding to the dialog text of the first user is determined, the historical dialog text of the second user in the target scene type is queried in the database and determined as the target reply text, the target reply text is used as the dialog text of the second user for feedback of the dialog text of the first user, and the dialog text of the second user is displayed in the client of the user, which is shown in fig. 8. Therefore, in a business training and learning scene of new employees, the new employees can customize the conversation text of the first user, so that different dialogues can be learned based on the target reply text obtained from the conversation text of different first users. These target reply texts may provide materials for new employee training or for old employees to learn each other.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 9, a classification model training apparatus provided in an embodiment of the present invention is shown, where the apparatus may include:
a data obtaining module 901, configured to obtain a plurality of dialog texts as training data.
And a model stage training module 902, configured to perform training on the classification model according to the training data to obtain a classification model after stage training.
And a condition judgment module 903, configured to determine difference information based on the training data, and judge whether the classification model finished in the stage training meets a scene mining condition according to the difference information.
And a first training module 904, configured to update training data according to the training data and the classification model completed by the stage training and continue training if the difference information meets the scene mining condition.
And a second training module 905, configured to take the classification model after the stage training as a trained classification model if the difference information does not meet the scene mining condition.
Wherein the model phase training module is further configured to:
and performing cluster analysis on the training data to determine a plurality of training clusters.
Determining a scene category corresponding to a training class cluster, and marking the text in the training class cluster as the scene category.
And training a classification model by using the labeled text data to obtain a classification model after stage training.
An optional invention embodiment, determining difference information based on the training data, comprising:
and analyzing texts of the training class clusters corresponding to different scene classes to determine difference information.
In an alternative embodiment, the first training module may include:
and the characteristic extraction submodule is used for inputting the labeled text data into the classification model which is trained in the stage, and extracting the characteristics to obtain the corresponding characteristic text.
And the data updating submodule is used for adopting the characteristic text as training data.
In an optional embodiment of the invention, the model phase training module is further configured to:
and inputting the training data into a first clustering model for first clustering analysis, and outputting a plurality of training clusters, wherein the number of the training clusters is preset by the first clustering model.
In an alternative embodiment, the model phase training module may include:
and the word segmentation sub-module is used for carrying out word segmentation on the training data and determining a plurality of corresponding text word segments.
And the word segmentation conversion sub-module is used for converting the text word segmentation into a text word vector or a text TFIDF value respectively.
And the class cluster output sub-module is used for inputting a plurality of text word vectors or text TFIDF values into the first clustering model for first clustering analysis and outputting a plurality of training class clusters.
In an optional embodiment of the present invention, the cluster output sub-module may further include:
the recognition unit is used for carrying out named entity recognition on the text participles and determining a target named entity in the text participles, wherein the target named entity at least comprises one of the following entities: person name, organization name, and place name.
And the replacing unit is used for replacing the target named entity by adopting the target keyword and respectively converting the replaced text participles into text TFIDF values.
In an alternative embodiment, the method may further include:
and the information display module is used for providing a display page to display the difference information and acquiring mining operation information based on the display page.
And the condition determining module is used for determining whether the classification model after the stage training meets the scene mining conditions or not according to the mining operation information.
Referring to fig. 10, a text mining apparatus according to an embodiment of the present invention is shown, where the apparatus may include:
a dialog receiving module 1001, configured to receive dialog information, and obtain a dialog text of a first user from the dialog information.
The scene recognition module 1002 is configured to input the dialog text into a classification model for classification recognition, determine a corresponding target scene category, execute training by the classification model through training data to obtain a classification model after stage training, determine difference information based on the training data, determine whether the classification model after stage training meets scene mining conditions, and determine whether to update the training data according to a determination result to continue to obtain the classification model after stage training.
A text query module 1003, configured to query the target reply text corresponding to the target scene category.
And the text feedback module 1004 is configured to use the target reply text as a dialog text of the second user to feed back the dialog text of the first user.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but this specification is not necessarily detailed herein for reasons of space limitation.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods of the embodiments described above.
A computer-readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the method of the above embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be 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 terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The classification model training method, the text mining method, the classification model training device and the text mining device provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A classification model training method, the method comprising:
acquiring a plurality of dialog texts as training data;
training the classification model according to the training data to obtain a classification model after stage training;
determining difference information based on the training data, and judging whether the classification model finished by the stage training meets scene mining conditions or not according to the difference information;
if the difference information accords with the scene mining condition, updating training data according to the training data and the classification model finished by the stage training and continuing training;
if the difference information does not accord with the scene mining condition, the classification model trained in the stage is used as the trained classification model;
wherein, training is carried out on the classification model according to the training data to obtain the classification model with the stage training completed, and the method comprises the following steps:
performing cluster analysis on the training data to determine a plurality of training clusters;
determining a scene category corresponding to a training class cluster, and marking a text in the training class cluster as the scene category;
and training a classification model by using the labeled text data to obtain a classification model after stage training.
2. The classification model training method according to claim 1, wherein determining difference information based on the training data comprises:
and analyzing the texts of the training class clusters corresponding to different scene categories to determine difference information.
3. The method for training classification models according to claim 1, wherein the updating training data according to the training data and the classification models completed by the stage training comprises:
inputting the labeled text data into a classification model after stage training, and performing feature extraction to obtain a corresponding feature text;
and adopting the characteristic text as training data.
4. The method for training classification models according to claim 1, wherein the performing cluster analysis on the training data to determine a plurality of training clusters comprises:
and inputting the training data into a first clustering model for first clustering analysis, and outputting a plurality of training clusters, wherein the number of the training clusters is preset by the first clustering model.
5. The method for training classification models according to claim 4, wherein the inputting the training data into a first clustering model for a first clustering analysis and outputting a plurality of training clusters comprises:
performing word division on the training data to determine a plurality of corresponding text participles;
converting a plurality of text participles into text word vectors or text TFIDF values respectively;
and inputting a plurality of text word vectors or text TFIDF values into a first clustering model for first clustering analysis, and outputting a plurality of training clusters.
6. The method of training classification models of claim 5, wherein the converting the plurality of text segments into text TFIDF values respectively comprises:
carrying out named entity recognition on the text participles, and determining a target named entity in the text participles, wherein the target named entity at least comprises one of the following entities: person name, organization name, and place name;
and replacing the target named entity by adopting the target keyword, and respectively converting the replaced text participles into text TFIDF values.
7. The classification model training method according to claim 2, further comprising:
providing a display page to display the difference information, and acquiring mining operation information based on the display page;
and determining whether the classification model after the stage training meets the scene mining conditions or not according to the mining operation information.
8. A method of text mining, the method comprising:
receiving conversation information, and acquiring a conversation text of a first user from the conversation information;
inputting the dialog text into a classification model for classification and recognition to determine a corresponding target scene category, executing training by the classification model through training data to obtain a classification model finished by stage training, determining difference information based on the training data, judging whether the classification model finished by stage training meets scene mining conditions, and determining whether to update the training data according to a judgment result to continue to obtain the classification model finished by stage training;
inquiring a target reply text corresponding to the target scene category;
and adopting the target reply text as a dialog text of a second user, and feeding back the dialog text of the first user.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-8.
10. A computer-readable storage medium storing a computer program for use in conjunction with an electronic device, the computer program being executable by a processor to perform the method of any of claims 1-8.
CN202210372329.5A 2022-04-11 2022-04-11 Classification model training method, text mining equipment and storage medium Pending CN114911929A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210372329.5A CN114911929A (en) 2022-04-11 2022-04-11 Classification model training method, text mining equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210372329.5A CN114911929A (en) 2022-04-11 2022-04-11 Classification model training method, text mining equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114911929A true CN114911929A (en) 2022-08-16

Family

ID=82763219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210372329.5A Pending CN114911929A (en) 2022-04-11 2022-04-11 Classification model training method, text mining equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114911929A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510330A (en) * 2022-11-01 2022-12-23 潍坊医学院附属医院 Intelligent information processing method and system based on data mining
CN115658903A (en) * 2022-11-01 2023-01-31 百度在线网络技术(北京)有限公司 Text classification method, model training method, related device and electronic equipment
CN116756293A (en) * 2023-08-11 2023-09-15 之江实验室 Model training method and device, storage medium and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115510330A (en) * 2022-11-01 2022-12-23 潍坊医学院附属医院 Intelligent information processing method and system based on data mining
CN115658903A (en) * 2022-11-01 2023-01-31 百度在线网络技术(北京)有限公司 Text classification method, model training method, related device and electronic equipment
CN115658903B (en) * 2022-11-01 2023-09-05 百度在线网络技术(北京)有限公司 Text classification method, model training method, related device and electronic equipment
CN116756293A (en) * 2023-08-11 2023-09-15 之江实验室 Model training method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11507850B2 (en) System and method for call centre management
Tang et al. Incorporating textual and management factors into financial distress prediction: A comparative study of machine learning methods
CN109829629B (en) Risk analysis report generation method, apparatus, computer device and storage medium
CN104781837B (en) System and method for forming predictions using event-based sentiment analysis
CN114911929A (en) Classification model training method, text mining equipment and storage medium
US20190340201A1 (en) Computerized domain expert
US20120259801A1 (en) Transfer of learning for query classification
CN107291840B (en) User attribute prediction model construction method and device
CN113177700B (en) Risk assessment method, system, electronic equipment and storage medium
JP7128919B2 (en) Skill term evaluation method and device, electronic device, computer readable medium
WO2020139865A1 (en) Systems and methods for improved automated conversations
CN111723178A (en) Method, system, server and equipment for providing sales suggestions in real time
US11373041B2 (en) Text classification using models with complementary granularity and accuracy
CN111581360A (en) Method, system and equipment for assisting customer service
CN111222837A (en) Intelligent interviewing method, system, equipment and computer storage medium
WO2022169770A1 (en) Systems and methods for managing, distributing and deploying a recursive decisioning system based on continuously updating machine learning models
CN113988195A (en) Private domain traffic clue mining method and device, vehicle and readable medium
CN116049411B (en) Information matching method, device, equipment and readable storage medium
CN110489517B (en) Automatic learning method and system of virtual assistant
CN112668334B (en) Entity identification method, electronic equipment and storage device
CN113609833A (en) Dynamic generation method and device of file, computer equipment and storage medium
US20230086653A1 (en) Systems and methods for automated response to online reviews
US20230027530A1 (en) Artificial intelligence (ai) engine assisted creation of production descriptions
KR20180052866A (en) Method for providing information on trademark infringement
CN116703416A (en) Method, system, apparatus and medium for processing user feedback

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