Application question solving knowledge generation method and device and application question solving robot

By performing sentence segmentation and noun recognition on the input text of the word problem and combining it with the knowledge base to match nouns to expand the knowledge, the problem of incomplete knowledge extraction in the existing technology is solved and the accuracy of the word problem solving system is improved.

CN114722166BActive Publication Date: 2025-10-17INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210147542.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2025-10-17
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

When solving mathematical word problems, existing technologies cannot fully reflect the meaning of the questions, resulting in incomplete knowledge extraction and affecting the problem-solving effect.

Method used

By obtaining the input text of the application question, dividing it into sentences and marking the sentence numbers, identifying the noun content, and using the pre-built knowledge base to match the noun content expansion knowledge, combined with the pre-trained network model to determine the question type classification information, generating noun content recognition and expansion knowledge.

Benefits of technology

The accuracy of the word problem solving system has been improved by generating more comprehensive noun content to expand knowledge and assist the problem solving system in answering word problems more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722166B_ABST
    Figure CN114722166B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, and robot for generating knowledge for solving applied problems, comprising: obtaining input text corresponding to a target applied problem input by a user; segmenting the input text into sentences and assigning a corresponding sentence number to each acquired text sentence; obtaining the noun content associated with each text sentence to form noun content recognition knowledge; and matching noun content extension knowledge associated with the input text from a pre-constructed knowledge base based on the noun content associated with each text sentence and its corresponding sentence number. The method, device, and robot for generating knowledge for solving applied problems provided by the present invention can generate noun content extension knowledge that is not contained in the applied problem itself but is of great value in solving the problem, thereby more effectively assisting the development of various systems related to applied problems and improving the accuracy of problem solving in various systems to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a method and device for generating application problem solving knowledge and an application problem solving robot. BACKGROUND

[0002] Automatic solving of mathematical application problems, especially elementary mathematical application problems (including primary, junior high school and high school levels), is an important application point of artificial intelligence technology, and many academic researches and practical products have developed automatic solving systems.

[0003] Solving mathematical application problems (hereinafter referred to as application problems or problems) requires extracting knowledge related to the problem. The extraction result of the knowledge has a very important influence on the solving effect.

[0004] At present, the extraction of knowledge related to the problem is mainly through the analysis of the problem to extract the noun content contained in the problem itself, etc., but these knowledge cannot fully reflect the meaning of the problem itself.

[0005] Therefore, how to generate relevant knowledge according to the input problem is a very valuable research problem. SUMMARY

[0006] The present application provides a method and device for generating application problem solving knowledge and an application problem solving robot to solve the defect that the extraction of knowledge related to the application problem is not comprehensive in the prior art, and by extracting the noun content extension knowledge related to the application problem and combining the noun content recognition knowledge obtained by the conventional method to form the application problem solving knowledge, the true meaning of the application problem can be more accurately expressed, thereby the development and application of the automatic solving system of the application problem can be more accurately assisted.

[0007] In a first aspect, the present application provides a method for generating application problem solving knowledge, wherein the application problem solving knowledge includes noun content recognition knowledge and noun content extension knowledge, and specifically includes:

[0008] Obtaining input text corresponding to a target application problem input by a user;

[0009] Dividing the input text into sentences, and setting a corresponding sentence number for each obtained text sentence;

[0010] Obtaining noun content related to each text sentence to form the noun content recognition knowledge;

[0011] According to the noun content related to each text sentence and the corresponding sentence number thereof, matching the noun content extension knowledge related to the input text from a pre-constructed knowledge base.

[0012] The application further provides a generation method of application problem solving knowledge.

[0013] The similarity between the input text and the text sample corresponding to each sample application problem in the knowledge base is determined to determine the type classification information of the target application problem.

[0014] Each sample application problem in the knowledge base is pre-labeled with type classification information labels.

[0015] The application problem solving knowledge further comprises type classification information.

[0016] The application further provides a generation method of application problem solving knowledge.

[0017] The input text is input into a pre-trained network model to obtain a target feature vector output by the pre-trained network model, and a feature vector sample corresponding to each text sample is determined based on the pre-trained network model.

[0018] The cosine similarity between the target feature vector and each feature vector sample is calculated respectively, and the feature vector samples are sorted in descending order of the cosine similarity to obtain k text samples corresponding to the k feature vector samples with higher ranking.

[0019] The type classification information of the input text is determined according to the highest frequency type classification information label in the type classification information labels corresponding to the k text samples.

[0020] The application further provides a generation method of application problem solving knowledge.

[0021] A plurality of sample application problems are collected, and a text sample corresponding to each sample application problem is obtained to construct the knowledge base.

[0022] Each text sample is classified based on a supervised algorithm to label type classification information labels for each sample application problem corresponding to each text sample.

[0023] Each text sample is segmented, each obtained text sample segment is set with a corresponding sentence number, and the noun content related to each text sample segment is determined.

[0024] According to the application, a generation method of application problem solving knowledge is provided, the related noun content of each text sentence is obtained, and the noun content recognition knowledge is constructed

[0025] The word segmentation, part-of-speech tagging and named entity recognition are sequentially performed on each text sentence to extract the related noun and named entity of each text sentence as the first initial noun content of each text sentence.

[0026] Based on the pre-set heuristic rules, the related noun and named entity of each text sentence are extracted from each text sentence again as the second initial noun content of each text sentence.

[0027] The related noun content of each text sentence is determined according to the first initial noun content and the second initial noun content, and the noun content recognition knowledge is constructed by the related noun content of all text sentences.

