CN117436551B - Training method and system for intelligent customer service model - Google Patents

Training method and system for intelligent customer service model Download PDF

Info

Publication number
CN117436551B
CN117436551B CN202311736324.7A CN202311736324A CN117436551B CN 117436551 B CN117436551 B CN 117436551B CN 202311736324 A CN202311736324 A CN 202311736324A CN 117436551 B CN117436551 B CN 117436551B
Authority
CN
China
Prior art keywords
sample
unlabeled
customer service
training
answer
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
CN202311736324.7A
Other languages
Chinese (zh)
Other versions
CN117436551A (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.)
Hangzhou Yugu Technology Co ltd
Original Assignee
Hangzhou Yugu 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 Hangzhou Yugu Technology Co ltd filed Critical Hangzhou Yugu Technology Co ltd
Priority to CN202311736324.7A priority Critical patent/CN117436551B/en
Publication of CN117436551A publication Critical patent/CN117436551A/en
Application granted granted Critical
Publication of CN117436551B publication Critical patent/CN117436551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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/3344Query execution using natural language analysis
    • 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/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2155Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/0895Weakly supervised learning, e.g. semi-supervised or self-supervised learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction

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)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Medical Informatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to a training method and a training system for an intelligent customer service model, wherein the method comprises the following steps: obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training; if the predicted answer is an incorrect answer, manually marking an unlabeled sample corresponding to the incorrect answer to obtain a first marked sample; if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on the standard question library to obtain a second labeled sample; based on the first labeling sample and the second labeling sample, final training of the intelligent customer service model is completed. According to the method and the device for training the intelligent customer service model, the problem of how to train the intelligent customer service model with high accuracy and low cost is solved, the intelligent customer service model which is primarily trained is used for carrying out targeted screening marking on unlabeled samples, the cost of training sample marking is reduced, the final training of the intelligent customer service model is completed based on the screened marked samples, and the model accuracy is effectively improved.

Description

