Problem solving method and apparatus

By acquiring the questions to be answered and the information to be matched to form reconstructed information, and using deep learning methods and the BERT model for semantic analysis, the problems of high cost of question bank construction and low accuracy of character-level similarity matching in existing technologies are solved, and efficient and accurate question answering is achieved.

CN115617959BActive Publication Date: 2026-05-29BEIJING YUANLI WEILAI SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING YUANLI WEILAI SCI & TECH CO LTD
Filing Date
2021-07-13
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, problem-solving methods require building a large question bank to ensure accuracy, which is cumbersome, time-consuming, and costly to maintain. Furthermore, character-level similarity matching has low accuracy and cannot properly handle the semantic association between the question to be solved and the alternative answers.

Method used

By acquiring the question to be answered and at least two pieces of information to be matched, reconstructed information is formed, and semantic analysis and scoring are performed using deep learning methods and the BERT model to determine the target matching information.

Benefits of technology

It improves the efficiency and accuracy of problem-solving, reduces construction and maintenance costs, and can correctly handle the semantic relationship between the problem to be solved and the alternative answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115617959B_ABST
    Figure CN115617959B_ABST
Patent Text Reader

Abstract

The present specification provides a question answering method and device, wherein the question answering method comprises: obtaining a question to be answered and at least two pieces of information to be matched; forming reconstructed information by matching each piece of information to be matched with the question to be answered; inputting each piece of reconstructed information into a question answering model to obtain a score of each piece of reconstructed information; and determining target matching information that matches the question to be answered from the at least two pieces of information to be matched according to the scores of the reconstructed information. In this way, the semantic relationship between the question to be answered and the information to be matched is correctly handled through information reconstruction, and each piece of reconstructed information of the information to be matched is scored through a deep learning method, so as to determine the target matching information that matches the question to be answered from the at least two pieces of information to be matched. The deep learning method is applied to the question answering process, high-precision automatic answering is realized, and the question answering efficiency and accuracy are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual relates to the field of artificial intelligence technology, and in particular to problem-solving methods and apparatus. Background Technology

[0002] With the continuous development of computer and artificial intelligence technologies, more and more work and study tasks can be automated. Computer technology has been gradually applied to various daily education and learning activities. For example, computer technology can be used to automatically analyze the answers to certain questions, thereby greatly saving human resources.

[0003] In existing technologies, a question bank is often pre-built, containing a large number of questions and corresponding answers. When a question needs to be answered, the similarity between the question and each question in the question bank is calculated to determine the target question in the question bank that is most similar to the question. Then, the answer to the target question in the question bank is determined as the answer to the question. However, the above problem-solving method requires adding a massive number of questions to the question bank for different scenarios, grades, and types to ensure accuracy. This is costly, cumbersome, time-consuming, inefficient, and has extremely high maintenance costs. It also requires regular optimization of the stored questions, which greatly affects the efficiency and accuracy of problem-solving. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a problem-solving method. This specification also relates to a problem-solving apparatus, a computing device, and a computer-readable storage medium to address the problems of low efficiency and accuracy in problem-solving in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a problem-solving method is provided, including:

[0006] Retrieve the unanswered question and at least two corresponding matching information;

[0007] The obtained information to be matched is combined with the question to be answered to form reconstructed information;

[0008] Input each piece of reconstruction information into the problem-solving model to obtain a score for each piece of reconstruction information;

[0009] Based on the scores of each reconstructed piece of information, the target matching information that matches the question to be answered is determined from the at least two pieces of information to be matched.

[0010] According to a second aspect of the embodiments of this specification, a problem-solving apparatus is provided, comprising:

[0011] The acquisition module is configured to acquire the question to be answered and at least two corresponding matching information;

[0012] The component module is configured to combine each piece of information to be matched with the question to be answered to form reconstructed information.

[0013] The module is configured to input each piece of reconstruction information into the problem-solving model and obtain a score for each piece of reconstruction information.

[0014] The determination module is configured to determine the target matching information that matches the question to be answered from among the at least two pieces of information to be matched, based on the scores of each piece of reconstructed information.

[0015] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising:

[0016] Memory and processor;

[0017] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method:

[0018] Retrieve the unanswered question and at least two corresponding matching information;

[0019] The obtained information to be matched is combined with the question to be answered to form reconstructed information;

[0020] Input each piece of reconstruction information into the problem-solving model to obtain a score for each piece of reconstruction information;

[0021] Based on the scores of each reconstructed piece of information, the target matching information that matches the question to be answered is determined from the at least two pieces of information to be matched.

[0022] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the problem-solving method.

[0023] The problem-solving method provided in this specification involves obtaining the question to be solved and at least two corresponding pieces of information to be matched. Then, each piece of information to be matched is combined with the question to be solved to form reconstructed information. Each reconstructed information is input into a problem-solving model to obtain a score for each piece of information. Based on the scores of each reconstructed information, the target matching information that best matches the question to be solved is determined from among the at least two pieces of information. In this approach, information reconstruction is performed on the question to be solved and the corresponding pieces of information to be matched. Then, the problem-solving model performs semantic analysis and scoring on the reconstructed information. The scores of each reconstructed information determine which piece of information is more correct, thus determining which piece of information best matches the question to be solved. In this way, the semantic relationship between the question to be solved and the pieces of information to be matched is correctly handled through information reconstruction. By using deep learning methods to score the reconstructed information of each piece of information to be matched, the target matching information that best matches the question to be solved—that is, the correct answer to the question—is determined. Applying deep learning methods to the problem-solving process achieves high-precision automatic solutions, greatly improving the efficiency and accuracy of problem-solving. Attached Figure Description

[0024] Figure 1 This is a flowchart of a problem-solving method provided in one embodiment of this specification;

[0025] Figure 2 This is a schematic diagram of an automatic solution processing flow provided in one embodiment of this specification;

[0026] Figure 3 This is a schematic diagram of the structure of a problem-solving device provided in one embodiment of this specification;

[0027] Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0028] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0029] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0031] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0032] The Transformer model is essentially an Encoder-Decoder structure. The encoder consists of 6 encoding blocks (each block of the encoder consists of self-attention and FFNN), and the decoder consists of 6 decoding blocks (each block of the decoder consists of self-attention, encoder-decoder attention, and FFNN). As with all generative models, the output of the encoder is used as the input of the decoder.

[0033] BERT model: A bidirectional attention neural network model. The BERT model can predict the current word and the next sentence based on the context from both the left and right sides. The goal of the BERT model is to train on a large-scale unlabeled corpus to obtain a semantic representation of the text containing rich semantic information, then fine-tune this semantic representation for a specific NLP task, and finally apply it to that NLP task.

[0034] Token: Before any actual processing is performed on the input text, it needs to be segmented into linguistic units such as words, punctuation marks, numbers, or alphanumeric characters. These units are called tokens. For English text, a token can be a single word, a punctuation mark, a number, etc. For Chinese text, the smallest token can be a single character, a punctuation mark, a number, etc.

[0035] Word embedding refers to embedding a high-dimensional space with the number of all words into a continuous vector space with a much lower dimension, where each word or phrase is mapped to a vector in the real number field.

[0036] The normalized exponential function Softmax is a generalization of the logistic function. It can "compress" a K-dimensional vector containing arbitrary real numbers into another K-dimensional real vector, so that each element is in the range [0,1] and the sum of all elements is 1.