[0028] According to the application, a generation method of application problem solving knowledge is provided, the pre-set heuristic rules include:

[0029] The first rule sets the content enclosed by quotation marks in the text sentence as a noun or a named entity.

[0030] The second rule sets the content enclosed by book title marks in the text sentence as a noun or a named entity.

[0031] The third rule sets the content separated by a comma in the text sentence as a noun or a named entity.

[0032] The fourth rule combines a plurality of nouns in the text sentence into a noun phrase, and sets the noun phrase as a noun or a named entity.

[0033] The fifth rule sets the content matched from the knowledge base according to the text sentence as the related noun and named entity of the text sentence based on the type classification information tag of the sample application problem to which the text sentence belongs.

[0034] According to the application, a generation method of application problem solving knowledge is provided, the related noun content of each text sentence includes the related noun and named entity of the text sentence, and the related noun and named entity of each text sentence have the same sentence number.

[0035] The related noun content of the input text is matched from the pre-constructed knowledge base according to the related noun content of each text sentence and the corresponding sentence number, and the matched noun content expansion knowledge includes:

[0036] Traverse the noun and named entity with the same sentence number, and combine two by two, and use all the combined words obtained after combination to match the first hit result related to each of the combined words from the knowledge base, and enter into the result set;

[0037] Traverse all nouns or named entities, and match the second hit result related to each of the nouns or named entities from the knowledge base, and enter into the result set;

[0038] After de-duplication processing of all contents in the result set, the noun content expansion knowledge is obtained.

[0039] According to the application, a generation method of application problem solving knowledge is provided, which uses all nouns or named entities to match the second hit result related to each of the nouns or named entities from the knowledge base, and enters into the result set, including:

[0040] If the second hit result is matched from the knowledge base by using any noun or named entity, the second hit result is entered into the result set;

[0041] If the second hit result cannot be matched from the knowledge base by using the any noun or named entity, the any noun or named entity is entered into the pending set;

[0042] Based on the last maximum matching method, the result matched from the knowledge base by using all contents in the pending set is entered into the result set.

[0043] In a second aspect, the application further provides a generation device of application problem solving knowledge, which includes noun content recognition knowledge and noun content expansion knowledge, and includes:

[0044] A text receiving module is configured to obtain input text corresponding to a target application problem input by a user;

[0045] A text preprocessing module is configured to divide the input text into text sentences, and set a corresponding sentence number for each text sentence obtained;

[0046] A noun content recognition module is configured to obtain noun content related to each text sentence, and form the noun content recognition knowledge;

[0047] A noun content expansion module is configured to match noun content expansion knowledge related to the input text from a pre-constructed knowledge base according to the noun content related to each text sentence and the corresponding sentence number thereof.

[0048] In a third aspect, the present application provides an application question solving robot, comprising an application question solving robot body, a reading unit and an output unit are arranged in the application question solving robot body;

[0049] Further comprising a memory and a program or instruction stored on the memory and executable on the processor;

[0050] The reading unit reads a target application question, so that the program or instruction is executed by the processor to obtain application question solving knowledge output via the output unit;

[0051] The application question solving knowledge is obtained based on any one of the application question solving knowledge generation methods.

[0052] In a fourth aspect, the present application provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor executes the program to realize any one of the application question solving knowledge generation methods.

[0053] In a fifth aspect, the present application further provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize any one of the application question solving knowledge generation methods.

[0054] The application question solving knowledge generation method, device and application question solving robot provided by the present application can generate the knowledge of the expansion of the name of the application question itself which is not contained but has great value for solving the problem, so as to more effectively assist the development of various systems related to the application question, and improve the solving accuracy of various systems to a certain extent. BRIEF DESCRIPTION OF DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the present application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0056] Figure 1 is one of the flowcharts of the application question solving knowledge generation method provided by the present application;

[0057] Figure 2 is the second flowchart of the application question solving knowledge generation method provided by the present application;

[0058] Figure 3 is the flowchart of the application question classification provided by the present application;

[0059] Figure 4Is the flowchart of acquiring noun content recognition knowledge provided by the application;

[0060] Figure 5 Is the flowchart of acquiring noun content expansion knowledge provided by the application;

[0061] Figure 6 Is the structural schematic diagram of the generating device of application problem solving knowledge provided by the application;

[0062] Figure 7 Is the structural schematic diagram of the electronic device provided by the application. DETAILED DESCRIPTION

[0063] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0064] It should be noted that, in the description of the embodiments of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "comprises a" does not exclude the presence of another identical element in the process, method, article or device comprising the element. The terms "upper", "lower" and the like indicate the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise specified and limited, the terms "mount", "connect", "connect" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0065] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a class, not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the objects before and after are in an "or" relationship.

[0066] Solving application problems requires knowledge related to the topic of the application problem, part of which is contained in the topic itself and can be obtained by analyzing the topic, and part of which is not in the topic and needs to be obtained from external knowledge resources. Obtaining knowledge related to the topic from external knowledge resources also has a very important influence on the solving effect. Therefore, how to generate application problem solving knowledge according to the target application problem input by the user is a very valuable research problem.

[0067] For the same application problem, there can be different solutions. The first type is the more typical method, which mainly uses the formula to solve the problem, finds the parameters involved in the formula, and finally calculates the result by using the formula. This method is more traditional and similar to the thinking of each person solving the problem. The second type is the "end-to-end" method that has appeared in the field of artificial intelligence in recent years, that is, given the input to the network model, the output is directly given through the operation of the network model, that is, the solution result. This is a more novel method.

