WO2020119030A1 - 用于答复问题的模型训练方法、装置、设备及存储介质 - Google Patents

用于答复问题的模型训练方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020119030A1
WO2020119030A1 PCT/CN2019/088713 CN2019088713W WO2020119030A1 WO 2020119030 A1 WO2020119030 A1 WO 2020119030A1 CN 2019088713 W CN2019088713 W CN 2019088713W WO 2020119030 A1 WO2020119030 A1 WO 2020119030A1
Authority
WO
WIPO (PCT)
Prior art keywords
question
preset
evaluation
cluster
questions
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.)
Ceased
Application number
PCT/CN2019/088713
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020119030A1 publication Critical patent/WO2020119030A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • This application relates to the field of deep learning technology, and in particular to a model training method, device, equipment, and storage medium for answering questions.
  • question-and-answer robots mainly serve hospitals, company reception desks, and information desks for user consultation.
  • many large hospitals currently have question-and-answer robots in the outpatient hall.
  • the clinicians can input their own questions in front of the robot.
  • the robot searches the answers to the questions through communication with the back-end server and provides them to the clinicians.
  • Embodiments of the present application provide a model training method, device, computer equipment, and storage medium for answering questions, to solve the problem of low response rate of user consultation questions.
  • a model training method for answering questions including:
  • the target deep learning model is pre-trained by each preset question group as training data;
  • the problem set For each problem set, if the calculated minimum distance is less than a preset distance threshold, the problem set is merged into a preset problem group corresponding to the minimum distance;
  • the problem set For each problem set, if the calculated minimum distance is greater than or equal to the preset distance threshold, the problem set is determined as a new preset problem group;
  • the updated target deep learning model is retrained using the updated preset question groups to obtain the trained target deep learning model.
  • a model training device for answering questions includes:
  • the negative evaluation detection module is used to detect whether the user has submitted negative evaluation information about the answer after the target deep learning model feeds back answers to the questions raised by the user.
  • the target deep learning model is composed of preset question groups Pre-trained as training data;
  • An evaluation question obtaining module configured to obtain the evaluation question corresponding to the negative evaluation information if it is detected that the user submits negative evaluation information about the answer;
  • the question clustering module is used to perform unsupervised text clustering on each evaluation question when the number of obtained evaluation questions reaches a preset first number threshold, until the preset conditions are met, and each Question sets, each question set includes more than one evaluation question;
  • a vector center determination module which is used to determine the vector centers of each problem set
  • the problem distance calculation module is used to calculate the distance between the vector center of the problem set and the vector center of each preset problem group for each problem set;
  • a question merging module for each question set, if the calculated minimum distance is less than a preset distance threshold, merge the question set into a preset question group corresponding to the minimum distance;
  • a new problem group determination module for each problem set, if the calculated minimum distance is greater than or equal to a preset distance threshold, the problem set is determined as a new preset problem group;
  • the model training module is configured to retrain the target deep learning model using the updated preset question groups to obtain the trained target deep learning model.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and the processor implements the computer-readable instructions to implement the above for answering questions Steps of the model training method.
  • One or more non-volatile readable storage media storing computer readable instructions, the computer readable storage media storing computer readable instructions, so that the one or more processors execute the above-mentioned for answering questions Model training method steps.
  • FIG. 1 is a schematic diagram of an application environment of a model training method for answering questions in an embodiment of the present application
  • FIG. 2 is a flowchart of a model training method for answering questions in an embodiment of the present application
  • FIG. 3 is a schematic flow chart of training a target deep learning model in an application scenario in a model training method for answering questions in an embodiment of the present application;
  • FIG. 5 is a schematic flow chart of transferring a sparse question to a white list in an application scenario in a model training method for answering questions in an embodiment of the present application;
  • FIG. 6 is a schematic structural diagram of a model training device for answering questions in an embodiment of the present application.
  • FIG. 7 is another schematic structural diagram of a model training device for answering questions in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a problem clustering module in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a computer device in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a target deep learning model in an embodiment of the present application.
  • the model training method for answering questions provided by this application can be applied in the application environment as shown in FIG. 1, in which the client communicates with the server through the network.
  • the client may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be realized by an independent server or a server cluster composed of multiple servers.
  • a model training method for answering questions is provided.
  • the method is applied to the server in FIG. 1 as an example for illustration, including the following steps:
  • the target deep learning model is pre-trained by each preset question group as training data get;
  • the server after the server feeds back answers to the questions raised by the user through the target deep learning model, the server will also ask the user whether the answers to this feedback are helpful. After the user obtains the answers, the user can judge according to personal judgment. Reply with "Yes”, “No” and other evaluation information on the information inquired by the server, and feedback the evaluation information to the server. At this time, the server may detect whether the user has submitted negative evaluation information about the answer, and if so, perform the following step 102.
  • the negative evaluation information mentioned here refers to evaluation information that the user believes that the feedback answer is not helpful, such as "no", "dislike” and other evaluations.
  • evaluation information that the user believes that the feedback answer is not helpful, such as "no", "dislike” and other evaluations.
  • the user can enter the question "How should the pediatrics go?", and then, the robot placed in the outpatient lobby can obtain the answer by communicating with the server and answer "Hello, the pediatrics are on the second floor of the outpatient building. Side.” Then the "Like” and “Stop” buttons will pop up on the display of the robot for the user to choose. The user will give feedback based on whether the answer meets expectations, and the feedback information is stored in the system log of the server for retention. If the user is not satisfied with the answer, they can click the "step" button.
  • the server can use the preset field "feedback_type” value of 2 to record in the system log in the background, where the "feedback_type” value A value of 2 represents a negative evaluation, and a value of "feedback_type” of 1 represents a positive evaluation.
  • the server needs to detect negative evaluation information, it is only necessary to retrieve all log records with a value of "feedback_type” of 2 in the system log to extract the corresponding negative evaluation information and the questions raised by the user.
  • model training method for answering questions provided by this embodiment can be applied to scenarios where almost all users, customers, and personnel may ask questions.
  • the following content is mainly used in Examples are given in the hospital scenario, but it should be emphasized that this method can be applied to scenarios including but not limited to hospitals, hotels, restaurants, airports, bus stations, offices, tourist reception halls, etc.
  • the target deep learning model may be pre-trained through the following steps:
  • each of the preset question groups, and each preset question group includes a plurality of historical questions with the same semantic meaning collected in advance;
  • the server can collect corresponding historical problems.
  • the historical problems mentioned here may refer to problems that have been consulted by any user who belongs to the intention of certain designated users.
  • the server can collect the questions that the previous medical staff consulted in the hospital through various channels. For example, for the navigation inquiry in the hospital, a large number of questions can be collected and organized at the reception desk of the outpatient hall.
  • historical questions can also be collected from the hospital’s website for common hospital questions that network users have asked; in addition, staff can diversify, expand and supplement on the basis of these collected historical questions, each The historical problems under the intention of the preset user are as complete as possible, and strive to involve all aspects of the user's possible consultation.
  • the server needs to group these collected historical questions to obtain each preset question group. This is because different questions can be classified into the same question and different questions according to whether they have the same semantics, and historical questions with the same question semantics are grouped into a preset question group, so that the server can obtain each preset under the preset user intent Question group.
  • the preset user group of “In-hospital Navigation Inquiry” can be divided into 5 categories and 20 categories of preset question groups, including but not limited to: “reservation registration”, “regular inspection ", "Registration time”, etc.
  • the preset question group of "Appointment Registration” can include "I have no ID card, only medical insurance card, can I register?", “Can I register for others?”, etc. historical issues.
  • the server can randomly select from each preset question group, pairwise pair the historical questions, record the tag value of the question combination of the two paired historical questions belonging to the same preset question group as 1, and record the two paired history The mark value of the question combination that does not belong to the same preset question group is recorded as 0.
  • Question combinations with a marker value of 1 are positive samples, and question combinations with a marker value of 0 are negative samples.
  • the server For step 204, after the above steps 202 and 203, after the server sorts out the positive and negative samples, the positive and negative samples need to be vectorized. Specifically, the server performs vectorization processing on each problem combination to obtain a combination vector corresponding to each problem combination.
  • the combination vector corresponding to each problem combination can be recorded in the form of a data matrix.
  • each sentence in the problem combination is mapped into a vector of equal length, which is more conducive to the target deep learning model to recognize the combination vector during the training process.
  • sufficient vector length is reserved for each sentence. After the text of each sentence is mapped to a vector, the extra length can be filled with the specified constant vector.
  • the server may input all the combination vectors as inputs to the target deep learning model to obtain the output sample probability values. It is understandable that each time the server invests a combination vector into the target deep learning model, the target deep learning model outputs a corresponding sample probability value, which represents whether the two historical problems corresponding to the combination vector are The problem has the same semantics, and the larger the sample probability value, the greater the probability that the problem semantics between the two historical problems are the same. Conversely, the smaller the sample probability value, the greater the probability that the problem semantics are the same between the two historical problems. small. Therefore, the sample probability value is a value between 0-1.
  • the target deep learning model may specifically be a convolutional neural network.
  • the network structure of the convolutional neural network is mainly: a convolutional layer, a pooling layer, a random deactivation layer, a regularization layer, and a softmax layer.
  • the two vectors combined for each problem are subjected to "add”, “subtract”, “multiply”, “divide” and other operations at the model level, and cross entropy is used as the objective function to minimize cross entropy and iterate the model continuously.
  • the final output sample probability value For ease of understanding, as shown in FIG.
  • a certain question group contains question 1 and question 2, and after vectorizing the two questions, a combined vector corresponding to the question group is obtained.
  • the vectors of question 1 and question 2 are vectorized into 6 convolutional layers after input layer, where the parameters of the convolution kernel of each convolutional layer are set Differently, the largest pooling layer is connected after each convolutional layer.
  • the obtained 6 outputs are combined into a vector matrix, then question 1 corresponds to vector matrix 1, and question 2 corresponds to vector matrix 2.
  • the vector matrices 1 and 2 perform matrix "subtraction” and “multiplication” calculations with each other, respectively, and then merge the two result matrices.
  • the merge matrix is sequentially input into the random deactivation layer, the regularization layer and the fully connected layer, and finally an output value between 0 and 1 is obtained.
  • This output value is the second sample probability value, which characterizes the question 1. Similarity to Q2.
  • step 206 it is understandable that during the process of training the target deep learning model, the parameters of the target deep learning model can be adjusted to make the output of the target deep learning model as close as possible to the label value corresponding to the problem combination, and That is the smallest error.
  • the marker value of the problem combination corresponding to the currently invested combination vector is 1, that is to say, this is a positive sample
  • the server adjusts each parameter in the target deep learning model so that the sample probability value it outputs It may be close to 1, away from 0.
  • the server can determine the probability values of each sample and Whether the error between the marker values corresponding to each problem combination meets the preset conditions, if it meets, it means that the parameters of the target deep learning model have been adjusted in place, and it can be determined that the target deep learning model has been trained; otherwise, if not Satisfaction means that the target deep learning model needs to continue training.
  • the preset condition may be preset according to actual usage, specifically, the preset condition may be set as follows: if the error between each sample probability value and the corresponding marker value of each question combination is less than the specified The target error value is considered to satisfy the preset condition. Alternatively, it can be set as follows: using the problem combination in the target verification set to perform the above steps 204 and 205, if the error between the sample probability value and the label value output by the target deep learning model is within a certain range, it is considered that it meets The preset condition. Among them, the collection of question combinations in the verification set is similar to the above step 202.
  • a certain proportion of these question combinations is divided into the target training set, and the remaining question combinations are divided Is the target verification set. For example, you can randomly divide 80% of each question combination paired as a sample of the target training set of the subsequent training target deep learning model, and divide the other 20% into subsequent verification whether the target deep learning model is trained, that is, A sample of the target verification set that meets the preset target conditions.
  • the server after detecting that the user submits negative evaluation information about the answer, the server indicates that the answer to the evaluation question corresponding to the negative evaluation information does not help the user, and it can be considered that the answer returned by the target deep learning model is incorrect . Therefore, the server can obtain the evaluation question group corresponding to the negative evaluation information as a new negative sample to provide to the target deep learning model training in the subsequent steps.
  • each question set includes more than one evaluation question
  • the server is preset with a first number threshold.
  • the preset first number threshold for example, 100
  • the server performs unsupervised text on the evaluation questions.
  • Clustering clustering evaluation questions with similar text content into one question set, which can get one, two or more question sets, in which each question set includes more than one evaluation question. It is understandable that clustering these evaluation questions needs to set the termination condition of clustering, that is, to what extent the evaluation questions are clustered to stop.
  • a condition may be preset on the server, and the condition may be determined according to actual conditions.
  • each question set includes:
  • each evaluation question may be determined as each initial cluster.
  • the server may separately vectorize these clusters to obtain each cluster vector, and then calculate the distance between the two cluster vectors. It can be understood that the smaller the distance between the two cluster vectors, the closer the two clusters are, that is, the more similar the corresponding two evaluation questions; conversely, if the distance between the two cluster vectors is larger, it represents The closer these two clusters are, the less similar the corresponding two evaluation questions are.
  • the server can first calculate the distance between the cluster and other clusters for each cluster, and then calculate the distance between the next cluster and other clusters for the next cluster, and so on The distance between each cluster is calculated.
  • the server may merge the two clusters with similar distances.
  • the cluster with the closest distance is generally merged first, and the two clusters are merged to obtain a new one. cluster.
  • the server can set the preset condition as the termination condition of clustering according to the distance between any two clusters after clustering or the number of all clusters. For the development of specific termination conditions, see the following. When the current clusters satisfy the preset conditions, the server may determine the current clusters as the problem sets.
  • step 304 may specifically include the following steps 401-403 and/or the following steps 404-406.
  • the server may preset a second quantity threshold as a quantization criterion for the degree of clustering, and the server may determine whether the current number of clusters is less than or equal to the preset second quantity threshold, if If the current number of clusters is greater than the preset second number threshold, it means that the number of clusters is still large, and the clustering degree of each evaluation question is not enough, so you can return to the above steps 302 and 303; otherwise, if the current If the number of each cluster is less than or equal to the preset second number threshold, it means that the number of each cluster has reached the standard, and the clustering degree of each evaluation question is sufficient. Therefore, each current cluster can be determined as each question set.
  • the server may preset a distance threshold for any two clusters as an index of the clustering degree, and the distance threshold defines whether the current clustering degree of each cluster meets the requirements of the server. Specifically, the server can determine whether the distance between any two clusters in each current cluster is greater than a preset distance threshold.
  • each current cluster can be determined as each problem set.
  • the server needs to first determine the vector centers of the problem sets, where the vector centers represent the centers of the problem sets.
  • step 104 may be specifically processed in the following manner one or manner two.
  • the first method includes the following steps 501-502.
  • the server can randomly select an evaluation question from the question set as the center of the question set, To represent the problem set, this is feasible. After randomly selecting one of the evaluation questions for each question set, the server can perform vectorization processing on each selected evaluation question to obtain each question vector as the vector center of each question set.
  • Method two includes the following steps 503-504, specifically:
  • the server may vectorize each evaluation question in the question set for each question set to obtain the correspondence of each evaluation question in the question set Problem vectors, and then calculate the average of each problem vector in the problem set to obtain the vector mean as the vector center of the problem set. It is understandable that multiple evaluation questions are included in a question set. To strictly calculate the center of the question set, the most accurate way is to consider the influence of the problem vector corresponding to each evaluation question in the question set. Therefore, the server can calculate The average of these problem vectors, which can represent the average of each vector in the problem set, and thus can be used as the vector center of the problem set.
  • the server may calculate the distance between the vector center of the problem set and the vector center of each preset problem group for each problem set. It can be seen that the closer the distance between the centers of the two vectors is, the more similar the objects represented by the two vector centers are. In this embodiment, it represents the similarity between the problem set and the preset problem group.
  • these question sets are either merged into the preset question group or determined to be a new preset question group.
  • the original preset question group obtained by the server The update must be obtained, and the source of the update is the problem corresponding to the negative evaluation information fed back by the user, that is, the negative sample. It can be seen that these updated preset problem groups will be very helpful for the improvement of the target deep learning model. Therefore, the server may then use the updated preset question groups to retrain the target deep learning model to obtain the trained target deep learning model.
  • some problem sets may contain a small number of evaluation questions. For example, a problem set contains only one evaluation question.
  • the evaluation questions in these problem sets may be considered sparse Questions, that is, partial door questions that users rarely ask. It is not meaningful to provide these sparse problems to the target deep learning model for training. Therefore, this embodiment can process these sparse problems and transfer them to the preset white list without using them as negative samples. Provides the target deep learning model for learning and training. Further, as shown in FIG. 5, before determining the question set as a new preset question group, the method may further include:
  • step 601 Determine whether the number of evaluation questions in the problem set is less than or equal to a preset third quantity threshold, if not, perform step 602, and if so, perform step 603;
  • the number of evaluation questions in the question set is less than or equal to a preset third quantity threshold, add the question set to a preset question white list, and each question recorded in the question white list is preset There is a corresponding answer.
  • the target deep learning model cannot provide an answer to the question raised by the user, the answer corresponding to the matching question is fed back to the user.
  • the matching question refers to the user in the question whitelist. The questions raised match the questions.
  • the server may preset a third quantity threshold as a criterion for determining whether the problem set is a sparse problem.
  • the problem set is considered not to be sparse Problems, so that step 602 is executed to perform the step of determining the problem set as a new preset problem group; conversely, when the number of evaluation questions in the problem set is less than or equal to a preset third number threshold, the The number of evaluation questions in the question set is too small and belongs to a sparse question, so step 603 is executed to add the question set to a preset question white list, and each question recorded in the question white list is preset with a corresponding answer , When the target deep learning model cannot feed back an answer to the question raised by the user, the answer corresponding to the matching question is fed back to the user, and the matching question refers to the question whitelist matching the question raised by the user The problem.
  • the server has corresponding answers for each question recorded in the question whitelist. For newly added sparse questions, the server can uniformly inform the staff to add corresponding answers for them in the future. In some cases, when the target deep learning model cannot provide an answer, you can match the question raised by the user with the question in the question whitelist. If it matches, the answer corresponding to the question in the question whitelist that matches successfully is provided. Provide users with effective treatment of sparse questions and feedback of answers.
  • the embodiment of the present application uses the questions corresponding to the negative evaluation information submitted by the user as a new sample to update the target deep learning model. Because the problem corresponding to these negative evaluation information is that the target deep learning model does not answer the accurate questions, which is equivalent to The part of the target deep learning model that is missing or missing during the training process, so using these new samples to update the target deep learning model can help the target deep learning model improve itself, improve its own accuracy and adaptability of responses, even if it is facing increasingly updated Questions can continue to increase the response rate.
  • a model training device for answering questions is provided, and the model training device for answering questions corresponds one-to-one with the model training method for answering questions in the above embodiments.
  • the model training device for answering questions includes a negative evaluation detection module 701, an evaluation question acquisition module 702, a question clustering module 703, a vector center determination module 704, a question distance calculation module 705, and a question merge module 706 3.
  • the negative evaluation detection module 701 is used to detect whether the user has submitted negative evaluation information about the answer after the target deep learning model feeds back an answer to the question raised by the user.
  • the target deep learning model is composed of preset questions The group is pre-trained as training data;
  • the evaluation question obtaining module 702 is configured to obtain the evaluation question corresponding to the negative evaluation information if it is detected that the user submits negative evaluation information about the answer;
  • the question clustering module 703 is used to perform unsupervised text clustering on each evaluation question when the number of the obtained evaluation questions reaches a preset first number threshold, until the preset conditions are met, and after clustering Each question set, each question set includes more than one evaluation question;
  • the vector center determination module 704 is used to determine the vector centers of the problem sets respectively;
  • the question distance calculation module 705 is used to calculate the distance between the vector center of the question set and the vector center of each preset question group for each question set;
  • the problem merging module 706 is used for each problem set, if the calculated minimum distance is less than a preset distance threshold, the problem set is merged into a preset problem group corresponding to the minimum distance;
  • a new question group determination module 707 for each question set, if the calculated minimum distance is greater than or equal to a preset distance threshold, the question set is determined as a new preset question group;
  • the model training module 708 is configured to retrain the target deep learning model using the updated preset question groups to obtain the trained target deep learning model.
  • the target deep learning model can be pre-trained by the following modules:
  • the question group obtaining module 709 is used to obtain each preset question group, and each preset question group includes a plurality of historical questions with the same semantic meaning collected in advance;
  • the question pairing module 710 is used for pairing each of the acquired historical questions to obtain a combination of questions
  • the question combination marking module 711 is used to record the mark value of the question combination of two paired historical questions belonging to the same preset question group as 1, and the combination of two paired historical questions not belonging to the same preset question group Mark the value as 0;
  • the combination vectorization module 712 is used to perform vectorization processing on each problem combination to obtain a combination vector corresponding to each problem combination;
  • the combined vector input module 713 is used to input all combined vectors as inputs to the target deep learning model to obtain the output sample probability values;
  • the model parameter adjustment module 714 is configured to adjust the parameters of the target deep learning model with the output sample probability values as the adjustment target, so as to minimize the obtained sample sample probability value and the corresponding marker value of each problem combination Of error
  • the training completion determination module 715 is configured to determine that the target deep learning model has been trained if the error between each sample probability value and the label value corresponding to each question combination meets a preset condition.
  • the question clustering module 703 may include:
  • An initial cluster determination unit 7031 configured to determine each evaluation question as each initial cluster
  • the cluster distance calculation unit 7032 is used to calculate the distance between the cluster and each other cluster for each cluster separately;
  • a cluster merging unit 7033 for each cluster, merges the other cluster closest to the cluster with the cluster to obtain a new cluster
  • the trigger unit 7034 is configured to trigger the cluster distance calculation unit and the cluster merging unit until each current cluster meets a preset condition, and determine each current cluster as each problem set.
  • model training device for answering questions may further include:
  • a question quantity judgment module used for judging whether the quantity of the question centralized evaluation questions is less than or equal to a preset third quantity threshold
  • a trigger module configured to trigger the new question group determination module if the judgment result of the question quantity judgment module is no
  • the question set adding module is used to add the question set to the preset question white list if the judgment result of the question quantity judgment module is yes, each question recorded in the question white list is preset with Corresponding answer, when the target deep learning model cannot feed back the answer to the question raised by the user, the answer corresponding to the matching question is fed back to the user, the matching question refers to the question whitelist and the user Question matching question.
  • the vector center determination module may include:
  • a question selection unit for randomly selecting an evaluation question from each question set
  • the first vectorization processing unit is used to vectorize the selected evaluation questions to obtain each question vector as the vector center of each question set;
  • the second vectorization processing unit is used to vectorize each evaluation question in the question set for each question set to obtain a question vector corresponding to each evaluation question in the question set;
  • the vector mean calculation unit is used to calculate the average value of each question vector in the question set for each question set, and obtain the vector mean as the vector center of the question set.
  • each module in the above model training device for answering questions can be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above modules may be embedded in the hardware or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 9.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used 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, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store the data involved in the model training method for answering questions.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer readable instructions are executed by the processor to implement a model training method for answering questions.
  • a computer device including a memory, a processor, and computer-readable instructions stored on the memory and executable on the processor.
  • the processor executes the computer-readable instructions, it is used in the above embodiments.
  • the steps of the model training method for answering questions are, for example, steps 101 to 108 shown in FIG. 2.
  • the processor executes the computer-readable instructions, the functions of each module/unit of the model training apparatus for answering questions in the above embodiments are implemented, for example, the functions of modules 701 to 708 shown in FIG. 6. To avoid repetition, I will not repeat them here.
  • a computer-readable storage medium the one or more non-volatile storage media storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors , So that when one or more processors execute computer-readable instructions, the steps of the model training method for answering questions in the above method embodiments are implemented, or the one or more non-volatile storage of computer-readable instructions may
  • the modules/units in the model training apparatus for answering questions in the above apparatus embodiments are realized when the one or more processors execute the computer-readable instructions Function. To avoid repetition, I will not repeat them here.
  • Non-volatile memory may 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.
  • RAM random access memory
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种用于答复问题的模型训练方法、装置、设备及存储介质,应用于深度学习技术领域,用于解决用户咨询问题的答复率低下的问题。本方法包括:每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息(101);若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题(102);当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集(103);分别确定所述各个问题集的向量中心(104);针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离(105);若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组(106);若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组(107);采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型(108)。