[0037] Cross-entropy loss function: A function used to measure the difference between two probability distributions.

[0038] Encoding: The process of converting information from one form or format to another. In this specification, it refers to the process of converting text into vectors, i.e., using embedded encoding, which is achieved through the embedding layer of the reading comprehension model.

[0039] Embedding layer: Located in the input layer of the network model, it is used to encode the input text data (i.e., embedded encoding) and output text vectors; and to perform embedded encoding on the input image data and output image features.

[0040] Attention layer: A hierarchical structure in the network model used to perform self-attention or mutual attention processing on text vectors and output a vector matrix; and to perform self-attention or mutual attention processing on image features and output a feature matrix.

[0041] It's important to note that current problem-solving methods often involve pre-building a question bank containing a large number of questions and corresponding answers. When a question needs to be answered, the similarity between the question and each question in the bank is calculated to determine the most similar target question. The answer to this target question is then used as the answer to the question in question 1. However, this method requires adding a massive number of questions to the question bank for different scenarios, grade levels, and question types to ensure accuracy. This is costly, cumbersome, time-consuming, inefficient, and extremely costly to maintain, requiring regular optimization of the stored questions, which significantly impacts the efficiency and accuracy of problem-solving. Furthermore, it suffers from poor interpretability, failing to properly handle the semantic relationships between the question and the answer choices.

[0042] In addition, for some questions, the correct answer can be determined by calculating the character similarity between each alternative answer and the question to be answered. However, calculating similarity at the character level has too low an accuracy rate and cannot correspond different descriptions of the same semantics, resulting in a low accuracy rate in answering the question.

[0043] Therefore, this specification provides a problem-solving method that correctly handles the semantic relationship between the question to be answered and the candidate answers through information reconstruction. It uses deep learning to score each reconstructed piece of information, solving the problem of low accuracy in traditional character similarity matching. Furthermore, this method has low construction and maintenance costs, requiring only a relatively small amount of data for iterative training and updates. In addition, deep learning methods can be combined with rule-based methods to achieve automatic problem-solving.

[0044] This specification provides a problem-solving method, and also relates to a problem-solving apparatus, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.

[0045] Figure 1 A flowchart of a problem-solving method according to an embodiment of this specification is shown, which specifically includes the following steps:

[0046] Step 102: Obtain the question to be answered and at least two corresponding matching information.

[0047] Specifically, an unanswered question can refer to a question awaiting an answer, and the matching information can refer to multiple answer choices corresponding to the unanswered question. In practical applications, an unanswered question can refer to the stem of a multiple-choice question, and the corresponding matching information can be the options included in the multiple-choice question. Of course, in practical applications, an unanswered question and its corresponding matching information can also refer to questions awaiting an answer and their corresponding answer choices in other scenarios. For example, an unanswered question can refer to a fill-in-the-blank or calculation question awaiting an answer, and the corresponding matching information can be candidate answers for the fill-in-the-blank or calculation question awaiting an answer, determined based on a knowledge base, historical answers, etc. This manual does not impose any restrictions on this.

[0048] Furthermore, unanswered questions can be from various fields, such as math, language arts, and English. Also, unanswered questions can be either questions awaiting a solution or questions awaiting a confirmed solution. For example, an unanswered question might be a problem a student couldn't solve and was searching for; in this case, the question is awaiting a solution and there is no user-inputted answer. Alternatively, an unanswered question might be a question a student submitted their own solution to; in this case, the question awaits an automatic confirmation of the solution and there is user-inputted answer.

[0049] It should be noted that at least two pieces of information to be matched are alternative answers to the question to be answered. At least two pieces of information to be matched contain an answer that matches the question to be answered, that is, at least two pieces of information to be matched contain the correct answer to the question to be answered. If the question to be answered is a multiple-choice question, a multiple-choice question will generally include the question to be answered and multiple alternative options. The number of alternative options obtained for the question to be answered should be at least 2, usually 3 or 4. The correct answer is one or more of these multiple alternative options.

[0050] In practical applications, answering a question requires understanding and analyzing the semantic relationship between the content of each piece of information to be matched and the question itself. This determines which piece of information matches the question. Therefore, it's necessary to obtain the question and at least two corresponding pieces of information to be matched, facilitating subsequent information reconstruction. Furthermore, obtaining the specific content of the information to be matched is crucial for analyzing its semantic relationship with the question.

[0051] For example, for the multiple-choice question "Numbers that are divisible by 2 in natural numbers are all ( ), A. composite numbers, B. prime numbers, C. even numbers, D. odd numbers", the question to be answered is "Numbers that are divisible by 2 in natural numbers are all ( )," and the information to be matched is "composite numbers", "prime numbers", "even numbers", and "odd numbers".

[0052] Step 104: Combine the obtained information to be matched with the question to be answered to form reconstructed information.

[0053] It should be noted that there are often multiple pieces of information to be matched for the unanswered questions. Therefore, each piece of information to be matched needs to be combined with the unanswered questions to form a reconstructed information. That is, the number of pieces of information to be reconstructed corresponds to the number of pieces of information to be matched for the unanswered questions. For example, if an unanswered question has 4 pieces of information to be matched, then the unanswered question and the corresponding 4 pieces of information to be matched can be obtained. By reconstructing each piece of information to be matched with the unanswered question, 4 pieces of reconstructed information can be obtained.

[0054] In one optional implementation of this embodiment, the acquired information to be matched is combined with the question to be answered to form reconstructed information. The specific implementation process can be as follows:

[0055] For each piece of information to be matched, the information to be matched is filled into the missing position in the question to be answered, forming the reconstructed information of the information to be matched.

[0056] It should be noted that the questions to be answered are often in fill-in-the-blank format. That is, after filling in the blanks with the specific content of the information to be matched, the question can be transformed into a complete sentence. By determining whether this sentence is correct, we can determine whether the information to be matched matches the question, i.e., whether it is the correct answer. Therefore, when reconstructing information from each piece of information to be matched and the question to be answered, we can fill in the blanks in the question to form the reconstructed information. After performing the above operation on each piece of information to form the corresponding reconstructed information, we can obtain multiple reconstructed information composed of each piece of information to be matched and the question to be answered.

[0057] Continuing with the previous example, the problem to be solved is "Numbers divisible by 2 in natural numbers are all (). The matching information is "composite number", "prime number", "even number", and "odd number". Filling the blank in the problem with the matching information "composite number" yields the reconstructed information "Numbers divisible by 2 in natural numbers are all composite numbers". Filling the blank with the matching information "prime number" yields the reconstructed information "Numbers divisible by 2 in natural numbers are all prime numbers". Filling the blank with the matching information "even number" yields the reconstructed information "Numbers divisible by 2 in natural numbers are all even numbers". Filling the blank with the matching information "odd number" yields the reconstructed information "Numbers divisible by 2 in natural numbers are all odd numbers". Thus, we obtain reconstructed information consisting of four matching information items and the problem to be solved.

[0058] In practical applications, among the various reconstructed information obtained by combining the information to be matched and the question to be answered, only the content of the information to be matched is different, while the question to be answered is completely the same. That is, most of the content in different reconstructed information is the same, with only a small part being different. This is not conducive to the subsequent question-answering model distinguishing the differences between different reconstructed information.

