Cross-platform automatic solution system for mathematical application problems based on large models and subject knowledge
By constructing a subject knowledge recognition module and generating structured prompts within a large model, the problem of lacking subject knowledge constraints in end-to-end large model problem-solving solutions is solved, improving the accuracy of solving mathematical word problems and the learning effect, and adapting to convenient access on multiple terminal devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA NORMAL UNIV
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-12
AI Technical Summary
Existing end-to-end large-scale model problem-solving solutions lack the systematic extraction and integration of structured knowledge in mathematics. As a result, the models lack clear prior knowledge constraints in the reasoning process, which can easily lead to conceptual confusion and logical errors. This makes it difficult to effectively promote learners' in-depth understanding of subject knowledge and the establishment of a systematic knowledge structure.
We construct a cross-platform automatic solution system for mathematical application problems based on large-scale models and subject knowledge. We extract knowledge point tags and contextual knowledge tags through the classifier network embedded in the subject knowledge recognition module, and generate structured prompt words by using a tag semantic attention mechanism and prompt word design framework. We strictly limit the logical reasoning process of the large language model and combine it with templates generated by type questions to output derived practice data.
It improves the accuracy of large language models in solving mathematical word problems, enabling learners to clearly grasp the underlying knowledge structure and contextual features, suppress logical divergence, generate high-quality structured prompts and similar variation exercises, and is compatible with access from multiple terminal devices.
Smart Images