Training method and system for intelligent customer service model
Technical Field
The application relates to the technical field of machine learning, in particular to a training method and system of an intelligent customer service model.
Background
The existing intelligent customer service model is mainly divided into a supervised one and an unsupervised one, wherein the unsupervised one is mainly represented by simcse model, the simcse algorithm uses droupout to increase noise on the text, so that a positive sample pair is constructed, and the negative sample pair is other sentences selected in batch, however, due to the lack of label data in the method, the accuracy of the model is low, and the model is difficult to directly apply to actual business in general. The other mode is based on supervised model training, and a large number of marked samples are collected in the early stage of the method, and then model training and prediction are carried out through a deep learning mode. The method is generally higher in precision and is a more common method at present. However, the standard data is too costly to label a large number of samples.
At present, no effective solution is proposed for the problem of how to train an intelligent customer service model with high accuracy and low cost in the related technology.
Disclosure of Invention
The embodiment of the application provides a training method and a training system for an intelligent customer service model, which are used for at least solving the problems of high training accuracy and low cost of the intelligent customer service model in the related technology.
In a first aspect, an embodiment of the present application provides a training method for an intelligent customer service model, where the method includes:
obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training;
if the predicted answer is an incorrect answer, manually marking an unlabeled sample corresponding to the incorrect answer to obtain a first marked sample;
if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on a standard question bank to obtain a second labeled sample;
and based on the first labeling sample and the second labeling sample, finishing the final training of the intelligent customer service model.
In some of these embodiments, before obtaining a predicted answer for an unlabeled sample from the initially trained intelligent customer service model, the method includes:
Constructing a standard question library, and obtaining a marked sample based on the standard question library;
And completing the preliminary training of the intelligent customer service model based on the marked sample.
In some of these embodiments, completing the preliminary training of the intelligent customer service model based on the noted samples comprises:
If the sample size of the marked samples is smaller than a preset threshold value, completing preliminary training of an intelligent customer service model based on a traditional machine learning algorithm according to the marked samples in the training sample set;
and if the sample quantity of the marked samples is greater than or equal to a preset threshold value, completing preliminary training of the intelligent customer service model based on the deep learning algorithm according to the marked samples in the training sample set.
In some embodiments, manually labeling the unlabeled sample corresponding to the wrong answer includes:
calculating an uncertainty score of a corresponding unlabeled sample based on the prediction score of the wrong answer;
Sample clustering is carried out on unlabeled samples corresponding to the wrong answers, and based on the result of the sample clustering, the representative score of each unlabeled sample is calculated;
calculating the sample information quantity of the unlabeled sample based on the uncertainty fraction and the representative fraction;
And taking out the B unlabeled samples with the highest sample information content from the unlabeled samples to carry out manual labeling.
In some embodiments, calculating the uncertainty score for the corresponding unlabeled exemplar based on the predictive score of the wrong answer comprises:
The uncertainty Score of the corresponding unlabeled sample is calculated by the formula U (x) =1-abs (pred_score (x) -0.5), where pred_score (x) represents the predicted Score of the wrong answer and abs () represents the absolute value.
In some of these embodiments, calculating a representative score for each unlabeled sample based on the results of the sample clustering includes:
By the formula A representative score of each unlabeled sample is calculated, wherein c (x i) represents all unlabeled samples in the cluster to which the unlabeled sample x i belongs, and d (x i , m) represents the euclidean distance between the unlabeled sample x i and the unlabeled sample m.
In some of these embodiments, calculating the sample information amount of the unlabeled sample based on the uncertainty score and the representative score includes:
Calculating the sample information quantity of the unlabeled sample through a formula I (x i)=R(xi)'+U(xi), wherein U (x) represents the uncertainty fraction of the unlabeled sample x i, The normalization process representing the representative score, min (R (x)) represents the smallest representative score among all unlabeled samples, and R (x i) represents the representative score of unlabeled sample x i.
In some of these embodiments, automatically labeling the unlabeled exemplars based on a standard question bank includes:
Calculating the similarity between the questions of the standard question bank and the unlabeled samples;
And determining the problem of a standard problem library with the maximum similarity with the unlabeled sample, and automatically labeling the unlabeled sample through the problem of the standard problem library.
In some of these embodiments, the method comprises:
And obtaining a predicted answer of an unlabeled sample for the intelligent customer service model after preliminary training, wherein the predicted answer is an incorrect answer if a request for switching the manual customer service is returned, and the predicted answer is a correct answer if the request for switching the manual customer service is not returned.
In a second aspect, an embodiment of the present application provides a training system for an intelligent customer service model, where the system is configured to perform the method described in the first aspect, and the system includes a model preliminary training module, a training sample generating module, and a model final training module;
the model preliminary training module is used for obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training;
The training sample generation module is used for judging the predicted answer, and if the predicted answer is an incorrect answer, the unlabeled sample corresponding to the incorrect answer is manually labeled to obtain a first labeled sample; if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on a standard question bank to obtain a second labeled sample;
And the model final training module is used for completing the final training of the intelligent customer service model according to the first labeling sample and the second labeling sample.
Compared with the related art, the training method and the system for the intelligent customer service model provided by the embodiment of the application have the advantages that the method obtains the predicted answer of the unlabeled sample through the intelligent customer service model after preliminary training; if the predicted answer is an incorrect answer, manually marking an unlabeled sample corresponding to the incorrect answer to obtain a first marked sample; if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on the standard question library to obtain a second labeled sample; based on the first labeling sample and the second labeling sample, the final training of the intelligent customer service model is completed, the problem of how to train the intelligent customer service model with high accuracy and low cost is solved, the intelligent customer service model which is primarily trained is subjected to targeted screening labeling on unlabeled samples, the cost of training sample labeling is reduced, the final training of the intelligent customer service model is completed based on the screened labeled samples, and the model accuracy is effectively improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of steps of a method for intelligent customer service model training in accordance with an embodiment of the present application;
FIG. 2 is a flowchart of specific steps of an intelligent customer service model training method according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The embodiment of the application provides a training method of an intelligent customer service model, and fig. 1 is a step flow chart of the training method of the intelligent customer service model according to the embodiment of the application, as shown in fig. 1, and the method comprises the following steps:
step S102, obtaining a predicted answer of an unlabeled sample through an intelligent customer service model after preliminary training;
Before step S102, the method further comprises step S101.
Step S101, a standard question library is constructed, and a marked sample is obtained based on the standard question library; and completing the preliminary training of the intelligent customer service model based on the marked sample.
Step S101, specifically, if the sample size of the marked samples is smaller than a preset threshold, completing the preliminary training of the intelligent customer service model based on the traditional machine learning algorithm according to the marked samples in the marked samples;
if the sample quantity of the marked samples is greater than or equal to a preset threshold value, completing the preliminary training of the intelligent customer service model based on the deep learning algorithm according to the marked samples in the marked samples.
It should be noted that, fig. 2 is a flowchart of specific steps of an intelligent customer service model training method according to an embodiment of the present application, as shown in fig. 2, a standard problem library is first constructed; secondly, acquiring a small amount of marked samples based on a standard problem library; further, by training the intelligent customer service model through the small amount of marked samples, in the model training of the embodiment, an appropriate training model is automatically selected according to the body quantity of the marked samples, so that the risk of over fitting and under fitting of the system can be greatly reduced. Such as: training by adopting traditional machine learning (such as xgboost models) under the condition that the sample size of the marked samples is less than 1000; and training by adopting a deep learning model (such as sentence-bert model) under the condition that the sample quantity of the marked samples is more than or equal to 1000.
In step S102, specifically, a predicted answer without labeling a sample is obtained through the intelligent customer service model after preliminary training, and for the predicted answer, if a request for switching over the manual customer service is returned, the predicted answer is a wrong answer, and if no request for switching over the manual customer service is returned, the predicted answer is a correct answer.
Step S104, if the predicted answer is an incorrect answer, manually marking an unlabeled sample corresponding to the incorrect answer to obtain a first marked sample;
step S104 specifically further includes the steps of:
Step S1041, calculating an uncertainty score of a corresponding unlabeled sample based on the prediction score of the wrong answer;
Specifically, in step S1041, as shown in fig. 2, an uncertainty Score of the corresponding unlabeled sample is calculated by the formula U (x) =1-abs (pred_score (x) -0.5), where pred_score (x) represents a prediction Score of the wrong answer, and abs () represents taking an absolute value.
It should be noted that, in step S1041 of the embodiment of the present application, the prediction score of the preliminary training intelligent customer service model on the prediction answer of the unlabeled sample is used as the measurement basis of the uncertainty score, and the closer the prediction score is to 0.5, the higher the uncertainty score is.
Step S1042, carrying out sample clustering on unlabeled samples corresponding to the wrong answers, and calculating to obtain a representative score of each unlabeled sample based on the result of the sample clustering;
Step S1042 specifically, as shown in FIG. 2, is performed by the formula A representative score of each unlabeled sample is calculated, wherein c (x i) represents all unlabeled samples in the cluster to which the unlabeled sample x i belongs, and d (x i , m) represents the euclidean distance between the unlabeled sample x i and the unlabeled sample m.
It should be noted that, for the sample clustering in step S1042, optionally, the unlabeled samples are clustered by a k-means algorithm to obtain the clustering information of each sample. In the method, all unlabeled samples x 1, x2, x3…xn are input into a k-means algorithm, wherein x i represents an ith unlabeled sample, a parameter k of clustering is set, then the number of clusters is the parameter k, for example, k=10, the range of the clusters is 0-9,k-means algorithm, the unlabeled samples are divided into 10 different clusters according to similarity among the samples, wherein the similarity among the unlabeled samples in the clusters is highest, the similarity among the unlabeled samples among the clusters is lowest, and a similarity calculation formula between two samples is as follows: sim (x i,xj)= -d(xi,xj), wherein d (x i,xj) is calculated using the euclidean distance, and the euclidean distance is calculated as follows:
wherein the superscript n represents the nth feature vector corresponding to the unlabeled sample.
The k-means algorithm clustering step flow is as follows:
step a, firstly, randomly selecting k unlabeled samples from unlabeled samples x 1, x2, x3…xn to serve as center points, and naming the center points as c 1, c2…cn;
And b, classifying according to the central point. For each unlabeled sample x 1, x2, x3…xn, the distance d (x i,cj),d(xi,cj) from each center point is calculated to represent the distance from the unlabeled sample i to the cluster j, and each sample point is classified into the cluster corresponding to the shortest center point. If sample 1 is closest to c 3, then sample 1 is partitioned into a third cluster;
Step c, calculating a new center point: for each cluster, the mean of all sample points belonging to this cluster is calculated as the new center point c 1, c2…cn. The specific calculation formula is as follows:
And d, repeating the step b until the cycle times reach the set times, optionally, the set times can be 100 times, and finally outputting the cluster to which each unlabeled sample belongs.
Step S1043, calculating the sample information quantity of the unlabeled sample based on the uncertainty score and the representative score;
Specifically, as shown in fig. 2, the sample information amount of the unlabeled sample is calculated by the formula I (x i)=R(xi)'+U(xi), where U (x) represents the uncertainty fraction of the unlabeled sample x i, The normalization process representing the representative score, min (R (x)) represents the smallest representative score among all unlabeled samples, and R (x i) represents the representative score of unlabeled sample x i.
In the above steps S1041 to S1043, an information amount calculation method of merging uncertainty (model prediction result) and representative (clustering result) is provided, and the non-labeled samples with high certainty and representative are screened out to perform the subsequent targeted manual labeling, so that the labeling quality of the manual labeling is improved, and meanwhile, the sample amount required to be manually labeled is reduced, and the labeling cost is reduced.
In step S1044, B unlabeled samples with the highest sample information content are taken out from the unlabeled samples for manual labeling, where B is a system hyper-parameter, and indicates how many unlabeled samples are taken for manual labeling each time.
As shown in fig. 2, it is determined whether manual labeling is necessary: and if the sample size of the current marked sample exceeds the preset requirement, stopping manual marking.
Step S106, if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on the standard question bank to obtain a second labeled sample;
step S106, specifically, calculating the similarity between the questions and unlabeled samples of the standard question library; and determining the problem of the standard problem library with the maximum similarity with the unlabeled sample, and automatically labeling the unlabeled sample through the problem of the standard problem library.
It should be noted that, the similarity between the questions of the standard question bank and the unlabeled samples is calculated through the custom semantic similarity algorithm, and step S106 automatically labels the unlabeled samples with correct predicted answers based on the questions of the standard question bank, so that the cost of labeling training samples can be effectively reduced. The step flow of the self-defined semantic similarity algorithm is as follows:
Stage one of a custom semantic similarity algorithm:
inputting a sentence pair (sentence ); the two sentences are segmented (for example, jieb segmentation tools are used) respectively, and segmentation results cut_s1 and cut_s2 are obtained; combining and de-duplicating word segmentation results of the two sentences to obtain a new sentence;
Traversing tow_s:
when the word is in cut_s1, adding the vector of the word into an empty list s1_ vecter, when the word is not in cut_s1, introducing the word and the cut_s1 into a second stage of a self-defined semantic similarity algorithm by taking the word and the cut_s1 as parameters, and adding a returned result into s1_ vecter;
When the word is in cut_s2, 1 is added to the empty list s2_ vecter, and when the word is not in cut_s2, the word and the cut_s2 are used as parameters to be transmitted into a custom semantic similarity algorithm stage two 2, a returned result is added to s2_ vecter, and the average absolute error MAE of s1_ vecter and s2_ vecter, namely the similarity between marked samples and unmarked samples, is returned.
Stage two of self-defined semantic similarity algorithm:
The input is a character string str1 and a word-segmented list1; putting the character strings into a set to obtain a non-repeated set1 with complete word division; putting words in list1 into a set to obtain set2, calculating the number common_ chars of words with the same shape as each set1 and set2 one by one, adding common_ chars and the quotient corresponding to set1 in the empty list ssim, and returning to ssim the quotient of the maximum value and the length of list 1.
And step S108, based on the first labeling sample and the second labeling sample, finishing the final training of the intelligent customer service model.
In step S108, specifically, the labeled sample is updated based on the first labeled sample and the second labeled sample, and the final training of the intelligent customer service model is completed based on the updated labeled sample.
Through the steps S102 to S108 in the embodiment of the application, the problem of how to train the intelligent customer service model with high accuracy and low cost is solved, the purpose of carrying out targeted screening and labeling on unlabeled samples through the intelligent customer service model which is primarily trained is realized, the cost of training sample labeling is reduced, the final training of the intelligent customer service model is completed based on the screened and labeled samples, and the model accuracy is effectively improved.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application provides a training system of an intelligent customer service model, which is used for executing the training method of the intelligent customer service model in the embodiment, and comprises a model preliminary training module, a training sample generating module and a model final training module;
The model preliminary training module is used for obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training;
The training sample generation module is used for judging a predicted answer, and if the predicted answer is an incorrect answer, manually marking an unlabeled sample corresponding to the incorrect answer to obtain a first marked sample; if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on the standard question library to obtain a second labeled sample;
And the model final training module is used for completing the final training of the intelligent customer service model according to the first labeling sample and the second labeling sample.
The initial training module, the training sample generation module and the model final training module in the embodiment of the application solve the problem of how to train the intelligent customer service model with high accuracy and low cost, realize the targeted screening and labeling of unlabeled samples through the intelligent customer service model of the initial training, reduce the cost of training sample labeling, complete the final training of the intelligent customer service model based on the screened and labeled samples, and effectively improve the model accuracy.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
The present embodiment also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In addition, in combination with the training method of the intelligent customer service model in the above embodiment, the embodiment of the application can be realized by providing a storage medium. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements the training method of any one of the intelligent customer service models in the above embodiments.
In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements a training method for an intelligent customer service model. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
In one embodiment, fig. 3 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 3, an electronic device, which may be a server, is provided, and an internal structure diagram thereof may be as shown in fig. 3. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected by an internal bus, where the non-volatile memory stores an operating system, computer programs, and a database. The processor is used for providing computing and control capability, the network interface is used for communicating with an external terminal through network connection, the internal memory is used for providing environment for the operation of an operating system and a computer program, when the computer program is executed by the processor, the training method of the intelligent customer service model is realized, and the database is used for storing data.
It will be appreciated by those skilled in the art that the structure shown in fig. 3 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be understood by those skilled in the art that the technical features of the above-described embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above-described embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (6)