[0059] Since the question-solving model used to answer the unanswered question can include a pre-trained language layer, which can be based on the BERT model structure, meaning the question-solving model uses the BERT model as its architecture, and in the original structure of the BERT model, the input can be divided into two parts, separated by a separator. Therefore, leveraging the characteristics of the original structure of the BERT model, when combining the information to be matched and the unanswered question to obtain reconstructed information, it can also be divided into two parts. The first method is to fill the information to be matched into the unanswered question, directly obtaining the reconstructed information of that information; in this case, the reconstructed information is the first part, and there is no second part. The second method is to insert the information to be matched before the unanswered question, setting a separator between the information to be matched and the unanswered question, obtaining the reconstructed information of that information; in this case, the first part is the information to be matched, and the second part is the unanswered question.

[0060] In an optional implementation of this embodiment, when filling the information to be matched into the question to be answered and combining them to obtain the reconstructed information, in addition to directly obtaining the combined reconstructed information by filling the blanks in the question to be answered as described above, it is also possible to insert the information to be matched as the first part before the question to be answered after filling the blanks in the question to be answered, to obtain the combined reconstructed information. That is, after filling the blanks in the question to be answered with the information to be matched, the method further includes:

[0061] The information to be matched is inserted before the unanswered question into which the information to be matched is entered, and a separator is set between the information to be matched and the unanswered question into which the information to be matched is entered.

[0062] Specifically, the separator is a pre-defined symbol used to separate the first and second parts of the reconstructed information. Separators can be "-", "*", "&", etc. In practical applications, after filling the blank space in the question to be answered with the information to be matched, the information to be matched is inserted before the question to be answered, separated by a separator.

[0063] It should be noted that the reconstructed information obtained by inserting the information to be matched before the question to be answered consists of two parts: the first part is the information to be matched, and the second part is the question to be answered incorporating the information to be matched. For different reconstructed information, the first part is significantly different, while the second part is largely the same with minor differences. When analyzing the reconstructed information subsequently using a question-answering model, the model can quickly and accurately identify the significant differences in the first part of the reconstructed information, thereby accurately analyzing the semantic information of each reconstructed information, scoring each piece of reconstructed information, and obtaining the final correct answer.

[0064] Continuing with the previous example, after filling the blank space in the question with the information to be matched, "composite number," and then inserting it at the beginning of the entire question, and setting a separator "-" between the information to be matched and the question, we can obtain a reconstructed information: "Composite number - any natural number divisible by 2 is a composite number." Similarly, after filling the blank space in the question with the information to be matched, "prime number," and then inserting it at the beginning of the entire question, and setting a separator "-" between the information to be matched and the question, we can obtain a reconstructed information: "Prime number - any natural number divisible by 2 is a prime number." The process involves filling the blank space in the question with the information "even number" and inserting it at the beginning of the question, then separating it with a hyphen "-". This yields the reconstructed information "even number - any natural number divisible by 2 is even". Similarly, filling the blank space in the question with the information "odd number" and inserting it at the beginning of the question, then separating it with a hyphen "-", yields the reconstructed information "odd number - any natural number divisible by 2 is odd".

[0065] It should be noted that the above method combines two approaches: filling the information to be matched into the question to be answered and inserting the information to be matched before the question to be answered. This reconstructs the information to be matched and the question to be answered, resulting in the reconstructed information corresponding to the information to be matched. Of course, in practical applications, the above two approaches can also be used separately. That is, the information to be matched can be filled into the blank position in the question to be answered to form the reconstructed information of the information to be matched; or, the information to be matched can be inserted before the question to be answered, and a separator can be set between the information to be matched and the question to be answered to form the reconstructed information of the information to be matched. Either approach can be chosen, and this specification does not impose any restrictions on it.

[0066] In an optional implementation of this embodiment, since the number of corresponding matching information obtained may differ for different unanswered questions, but the number of categories that the question-solving model can recognize is fixed, when the number of matching information corresponding to the unanswered question is insufficient, preset special symbols can be used as matching information to supplement the number of reconstructed information. That is, after each of the obtained matching information is combined with the unanswered question to form reconstructed information, the following is also included:

[0067] Determine whether the number of items to be matched is equal to a preset category threshold;

[0068] If the number of pieces of information to be matched is less than the preset category threshold, determine the value difference between the number of pieces of information to be matched and the preset category threshold;

[0069] The numerical preset special characters are combined with the question to be answered to form the numerical reconstructed information.

[0070] Specifically, the preset category threshold can be a pre-set value, which is the number of categories that the question-answering model can recognize. For example, if the question-answering model is used to identify which of the four pieces of information to be matched is correct, the preset category threshold is 4. That is, four pieces of reconstructed information need to be input into the question-answering model at the same time. The question-answering model can analyze and score the relationship between the four pieces of reconstructed information and the semantic relationship between each piece of reconstructed information, thereby determining which of the four pieces of reconstructed information is the more correct expression.

[0071] In addition, preset special characters refer to pre-set symbols that can be used to fill in the information to be matched, such as "###", "~~", etc.

[0072] In practical applications, the process of combining the numerical preset special characters with the question to be answered to form the numerical reconstructed information can be similar to the specific implementation process of combining the obtained matching information with the question to be answered to form reconstructed information as described above, and will not be repeated here.

[0073] It should be noted that if the number of pieces of information to be matched is less than the preset category threshold, it means that the number of reconstructed pieces of information obtained based on the pieces of information to be matched is insufficient. At this time, the difference between the number of pieces of information to be matched and the preset category threshold can be determined. This difference is the number of pieces of reconstructed information that need to be filled. At this time, this number of preset special characters can be combined with the question to be answered to form this number of pieces of reconstructed information. This reconstructed information and the reconstructed information obtained based on the pieces of information to be matched together form the input of the subsequent question answering model.

[0074] For example, assuming the preset category threshold is 4, and there are 3 pieces of matching information corresponding to the question to be answered, the 3 pieces of matching information are combined with the question to be answered to form 3 pieces of reconstructed information, namely "composite number - all natural numbers divisible by 2 are composite numbers", "even number - all natural numbers divisible by 2 are even numbers", and "odd number - all natural numbers divisible by 2 are odd numbers". At this time, since the number of matching information is 3, which is less than the preset category threshold of 4, and the difference between the number of matching information and the preset category threshold is 1, a preset special character needs to be obtained. This preset special character is combined with the question to be answered to obtain a piece of reconstructed information. Assuming the preset special character is "###", the reconstructed information obtained is "### - all natural numbers divisible by 2 are ###".

[0075] This manual allows for the reconstruction of the question to be answered and each piece of matching information. This reconstruction facilitates the correct handling of the semantic relationships between the question and the matching information. Deep learning methods are used to score the reconstructed information for each piece of matching information. Furthermore, when the number of matching information is insufficient, preset special characters can be combined with the question to be answered to fill in the gaps in the reconstructed information. This allows for the application of the solution methods provided in this manual to various types of questions, offering greater flexibility and adaptability.

[0076] Step 106: Input each reconstruction information into the problem-solving model to obtain the score for each reconstruction information.

[0077] It should be noted that the question-answering model is not suitable for traditional classification models. This is because the individual pieces of information to be matched for the question do not inherently possess features; the matching information only differs within the specific context of the question. To address this, this specification employs a deep learning-based ranking method. Specifically, after obtaining the reconstructed information for each piece of information to be matched, these reconstructed pieces of information are input into the question-answering model. The model performs semantic analysis on each piece of reconstructed information and assigns a score to each. Subsequently, based on the scores of each piece of reconstructed information, it can be ranked to determine which reconstructed information is more correct than the others, thereby identifying the matching information that best matches the question, i.e., determining the answer to the question.