Description

用于答复问题的模型训练方法、装置、设备及存储介质
本申请以2018年12月11日提交的申请号为201811507887.8,名称为“用于答复问题的模型训练方法、装置、设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及深度学习技术领域,尤其涉及用于答复问题的模型训练方法、装置、设备及存储介质。
背景技术
目前,智能机器人的应用已经越来越广泛,其中,问答型机器人主要服务于医院、公司的前台、咨询台等地方,以供用户咨询。比如,现有很多大型医院在门诊大厅位置设置有问答型机器人,就诊人员可以在机器人前方语音输入自己的问题,机器人通过与后台服务器的通信搜索出问题的答案并提供给就诊人员。
然而,对于后台服务器来说,由于用户咨询的问题往往是多种多样的,且问题的种类和数量会随着时间的推移而增多,这就导致了后台服务器搜索的问题答案随着时间的推移会越来越不准确。
因此,寻找一种能够持续提高问题答复率的方法成为本领域技术人员亟需解决的问题。
发明内容
本申请实施例提供一种用于答复问题的模型训练方法、装置、计算机设备及存储介质,以解决用户咨询问题的答复率低下的问题。
一种用于答复问题的模型训练方法,包括:
每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
分别确定所述各个问题集的向量中心;
针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
一种用于答复问题的模型训练装置,包括:
负面评价检测模块,用于每当在通过目标深度学习模型针对用户提出的问题反馈答案 后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
评价问题获取模块,用于若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
问题聚类模块,用于当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
向量中心确定模块,用于分别确定所述各个问题集的向量中心;
问题距离计算模块,用于针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
问题合并模块,用于针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
新问题组确定模块,用于针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
模型训练模块,用于采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述用于答复问题的模型训练方法的步骤。
一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读存储介质存储有计算机可读指令,使得所述一个或多个处理器执行上述用于答复问题的模型训练方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中用于答复问题的模型训练方法的一应用环境示意图;
图2是本申请一实施例中用于答复问题的模型训练方法的一流程图;
图3是本申请一实施例中用于答复问题的模型训练方法在一个应用场景下训练目标深度学习模型的流程示意图;
图4是本申请一实施例中用于答复问题的模型训练方法步骤103在一个应用场景下的流程示意图;
图5是本申请一实施例中用于答复问题的模型训练方法在一个应用场景下将稀疏问题转移至白名单的流程示意图;
图6是本申请一实施例中用于答复问题的模型训练装置的结构示意图;
图7是本申请一实施例中用于答复问题的模型训练装置的另一种结构示意图;
图8是本申请一实施例中问题聚类模块的结构示意图;
图9是本申请一实施例中计算机设备的一示意图;
图10是本申请一实施例中目标深度学习模型的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的用于答复问题的模型训练方法,可应用在如图1的应用环境中,其中,客户端通过网络与服务器进行通信。其中,该客户端可以但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一实施例中,如图2所示,提供一种用于答复问题的模型训练方法,以该方法应用在图1中的服务器为例进行说明,包括如下步骤:
101、每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
本实施例中,服务器在通过目标深度学习模型针对用户提出的问题反馈答案之后,服务器还会向用户发起关于本次反馈的答案是否有帮助的询问,用户在获取到答案后,根据个人判断可以在服务器询问的信息上回复“是”、“否”等评价信息,并会将这些评价信息反馈给服务器。此时,服务器可以检测该用户是否提交了关于答案的负面评价信息,若是,则执行下述步骤102。
需要说明的是,这里所说的负面评价信息是指用户认为反馈的答案没有帮助的评价信息,例如“否”、“踩”等评价。举例说明,在大型医院的应用场景下,用户可以输入问题“儿科应该怎么走?”,随后,放置在门诊大厅的机器人通过与服务器通信获取答案并回答“您好,儿科在门诊大楼二楼西侧。”随后会在机器人的显示屏上弹出“赞”和“踩”按钮供用户选择,用户根据回答是否符合预期给予反馈,反馈的信息存入服务器的系统日志保留。如果用户对答案不满意,则可以点“踩”按钮的,当用户选择“踩”按钮时,服务器在后台可以使用预设字段“feedback_type”值为2记录到系统日志中,其中“feedback_type”值为2代表负面评价,“feedback_type”值为1代表正面评价。在服务器需要检测负面评价信息时,只需在系统日志中检索所有“feedback_type”值为2的日志记录即可提取出对应的负面评价信息和用户提的问题。
需要说明的是,本实施例提供的用于答复问题的模型训练方法可以应用在几乎所有用户、客户、人员可能提问的场景下,本实施例为了便于表述和理解,在后续的内容中主要以在医院场景下进行举例说明,但需要强调的是,本方法可以应用于包括但不限于医院、酒店、餐厅、机场、公交站场、办公室、旅游接待厅等等场景下。
为便于理解,如图3所示,进一步地,在步骤101之前,所述目标深度学习模型可以通过以下步骤预先训练好:
201、获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
202、将获取到的各个所述历史问题两两配对,得到各个问题组合;
203、将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
204、对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
205、将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
206、以输出的各个样本概率值作为调整目标,调整所述目标深度学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
207、若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
对于上述步骤201,可以理解的是,服务器可以收集相应的历史问题,这里所说的历史问题可以是指属于某些指定用户意图下的任何用户曾经咨询过的问题。比如,在大型医院的应用场景下,服务器可以通过多种渠道收集曾经的就诊人员在该医院中咨询过的问题,例如针对院内导航问询,可以在门诊大厅的接待处收集、整理得到大量的历史问题,另外,还可以从该医院的网站上收集到网络用户曾经提问的常见医院问题;再者,工作人员可以在这些收集到的历史问题的基础上进行发散、扩展和补充,把每个预设用户意图下的历史问题尽可能补充完整,力求涉及用户可能咨询的方方面面问题。另外,服务器针对这些收集回来的历史问题还需要进行分组,得到各个预设问题组。这是因为,不同问题之间根据是否语义相同可以归类为同一问题和不同问题,问题语义相同的历史问题归为一个预设问题组,从而服务器可以获取到该预设用户意图下各个预设问题组。在大型医院的应用场景下,“院内导航问询”的预设用户意图下便可划分出5大类、20小类的预设问题组,包括但不限于:“预约挂号”、“常规检查”、“挂号时间”等,例如,在“预约挂号”的预设问题组中可以包括“我没有带身份证,只有医保卡,可以挂号吗?”、“我能够帮别人挂号吗?”等历史问题。
对于上述步骤202和步骤203,可以理解的是,在进行目标深度学习模型训练之前,需要进行正负样本标注。由于目标深度学习模型的主要作用是判断目标问题(即用户提出的问题)是否与某个预设问题组在问题语义上相同,因此,用于训练该目标深度学习模型的正样本应当是一对问题语义相同的历史问题,而负样本则是一对问题语义不相同的历史问题。因此,服务器可以在各个预设问题组中随机抽取,两两配对历史问题,将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0。标记值为1的问题组合即为正样本,标记值为0的问题组合即为负样本。
对于步骤204,经过上述步骤202和步骤203,服务器整理出正负样本之后,还需要将这些正负样本向量化。具体地,服务器对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量,特别地,可将每个问题组合对应的组合向量以数据矩阵的形式记载,在数据矩阵中,问题组合中的每句话均映射成一个等长的向量,这样更加有利于目标深度学习模型在训练过程中对组合向量识别。其中,在进行向量化映射时,针对每句话预留足够的向量长度,在每句话的文本均映射为向量之后,长度多出来的部分可以使用指定的常向量填充。
对于步骤205,在得到组合向量后,服务器可以将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值。可以理解的是,服务器每投入一个组合向量至该目标深度学习模型中,该目标深度学习模型输出一个对应的样本概率值,该样本概率值表征了该组合向量对应的两个历史问题之间是否问题语义相同,样本概率值越大,则表明这两个历史问题之间问题语义相同的概率越大,反之,样本概率值越小,则表明这两个历史问题之间问题语义相同的概率越小。因此,样本概率值为介于0-1之间的数值。
特别地,该目标深度学习模型具体可以为卷积神经网络,该卷积神经网络的网络结构主要为:卷积层、池化层、随机失活层、正则化层和softmax层,在进行模型训练时,将每个问题组合的两个向量在模型层面进行“加”、“减”、“乘”、“除”等运算,以交叉熵为目标函数,最小化交叉熵,持续迭代模型,最终输出样本概率值。为便于理解,如图10所示,在一个应用场景中,假设某个问题组包含问句1和问句2,将这两个问句向量化处理后,得到该问题组对应的组合向量。在将该组合向量投入到目标深度学习模型之后,问句1和问句2的向量经过输入层后向量化分别进入6个卷积层,其中,每个卷 积层的卷积核的参数设置不同,每层卷积层之后都连接着最大池化层。经过6层卷积和相应的池化之后将得到的6个输出合并为一个向量矩阵,则问句1对应向量矩阵1,问句2对应向量矩阵2。向量矩阵1和2分别跟彼此进行矩阵“减”和“乘”的计算,然后将两个结果矩阵合并。同样的,将合并矩阵依次输入随机失活层,正则化层和全连接层,最终得到一个介于0和1的输出值,该输出值即为第二样本概率值,其表征了问句1和问句2的相似程度。
对于步骤206,可以理解的是,在训练目标深度学习模型的过程中,可以通过调整该目标深度学习模型的参数,尽量使得该目标深度学习模型输出的结果与问题组合对应的标记值逼近,也即误差最小。假设当前投入的组合向量对应的问题组合的标记值为1,也就是说这是一个正样本,则执行步骤206时,服务器调整目标深度学习模型中的各个参数,使得其输出的样本概率值尽可能接近1,远离0。
对于步骤207,在执行上述步骤205和步骤206,将所有组合向量均投入到目标深度学习模型中进行训练之后,为了验证该目标深度学习模型是否训练完成,服务器可以判断所述各个样本概率值与各个问题组合对应的标记值之间的误差是否满足预设条件,若满足,则说明该目标深度学习模型中的各个参数已经调整到位,可以确定该目标深度学习模型已训练完成;反之,若不满足,则说明该目标深度学习模型还需要继续训练。其中,该预设条件可以根据实际使用情况预先设定,具体地,可以将该预设条件设定为:若所述各个样本概率值与各个问题组合对应的标记值之间的误差均小于指定目标误差值,则认为其满足该预设条件。或者,也可以将其设为:使用目标验证集中的问题组合执行上述步骤204和步骤205,若目标深度学习模型输出的样本概率值与标记值之间的误差在一定范围内,则认为其满足该预设条件。其中,该验证集中的问题组合的收集与上述步骤202类似,具体地,可以执行上述步骤202获取到各个问题组合后,将这些问题组合中的一定比例划分为目标训练集,剩余的问题组合划分为目标验证集。比如,可以将两两配对出来的各个问题组合中随机划分80%作为后续训练目标深度学习模型的目标训练集的样本,将其它的20%划分为后续验证目标深度学习模型是否训练完成,也即是否满足预设目标条件的目标验证集的样本。
102、若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
可以理解的是,服务器在检测到所述用户提交了关于答案的负面评价信息后,说明该负面评价信息对应的评价问题的答案没有帮助到用户,可以认为该目标深度学习模型反馈的答案不正确。因此,服务器可以获取该负面评价信息所对应的评价问题组作为新的负样本,以在后续步骤提供给目标深度学习模型训练。
103、当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
本实施例中,服务器预先设置有第一数量阈值,当服务器获取到的各个评价问题的数量达到预设第一数量阈值时,比如达到100个,则服务器对所述各个评价问题进行无监督文本聚类,将文本内容相近的评价问题聚类为一个问题集,共可以得到一个、两个或多个问题集,其中,每个问题集包括一个以上的评价问题。可以理解的是,对这些评价问题进行聚类需要设定聚类的终止条件,即将这些评价问题聚类到何种程度时停止。本实施例中,服务器上可以预设一个条件,该条件具体可以根据实际情况来确定。
为便于理解,下面对聚类过程以及聚类的终止条件进行详细描述。如图4所示,进一步地,所述对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集包括:
301、将所述各个评价问题确定为各个初始的簇;
302、针对每个簇,分别计算所述簇与各个其它簇之间的距离;
303、针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
304、重复执行上述步骤302和303,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
对于上述步骤301,可以理解的是,簇是聚类时针对的对象,本实施例中,可以将各个评价问题确定为各个初始的簇。
对于上述步骤302,服务器在计算两个簇之间的距离时,可以分别将这些簇进行向量化处理,得到各个簇向量,然后计算两个簇向量之间的距离。可以理解的是,两个簇向量的距离越小,则代表了这两个簇越相近,也即对应的两个评价问题越相似;反之,若两个簇向量的距离越大,则代表了这两个簇越不相近,也即对应的两个评价问题越不近似。在执行步骤302时,服务器可以针对每个簇,先计算该簇与其它簇之间的各个距离,然后针对下一个簇,计算该下一个簇与其它簇之间的距离,依次类推,从而把各个簇各自之间的距离计算出来。
对于上述步骤303,服务器在计算得到各个簇两两之间的距离之后,可以将两个距离相近的簇合并,在合并时,一般将距离最近的簇优先合并,两个簇合并得到一个新的簇。
对于上述步骤304,可以理解的是,通过反复执行上述步骤302和303,上述各个簇的数量经过多次合并将越来越少,同时,任意两个簇之间的距离也会越来越远,因此,服务器可以针对聚类后任意两个簇之间的距离或者所有簇的数量来设定该预设的条件作为聚类的终止条件,具体终止条件的展开见下述内容。当当前的各个簇满足预设的条件时,服务器可以将当前的各个簇确定为各个问题集。
为便于理解,更进一步地,上述步骤304可以具体包括下述步骤401-403和/或下述步骤404-406。
401、判断当前的各个簇的数量是否小于或等于预设第二数量阈值;
402、若当前的各个簇的数量大于预设第二数量阈值,则返回执行上述步骤302和步骤303;
403、若当前的各个簇的数量小于或等于预设第二数量阈值,则将当前的各个簇确定为各个问题集;
或者
404、判断当前的各个簇中任意两个簇的距离是否均大于预设的距离阈值;
405、若当前的各个簇中任意两个簇的距离不均大于预设的距离阈值,则返回执行上述步骤302和步骤303;
406、若当前的各个簇中任意两个簇的距离均大于预设的距离阈值,则将当前的各个簇确定为各个问题集。
对于上述步骤401-403,可以理解的是,服务器可以预先设定第二数量阈值作为聚类程度的量化标准,服务器可以判断当前的各个簇的数量是否小于或等于预设第二数量阈值,若当前的各个簇的数量大于预设第二数量阈值,则说明各个簇的数量还较多,各个评价问题的聚类程度还不够,因此可以返回执行上述步骤302和步骤303;反之,若当前的各个簇的数量小于或等于预设第二数量阈值,则说明各个簇的数量已经达标,各个评价问题的聚类程度已足够,因此可以将当前的各个簇确定为各个问题集。
对于上述步骤404-406,可以理解的是,服务器可以预先设定针对任意两个簇的距离阈值作为聚类程度的指标,该距离阈值界定了当前的各个簇的聚类程度是否达到服务器要求。具体地,服务器可以判断当前的各个簇中任意两个簇的距离是否均大于预设的距离阈值,若当前的各个簇中任意两个簇的距离不均大于预设的距离阈值,则说明还存在 至少一对簇的距离足够接近、能够聚类在一起,即各个评价问题的聚类程度还不够,因此可以返回执行上述步骤302和步骤303;反之,若当前的各个簇中任意两个簇的距离均大于预设的距离阈值,则说明当前的各个簇中所有距离足够接近的簇均已聚类完成,剩下的簇均距离较远,代表了各个评价问题的聚类程度已足够,因此可以将当前的各个簇确定为各个问题集。
104、分别确定所述各个问题集的向量中心;
为了便于后续计算这些问题集与各个预设问题组之间的距离,服务器需要先分别确定所述各个问题集的向量中心,这里的向量中心代表了问题集的中心。
进一步地,上述步骤104可以具体采用下述方式一或方式二进行处理。其中方式一包括下述步骤501-502。
501、从所述各个问题集中分别随机选取一个评价问题;
502、对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心。
对于上述步骤501和步骤502,考虑到在同一问题集中的每个评价问题相互之间均距离相近,也即问题内容相似,因此服务器可以从问题集中随机选取一个评价问题作为该问题集的中心,以代表该问题集,这是具有可行性的。针对每个问题集随机选取其中一个评价问题后,服务器可以对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心。
方式二包括下述步骤503-504,具体为:
503、针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
504、针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
对于上述步骤503和步骤504,为了提升问题集的中心的准确性,服务器可以针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量,然后,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。可以理解的是,在一个问题集中包括了多个评价问题,若要严格计算该问题集的中心,最准确的方式就是考虑问题集中每个评价问题对应的问题向量的影响,因此,服务器可以计算这些问题向量的平均值,该向量均值可以代表该问题集中各个向量的平均,从而可以用作该问题集的向量中心。
105、针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
服务器在确定出各个问题集的向量中心之后,针对每个问题集,可以分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离。可知,两个向量中心的距离越接近,代表这两个向量中心代表的对象越相似,在本实施例中,代表了问题集与预设问题组之间越相似。
106、针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
107、针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
对于上述步骤106和步骤107,针对每个问题集,在上述步骤105计算得到的两向量中心之间距离的基础上,若计算得到的最小距离小于预设距离阈值,则可以认为该问题集与最小距离对应的预设问题组之间足够相似,因此可以将所述问题集合并至所述最小距离对应的预设问题组;反之,若计算得到的最小距离大于或等于预设距离阈值,则可以认为该问题集与最小距离对应的预设问题组相似程度不足,因此该问题集与所有要素 和问题组的相似程度必然也不够,服务器可以将所述问题集确定为新的预设问题组。
108、采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
可以理解的是,在执行上述步骤106和步骤107之后,这些问题集要么合并至了预设问题组中,要么确定为了新的预设问题组,总之,服务器获取到的原来的预设问题组必然得到的更新,且更新的来源为用户反馈的负面评价信息对应的问题,也即负样本,可知这些更新后的预设问题组将对目标深度学习模型的完善很有帮助。因此,服务器之后可以采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
在某些应用场景下,考虑到服务器确定出的各个问题集中,有些问题集包含的评价问题数量可能很少,比如一个问题集只包含1个评价问题,这些问题集中的评价问题可以认为是稀疏问题,即用户很少提问的偏门问题。而将这些稀疏问题提供给目标深度学习模型进行训练的意义也不大,因此,本实施例可以对这些稀疏问题进行处理,将其转移至预设的白名单中,而不将其作为负样本提供给目标深度学习模型进行学习、训练。进一步地,如图5所示,在将所述问题集确定为新的预设问题组之前,本方法还可以包括:
601、判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值,若否,则执行步骤602,若是,则执行步骤603;
602、若所述问题集中评价问题的数量大于预设第三数量阈值,则执行所述将所述问题集确定为新的预设问题组的步骤;
603、若所述问题集中评价问题的数量小于或等于预设第三数量阈值,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
对于上述步骤601,服务器可以预先设定第三数量阈值作为判断问题集是否为稀疏问题的标准,当所述问题集中评价问题的数量大于预设第三数量阈值,则认为该问题集不属于稀疏问题,从而执行步骤602,执行所述将所述问题集确定为新的预设问题组的步骤;反之,当所述问题集中评价问题的数量小于或等于预设第三数量阈值,则认为该问题集中的评价问题数量过少,属于稀疏问题,从而执行步骤603,将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。可以理解的是,服务器针对问题白名单中记录的各个问题均设有对应的答案,对新加入的稀疏问题,服务器可以统一告知工作人员在后续为其添加对应的答案。在某些情况下,当目标深度学习模型无法提供答案时,可以将用户提出的问题与问题白名单中的问题进行匹配,若匹配上,则取问题白名单中匹配成功的问题对应的答案提供给用户,实现稀疏问题的有效处理和答案反馈。
综上所述,本申请实施例利用用户提交的负面评价信息对应的问题作为新样本来更新目标深度学习模型,由于这些负面评价信息对应的问题是目标深度学习模型没有回答准确的问题,相当于该目标深度学习模型在训练过程中遗漏或缺失的部分,因此使用这些新样本更新目标深度学习模型,可以帮助目标深度学习模型完善自身,提升自身的答复准确率和适应性,即便面对日益更新的问题也能持续提高问题答复率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种用于答复问题的模型训练装置,该用于答复问题的模型训练装置与上述实施例中用于答复问题的模型训练方法一一对应。如图6所示,该用于答复问题的模型训练装置包括负面评价检测模块701、评价问题获取模块702、问题聚类模块703、向量中心确定模块704、问题距离计算模块705、问题合并模块706、新问题组确定模块707和模型训练模块708。各功能模块详细说明如下:
负面评价检测模块701,用于每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
评价问题获取模块702,用于若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
问题聚类模块703,用于当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
向量中心确定模块704,用于分别确定所述各个问题集的向量中心;
问题距离计算模块705,用于针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
问题合并模块706,用于针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
新问题组确定模块707,用于针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
模型训练模块708,用于采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
如图7所示,进一步地,所述目标深度学习模型可以通过以下模块预先训练好:
问题组获取模块709,用于获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
问题配对模块710,用于将获取到的各个所述历史问题两两配对,得到各个问题组合;
问题组合标记模块711,用于将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
组合向量化模块712,用于对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
组合向量输入模块713,用于将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
模型参数调整模块714,用于以输出的各个样本概率值作为调整目标,调整所述目标深度学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
训练完成确定模块715,用于若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
如图8所示,进一步地,所述问题聚类模块703可以包括:
初始簇确定单元7031,用于将所述各个评价问题确定为各个初始的簇;
簇距离计算单元7032,用于针对每个簇,分别计算所述簇与各个其它簇之间的距离;
簇合并单元7033,用于针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
触发单元7034,用于触发所述簇距离计算单元和所述簇合并单元,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
进一步地,所述用于答复问题的模型训练装置还可以包括:
问题数量判断模块,用于判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值;
触发模块,用于若所述问题数量判断模块的判断结果为否,则触发所述新问题组确定模块;
问题集加入模块,用于若所述问题数量判断模块的判断结果为是,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
进一步地,所述向量中心确定模块可以包括:
问题选取单元,用于从所述各个问题集中分别随机选取一个评价问题;
第一向量化处理单元,用于对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心;
第二向量化处理单元,用于针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
向量均值计算单元,用于针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
关于用于答复问题的模型训练装置的具体限定可以参见上文中对于用于答复问题的模型训练方法的限定,在此不再赘述。上述用于答复问题的模型训练装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储用于答复问题的模型训练方法中涉及到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种用于答复问题的模型训练方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中用于答复问题的模型训练方法的步骤,例如图2所示的步骤101至步骤108。或者,处理器执行计算机可读指令时实现上述实施例中用于答复问题的模型训练装置的各模块/单元的功能,例如图6所示模块701至模块708的功能。为避免重复,这里不再赘述。
在一个实施例中,提供了一种计算机可读存储介质,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述方法实施例中用于答复问题的模型训练方法的步骤,或者,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现上述装置实施例中用于答复问题的模型训练装置中各模块/单元的功能。为避免重复,这里不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过 计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种用于答复问题的模型训练方法,其特征在于,包括:
    每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
    若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
    当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
    分别确定所述各个问题集的向量中心;
    针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
    针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
    针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
    采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
  2. 根据权利要求1所述的用于答复问题的模型训练方法,其特征在于,所述目标深度学习模型通过以下步骤预先训练好:
    获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
    将获取到的各个所述历史问题两两配对,得到各个问题组合;
    将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
    对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
    将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
    以输出的各个样本概率值作为调整目标,调整所述目标深度学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
    若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
  3. 根据权利要求1所述的用于答复问题的模型训练方法,其特征在于,所述对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集包括:
    将所述各个评价问题确定为各个初始的簇;
    针对每个簇,分别计算所述簇与各个其它簇之间的距离;
    针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
    返回执行所述针对每个簇,分别计算所述簇与各个其它簇之间的距离的步骤,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
  4. 根据权利要求1所述的用于答复问题的模型训练方法,其特征在于,在将所述问题集确定为新的预设问题组之前,还包括:
    判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值;
    若所述问题集中评价问题的数量大于预设第三数量阈值,则执行所述将所述问题集确 定为新的预设问题组的步骤;
    若所述问题集中评价问题的数量小于或等于预设第三数量阈值,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
  5. 根据权利要求1至4中任一项所述的用于答复问题的模型训练方法,其特征在于,所述分别确定所述各个问题集的向量中心包括:
    从所述各个问题集中分别随机选取一个评价问题;
    对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心;
    针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
    针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
  6. 一种用于答复问题的模型训练装置,其特征在于,包括:
    负面评价检测模块,用于每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
    评价问题获取模块,用于若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
    问题聚类模块,用于当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
    向量中心确定模块,用于分别确定所述各个问题集的向量中心;
    问题距离计算模块,用于针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
    问题合并模块,用于针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
    新问题组确定模块,用于针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
    模型训练模块,用于采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
  7. 根据权利要求6所述的用于答复问题的模型训练装置,其特征在于,所述目标深度学习模型通过以下模块预先训练好:
    问题组获取模块,用于获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
    问题配对模块,用于将获取到的各个所述历史问题两两配对,得到各个问题组合;
    问题组合标记模块,用于将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
    组合向量化模块,用于对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
    组合向量输入模块,用于将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
    模型参数调整模块,用于以输出的各个样本概率值作为调整目标,调整所述目标深度 学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
    训练完成确定模块,用于若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
  8. 根据权利要求6所述的用于答复问题的模型训练装置,其特征在于,所述问题聚类模块包括:
    初始簇确定单元,用于将所述各个评价问题确定为各个初始的簇;
    簇距离计算单元,用于针对每个簇,分别计算所述簇与各个其它簇之间的距离;
    簇合并单元,用于针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
    触发单元,用于触发所述簇距离计算单元和所述簇合并单元,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
  9. 根据权利要求6所述的用于答复问题的模型训练装置,其特征在于,所述用于答复问题的模型训练装置还包括:
    问题数量判断模块,用于判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值;
    触发模块,用于若所述问题数量判断模块的判断结果为否,则触发所述新问题组确定模块;
    问题集加入模块,用于若所述问题数量判断模块的判断结果为是,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
  10. 根据权利要求6至9中任一项所述的用于答复问题的模型训练装置,其特征在于,所述向量中心确定模块包括:
    问题选取单元,用于从所述各个问题集中分别随机选取一个评价问题;
    第一向量化处理单元,用于对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心;
    第二向量化处理单元,用于针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
    向量均值计算单元,用于针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
    若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
    当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
    分别确定所述各个问题集的向量中心;
    针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心 的距离;
    针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
    针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
    采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述目标深度学习模型通过以下步骤预先训练好:
    获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
    将获取到的各个所述历史问题两两配对,得到各个问题组合;
    将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
    对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
    将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
    以输出的各个样本概率值作为调整目标,调整所述目标深度学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
    若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
  13. 根据权利要求11所述的计算机设备,其特征在于,所述对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集包括:
    将所述各个评价问题确定为各个初始的簇;
    针对每个簇,分别计算所述簇与各个其它簇之间的距离;
    针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
    返回执行所述针对每个簇,分别计算所述簇与各个其它簇之间的距离的步骤,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
  14. 根据权利要求11所述的计算机设备,其特征在于,在将所述问题集确定为新的预设问题组之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值;
    若所述问题集中评价问题的数量大于预设第三数量阈值,则执行所述将所述问题集确定为新的预设问题组的步骤;
    若所述问题集中评价问题的数量小于或等于预设第三数量阈值,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
  15. 根据权利要求11至14中任一项所述的计算机设备,其特征在于,所述分别确定所述各个问题集的向量中心包括:
    从所述各个问题集中分别随机选取一个评价问题;
    对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心;
    针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
    针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
  16. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    每当在通过目标深度学习模型针对用户提出的问题反馈答案后,检测所述用户是否提交了关于答案的负面评价信息,所述目标深度学习模型由各个预设问题组作为训练数据预先训练得到;
    若检测到所述用户提交了关于答案的负面评价信息,则获取所述负面评价信息所对应的评价问题;
    当获取到的各个评价问题的数量达到预设第一数量阈值时,对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集,每个问题集包括一个以上的评价问题;
    分别确定所述各个问题集的向量中心;
    针对每个问题集,分别计算所述问题集的向量中心与各个所述预设问题组的向量中心的距离;
    针对每个问题集,若计算得到的最小距离小于预设距离阈值,则将所述问题集合并至所述最小距离对应的预设问题组;
    针对每个问题集,若计算得到的最小距离大于或等于预设距离阈值,则将所述问题集确定为新的预设问题组;
    采用更新后的所述各个预设问题组重新对所述目标深度学习模型进行训练,得到训练后的目标深度学习模型。
  17. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述目标深度学习模型通过以下步骤预先训练好:
    获取所述各个预设问题组,每个预设问题组包括多个预先收集的问题语义相同的历史问题;
    将获取到的各个所述历史问题两两配对,得到各个问题组合;
    将两个配对的历史问题属于同一预设问题组的问题组合的标记值记为1,并将两个配对的历史问题不属于同一预设问题组的问题组合的标记值记为0;
    对所述各个问题组合分别进行向量化处理,得到所述各个问题组合对应的组合向量;
    将所有组合向量作为输入投入至所述目标深度学习模型,得到输出的各个样本概率值;
    以输出的各个样本概率值作为调整目标,调整所述目标深度学习模型的参数,以最小化得到的所述各个样本概率值与各个问题组合对应的标记值之间的误差;
    若所述各个样本概率值与各个问题组合对应的标记值之间的误差满足预设条件,则确定所述目标深度学习模型已训练好。
  18. 根据权利要求16所述的非易失性可读存储介质,其特征在于,所述对所述各个评价问题进行无监督文本聚类,直到满足预设的条件,聚类后得到各个问题集包括:
    将所述各个评价问题确定为各个初始的簇;
    针对每个簇,分别计算所述簇与各个其它簇之间的距离;
    针对每个簇,将距离所述簇最近的一个其它簇与所述簇合并,得到一个新的簇;
    返回执行所述针对每个簇,分别计算所述簇与各个其它簇之间的距离的步骤,直到当前的各个簇满足预设的条件,将当前的各个簇确定为各个问题集。
  19. 根据权利要求16所述的非易失性可读存储介质,其特征在于,在将所述问题集确定为新的预设问题组之前,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    判断所述问题集中评价问题的数量是否小于或等于预设第三数量阈值;
    若所述问题集中评价问题的数量大于预设第三数量阈值,则执行所述将所述问题集确定为新的预设问题组的步骤;
    若所述问题集中评价问题的数量小于或等于预设第三数量阈值,则将所述问题集加入至预设的问题白名单中,所述问题白名单中记录的各个问题均预设有对应的答案,当所述目标深度学习模型针对用户提出的问题无法反馈答案时,将匹配问题对应的答案反馈给所述用户,所述匹配问题是指所述问题白名单中与所述用户提出的问题匹配的问题。
  20. 根据权利要求16至19中任一项所述的非易失性可读存储介质,其特征在于,所述分别确定所述各个问题集的向量中心包括:
    从所述各个问题集中分别随机选取一个评价问题;
    对选取出的各个评价问题分别进行向量化处理,得到各个问题向量作为所述各个问题集的向量中心;
    针对每个问题集,对所述问题集中每个评价问题分别进行向量化处理,得到所述问题集中各个评价问题对应的问题向量;
    针对每个问题集,计算所述问题集中各个问题向量的平均值,得到向量均值作为所述问题集的向量中心。