1. The training method of the intelligent customer service model is characterized by comprising the following steps of:
Constructing a standard problem library;
if the sample size of the marked samples in the standard problem library is smaller than a preset threshold value, completing the preliminary training of the intelligent customer service model based on the traditional machine learning algorithm according to the marked samples;
if the sample quantity of the marked samples in the standard problem library is greater than or equal to a preset threshold value, completing the preliminary training of the intelligent customer service model based on the deep learning algorithm according to the marked samples;
obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training;
For the predicted answer, if the request of switching the manual customer service is returned, the predicted answer is a wrong answer, and if the request of switching the manual customer service is not returned, the predicted answer is a correct answer;
If the predicted answer is a wrong answer, calculating to obtain an uncertainty score of a corresponding unlabeled sample based on the predicted score of the wrong answer; sample clustering is carried out on unlabeled samples corresponding to the wrong answers, and based on the result of the sample clustering, the representative score of each unlabeled sample is calculated; calculating the sample information quantity of the unlabeled sample based on the uncertainty fraction and the representative fraction; taking out the B unlabeled samples with the highest sample information content from the unlabeled samples to carry out manual labeling, so as to obtain a first labeled sample;
If the predicted answer is a correct answer, calculating the similarity between the questions of the standard question bank and the unlabeled sample through a custom semantic similarity algorithm; determining the problem of a standard problem library with the maximum similarity with the unlabeled sample, and automatically labeling the unlabeled sample through the problem of the standard problem library to obtain a second labeled sample;
Stage one of a custom semantic similarity algorithm:
Inputting a sentence pair sentence, sentence; using jieb word segmentation tools to segment two sentences respectively to obtain word segmentation results cut_s1 and cut_s2; combining and de-duplicating word segmentation results of the two sentences to obtain a new sentence;
Traversing tow_s:
when the word is in cut_s1, adding the vector of the word into an empty list s1_ vecter, when the word is not in cut_s1, introducing the word and the cut_s1 into a second stage of a self-defined semantic similarity algorithm by taking the word and the cut_s1 as parameters, and adding a returned result into s1_ vecter;
When the word is in cut_s2, adding the vector of the word into an empty list s2_ vecter, when the word is not in cut_s2, transferring the word and the cut_s2 into a second stage of a self-defined semantic similarity algorithm by taking the word and the cut_s2 as parameters, adding a returned result into s2_ vecter, and returning average absolute errors MAE of s1_ vecter and s2_ vecter, namely similarity between marked samples and unmarked samples in a standard question library;
Stage two of self-defined semantic similarity algorithm:
The input is a character string str1 and a word-segmented list1; putting the character string str1 into a set to obtain a non-repeated set1 of complete word segmentation; putting words in the list1 into a set to obtain set2, calculating the number common_ chars of the same words of each set1 and set2 one by one, adding common_ chars and the quotient corresponding to set1 in the empty list ssim, and returning ssim the quotient of the maximum value and the length of the list1, namely the similarity between marked samples and unmarked samples in the standard question bank;
and based on the first labeling sample and the second labeling sample, finishing the final training of the intelligent customer service model.
2. The method of claim 1, wherein before obtaining a predicted answer for an unlabeled sample from the initially trained intelligent customer service model, the method comprises:
Constructing a standard question library, and obtaining a marked sample based on the standard question library;
And completing the preliminary training of the intelligent customer service model based on the marked sample.
3. The method of claim 1, wherein calculating an uncertainty score for the corresponding unlabeled exemplar based on the predictive score of the wrong answer comprises:
The uncertainty Score of the corresponding unlabeled sample is calculated by the formula U (x) =1-abs (pred_score (x) -0.5), where pred_score (x) represents the predicted Score of the wrong answer and abs () represents the absolute value.
4. The method of claim 3, wherein calculating a representative score for each unlabeled exemplar based on the results of the clusters of exemplars comprises:
By the formula A representative score of each unlabeled sample is calculated, wherein c (x i) represents all unlabeled samples in the cluster to which the unlabeled sample x i belongs, and d (x i , m) represents the euclidean distance between the unlabeled sample x i and the unlabeled sample m.
5. The method of claim 4, wherein calculating the sample information amount for the unlabeled sample based on the uncertainty score and the representative score comprises:
The sample information of the unlabeled sample is calculated through a formula I (x i)=R(xi)'+U(xi), wherein U (x i) represents the uncertainty fraction of the unlabeled sample x i, The normalization process representing the representative score, min (R (x)) represents the smallest representative score among all unlabeled samples, and R (x i) represents the representative score of unlabeled sample x i.
6. A training system for an intelligent customer service model, characterized in that the system is adapted to perform the method of any of claims 1 to 5, the system comprising a model preliminary training module, a training sample generation module and a model final training module;
the model preliminary training module is used for obtaining a predicted answer of an unlabeled sample through the intelligent customer service model after preliminary training;
The training sample generation module is used for judging the predicted answer, and if the predicted answer is an incorrect answer, the unlabeled sample corresponding to the incorrect answer is manually labeled to obtain a first labeled sample; if the predicted answer is a correct answer, automatically labeling the unlabeled sample based on a standard question bank to obtain a second labeled sample;
And the model final training module is used for completing the final training of the intelligent customer service model according to the first labeling sample and the second labeling sample.
CN202311736324.7A 2023-12-18 2023-12-18 Training method and system for intelligent customer service model Active CN117436551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311736324.7A CN117436551B (en) 2023-12-18 2023-12-18 Training method and system for intelligent customer service model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311736324.7A CN117436551B (en) 2023-12-18 2023-12-18 Training method and system for intelligent customer service model