[0078] In one optional implementation of this embodiment, the question-answering model may include a pre-trained language layer and a normalization layer. The pre-trained language layer is used to perform semantic analysis on each reconstructed piece of information to obtain semantic vectors for each reconstructed piece of information. The normalization layer is used to normalize each semantic vector to obtain a score for each reconstructed piece of information. That is, each reconstructed piece of information is input into the question-answering model to obtain a score for each reconstructed piece of information. The specific implementation process can be as follows:

[0079] Each piece of reconstructed information is input into the pre-trained language layer of the question-answering model to obtain the semantic vector of each piece of reconstructed information.

[0080] The semantic vectors of each reconstructed piece of information are input into the normalization layer of the problem-solving model to obtain the score of each reconstructed piece of information.

[0081] In practical applications, the question-solving model needs to possess semantic analysis capabilities and the ability to score multiple categories. Therefore, the question-solving model in this specification can include a pre-trained language layer and a normalization layer. The best-performing model in the semantic analysis field is the BERT model, which, through a large number of natural language text paragraphs, gives the model powerful contextual understanding capabilities, making it suitable for related natural language tasks. Therefore, this specification can adopt the BERT model structure as the architecture for the automatic problem solver. That is, the pre-trained language layer of the question-solving model in this specification can be a BERT model architecture. The BERT model is essentially a bidirectional encoder representation based on Transformer, rooted in Transformer and derived from the concept of "attention is all you need." The bidirectional meaning indicates that when processing a word, it considers information from both preceding and following words, thereby acquiring the semantic context.

[0082] In other words, the pre-trained language layer can be a basic BERT model pre-trained based on a large amount of news, community Q&A, and encyclopedia data.

[0083] In addition, the normalization layer is used to normalize each piece of reconstructed information to obtain the score of each piece of reconstructed information, and the sum of the scores of each piece of reconstructed information should be 1. Therefore, in this specification, the normalization layer can adopt the normalization exponential function Softmax structure to output the scores of a preset category threshold number of categories, that is, the scores of a preset category threshold number of reconstructed information, and make the score range of each piece of reconstructed information between [0,1], and the sum of all scores is 1.

[0084] In practice, the question-answering model includes a pre-trained language layer and a normalization layer. The pre-trained language layer can analyze the contextual semantic relationships of each reconstructed piece of information and obtain the semantic vector of each reconstructed piece of information. Then, based on the analysis of the semantic vector of each reconstructed piece of information by the normalization layer, the score of each reconstructed piece of information can be obtained.

[0085] In one possible implementation, the pre-trained language layer may include an embedding layer and an attention layer; the reconstructed information is input into the pre-trained language layer of the question-answering model to obtain the semantic vectors of each reconstructed information. The specific implementation process can be as follows:

[0086] For each piece of reconstructed information, the reconstructed information is divided into word units;

[0087] The word units are word-embedded through the embedding layer included in the pre-trained language layer to obtain the encoding vector of the reconstructed information;

[0088] The encoded vector is input into the attention layer included in the pre-trained language layer to obtain the semantic vector of the reconstructed information.

[0089] It should be noted that the embedding layer can perform word embedding processing on the reconstructed information, embedding the high-dimensional reconstructed information into a continuous vector space with a much lower dimension. Furthermore, since the pre-trained language layer can be a BERT model, and the BERT model can only accept single characters as input, it is necessary to decompose each piece of reconstructed information into word units, each word unit may contain only one character.

[0090] Furthermore, the pre-trained language layer can consist of only one attention layer, or it can consist of two or more attention layers. The output vector of the pre-trained language layer is the output vector of the last attention layer. For example, assuming there are 12 attention layers, the output vector of the pre-trained language layer is the output vector of the 12th attention layer.

[0091] In practical applications, the reconstructed information can first be segmented into word units, and then each word unit can be embedded through an embedding layer to obtain the encoding vector corresponding to the reconstructed information. After that, the information of the encoding vector of the reconstructed information can be summarized using a 12-layer Transformer structure. The core module is the attention mechanism (which includes 12 attention layers), so that the information of the entire reconstructed information can be aggregated and summarized for a specific character to obtain a semantic vector.

[0092] In addition, the semantic vectors of each reconstructed information obtained from the pre-trained language layer of the question-answering model can represent the contextual semantics in each reconstructed information. The normalization layer in the trained question-answering model has the function of classifying the category to which the semantic vectors belong. Therefore, by inputting each semantic vector into the normalization layer of the question-answering model, the probability scores of each reconstructed information of the question to be answered can be output.

[0093] In an optional implementation of this embodiment, the question-answering model may include a pre-trained language layer and a normalization layer. The pre-trained language layer is an available pre-trained BERT model. First, the obtained pre-trained BERT model is domain-adjusted to adapt it to the question-answering task. Then, the pre-trained language layer and the normalization layer are trained together in a supervised manner, so that the trained question-answering model can output scores for each reconstruction information. That is, the question-answering model can be trained by the following method:

[0094] Obtain a first training sample set, and iteratively train the pre-trained language layer of the question-answering model based on the first training sample set, adjusting the parameters of the pre-trained language layer until the training stopping condition is met, thereby obtaining the domain-adjusted pre-trained language layer.

[0095] Obtain a second training sample set. Based on the second training sample set and sample labels, iteratively train the pre-trained language layer and normalization layer of the question-answering model, adjusting the parameters of the pre-trained language layer and normalization layer until the training stopping condition is met, and obtain the trained question-answering model. The sample labels are the sample labels carried by each training sample in the second training sample set.

[0096] Specifically, the pre-trained language layer is a pre-trained BERT model obtained from the internet; the first training sample set is a collection of a large number of sample questions in the domain that need to be solved by the question-solving model. For example, if it is necessary to solve elementary school math problems, the first training sample set obtained will be a collection of a large number of elementary school math problems. Each training sample in this sample set may not contain labels. The pre-trained language layer only needs to be trained based on the first training sample set to enable it to adapt to the domain of math problem recognition and analysis.

[0097] In addition, when performing domain-adjusted training on a pre-trained BERT model, the first training sample set only needs to include a large number of question samples within the domain that the question-solving model needs to solve. It is not necessary to limit the type of question. For example, if the model needs to solve multiple-choice questions in elementary school math, the first training sample set can include a large number of multiple-choice questions in elementary school math and / or fill-in-the-blank questions in elementary school math.

[0098] It should be noted that the questions to be answered in different domains have different characteristics, which are significantly different from the large amount of news, community Q&A, encyclopedia data, etc. used when the pre-trained BERT model is used. Therefore, before using the pre-trained BERT model as the pre-trained language layer of the question answering model, it is necessary to obtain a large number of sample questions in the domain that the question answering model will be able to answer and process, and then perform small-scale domain-adjusted training on the pre-trained BERT model.

[0099] In practical applications, the meaning of a sentence can often be inferred from a subset of words. By masking these words, the model's ability to extract and infer meaning can be enhanced. However, since the input in the final application stage is a complete sentence without masking, the training process cannot remain in a masked state indefinitely. Typically, a sentence is masked 80% of the time and left unmasked 10%. Furthermore, replacing a single word in a sentence may alter its meaning, even making it nonsensical, but the underlying structural information of the entire sentence remains unchanged. Therefore, the remaining 10% of the training time can be used for random word substitution.