[0068] The application problem solving knowledge generation method provided by the present application is suitable for both the above two solving methods.

[0069] In particular, since the second type of method has a small demand for explicit knowledge, but the application problem solving knowledge obtained by using the present application as input contains the noun content expansion knowledge obtained from external knowledge resources, which is equivalent to providing more accurate information, so it is also helpful for the output of the correct solving result.

[0070] The following will be described by listing an application problem example:

[0071] Suppose the topic of the target application problem is: On New Year's Day, a certain interlocking supermarket flagship store launched a shopping activity that can draw two small balls (the total number of small balls in the draw box is 5, each small ball is completely the same in size and shape, there are 2 black balls (numbered 1, 2), and 3 red balls (numbered 3, 4, 5)) from the draw box at one time.

[0072] The target application question is: (1) list all possible combinations of the two balls drawn; (2) given that the supermarket rules that drawing two black balls is a first prize and drawing two red balls is a second prize, please solve the probability of winning the first prize and the second prize respectively.

[0073] The solution to the target application question:

[0074] First, this question has two problems, and the second question uses the results of the first question.

[0075] Second, question (1) is to solve the number of basic events, and the combination formula is used to solve it. There are three key points to solve question (1):

[0076] (A) Determine that this problem belongs to the counting principle category;

[0077] (B) Find the two key parameter values in the question: the total number of elements "5" and the number of selected elements "2";

[0078] (C) Determine that the combination formula is used to solve the problem.

[0079] Therefore, the final solution is: there are 10 kinds of possibilities when drawing 2 balls from 5 balls.

[0080] Further, question (2) is to solve the probability of event occurrence, and the classical probability calculation formula is used to solve it. Compared with question (1), the solution of question (2) is more complex because it involves an additional calculation. Therefore, the key points to solve question (2) are as follows:

[0081] (A) Determine that this question belongs to the probability category;

[0082] (B) Find the conditions (2 black balls and 2 red balls) of the two events (first prize and second prize);

[0083] (C) Determine that the classical probability calculation formula is used to solve it;

[0084] (D) Calculate the values of the two key parameters of the classical probability formula: the number of basic events included in the event P and the total number of basic events according to the information in the question.

[0085] Since there are two events (first prize and second prize) in question (2), the first prize includes one basic event (drawing two black balls), and the second prize includes three basic events (drawing red balls 3 and 4, drawing red balls 4 and 5, and drawing red balls 3 and 5).

[0086] Therefore, the final problem solving result is: the first prize probability = m / n = 1 / 10, the second prize probability = m / n = 3 / 10. Wherein, m is the number of basic events contained in P, n is the total number of basic events.

[0087] Based on the above analysis, it can be known that before solving the application problem, the relevant problem solving knowledge of the application problem needs to be extracted in advance, so as to provide a basis for accurate answer in the later period.

[0088] The application problem solving knowledge generation method, device and application problem solving robot provided by the embodiment of the application will be described below. Figures 1-7 The application problem solving knowledge generation method, device and application problem solving robot provided by the embodiment of the application will be described below.

[0089] Figure 1 It is one of the flowcharts of the application problem solving knowledge generation method provided by the application, as shown in Figure 1 The steps include but are not limited to the following steps:

[0090] Step 101: acquiring input text corresponding to the target application problem input by the user.

[0091] The user can input the target application problem to be solved by using screenshot, voice or directly using text. In the case that the user inputs the target application problem by using input screenshot and voice, the input text can be generated by using the currently more mature software and the Optical Character Recognition (OCR) method to recognize the text information in the screenshot; or the input text can be generated by using the related file of voice to text, and the application does not make specific limitation on this.

[0092] Step 102: dividing the input text into sentences, and setting a corresponding sentence number for each text sentence obtained.

[0093] The input text can be divided into sentences according to the positions of punctuation marks such as comma, semicolon and period, or the Python can be used to divide the input text into sentences to obtain a plurality of text sentences generated after the division of each input text.

[0094] In this embodiment, each text sentence generated after the division of an input text is marked with a unique sentence number, and the marking method can use a pure number method or a combination of letters and numbers, for example, each sentence number is set to any number in 0001-9999.

[0095] Step 103: acquiring the noun content related to each text sentence, and constructing the noun content recognition knowledge.

[0096] After analyzing the problem solving process of a large number of application problems, it is found that the information required for problem solving is usually contained in the nominal content. Among them, the nominal content mainly includes named entities and nouns, for example: in the above application problem example "chain supermarket flagship store, New Year's Day, prize box, small ball, number, first prize, second prize, black ball, red ball…etc." can be regarded as nominal content. In view of this, the present application can extract the nominal content (a set composed of named entities and / or nouns) contained in each text sentence, and finally integrate the nominal content corresponding to all text sentences obtained after processing the target application problem to obtain the nominal content recognition knowledge.

[0097] Step 104: According to the nominal content related to each text sentence and the corresponding sentence number, the nominal content extension knowledge related to the input text is matched from the pre-constructed knowledge base.

[0098] The purpose of this step is to expand the knowledge of the nominal content involved after extracting the nominal content recognition knowledge from the input text corresponding to the target application problem, so as to better serve the subsequent operation of the application problem solving system and realize the correct solution to the target application problem.