PCT/CN2019/088713 2018-12-11 2019-05-28 用于答复问题的模型训练方法、装置、设备及存储介质 Ceased WO2020119030A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811507887.8 2018-12-11
CN201811507887.8A CN109783617B (zh) 2018-12-11 2018-12-11 用于答复问题的模型训练方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020119030A1 true WO2020119030A1 (zh) 2020-06-18

Family

ID=66496148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088713 Ceased WO2020119030A1 (zh) 2018-12-11 2019-05-28 用于答复问题的模型训练方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN109783617B (zh)
WO (1) WO2020119030A1 (zh)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680147A (zh) * 2020-07-07 2020-09-18 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备以及可读存储介质
CN112131378A (zh) * 2020-08-20 2020-12-25 彭涛 用于识别民生问题类别的方法、装置及电子设备
CN113987138A (zh) * 2020-07-08 2022-01-28 阿里巴巴集团控股有限公司 问答匹配模型的训练方法、装置、电子设备及存储介质
CN114048104A (zh) * 2021-11-24 2022-02-15 国家电网有限公司大数据中心 一种监控方法、装置、设备及存储介质
CN114372088A (zh) * 2022-01-11 2022-04-19 河南省计量科学研究院 基于型评系统的计量设备样机评价方法、装置、设备及介质
CN114372087A (zh) * 2022-01-11 2022-04-19 河南省计量科学研究院 基于型评系统的评价方法、装置、设备及介质
CN114428857A (zh) * 2022-01-21 2022-05-03 北京百度网讯科技有限公司 一种信息的标注方法、装置、设备以及存储介质
US20220172714A1 (en) * 2020-12-01 2022-06-02 International Business Machines Corporation Training an artificial intelligence of a voice response system
CN115330252A (zh) * 2022-08-31 2022-11-11 中国第一汽车股份有限公司 一种驾驶参数的调整方法、装置、电子设备及存储介质
CN115391404A (zh) * 2022-08-29 2022-11-25 南京中孚信息技术有限公司 数据检索方法、装置、电子设备及存储介质
CN115543851A (zh) * 2022-11-04 2022-12-30 济南浪潮数据技术有限公司 一种软件测试方法、装置、设备及介质
CN116562364A (zh) * 2023-03-27 2023-08-08 北京邮电大学 基于知识蒸馏的深度学习模型协同推演方法、装置及设备
CN116863179A (zh) * 2023-07-31 2023-10-10 四川弘和数智集团有限公司 基于深度学习的无监督数据划分方法
CN117171536A (zh) * 2023-09-21 2023-12-05 北京新唐思创教育科技有限公司 评价方法、装置及设备
CN117272011A (zh) * 2023-09-28 2023-12-22 北京百度网讯科技有限公司 模型测评方法、装置、电子设备和存储介质
CN117764427A (zh) * 2023-10-20 2024-03-26 国网智能科技股份有限公司 电力人工智能模型成效反馈评价方法及系统
CN117786416A (zh) * 2024-02-28 2024-03-29 腾讯科技(深圳)有限公司 一种模型训练方法、装置、设备、存储介质及产品
CN117809807A (zh) * 2024-01-22 2024-04-02 中科网联(武汉)信息技术有限公司 基于交互平台的视觉训练方法、系统及存储介质
CN119203782A (zh) * 2024-11-07 2024-12-27 北京航天晨信科技有限责任公司 一种基于簇间对抗的智能体训练方法和装置
CN119474310A (zh) * 2024-11-07 2025-02-18 湖北泰跃卫星技术发展股份有限公司 一种数字人系统中标准问题的检索方法
CN120873615A (zh) * 2025-09-26 2025-10-31 上海荣耀智慧科技开发有限公司 训练大模型的方法、调用工具的方法和电子设备

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783617B (zh) * 2018-12-11 2024-01-26 平安科技(深圳)有限公司 用于答复问题的模型训练方法、装置、设备及存储介质
CN110263939B (zh) * 2019-06-24 2024-11-29 腾讯科技(深圳)有限公司 一种表示学习模型的评估方法、装置、设备及介质
CN110502620B (zh) * 2019-07-02 2023-05-30 平安科技(深圳)有限公司 导诊相似问题对生成方法、系统及计算机设备
CN110442692A (zh) * 2019-07-25 2019-11-12 阿里巴巴集团控股有限公司 一种用于问题派单及其训练的方法和装置
CN110569356B (zh) * 2019-08-14 2022-05-20 中国平安人寿保险股份有限公司 基于智能面试交互系统的面试方法、装置和计算机设备
CN110737759B (zh) * 2019-09-06 2023-07-25 中国平安人寿保险股份有限公司 客服机器人的评测方法、装置、计算机设备及存储介质
CN110825857B (zh) * 2019-09-24 2023-07-21 平安科技(深圳)有限公司 多轮问答识别方法、装置、计算机设备及存储介质
CN111079653B (zh) * 2019-12-18 2024-03-22 中国工商银行股份有限公司 数据库自动分库方法及装置
CN111209929A (zh) * 2019-12-19 2020-05-29 平安信托有限责任公司 访问数据处理方法、装置、计算机设备及存储介质
CN111858846B (zh) * 2020-03-05 2024-12-10 北京嘀嘀无限科技发展有限公司 一种信息处理方法及装置
CN113298103B (zh) * 2020-05-27 2025-06-20 阿里巴巴集团控股有限公司 向量聚类训练方法及装置
CN111882416A (zh) * 2020-07-24 2020-11-03 未鲲(上海)科技服务有限公司 一种风险预测模型的训练方法和相关装置
CN112035649B (zh) * 2020-09-02 2023-11-17 腾讯科技(深圳)有限公司 问答模型处理方法、装置、计算机设备及存储介质
CN113486203B (zh) * 2021-07-09 2024-05-31 平安科技(深圳)有限公司 基于问答平台的数据处理方法、装置及相关设备
CN115481233A (zh) * 2022-10-12 2022-12-16 中国第一汽车股份有限公司 一种自适应的自然语言生成方法及系统
CN116340473A (zh) * 2022-12-07 2023-06-27 竹间智能科技(上海)有限公司 一种对话日志处理方法、装置、电子设备及存储介质
CN116894083A (zh) * 2023-06-27 2023-10-17 重庆三峡时代能源科技有限公司 锂电池热失控预警方法、装置、设备及存储介质
CN117351302B (zh) * 2023-10-07 2024-06-07 深圳市翻江倒海互动娱乐有限公司 一种图像生成模型的训练方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140272885A1 (en) * 2013-03-15 2014-09-18 International Business Machines Corporation Learning model for dynamic component utilization in a question answering system
CN104572998A (zh) * 2015-01-07 2015-04-29 北京云知声信息技术有限公司 用于自动问答系统的问答排序模型更新方法及装置
CN106844686A (zh) * 2017-01-26 2017-06-13 武汉奇米网络科技有限公司 基于solr的智能客服问答机器人及其实现方法
CN108932349A (zh) * 2018-08-17 2018-12-04 齐鲁工业大学 医疗自动问答方法及装置、存储介质、电子设备
CN109783617A (zh) * 2018-12-11 2019-05-21 平安科技(深圳)有限公司 用于答复问题的模型训练方法、装置、设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9230009B2 (en) * 2013-06-04 2016-01-05 International Business Machines Corporation Routing of questions to appropriately trained question and answer system pipelines using clustering
US20180068222A1 (en) * 2016-09-07 2018-03-08 International Business Machines Corporation System and Method of Advising Human Verification of Machine-Annotated Ground Truth - Low Entropy Focus
CN106844530A (zh) * 2016-12-29 2017-06-13 北京奇虎科技有限公司 一种问答对分类模型的训练方法和装置
CN107329967B (zh) * 2017-05-12 2019-09-24 北京邮电大学 基于深度学习的问答系统以及方法
CN107562789A (zh) * 2017-07-28 2018-01-09 深圳前海微众银行股份有限公司 知识库问题更新方法、客服机器人以及可读存储介质
CN108846126B (zh) * 2018-06-29 2021-07-27 北京百度网讯科技有限公司 关联问题聚合模型的生成、问答式聚合方法、装置及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140272885A1 (en) * 2013-03-15 2014-09-18 International Business Machines Corporation Learning model for dynamic component utilization in a question answering system
CN104572998A (zh) * 2015-01-07 2015-04-29 北京云知声信息技术有限公司 用于自动问答系统的问答排序模型更新方法及装置
CN106844686A (zh) * 2017-01-26 2017-06-13 武汉奇米网络科技有限公司 基于solr的智能客服问答机器人及其实现方法
CN108932349A (zh) * 2018-08-17 2018-12-04 齐鲁工业大学 医疗自动问答方法及装置、存储介质、电子设备
CN109783617A (zh) * 2018-12-11 2019-05-21 平安科技(深圳)有限公司 用于答复问题的模型训练方法、装置、设备及存储介质

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680147A (zh) * 2020-07-07 2020-09-18 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备以及可读存储介质
CN113987138A (zh) * 2020-07-08 2022-01-28 阿里巴巴集团控股有限公司 问答匹配模型的训练方法、装置、电子设备及存储介质
CN112131378A (zh) * 2020-08-20 2020-12-25 彭涛 用于识别民生问题类别的方法、装置及电子设备
US20220172714A1 (en) * 2020-12-01 2022-06-02 International Business Machines Corporation Training an artificial intelligence of a voice response system
US11676593B2 (en) * 2020-12-01 2023-06-13 International Business Machines Corporation Training an artificial intelligence of a voice response system based on non_verbal feedback
CN114048104A (zh) * 2021-11-24 2022-02-15 国家电网有限公司大数据中心 一种监控方法、装置、设备及存储介质
CN114372088A (zh) * 2022-01-11 2022-04-19 河南省计量科学研究院 基于型评系统的计量设备样机评价方法、装置、设备及介质
CN114372087A (zh) * 2022-01-11 2022-04-19 河南省计量科学研究院 基于型评系统的评价方法、装置、设备及介质
CN114428857A (zh) * 2022-01-21 2022-05-03 北京百度网讯科技有限公司 一种信息的标注方法、装置、设备以及存储介质
CN115391404A (zh) * 2022-08-29 2022-11-25 南京中孚信息技术有限公司 数据检索方法、装置、电子设备及存储介质
CN115330252A (zh) * 2022-08-31 2022-11-11 中国第一汽车股份有限公司 一种驾驶参数的调整方法、装置、电子设备及存储介质
CN115543851A (zh) * 2022-11-04 2022-12-30 济南浪潮数据技术有限公司 一种软件测试方法、装置、设备及介质
CN116562364A (zh) * 2023-03-27 2023-08-08 北京邮电大学 基于知识蒸馏的深度学习模型协同推演方法、装置及设备
CN116863179A (zh) * 2023-07-31 2023-10-10 四川弘和数智集团有限公司 基于深度学习的无监督数据划分方法
CN117171536A (zh) * 2023-09-21 2023-12-05 北京新唐思创教育科技有限公司 评价方法、装置及设备
CN117272011A (zh) * 2023-09-28 2023-12-22 北京百度网讯科技有限公司 模型测评方法、装置、电子设备和存储介质
CN117764427A (zh) * 2023-10-20 2024-03-26 国网智能科技股份有限公司 电力人工智能模型成效反馈评价方法及系统
CN117809807A (zh) * 2024-01-22 2024-04-02 中科网联(武汉)信息技术有限公司 基于交互平台的视觉训练方法、系统及存储介质
CN117809807B (zh) * 2024-01-22 2024-05-31 中科网联(武汉)信息技术有限公司 基于交互平台的视觉训练方法、系统及存储介质
CN117786416A (zh) * 2024-02-28 2024-03-29 腾讯科技(深圳)有限公司 一种模型训练方法、装置、设备、存储介质及产品
CN117786416B (zh) * 2024-02-28 2024-05-28 腾讯科技(深圳)有限公司 一种模型训练方法、装置、设备、存储介质及产品
CN119203782A (zh) * 2024-11-07 2024-12-27 北京航天晨信科技有限责任公司 一种基于簇间对抗的智能体训练方法和装置
CN119474310A (zh) * 2024-11-07 2025-02-18 湖北泰跃卫星技术发展股份有限公司 一种数字人系统中标准问题的检索方法
CN120873615A (zh) * 2025-09-26 2025-10-31 上海荣耀智慧科技开发有限公司 训练大模型的方法、调用工具的方法和电子设备