[0100] In other words, during iterative training of the pre-trained language layer, for each training sample in the first training sample set, the selected word is replaced with the [MASK] flag 80% of the time, the selected word is replaced with other random words 10% of the time, and the selected word remains unchanged for the remaining 10% of the time, thereby training the model's learning and analysis capabilities.

[0101] For example, in the first training sample set, a certain training sample is "Numbers divisible by 2 in natural numbers are all even numbers". 80% of the time the input is: Numbers divisible by 2 in natural numbers are all [masked], 10% of the time the input is: Numbers divisible by 2 in natural numbers are all even numbers, and 10% of the time the input is: Numbers divisible by 2 in natural numbers are all odd numbers. The pre-trained language layer is iteratively trained to train the model's learning and analysis capabilities.

[0102] In addition, in practical applications, the pre-trained language layer can be iteratively trained by using hidden word units instead of the masking process based on the first training sample set. This specification does not impose any restrictions on this.

[0103] In an optional implementation of this embodiment, after domain adjustment of the pre-trained language layer, the pre-trained language layer and the normalization layer can be further subjected to supervised training together, so that the trained question-solving model can output scores for each reconstructed information. The training samples used for supervised training (i.e., each training sample in the second training sample set) can include the question to be answered and at least two corresponding matching sample information. The sample label carried by the training sample can be the target sample matching information that matches the question to be answered from at least two matching sample information. Then, based on the second training sample set and the sample labels, the pre-trained language layer and the normalization layer of the question-solving model are iteratively trained, adjusting the parameters of the pre-trained language layer and the normalization layer until the training stopping condition is met. The specific implementation process can be as follows:

[0104] For the i-th training sample included in the second training sample set, the information of each unmatched sample in the i-th training sample is combined with the unanswered sample question to form sample reconstruction information, where i equals 1;

[0105] The reconstructed information of each sample is input into the question-answering model, and the predicted answer of the training sample is determined based on the output score.

[0106] Based on the predicted answer and the target sample matching information, the loss value of the question-answering model is calculated, and the parameters of the pre-trained language layer and normalization layer are adjusted in reverse.

[0107] Increment i by 1, and return to execute the operation steps for the i-th training sample included in the second training sample set, which combine the information of each unmatched sample of the training sample with the unanswered sample question to form sample reconstruction information, until the training stop condition is met.

[0108] Specifically, the second training sample set is a collection of a large number of unanswered sample questions within the domain that the question-solving model needs to process, along with at least two corresponding matching sample information. For example, if the model needs to solve math multiple-choice questions, the second training sample set would consist of a large number of math multiple-choice questions and their corresponding options. This second training sample set is used to train the entire question-solving model, specifically training the pre-trained language layer and the normalization layer together. This allows the question-solving model to output scores for each reconstructed piece of information. Therefore, each training sample in the second training sample set needs to carry a corresponding sample label. This label represents the target sample matching information, used to identify which matching sample information in the training samples matches the unanswered sample question, i.e., which matching sample information is the correct answer to the unanswered sample question.

[0109] It should be noted that, since the second training sample set is used to conduct supervised training on the entire question-solving model, enabling it to correctly identify the probability of each reconstruction information in each reconstruction information as correct, and thus score it, each training sample in the second training sample set includes the question to be solved and at least two corresponding sample information to be matched, and needs to carry sample labels.

[0110] In practice, the sample label refers to the true answer of the input training sample, while the predicted answer is the answer predicted for the training sample based on the scoring of each reconstructed piece of information by the question-answering model. In practical applications, the cross-entropy loss function can be calculated based on the predicted answer and the true answer to generate a loss value. Then, the parameters in the pre-trained language layer and normalization layer can be adjusted in reverse based on this loss value, and training samples can be obtained to continue the above parameter adjustment process until the training stopping condition is met.

[0111] Specifically, training termination conditions may include the loss value being less than a preset threshold. The preset threshold can be a critical value for the loss value. If the loss value is greater than or equal to the preset threshold, it indicates that there is still a certain deviation between the prediction result of the question-answering model and the actual result, and the parameters of the question-answering model still need to be adjusted. Training should then continue on the next training sample. If the loss value is less than the preset threshold, it indicates that the prediction result of the question-answering model is sufficiently close to the actual result, and training can stop. The value of the preset threshold can be determined according to the actual situation; this specification does not impose any restrictions on it.

[0112] In addition, the more iterations of training, the more accurate the problem-solving model will be. However, the number of training iterations cannot be unlimited. Therefore, the training stopping condition can be determined by whether the number of iterations reaches a threshold. This manual does not impose any restrictions on this.

[0113] It should be noted that the sample label refers to the actual answer that the question-answering model wants to output. That is, the sample label is the true result. The various reconstruction information of the training samples are input into the question-answering model. Based on the output scores, the predicted answer is the predicted result. When the difference between the predicted result and the true result is small enough, it means that the predicted result is close enough to the true result. At this time, the question-answering model is trained and can automatically answer the question. Based on the output scores, the corresponding correct answer can be accurately determined.

[0114] This manual describes a method to first acquire a large number of sample questions within the domain that the question-solving model needs to address. A domain-specific adjustment is then made to the pre-trained language layer obtained from the internet, enabling it to better analyze information within that domain. Next, based on a large number of labeled training samples within that domain, the pre-trained language layer and normalization layer are trained as a whole. By calculating the loss value, the difference between the model's predictions and the actual results can be visually shown. Targeted adjustments to the parameters of the pre-trained language layer and normalization layer in the question-solving model can effectively improve the training speed and effectiveness. Furthermore, this manual allows for the determination of the specific training status of the question-solving model based on the loss value. If training is unsuccessful, the parameters of the question-solving model can be adjusted in reverse based on the loss value to improve the model's problem-solving and analytical capabilities. This method boasts a high training speed and good training results.

[0115] Step 108: Based on the scores of each reconstruction information, determine the target matching information that matches the question to be answered among the at least two matching information.

[0116] It should be noted that the score of the reconstructed information can represent the probability that the reconstructed information is correct. By using the scores of each piece of reconstructed information, the probability that the corresponding information to be matched matches the question to be answered can be determined, that is, the probability that the information to be matched is the correct answer to the question to be answered. In other words, the target matching information refers to the correct answer to the question to be answered among at least two pieces of information to be matched.

[0117] In practical applications, the scores of each reconstructed piece of information can be sorted, and the top-ranked reconstructed pieces of information with preset values ​​are selected. The matching information corresponding to these top-ranked pieces of information is the target matching information for the question to be answered. Here, the preset value is a pre-set number of correct answers. For selecting only one target matching information, the preset value is 1; for selecting multiple target matching information, the preset value is the number of selectable target matching information. For example, for a single-choice question, the preset value is 1; for multiple-choice questions, the preset value can be the number of answers to be selected, such as 2.

[0118] Following the example above, Figure 2 This is a schematic diagram of an automatic solution processing flow provided in one embodiment of this specification, such as... Figure 2 As shown, after obtaining a pre-trained BERT model from the internet, the BERT model is trained with domain adaptation. Then, a normalization layer is added to the domain-adjusted BERT model to obtain a question-solving model. This question-solving model is then trained as a whole. After training, for the question to be solved, "Numbers divisible by 2 in natural numbers are ()," and the corresponding matching information, "A. Composite number, B. Prime number, C. Even number, D. Odd number," each matching information is combined with the question to be solved to form reconstructed information, resulting in the following four reconstructed information pieces.