Publications (2)

Publication Number Publication Date
CN117436551A CN117436551A (en) 2024-01-23
CN117436551B true CN117436551B (en) 2024-06-21

Family

ID=89550156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311736324.7A Active CN117436551B (en) 2023-12-18 2023-12-18 Training method and system for intelligent customer service model

Country Status (1)

Country Link
CN (1) CN117436551B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582793A (en) * 2018-11-23 2019-04-05 深圳前海微众银行股份有限公司 Model training method, customer service system and data labeling system, readable storage medium storing program for executing
CN110532345A (en) * 2019-07-15 2019-12-03 北京小米智能科技有限公司 A kind of processing method of unlabeled data, device and storage medium
CN116520150A (en) * 2023-02-16 2023-08-01 杭州宇谷科技股份有限公司 Anomaly detection system construction system and method based on dynamic strategy and active learning

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045781B (en) * 2015-08-27 2020-06-23 广州神马移动信息科技有限公司 Query term similarity calculation method and device and query term search method and device
CN111476256A (en) * 2019-01-24 2020-07-31 北京京东尚科信息技术有限公司 Model training method and device based on semi-supervised learning and electronic equipment
CN111783993A (en) * 2019-05-23 2020-10-16 北京京东尚科信息技术有限公司 Intelligent labeling method and device, intelligent platform and storage medium
CN111061852A (en) * 2019-12-13 2020-04-24 上海中通吉网络技术有限公司 Data processing method, device and system
CN111160028B (en) * 2019-12-31 2023-05-16 东软集团股份有限公司 Method, device, storage medium and equipment for judging semantic similarity of two texts
CN111259647A (en) * 2020-01-16 2020-06-09 泰康保险集团股份有限公司 Question and answer text matching method, device, medium and electronic equipment based on artificial intelligence
CN111444677A (en) * 2020-02-21 2020-07-24 平安科技(深圳)有限公司 Reading model optimization method, device, equipment and medium based on big data
CN113642329A (en) * 2020-04-27 2021-11-12 阿里巴巴集团控股有限公司 Method and device for establishing term recognition model and method and device for recognizing terms
CN114077859A (en) * 2020-08-17 2022-02-22 阿里巴巴集团控股有限公司 Abnormal sample detection method and device, electronic device and storage medium
EP4174766A1 (en) * 2021-10-29 2023-05-03 Siemens Aktiengesellschaft Generating segmentation masks for training a semantic segmentation model
CN117011635A (en) * 2022-11-29 2023-11-07 腾讯科技(深圳)有限公司 Model training method, image data processing device and computer equipment
CN116257644A (en) * 2023-02-14 2023-06-13 阳光保险集团股份有限公司 Method for marking data, method and device for marking data through model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582793A (en) * 2018-11-23 2019-04-05 深圳前海微众银行股份有限公司 Model training method, customer service system and data labeling system, readable storage medium storing program for executing
CN110532345A (en) * 2019-07-15 2019-12-03 北京小米智能科技有限公司 A kind of processing method of unlabeled data, device and storage medium
CN116520150A (en) * 2023-02-16 2023-08-01 杭州宇谷科技股份有限公司 Anomaly detection system construction system and method based on dynamic strategy and active learning