[0099] Specifically, according to the sentence number of each text sentence related to the nominal content, each content related to the nominal content is matched from the pre-constructed knowledge base. Each content in the knowledge base also has a pre-set sentence number. The purpose of labeling a unique sentence number for each text sentence related to the nominal content is to match the relevant content quickly and accurately according to the sentence number and the sentence number of each content in the knowledge base when expanding the knowledge base.

[0100] After expanding the knowledge base to expand each nominal content, all the obtained contents are used as nominal content extension knowledge.

[0101] Finally, the nominal content recognition knowledge obtained by step 103 and the nominal content extension knowledge obtained by step 104 are jointly constructed into application problem solving knowledge for solving the target application problem.

[0102] The application problem solving knowledge generation method provided by the present application can generate nominal content extension knowledge that is not contained in the application problem itself but has great value for problem solving, so as to more effectively assist the development of various systems related to application problems, and improve the problem solving accuracy of various systems to a certain extent.

[0103] Based on the content of the above embodiment, as an optional embodiment, the application problem solving knowledge generation method provided by the present application further comprises:

[0104] determining similarity between the input text and text samples corresponding to each sample application question in the knowledge base to determine the type classification information of the target application question.

[0105] Each of the sample application questions in the knowledge base is pre-labeled with type classification information tags; the application question solving knowledge further includes question classification information.

[0106] Figure 2 is a flowchart of the application question solving knowledge generation method provided by the application, as an optional embodiment, as shown in Figure 2 The analysis of the application question is divided into three steps:

[0107] Step 1, classifying the input target application question;

[0108] Step 2, performing noun content extraction on the input text related to the target application question to obtain noun content recognition knowledge;

[0109] Step 3, according to the noun content output in step 2, respectively matching the corresponding extended content for each noun content from the pre-constructed knowledge base to generate noun content extension knowledge.

[0110] The noun content recognition knowledge and the noun content extension knowledge obtained from steps 2 and 3 together constitute the application question solving knowledge for solving the target application question, which provides a basis for solving it later.

[0111] Further, the above-mentioned classification of the target application question refers to determining the type classification information corresponding to the target application question. Generally, the type classification information mainly includes two levels:

[0112] The first level is the knowledge theme, such as "probability", "trigonometric function", "analytic geometry", etc. The second level is the type of the target application question (hereinafter referred to as the type), for example, the application question belonging to the "probability" theme can be further divided into "with replacement extraction", "without replacement extraction", "binomial distribution", etc.

[0113] The above example in the above embodiment includes 2 problems, problem (1) is a "permutation and combination - selection problem", and problem (2) is a "probability - without replacement extraction problem".

[0114] Considering that the acquisition of noun content extension knowledge is based on the pre-constructed knowledge base, it is necessary to introduce the content related to the knowledge base.

[0115] Generally, the pre-constructed knowledge base mainly includes noun content recognition applied to all sample application questions, and the obtained noun content knowledge can be divided into two categories: mathematical knowledge and common sense knowledge, which can specifically include the following contents:

[0116] The mathematical knowledge mainly includes the following two categories: 1) the related knowledge of knowledge theme, knowledge point and knowledge concept and the subordinate relationship among them, for example, "probability-includes-classical probability model, classical probability model calculation formula-specific content-P(A)=n / m, classical probability model-includes-basic event, etc." 2) knowledge theme-question type, for example, "probability-{with replacement, without replacement, binomial distribution, conditional probability, assignment problem, normal distribution, sequence experiment}".

[0117] The common sense knowledge mainly includes the following categories: 1) the superordinate-subordinate type knowledge, for example, "lottery box-is a-kind of-container"; 2) the numerical type knowledge, for example, "chicken-number of feet-2"; 3) the state type knowledge, for example, "traffic light-{red light, yellow light, green light}"; 4) the homonym type knowledge, for example, "small ball-{red ball, black ball, white ball, yellow ball}"; 5) the attribute type knowledge, for example, "container-holds-enumerated objects".

[0118] In the application question solving knowledge generation method provided by the application, each sample application question in the knowledge base is pre-labeled with a question type classification information tag.

[0119] It should be noted that after determining the question type classification information of the target application question, it has important value for the realization of subsequent specific functions (such as problem solving). For example, after determining the question type classification information of the target application question, the question type classification information tag pre-labeled with each sample application question in the knowledge base can be matched, and the noun content related to the target application question can be quickly extracted from the knowledge base.

[0120] The classification of the input target application question is mainly to classify the target application question according to "knowledge theme-question type", that is, to determine the question type classification information of the target application question, so as to classify the target application question into the corresponding category, which is mainly realized by using a pre-trained network model (such as a KNN classification model).

[0121] The KNN classification model is created based on a classic classification algorithm, and its characteristics are very suitable for the application question classification task, especially the elementary mathematics application question classification task, and the main reasons are as follows:

[0122] Firstly, the category of the application question classification task is limited, and a data set covering all categories can be constructed as a classification basis.

[0123] Secondly, while the specific descriptions of the questions can vary, the key content is limited, and the commonly used descriptive terms are also limited. For example, in the example questions provided in the above embodiment, although the objects drawn can be changed arbitrarily (for example, from "balls" to "cards"), the main basis for classification is limited ("probability" or "all possibilities").

[0124] During implementation, the KNN classification model calculates the similarity between the input text and each text sample in the knowledge base, and determines the category of the input text based on the overall similarity (that is, determines the question type classification information of the target application question).