[0119] Reconstructed information 1 is "composite numbers - all natural numbers divisible by 2 are composite numbers", reconstructed information 2 is "prime numbers - all natural numbers divisible by 2 are prime numbers", reconstructed information 3 is "even numbers - all natural numbers divisible by 2 are even numbers", and reconstructed information 4 is "odd numbers - all natural numbers divisible by 2 are odd numbers".

[0120] The four reconstructed pieces of information were simultaneously input into the question-answering model. The model output scores for Reconstructed Information 1 (0.01), Reconstructed Information 2 (0.03), Reconstructed Information 3 (0.91), and Reconstructed Information 4 (0.05). The scores of these four pieces of information were then sorted, and Reconstructed Information 3, with the highest score, was selected as the most correct answer. Since Reconstructed Information 3 is a combination of even-numbered pieces of information to be matched, the target matching information for the question is also an even-numbered piece of information; therefore, the even-numbered piece of information is the correct answer to the question.

[0121] In one optional implementation of this embodiment, since the unsolved problems in some fields may be purely computational, involving a large number of numbers, but the BERT model is not very sensitive to numbers, that is, the answers to purely computational problems determined by the problem-solving model based on the BERT model architecture may not be accurate, the solution results of the model can be further verified. That is, after determining the target matching information that matches the unsolved problem among the at least two matching information based on the scores of each reconstruction information, the method further includes:

[0122] Determine whether the question to be answered conforms to the preset character rules;

[0123] If the question to be solved conforms to the preset character rules, the function library is invoked, and the calculated answer to the question to be solved is obtained through the answer function corresponding to the question to be solved in the function library;

[0124] Determine whether the calculated answer and the target matching information are the same;

[0125] If they are not the same, the calculated answer is determined as the updated matching information for the question to be answered.

[0126] Specifically, the preset character rule can refer to the pre-set filtering rules for unanswered questions. Unanswered questions that meet the preset character rule can be answered by the corresponding answer function. For example, the preset character rule is that the proportion of numbers in the unanswered question is greater than the proportion threshold. The proportion threshold can be a pre-set value used to select whether there are too many numbers in the unanswered question.

[0127] It should be noted that if the question to be solved conforms to the preset character rules, it indicates that the number proportion in the question is relatively large, and the question may be a purely calculation-based problem. Therefore, a preset function library can be called, and the corresponding solution function in the library can be used to directly calculate the answer to the question. Then, this calculated answer is compared with the target matching information determined based on the question-solving model. If they are the same, it means that the target matching information determined based on the question-solving model is correct, and the target matching information does not need to be updated. If they are different, it means that the target matching information determined based on the question-solving model is incorrect, and the target matching information of the question to be solved can be updated to the calculated answer.

[0128] For example, the question to be answered is "Compare sizes: 6*7()41+3", and the corresponding matching information is "A, greater than, B, less than, C, equal to". Each matching information is combined with the question to form reconstructed information, resulting in reconstructed information 1 "Compare sizes: 6*7 greater than 41+3", reconstructed information 2 "Compare sizes: 6*7 less than 41+3", and reconstructed information 3 "Compare sizes: 6*7 equal to 41+3". Then, based on preset special characters, a filled reconstructed information 4 "Compare sizes: 6*7###41+3" is obtained. These four reconstructed information are input into the question-answering model, and the output scores for reconstructed information 1 are 0.30, 2 are 0.23, 3 are 0.27, and 4 are 0.20. Reconstructed information 1, with the highest score, is taken as the most correct answer. Since reconstructed information 1 is a combination of the matching information "greater than", the target matching information for the question is "greater than".

[0129] Then, assuming that the problem to be solved conforms to the preset character rules, it means that there are many numbers in the problem to be solved. At this time, we can determine that the solution function corresponding to the problem to be solved is: y = (a*b) - (c+d). Substituting the specific values ​​into the above solution function, we can calculate that y equals -2. Since the calculated result is negative, the answer to the problem to be solved is "less than".

[0130] Since the calculated answer determined by the solution function is different from the target matching information determined by the problem-solving model, it indicates that the target matching information determined by the problem-solving model is incorrect. At this time, the target matching information matching the question to be solved is updated from "greater than" to "less than", that is, the correct answer to the question to be solved is updated from "greater than" to "less than".

[0131] In one optional implementation of this embodiment, the reliability of the solution result of the problem-solving model can be estimated based on the scores of each reconstruction information, thereby determining whether to perform subsequent verification and update operations. That is, before determining whether the question to be solved conforms to the preset character rules, the method further includes:

[0132] Determine the score difference between the highest and lowest scores among the scores of each reconstructed piece of information;

[0133] Determine whether the score difference is greater than a difference threshold;

[0134] Accordingly, determining whether the question to be answered conforms to the preset character rules includes:

[0135] If the score difference is not greater than the difference threshold, then the operation step of determining whether the question to be answered conforms to the preset character rules is performed.

[0136] Specifically, the difference threshold can be a pre-set value used to determine whether the highest score among the various scores output by the problem-solving model is significantly higher than the other scores, that is, whether the score difference between the highest score and the lowest score is greater than the difference threshold.

[0137] It should be noted that if, after determining the correct answer for each question based on the question-solving model, the percentage of numerical values ​​needs to be determined to decide whether the target matching information determined by the question-solving model needs to be updated, the operation is quite cumbersome and may waste processing resources significantly. Normally, among the scores of various reconstruction information output by the question-solving model, the score of the reconstruction information corresponding to the target matching information should be significantly higher than the scores of other reconstruction information. If the scores are not significantly different, it indicates that the solution result of the question-solving model may be incorrect, and subsequent verification and updating processes can be performed.

[0138] In practical applications, if the score difference is greater than the difference threshold, it indicates that the highest score among the output scores of the question-solving model is significantly higher than the others. In this case, the question-solving model's analysis of the reconstructed information is relatively accurate, and no further verification or update operations are needed. If the score difference is not greater than the difference threshold, it indicates that the scores output by the question-solving model are relatively even, and the target matching information cannot be clearly determined. In this case, the question-solving model's analysis of the reconstructed information may be incorrect, and further verification and update operations are required. That is, only when it is determined that the score difference is not greater than the difference threshold should the operation step of determining whether the question to be answered conforms to the preset character rules be performed, thereby saving processing resources.

[0139] In practical applications, besides verifying the answers to questions conforming to preset character rules after determining the correct answer based on the question-solving model, one can also directly filter questions based on preset character rules after obtaining them. Questions conforming to the preset character rules can be directly processed through a solution function to determine the corresponding target matching information. For questions that do not conform to the preset character rules, the matching information and the question itself are reconstructed, and the target matching information is determined based on the question-solving model. This eliminates the need for the question-solving model to analyze and process questions it cannot accurately identify, significantly saving processing resources.

[0140] In an optional implementation of this embodiment, the target matching information for the question to be answered can be automatically determined through the question-answering model. Therefore, the answer information input by the user can also be automatically analyzed based on the target matching information. That is, after obtaining the question to be answered and at least two pieces of matching information, the method further includes:

[0141] Obtain the answer information for the question to be answered;