Also Published As

Publication number Publication date
CN117436551A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN110717039B (en) Text classification method and apparatus, electronic device, and computer-readable storage medium
CN111177326A (en) Key information extraction method and device based on fine labeling text and storage medium
CN111259647A (en) Question and answer text matching method, device, medium and electronic equipment based on artificial intelligence
CN111428470B (en) Text continuity judgment method, text continuity judgment model training method, electronic device and readable medium
CN110968725B (en) Image content description information generation method, electronic device and storage medium
CN112101042A (en) Text emotion recognition method and device, terminal device and storage medium
CN113011531A (en) Classification model training method and device, terminal equipment and storage medium
CN113435499A (en) Label classification method and device, electronic equipment and storage medium
CN114492601A (en) Resource classification model training method and device, electronic equipment and storage medium
CN113515593A (en) Topic detection method and device based on clustering model and computer equipment
CN117436551B (en) Training method and system for intelligent customer service model
CN112307749A (en) Text error detection method and device, computer equipment and storage medium
CN110826616A (en) Information processing method and device, electronic equipment and storage medium
CN113434630B (en) Customer service evaluation method, customer service evaluation device, terminal equipment and medium
CN112528674B (en) Text processing method, training device, training equipment and training equipment for model and storage medium
CN115222112A (en) Behavior prediction method, behavior prediction model generation method and electronic equipment
CN114282058A (en) Method, device and equipment for model training and video theme prediction
CN114117037A (en) Intention recognition method, device, equipment and storage medium
CN113627514A (en) Data processing method and device of knowledge graph, electronic equipment and storage medium
US20210004671A1 (en) Automated data slicing based on an artificial neural network
CN117710763B (en) Image noise recognition model training method, image noise recognition method and device
CN112861519B (en) Medical text error correction method, device and storage medium
CN114186043B (en) Pre-training method, device, equipment and storage medium
CN113704469B (en) Short text classification data set correction method and system based on Bayesian theorem
US20220253997A1 (en) Image defect detection method, electronic device using the same

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