Also Published As

Publication number Publication date
CN109783617A (zh) 2019-05-21
CN109783617B (zh) 2024-01-26

Similar Documents

Publication Publication Date Title
WO2020119030A1 (zh) 用于答复问题的模型训练方法、装置、设备及存储介质
WO2020119031A1 (zh) 基于深度学习的问答反馈方法、装置、设备及存储介质
CN109871446B (zh) 意图识别中的拒识方法、电子装置及存储介质
US11704500B2 (en) Techniques to add smart device information to machine learning for increased context
WO2020237869A1 (zh) 一种问题意图识别方法、装置、计算机设备及存储介质
US11531824B2 (en) Cross-lingual information retrieval and information extraction
CN110991178B (zh) 智能客服与人工客服的切换方法、装置及计算机设备
CN112287089B (zh) 用于自动问答系统的分类模型训练、自动问答方法及装置
WO2020143844A1 (zh) 意图分析方法、装置、显示终端及计算机可读存储介质
CN111949787A (zh) 基于知识图谱的自动问答方法、装置、设备及存储介质
CN110287296A (zh) 一种问题答案选取方法、装置、计算机设备及存储介质
WO2020135337A1 (zh) 实体语义关系分类
JP2019049957A (ja) 問い合わせのターゲットクラスを特定しそれらの応答を提供するBiLSTM−シャムネットワークベース分類器
CN112016295A (zh) 症状数据处理方法、装置、计算机设备及存储介质
CN110969006B (zh) 一种文本排序模型的训练方法和系统
US11537905B2 (en) Inference-based assignment of data type to data
CN111783473B (zh) 医疗问答中最佳答案的识别方法、装置和计算机设备
CN110674276A (zh) 机器人自学习方法、机器人终端、装置及可读存储介质
CN114416929B (zh) 实体召回模型的样本生成方法、装置、设备及存储介质
CN110377618B (zh) 裁决结果分析方法、装置、计算机设备和存储介质
CN115423120A (zh) 一种业务模型的训练方法、训练装置和计算设备
CN107665244B (zh) 一种获取粮食产量与化肥使用量之间关系的方法及装置
CN114036267B (zh) 对话方法及系统
Nemati et al. New hybrid feature selection approaches based on ANN and novel sparsity norm
CN113868424B (zh) 文本主题的确定方法、装置、计算机设备及存储介质

Legal Events

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

Ref document number: 19894529

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19894529

Country of ref document: EP

Kind code of ref document: A1