WO2021243828A1 - Text processing method and apparatus based on machine learning, and computer device and medium - Google Patents

Text processing method and apparatus based on machine learning, and computer device and medium Download PDF

Info

Publication number
WO2021243828A1
WO2021243828A1 PCT/CN2020/103784 CN2020103784W WO2021243828A1 WO 2021243828 A1 WO2021243828 A1 WO 2021243828A1 CN 2020103784 W CN2020103784 W CN 2020103784W WO 2021243828 A1 WO2021243828 A1 WO 2021243828A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
standard
answer
data
answer data
Prior art date
Application number
PCT/CN2020/103784
Other languages
French (fr)
Chinese (zh)
Inventor
柳阳
喻宁
郑喜民
梁关林
Original Assignee
平安国际智慧城市科技股份有限公司
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 平安国际智慧城市科技股份有限公司 filed Critical 平安国际智慧城市科技股份有限公司
Publication of WO2021243828A1 publication Critical patent/WO2021243828A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/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/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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

Definitions

  • This application relates to the field of intelligent decision-making in artificial intelligence, and in particular to a text processing method, device, computer equipment and medium based on machine learning.
  • Machine Reading Comprehension has become a new hot spot in the field of artificial intelligence research and application. Its main function is to read and understand a given article or Context, automatically give answers to related questions.
  • the traditional method of machine reading comprehension mainly adopts the method of determining the correct answer based on similarity or correlation. This type of method determines the correct answer by calculating the most similarity or correlation between the sentence of the option and the background material.
  • Sentences that are semantically equivalent are often expressed in different forms of syntactic structure.
  • the embodiments of the present application provide a text processing method, device, computer equipment, and medium based on machine learning to solve the problem of low accuracy of answers obtained by machine reading.
  • a text processing method based on machine learning including:
  • the standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained.
  • the initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
  • the final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  • a text processing device based on machine learning includes:
  • the preprocessing module is used to obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
  • the first input module is configured to input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
  • the prediction module is used to input the standard material information, the standard question information, and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, where the initial answer information includes multiple Pieces of evaluation data information and problem-solving ideas information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
  • the determining module is configured to determine final evaluation data from a plurality of the evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information as a target answer in a preset integration manner information.
  • a computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
  • the standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained.
  • the initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
  • the final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  • a computer-readable storage medium stores a computer program
  • the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
  • the standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained.
  • the initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
  • the final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  • the above-mentioned text processing methods, devices, computer equipment and media based on machine learning obtain standard answer data by taking the answer data to be processed and preprocessing the answer data to be processed.
  • the standard answer data includes standard material information and standard question information;
  • the standard question information in the answer data is input into the preset answer classification model to obtain the question type of the standard question information;
  • the standard material information, standard question information and the corresponding question type are input into the preset target machine reading comprehension model Predict and obtain initial answer information.
  • the initial answer information includes multiple evaluation data information and problem-solving ideas information corresponding to the standard problem information.
  • the target machine reading comprehension model is obtained by training with a convolutional neural network-pre-training language model ⁇ ; According to the problem-solving idea information, the final evaluation data is determined from a plurality of the evaluation data information, and the final evaluation data and the problem-solving idea information are recorded as the target answer information in a preset integration mode; by using a convolutional neural network- The target machine reading comprehension model trained by the pre-training language model predicts the answer to the answer data to be processed, and obtains the target answer information that contains both the evaluation data information and the corresponding problem-solving idea information; thereby further improving the accuracy of the answer obtained by machine reading And the real meaning plays a role in assisting teaching/learning.
  • FIG. 1 is a schematic diagram of an application environment of a text processing method based on machine learning in an embodiment of the present application
  • FIG. 2 is a flowchart of a text processing method based on machine learning in an embodiment of the present application
  • FIG. 3 is another flowchart of a text processing method based on machine learning in an embodiment of the present application
  • FIG. 5 is another flowchart of a text processing method based on machine learning in an embodiment of the present application.
  • Fig. 6 is another flowchart of a text processing method based on machine learning in an embodiment of the present application.
  • FIG. 7 is a functional block diagram of a text processing device based on machine learning in an embodiment of the present application.
  • FIG. 8 is another functional block diagram of a text processing device based on machine learning in an embodiment of the present application.
  • FIG. 9 is another functional block diagram of a text processing device based on machine learning in an embodiment of the present application
  • Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
  • the text processing method based on machine learning can be applied to the application environment shown in FIG. 1.
  • the text processing method based on machine learning is applied in a text processing system based on machine learning.
  • the text processing system based on machine learning includes a client and a server as shown in FIG. Communication is used to solve the problem of low accuracy of answers obtained by machine reading.
  • the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client.
  • the client can be installed on, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server can be implemented with a standalone server or a server cluster composed of multiple servers.
  • a text processing method based on machine learning is provided.
  • the application of the method to the server in FIG. 1 is taken as an example for description, including the following steps:
  • S10 Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data.
  • the standard answer data includes standard material information and standard question information.
  • the answer data to be processed refers to the reading comprehension data to be processed.
  • Each piece of reading comprehension data is regarded as a pending answer data.
  • the language of the answer data to be processed can be Chinese or English.
  • the answer data to be processed mainly includes reading materials and question information.
  • the topic information is mainly composed of questions and corresponding candidate answers.
  • the reading material can be single-paragraph text or multi-paragraph text.
  • a piece of reading material in the answer data to be processed may correspond to one or more item information.
  • any piece of reading comprehension data can be obtained directly from the test system, or any piece of reading comprehension data on the paper answer sheet can be scanned and recognized.
  • the preprocessing of the answer data to be processed mainly includes format judgment and processing of the answer data to be processed, to determine whether the format of the answer data to be processed meets preset conditions.
  • the answer data to be processed in English format can Input to the machine reading comprehension model for answer prediction. Therefore, if the text format of the answer data to be processed is Chinese, the answer data to be processed in Chinese format needs to be converted into the answer data to be processed in English format.
  • the answer data to be processed is assembled into the answer data in json format, and the json string in the answer data to be processed meets the requirements, such as judging the answer to be processed Whether the key in the data is vacant, whether the value type meets the requirements, whether the value length is within the range, etc. If the json string in the answer data to be processed does not meet the requirements, the answer data to be processed is returned to the client interface and Perform an abnormal display, prompting the user that the pending answer data is illegal data, and the pending answer data needs to be re-acquired.
  • the number of characters in the answer data to be processed exceeds the preset character threshold, then It is necessary to perform character segmentation processing on the answer data to be processed according to the real-time situation.
  • one answer data to be processed that originally contains a piece of reading material and multiple item information can be divided into multiple answer data to be processed, and each answer data to be processed includes One reading material and one topic information.
  • the standard answer data includes standard material information and standard question information.
  • the standard material information is material information that meets the requirements after preprocessing the material information in the answer data to be processed.
  • the standard item information is the item information that meets the requirements after preprocessing the item information in the answer data to be processed.
  • S20 Input the standard question information in the standard answer data into the preset answer classification model to obtain the question type of the standard question information.
  • one standard answer data may include one or more standard question information, and the question types corresponding to different standard question information may be different.
  • the standard question information included in a standard answer data may be a full-text inference question, a paragraph reasoning question, or a summary multiple-choice question.
  • the type of each standard question information in the standard answer data is determined.
  • the question type of each standard question information can be obtained.
  • the answer classification model is a pre-trained model that can identify the standard question information, thereby determining the question type of the standard question information.
  • the question type of the classified standard question information may be a vocabulary question, a highlight question, a full text inference question, an insertion question, a paragraph reasoning question, a summary multiple choice question, or a connection question.
  • the answer classification model is preferably a machine learning Bayesian model.
  • the machine learning Bayes model is obtained by training a large amount of topic information that has been classified and labeled in advance.
  • Bayesian decision theory Bayesian decision theory
  • Bayesian decision theory is the basic method to implement decision-making under the framework of probability. It is a combination of Decision theory + Probability theory. It discusses how to make optimal decisions in an environment containing uncertainty. For classification tasks, in an ideal situation where all relevant probabilities are known, Bayesian Decision theory considers how to select the optimal category label based on these probabilities and misjudgment losses (probability knowledge + knowledge of the loss caused by the decision ⁇ optimal decision).
  • S30 Input the standard material information, standard question information and the corresponding question type into the preset target machine reading comprehension model for prediction, and obtain initial answer information.
  • the initial answer information includes multiple evaluation data information and information corresponding to the standard question information.
  • Problem-solving ideas information where the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model.
  • the target machine reading comprehension model refers to a pre-trained model that can predict answers and analyze problem-solving ideas.
  • the target machine reading comprehension model is obtained by training with a convolutional neural network-pretrained language model.
  • Convolutional neural network-pre-training language model is a model obtained by combining convolutional neural network model and pre-training language model. Understandably, the convolutional neural network-pre-training language model is equivalent to the model formed by connecting the convolutional neural network and the pre-training language network model.
  • the target machine reading comprehension model mainly includes a prediction layer, a reasoning layer, an encoding layer, and a data layer.
  • the prediction layer includes several prediction units, and each prediction unit corresponds to one type of standard title information.
  • the prediction layer can include vocabulary item unit, highlight item unit, full-text inference item unit, insertion item unit, paragraph inference item unit, summary multiple-choice item unit, and connection item unit.
  • the reasoning layer mainly includes the RoBerta unit and the XLNet unit.
  • the RoBerta unit mainly obtains the selection probability value of each standard candidate text by combining the standard candidate text and the standard material information.
  • the XLNet unit mainly processes the standard candidate text and standard material information, and obtains the key information of the standard material information. Among them, the selection probability value is the probability value used to evaluate the standard candidate text as the correct answer.
  • the key information of the standard material information is the information after labeling and parsing each sentence in the standard material information. For example: mark which sentence in the standard material information is the central opinion sentence, the sub-thesis sentence, and the non-opinion sentence.
  • the coding layer is used to perform feature encoding on the selection probability value of each standard candidate text and the key information of the standard material information. And input the selection probability value of each standard candidate text for feature encoding and the key information of the standard material information into the data layer, so as to obtain the initial answer information.
  • the initial answer information includes multiple evaluation data information and problem-solving ideas information corresponding to the standard problem information.
  • the evaluation data information is the selection probability value corresponding to each candidate answer in the standard topic information. Since one standard question information includes at least two candidate answers, the initial answer information obtained includes multiple evaluation data information. Each candidate answer corresponds to an evaluation data message.
  • Problem-solving thinking information is the process of analyzing the normal answer derived from the standard topic information, that is, the reason and understanding process of why this answer was chosen.
  • S40 Determine final evaluation data from multiple evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information as target answer information in a preset integration manner.
  • each evaluation data information is a probability value corresponding to each candidate answer in the standard topic information. Therefore, after the probability value corresponding to each candidate answer in the standard question information is determined, the probability value corresponding to each candidate answer is screened according to the problem-solving idea information and the question requirements in the standard question information.
  • the final evaluation data is determined in the evaluation data information, that is, the correct answer corresponding to the standard question is determined, and then the final evaluation data corresponding to the standard question and the corresponding problem-solving idea information are recorded as the target answer in a preset integration method information.
  • the preset integration method can be to directly combine the final evaluation data and the corresponding problem-solving idea information.
  • the obtained initial answer information includes 4 evaluation data information, which are candidate answer A: 0.81, candidate answer B: 0.92, candidate answer C: 0.95 and candidate answer D: 0.01, the question requirements in the standard question information are Which is a conclusion that is impossible to infer from the material. Therefore, the final evaluation data is determined as the candidate answer D from the four evaluation data information combined with the problem-solving idea information. Understandably, the probability value corresponding to the candidate answer D is the smallest probability value, that is, the candidate answer D is unlikely to be inferred from the material, so the final evaluation data is the candidate answer D.
  • the final evaluation data and problem-solving ideas information are recorded as target answer information in a preset integration manner. Understandably, the target answer information includes the correct answer to the question and the reason and understanding process of why the answer was chosen.
  • the answer data to be processed is obtained, and the answer data to be processed is preprocessed to obtain standard answer data.
  • the standard answer data includes standard material information and standard question information; the standard question information in the standard answer data is input to the preset In the answer classification model, the question type of the standard question information is obtained; the standard material information, the standard question information and the corresponding question type are input into the preset target machine reading comprehension model for prediction, and the initial answer information is obtained.
  • the initial answer information includes Multiple evaluation data information and problem-solving ideas information corresponding to the standard topic information.
  • the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model; based on the problem-solving idea information from multiple evaluation data information Determine the final evaluation data in the process, and record the final evaluation data and the problem-solving idea information as the target answer information in a preset integration method; the target machine reading comprehension model obtained by using the convolutional neural network-pre-training language model training to deal with the answer
  • the data is used for answer prediction, and the target answer information that contains both the evaluation data information and the corresponding problem-solving idea information is obtained; thus, the accuracy and true meaning of the answers obtained by machine reading are further improved, which plays a role in assisting teaching/learning.
  • preprocessing the answer data to be processed includes the following steps:
  • S101 Standardize the text form of the answer data to be processed to obtain the initial answer data.
  • the language of the acquired answer data to be processed may be in Chinese format or English format
  • the answer data to be processed in English format can be input into the machine reading comprehension model for answer prediction, therefore,
  • the text format of the answer data to be processed is standardized, that is, the answer data to be processed is converted into a unified English format to obtain the initial answer data.
  • the initial answer data is assembled into candidate answer data in json format.
  • the json data format is a lightweight data exchange format that uses a text format completely independent of programming languages to store and represent data.
  • the concise and clear hierarchical structure of the json data format is not only easy for humans to read and write, but also easy for machine analysis and generation, and can effectively improve network transmission efficiency. Therefore, by converting the initial answer data into the json data format, it is beneficial to the subsequent rapid and accurate data processing.
  • classes or functions that convert various data formats (map, xml or yaml, etc.) into json data format can be pre-written and packaged into a conversion script to convert the initial answer data into candidate answer data in json data format.
  • When performing data format conversion first obtain the corresponding conversion scripts according to the data format of the initial answer data, and then execute the corresponding conversion scripts to convert the initial answer data into a json data format to obtain candidate answer data.
  • S103 Determine whether the json character string in the candidate answer data meets the preset requirement, and if the json character string in the candidate answer data meets the preset requirement, determine the candidate answer data as the standard answer data.
  • judging whether the json string in the candidate answer data meets the preset requirements is mainly to judge whether the key in the json string is vacant, whether the value type meets the requirements, and whether the value length is within the range, etc.
  • the preset type range and the preset length range of the value in the json string that meet the requirements have been preset. If the key in the json string in the candidate answer data is not empty, the value type is within the preset type range, and the length of the value is within the preset length range, it is determined that the json string in the candidate answer data meets the preset requirements , Determine the candidate answer data as the standard answer data.
  • the answer data to be processed is returned to the client interface and an abnormal display is performed, prompting the user that the answer data to be processed is illegal data, and the answer data to be processed needs to be retrieved.
  • the text format of the answer data to be processed is standardized to obtain the initial answer data; the initial answer data is converted into a json data format to obtain candidate answer data; it is judged whether the json string in the candidate answer data meets the preset requirements , If the json string in the candidate answer data meets the preset requirements, the candidate answer data is determined as the standard answer data; thereby improving the accuracy and uniformity of the obtained standard answer data, and ensuring that the subsequent data is input to the target machine The accuracy of the predictions made in the reading comprehension model.
  • inputting standard material information, standard question information and corresponding question types into a preset target machine reading comprehension model for prediction to obtain initial answer information specifically includes the following steps:
  • S301 Input standard material information, standard topic information, and corresponding topic types into the prediction layer of the target machine's reading comprehension model to obtain a standard candidate text set of standard topic information.
  • the standard candidate text set includes at least one standard preparation Select the text.
  • the standard candidate text set refers to the text set obtained by separately concatenating the question in the standard topic information and each candidate answer.
  • the standard candidate text set contains at least one standard candidate text.
  • the standard material information, the standard topic information, and the corresponding topic type are input into the prediction layer of the target machine reading comprehension model.
  • the processing logic of the prediction layer corresponding to different types of standard title information is different. That is, multiple types of processing units are included in the prediction layer of the target machine reading comprehension model.
  • the prediction layer of the target machine reading comprehension model includes a vocabulary item unit, a highlight item unit, a full-text inference item unit, an insertion item unit, a paragraph inference item unit, a summary multiple-choice item unit, and a connection item. unit.
  • the topic type of the standard topic information is a vocabulary question
  • the standard topic information is input into the prediction layer of the target machine's reading comprehension model, it will be based on the topic type associated with the standard topic information: vocabulary question.
  • the standard topic information is automatically input into the vocabulary item unit of the prediction layer of the target machine's reading comprehension model, so as to obtain the standard candidate text set of the standard topic information.
  • S302 Input each standard candidate text and standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain the selection probability value of each standard candidate text and key information of the standard material information.
  • the reasoning layer is used to judge whether each standard candidate text can be inferred from the standard material information.
  • the reasoning layer includes RoBerta unit and XLNet unit.
  • RoBERTa is the enhancement and tuning of BERT.
  • RoBERTa mainly made improvements to the previously proposed BERT in three aspects. One is the specific details of the model and improved the optimization function; the second is the training strategy level, which uses a dynamic mask to train the model, which proves the NSP (Next Sentence Prediction) The lack of training strategy uses a larger batch size; the third is the data level, on the one hand, a larger data set is used, on the other hand, BPE (Byte-Pair Encoding) is used to process text data .
  • XLNet is a general autoregressive pre-training method that learns bidirectional contextual information by maximizing the log likelihood of all possible factorization orders.
  • each standard candidate text and standard material information in the standard candidate text set output by the prediction layer is input into the inference layer of the target machine reading comprehension model; the RoBerta unit is used to process the standard candidate text and standard material information , So as to obtain the selection probability value of each standard candidate text, and use the XLNet unit to process the standard candidate text and the standard material information to obtain the key information of the standard material information.
  • the selection probability value is the probability value used to evaluate the standard candidate text as the correct answer.
  • the range of the selection probability value is 0-1. The higher the selection probability value, the greater the probability that the corresponding standard candidate text is the correct answer.
  • the key information of the standard material information is the information after labeling and parsing each sentence in the standard material information. For example: which of the standard material information are the central opinion sentence, the sub-thesis sentence and the non-opinion sentence, etc.
  • the target machine reading comprehension model also includes an encoding layer and a data layer.
  • the encoding layer is mainly responsible for feature encoding of the standard candidate text and standard material information input to the inference layer.
  • the encoding layer mainly uses the BERT encoder method and the XLNet encoder method standard candidate text and standard material information for feature encoding.
  • Feature coding The problem that the data layer solves is the dependence of the Base model, because our reasoning model is not from 0 to 1, but is based on the industry's large-scale training model to do some migration, so the data we are based on include RACE, SQuAD, etc.
  • S303 Combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
  • the selection probability value of each standard candidate text and the key information of the standard material information are combined, namely The initial answer information can be obtained.
  • standard material information, standard topic information, and corresponding topic types are input into the prediction layer of the target machine's reading comprehension model to obtain a standard candidate text set of standard topic information.
  • the standard candidate text set includes At least one standard candidate text; input each standard candidate text and standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain the selection probability value and standard material of each standard candidate text.
  • the key information of the information; the selection probability value of each standard candidate text and the key information of the standard material information are combined to obtain the initial answer information; thereby improving the accuracy of the generated initial answer information.
  • the machine learning-based text processing method before the standard material information, standard topic information, and corresponding topic types are input into a preset target machine reading comprehension model for prediction, the machine learning-based text processing method also Specifically include the following steps:
  • S11 Obtain a preset number of sample answer data, and each sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets.
  • the sample answer data refers to the reading comprehension data used for model training.
  • the sample answer data can be obtained by directly acquiring several pieces of reading comprehension data from the test system, or by scanning and identifying the reading comprehension data on the paper answer sheet.
  • Each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets.
  • the key paragraph information refers to the material information corresponding to the sample question.
  • the sample question refers to the question of the question in the sample answer data.
  • the sample question and the corresponding candidate answer set are the candidate answer items corresponding to the sample question.
  • the preset number can be M, where M is a positive integer.
  • M is a positive integer.
  • the specific value of M can be set according to actual needs. The higher the value of M, the higher the accuracy of subsequent model training, but the extraction efficiency will decrease, and the selection of M can be comprehensively considered in terms of accuracy and efficiency.
  • S12 Combine the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain a sample candidate text set of each sample answer data.
  • the sample candidate text set includes at least one sample Alternative text.
  • sample questions of each sample answer data and each candidate answer in the corresponding candidate answer set are respectively spliced to obtain at least one sample candidate text of each sample answer data.
  • the key paragraph information of each sample answer data is annotated to obtain annotation data of the key paragraph information
  • annotation data is data used to annotate the key information of each sentence in the key paragraph information.
  • the labeling data can be used to label which sentences in the key paragraph information are central point sentences, which sentences are sub-thesis sentences, and which sentences are non-point sentences.
  • S14 Input the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data as training samples into the convolutional neural network-pre-training language model for training, to obtain the target machine reading comprehension model.
  • the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data are input as training samples into the convolutional neural network-pre-training language model for training, and the target machine reading comprehension can be obtained Model.
  • the convolutional neural network-pre-training language model is a model obtained by combining the convolutional neural network model and the pre-training language model. Understandably, the convolutional neural network-pre-training language model is equivalent to the model formed by connecting the convolutional neural network and the pre-training language network model.
  • a preset number of sample answer data is obtained, and each sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets; the sample questions of each sample answer data and the corresponding candidate
  • Each candidate answer in the answer set is spliced to obtain a sample candidate text set of each sample answer data.
  • the sample candidate text set includes at least one sample candidate text; the key paragraph information of each sample answer data is marked, Obtain the annotation data of key paragraph information; input the sample candidate text set, key paragraph information and corresponding annotation data in each sample answer data as training samples into the convolutional neural network-pre-training language model for training, and obtain the target Machine reading comprehension model; thereby improving the accuracy of the generated target machine reading comprehension model.
  • the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data are input as training samples into the convolutional neural network-pre-training language model
  • the text comprehension processing method based on machine learning also specifically includes the following steps:
  • S15 Receive an update instruction, and detect whether the minimum risk training loss function in the target machine's reading comprehension model is minimized.
  • the update instruction refers to an instruction used to trigger the optimization of the target machine's reading comprehension model.
  • the update instruction may be generated when the target machine's reading comprehension model is required to have a more accurate predictive ability, or a trigger cycle may be preset for periodic generation, etc. Specifically, an update instruction is received, and it is detected whether the minimum risk training loss function in the reading comprehension model of the target machine is minimized.
  • the goal is to minimize the minimum risk training loss function, and the parameters of the target machine reading comprehension model are optimized for a preset number of times, and then the target is executed
  • the training of the machine reading comprehension model continuously optimizes the probability distribution of the output answers of the target machine reading comprehension model, so that the answers to the sample questions in the predicted sample answer data are getting closer and closer to the standard answers. Therefore, through a preset number of iterative optimization adjustments, an adjusted target machine reading comprehension model can be obtained.
  • the minimum risk training refers to the use of the loss function ⁇ (y,y (n) ) to describe the degree of difference between the answer y predicted by the model and the standard answer y (n) , and to try to find a set of parameters to make the model in the training set The expected value of the loss.
  • x (n) is the sample question in the sample answer data
  • y is the answer output by the target machine reading comprehension model
  • ⁇ ) is the target machine reading comprehension model when the model parameter is ⁇
  • Y(x (n) ) is the set of all possible output answers of the target machine reading comprehension model corresponding to x (n)
  • ⁇ (y,y (n) ) is the answer output by the target machine reading comprehension model
  • the rouge evaluation in this embodiment adopts rouge-L, and the corresponding calculation formula is: in the above formula, x and y are the text sequence of the standard answer and the model output answer; N is The length of the standard answer; n is the length of the model output answer; ⁇ is a hyperparameter, which can be set as required, and the value is 1.2 in this embodiment; LCS is the longest common subsequence.
  • the preset evaluation function and selected verification answer data are used to evaluate the accuracy of the adjusted target machine reading comprehension model output answer. Obtain the evaluation result; among them, an optimization adjustment is performed on the parameters of the target machine reading comprehension model, including a minimization process for the minimum risk training loss function.
  • the evaluation result refers to the result obtained after the effect evaluation of the target machine reading comprehension model after parameter adjustment.
  • the verification answer data refers to the data set used to verify the effect of the target machine's reading comprehension model after parameter adjustment.
  • Each verification answer data includes key paragraph information, sample questions and corresponding candidate answer sets.
  • the target machine reading comprehension model is optimized and adjusted for a preset number of times, the selected verification answer data is input into the adjusted target machine reading comprehension model, and then the preset evaluation function is used, such as ROUGE (Recall-Oriented Understudy ForGisting Evaluation, evaluation of the understanding of improvement evaluation, BLEU (Bilingual Evaluation Understudy, bilingual evaluation) evaluates the accuracy of the answers output by the adjusted target machine reading comprehension model, and obtains the evaluation result.
  • ROUGE Recall-Oriented Understudy ForGisting Evaluation, evaluation of the understanding of improvement evaluation
  • BLEU Bilingual Evaluation Understudy, bilingual evaluation
  • the evaluation result it is determined whether the evaluation result meets the preset evaluation requirements. If the evaluation result meets the preset evaluation requirements, the optimization adjustment of the target machine reading comprehension model is stopped, and the adjusted target machine reading comprehension The model is recorded as a new target machine reading comprehension model.
  • the preset evaluation requirement is when the loss function in the reading comprehension model of the target machine reaches the minimum until it converges. That is, when the evaluation result indicates that the loss function in the target machine reading comprehension model converges during the iterative optimization and adjustment process, and the minimum optimized loss function is obtained, it means that the evaluation result meets the preset evaluation requirements, and the optimization of the target machine reading comprehension model is stopped.
  • the obtained evaluation result does not meet the preset evaluation requirements, continue to optimize and adjust the target machine reading comprehension model to minimize the loss function until it converges, until the evaluation result meets the preset Assess the requirements, and finally record the adjusted target machine reading comprehension model as the new target machine reading comprehension model.
  • the target machine reading comprehension model performs an iterative optimization adjustment, an evaluation result will be output accordingly, so that after a preset number of iterative optimization adjustments and evaluations, multiple evaluations will be correspondingly obtained.
  • an update instruction is received to detect whether the minimum risk training loss function in the target machine reading comprehension model is minimized; when the minimum risk training loss function is not minimized, the parameters of the target machine reading comprehension model are preset After the optimization and adjustment of the number of times, the preset evaluation function and the selected verification answer data are used to evaluate the accuracy of the adjusted target machine reading comprehension model output answer, and the evaluation result is obtained; among them, the parameters of the target machine reading comprehension model are evaluated.
  • An optimization adjustment including a minimization process for the minimum risk training loss function; if the evaluation result meets the preset evaluation requirements, the adjusted target machine reading comprehension model is recorded as a new target machine reading comprehension model, so as to facilitate Standard material information, standard question information and corresponding question types are re-input into the new target machine reading comprehension model for prediction, and initial answer information is obtained, thereby further improving the accuracy and accuracy of the obtained initial answer information.
  • a text processing device based on machine learning is provided, and the text processing device based on machine learning has a one-to-one correspondence with the text processing method based on machine learning in the foregoing embodiment.
  • the machine learning-based text processing device includes a preprocessing module, a first input module 20, a prediction module 30, and an integration module 40.
  • the detailed description of each functional module is as follows:
  • the preprocessing module 10 is configured to obtain answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
  • the first input module 20 is configured to input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
  • the prediction module 30 is configured to input the standard material information, the standard question information, and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, where the initial answer information includes A plurality of evaluation data information and problem-solving ideas information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
  • the determining module 40 is configured to determine final evaluation data from a plurality of the evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information in a preset integration manner as a target Answer information.
  • the preprocessing module 10 includes:
  • the standardization unit 101 is used to standardize the text form of the answer data to be processed to obtain initial answer data;
  • the conversion unit 102 is configured to convert the initial answer data into a json data format to obtain candidate answer data
  • the judging unit 103 is configured to judge whether the json character string in the candidate answer data meets preset requirements, and if the json character string in the candidate answer data meets the preset requirements, determine the candidate answer data as a standard answer data.
  • the prediction module 30 includes:
  • the first input unit 301 is configured to input the standard material information, the standard topic information, and the corresponding topic type into the prediction layer of the target machine reading comprehension model to obtain the standard topic information A selected text set, where the standard candidate text set includes at least one standard candidate text;
  • the second input unit 302 is configured to input each standard candidate text and the standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain each The selection probability value of the standard candidate text and the key information of the standard material information;
  • the combining unit 303 is configured to combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
  • the text processing device based on machine learning further includes:
  • the obtaining module is used to obtain a preset number of sample answer data, each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets;
  • the splicing module is used to splice the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain the sample candidate text of each sample answer data Set, the sample candidate text set includes at least one sample candidate text;
  • An annotation module configured to annotate the key paragraph information of each of the sample answer data to obtain the annotation data of the key paragraph information
  • the second input module is used to input the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data as training samples into the convolutional neural network-pre-training language model Perform training to obtain the target machine reading comprehension model.
  • the text processing device based on machine learning further includes:
  • the detection module is configured to receive update instructions and detect whether the minimum risk training loss function in the target machine reading comprehension model is minimized;
  • the optimization adjustment module is used to optimize and adjust the parameters of the target machine reading comprehension model for a preset number of times when the minimum risk training loss function is not minimized, and then use the preset evaluation function and the selected verification answer data, Evaluate the accuracy of the output answers of the adjusted target machine reading comprehension model to obtain the evaluation result; wherein, performing an optimization adjustment on the parameters of the target machine reading comprehension model includes performing the minimum risk training loss function Minimize the processing flow at one time;
  • the recording module is used to record the adjusted target machine reading comprehension model as a new target machine reading comprehension model when the evaluation result meets the preset evaluation requirements, so as to facilitate the standard material information, standard topic information and corresponding
  • the question type of is re-input into the new target machine reading comprehension model for prediction, and the initial answer information is obtained.
  • the various modules in the above-mentioned machine learning-based text processing device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation 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, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store the data used in the text processing method based on machine learning in the foregoing embodiment.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a text processing method based on machine learning.
  • a computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program, it implements the machine learning-based Text processing method.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the machine learning-based text processing method in the foregoing embodiment is implemented.
  • the computer-readable storage medium may be non-volatile or volatile.
  • 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 may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

Disclosed are a text processing method and apparatus based on machine learning, and a computer device and a medium, which relate to the field of intelligent decision making in artificial intelligence. The method comprises: acquiring question answering data to be processed, and preprocessing said question answering data to obtain standard question answering data, the standard question answering data comprising standard material information and standard question information (S10); inputting the standard question information in the standard question answering data into a preset question answering classification model to obtain a question type of the standard question information (S20); inputting the standard material information, the standard question information and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, the initial answer information comprising a plurality of pieces of evaluation data information and problem-solving thought information corresponding to the standard question information, wherein the target machine reading comprehension model is obtained by means of training using a convolutional neural network-pretraining language model (S30); and determining final evaluation data from among the plurality of pieces of evaluation data information according to the problem-solving thought information, and recording the final estimation data and the problem-solving thought information as target answer information in a preset integration mode (S40). The method improves the accuracy of an answer obtained by means of machine reading.

Description

基于机器学习的文本处理方法、装置、计算机设备及介质Text processing method, device, computer equipment and medium based on machine learning
本申请要求于2020年06月05日提交中国专利局、申请号为202010502599.4,发明名称为“基于机器学习的文本处理方法、装置、计算机设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 5, 2020, the application number is 202010502599.4, and the invention title is "machine learning-based text processing methods, devices, computer equipment and media", and its entire contents Incorporated in this application by reference.
技术领域Technical field
本申请涉及人工智能中的智能决策领域,尤其涉及一种基于机器学习的文本处理方法、装置、计算机设备及介质。This application relates to the field of intelligent decision-making in artificial intelligence, and in particular to a text processing method, device, computer equipment and medium based on machine learning.
背景技术Background technique
目前,深度学习在图像识别、语音识别等领域取得丰硕成果,机器阅读理解(Machine Reading Comprehension,MRC)成为了人工智能研究与应用领域的新热点,其主要功能是阅读和理解给定的文章或上下文,自动给出相关的问题的答案。目前,传统的机器阅读理解的方法主要是采用基于相似或相关性来确定正确答案的方法,此类方法通过计算选项与背景材料的句子之间的最相似或相关性来确定正确答案,然而,在语义上等价的句子往往会用不同的句法结构形式来表述,基于相似度与相关性的方法只能找到背景材料中与选项语法结构或语义表述相似度较高的句子,无法理解语义的细微差别,而句子间的细微差别是语言处理第一要务。发明人意识到,此类方法都是基于背景材料做出正确答案,无法输出对应的解题过程;从而导致目前的机器阅读得到的答案的准确性低,无法真正意义起到辅助教学/学习的作用。At present, deep learning has achieved fruitful results in image recognition, speech recognition and other fields. Machine Reading Comprehension (MRC) has become a new hot spot in the field of artificial intelligence research and application. Its main function is to read and understand a given article or Context, automatically give answers to related questions. At present, the traditional method of machine reading comprehension mainly adopts the method of determining the correct answer based on similarity or correlation. This type of method determines the correct answer by calculating the most similarity or correlation between the sentence of the option and the background material. However, Sentences that are semantically equivalent are often expressed in different forms of syntactic structure. Methods based on similarity and relevance can only find sentences in the background material that have a higher degree of similarity to the syntax structure or semantic expression of the options, and cannot understand the semantics. The nuances, and the nuances between sentences are the first priority in language processing. The inventor realizes that such methods are based on background materials to make correct answers and cannot output the corresponding problem-solving process; therefore, the accuracy of the answers obtained by current machine reading is low, and they cannot be used to assist teaching/learning in a real sense. effect.
发明内容Summary of the invention
本申请实施例提供一种基于机器学习的文本处理方法、装置、计算机设备及介质,以解决机器阅读得到的答案准确性较低的问题。The embodiments of the present application provide a text processing method, device, computer equipment, and medium based on machine learning to solve the problem of low accuracy of answers obtained by machine reading.
一种基于机器学习的文本处理方法,包括:A text processing method based on machine learning, including:
获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
一种基于机器学习的文本处理装置,包括:A text processing device based on machine learning includes:
预处理模块,用于获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;The preprocessing module is used to obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
第一输入模块,用于将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;The first input module is configured to input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
预测模块,用于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The prediction module is used to input the standard material information, the standard question information, and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, where the initial answer information includes multiple Pieces of evaluation data information and problem-solving ideas information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
确定模块,用于根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The determining module is configured to determine final evaluation data from a plurality of the evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information as a target answer in a preset integration manner information.
一种计算机设备,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
上述基于机器学习的文本处理方法、装置、计算机设备及介质,通过取待处理答题数据,对待处理答题数据进行预处理,得到标准答题数据,标准答题数据包括标准素材信息和标准题目信息;将标准答题数据中的标准题目信息输入至预设的答题分类模型中,得到 标准题目信息的题目类型;将标准素材信息、标准题目信息和对应的题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;根据解题思路信息从多个所述评估数据信息中确定最终评估数据,并将最终评估数据与解题思路信息以预设的整合方式记录为目标答案信息;通过采用卷积神经网络-预训练语言模型训练得到的目标机器阅读理解模型对待处理答题数据进行答案预测,得到同时包含评估数据信息和对应的解题思路信息的目标答案信息;从而进一步提高了机器阅读得到的答案的准确性和真正意义起到辅助教学/学习的作用。The above-mentioned text processing methods, devices, computer equipment and media based on machine learning obtain standard answer data by taking the answer data to be processed and preprocessing the answer data to be processed. The standard answer data includes standard material information and standard question information; The standard question information in the answer data is input into the preset answer classification model to obtain the question type of the standard question information; the standard material information, standard question information and the corresponding question type are input into the preset target machine reading comprehension model Predict and obtain initial answer information. The initial answer information includes multiple evaluation data information and problem-solving ideas information corresponding to the standard problem information. The target machine reading comprehension model is obtained by training with a convolutional neural network-pre-training language model的; According to the problem-solving idea information, the final evaluation data is determined from a plurality of the evaluation data information, and the final evaluation data and the problem-solving idea information are recorded as the target answer information in a preset integration mode; by using a convolutional neural network- The target machine reading comprehension model trained by the pre-training language model predicts the answer to the answer data to be processed, and obtains the target answer information that contains both the evaluation data information and the corresponding problem-solving idea information; thereby further improving the accuracy of the answer obtained by machine reading And the real meaning plays a role in assisting teaching/learning.
附图说明Description of the drawings
图1是本申请一实施例中基于机器学习的文本处理方法的一应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a text processing method based on machine learning in an embodiment of the present application;
图2是本申请一实施例中基于机器学习的文本处理方法的一流程图;2 is a flowchart of a text processing method based on machine learning in an embodiment of the present application;
图3是本申请一实施例中基于机器学习的文本处理方法的另一流程图;FIG. 3 is another flowchart of a text processing method based on machine learning in an embodiment of the present application;
图4是本申请一实施例中基于机器学习的文本处理方法的另一流程图;4 is another flowchart of a text processing method based on machine learning in an embodiment of the present application;
图5是本申请一实施例中基于机器学习的文本处理方法的另一流程图;FIG. 5 is another flowchart of a text processing method based on machine learning in an embodiment of the present application;
图6是本申请一实施例中基于机器学习的文本处理方法的另一流程图;Fig. 6 is another flowchart of a text processing method based on machine learning in an embodiment of the present application;
图7是本申请一实施例中基于机器学习的文本处理装置的一原理框图;FIG. 7 is a functional block diagram of a text processing device based on machine learning in an embodiment of the present application;
图8是本申请一实施例中基于机器学习的文本处理装置的另一原理框图;FIG. 8 is another functional block diagram of a text processing device based on machine learning in an embodiment of the present application;
图9是本申请一实施例中基于机器学习的文本处理装置的另一原理框图FIG. 9 is another functional block diagram of a text processing device based on machine learning in an embodiment of the present application
图10是本申请一实施例中计算机设备的一示意图。Fig. 10 is a schematic diagram of a computer device in an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例提供的基于机器学习的文本处理方法,该基于机器学习的文本处理方法可应用如图1所示的应用环境中。具体地,该基于机器学习的文本处理方法应用在基于机器学习的文本处理系统中,该基于机器学习的文本处理系统包括如图1所示的客户端和服务端,客户端与服务端通过网络进行通信,用于解决机器阅读得到的答案准确性较低的问题。其中,客户端又称为用户端,是指与服务器相对应,为客户提供本地服务的程序。客户端可安装在但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备上。服务端可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The text processing method based on machine learning provided by the embodiment of the present application can be applied to the application environment shown in FIG. 1. Specifically, the text processing method based on machine learning is applied in a text processing system based on machine learning. The text processing system based on machine learning includes a client and a server as shown in FIG. Communication is used to solve the problem of low accuracy of answers obtained by machine reading. Among them, the client is also called the client, which refers to the program that corresponds to the server and provides local services to the client. The client can be installed on, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented with a standalone server or a server cluster composed of multiple servers.
在一实施例中,如图2所示,提供一种基于机器学习的文本处理方法,以该方法应用在图1中的服务端为例进行说明,包括如下步骤:In an embodiment, as shown in FIG. 2, a text processing method based on machine learning is provided. The application of the method to the server in FIG. 1 is taken as an example for description, including the following steps:
S10:获取待处理答题数据,对待处理答题数据进行预处理,得到标准答题数据,标准 答题数据包括标准素材信息和标准题目信息。S10: Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data. The standard answer data includes standard material information and standard question information.
其中,待处理答题数据是指待进行处理的阅读理解数据。每一篇阅读理解数据作为一个待处理答题数据。待处理答题数据的语种可以为中文或英文。具体地,待处理答题数据主要包括有阅读素材和题目信息。其中,题目信息主要由问题和对应的若干个候选答案组成的信息。阅读素材可以为单段落文本或者为多段落文本。待处理答题数据中一篇阅读素材可能对应一个或者多个题目信息。可选地,获取待处理答题数据可以直接从考试系统上获取任意一篇阅读理解数据,或者对纸质答卷上的任意一篇阅读理解数据进行扫描识别后获取得到。Among them, the answer data to be processed refers to the reading comprehension data to be processed. Each piece of reading comprehension data is regarded as a pending answer data. The language of the answer data to be processed can be Chinese or English. Specifically, the answer data to be processed mainly includes reading materials and question information. Among them, the topic information is mainly composed of questions and corresponding candidate answers. The reading material can be single-paragraph text or multi-paragraph text. A piece of reading material in the answer data to be processed may correspond to one or more item information. Optionally, to obtain the answer data to be processed, any piece of reading comprehension data can be obtained directly from the test system, or any piece of reading comprehension data on the paper answer sheet can be scanned and recognized.
具体地,对待处理答题数据进行预处理主要包括对待处理答题数据进行格式判断和处理,判断待处理答题数据的格式是否满足预设条件,在本实施例中,只有英文格式的待处理答题数据才能输入到机器阅读理解模型中进行答案预测,因此,若待处理答题数据的本文格式为中文,则需将中文格式的待处理答题数据转换成英文格式的的待处理答题数据。Specifically, the preprocessing of the answer data to be processed mainly includes format judgment and processing of the answer data to be processed, to determine whether the format of the answer data to be processed meets preset conditions. In this embodiment, only the answer data to be processed in English format can Input to the machine reading comprehension model for answer prediction. Therefore, if the text format of the answer data to be processed is Chinese, the answer data to be processed in Chinese format needs to be converted into the answer data to be processed in English format.
进一步地,在确定了待处理答题的标准格式文本之后,将待处理答题数据组装成json格式的待处理答题数据,并判断待处理答题数据中的json字符串是否满足要求,比如判断待处理答题数据中的key有无空缺、value类型是否符合要求、value长度是否在范围内等,若待处理答题数据中的json字符串不满足要求,则对将该待处理答题数据返回至客户端界面并进行异常显示,提示用户该待处理答题数据为不合法数据,需重新获取待处理答题数据。Further, after the standard format text of the answer to be processed is determined, the answer data to be processed is assembled into the answer data in json format, and the json string in the answer data to be processed meets the requirements, such as judging the answer to be processed Whether the key in the data is vacant, whether the value type meets the requirements, whether the value length is within the range, etc. If the json string in the answer data to be processed does not meet the requirements, the answer data to be processed is returned to the client interface and Perform an abnormal display, prompting the user that the pending answer data is illegal data, and the pending answer data needs to be re-acquired.
优选地,为了避免了因获取的待处理答题数据的字符数量过大,从而导致答案预测的效率降低,在本实施例中,若待处理答题数据的字符数量超过预先设定的字符阈值,则需根据实时情况对待处理答题数据进行字符分割处理,比如:可以将原本包含一篇阅读素材和多个题目信息的一个待处理答题数据分割成多个待处理答题数据,每一待处理答题数据包括一篇阅读素材和一个题目信息。Preferably, in order to avoid the reduction of the efficiency of answer prediction due to the excessively large number of characters in the acquired answer data to be processed, in this embodiment, if the number of characters in the answer data to be processed exceeds the preset character threshold, then It is necessary to perform character segmentation processing on the answer data to be processed according to the real-time situation. For example, one answer data to be processed that originally contains a piece of reading material and multiple item information can be divided into multiple answer data to be processed, and each answer data to be processed includes One reading material and one topic information.
具体地,在对待处理答题数据进行预处理之后,得到合格的标准答题数据。标准答题数据包括标准素材信息和标准题目信息。其中,标准素材信息为对待处理答题数据中的素材信息进行预处理后的满足要求的素材信息。标准题目信息为对待处理答题数据中的题目信息进行预处理后的满足要求的题目信息。Specifically, after preprocessing the answer data to be processed, qualified standard answer data is obtained. The standard answer data includes standard material information and standard question information. Among them, the standard material information is material information that meets the requirements after preprocessing the material information in the answer data to be processed. The standard item information is the item information that meets the requirements after preprocessing the item information in the answer data to be processed.
S20:将标准答题数据中的标准题目信息输入至预设的答题分类模型中,得到标准题目信息的题目类型。S20: Input the standard question information in the standard answer data into the preset answer classification model to obtain the question type of the standard question information.
具体地,一个标准答题数据中可能包括一个或者多个标准题目信息,不同标准题目信息所对应的题型可能不同。比如一个标准答题数据中的包括的标准题目信息可能为全文推断题、也可能为段落推理题,或者为总结多选题等。在本实施例中,为了提高了模型预测的准确性,在将标准答题数据输入至机器阅读理解模型中进行预测之前,先确定标准答题数据中每一标准题目信息的类型。Specifically, one standard answer data may include one or more standard question information, and the question types corresponding to different standard question information may be different. For example, the standard question information included in a standard answer data may be a full-text inference question, a paragraph reasoning question, or a summary multiple-choice question. In this embodiment, in order to improve the accuracy of model prediction, before the standard answer data is input into the machine reading comprehension model for prediction, the type of each standard question information in the standard answer data is determined.
具体地,将标准答题数据中的每一标准题目信息输入至预设的答题分类模型中,即可得到每一标准题目信息的题目类型。其中,答题分类模型为预先训练好的可对标准题目信 息进行识别,从而确定标准题目信息的题目类型的模型。在本实施例中,进行分类后的标准题目信息的题目类型可以为词汇题、高亮题、全文推断题、插入题、段落推理题、总结多选题或连线题。Specifically, by inputting each standard question information in the standard answer data into a preset answer classification model, the question type of each standard question information can be obtained. Among them, the answer classification model is a pre-trained model that can identify the standard question information, thereby determining the question type of the standard question information. In this embodiment, the question type of the classified standard question information may be a vocabulary question, a highlight question, a full text inference question, an insertion question, a paragraph reasoning question, a summary multiple choice question, or a connection question.
其中,答题分类模型优选为机器学习贝叶斯模型。具体地,预先通过对大量已进行分类标注的题目信息进行训练,从而得到机器学习贝叶斯模型。其中,贝叶斯决策论(Bayesian decision theory)是概率框架下实施决策的基本方法。它是决策论Decision theory+概率论Probability theory的组合,探讨了如何在包含不确定性的环境中做出最优决策对分类任务来说,在所有相关概率都已知的理想情形下,贝叶斯决策论考虑如何基于这些概率和误判损失来选择最优的类别标记(概率知识+对决策带来的损失的认识→最优决策)。Among them, the answer classification model is preferably a machine learning Bayesian model. Specifically, the machine learning Bayes model is obtained by training a large amount of topic information that has been classified and labeled in advance. Among them, Bayesian decision theory (Bayesian decision theory) is the basic method to implement decision-making under the framework of probability. It is a combination of Decision theory + Probability theory. It discusses how to make optimal decisions in an environment containing uncertainty. For classification tasks, in an ideal situation where all relevant probabilities are known, Bayesian Decision theory considers how to select the optimal category label based on these probabilities and misjudgment losses (probability knowledge + knowledge of the loss caused by the decision → optimal decision).
S30:将标准素材信息、标准题目信息和对应的题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,初始答案信息包括多个评估数据信息以及与标准题目信息对应的解题思路信息,其中,目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的。S30: Input the standard material information, standard question information and the corresponding question type into the preset target machine reading comprehension model for prediction, and obtain initial answer information. The initial answer information includes multiple evaluation data information and information corresponding to the standard question information. Problem-solving ideas information, where the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model.
其中,目标机器阅读理解模型是指预先训练好的可进行答案预测和解题思路信息分析的模型。目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的。卷积神经网络-预训练语言模型是由卷积神经网络模型和预训练语言模型相结合所得到的模型。可以理解地,卷积神经网络-预训练语言模型相当于卷积神经网络与预训练语言网络模型相连接形成的模型。Among them, the target machine reading comprehension model refers to a pre-trained model that can predict answers and analyze problem-solving ideas. The target machine reading comprehension model is obtained by training with a convolutional neural network-pretrained language model. Convolutional neural network-pre-training language model is a model obtained by combining convolutional neural network model and pre-training language model. Understandably, the convolutional neural network-pre-training language model is equivalent to the model formed by connecting the convolutional neural network and the pre-training language network model.
具体地,目标机器阅读理解模型主要包括预测层、推理层、编码层和数据层。在本实施例中,预测层中包括若干预测单元,每一预测单元对应一种类型的标准题目信息。例如:预测层中可以包括词汇题单元、高亮题单元、全文推断题单元、插入题单元、段落推理题单元、总结多选题单元和连线题单元。具体地,在将标准题目信息输入至目标机器阅读理解模型的预测层中时,需要根据标准题目信息的题目类型,输入将标准题目信息输入至对应的预测单元中进行预测;从而得到该标准题目信息的至少一个标准备选文本。推理层主要包括RoBerta单元和XLNet单元,RoBerta单元主要通过结合标准备选文本和标准素材信息得到每一标准备选文本的选择概率值。XLNet单元主要对标准备选文本和标准素材信息进行处理,得到标准素材信息的关键信息。其中,选择概率值为用于评估标准备选文本为正确答案的概率值。标准素材信息的关键信息为对标准素材信息中的每一句话进行标注解析后的信息。例如:标注标准素材信息中哪句是中心观点句、分论点句和非观点句等。Specifically, the target machine reading comprehension model mainly includes a prediction layer, a reasoning layer, an encoding layer, and a data layer. In this embodiment, the prediction layer includes several prediction units, and each prediction unit corresponds to one type of standard title information. For example, the prediction layer can include vocabulary item unit, highlight item unit, full-text inference item unit, insertion item unit, paragraph inference item unit, summary multiple-choice item unit, and connection item unit. Specifically, when the standard topic information is input into the prediction layer of the target machine reading comprehension model, it is necessary to input the standard topic information into the corresponding prediction unit for prediction according to the topic type of the standard topic information; thus, the standard topic is obtained. At least one standard candidate text of the information. The reasoning layer mainly includes the RoBerta unit and the XLNet unit. The RoBerta unit mainly obtains the selection probability value of each standard candidate text by combining the standard candidate text and the standard material information. The XLNet unit mainly processes the standard candidate text and standard material information, and obtains the key information of the standard material information. Among them, the selection probability value is the probability value used to evaluate the standard candidate text as the correct answer. The key information of the standard material information is the information after labeling and parsing each sentence in the standard material information. For example: mark which sentence in the standard material information is the central opinion sentence, the sub-thesis sentence, and the non-opinion sentence.
进一步地,在得到每一标准备选文本的选择概率值和标准素材信息的关键信息之后,再采用编码层对每一标准备选文本的选择概率值和标准素材信息的关键信息进行特征编码,并将进行特征编码的每一标准备选文本的选择概率值和标准素材信息的关键信息输入到数据层,从而得到初始答案信息。初始答案信息包括多个评估数据信息以及与标准题目信息对应的解题思路信息。其中,评估数据信息为标准题目信息中的每一候选答案所对应的选择概率值。由于一个标准题目信息中至少包括两个候选答案,因此,得到的初始答案 信息包括多个评估数据信息。每一候选答案对应一个评估数据信息。解题思路信息为对标准题目信息得出的正常答案进行解析的过程,即为什么选择这个答案的原因和理解过程。Further, after obtaining the selection probability value of each standard candidate text and the key information of the standard material information, the coding layer is used to perform feature encoding on the selection probability value of each standard candidate text and the key information of the standard material information. And input the selection probability value of each standard candidate text for feature encoding and the key information of the standard material information into the data layer, so as to obtain the initial answer information. The initial answer information includes multiple evaluation data information and problem-solving ideas information corresponding to the standard problem information. Among them, the evaluation data information is the selection probability value corresponding to each candidate answer in the standard topic information. Since one standard question information includes at least two candidate answers, the initial answer information obtained includes multiple evaluation data information. Each candidate answer corresponds to an evaluation data message. Problem-solving thinking information is the process of analyzing the normal answer derived from the standard topic information, that is, the reason and understanding process of why this answer was chosen.
S40:根据解题思路信息从多个评估数据信息中确定最终评估数据,并将最终评估数据与解题思路信息以预设的整合方式记录为目标答案信息。S40: Determine final evaluation data from multiple evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information as target answer information in a preset integration manner.
具体地,由于初始答案信息中包括多个评估数据信息,而每一评估数据信息为标准题目信息中的每一候选答案所对应的概率值。因此,在确定了标准题目信息中的每一候选答案所对应的概率值之后,根据解题思路信息和标准题目信息中的题目要求对每一候选答案所对应的概率值进行筛选,从多个评估数据信息中确定最终评估数据,即确定该道标准题目所对应的正确答案,然后将该道标准题目所对应的最终评估数据与对应的解题思路信息以预设的整合方式记录为目标答案信息。其中,预设的整合方式可以为直接将最终评估数据和对应的解题思路信息进行组合。Specifically, since the initial answer information includes multiple evaluation data information, and each evaluation data information is a probability value corresponding to each candidate answer in the standard topic information. Therefore, after the probability value corresponding to each candidate answer in the standard question information is determined, the probability value corresponding to each candidate answer is screened according to the problem-solving idea information and the question requirements in the standard question information. The final evaluation data is determined in the evaluation data information, that is, the correct answer corresponding to the standard question is determined, and then the final evaluation data corresponding to the standard question and the corresponding problem-solving idea information are recorded as the target answer in a preset integration method information. Among them, the preset integration method can be to directly combine the final evaluation data and the corresponding problem-solving idea information.
示例性地,若得到的初始答案信息包括4个评估数据信息分别为候选答案A:0.81,候选答案B:0.92,候选答案C:0.95和候选答案D:0.01,标准题目信息中的题目要求为哪个是不可能从素材中推理出来的结论。因此,结合解题思路信息从4个评估数据信息中确定出最终评估数据为候选答案D。可以理解地,候选答案D所对应的概率值为最小概率值,即候选答案D是不太可能从素材中推理出来,所以最终评估数据为候选答案D。最后将最终评估数据和解题思路信息以预设的整合方式记录为目标答案信息。可以理解地,目标答案信息包括该道题的正确答案以及为什么选择这个答案的原因和理解过程。Exemplarily, if the obtained initial answer information includes 4 evaluation data information, which are candidate answer A: 0.81, candidate answer B: 0.92, candidate answer C: 0.95 and candidate answer D: 0.01, the question requirements in the standard question information are Which is a conclusion that is impossible to infer from the material. Therefore, the final evaluation data is determined as the candidate answer D from the four evaluation data information combined with the problem-solving idea information. Understandably, the probability value corresponding to the candidate answer D is the smallest probability value, that is, the candidate answer D is unlikely to be inferred from the material, so the final evaluation data is the candidate answer D. Finally, the final evaluation data and problem-solving ideas information are recorded as target answer information in a preset integration manner. Understandably, the target answer information includes the correct answer to the question and the reason and understanding process of why the answer was chosen.
在本实施例中,获取待处理答题数据,对待处理答题数据进行预处理,得到标准答题数据,标准答题数据包括标准素材信息和标准题目信息;将标准答题数据中的标准题目信息输入至预设的答题分类模型中,得到标准题目信息的题目类型;将标准素材信息、标准题目信息和对应的题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,初始答案信息包括多个评估数据信息以及与标准题目信息对应的解题思路信息,其中,目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;根据解题思路信息从多个评估数据信息中确定最终评估数据,并将最终评估数据与解题思路信息以预设的整合方式记录为目标答案信息;通过采用卷积神经网络-预训练语言模型训练得到的目标机器阅读理解模型对待处理答题数据进行答案预测,得到同时包含评估数据信息和对应的解题思路信息的目标答案信息;从而进一步提高了机器阅读得到的答案的准确性和真正意义起到辅助教学/学习的作用。In this embodiment, the answer data to be processed is obtained, and the answer data to be processed is preprocessed to obtain standard answer data. The standard answer data includes standard material information and standard question information; the standard question information in the standard answer data is input to the preset In the answer classification model, the question type of the standard question information is obtained; the standard material information, the standard question information and the corresponding question type are input into the preset target machine reading comprehension model for prediction, and the initial answer information is obtained. The initial answer information includes Multiple evaluation data information and problem-solving ideas information corresponding to the standard topic information. Among them, the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model; based on the problem-solving idea information from multiple evaluation data information Determine the final evaluation data in the process, and record the final evaluation data and the problem-solving idea information as the target answer information in a preset integration method; the target machine reading comprehension model obtained by using the convolutional neural network-pre-training language model training to deal with the answer The data is used for answer prediction, and the target answer information that contains both the evaluation data information and the corresponding problem-solving idea information is obtained; thus, the accuracy and true meaning of the answers obtained by machine reading are further improved, which plays a role in assisting teaching/learning.
在一实施例中,如图3所示,对待处理答题数据进行预处理,具体包括如下步骤:In one embodiment, as shown in FIG. 3, preprocessing the answer data to be processed includes the following steps:
S101:对待处理答题数据的文本形式进行标准化,得到初始答题数据。S101: Standardize the text form of the answer data to be processed to obtain the initial answer data.
具体地,由于获取的待处理答题数据的语种可能为中文格式或英文格式,而在本实施例中,只有英文格式的待处理答题数据才能输入到机器阅读理解模型中进行答案预测,因此,在本步骤中,对待处理答题数据的文本形式进行标准化,即将待处理答题数据转换成统一的英文格式,得到初始答题数据。Specifically, since the language of the acquired answer data to be processed may be in Chinese format or English format, and in this embodiment, only the answer data to be processed in English format can be input into the machine reading comprehension model for answer prediction, therefore, In this step, the text format of the answer data to be processed is standardized, that is, the answer data to be processed is converted into a unified English format to obtain the initial answer data.
S102:将初始答题数据转换成json数据格式,得到候选答题数据。S102: Convert the initial answer data into a json data format to obtain candidate answer data.
具体地,在确定了初始答题数据,再将初始答题数据组装成json格式的候选答题数据。其中,json数据格式是一种轻量级的数据交换格式,它采用完全独立于编程语言的文本格式来存储和表示数据。json数据格式简洁和清晰的层次结构不但易于人阅读和编写,同时也易于机器解析和生成,并能有效地提升网络传输效率。因此,通过将初始答题数据转化成json数据格式,有利于后续快速、精确地进行数据处理。Specifically, after the initial answer data is determined, the initial answer data is assembled into candidate answer data in json format. Among them, the json data format is a lightweight data exchange format that uses a text format completely independent of programming languages to store and represent data. The concise and clear hierarchical structure of the json data format is not only easy for humans to read and write, but also easy for machine analysis and generation, and can effectively improve network transmission efficiency. Therefore, by converting the initial answer data into the json data format, it is beneficial to the subsequent rapid and accurate data processing.
具体地,可以预先编写将各种数据格式(map、xml或者yaml等)转化成json数据格式的类或者函数,并封装成转化脚本,以将初始答题数据分别转化成json数据格式的候选答题数据。在进行数据格式转化时,先根据初始答题数据的数据格式获取到对应的转化脚本,然后分别执行对应的转化脚本从而将初始答题数据转换成json数据格式,得到候选答题数据。Specifically, classes or functions that convert various data formats (map, xml or yaml, etc.) into json data format can be pre-written and packaged into a conversion script to convert the initial answer data into candidate answer data in json data format. . When performing data format conversion, first obtain the corresponding conversion scripts according to the data format of the initial answer data, and then execute the corresponding conversion scripts to convert the initial answer data into a json data format to obtain candidate answer data.
S103:判断候选答题数据中的json字符串是否满足预设要求,若候选答题数据中的json字符串满足预设要求,则将候选答题数据确定为标准答题数据。S103: Determine whether the json character string in the candidate answer data meets the preset requirement, and if the json character string in the candidate answer data meets the preset requirement, determine the candidate answer data as the standard answer data.
具体地,判断候选答题数据中的json字符串是否满足预设要求主要是判断json字符串中的key有无空缺、value类型是否符合要求、value长度是否在范围内等。在一具体实施例中,已预先设定好满足要求的json字符串中的value的预设类型范围和预设长度范围。若候选答题数据中的json字符串中的key无空缺、value类型在预设类型范围内,以及value的长度在预设长度范围内,则判断该候选答题数据中的json字符串满足预设要求,将候选答题数据确定为标准答题数据。Specifically, judging whether the json string in the candidate answer data meets the preset requirements is mainly to judge whether the key in the json string is vacant, whether the value type meets the requirements, and whether the value length is within the range, etc. In a specific embodiment, the preset type range and the preset length range of the value in the json string that meet the requirements have been preset. If the key in the json string in the candidate answer data is not empty, the value type is within the preset type range, and the length of the value is within the preset length range, it is determined that the json string in the candidate answer data meets the preset requirements , Determine the candidate answer data as the standard answer data.
在另一具体实施例中,若判断得到候选答题数据中的json字符串不满足预设要求,即候选答题数据中的json字符串中的key有空缺,或value类型不在预设类型范围内,或value的长度不在预设长度范围内,则将该待处理答题数据返回至客户端界面并进行异常显示,提示用户该待处理答题数据为不合法数据,需重新获取待处理答题数据。In another specific embodiment, if it is determined that the json string in the candidate answer data does not meet the preset requirements, that is, the key in the json string in the candidate answer data is vacant, or the value type is not within the preset type range, Or the length of the value is not within the preset length range, the answer data to be processed is returned to the client interface and an abnormal display is performed, prompting the user that the answer data to be processed is illegal data, and the answer data to be processed needs to be retrieved.
在本实施例中,对待处理答题数据的文本形式进行标准化,得到初始答题数据;将初始答题数据转换成json数据格式,得到候选答题数据;判断候选答题数据中的json字符串是否满足预设要求,若候选答题数据中的json字符串满足预设要求,则将候选答题数据确定为标准答题数据;从而提高了获取的标准答题数据的准确性和统一性,保证了后续数据进行输入到目标机器阅读理解模型中进行预测的准确性。In this embodiment, the text format of the answer data to be processed is standardized to obtain the initial answer data; the initial answer data is converted into a json data format to obtain candidate answer data; it is judged whether the json string in the candidate answer data meets the preset requirements , If the json string in the candidate answer data meets the preset requirements, the candidate answer data is determined as the standard answer data; thereby improving the accuracy and uniformity of the obtained standard answer data, and ensuring that the subsequent data is input to the target machine The accuracy of the predictions made in the reading comprehension model.
在一实施例中,如图4所示,将标准素材信息、标准题目信息和对应的题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,具体包括如下步骤:In one embodiment, as shown in FIG. 4, inputting standard material information, standard question information and corresponding question types into a preset target machine reading comprehension model for prediction to obtain initial answer information specifically includes the following steps:
S301:将标准素材信息、标准题目信息和对应的题目类型输入至目标机器阅读理解模型的所述预测层中,得到标准题目信息的标准备选文本集,标准备选文本集包括至少一个标准备选文本。S301: Input standard material information, standard topic information, and corresponding topic types into the prediction layer of the target machine's reading comprehension model to obtain a standard candidate text set of standard topic information. The standard candidate text set includes at least one standard preparation Select the text.
其中,标准备选文本集是指将标准题目信息中的问题与每个备选答案分别进行拼接后所得到的文本集。其中,标准备选文本集包含至少一个标准备选文本。Among them, the standard candidate text set refers to the text set obtained by separately concatenating the question in the standard topic information and each candidate answer. Among them, the standard candidate text set contains at least one standard candidate text.
具体地,在确定了标准题目信息的题目类型之后,将标准素材信息、标准题目信息和对应的题目类型输入至目标机器阅读理解模型的预测层中。在本实施例中,不同类型的标 准题目信息所对应的预测层的处理逻辑不一样。即在目标机器阅读理解模型的预测层中包括多种类型的处理单元。具体地,在本实施例中,目标机器阅读理解模型的预测层包括词汇题单元、高亮题单元、全文推断题单元、插入题单元、段落推理题单元、总结多选题单元和连线题单元。在将标准题目信息输入至目标机器阅读理解模型的预测层中时,根据标准题目信息的题目类型输入将标准题目信息输入至对应的预测单元中进行预测;从而得到该标准题目信息的至少一个标准备选文本。例如:若标准题目信息的题目类型为词汇题,则在将标准题目信息输入至目标机器阅读理解模型的所述预测层中时,会根据与该标准题目信息关联的题目类型:词汇题,将该标准题目信息自动输入至目标机器阅读理解模型的预测层的词汇题单元中,从而得到该标准题目信息的标准备选文本集。Specifically, after the topic type of the standard topic information is determined, the standard material information, the standard topic information, and the corresponding topic type are input into the prediction layer of the target machine reading comprehension model. In this embodiment, the processing logic of the prediction layer corresponding to different types of standard title information is different. That is, multiple types of processing units are included in the prediction layer of the target machine reading comprehension model. Specifically, in this embodiment, the prediction layer of the target machine reading comprehension model includes a vocabulary item unit, a highlight item unit, a full-text inference item unit, an insertion item unit, a paragraph inference item unit, a summary multiple-choice item unit, and a connection item. unit. When inputting standard topic information into the prediction layer of the target machine's reading comprehension model, according to the topic type input of the standard topic information, input the standard topic information into the corresponding prediction unit for prediction; thereby obtaining at least one criterion of the standard topic information Alternative text. For example: if the topic type of the standard topic information is a vocabulary question, when the standard topic information is input into the prediction layer of the target machine's reading comprehension model, it will be based on the topic type associated with the standard topic information: vocabulary question. The standard topic information is automatically input into the vocabulary item unit of the prediction layer of the target machine's reading comprehension model, so as to obtain the standard candidate text set of the standard topic information.
S302:将标准备选文本集中的每一标准备选文本和标准素材信息输入至目标机器阅读理解模型的推理层中,得到每一标准备选文本的选择概率值和标准素材信息的关键信息。S302: Input each standard candidate text and standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain the selection probability value of each standard candidate text and key information of the standard material information.
其中,推理层用于判断每一个标准备选文本能不能从标准素材信息中推理出来。推理层包括RoBerta单元和XLNet单元。其中,RoBERTa是对BERT的强化和调优。RoBERTa主要在三方面对之前提出的BERT做了该进,其一是模型的具体细节层面,改进了优化函数;其二是训练策略层面,改用了动态掩码的方式训练模型,证明了NSP(Next Sentence Prediction)训练策略的不足,采用了更大的batch size;其三是数据层面,一方面使用了更大的数据集,另一方面是使用BPE(Byte-Pair Encoding)来处理文本数据。XLNet是一种通用的自回归预训练方法,通过最大化所有可能的因式分解顺序的对数似然,学习双向语境信息。Among them, the reasoning layer is used to judge whether each standard candidate text can be inferred from the standard material information. The reasoning layer includes RoBerta unit and XLNet unit. Among them, RoBERTa is the enhancement and tuning of BERT. RoBERTa mainly made improvements to the previously proposed BERT in three aspects. One is the specific details of the model and improved the optimization function; the second is the training strategy level, which uses a dynamic mask to train the model, which proves the NSP (Next Sentence Prediction) The lack of training strategy uses a larger batch size; the third is the data level, on the one hand, a larger data set is used, on the other hand, BPE (Byte-Pair Encoding) is used to process text data . XLNet is a general autoregressive pre-training method that learns bidirectional contextual information by maximizing the log likelihood of all possible factorization orders.
具体地,将预测层输出的标准备选文本集中的每一标准备选文本和标准素材信息输入至目标机器阅读理解模型的推理层中;采用RoBerta单元对标准备选文本和标准素材信息进行处理,从而得到每一标准备选文本的选择概率值,并采用XLNet单元对标准备选文本和标准素材信息进行处理,得到标准素材信息的关键信息。其中,选择概率值为用于评估标准备选文本为正确答案的概率值。选择概率值的范围为0-1。选择概率值越高,指示所对应的标准备选文本为正确答案的概率越大。标准素材信息的关键信息为对标准素材信息中的每一句话进行标注解析后的信息。例如:标准素材信息中哪些为中心观点句、分论点句和非观点句等。Specifically, each standard candidate text and standard material information in the standard candidate text set output by the prediction layer is input into the inference layer of the target machine reading comprehension model; the RoBerta unit is used to process the standard candidate text and standard material information , So as to obtain the selection probability value of each standard candidate text, and use the XLNet unit to process the standard candidate text and the standard material information to obtain the key information of the standard material information. Among them, the selection probability value is the probability value used to evaluate the standard candidate text as the correct answer. The range of the selection probability value is 0-1. The higher the selection probability value, the greater the probability that the corresponding standard candidate text is the correct answer. The key information of the standard material information is the information after labeling and parsing each sentence in the standard material information. For example: which of the standard material information are the central opinion sentence, the sub-thesis sentence and the non-opinion sentence, etc.
进一步地,目标机器阅读理解模型还包括编码层和数据层。其中,编码层主要负责将输入给推理层的标准备选文本和标准素材信息进行特征编码,在本实施例中,编码层主要采用BERT encoder方法和XLNet encoder方法标准备选文本和标准素材信息进行特征编码。数据层解决的问题是Base模型的依赖,因为我们的推理模型不是从0到1,都是基于业界大规模训练模型上做一些迁移,所以我们基于的数据有RACE、SQuAD等。Further, the target machine reading comprehension model also includes an encoding layer and a data layer. Among them, the encoding layer is mainly responsible for feature encoding of the standard candidate text and standard material information input to the inference layer. In this embodiment, the encoding layer mainly uses the BERT encoder method and the XLNet encoder method standard candidate text and standard material information for feature encoding. Feature coding. The problem that the data layer solves is the dependence of the Base model, because our reasoning model is not from 0 to 1, but is based on the industry's large-scale training model to do some migration, so the data we are based on include RACE, SQuAD, etc.
S303:将每一标准备选文本的选择概率值和标准素材信息的关键信息进行组合,得到初始答案信息。S303: Combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
具体地,在得到每一标准备选文本的选择概率值和标准素材信息的关键信息之后,将每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息进行组合,即可得到初始答案信息。Specifically, after obtaining the selection probability value of each standard candidate text and the key information of the standard material information, the selection probability value of each standard candidate text and the key information of the standard material information are combined, namely The initial answer information can be obtained.
在本实施例中,将标准素材信息、标准题目信息和对应的题目类型输入至目标机器阅读理解模型的所述预测层中,得到标准题目信息的标准备选文本集,标准备选文本集包括至少一个标准备选文本;将标准备选文本集中的每一标准备选文本和标准素材信息输入至目标机器阅读理解模型的推理层中,得到每一标准备选文本的选择概率值和标准素材信息的关键信息;将每一标准备选文本的选择概率值和标准素材信息的关键信息进行组合,得到初始答案信息;从而提高了生成的初始答案信息的准确性。In this embodiment, standard material information, standard topic information, and corresponding topic types are input into the prediction layer of the target machine's reading comprehension model to obtain a standard candidate text set of standard topic information. The standard candidate text set includes At least one standard candidate text; input each standard candidate text and standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain the selection probability value and standard material of each standard candidate text The key information of the information; the selection probability value of each standard candidate text and the key information of the standard material information are combined to obtain the initial answer information; thereby improving the accuracy of the generated initial answer information.
在一实施例中,如图5所示,在将标准素材信息、标准题目信息和对应的题目类型输入至预设的目标机器阅读理解模型中进行预测之前,该基于机器学习的文本处理方法还具体包括如下步骤:In one embodiment, as shown in FIG. 5, before the standard material information, standard topic information, and corresponding topic types are input into a preset target machine reading comprehension model for prediction, the machine learning-based text processing method also Specifically include the following steps:
S11:获取预设数量的样本答题数据,每一样本答题数据包括关键段落信息、样本问题和对应的备选答案集。S11: Obtain a preset number of sample answer data, and each sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets.
其中,样本答题数据是指用于进行模型训练的阅读理解数据。可选地,获取样本答题数据可以直接从考试系统上获取若干篇阅读理解数据,或者对纸质答卷上的阅读理解数据进行扫描识别后获取得到。每一所述样本答题数据包括关键段落信息、样本问题和对应的备选答案集。其中,关键段落信息是指用于解答样本问题所对应的素材信息。样本问题是指样本答题数据中的题目的问题。样本问题和对应的备选答案集为样本问题对应的候选答案项。例如:According to paragraph 2,Athens had all of the following before becoming a city-state EXCEPT为样本问题;A.a council made up of aristocrats;B.an assembly made up of men;C.a constitution that was fully democratic;D.officials who were elected yearly为样本问题对应的备选答案集。Among them, the sample answer data refers to the reading comprehension data used for model training. Optionally, the sample answer data can be obtained by directly acquiring several pieces of reading comprehension data from the test system, or by scanning and identifying the reading comprehension data on the paper answer sheet. Each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets. Among them, the key paragraph information refers to the material information corresponding to the sample question. The sample question refers to the question of the question in the sample answer data. The sample question and the corresponding candidate answer set are the candidate answer items corresponding to the sample question. For example: According to paragraph 2, Athens had all of the following before being a city-state EXCEPT is a sample problem; Aa council made up of aristocrats; B an assembly made up of men; Ca; Democratic that was fully who were elected yearly is the candidate answer set corresponding to the sample question.
需要说明的是,获取预设数量的样本答题数据,预设数量可以为M个,其中,M为正整数。而M的具体数值可以根据实际需要进行设定。M的数值越高,后续模型训练的准确性会越高,然而提取效率会有所下降,可以在准确度和效率上进行综合考虑进行对M的选取。It should be noted that, to obtain a preset number of sample answer data, the preset number can be M, where M is a positive integer. The specific value of M can be set according to actual needs. The higher the value of M, the higher the accuracy of subsequent model training, but the extraction efficiency will decrease, and the selection of M can be comprehensively considered in terms of accuracy and efficiency.
S12:分别将每一样本答题数据的样本问题与对应的备选答案集中的每个备选答案进行拼接,得到每一样本答题数据的样本备选文本集,样本备选文本集包括至少一个样本备选文本。S12: Combine the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain a sample candidate text set of each sample answer data. The sample candidate text set includes at least one sample Alternative text.
具体地,分别将每一样本答题数据的所述样本问题与对应的备选答案集中的每个备选答案进行拼接,得到每一样本答题数据的至少一个样本备选文本。Specifically, the sample questions of each sample answer data and each candidate answer in the corresponding candidate answer set are respectively spliced to obtain at least one sample candidate text of each sample answer data.
例如:若样本问题为According to paragraph 2,Athens had all of the following before becoming a city-state EXCEPT;备选答案集为A.a council made up of aristocrats;B.an assembly made up of men;C.a constitution that was fully democratic;D.officials who were elected yearly;则分别将每一样本答题数据的样 本问题与对应的所述备选答案集中的每个备选答案进行拼接后,可以得到4个样本备选文本分别为:“Athens had a council made up of aristocrats before becoming a city-state”;Athens had an assembly made up of men before becoming a city-state”;“Athens had a constitution that was fully democratic before becoming a city-state”;“Athens had officials who were elected yearly before becoming a city-state”。For example: If the sample question is According to paragraph 2, Athens had all of the following before becoming a city-state EXCEPT; the alternative answer set is Aa council up of aristocrats; B an assembly that was made up of men; Ca constitution Fully democratic; D.officials who were elected yearly; Then, after stitching the sample questions of each sample answer data with each candidate answer in the corresponding candidate answer set, 4 sample candidate texts can be obtained respectively It is: "Athens had a council made up of aristocrats before being a city-state"; Athens had an assembly made up of men before becoming a city-state; "Athens had a before a city-state"; "Athens had a before a city-state"; "; "Athens had officials who were elected annually before becoming a city-state".
S13:对每一样本答题数据的关键段落信息进行标注,得到关键段落信息的标注数据。S13: Mark the key paragraph information of each sample answer data to obtain the marked data of the key paragraph information.
具体地,对每一样本答题数据的关键段落信息进行标注,得到关键段落信息的标注数据,其中,标注数据为用于标注关键段落信息中每一句话的关键信息的数据。例如:标注数据可以为标注关键段落信息中哪些句子是中心观点句、哪些句子是分论点句和哪些句子是非观点句等。Specifically, the key paragraph information of each sample answer data is annotated to obtain annotation data of the key paragraph information, where the annotation data is data used to annotate the key information of each sentence in the key paragraph information. For example, the labeling data can be used to label which sentences in the key paragraph information are central point sentences, which sentences are sub-thesis sentences, and which sentences are non-point sentences.
S14:将每一样本答题数据中的样本备选文本集、关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型。S14: Input the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data as training samples into the convolutional neural network-pre-training language model for training, to obtain the target machine reading comprehension model.
具体地,将每一样本答题数据中的样本备选文本集、关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,即可得到目标机器阅读理解模型。其中,卷积神经网络-预训练语言模型是由卷积神经网络模型和预训练语言模型相结合所得到的模型。可以理解地,卷积神经网络-预训练语言模型相当于卷积神经网络与预训练语言网络模型相连接形成的模型。Specifically, the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data are input as training samples into the convolutional neural network-pre-training language model for training, and the target machine reading comprehension can be obtained Model. Among them, the convolutional neural network-pre-training language model is a model obtained by combining the convolutional neural network model and the pre-training language model. Understandably, the convolutional neural network-pre-training language model is equivalent to the model formed by connecting the convolutional neural network and the pre-training language network model.
在本实施例中,获取预设数量的样本答题数据,每一样本答题数据包括关键段落信息、样本问题和对应的备选答案集;分别将每一样本答题数据的样本问题与对应的备选答案集中的每个备选答案进行拼接,得到每一样本答题数据的样本备选文本集,样本备选文本集包括至少一个样本备选文本;对每一样本答题数据的关键段落信息进行标注,得到关键段落信息的标注数据;将每一样本答题数据中的样本备选文本集、关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型;从而提高了生成的目标机器阅读理解模型的精确度。In this embodiment, a preset number of sample answer data is obtained, and each sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets; the sample questions of each sample answer data and the corresponding candidate Each candidate answer in the answer set is spliced to obtain a sample candidate text set of each sample answer data. The sample candidate text set includes at least one sample candidate text; the key paragraph information of each sample answer data is marked, Obtain the annotation data of key paragraph information; input the sample candidate text set, key paragraph information and corresponding annotation data in each sample answer data as training samples into the convolutional neural network-pre-training language model for training, and obtain the target Machine reading comprehension model; thereby improving the accuracy of the generated target machine reading comprehension model.
在一实施例中,如图6所示,在将每一样本答题数据中的样本备选文本集、关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型之后,基于机器学习的文本理解处理方法还具体包括如下步骤:In one embodiment, as shown in FIG. 6, the sample candidate text set, key paragraph information, and corresponding annotation data in each sample answer data are input as training samples into the convolutional neural network-pre-training language model After training and obtaining the target machine reading comprehension model, the text comprehension processing method based on machine learning also specifically includes the following steps:
S15:接收更新指令,检测目标机器阅读理解模型中的最小风险训练损失函数是否为最小化。S15: Receive an update instruction, and detect whether the minimum risk training loss function in the target machine's reading comprehension model is minimized.
S16:在最小风险训练损失函数不是最小化时,对目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对目标机器阅读理解模型的参数进行一次优化调整,包括对最小风险训练损失函数执行一次最小化处理流程。S16: When the minimum risk training loss function is not minimized, after optimizing and adjusting the parameters of the target machine reading comprehension model for a preset number of times, use the preset evaluation function and selected verification answer data to understand the adjusted target machine reading comprehension The accuracy of the model output answer is evaluated, and the evaluation result is obtained; among them, the parameters of the target machine reading comprehension model are optimized and adjusted, including a minimization process for the minimum risk training loss function.
S17:若评估结果满足预设评估要求,则将调整后的目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将标准素材信息、标准题目信息和对应的题目类型重新输 入至新的目标机器阅读理解模型中进行预测,得到初始答案信息。S17: If the evaluation result meets the preset evaluation requirements, record the adjusted target machine reading comprehension model as the new target machine reading comprehension model, so that the standard material information, standard topic information and corresponding topic types can be re-input to the new target machine reading comprehension model. Make predictions in the target machine reading comprehension model to get the initial answer information.
其中,更新指令是指用于触发对目标机器阅读理解模型进行优化的指令。可选地,更新指令可以在要求目标机器阅读理解模型具有更精准的预测能力时触发生成,也可以预先设定一个触发周期进行定期生成等。具体地,接收更新指令,检测目标机器阅读理解模型中的最小风险训练损失函数是否为最小化。若目标机器阅读理解模型中的最小风险训练损失函数不为最小化,则以最小化最小风险训练损失函数为目标,对目标机器阅读理解模型的参数进行预设次数的优化调整,然后再执行目标机器阅读理解模型的训练,以不断优化目标机器阅读理解模型的输出答案的概率分布,使预测的样本答题数据中的样本问题的答案越来越向标准答案靠近。因此,通过预设次数的迭代优化调整,即可得到一个调整后的目标机器阅读理解模型。其中,最小风险训练是指使用损失函数Δ(y,y (n))来描述模型预测的答案y与标准答案y (n)之间的差异程度,并试图寻找一组参数使得模型在训练集上损失的期望值。 Among them, the update instruction refers to an instruction used to trigger the optimization of the target machine's reading comprehension model. Optionally, the update instruction may be generated when the target machine's reading comprehension model is required to have a more accurate predictive ability, or a trigger cycle may be preset for periodic generation, etc. Specifically, an update instruction is received, and it is detected whether the minimum risk training loss function in the reading comprehension model of the target machine is minimized. If the minimum risk training loss function in the target machine reading comprehension model is not minimization, then the goal is to minimize the minimum risk training loss function, and the parameters of the target machine reading comprehension model are optimized for a preset number of times, and then the target is executed The training of the machine reading comprehension model continuously optimizes the probability distribution of the output answers of the target machine reading comprehension model, so that the answers to the sample questions in the predicted sample answer data are getting closer and closer to the standard answers. Therefore, through a preset number of iterative optimization adjustments, an adjusted target machine reading comprehension model can be obtained. Among them, the minimum risk training refers to the use of the loss function Δ(y,y (n) ) to describe the degree of difference between the answer y predicted by the model and the standard answer y (n) , and to try to find a set of parameters to make the model in the training set The expected value of the loss.
具体的,最小风险训练损失函数R(θ)的计算公式为:Specifically, the calculation formula of the minimum risk training loss function R(θ) is:
Figure PCTCN2020103784-appb-000001
Figure PCTCN2020103784-appb-000001
Figure PCTCN2020103784-appb-000002
Figure PCTCN2020103784-appb-000002
其中,x (n)为样本答题数据中的样本问题;y为目标机器阅读理解模型输出的答案,P(y|x (n);θ)为当模型参数为θ时、目标机器阅读理解模型输出的答案概率值,Y(x (n))为对应x (n)的目标机器阅读理解模型所有可能输出答案的集合,Δ(y,y (n))为目标机器阅读理解模型输出的答案与标准答案y (n)之间的差异程度(即损失)。本实例中利用rouge评价计算目标机器阅读理解模型输出的答案与标准答案y (n)之间的损失,定义Δ(y,y (n))=1-rouge(y,y (n))。基于rouge-L可以自动匹配最长子序列,本实施例中的rouge评价采用rouge-L,对应的计算公式为:在上述公式中,x和y为标准答案和模型输出答案的文本序列;N为标准答案的长度;n为模型输出答案的长度;β为超参数,可以根据需要设置,本 实施例中取值为1.2;LCS为最长公共子序列。当然,在具体应用中可以根据具体的任务和需求进行个性化设置。进一步地,在对目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对目标机器阅读理解模型的参数进行一次优化调整,包括对最小风险训练损失函数执行一次最小化处理流程。 Among them, x (n) is the sample question in the sample answer data; y is the answer output by the target machine reading comprehension model, P(y|x (n) ;θ) is the target machine reading comprehension model when the model parameter is θ The output probability value of the answer, Y(x (n) ) is the set of all possible output answers of the target machine reading comprehension model corresponding to x (n) , Δ(y,y (n) ) is the answer output by the target machine reading comprehension model The degree of difference (ie loss) from the standard answer y (n). In this example, rouge evaluation is used to calculate the loss between the answer output by the target machine's reading comprehension model and the standard answer y (n) , and define Δ(y, y (n) ) = 1-rouge(y, y (n) ). Based on rouge-L, the longest subsequence can be automatically matched. The rouge evaluation in this embodiment adopts rouge-L, and the corresponding calculation formula is: in the above formula, x and y are the text sequence of the standard answer and the model output answer; N is The length of the standard answer; n is the length of the model output answer; β is a hyperparameter, which can be set as required, and the value is 1.2 in this embodiment; LCS is the longest common subsequence. Of course, in specific applications, personalized settings can be made according to specific tasks and needs. Further, after optimizing and adjusting the parameters of the target machine reading comprehension model for a preset number of times, the preset evaluation function and selected verification answer data are used to evaluate the accuracy of the adjusted target machine reading comprehension model output answer. Obtain the evaluation result; among them, an optimization adjustment is performed on the parameters of the target machine reading comprehension model, including a minimization process for the minimum risk training loss function.
其中,评估结果是指对参数调整后的目标机器阅读理解模型进行效果评估后所得的结果。验证答题数据是指用来验证参数调整后的目标机器阅读理解模型的效果的数据集。每一验证答题数据包括关键段落信息、样本问题和对应的备选答案集。具体地,在对目标机器阅读理解模型完成预设次数的优化调整后,将选取的验证答题数据输入调整后的目标机器阅读理解模型中,再利用预设评价函数,如ROUGE(Recall-Oriented Understudy forGisting Evaluation,对提升评估的理解)评价、BLEU(Bilingual EvaluationUnderstudy,双语评价)评价该调整后的目标机器阅读理解模型所输出答案的准确性,得到评估结果。Among them, the evaluation result refers to the result obtained after the effect evaluation of the target machine reading comprehension model after parameter adjustment. The verification answer data refers to the data set used to verify the effect of the target machine's reading comprehension model after parameter adjustment. Each verification answer data includes key paragraph information, sample questions and corresponding candidate answer sets. Specifically, after the target machine reading comprehension model is optimized and adjusted for a preset number of times, the selected verification answer data is input into the adjusted target machine reading comprehension model, and then the preset evaluation function is used, such as ROUGE (Recall-Oriented Understudy ForGisting Evaluation, evaluation of the understanding of improvement evaluation, BLEU (Bilingual Evaluation Understudy, bilingual evaluation) evaluates the accuracy of the answers output by the adjusted target machine reading comprehension model, and obtains the evaluation result.
进一步地,在得到评估结果之后,判断该评估结果是否满足预设评估要求,若评估结果满足预设评估要求,则停止对目标机器阅读理解模型的优化调整,并将调整后的目标机器阅读理解模型记录为新的目标机器阅读理解模型。其中,预设评估要求为当目标机器阅读理解模型中的损失函数达到最小,直至收敛。即当评估结果指示目标机器阅读理解模型中的损失函数在反复迭代的优化调整过程中直至收敛,得到最小优化损失函数时,表示评估结果满足预设评估要求,停止对目标机器阅读理解模型的优化调整,并将调整后的目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将标准素材信息、标准题目信息和对应的题目类型重新输入至新的目标机器阅读理解模型中进行预测,得到初始答案信息,从而进一步提高了得到的初始答案信息的精准度。Further, after the evaluation result is obtained, it is determined whether the evaluation result meets the preset evaluation requirements. If the evaluation result meets the preset evaluation requirements, the optimization adjustment of the target machine reading comprehension model is stopped, and the adjusted target machine reading comprehension The model is recorded as a new target machine reading comprehension model. Among them, the preset evaluation requirement is when the loss function in the reading comprehension model of the target machine reaches the minimum until it converges. That is, when the evaluation result indicates that the loss function in the target machine reading comprehension model converges during the iterative optimization and adjustment process, and the minimum optimized loss function is obtained, it means that the evaluation result meets the preset evaluation requirements, and the optimization of the target machine reading comprehension model is stopped. Adjust and record the adjusted target machine reading comprehension model as a new target machine reading comprehension model, so that the standard material information, standard topic information and corresponding topic types can be re-input into the new target machine reading comprehension model for prediction , To obtain the initial answer information, thereby further improving the accuracy of the obtained initial answer information.
在另一具体实施例中,若得到的评估结果还未满足预设评估要求,则继续对目标机器阅读理解模型进行优化调整,以极小化该损失函数,直至收敛,直至评估结果满足预设评估要求,最后将调整后的目标机器阅读理解模型记录为新的目标机器阅读理解模型。可以理解地,在本实施例中,目标机器阅读理解模型每执行一次迭代优化调整、就会对应输出一个评估结果,这样在经过预设次数的迭代优化调整和评估后,会对应得到多个评估结果,直至评估结果满足预设评估要求,停止对目标机器阅读理解模型的迭代优化调整In another specific embodiment, if the obtained evaluation result does not meet the preset evaluation requirements, continue to optimize and adjust the target machine reading comprehension model to minimize the loss function until it converges, until the evaluation result meets the preset Assess the requirements, and finally record the adjusted target machine reading comprehension model as the new target machine reading comprehension model. Understandably, in this embodiment, each time the target machine reading comprehension model performs an iterative optimization adjustment, an evaluation result will be output accordingly, so that after a preset number of iterative optimization adjustments and evaluations, multiple evaluations will be correspondingly obtained. As a result, until the evaluation results meet the preset evaluation requirements, stop the iterative optimization and adjustment of the target machine reading comprehension model
在本实施例中,接收更新指令,检测目标机器阅读理解模型中的最小风险训练损失函数是否为最小化;在最小风险训练损失函数不是最小化时,对目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对目标机器阅读理解模型的参数进行一次优化调整,包括对最小风险训练损失函数执行一次最小化处理流程;若评估结果满足预设评估要求,则将调整后的目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将标准素材信息、标准题目信息和对应的题目类型重新输入至新的目标机器阅读理解模型中进行预测,得到初始答案信息,从而进一步提高了得到的初 始答案信息的精准度和准确性。In this embodiment, an update instruction is received to detect whether the minimum risk training loss function in the target machine reading comprehension model is minimized; when the minimum risk training loss function is not minimized, the parameters of the target machine reading comprehension model are preset After the optimization and adjustment of the number of times, the preset evaluation function and the selected verification answer data are used to evaluate the accuracy of the adjusted target machine reading comprehension model output answer, and the evaluation result is obtained; among them, the parameters of the target machine reading comprehension model are evaluated. An optimization adjustment, including a minimization process for the minimum risk training loss function; if the evaluation result meets the preset evaluation requirements, the adjusted target machine reading comprehension model is recorded as a new target machine reading comprehension model, so as to facilitate Standard material information, standard question information and corresponding question types are re-input into the new target machine reading comprehension model for prediction, and initial answer information is obtained, thereby further improving the accuracy and accuracy of the obtained initial answer information.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
在一实施例中,提供一种基于机器学习的文本处理装置,该基于机器学习的文本处理装置与上述实施例中基于机器学习的文本处理方法一一对应。如图7所示,该基于机器学习的文本处理装置包括预处理模块、第一输入模块20、预测模块30和整合模块40。各功能模块详细说明如下:In one embodiment, a text processing device based on machine learning is provided, and the text processing device based on machine learning has a one-to-one correspondence with the text processing method based on machine learning in the foregoing embodiment. As shown in FIG. 7, the machine learning-based text processing device includes a preprocessing module, a first input module 20, a prediction module 30, and an integration module 40. The detailed description of each functional module is as follows:
预处理模块10,用于获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;The preprocessing module 10 is configured to obtain answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
第一输入模块20,用于将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;The first input module 20 is configured to input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
预测模块30,用于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The prediction module 30 is configured to input the standard material information, the standard question information, and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, where the initial answer information includes A plurality of evaluation data information and problem-solving ideas information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
确定模块40,用于根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The determining module 40 is configured to determine final evaluation data from a plurality of the evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information in a preset integration manner as a target Answer information.
优选地,如图8所示,所述预处理模块10包括:Preferably, as shown in FIG. 8, the preprocessing module 10 includes:
标准化单元101,用于对所述待处理答题数据的文本形式进行标准化,得到初始答题数据;The standardization unit 101 is used to standardize the text form of the answer data to be processed to obtain initial answer data;
转换单元102,用于将所述初始答题数据转换成json数据格式,得到候选答题数据;The conversion unit 102 is configured to convert the initial answer data into a json data format to obtain candidate answer data;
判断单元103,用于判断所述候选答题数据中的json字符串是否满足预设要求,若所述候选答题数据中的json字符串满足预设要求,则将所述候选答题数据确定为标准答题数据。The judging unit 103 is configured to judge whether the json character string in the candidate answer data meets preset requirements, and if the json character string in the candidate answer data meets the preset requirements, determine the candidate answer data as a standard answer data.
优选地,如图9所示,所述预测模块30包括:Preferably, as shown in FIG. 9, the prediction module 30 includes:
第一输入单元301,用于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述目标机器阅读理解模型的预测层中,得到所述标准题目信息的标准备选文本集,所述标准备选文本集包括至少一个标准备选文本;The first input unit 301 is configured to input the standard material information, the standard topic information, and the corresponding topic type into the prediction layer of the target machine reading comprehension model to obtain the standard topic information A selected text set, where the standard candidate text set includes at least one standard candidate text;
第二输入单元302,用于将所述标准备选文本集中的每一所述标准备选文本和所述标准素材信息输入至所述目标机器阅读理解模型的推理层中,得到每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息;The second input unit 302 is configured to input each standard candidate text and the standard material information in the standard candidate text set into the inference layer of the target machine reading comprehension model to obtain each The selection probability value of the standard candidate text and the key information of the standard material information;
组合单元303,用于将每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息进行组合,得到初始答案信息。The combining unit 303 is configured to combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
优选地,所述基于机器学习的文本处理装置还包括:Preferably, the text processing device based on machine learning further includes:
获取模块,用于获取预设数量的样本答题数据,每一所述样本答题数据包括关键段落信息、样本问题和对应的备选答案集;The obtaining module is used to obtain a preset number of sample answer data, each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets;
拼接模块,用于分别将每一所述样本答题数据的所述样本问题与对应的所述备选答案集中的每个备选答案进行拼接,得到每一所述样本答题数据的样本备选文本集,所述样本备选文本集包括至少一个样本备选文本;The splicing module is used to splice the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain the sample candidate text of each sample answer data Set, the sample candidate text set includes at least one sample candidate text;
标注模块,用于对每一所述样本答题数据的所述关键段落信息进行标注,得到所述关键段落信息的标注数据;An annotation module, configured to annotate the key paragraph information of each of the sample answer data to obtain the annotation data of the key paragraph information;
第二输入模块,用于将每一所述样本答题数据中的所述样本备选文本集、所述关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型。The second input module is used to input the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data as training samples into the convolutional neural network-pre-training language model Perform training to obtain the target machine reading comprehension model.
优选地,所述基于机器学习的文本处理装置还包括:Preferably, the text processing device based on machine learning further includes:
检测模块,用于接收更新指令,检测所述目标机器阅读理解模型中的最小风险训练损失函数是否为最小化;The detection module is configured to receive update instructions and detect whether the minimum risk training loss function in the target machine reading comprehension model is minimized;
优化调整模块,用于在所述最小风险训练损失函数不是最小化时,对所述目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的所述目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对所述目标机器阅读理解模型的参数进行一次优化调整,包括对所述最小风险训练损失函数执行一次最小化处理流程;The optimization adjustment module is used to optimize and adjust the parameters of the target machine reading comprehension model for a preset number of times when the minimum risk training loss function is not minimized, and then use the preset evaluation function and the selected verification answer data, Evaluate the accuracy of the output answers of the adjusted target machine reading comprehension model to obtain the evaluation result; wherein, performing an optimization adjustment on the parameters of the target machine reading comprehension model includes performing the minimum risk training loss function Minimize the processing flow at one time;
记录模块,用于在所述评估结果满足预设评估要求时,将调整后的所述目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将标准素材信息、标准题目信息和对应的题目类型重新输入至新的目标机器阅读理解模型中进行预测,得到初始答案信息。The recording module is used to record the adjusted target machine reading comprehension model as a new target machine reading comprehension model when the evaluation result meets the preset evaluation requirements, so as to facilitate the standard material information, standard topic information and corresponding The question type of is re-input into the new target machine reading comprehension model for prediction, and the initial answer information is obtained.
关于基于机器学习的文本处理装置的具体限定可以参见上文中对于基于机器学习的文本处理方法的限定,在此不再赘述。上述基于机器学习的文本处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the text processing device based on machine learning, please refer to the above definition of the text processing method based on machine learning, which will not be repeated here. The various modules in the above-mentioned machine learning-based text processing device can be implemented in whole or in part by software, hardware, and a combination thereof. The foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储上述实施例中基于机器学习的文本处理方法所使用到的数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于机器学习的文本处理方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 10. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation 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, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store the data used in the text processing method based on machine learning in the foregoing embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize a text processing method based on machine learning.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例中的基于机器学习的文本处理方法。In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the machine learning-based Text processing method.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机 程序被处理器执行时实现上述实施例中的基于机器学习的文本处理方法。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性的。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the machine learning-based text processing method in the foregoing embodiment is implemented. Wherein, the computer-readable storage medium may be non-volatile or volatile.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(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)等。Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the procedures of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. 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 may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (20)

  1. 一种基于机器学习的文本处理方法,其中,包括:A text processing method based on machine learning, which includes:
    获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
    将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
    根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  2. 如权利要求1所述的基于机器学习的文本处理方法,其中,对所述待处理答题数据进行预处理,包括:The text processing method based on machine learning of claim 1, wherein the preprocessing of the answer data to be processed comprises:
    对所述待处理答题数据的文本形式进行标准化,得到初始答题数据;Standardize the text form of the answer data to be processed to obtain initial answer data;
    将所述初始答题数据转换成json数据格式,得到候选答题数据;Convert the initial answer data into a json data format to obtain candidate answer data;
    判断所述候选答题数据中的json字符串是否满足预设要求,若所述候选答题数据中的json字符串满足预设要求,则将所述候选答题数据确定为标准答题数据。It is determined whether the json character string in the candidate answer data meets a preset requirement, and if the json character string in the candidate answer data meets the preset requirement, the candidate answer data is determined as standard answer data.
  3. 如权利要求1所述的基于机器学习的文本处理方法,其中,所述将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,包括:The text processing method based on machine learning according to claim 1, wherein said inputting said standard material information, said standard topic information and corresponding said topic type into a preset target machine reading comprehension model is performed Predict, get the initial answer information, including:
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述目标机器阅读理解模型的预测层中,得到所述标准题目信息的标准备选文本集,所述标准备选文本集包括至少一个标准备选文本;The standard material information, the standard topic information, and the corresponding topic type are input into the prediction layer of the target machine reading comprehension model to obtain a standard candidate text set of the standard topic information, and the standard is prepared The selected text set includes at least one standard candidate text;
    将所述标准备选文本集中的每一所述标准备选文本和所述标准素材信息输入至所述目标机器阅读理解模型的推理层中,得到每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息;Input each standard candidate text and the standard material information in the standard candidate text set into the reasoning layer of the target machine reading comprehension model to obtain the selection probability value of each standard candidate text And key information of the standard material information;
    将每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息进行组合,得到初始答案信息。Combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
  4. 如权利要求1所述的基于机器学习的文本处理方法,其中,所述在将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测之前,还包括:The text processing method based on machine learning according to claim 1, wherein said inputting said standard material information, said standard topic information and corresponding said topic type into a preset target machine reading comprehension model Before making a prediction, it also includes:
    获取预设数量的样本答题数据,每一所述样本答题数据包括关键段落信息、样本问题和对应的备选答案集;Obtain a preset number of sample answer data, each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets;
    分别将每一所述样本答题数据的所述样本问题与对应的所述备选答案集中的每个备选答案进行拼接,得到每一所述样本答题数据的样本备选文本集,所述样本备选文本集包括至少一个样本备选文本;Respectively splicing the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain a sample candidate text set of each sample answer data, the sample The candidate text set includes at least one sample candidate text;
    对每一所述样本答题数据的所述关键段落信息进行标注,得到所述关键段落信息的标注数据;Labeling the key paragraph information of each of the sample answer data to obtain the labeling data of the key paragraph information;
    将每一所述样本答题数据中的所述样本备选文本集、所述关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型。Input the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data as training samples into the convolutional neural network-pre-training language model for training, and obtain the target machine reading Understand the model.
  5. 如权利要求4所述的基于机器学习的文本处理方法,其中,所述在将每一所述样本答题数据中的所述样本备选文本集、所述关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型之后,所述基于机器学习的文本处理方法还包括:The machine learning-based text processing method according to claim 4, wherein the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data are used as training The samples are input into the convolutional neural network-pre-training language model for training, and after the target machine reading comprehension model is obtained, the machine learning-based text processing method further includes:
    接收更新指令,检测所述目标机器阅读理解模型中的最小风险训练损失函数是否为最小化;Receiving an update instruction, and detecting whether the minimum risk training loss function in the target machine reading comprehension model is minimized;
    在所述最小风险训练损失函数不是最小化时,对所述目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的所述目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对所述目标机器阅读理解模型的参数进行一次优化调整,包括对所述最小风险训练损失函数执行一次最小化处理流程;When the minimum risk training loss function is not minimized, after the parameters of the target machine reading comprehension model are optimized and adjusted a preset number of times, the preset evaluation function and the selected verification answer data are used to compare the adjusted The accuracy of the output answers of the target machine reading comprehension model is evaluated to obtain the evaluation result; wherein, an optimization adjustment of the parameters of the target machine reading comprehension model includes performing a minimization process on the minimum risk training loss function;
    若所述评估结果满足预设评估要求,则将调整后的所述目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述新的目标机器阅读理解模型中进行预测,得到初始答案信息。If the evaluation result meets the preset evaluation requirements, the adjusted target machine reading comprehension model is recorded as a new target machine reading comprehension model, so that the standard material information, the standard topic information and the corresponding The question type is input into the new target machine reading comprehension model for prediction, and initial answer information is obtained.
  6. 如权利要求1所述的基于机器学习的文本处理方法,其中,对所述待处理答题数据进行预处理之前,所述方法还包括:8. The machine learning-based text processing method according to claim 1, wherein, before preprocessing the to-be-processed answer data, the method further comprises:
    获取所述待处理答题数据包括的字符数量;Acquiring the number of characters included in the answer data to be processed;
    当所述字符数量大于预先设定的字符阈值时,对所述待处理答题数据进行字符分割处理,以得到多个待处理答题数据。When the number of characters is greater than a preset character threshold, character segmentation processing is performed on the to-be-processed answer data to obtain a plurality of to-be-processed answer data.
  7. 如权利要求1所述的基于机器学习的文本处理方法,其中,所述答题分类模型为机器学习贝叶斯模型,所述机器学习贝叶斯模型根据预先标记的题目信息和题目类型训练得到。The text processing method based on machine learning according to claim 1, wherein the answer classification model is a machine learning Bayes model, and the machine learning Bayes model is obtained by training based on pre-labeled topic information and topic types.
  8. 一种基于机器学习的文本处理装置,其中,包括:A text processing device based on machine learning, which includes:
    预处理模块,用于获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;The preprocessing module is used to obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
    第一输入模块,用于将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;The first input module is configured to input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
    预测模块,用于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入 至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The prediction module is used to input the standard material information, the standard question information, and the corresponding question type into a preset target machine reading comprehension model for prediction to obtain initial answer information, where the initial answer information includes multiple Pieces of evaluation data information and problem-solving ideas information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
    确定模块,用于根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The determining module is used to determine final evaluation data from a plurality of the evaluation data information according to the problem-solving idea information, and record the final evaluation data and the problem-solving idea information as a target answer in a preset integration manner information.
  9. 一种计算机设备,包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:A computer device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the The program instructions of the memory, wherein:
    获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
    将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
    根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  10. 如权利要求11所述的计算机设备,其中,所述处理器用于:The computer device of claim 11, wherein the processor is configured to:
    对所述待处理答题数据的文本形式进行标准化,得到初始答题数据;Standardize the text form of the answer data to be processed to obtain initial answer data;
    将所述初始答题数据转换成json数据格式,得到候选答题数据;Convert the initial answer data into a json data format to obtain candidate answer data;
    判断所述候选答题数据中的json字符串是否满足预设要求,若所述候选答题数据中的json字符串满足预设要求,则将所述候选答题数据确定为标准答题数据。It is determined whether the json character string in the candidate answer data meets a preset requirement, and if the json character string in the candidate answer data meets the preset requirement, the candidate answer data is determined as standard answer data.
  11. 如权利要求11所述的计算机设备,其中,所述处理器用于:The computer device of claim 11, wherein the processor is configured to:
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述目标机器阅读理解模型的预测层中,得到所述标准题目信息的标准备选文本集,所述标准备选文本集包括至少一个标准备选文本;The standard material information, the standard topic information, and the corresponding topic type are input into the prediction layer of the target machine reading comprehension model to obtain a standard candidate text set of the standard topic information, and the standard is prepared The selected text set includes at least one standard candidate text;
    将所述标准备选文本集中的每一所述标准备选文本和所述标准素材信息输入至所述目标机器阅读理解模型的推理层中,得到每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息;Input each standard candidate text and the standard material information in the standard candidate text set into the reasoning layer of the target machine reading comprehension model to obtain the selection probability value of each standard candidate text And key information of the standard material information;
    将每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息进行组合,得到初始答案信息。Combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
  12. 如权利要求11所述的计算机设备,其中,所述处理器用于:The computer device of claim 11, wherein the processor is configured to:
    获取预设数量的样本答题数据,每一所述样本答题数据包括关键段落信息、样本问题和对应的备选答案集;Obtain a preset number of sample answer data, each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets;
    分别将每一所述样本答题数据的所述样本问题与对应的所述备选答案集中的每个备选答案进行拼接,得到每一所述样本答题数据的样本备选文本集,所述样本备选文本集包括至少一个样本备选文本;Respectively splicing the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain a sample candidate text set of each sample answer data, the sample The candidate text set includes at least one sample candidate text;
    对每一所述样本答题数据的所述关键段落信息进行标注,得到所述关键段落信息的标注数据;Labeling the key paragraph information of each of the sample answer data to obtain the labeling data of the key paragraph information;
    将每一所述样本答题数据中的所述样本备选文本集、所述关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型。Input the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data as training samples into the convolutional neural network-pre-training language model for training, and obtain the target machine reading Understand the model.
  13. 如权利要求14所述的计算机设备,其中,所述处理器用于:The computer device of claim 14, wherein the processor is configured to:
    接收更新指令,检测所述目标机器阅读理解模型中的最小风险训练损失函数是否为最小化;Receiving an update instruction, and detecting whether the minimum risk training loss function in the target machine reading comprehension model is minimized;
    在所述最小风险训练损失函数不是最小化时,对所述目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的所述目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对所述目标机器阅读理解模型的参数进行一次优化调整,包括对所述最小风险训练损失函数执行一次最小化处理流程;When the minimum risk training loss function is not minimized, after the parameters of the target machine reading comprehension model are optimized and adjusted a preset number of times, the preset evaluation function and the selected verification answer data are used to compare the adjusted The accuracy of the output answers of the target machine reading comprehension model is evaluated to obtain the evaluation result; wherein, an optimization adjustment of the parameters of the target machine reading comprehension model includes performing a minimization process on the minimum risk training loss function;
    若所述评估结果满足预设评估要求,则将调整后的所述目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述新的目标机器阅读理解模型中进行预测,得到初始答案信息。If the evaluation result meets the preset evaluation requirements, the adjusted target machine reading comprehension model is recorded as a new target machine reading comprehension model, so that the standard material information, the standard topic information and the corresponding The question type is input into the new target machine reading comprehension model for prediction, and initial answer information is obtained.
  14. 如权利要求9所述的计算机设备,其中,所述处理器用于:The computer device of claim 9, wherein the processor is configured to:
    获取所述待处理答题数据包括的字符数量;Acquiring the number of characters included in the answer data to be processed;
    当所述字符数量大于预先设定的字符阈值时,对所述待处理答题数据进行字符分割处理,以得到多个待处理答题数据。When the number of characters is greater than a preset character threshold, character segmentation processing is performed on the to-be-processed answer data to obtain a plurality of to-be-processed answer data.
  15. 如权利要求9所述的计算机设备,其中,所述答题分类模型为机器学习贝叶斯模型,所述机器学习贝叶斯模型根据预先标记的题目信息和题目类型训练得到。9. The computer device according to claim 9, wherein the answer classification model is a machine learning Bayes model, and the machine learning Bayes model is obtained by training based on pre-labeled topic information and topic types.
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used to implement the following steps:
    获取待处理答题数据,对所述待处理答题数据进行预处理,得到标准答题数据,所述标准答题数据包括标准素材信息和标准题目信息;Obtain the answer data to be processed, and preprocess the answer data to be processed to obtain standard answer data, where the standard answer data includes standard material information and standard question information;
    将所述标准答题数据中的所述标准题目信息输入至预设的答题分类模型中,得到所述标准题目信息的题目类型;Input the standard question information in the standard answer data into a preset answer classification model to obtain the question type of the standard question information;
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至预设的目标机器阅读理解模型中进行预测,得到初始答案信息,所述初始答案信息包括多个评估数据信息以及与所述标准题目信息对应的解题思路信息,其中,所述目标机器阅读理解模型为采用卷积神经网络-预训练语言模型训练得到的;The standard material information, the standard question information, and the corresponding question type are input into a preset target machine reading comprehension model for prediction, and initial answer information is obtained. The initial answer information includes multiple evaluation data information and Problem-solving idea information corresponding to the standard topic information, wherein the target machine reading comprehension model is obtained by training using a convolutional neural network-pre-training language model;
    根据所述解题思路信息从多个所述评估数据信息中确定最终评估数据,并将所述最终 评估数据与所述解题思路信息以预设的整合方式记录为目标答案信息。The final evaluation data is determined from a plurality of the evaluation data information according to the problem-solving idea information, and the final evaluation data and the problem-solving idea information are recorded as target answer information in a preset integration manner.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    对所述待处理答题数据的文本形式进行标准化,得到初始答题数据;Standardize the text form of the answer data to be processed to obtain initial answer data;
    将所述初始答题数据转换成json数据格式,得到候选答题数据;Convert the initial answer data into a json data format to obtain candidate answer data;
    判断所述候选答题数据中的json字符串是否满足预设要求,若所述候选答题数据中的json字符串满足预设要求,则将所述候选答题数据确定为标准答题数据。It is determined whether the json character string in the candidate answer data meets a preset requirement, and if the json character string in the candidate answer data meets the preset requirement, the candidate answer data is determined as standard answer data.
  18. 如权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述目标机器阅读理解模型的预测层中,得到所述标准题目信息的标准备选文本集,所述标准备选文本集包括至少一个标准备选文本;The standard material information, the standard topic information, and the corresponding topic type are input into the prediction layer of the target machine reading comprehension model to obtain a standard candidate text set of the standard topic information, and the standard is prepared The selected text set includes at least one standard candidate text;
    将所述标准备选文本集中的每一所述标准备选文本和所述标准素材信息输入至所述目标机器阅读理解模型的推理层中,得到每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息;Input each standard candidate text and the standard material information in the standard candidate text set into the reasoning layer of the target machine reading comprehension model to obtain the selection probability value of each standard candidate text And key information of the standard material information;
    将每一所述标准备选文本的选择概率值和所述标准素材信息的关键信息进行组合,得到初始答案信息。Combine the selection probability value of each standard candidate text and the key information of the standard material information to obtain initial answer information.
  19. 如权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:15. The computer-readable storage medium of claim 16, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    获取预设数量的样本答题数据,每一所述样本答题数据包括关键段落信息、样本问题和对应的备选答案集;Obtain a preset number of sample answer data, each of the sample answer data includes key paragraph information, sample questions, and corresponding candidate answer sets;
    分别将每一所述样本答题数据的所述样本问题与对应的所述备选答案集中的每个备选答案进行拼接,得到每一所述样本答题数据的样本备选文本集,所述样本备选文本集包括至少一个样本备选文本;Respectively splicing the sample question of each sample answer data with each candidate answer in the corresponding candidate answer set to obtain a sample candidate text set of each sample answer data, the sample The candidate text set includes at least one sample candidate text;
    对每一所述样本答题数据的所述关键段落信息进行标注,得到所述关键段落信息的标注数据;Labeling the key paragraph information of each of the sample answer data to obtain the labeling data of the key paragraph information;
    将每一所述样本答题数据中的所述样本备选文本集、所述关键段落信息和对应的标注数据作为训练样本输入至卷积神经网络-预训练语言模型中进行训练,得到目标机器阅读理解模型。Input the sample candidate text set, the key paragraph information and the corresponding annotation data in each of the sample answer data as training samples into the convolutional neural network-pre-training language model for training, and obtain the target machine reading Understand the model.
  20. 如权利要求19所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:The computer-readable storage medium of claim 19, wherein when the program instructions are executed by the processor, they are further used to implement the following steps:
    接收更新指令,检测所述目标机器阅读理解模型中的最小风险训练损失函数是否为最小化;Receiving an update instruction, and detecting whether the minimum risk training loss function in the target machine reading comprehension model is minimized;
    在所述最小风险训练损失函数不是最小化时,对所述目标机器阅读理解模型的参数进行预设次数的优化调整后,利用预设评价函数和选取的验证答题数据,对调整后的所述目标机器阅读理解模型输出答案的准确性进行评价,得到评估结果;其中,对所述目标机器 阅读理解模型的参数进行一次优化调整,包括对所述最小风险训练损失函数执行一次最小化处理流程;When the minimum risk training loss function is not minimized, after the parameters of the target machine reading comprehension model are optimized and adjusted a preset number of times, the preset evaluation function and the selected verification answer data are used to compare the adjusted The accuracy of the output answers of the target machine reading comprehension model is evaluated to obtain the evaluation result; wherein, an optimization adjustment of the parameters of the target machine reading comprehension model includes performing a minimization process on the minimum risk training loss function;
    若所述评估结果满足预设评估要求,则将调整后的所述目标机器阅读理解模型记录为新的目标机器阅读理解模型,以便于将所述标准素材信息、所述标准题目信息和对应的所述题目类型输入至所述新的目标机器阅读理解模型中进行预测,得到初始答案信息。If the evaluation result meets the preset evaluation requirements, the adjusted target machine reading comprehension model is recorded as a new target machine reading comprehension model, so that the standard material information, the standard topic information and the corresponding The question type is input into the new target machine reading comprehension model for prediction, and initial answer information is obtained.
PCT/CN2020/103784 2020-06-05 2020-07-23 Text processing method and apparatus based on machine learning, and computer device and medium WO2021243828A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010502599.4 2020-06-05
CN202010502599.4A CN111428021B (en) 2020-06-05 2020-06-05 Text processing method, device, computer equipment and medium based on machine learning

Publications (1)

Publication Number Publication Date
WO2021243828A1 true WO2021243828A1 (en) 2021-12-09

Family

ID=71555335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103784 WO2021243828A1 (en) 2020-06-05 2020-07-23 Text processing method and apparatus based on machine learning, and computer device and medium

Country Status (2)

Country Link
CN (1) CN111428021B (en)
WO (1) WO2021243828A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114358425A (en) * 2022-01-06 2022-04-15 杭州数理大数据技术有限公司 Test question selection method and device, electronic equipment and storage medium
CN114462355A (en) * 2022-01-17 2022-05-10 网易有道信息技术(北京)有限公司 Question acquisition method and device, electronic equipment and storage medium
CN114707516A (en) * 2022-03-29 2022-07-05 北京理工大学 Long text semantic similarity calculation method based on contrast learning
CN115434870A (en) * 2022-07-29 2022-12-06 国家电投集团云南国际电力投资有限公司 Method, device and equipment for processing vibration data of wind power generation set and storage medium
CN115801888A (en) * 2022-11-16 2023-03-14 云南电网有限责任公司 Safe wireless communication system based on communication technology
CN115862031A (en) * 2022-12-30 2023-03-28 北京百度网讯科技有限公司 Text processing method, neural network training method, device and equipment
CN116361463A (en) * 2023-03-27 2023-06-30 应急管理部国家减灾中心(应急管理部卫星减灾应用中心) Earthquake disaster information extraction method, device, equipment and medium
CN116484091A (en) * 2023-03-10 2023-07-25 湖北天勤伟业企业管理有限公司 Card information program interaction method and device
CN116798036A (en) * 2023-06-27 2023-09-22 广州市南方人力资源评价中心有限公司 Method and device for identifying and checking answer sheet objective question identification result
CN117252739A (en) * 2023-11-17 2023-12-19 山东山大鸥玛软件股份有限公司 Method, system, electronic equipment and storage medium for evaluating paper
CN117786416A (en) * 2024-02-28 2024-03-29 腾讯科技(深圳)有限公司 Model training method, device, equipment, storage medium and product

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428021B (en) * 2020-06-05 2023-05-30 平安国际智慧城市科技股份有限公司 Text processing method, device, computer equipment and medium based on machine learning
CN112183048A (en) * 2020-09-30 2021-01-05 北京有竹居网络技术有限公司 Automatic problem solving method and device, computer equipment and storage medium
CN112764760B (en) * 2021-01-25 2023-12-26 中国科学院自动化研究所 Auxiliary answering system based on program evaluation
CN113407675A (en) * 2021-06-24 2021-09-17 作业帮教育科技(北京)有限公司 Automatic education subject correcting method and device and electronic equipment
CN113468176B (en) * 2021-06-30 2023-09-26 北京百度网讯科技有限公司 Information input method and device, electronic equipment and computer readable storage medium
CN113488178B (en) * 2021-07-20 2022-07-12 上海弗莱特智能医疗科技有限公司 Information generation method and device, storage medium and electronic equipment
CN113779360A (en) * 2021-08-18 2021-12-10 深圳技术大学 Multi-head question-answering model-based question solving method, device, equipment and storage medium
CN113805695B (en) * 2021-08-26 2024-04-05 深圳静美大健康科技有限公司 Reading understanding level prediction method and device, electronic equipment and storage medium
CN114330718B (en) * 2021-12-23 2023-03-24 北京百度网讯科技有限公司 Method and device for extracting causal relationship and electronic equipment
CN114444488B (en) * 2022-01-26 2023-03-24 中国科学技术大学 Few-sample machine reading understanding method, system, equipment and storage medium
CN117892818B (en) * 2024-03-18 2024-05-28 浙江大学 Large language model rational content generation method based on implicit thinking chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619123A (en) * 2019-09-19 2019-12-27 电子科技大学 Machine reading understanding method
CN110688491A (en) * 2019-09-25 2020-01-14 暨南大学 Machine reading understanding method, system, device and medium based on deep learning
CN110750630A (en) * 2019-09-25 2020-02-04 北京捷通华声科技股份有限公司 Generating type machine reading understanding method, device, equipment and storage medium
US20200134449A1 (en) * 2018-10-26 2020-04-30 Naver Corporation Training of machine reading and comprehension systems
CN111428021A (en) * 2020-06-05 2020-07-17 平安国际智慧城市科技股份有限公司 Text processing method and device based on machine learning, computer equipment and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9720981B1 (en) * 2016-02-25 2017-08-01 International Business Machines Corporation Multiple instance machine learning for question answering systems
CN108229718B (en) * 2016-12-22 2020-06-02 北京字节跳动网络技术有限公司 Information prediction method and device
CN111027327B (en) * 2019-10-29 2022-09-06 平安科技(深圳)有限公司 Machine reading understanding method, device, storage medium and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200134449A1 (en) * 2018-10-26 2020-04-30 Naver Corporation Training of machine reading and comprehension systems
CN110619123A (en) * 2019-09-19 2019-12-27 电子科技大学 Machine reading understanding method
CN110688491A (en) * 2019-09-25 2020-01-14 暨南大学 Machine reading understanding method, system, device and medium based on deep learning
CN110750630A (en) * 2019-09-25 2020-02-04 北京捷通华声科技股份有限公司 Generating type machine reading understanding method, device, equipment and storage medium
CN111428021A (en) * 2020-06-05 2020-07-17 平安国际智慧城市科技股份有限公司 Text processing method and device based on machine learning, computer equipment and medium

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114358425A (en) * 2022-01-06 2022-04-15 杭州数理大数据技术有限公司 Test question selection method and device, electronic equipment and storage medium
CN114462355A (en) * 2022-01-17 2022-05-10 网易有道信息技术(北京)有限公司 Question acquisition method and device, electronic equipment and storage medium
CN114707516A (en) * 2022-03-29 2022-07-05 北京理工大学 Long text semantic similarity calculation method based on contrast learning
CN115434870B (en) * 2022-07-29 2023-11-07 云南滇能智慧能源有限公司 Method, device, equipment and storage medium for processing vibration data of wind power generation set
CN115434870A (en) * 2022-07-29 2022-12-06 国家电投集团云南国际电力投资有限公司 Method, device and equipment for processing vibration data of wind power generation set and storage medium
CN115801888A (en) * 2022-11-16 2023-03-14 云南电网有限责任公司 Safe wireless communication system based on communication technology
CN115862031B (en) * 2022-12-30 2024-02-20 北京百度网讯科技有限公司 Text processing method, neural network training method, device and equipment
CN115862031A (en) * 2022-12-30 2023-03-28 北京百度网讯科技有限公司 Text processing method, neural network training method, device and equipment
CN116484091A (en) * 2023-03-10 2023-07-25 湖北天勤伟业企业管理有限公司 Card information program interaction method and device
CN116361463A (en) * 2023-03-27 2023-06-30 应急管理部国家减灾中心(应急管理部卫星减灾应用中心) Earthquake disaster information extraction method, device, equipment and medium
CN116361463B (en) * 2023-03-27 2023-12-08 应急管理部国家减灾中心(应急管理部卫星减灾应用中心) Earthquake disaster information extraction method, device, equipment and medium
CN116798036A (en) * 2023-06-27 2023-09-22 广州市南方人力资源评价中心有限公司 Method and device for identifying and checking answer sheet objective question identification result
CN116798036B (en) * 2023-06-27 2024-04-02 网才科技(广州)集团股份有限公司 Method and device for identifying and checking answer sheet objective question identification result
CN117252739A (en) * 2023-11-17 2023-12-19 山东山大鸥玛软件股份有限公司 Method, system, electronic equipment and storage medium for evaluating paper
CN117252739B (en) * 2023-11-17 2024-03-12 山东山大鸥玛软件股份有限公司 Method, system, electronic equipment and storage medium for evaluating paper
CN117786416A (en) * 2024-02-28 2024-03-29 腾讯科技(深圳)有限公司 Model training method, device, equipment, storage medium and product
CN117786416B (en) * 2024-02-28 2024-05-28 腾讯科技(深圳)有限公司 Model training method, device, equipment, storage medium and product

Also Published As

Publication number Publication date
CN111428021A (en) 2020-07-17
CN111428021B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2021243828A1 (en) Text processing method and apparatus based on machine learning, and computer device and medium
US11995528B2 (en) Learning observation representations by predicting the future in latent space
US11816439B2 (en) Multi-turn dialogue response generation with template generation
US11948058B2 (en) Utilizing recurrent neural networks to recognize and extract open intent from text inputs
CN110717039A (en) Text classification method and device, electronic equipment and computer-readable storage medium
US10970493B1 (en) Systems and methods for slot relation extraction for machine learning task-oriented dialogue systems
CN112287089B (en) Classification model training and automatic question-answering method and device for automatic question-answering system
JP2020529666A (en) Deep context-based grammatical error correction using artificial neural networks
US20220351634A1 (en) Question answering systems
WO2023197613A1 (en) Small sample fine-turning method and system and related apparatus
EP3832485A1 (en) Question answering systems
CN113672931B (en) Software vulnerability automatic detection method and device based on pre-training
US20220067277A1 (en) Intelligent Training Set Augmentation for Natural Language Processing Tasks
CN110377733A (en) A kind of text based Emotion identification method, terminal device and medium
CN115391527A (en) Intention recognition method based on prompt learning, question answering method and device
CN112101042A (en) Text emotion recognition method and device, terminal device and storage medium
WO2021174814A1 (en) Answer verification method and apparatus for crowdsourcing task, computer device, and storage medium
US11562137B2 (en) System to correct model drift for natural language understanding
CN113505786A (en) Test question photographing and judging method and device and electronic equipment
Huang et al. Multitask learning for neural generative question answering
CN115374278A (en) Text processing model distillation method, device, computer equipment and medium
Mihaylov et al. Predicting the Resolution Time and Priority of Bug Reports: A Deep Learning Approach
US20220366197A1 (en) System and method for finetuning automated sentiment analysis
US20240062219A1 (en) Granular taxonomy for customer support augmented with ai
CN117725198A (en) Method, device, equipment and storage medium for correcting abstract of search result

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: 20938739

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17.03.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20938739

Country of ref document: EP

Kind code of ref document: A1