Figure CN122198068A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and education technology, specifically to a cross-platform automatic solution system for mathematical word problems based on large models and subject knowledge. Background Technology
[0002] With the rapid development of artificial intelligence technology, large-scale language models have demonstrated powerful text understanding and generation capabilities in natural language processing tasks, and are gradually being introduced into auxiliary teaching scenarios in the education field. Solving mathematical word problems, as an important learning task in basic education, requires computer systems not only to accurately parse the known conditions and the desired outcome in natural language text, but also to perform logical reasoning and mathematical calculations.
[0003] Existing math problem-solving aids typically employ an end-to-end processing approach. The system acquires the problem text using technologies such as optical character recognition (OCR) and directly inputs it as a prompt into a general-purpose, pre-trained large language model. This large language model, relying on general patterns learned from massive open-domain corpora, implicitly captures the mapping relationship between the problem text and mathematical operations, thereby directly outputting the calculation steps and the final answer, providing learners and educators with daily problem-solving references.
[0004] However, existing end-to-end large-scale model problem-solving solutions mainly rely on implicit probability distributions derived from training on general corpora, lacking a systematic extraction and integration of structured mathematical knowledge. This approach fails to establish explicit semantic connections between abstract mathematical concepts and specific application scenarios in problems, resulting in a lack of clear prior knowledge constraints during reasoning. This makes the model prone to conceptual confusion and logical errors when faced with complex application problems. Furthermore, this conventional approach fails to clearly reveal the underlying knowledge architecture and contextual characteristics behind the problems to learners, making it difficult for them to accurately categorize specific problems into the corresponding mathematical concept networks. Consequently, it cannot effectively promote learners' in-depth understanding of subject knowledge and the establishment of a systematic knowledge structure. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a cross-platform automatic problem-solving system for mathematical word problems based on large models and subject knowledge, which solves the problems of divergent mathematical problem-solving logic and lack of educational value in large models.
[0006] The first aspect of this invention provides a cross-platform automatic problem-solving system for mathematical word problems based on a large model and subject knowledge. The system includes a user login and registration module, a text input and image recognition module, a subject knowledge recognition module, and an enhanced problem-solving module. The user login and registration module receives registration and login requests from cross-platform terminal devices and performs user authentication and data synchronization. The text input and image recognition module acquires the mathematical word problem data to be processed. When the mathematical word problem data is in image format, the text input and image recognition module compresses the image format data into word features using an internally integrated multimodal optical character recognition model, and converts the word features into a character text sequence. The subject knowledge recognition module is communicatively connected to the text input and image recognition module, and receives the character text sequence, extracting knowledge point tags and contextual knowledge tags associated with the mathematical word problem data. The enhanced problem-solving module is communicatively connected to the subject knowledge recognition module, and generates structured prompt words based on the knowledge point tags and contextual knowledge tags. The enhanced problem-solving module inputs the structured prompt words into a large mathematical language model to obtain the target output result. The target output includes data on the solution process of mathematical word problems and data on the generation of similar mathematical word problems.
[0007] The subject knowledge recognition module embeds a classifier network built based on fine-tuning of a pre-trained language model. The classifier network includes a basic encoder, a knowledge point classification head for multi-label classification, and a contextual knowledge classification head for single-label classification. The basic encoder is used to extract semantic feature representations from character text sequences.
[0008] The subject knowledge recognition module is equipped with a label semantic attention mechanism. This mechanism is configured between the basic encoder and the knowledge point classification head and contextual knowledge classification head. The semantic feature representation extracted by the basic encoder is input into the label semantic attention mechanism to obtain the label augmented representation. This augmented representation is then input into the knowledge point classification head and the contextual knowledge classification head for dimensionality reduction mapping and probability calculation.
[0009] In the processing of the label semantic attention mechanism, the input representation and the label embedding representation are concatenated into a vector. The concatenated vector is then multiplied by a learnable weight matrix, and attention weights are calculated using the Softmax activation function. The label semantic attention mechanism then weights the input representation using these attention weights to obtain an enhanced label representation.
[0010] The knowledge point classification head uses the Sigmoid activation function and the binary cross-entropy loss function to calculate the prediction probability. The contextual knowledge classification head uses the Softmax activation function and the cross-entropy loss function to calculate the prediction probability.
[0011] The enhanced problem-solving module for math word problems uses a pre-defined prompt word design framework to concatenate character text sequences, knowledge point tags, and contextual knowledge tags. The prompt word design framework is a COR framework containing contextual elements, target elements, and output requirement elements. The module transforms the character text sequence into a problem description paragraph and determines if second-level knowledge point tags exist. If second-level knowledge point tags exist, the module generates a comprehensive principle prompt statement containing both first-level and second-level knowledge point tags. If second-level knowledge point tags do not exist, the module generates a basic principle prompt statement containing only first-level knowledge point tags. The module then transforms contextual knowledge tags into contextual guidance statements. It combines the problem description paragraph, comprehensive principle prompt statement or basic principle prompt statement, and contextual guidance statement to generate a contextual element paragraph. Finally, the module sequentially concatenates the contextual element paragraph, target element, and output requirement element to generate structured prompt words.
[0012] The enhanced problem-solving module for math word problems sets format identifiers for four dimensions in the output requirements: problem understanding, problem-solving approach, distributed reasoning, and final answer. The module also includes an outer frame function wrapping instruction at the end of the final answer dimension.
[0013] The enhanced problem-solving module for math word problems includes a template for generating prompts based on the type of problem. Upon receiving a prompt to generate a problem type, the module configures the target element as a problem type creation task, constraining the mathematical language model to replace entity nouns and numerical variables in the problem while maintaining the original problem's knowledge point tags and contextual knowledge tags. The module also sets a quantity requirement identifier and a difficulty level identifier in the output requirement element, generating a dataset containing a specified number of math word problems of the same type.
[0014] A second aspect of this invention provides an electronic device. The electronic device includes a processor, a memory, a communication interface, and a communication bus. The processor, memory, and communication interface complete data transmission and communication connections with each other through the communication bus. The memory internally stores computer-executable instructions. The processor is used to call and execute the computer-executable instructions stored in the memory to implement the functions of various modules in the cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge provided in the first aspect of this invention.
[0015] A third aspect of this invention provides a computer-readable storage medium. The computer-readable storage medium internally stores computer program instructions. When these computer program instructions are loaded and executed by a processor within an electronic device, they implement the functions of various modules in the cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge provided in the first aspect of this invention.
[0016] This invention provides a cross-platform automatic problem-solving system for mathematical word problems based on large-scale models and subject-specific knowledge. It has the following beneficial effects: 1. This invention extracts knowledge point tags and contextual knowledge tags associated with mathematical application problem data by constructing a classifier network with a tag semantic attention mechanism in the subject knowledge recognition module. This establishes an explicit semantic association between abstract mathematical concepts and specific application scenarios. This not only provides prior knowledge constraints for the reasoning process of the large language model to improve recognition accuracy, but also enables learners to clearly obtain the underlying knowledge architecture and contextual features of the questions. This achieves the effect of promoting learners' in-depth understanding of subject knowledge and establishing a systematic knowledge structure.
[0017] 2. This invention uses a pre-defined prompt word design framework that includes context, target, and output requirement elements to dynamically concatenate knowledge points and situational knowledge tags to construct structured prompt words. By using subject-specific principles and layout constraints in the structured prompt words to strictly limit the logical reasoning execution process of the mathematical language model, it effectively suppresses the logical divergence and conceptual confusion that occur when the large language model solves vertical tasks. This achieves the effect of improving the quality of the language model's process of solving mathematical application problems and the standardization of the output results.
[0018] 3. This invention deploys cross-platform network services and combines type-based question generation prompt word templates to issue instructions to a large language model. While maintaining the original knowledge points and contextual logical structure of mathematical application problems, it drives the large language model to automatically replace entity nouns and numerical variables in the question stem text to output a batch of derived practice datasets. This breaks the limitations of traditional fixed question banks and adapts to convenient access on multiple terminal devices, achieving the effect of efficiently generating similar variant practice questions for educators and enriching the means of acquiring teaching resources. Attached Figure Description
[0019] Figure 1 This is a general technical roadmap of the present invention; Figure 2 Flowchart for constructing the subject knowledge recognition model of this invention; Figure 3 The functional structure diagram of the subject knowledge-enhanced mathematical application problem-solving system of the present invention is shown. Detailed Implementation
[0020] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see the appendix Figure 1 - Appendix Figure 3 This invention provides a cross-platform automatic problem-solving system for mathematical word problems based on large models and subject knowledge, including: User login and registration module; Text input and photo recognition module; Subject knowledge identification module; Enhanced solution module for mathematical word problems.
[0022] This system is deployed on a server equipped with a Linux operating system and pre-set RAM. In the specific implementation, the server has 80GB of RAM and is configured with an Ollam model runtime environment and an OpenWebUI visual interaction interface.
[0023] The user login and registration module receives registration and login requests from cross-platform terminal devices and performs user authentication and data synchronization. Cross-platform terminal devices include web pages, mobile applications, and WeChat mini programs.
[0024] The text input and image recognition module is used to acquire the mathematical word problem data to be processed. This data includes both text and image formats. The text input and image recognition module integrates a multimodal optical character recognition (OCR) model. In this implementation, the OCR 2.0 model is used.
[0025] When the acquired math word problem data is in image format, the text input and image recognition module uses a multimodal optical character recognition model to compress the image data into word features and then converts these word features into a character text sequence. In specific implementations, the multimodal optical character recognition model can compress 24x24 pixel image data into word features and convert it into a character text sequence containing up to 8000 characters.
[0026] The subject knowledge recognition module communicates with the text input and image recognition module. The subject knowledge recognition module receives the character text sequence output by the text input and image recognition modules and extracts the knowledge point tags and contextual knowledge tags associated with the math word problem data.
[0027] The subject knowledge recognition module embeds a classifier network built based on fine-tuning of a pre-trained language model. The classifier network includes a knowledge point classification head for multi-label classification and a contextual knowledge classification head for single-label classification. In a preferred embodiment, the base encoder of the classifier network performing multi-label classification uses the Chinese-roberta-wwm-ext model, and the base encoder of the classifier network performing single-label classification uses the Chinese-bert-wwm model.
[0028] The enhanced problem-solving module for math word problems communicates with the subject knowledge recognition module. This module generates structured prompts based on knowledge point tags and contextual knowledge tags. The module then inputs these structured prompts into the mathematical language model to obtain the target output. In this implementation, the mathematical language model uses the Qwen2.5-72B-Math model.
[0029] The enhanced problem-solving module for math word problems uses a pre-defined prompt word design framework to concatenate character text sequences, knowledge point tags, and contextual knowledge tags. In practice, the prompt word design framework is a COR framework that includes contextual elements, target elements, and output requirement elements. The target output includes data on the solution process of math word problems and data on generated math word problems of the same type.
[0030] The overall workflow of this system may include the following steps: The first step is to construct and train the classifier network for the subject knowledge recognition module. The system acquires a dataset of math word problems labeled with knowledge points and contextual knowledge. The system then performs supervised fine-tuning of the pre-trained language model on the math word problem dataset to obtain a high-precision subject knowledge recognition model.
[0031] The second step involves configuring the prompt word design framework in the enhanced problem-solving module for math word problems. This framework includes contextual elements, target elements, and output requirement elements. The system injects the knowledge point tags and contextual knowledge tags obtained in the first step as contextual elements into the prompt word design framework.
[0032] The third step involves deploying a multimodal optical character recognition model and a mathematical large language model on the server side to provide inference services. The system encapsulates automatic problem-solving and character recognition services through application programming interfaces (APIs).
[0033] Fourth, in response to the trigger command sent by the terminal device, the system sequentially calls the text input and image recognition module, the subject knowledge recognition module, and the enhanced solution module for math word problems. The system converts the math word problem data into the target output result and sends the target output result back to the terminal device for rendering and display.
[0034] The invention provides a method for constructing a subject knowledge recognition model, which is applied to the aforementioned subject knowledge recognition module. The method for constructing the subject knowledge recognition model may include: data acquisition and annotation steps; model construction and training steps; and model evaluation and optimization steps.
[0035] In the data acquisition and annotation steps, the system performs data augmentation, data integration, and low-quality data filtering on the Chinese math word problem dataset. Specifically, data augmentation includes synonym replacement and back-translation of the original math word problem text; low-quality data filtering includes removing abnormal data with text lengths below a set threshold, data with missing answer steps, and data containing garbled characters.
[0036] The system removes knowledge point labels with a sample size below a preset threshold, ultimately obtaining a standard training dataset containing both knowledge point labels and contextual knowledge labels. In practice, the Cohen's skappa coefficient for the manual review process is 0.722, and the standard training dataset contains 12,675 math word problems.
[0037] After the elimination process, the set of knowledge point tags includes three primary knowledge point tags: arithmetic, geometry, and algebra. The geometry primary knowledge point tag includes nine secondary knowledge point tags: parallelogram, triangle, square, rectangle, circle, cube, cuboid, cylinder, and cone.
[0038] The first-level algebra knowledge point tags include three second-level knowledge point tags: linear equations in one variable, quadratic equations in one variable, and linear equations in two variables. The set of contextual knowledge tags includes 22 tags such as RMB problems, periodic problems, sum and multiple problems, sum and difference problems, work problems, difference and multiple problems, age problems, queuing problems, matching problems, square matrix problems, tree planting problems, boat problems, train crossing bridge problems, profit and loss problems, meeting problems, accumulation and compensation problems, shifting and compensation problems, restoration problems, pursuit problems, overlapping problems, interval problems, and chicken and rabbit problems.
[0039] In the model building and training steps, the subject knowledge recognition module includes a pre-trained language model. The system uses the pre-trained language model as the basic encoder, and then connects a knowledge point classification head and a contextual knowledge classification head on top of the basic encoder. The basic encoder is used to extract semantic feature representations of character text sequences.
[0040] The system employs a network structure with a shared underlying representation and a task-specific output layer. A label semantic attention mechanism is configured between the basic encoder and the task-specific output layer. The system inputs the semantic feature representation extracted by the basic encoder into the label semantic attention mechanism to obtain enhanced label representations. These enhanced representations are then input into the knowledge point classification head and the contextual knowledge classification head for dimensionality reduction mapping and probability calculation. The knowledge point classification head is used to perform multi-label classification tasks. The knowledge point classification head uses the Sigmoid activation function. The model in the... Predicted probability on each knowledge point tag The calculation formula is: in, The model represents the first time. The logical output value for each knowledge point tag. The knowledge point classification header uses the binary cross-entropy loss function. (Binary cross-entropy loss function) The calculation formula is: in, This represents the total number of knowledge point tags. express The actual label value of the first knowledge point label.
[0041] The contextual knowledge classification head is used to perform single-label classification tasks. The contextual knowledge classification head employs the Softmax activation function. The model in the... Predicted probabilities for each context category The calculation formula is: in, This indicates the total number of situation categories. The model represents the first time. Logical output values for each context category The model represents the first time. Logical output values for each context category.
[0042] The contextual knowledge classification head uses the cross-entropy loss function. (Cross-entropy loss function) The calculation formula is: in, express The true label value of the first context category.
[0043] The system incorporates a label semantic attention mechanism within its subject knowledge recognition module. This mechanism establishes semantic connections between labels. Attention weights are assigned to label embeddings and input representations. The calculation formula is: in, This represents the learnable weight matrix. Indicates the input representation, This indicates that the tag is embedded. This indicates a vector concatenation operation.
[0044] The system weights the input representation by attention weights to obtain a label-enhanced representation. Enhanced label representation The calculation formula is: The system uses a standard training dataset to fine-tune the subject knowledge recognition module. The system employs a stratified cross-validation method.
[0045] The system's training parameters include: 5 training epochs, a batch size of 16, a learning rate of 5e-5, and the AdamW optimization algorithm. The system uses the F1 score as the evaluation metric to determine the training model for each fold of data.
[0046] In the model evaluation and optimization step, the system performs ensemble inference on the trained model. The system obtains the test set prediction results by calculating the average of the model output probabilities for each fold.
[0047] The system calculates the evaluation metrics for each trained model. These metrics include F1 score, precision, recall, accuracy, Matthews correlation coefficient, and Hamming distance loss.
[0048] The system compares the evaluation metrics of each trained model. The system selects the Chinese-roberta-wwm-ext model, which has the best multi-label classification evaluation metric, as the base encoder for the knowledge point classification task.
[0049] The system uses the Chinese-bert-wwm model, which yields the best single-label classification evaluation index, as the base encoder for the contextual knowledge classification task.
[0050] This invention provides a structured prompt word generation and verification method, which is applied to the aforementioned enhanced solution module for mathematical word problems. The structured prompt word generation and verification method may include: prompt word framework configuration steps; subject knowledge splicing steps; and model reasoning and evaluation steps.
[0051] In the prompt word framework configuration step, the enhanced problem-solving module for math word problems integrates a COR framework. The COR framework consists of context elements, target elements, and output requirement elements. Context elements carry background information about the data relationships in the math word problems. Target elements clarify the system's intent and constrain the specific task logic executed by the large language model. Output requirement elements define the layout and presentation structure of the large language model's output text.
[0052] In the subject knowledge assembly step, the enhanced problem-solving module for math word problems receives the character text sequence, first-level knowledge point tags, second-level knowledge point tags, and contextual knowledge tags output by the subject knowledge recognition module. The enhanced problem-solving module then transforms the character text sequence into a problem description paragraph.
[0053] The enhanced problem-solving module for math word problems determines whether a second-level knowledge point label exists. If the second-level knowledge point label exists, the module generates a comprehensive principle hint statement that includes both the first-level and second-level knowledge point labels.
[0054] The specific format for assembling the comprehensive principle hint statement is as follows: This question involves first-level knowledge point tags, specifically including second-level knowledge point tags. Please integrate relevant principles or formulas during the reasoning process.
[0055] If the second-level knowledge point tags are not present, the enhanced solution module for math application problems generates basic principle hint statements containing only the first-level knowledge point tags. The specific assembly format of the basic principle hint statements is: This problem involves first-level knowledge point tags; please integrate relevant principles or formulas during the reasoning process.
[0056] The enhanced problem-solving module for math word problems transforms contextual knowledge tags into contextual guidance statements. The specific format for these contextual guidance statements is: "The semantic context of this problem is a contextual knowledge tag; please use this background to guide your reasoning."
[0057] The enhanced problem-solving module for math word problems combines the problem description paragraph, comprehensive principle hints or basic principle hints, and contextual guidance statements to generate contextual element paragraphs.
[0058] The enhanced problem-solving module for math word problems sets format identifiers for four dimensions in the output requirements: problem understanding, problem-solving approach, distributed reasoning, and final answer. The module also includes a bounding function instruction at the end of the final answer dimension. This bounding function instruction uses the `boxed()` function.
[0059] The enhanced problem-solving module for math word problems also includes prompt word templates for generating type-specific problems. When the system receives a type-specific problem generation instruction, the module configures the target element as a problem-type creation task, requiring the large language model to replace entity nouns and numerical variables in the problem while maintaining the original problem's knowledge point tags and contextual knowledge tags logically. The module also sets generation quantity and difficulty level indicators in the output requirement elements, generating a dataset containing a specified number of math word problems of the same type.
[0060] The enhanced solution module for math word problems concatenates contextual elements (paragraphs), target elements, and output requirement elements in sequence to generate structured prompts.
[0061] In the model reasoning and evaluation steps, the system uses a test dataset to verify the effectiveness of the structured prompts. The test dataset contains 12,675 data entries that have been cleaned and verified in the aforementioned embodiments.
[0062] The system uses 10 independent random sampling methods to draw samples from the test dataset, with 1000 test sample data points drawn each time. The system sets up experimental and control groups.
[0063] In the control group, the system used a baseline language model to infer the output text from conventional prompts that did not contain subject knowledge labels. In the experimental group, the system used a baseline language model to infer the output text from structured prompts.
[0064] In practice, the baseline language model adopted is the Qwen2.5-Math-7B-Instruct model. When performing inference operations, the system configures the maximum number of newly generated lexical parameters of the baseline language model to 512, while the remaining inference parameters of the baseline language model remain at their default values.
[0065] The system inputs the comparison output text and the experimental output text into the evaluation language model. The evaluation language model scores the input text using a no-reference metric. In practice, the evaluation language model uses the DeepSeek-V3 model, and the evaluation method adopts the G-Eval evaluation framework.
[0066] The non-reference indicators include the expression standardization indicator, the process integrity indicator, and the model suitability indicator. The expression standardization indicator is used to assess the degree of standardization in the use of symbols and formulas during the problem-solving process. The process integrity indicator is used to measure the logical coherence and reasoning completeness of the problem-solving steps. The model suitability indicator is used to examine the degree of fit between the problem-solving strategy and the problem type.
[0067] The rating scale is set from one to ten points. The evaluation language model outputs the generation probability for each score. The system uses the generation probability to standardize the scores and calculates a weighted sum to obtain the final continuous rating. Final continuous score The calculation formula is: in, Indicates the specific score index, This indicates that the evaluation language model generates the first... The probability of each score Indicates the first The standard score corresponding to each score.
[0068] The system synchronously calculates the exact match rate between the control output text and the experimental output text. The exact match rate metric measures the absolute consistency between the generated solution and the standard answer.
[0069] The system compares the experimental output text with the control output text in terms of the accuracy matching rate and the final continuous score value, thereby quantitatively verifying the positive enhancement effect of knowledge point tag and contextual knowledge tag injection on the quality of solving mathematical word problems.
[0070] This invention provides a method for deploying and integrating a cross-platform automatic problem-solving system for mathematical word problems. The method may include: a model engine deployment step; and a system function integration step.
[0071] In the model engine deployment step, a server running a Linux operating system is configured. The server's RAM is set to 80GB. The server is equipped with the Ollam model runtime environment and the OpenWebUI visual interaction platform.
[0072] The system acquires the Qwen2.5-72B-Math model file and the GOT-OCR2.0 model file. In specific implementation, the system downloads the Qwen2.5-72B-Math model file and the GOT-OCR2.0 model file by accessing the ModelScope open-source model community. The Qwen2.5-72B-Math model file and the GOT-OCR2.0 model file contain Safetensors weight data.
[0073] The system invokes the preset Safetensors weight import command to import the Safetensors weight data into the Ollam model runtime environment. The server creates and runs the Qwen2.5-72B-Math model instance and the GOT-OCR2.0 model instance within the Ollam model runtime environment.
[0074] The server loads the Qwen2.5-72B-Math model instance and the GOT-OCR2.0 model instance through the OpenWebUI visual interactive platform. The server performs a dialogue test to verify the connectivity of the model instances. After the test passes, the server enables the expressive state transition application programming interface (API) built into the Ollam model runtime environment. The server then publishes text recognition and automatic problem-solving services externally through the expressive state transition API.
[0075] In the system function integration step, the server deploys the high-precision subject knowledge recognition model constructed in the aforementioned embodiments within the subject knowledge recognition module.
[0076] The system develops and builds cross-platform terminal devices. These include web applications, mobile applications, and WeChat mini-programs. Cross-platform terminal devices establish communication connections with the server through application programming interfaces (APIs).
[0077] The cross-platform terminal device acquires the user's input request data. This request data includes image data of math word problems. The cross-platform terminal device then sends the image data of the math word problems to the server.
[0078] The server calls the text input and image recognition module to process the image data of math word problems. The text input and image recognition module uses an internally running GOT-OCR2.0 model instance to perform optical character parsing and obtain the character text sequence corresponding to the image data of math word problems.
[0079] The subject knowledge recognition module receives character text sequences from the text input and image recognition modules. It then uses a high-precision subject knowledge recognition model to process the character text sequences and outputs knowledge point tags and contextual knowledge tags.
[0080] The enhanced problem-solving module for math word problems receives character text sequences, knowledge point tags, and contextual knowledge tags. It assembles structured prompts according to a pre-defined prompt design framework. The module then inputs these structured prompts into a Qwen2.5-72B-Math model instance for inference calculations to obtain the target output.
[0081] The target output includes question analysis content generated based on knowledge point tags and contextual knowledge tags, as well as data on similar questions. The server packages the target output and sends it back to the cross-platform terminal device. The cross-platform terminal device receives the target output and renders and displays it in the user interface.
[0082] The present invention provides an electronic device, which may include: a processor; a memory; a communication interface; and a communication bus.
[0083] The processor, memory, and communication interface complete data transmission and communication connections with each other through a communication bus.
[0084] A processor includes a central processing unit, a microprocessor, or an application-specific integrated circuit, and is used to call and execute computer-executable instructions stored in memory.
[0085] Memory comprises non-volatile storage media and internal memory. The non-volatile storage media internally stores the operating system and computer-executable instructions, while the internal memory provides a data caching environment for the operation of the operating system and computer-executable instructions stored in the non-volatile storage media.
[0086] The communication interface includes both wired and wireless network interfaces. It establishes a network communication link between the electronic device and the cross-platform terminal device. The communication interface receives mathematical word problem data sent by the cross-platform terminal device and sends the target output back to the cross-platform terminal device.
[0087] When the processor executes computer-executable instructions, it implements the specific system functions of the user login and registration module, text input and photo recognition module, subject knowledge recognition module, and enhanced solution module for mathematical word problems in the aforementioned embodiments.
[0088] When the processor executes computer-executable instructions, it implements the various execution steps of the subject knowledge recognition model construction method, the structured prompt word generation and verification method, and the deployment and integration method of the cross-platform automatic mathematical application problem solving system in the aforementioned embodiments.
[0089] This invention provides a computer-readable storage medium. The computer-readable storage medium internally stores computer program instructions.
[0090] When computer program instructions are loaded and executed by the processor inside the electronic device, they implement the various execution steps of the subject knowledge recognition model construction method, structured prompt word generation and verification method, and cross-platform automatic mathematical application problem solving system deployment and integration method described in the foregoing embodiments.
[0091] Computer-readable storage media include non-transitory computer-readable media such as read-only memory, random access memory, disk, optical disk, flash memory, or solid-state drive.
[0092] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A cross-platform automatic problem-solving system for mathematical word problems based on large-scale models and subject-specific knowledge, characterized in that: include: The user login and registration module is used to receive registration and login requests sent by cross-platform terminal devices, and to perform user authentication and data synchronization. The text input and image recognition module is used to acquire mathematical word problem data to be processed. When the mathematical word problem data is image format data, the text input and image recognition module compresses the image format data into word features through the internally integrated multimodal optical character recognition model, and converts the word features into a character text sequence. The subject knowledge recognition module is communicatively connected to the text input and photo recognition module, and is used to receive the character text sequence and extract the knowledge point tags and contextual knowledge tags associated with the mathematical application problem data; The enhanced problem-solving module for mathematical word problems is communicatively connected to the subject knowledge recognition module. It is used to generate structured prompt words based on the knowledge point tags and the contextual knowledge tags. The enhanced problem-solving module for mathematical word problems inputs the structured prompt words into the mathematical language model to obtain the target output result. The target output result includes mathematical word problem solving process data and data of generating similar mathematical word problems.
2. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 1, characterized in that, The subject knowledge recognition module embeds a classifier network built based on fine-tuning of a pre-trained language model; the classifier network includes a basic encoder, a knowledge point classification head that performs multi-label classification, and a contextual knowledge classification head that performs single-label classification; the basic encoder is used to extract the semantic feature representation of the character text sequence.
3. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 1, characterized in that, The subject knowledge recognition module is equipped with a label semantic attention mechanism; the label semantic attention mechanism is configured between the basic encoder and the knowledge point classification head and the contextual knowledge classification head. The semantic feature representation extracted by the basic encoder is used as input to the label semantic attention mechanism to obtain the label enhanced representation. The label enhanced representation is then input to the knowledge point classification head and the contextual knowledge classification head for dimensionality reduction mapping and probability calculation. The label semantic attention mechanism performs a vector concatenation operation between the input representation and the label embedding representation, multiplies the concatenated vector result with a learnable weight matrix, and calculates the attention weights using a normalized exponential activation function. The label semantic attention mechanism performs weighted processing on the input representation through the attention weights to obtain the label-enhanced representation.
4. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 1, characterized in that, The knowledge point classification head uses the Sigmoid activation function and the binary cross-entropy loss function to calculate the prediction probability; the contextual knowledge classification head uses the Softmax activation function and the cross-entropy loss function to calculate the prediction probability.
5. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 1, characterized in that, The enhanced problem-solving module for mathematical word problems uses a preset prompt word design framework to concatenate the character text sequence, the knowledge point tags, and the contextual knowledge tags; the prompt word design framework is a COR framework that includes contextual elements, target elements, and output requirement elements.
6. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 5, characterized in that, The enhanced problem-solving module for mathematical applications converts the character text sequence into a problem description paragraph and determines whether the second-level knowledge point tags exist. If the second-level knowledge point tag exists, the enhanced solution module for mathematical application problems generates a comprehensive principle prompt statement that includes both the first-level and second-level knowledge point tags; if the second-level knowledge point tag does not exist, the enhanced solution module for mathematical application problems generates a basic principle prompt statement that only includes the first-level knowledge point tag. The enhanced problem-solving module for mathematical word problems converts the contextual knowledge tags into contextual guidance statements. The enhanced problem-solving module for mathematical applications combines the problem description paragraph, the comprehensive principle prompt statement or the basic principle prompt statement, and the contextual guidance statement to generate a contextual element paragraph. The enhanced problem-solving module for mathematical applications sequentially concatenates the contextual element paragraph, the target element, and the output requirement element to generate the structured prompt words.
7. The cross-platform automatic problem-solving system for mathematical applications based on a large model and subject knowledge as described in claim 6, characterized in that, The enhanced solution module for mathematical word problems sets format identifiers for four dimensions in the output requirement elements: problem understanding, problem-solving approach, distributed reasoning, and final answer; the enhanced solution module for mathematical word problems configures an outer frame function wrapping instruction at the end of the final answer dimension.
8. The cross-platform automatic problem-solving system for mathematical applications based on large models and subject knowledge as described in claim 5, characterized in that, The enhanced problem-solving module for mathematical word problems is configured with a prompt word template for generating type-based questions. When a type-based question generation instruction is received, the enhanced problem-solving module for mathematical word problems configures the target element as a question type creation task, constraining the mathematical language model to replace entity nouns and numerical variables in the question while keeping the original question knowledge point tags and contextual knowledge tags logically unchanged. The enhanced problem-solving module for mathematical word problems sets a generation quantity requirement identifier and a difficulty level identifier in the output requirement element, generating a dataset containing a specified number of mathematical word problems of the same type.
9. An electronic device, characterized in that, include: Processor, memory, communication interface, and communication bus; The processor, the memory, and the communication interface complete data transmission and communication connections with each other through the communication bus; The memory internally stores computer-executable instructions; The processor is used to call and execute the computer-executable instructions stored in the memory to realize the functions of each module in the cross-platform automatic problem-solving system for mathematical application problems based on large models and subject knowledge as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium internally stores computer program instructions; when the computer program instructions are loaded and executed by the processor inside the electronic device, they realize the functions of each module in the cross-platform automatic problem-solving system for mathematical application problems based on large models and subject knowledge as described in any one of claims 1 to 8.