[0142] Accordingly, after determining the target matching information that matches the question to be answered among the at least two pieces of information to be matched, the method further includes:

[0143] The solution information and the target matching information are compared to determine the solution result of the question to be answered.

[0144] It should be noted that when obtaining the question to be answered and the corresponding matching information, the answer information of the user can also be obtained at the same time. After the target matching information of the question to be answered is automatically determined based on the question-answering model, the answer information and the target matching information can be compared to automatically determine whether the answer information of the user is correct and give the answer result of the question to be answered, thereby realizing the automated determination of the answer result and saving human resources.

[0145] The problem-solving method provided in this manual reconstructs the question and its corresponding matching information. Then, a problem-solving model performs semantic analysis and scoring on the reconstructed information. The scores of each reconstructed piece of information determine which is more correct, i.e., which matching information best matches the question. In this way, information reconstruction correctly handles the semantic relationship between the question and the matching information. By using deep learning methods to score the reconstructed information of each matching information, the target matching information—the correct answer to the question—is determined from at least two matching information pieces. Applying deep learning to the problem-solving process achieves high-precision automatic solutions, significantly improving the efficiency and accuracy of problem-solving.

[0146] Corresponding to the above method embodiments, this specification also provides embodiments of a problem-solving device. Figure 3 A schematic diagram of a problem-solving device according to an embodiment of this specification is shown. Figure 3 As shown, the device includes:

[0147] Module 302 is configured to retrieve the question to be answered and at least two corresponding matching information;

[0148] The component module 304 is configured to combine each piece of information to be matched with the question to be answered to form reconstructed information.

[0149] Module 306 is configured to input each reconstruction information into the problem-solving model and obtain a score for each reconstruction information.

[0150] The determination module 308 is configured to determine the target matching information that matches the question to be answered from among the at least two pieces of information to be matched, based on the scores of each piece of reconstructed information.

[0151] Optionally, component module 304 is further configured as follows:

[0152] For each piece of information to be matched, the information to be matched is filled into the missing position in the question to be answered, forming the reconstructed information of the information to be matched.

[0153] Optionally, component module 304 is further configured as follows:

[0154] The information to be matched is inserted before the unanswered question into which the information to be matched is entered, and a separator is set between the information to be matched and the unanswered question into which the information to be matched is entered.

[0155] Optionally, component module 304 is further configured as follows:

[0156] Determine whether the number of items to be matched is equal to a preset category threshold;

[0157] If the number of pieces of information to be matched is less than the preset category threshold, determine the value difference between the number of pieces of information to be matched and the preset category threshold;

[0158] The numerical preset special characters are combined with the question to be answered to form the numerical reconstructed information.

[0159] Optionally, the device further includes an update module configured to:

[0160] Determine whether the question to be answered conforms to the preset character rules;

[0161] If the question to be solved conforms to the preset character rules, the function library is invoked, and the calculated answer to the question to be solved is obtained through the answer function corresponding to the question to be solved in the function library;

[0162] Determine whether the calculated answer and the target matching information are the same;

[0163] If they are not the same, the calculated answer is determined as the updated matching information for the question to be answered.

[0164] Optionally, the update module is further configured to:

[0165] Determine the score difference between the highest and lowest scores among the scores of each reconstructed piece of information;

[0166] Determine whether the score difference is greater than a difference threshold;

[0167] If the score difference is not greater than the difference threshold, then the operation step of determining whether the question to be answered conforms to the preset character rules is performed.

[0168] Optionally, the acquisition module 302 is further configured as follows:

[0169] Obtain the answer information for the question to be answered;

[0170] Accordingly, the device also includes a solution module configured to:

[0171] The solution information and the target matching information are compared to determine the solution result of the question to be answered.

[0172] Optionally, module 306 is further configured to:

[0173] Each piece of reconstructed information is input into the pre-trained language layer of the question-answering model to obtain the semantic vector of each piece of reconstructed information.

[0174] The semantic vectors of each reconstructed piece of information are input into the normalization layer of the problem-solving model to obtain the score of each reconstructed piece of information.

[0175] Optionally, the device further includes a training module configured to:

[0176] Obtain a first training sample set, and iteratively train the pre-trained language layer of the question-answering model based on the first training sample set, adjusting the parameters of the pre-trained language layer until the training stopping condition is met, thereby obtaining the domain-adjusted pre-trained language layer.

[0177] Obtain a second training sample set. Based on the second training sample set and sample labels, iteratively train the pre-trained language layer and normalization layer of the question-answering model, adjusting the parameters of the pre-trained language layer and normalization layer until the training stopping condition is met, and obtain the trained question-answering model. The sample labels are the sample labels carried by each training sample in the second training sample set.

[0178] Optionally, each training sample in the second training sample set includes a question to be answered and at least two corresponding sample information to be matched, wherein the sample label carried by the training sample is the target sample matching information that matches the question to be answered among the at least two sample information to be matched; the training module is further configured to:

[0179] For the i-th training sample included in the second training sample set, the information of each unmatched sample in the i-th training sample is combined with the unanswered sample question to form sample reconstruction information, where i equals 1;

[0180] The reconstructed information of each sample is input into the question-answering model, and the predicted answer of the training sample is determined based on the output score.

[0181] Based on the predicted answer and the target sample matching information, the loss value of the question-answering model is calculated, and the parameters of the pre-trained language layer and normalization layer are adjusted in reverse.

[0182] Increment i by 1, and return to execute the operation steps for the i-th training sample included in the second training sample set, which combine the information of each unmatched sample of the training sample with the unanswered sample question to form sample reconstruction information, until the training stop condition is met.

[0183] The question-solving device provided in this manual can reconstruct the information between the question to be solved and the corresponding matching information. Then, a question-solving model performs semantic analysis and scoring on the reconstructed information. Based on the scores of each reconstructed piece of information, it can be determined which reconstructed information is more correct, that is, which matching information is more closely matched with the question to be solved. In this way, the semantic relationship between the question to be solved and the matching information is correctly handled through information reconstruction. By using deep learning methods to score the reconstructed information of each matching information, the target matching information that matches the question to be solved is determined from at least two matching information, that is, the correct answer to the question to be solved. By applying deep learning methods to the question-solving process, high-precision automatic solutions are achieved, which greatly improves the efficiency and accuracy of question solving.

[0184] The above is a schematic scheme of a question-answering device according to this embodiment. It should be noted that the technical solution of this question-answering device and the technical solution of the question-answering method described above belong to the same concept. For details not described in detail in the technical solution of the question-answering device, please refer to the description of the technical solution of the question-answering method described above.

[0185] Figure 4 A structural block diagram of a computing device 400 according to an embodiment of this specification is shown. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and a database 450 is used to store data.

[0186] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0187] In one embodiment of this specification, the aforementioned components of the computing device 400 and Figure 4 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 4 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0188] The computing device 400 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 400 can also be a mobile or stationary server.

[0189] The processor 420 is configured to execute the following computer-executable instructions to implement the following method:

[0190] Retrieve the unanswered question and at least two corresponding matching information;

[0191] The obtained information to be matched is combined with the question to be answered to form reconstructed information;

[0192] Input each piece of reconstruction information into the problem-solving model to obtain a score for each piece of reconstruction information;

[0193] Based on the scores of each reconstructed piece of information, the target matching information that matches the question to be answered is determined from the at least two pieces of information to be matched.