[0125] It should be noted that the present invention has made corresponding improvements to the KNN classification model based on the actual application scenario of word problem classification. The specific classification steps include:

[0126] Step 1: Use a pre-trained model (such as the BERT model) to map the input text and all text samples in the knowledge base to the same low-dimensional vector space, obtain the feature vector corresponding to each text, record the feature vector corresponding to the input text as the target feature vector, and record the feature vector corresponding to each text sample as the feature vector sample.

[0127] Step 2: Using the cosine similarity calculation method, the similarity between the target feature vector associated with the input text and the feature vector sample associated with each text sample in the knowledge base is calculated.

[0128] Step 3: Select the k samples with the highest similarity between all text samples in the knowledge base and the input text, and take the category label with the highest frequency among the category labels corresponding to these k samples as the category of the input text. This category information can be used as the question type classification information of the target application question.

[0129] Based on the content of the above embodiment, as an optional embodiment, before determining the similarity between the input text and the text samples corresponding to the sample application questions in the knowledge base, the method further includes:

[0130] Collecting a plurality of sample word problems and obtaining a text sample corresponding to each of the sample word problems to construct the knowledge base;

[0131] Classifying each of the text samples based on a supervised algorithm to label the sample application question corresponding to each of the text samples with a question type classification information label;

[0132] Each of the text samples is divided into sentences, and a corresponding sentence number is set for each obtained text sample sentence, and the noun content related to each text sample sentence is determined.

[0133] Figure 3 It is a flow chart of the classification of application questions provided by the present invention, such asFigure 3 As shown, before the target application question is classified, a pre-constructed knowledge base is also needed, so that when the question is classified, the text samples in the knowledge base can be used as a reference to accurately and quickly classify the target application question.

[0134] It should be noted that the knowledge base includes a plurality of sample application questions, each sample application question includes a question type classification information label, i.e., a "topic-question type" label; and each sample application question has a pre-determined corresponding nominal content annotation result, i.e., the nominal content of the text sample sentence related to each text sample is pre-determined.

[0135] The construction points of the knowledge base mainly include two aspects:

[0136] First, various knowledge topics and various question types of application questions should be covered;

[0137] Second, as many application questions as possible in different scenarios and different descriptions should be included.

[0138] On the basis of meeting the above two points, the larger the size of the knowledge base is, the better, and an empirical number is that when the knowledge base includes about 3000 sample application questions, the basic requirements can be met.

[0139] The application provides a method for creating a knowledge base, which can be in a man-machine fusion manner, mainly including but not limited to the following steps:

[0140] Step 1: using a supervised algorithm to pre-classify the knowledge base, for example, Naive Bayes, to label the question type classification information label for each sample application question.

[0141] Step 2: manually checking the result of the above pre-classification, i.e., using a manual method to determine whether the question type classification information label automatically labeled for each sample application question is correct.

[0142] Step 3: dividing the text sample of each sample application question in the knowledge base into sentences and labeling the nominal content of each text sample sentence.

[0143] Finally, the question type classification information label and the nominal content related to each sample application question are integrated to construct the knowledge base.

[0144] The application provides an application question solving knowledge generation method, which constructs a knowledge base and pre-determines the question type classification information label and the nominal content related to each sample application question in the knowledge base, to provide data support for subsequent extraction of application question solving knowledge of the target application question and actual solution of the target application question using the knowledge base.

[0145] Based on the content of the above embodiment, as an optional embodiment, the obtaining of the noun content related to each of the text sentences, constituting the noun content recognition knowledge, comprises

[0146] Respectively, the word segmentation, the part-of-speech tagging and the named entity recognition are sequentially performed on each of the text sentences to extract the noun and the named entity related to each of the text sentences as the first initial noun content related to each of the text sentences.

[0147] Based on the pre-set heuristic rules, the noun and the named entity related to each of the text sentences are extracted again from each of the text sentences as the second initial noun content related to each of the text sentences.

[0148] According to the first initial noun content and the second initial noun content, the noun content related to each of the text sentences is determined, and the noun content related to all of the text sentences is constructed into the noun content recognition knowledge.

[0149] Figure 4 is the flowchart of the method for obtaining the noun content recognition knowledge provided by the present application, as shown in Figure 4 The present application is to process the input text corresponding to the target application question input by the user to obtain the noun content recognition knowledge (i.e. the set of the noun content related to each of the text sentences), and the specific steps include but are not limited to:

[0150] Step 1, the input text is segmented into sentences, and each text sentence is labeled with a unique sentence number.

[0151] Step 2, the word segmentation is performed on each of the text sentences, and the part-of-speech of each word (such as noun, verb, preposition, etc.) is labeled, and the named entity is selected from all the words. Through the above operation, the noun and the named entity related to each of the text sentences can be extracted. In order to distinguish the extracted noun and the named entity in this process, the extracted noun and the named entity are uniformly regarded as the first initial noun content, and are added to the noun content recognition knowledge, and the sentence number of each text sentence is regarded as the sentence number of each of the first initial noun content.

[0152] Step 3, the heuristic rules are used to process each of the text sentences again, and the second initial noun content obtained is supplemented to the noun content recognition knowledge, and the sentence number of each text sentence is regarded as the sentence number of each of the second initial noun content.

[0153] After the screening of the two different manners of the above-mentioned step 2 and step 3, the first initial nominal content and the second initial nominal content obtained respectively are taken as the nominal content of each text sentence. Finally, the nominal content of the input text is constituted by the nominal content of all text sentences.

[0154] Based on the content of the above-mentioned embodiment, as an optional embodiment, the pre-set heuristic rule includes:

[0155] The first rule sets the content enclosed by quotation marks in the text sentence as a noun or a named entity.

[0156] The second rule sets the content enclosed by book marks in the text sentence as a noun or a named entity.

[0157] The third rule sets the content separated by a comma in the text sentence as a noun or a named entity.

[0158] The fourth rule combines a plurality of nouns in the text sentence into a noun phrase, and sets the noun phrase as a noun or a named entity.

[0159] The fifth rule sets the content matched from the knowledge base according to the text sentence as the noun and the named entity related to the text sentence based on the type classification information tag of the sample application question to which the text sentence belongs.

[0160] It should be noted that the above-mentioned first rule to the fifth rule are independent of each other, that is, the nouns and the named entities in the text sentence are extracted by the above-mentioned five rules respectively, and finally the collection of all the extracted nominal contents is taken as the nominal content of the text sentence after deduplication.

[0161] As an optional embodiment, the nominal content related to each text sentence mentioned in the present application includes the noun and the named entity related to the text sentence (not simplified description, the present application does not consider the case that a text sentence may only have a noun or only have a named entity), and each noun and named entity related to the text sentence has the same sentence number.

[0162] Further, according to the nominal content related to each text sentence and the corresponding sentence number, the nominal content extension knowledge related to the input text is matched from the pre-constructed knowledge base, including:

[0163] All the combined words obtained after combination are used to match the first hit result related to each combined word from the knowledge base, and the first hit result is classified into a result set.

[0164] traversing all the nouns or named entities, respectively matching second hit results related to each of the nouns or named entities from the knowledge base, and incorporating into the result set;

[0165] after deduplication of all contents in the result set, as the noun content expansion knowledge.

[0166] The biggest improvement of the present application over the prior art is that it can accurately mine noun content expansion knowledge that the target application itself does not have. The specific implementation steps include but are not limited to:

[0167] Step 1, pairwise query: considering that the contents in the same text sentence usually have strong relevance, and such relevance has a higher possibility of value for subsequent application questions. In view of this, the present application identifies according to sentence number to combine the noun contents originating from the same text sentence in pairs, so that all the nouns and named entities in the same text sentence can be combined into multiple combination words. Then, each combination word is used to perform a matching query from the knowledge base, and the obtained results (referred to as first hit results for ease of distinction) are incorporated into the result set.

[0168] Step 2, single query: the present application also uses all the nouns and named entities related to each text sentence to perform a matching query from the knowledge base individually, and the obtained results (referred to as second hit results for ease of distinction) are also incorporated into the result set.

[0169] Finally, the first hit results and the second hit results related to each text sentence are combined and deduplicated to serve as the noun content expansion knowledge of the text sentence

[0170] Figure 5 is a flowchart of the present application for obtaining noun content expansion knowledge, as an optional embodiment, as shown in Figure 5 the use of all nouns or named entities, respectively matching second hit results related to each of the nouns or named entities from the knowledge base, and incorporating into the result set, includes:

[0171] If a second hit result is matched from the knowledge base using any noun or named entity, the second hit result is incorporated into the result set;

[0172] If a second hit result cannot be matched from the knowledge base using the any noun or named entity, the any noun or named entity is incorporated into the pending set;

[0173] Based on the latter maximum matching method, the results matched from the knowledge base using all contents in the pending set are incorporated into the result set.

[0174] Since in the case of adopting the way of single query to match the nominal content from the knowledge base, there may be a part of the nouns and named entities that cannot be matched from the knowledge base (referred to as a miss), for this part of the nouns and named entities, on the basis of the above step 1, the step of extracting the knowledge of the expansion of the nominal content can also include:

[0175] In step 2, if any noun or named entity can match the result from the knowledge base (i.e. the second hit result), the second hit result is included in the result set; if any noun or named entity cannot match the result from the knowledge base, the any noun or named entity is recorded in a pending set.

[0176] Further, in step 3, all nouns or named entities in the pending set are matched with the entries in the knowledge base by using the last maximum matching method, and the matched results are recorded in the form of "nominal content<->is a kind of<->hit entry name" in the result set.

[0177] For example, there is "black ball" in a text segment of the input text, and there is "ball" in the knowledge base, then "black ball<->is a kind of<->ball" is recorded in the result set.

[0178] Step 4, all results in the final obtained result set are de-duplicated, and the de-duplicated result set is returned as the knowledge of the expansion of the nominal content.

[0179] It should be noted that for the pending set, after step 3 is performed, there may still be a part of the content that does not hit the content in the knowledge base, and all this part of the content is retained in the pending set, which can be processed accordingly by subsequent services.

[0180] For example, if subsequent problem solving is to be done, the results in the pending set can be directly returned. If subsequent expansion of the knowledge base is desired, the results in the pending set can be further annotated and processed.

[0181] Finally, the following points need to be supplemented:

[0182] 1. For the application problems with multiple small problems, the present application constructs the input text separately for the stem and different small problems, and performs text classification processing.

[0183] For example, in the example provided in the above embodiment, question (1) is to solve the number of basic events, and the corresponding text classification result is "permutation and combination - selection question"; question (2) is to solve the probability of event occurrence, and the corresponding text classification result is "probability - non-replacement extraction question". Correspondingly, the different classification results obtained for the two questions need to be analyzed separately when solving the application questions.