[0194] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the problem-solving method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the problem-solving method described above.

[0195] An embodiment of this specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used to implement the steps of any of the problem-solving methods described herein.

[0196] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the problem-solving method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the problem-solving method described above.

[0197] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0198] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0199] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this specification is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this specification. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this specification.

[0200] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0201] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. These embodiments have been selected and specifically described in this specification to better explain the principles and practical applications of this specification, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A problem-solving method, characterized in that, include: Retrieve the unanswered question and at least two corresponding matching information; The acquired information to be matched is combined with the question to be answered to form reconstructed information. The reconstructed information includes a first part and a second part. The first part includes information to fill the question to be answered with the information to be matched. The second part includes inserting the information to be matched before the question to be answered and setting a separator between the information to be matched and the question to be answered. Each reconstruction information is input into the question-answering model to obtain a score for each reconstruction information. The question-answering model includes a BERT model with a pre-trained language layer. Based on the scores of each reconstructed information, target matching information matching the unanswered question is determined from the at least two unanswered information. It is then determined whether the unanswered question conforms to a preset character rule. If the unanswered question conforms to the preset character rule, a function library is invoked, and the calculated answer to the unanswered question is obtained through the answer function corresponding to the unanswered question in the function library. It is then determined whether the calculated answer is the same as the target matching information. If they are not the same, the calculated answer is determined as the updated matching information for the unanswered question. The preset character rule includes the requirement that the proportion of numbers in the unanswered question is greater than a proportion threshold.

2. The problem-solving method according to claim 1, characterized in that, The step of combining each piece of information to be matched with the question to be answered to form reconstructed information includes: For each piece of information to be matched, the information to be matched is filled into the missing position in the question to be answered, forming the reconstructed information of the information to be matched.

3. The problem-solving method according to claim 1, characterized in that, After combining the acquired information to be matched with the question to be answered to form reconstructed information, the process further includes: Determine whether the number of items to be matched is equal to a preset category threshold; If the number of pieces of information to be matched is less than the preset category threshold, determine the value difference between the number of pieces of information to be matched and the preset category threshold; The numerical preset special characters are combined with the question to be answered to form the numerical reconstructed information.

4. The problem-solving method according to claim 1, characterized in that, Before determining whether the question to be answered conforms to the preset character rules, the method further includes: Determine the score difference between the highest and lowest scores among the scores of each reconstructed piece of information; Determine whether the score difference is greater than a difference threshold; Accordingly, determining whether the question to be answered conforms to the preset character rules includes: If the score difference is not greater than the difference threshold, then the operation step of determining whether the question to be answered conforms to the preset character rules is performed.

5. The problem-solving method according to any one of claims 1-3, characterized in that, After obtaining the question to be answered and at least two corresponding matching information, the process also includes: Obtain the answer information for the question to be answered; Accordingly, after determining the target matching information that matches the question to be answered among the at least two pieces of information to be matched, the method further includes: The solution information and the target matching information are compared to determine the solution result of the question to be answered.

6. The problem-solving method according to any one of claims 1-3, characterized in that, The step of inputting each piece of reconstruction information into the problem-solving model to obtain a score for each piece of reconstruction information includes: Each piece of reconstructed information is input into the pre-trained language layer of the question-answering model to obtain the semantic vector of each piece of reconstructed information. The semantic vectors of each reconstructed piece of information are input into the normalization layer of the problem-solving model to obtain the score of each reconstructed piece of information.

7. The problem-solving method according to any one of claims 1-3, characterized in that, The question-answering model was trained using the following method: Obtain a first training sample set, and iteratively train the pre-trained language layer of the question-answering model based on the first training sample set, adjusting the parameters of the pre-trained language layer until the training stopping condition is met, thereby obtaining the domain-adjusted pre-trained language layer. Obtain a second training sample set. Based on the second training sample set and sample labels, iteratively train the pre-trained language layer and normalization layer of the question-answering model, adjusting the parameters of the pre-trained language layer and normalization layer until the training stopping condition is met, and obtain the trained question-answering model. The sample labels are the sample labels carried by each training sample in the second training sample set.

8. The problem-solving method according to claim 7, characterized in that, Each training sample in the second training sample set includes a sample question to be answered and at least two corresponding sample information to be matched. The sample label carried by the training sample is the target sample matching information that matches the sample question to be answered among the at least two sample information to be matched. The step of iteratively training the pre-trained language layer and normalization layer of the question-answering model based on the second training sample set and sample labels, adjusting the parameters of the pre-trained language layer and normalization layer until the training stopping condition is met, includes: For the i-th training sample included in the second training sample set, the information of each unmatched sample in the i-th training sample is combined with the unanswered sample question to form sample reconstruction information, where i equals 1; The reconstructed information of each sample is input into the question-answering model, and the predicted answer of the training sample is determined based on the output score. Based on the predicted answer and the target sample matching information, the loss value of the question-answering model is calculated, and the parameters of the pre-trained language layer and normalization layer are adjusted in reverse. Increment i by 1, and return to execute the operation steps for the i-th training sample included in the second training sample set, which combine the information of each unmatched sample of the training sample with the unanswered sample question to form sample reconstruction information, until the training stop condition is met.

9. A question-answering device, characterized in that, include: The acquisition module is configured to acquire the question to be answered and at least two corresponding matching information; The component module is configured to combine the acquired information to be matched with the question to be answered to form reconstructed information. The reconstructed information includes a first part and a second part. The first part includes information to fill the information to be matched into the question to be answered. The second part includes inserting the information to be matched before the question to be answered and setting a separator between the information to be matched and the question to be answered. The acquisition module is configured to input each reconstruction information into the question-answering model to obtain a score for each reconstruction information, wherein the question-answering model includes a BERT model with a pre-trained language layer. The determination module is configured to determine, based on the scores of each reconstruction information, the target matching information that matches the unanswered question among the at least two matching information, determine whether the unanswered question conforms to a preset character rule, and if the unanswered question conforms to the preset character rule, call a function library to obtain the calculated answer to the unanswered question through the answer function corresponding to the unanswered question in the function library, determine whether the calculated answer is the same as the target matching information, and if they are not the same, determine the calculated answer as the updated matching information for the unanswered question, wherein the preset character rule includes the proportion of numbers in the unanswered question being greater than a proportion threshold.

10. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: Retrieve the unanswered question and at least two corresponding matching information; The acquired information to be matched is combined with the question to be answered to form reconstructed information. The reconstructed information includes a first part and a second part. The first part includes information to fill the question to be answered with the information to be matched. The second part includes inserting the information to be matched before the question to be answered and setting a separator between the information to be matched and the question to be answered. Each reconstruction information is input into the question-answering model to obtain a score for each reconstruction information. The question-answering model includes a BERT model with a pre-trained language layer. Based on the scores of each reconstructed information, target matching information matching the unanswered question is determined from the at least two unanswered information. It is then determined whether the unanswered question conforms to a preset character rule. If the unanswered question conforms to the preset character rule, a function library is invoked, and the calculated answer to the unanswered question is obtained through the answer function corresponding to the unanswered question in the function library. It is then determined whether the calculated answer is the same as the target matching information. If they are not the same, the calculated answer is determined as the updated matching information for the unanswered question. The preset character rule includes the requirement that the proportion of numbers in the unanswered question is greater than a proportion threshold.

11. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the problem-solving method according to any one of claims 1 to 8.