[0184] 2. In the acquisition process of the noun content recognition knowledge, the input text of the entire application question can be processed as a whole instead of constructing separate texts according to whether the application question has multiple sub-questions.

[0185] 3. In the acquisition process of the noun content extension knowledge, the input text of the entire application question can be processed as a whole instead of constructing separate texts according to whether the application question has multiple sub-questions.

[0186] Still taking the above example as an example, the final noun content recognition knowledge obtained by using the application question solving knowledge generation method provided by the application includes: interlocking supermarket flagship store, New Year's Day, lottery activity, lottery box, small ball, large and small shape, black ball, number, 1, 2, red ball, 3, 4, 5, number combination, possible result, the supermarket, first prize, second prize, and probability.

[0187] Correspondingly, the noun content extension knowledge obtained mainly includes:

[0188] Lottery box <-> is a kind of container;

[0189] Lottery box contains small balls;

[0190] Black ball <-> is a kind of small ball;

[0191] Red ball <-> is a kind of small ball;

[0192] Black ball <-> parallel homology <-> red ball;

[0193] First prize <-> parallel homology <-> second prize.

[0194] Finally, through the above processing process, the application question solving knowledge related to each user input target application question can be obtained by the application, and sent to a subsequent server for problem solving.

[0195] Figure 6 is a structural schematic diagram of the application question solving knowledge generation device provided by the application, like Figure 6As shown, on the basis of the above application question solving knowledge including noun content recognition knowledge and noun content expansion knowledge, the application question solving knowledge generation device mainly comprises a text receiving module 61, a text preprocessing module 62, a noun content recognition module 63 and a noun content expansion module 64.

[0196] The text receiving module 61 is mainly used for acquiring input text corresponding to the target application question input by the user.

[0197] The text preprocessing module 62 is mainly used for segmenting the input text and setting a corresponding sentence number for each text segment acquired.

[0198] The noun content recognition module 63 is mainly used for acquiring noun content related to each text segment to constitute the noun content recognition knowledge.

[0199] The noun content expansion module 64 is mainly used for matching noun content expansion knowledge related to the input text from a pre-constructed knowledge base according to the noun content related to each text segment and the corresponding sentence number thereof.

[0200] It should be noted that the application question solving knowledge generation device provided by the embodiment of the present application can execute the application question solving knowledge generation method of any one of the above-mentioned embodiments in the specific operation, and the embodiment of the present application will not be repeated.

[0201] The application question solving knowledge generation device provided by the present application can generate noun content expansion knowledge which is not contained in the application question itself but is very valuable for solving the question, so as to more effectively assist the development of various systems related to the application question, and can improve the solving accuracy of various systems to a certain extent.

[0202] Figure 7 is a structural schematic diagram of an electronic device provided by the present application, like Figure 7As shown, the electronic device can include a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 complete mutual communication through the communications bus 740. The processor 710 can invoke a logical instruction in the memory 730 to execute the application problem solving knowledge generation method, which includes: obtaining input text corresponding to a target application problem input by a user; performing sentence segmentation on the input text, and setting a corresponding sentence number for each text sentence obtained; obtaining a noun content related to each text sentence, to constitute the noun content recognition knowledge; and according to the noun content related to each text sentence and the corresponding sentence number thereof, matching out noun content extension knowledge related to the input text from a pre-constructed knowledge base.

[0203] In addition, the logical instruction in the memory 730 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0204] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, and the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the application problem solving knowledge generation method provided by the above-mentioned methods, which includes: obtaining input text corresponding to a target application problem input by a user; performing sentence segmentation on the input text, and setting a corresponding sentence number for each text sentence obtained; obtaining a noun content related to each text sentence, to constitute the noun content recognition knowledge; and according to the noun content related to each text sentence and the corresponding sentence number thereof, matching out noun content extension knowledge related to the input text from a pre-constructed knowledge base.

[0205] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method for generating application problem solving knowledge provided by the above embodiments, the method comprising: obtaining input text corresponding to a target application problem input by a user; segmenting the input text, and setting a corresponding sentence number for each text segment obtained; obtaining a noun content related to each text segment, to form the noun content recognition knowledge; and matching noun content expansion knowledge related to the input text from a pre-constructed knowledge base according to the noun content related to each text segment and the corresponding sentence number thereof.

[0206] The above-described apparatus embodiments are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0207] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary universal hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0208] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating knowledge for solving application problems, characterized in that: The word problem-solving knowledge includes noun content recognition knowledge and noun content expansion knowledge, specifically including: Obtaining the input text corresponding to the target word problem input by the user; Segment the input text and assign a corresponding sentence number to each acquired text sentence; Acquire the noun content related to each of the text clauses to form the noun content recognition knowledge; Matching the noun content extension knowledge related to the input text from a pre-built knowledge base according to the noun content related to each text clause and its corresponding sentence number; The noun content associated with each text sentence includes nouns and named entities associated with the text sentence, and each noun and named entity associated with the text sentence has the same sentence number; The step of matching the noun content extension knowledge related to the input text from a pre-built knowledge base based on the noun content related to each of the text clauses and its corresponding sentence number includes: Traversing nouns and named entities with the same sentence number, combining them in pairs, and using all the combined words obtained after the combination, matching the first hit result related to each of the combined words from the knowledge base, and adding them to the result set; Traversing all nouns or named entities, matching second hit results related to each noun or named entity from the knowledge base, and adding the second hit results to the result set; After deduplication processing is performed on all the contents in the result set, the contents are used as the noun content expansion knowledge.

2. The method for generating knowledge for solving application problems according to claim 1, wherein: Also includes: Determining the similarity between the input text and text samples corresponding to sample word problems in the knowledge base to determine question type classification information of the target word problem; Each of the sample application questions in the knowledge base is pre-labeled with a question type classification information label; The application problem-solving knowledge also includes problem classification information.

3. The method for generating knowledge for solving application problems according to claim 2, wherein: Determining the similarity between the input text and the text samples corresponding to the sample application questions in the knowledge base to determine the question type classification information of the target application question includes: Inputting the input text into a pre-trained network model to obtain a target feature vector output by the pre-trained network model, and determining a feature vector sample corresponding to each of the text samples based on the pre-trained network model; Calculating the cosine similarity between the target feature vector and each of the feature vector samples respectively, and sorting the feature vector samples from large to small according to the cosine similarity to obtain k text samples corresponding to the top k feature vector samples; The question type classification information of the input text is determined according to the most frequent question type classification information label among the question type classification information labels corresponding to the k text samples.

4. The method for generating knowledge for solving application problems according to any one of claims 2 to 3, characterized in that: Before determining the similarity between the input text and the text samples corresponding to the sample application questions in the knowledge base, the method further includes: Collecting a plurality of sample word problems and obtaining a text sample corresponding to each of the sample word problems to construct the knowledge base; Classifying each of the text samples based on a supervised algorithm to label the sample application question corresponding to each of the text samples with a question type classification information label; Each of the text samples is divided into sentences, a corresponding sentence number is set for each acquired text sample sentence, and the noun content related to each of the text sample sentences is determined.

5. The method for generating knowledge for solving application problems according to claim 1, wherein: The acquiring of the noun content related to each of the text clauses to form the noun content recognition knowledge includes: Performing word segmentation, part-of-speech tagging, and named entity recognition operations on each of the text sentences in sequence to extract nouns and named entities related to each of the text sentences as first initial noun content related to each of the text sentences; Based on a preset heuristic rule, extracting nouns and named entities related to each text sentence from each text sentence again as second initial noun content related to each text sentence; The noun content associated with each of the text sentences is determined based on the first initial noun content and the second initial noun content, and the noun content recognition knowledge is constructed from the noun content associated with all the text sentences.

6. The method for generating knowledge for solving application problems according to claim 5, characterized in that: The pre-set heuristic rules include: The first rule sets the content enclosed in quotation marks in the text sentence as a noun or named entity; The second rule sets the content enclosed in quotation marks in the text sentence as a noun or named entity; The third rule sets the contents separated by commas in the text sentences as nouns or named entities; A fourth rule combines multiple consecutive nouns in the text sentence into a noun phrase, and sets the noun phrase as a noun or a named entity; The fifth rule is to set the content matched from the knowledge base according to the text sentence as the nouns and named entities related to the text sentence based on the question type classification information label of the sample application question to which the text sentence belongs.

7. The method for generating knowledge for solving application problems according to claim 1, wherein: Using all nouns or named entities, second hit results related to each noun or named entity are matched from the knowledge base and included in the result set, including: If a second hit result is matched from the knowledge base using any noun or named entity, the second hit result is included in the result set; If a second hit result cannot be matched from the knowledge base using any of the nouns or named entities, the any of the nouns or named entities is included in the pending set; Based on the maximum post-matching method, all the contents in the pending set are utilized, and the results matched from the knowledge base are included in the result set.

8. A device for generating knowledge for solving application problems, characterized in that: The word problem-solving knowledge includes noun content recognition knowledge and noun content expansion knowledge, including: A text receiving module is used to obtain an input text corresponding to a target application question input by a user; A text preprocessing module, configured to segment the input text into sentences and assign a corresponding sentence number to each acquired text sentence; A noun content recognition module, configured to obtain the noun content associated with each of the text clauses to form the noun content recognition knowledge; A noun content expansion module is used to match the noun content expansion knowledge related to the input text from a pre-built knowledge base based on the noun content related to each text sentence and its corresponding sentence number; The noun content associated with each text sentence includes nouns and named entities associated with the text sentence, and each noun and named entity associated with the text sentence has the same sentence number; The step of matching the noun content extension knowledge related to the input text from a pre-built knowledge base based on the noun content related to each of the text clauses and its corresponding sentence number includes: Traversing nouns and named entities with the same sentence number, combining them in pairs, and using all the combined words obtained after the combination, matching the first hit result related to each of the combined words from the knowledge base, and adding them to the result set; Traversing all nouns or named entities, matching second hit results related to each noun or named entity from the knowledge base, and adding the second hit results to the result set; After deduplication processing is performed on all the contents in the result set, the contents are used as the noun content expansion knowledge.

9. A robot for solving application problems, characterized in that: The robot comprises a main body of a word problem-solving robot, wherein the main body of the robot is provided with a reading unit and an output unit; Also includes a memory and programs or instructions stored on the memory and executable on the processor; The reading unit reads the target word problem, so that the program or instruction is executed by the processor to obtain the word problem-solving knowledge and output it via the output unit; The knowledge of solving application problems is obtained based on the method for generating the knowledge of solving application problems according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Training method and device of problem solving model and problem solving method and device

    CN111783423A

  • Video content expansion method and device, terminal equipment and storage medium

    CN111813993A

  • User identity recognition method and device based on artificial intelligence, terminal and medium

    CN111988294A