Dynamic science examination question generation method based on knowledge divergence and difficulty routing and related device
By constructing an abstract syntax tree and knowledge neighborhood divergence, combined with symbolic engine reverse solving, the problems of computational illusion and uncontrollable difficulty in generating mathematical problems in large models are solved, realizing the flexibility and numerical correctness of problem generation, and adapting to high-quality exercise output for different learning stages.
Patent Information
- Application Number
- CN202611347601.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies often suffer from unsolvable problems, logical inconsistencies, and numerical calculation errors when generating math problems. Furthermore, traditional machine-based problem generation methods lack flexibility, have a crude difficulty assessment, and struggle to consistently output high-quality exercises that are suitable for different learning stages.
A dynamic science question generation method based on knowledge divergence and difficulty routing is adopted. By constructing an abstract syntax tree, combining knowledge neighborhood divergence, inference complexity exponential increment prediction and routing decision, and using a symbolic engine for reverse solving, natural language question stems and standard answers are generated, so as to achieve precise and controllable question difficulty.
It reduces system construction and maintenance costs, avoids the illusion of large-scale model calculations, improves the flexibility and scalability of question generation, ensures precise control of question difficulty and numerical accuracy, and outputs natural language question stems and standard answers that meet the target difficulty.
Smart Images

Figure CN123178556A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a dynamic science question generation method and related equipment based on knowledge divergence and difficulty routing. Background Technology
[0002] In the field of education, current solutions for question generation and logical reasoning data construction rely heavily on large-scale models. While these models possess excellent text generation capabilities, they lack the ability to perform rigorous numerical calculations. Directly generating mathematical problems with complex parameters using large models can easily lead to unsolvable problems, logical inconsistencies, and computational errors—a kind of computational illusion. Traditional machine-based question generation methods largely depend on fixed templates and manually constructed static knowledge graphs. This not only results in poor generation flexibility but also requires significant investment in the continuous maintenance of massive amounts of knowledge nodes and relationships. Furthermore, existing methods for assessing question difficulty are rather crude, relying heavily on subjective scoring. They lack evaluation criteria that align with educational cognitive theories and can be quantitatively calculated purely through mathematical logic at the machine level. Ultimately, this leads to large fluctuations in the difficulty of generated questions, making it difficult to consistently output high-quality exercises and reasoning datasets suitable for different learning stages.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0004] The main purpose of this application is to propose a dynamic science question generation method and related equipment based on knowledge divergence and difficulty routing, which can significantly reduce the system construction and maintenance costs, achieve precise and controllable question difficulty, completely eliminate the illusion of large-scale model calculation, and improve scalability and derivation capabilities.
[0005] To achieve the above objectives, one aspect of this application proposes a dynamic science question-generating method based on knowledge divergence and difficulty routing, the method comprising the following steps: Obtain the starting knowledge points and the target difficulty threshold; An abstract syntax tree is constructed and calculated based on the starting knowledge points and the target difficulty threshold to obtain the initial reasoning complexity index. The difficulty input parameters are sequentially processed through knowledge neighborhood divergence, inference complexity index increment estimation, and routing decision processing to obtain selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold; Based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree, the difficulty verification parameters are verified to obtain a fixed logical path. The symbol engine is used to reverse solve the abstract syntax tree corresponding to the solidified logical path to obtain the specific numerical parameters of the problem. The abstract syntax tree and the specific numerical parameters of the question are processed by scene mapping rendering to obtain the natural language question stem and standard answer.
[0006] Preferably, the step of constructing an abstract syntax tree based on the starting knowledge points and the target difficulty threshold, and then calculating the initial inference complexity index, includes the following steps: The starting knowledge points are processed for knowledge point level and domain identification to obtain knowledge point metadata. The initial abstract syntax tree is generated and its difficulty is calculated based on the knowledge point metadata and the target difficulty threshold to obtain the initial inference complexity index.
[0007] Preferably, the step of sequentially performing knowledge neighborhood divergence, reasoning complexity exponential increment estimation, and routing decision processing on the difficulty input parameters to obtain the selected logical knowledge points and operation instructions includes the following steps; The knowledge point set is subjected to knowledge neighborhood divergence processing to obtain candidate knowledge points; Heuristic reasoning complexity index increment prediction is performed on the candidate knowledge points, the initial reasoning complexity index, and the target difficulty threshold to obtain the reasoning complexity index increment; The candidate knowledge points, the incremental reasoning complexity index, the initial reasoning complexity index, and the target difficulty threshold are filtered to obtain the selected logical knowledge points and the operation instructions.
[0008] Preferably, after obtaining the selected logical knowledge point and the operation instruction, the method further includes the following steps: The difference between the actual inference complexity index increment and the inference complexity index increment is calculated to obtain the estimated deviation. The large model is fed back into the context learning process based on the predicted deviation to obtain an updated large model; the updated large model is used to predict the exponential increment of inference complexity in the next iteration.
[0009] Preferably, the step of performing context learning feedback processing on the large model based on the estimated deviation to obtain the updated large model includes the following steps; Based on the predicted bias, the few-sample context examples are constructed to obtain the target context examples; The target context instance is injected into the large model context window to obtain the updated large model.
[0010] Preferably, the difficulty verification parameters include a set of knowledge point levels and the total number of involved domains; the step of verifying the difficulty verification parameters based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree to obtain a fixed logical path includes the following steps: The abstract syntax tree is mounted according to the selected logical knowledge points and the operation instructions to obtain the mounted and updated abstract syntax tree. The set of knowledge point levels and the total number of involved fields extracted from the updated abstract syntax tree are subjected to difficulty calculation to obtain the actual difficulty value. The actual difficulty value is compared and judged based on the target difficulty fluctuation range: If the actual difficulty value does not meet the conditions of the target difficulty fluctuation range, then return to perform the knowledge neighborhood divergence for processing; If the actual difficulty value meets the condition of the target difficulty fluctuation range, then the search is truncated to obtain the fixed logical path.
[0011] Preferably, the step of reverse solving the abstract syntax tree corresponding to the fixed logic path based on the symbol engine to obtain the specific numerical parameters of the problem includes the following steps: The abstract syntax tree corresponding to the solidified logic path is imported according to the symbol engine import interface to obtain the engine-parsable logic object. The engine-parseable logical objects are subjected to integer or rational number constraints and Diophantine equations in reverse processing to obtain the specific numerical parameters of the problem.
[0012] Preferably, the step of performing scene mapping rendering processing on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer includes the following steps: Implicit conditional mapping is performed on the abstract logic of the abstract syntax tree and the specific numerical parameters of the question to obtain logical material; The logical material is processed to generate business scenario text, resulting in the natural language question stem and the standard answer.
[0013] To achieve the above objectives, another aspect of this application proposes a dynamic science question-generating system based on knowledge divergence and difficulty routing, the system comprising: The acquisition module is used to acquire the starting knowledge points and the target difficulty threshold; A computation module is constructed to build an abstract syntax tree based on the starting knowledge points and the target difficulty threshold, and to perform calculations to obtain the initial inference complexity index. The incremental estimation module is used to sequentially perform knowledge neighborhood divergence, inference complexity index incremental estimation, and routing decision processing on the difficulty input parameters to obtain the selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold; The extraction and verification module is used to perform verification processing on the difficulty verification parameters based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree to obtain the fixed logical path; The reverse solving module is used to reverse solve the abstract syntax tree corresponding to the solidified logic path based on the symbol engine to obtain the specific numerical parameters of the problem; The mapping and rendering module is used to perform scene mapping and rendering processing on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer.
[0014] To achieve the above objectives, another aspect of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the methods described above. This application includes at least the following beneficial effects: It provides a dynamic science question generation method and related equipment based on knowledge divergence and difficulty routing. This solution uses an abstract syntax tree to carry the question logic, combined with knowledge neighborhood divergence, inference complexity index increment prediction, and routing decision processing. This breaks free from the constraints of traditional templates and static knowledge graphs, eliminating the need for massive manual maintenance of knowledge node relationships and improving the flexibility of question generation. It relies on the inference complexity index to complete difficulty-related processing, replacing subjective scoring, and enabling machine-level quantitative difficulty control, alleviating the problem of fluctuating question difficulty. After solidifying the question logic into a fixed logical path, it uses a symbolic engine to perform reverse solving to obtain the specific numerical parameters of the question, stripping away the numerical calculation stage of the large model and avoiding the computational illusion problems such as unsolvable problems, logical inconsistencies, and numerical errors caused by large models directly generating mathematical problems. Combined with scene mapping rendering, it outputs natural language question stems and standard answers, achieving a complete closed loop from logical construction, difficulty control, numerical verification to question stem output. This solution balances question generation flexibility, difficulty controllability, and numerical accuracy, and can stably output natural language question stems and standard answers that meet the target difficulty. Attached Figure Description
[0015] Figure 1 This is a flowchart of a dynamic science question-generating method based on knowledge divergence and difficulty routing provided in an embodiment of this application; Figure 2 yes Figure 1 The flowchart of step S120 in the middle; Figure 3 yes Figure 1 The flowchart of step S130 in the process; Figure 4This is the first flowchart of the updated large model acquisition process; Figure 5 This is the second flowchart of the updated large model acquisition process; Figure 6 yes Figure 1 The flowchart of step S140 in the middle; Figure 7 yes Figure 1 The flowchart of step S150 in the middle; Figure 8 yes Figure 1 The flowchart of step S160 in the process; Figure 9 This is a schematic diagram of the structure of the dynamic science question generation system based on knowledge divergence and difficulty routing provided in the embodiments of this application; Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0018] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0019] RCI (Reasoning Complexity Index): A quantitative metric used in this application to objectively measure the difficulty of a mathematical logic tree.
[0020] AST (Abstract Syntax Tree): A tree-like data structure used to represent the mathematical logic steps and nested relationships of operators in the underlying code.
[0021] Diophantine equations: algebraic equations that require only integer solutions.
[0022] The new RCI formula integrates knowledge point levels, secondary knowledge point attenuation, and cross-domain penalties to quantify the complexity of problem reasoning.
[0023] Target RCI: The pre-set target reasoning complexity index for the question, serving as a target value for difficulty control.
[0024] SymPy symbolic engine: performs reverse AST solving, applies constraints to obtain numerical parameters of the problem, and eliminates computational illusions.
[0025] The sympy computation library is a Python symbolic computation library that performs algebraic differentiation, equation solving, and parameter enumeration derivation.
[0026] Large Model (LLM): refers to a natural language generation model with pre-trained world knowledge. This application is used to generate mathematical concepts, estimate difficulty, and render problem text.
[0027] Knowledge Neighborhood Divergence: Abandoning traditional static artificial knowledge graphs, it relies on the world knowledge of the large model itself to dynamically associate and generate a set of reasonable mathematical knowledge points related to the current mathematical concepts.
[0028] Heuristic Routing: Among multiple candidate knowledge point combination paths, the large model intelligently selects the path that can most smoothly approach the target difficulty by roughly estimating the increased difficulty of each path.
[0029] Figure 1 This is an optional flowchart of a dynamic science question-generating method based on knowledge divergence and difficulty routing provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S110 to S160.
[0030] Step S110: Obtain the starting knowledge points and target difficulty threshold; Step S120: Construct an abstract syntax tree based on the starting knowledge points and the target difficulty threshold, and calculate the initial inference complexity index. Step S130: The difficulty input parameters are processed sequentially by knowledge neighborhood divergence, inference complexity index increment estimation, and routing decision processing to obtain the selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold. Step S140: Based on the selected logical knowledge points, operation instructions and abstract syntax tree, the difficulty verification parameters are verified to obtain the solidified logical path; Step S150: Based on the symbol engine, reverse solve the abstract syntax tree corresponding to the solidified logic path to obtain the specific numerical parameters of the problem; Step S160: Perform scene mapping and rendering processing on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer.
[0031] Steps S110 to S160, as illustrated in this embodiment, involve acquiring the starting knowledge points and the target difficulty threshold, constructing an abstract syntax tree based on these points, and performing calculations to output an initial inference complexity index. Next, knowledge neighborhood divergence, inference complexity index increment estimation, and routing decision processing are performed on the difficulty input parameters to output selected logical knowledge points and operation instructions. Then, combining the selected logical knowledge points, operation instructions, and the abstract syntax tree, difficulty verification parameters are extracted and deterministic verification is performed to obtain a fixed logical path. Subsequently, a symbolic engine is invoked to perform reverse engineering on the abstract syntax tree corresponding to the fixed logical path to obtain the specific numerical parameters of the question. Finally, scene mapping and rendering processing is performed on the abstract syntax tree and the specific numerical parameters of the question to generate a natural language question stem and standard answer, completing the dynamic science question generation.
[0032] In some embodiments, in steps S110 to S120, the acquisition of starting knowledge points and target difficulty thresholds is first completed. The source of starting knowledge points can be manually specified, randomly generated by the model, or open source data. The target difficulty threshold is used to constrain the overall difficulty level of subsequent questions.
[0033] like Figure 2 As shown, after obtaining the starting knowledge points and the target difficulty threshold, an abstract syntax tree needs to be constructed based on the starting knowledge points and the target difficulty threshold, and calculations are performed to obtain the initial inference complexity index. This process first performs knowledge point level and domain identification processing on the obtained starting knowledge points, inputs the starting knowledge points into the large model to complete parsing, identifies the corresponding knowledge point level and its domain, and outputs knowledge point metadata.
[0034] After obtaining the knowledge point metadata, the initial abstract syntax tree is generated and its difficulty is calculated by combining the knowledge point metadata with the target difficulty threshold already obtained. The root node of the initial abstract syntax tree is generated based on the knowledge point metadata, and then the initial difficulty is calculated to obtain the initial inference complexity index. This index serves as the difficulty benchmark for subsequent knowledge neighborhood divergence and inference complexity index increment prediction.
[0035] In some embodiments, in step S130, such as Figure 3As shown, the difficulty input parameters are input into the large model to perform knowledge neighborhood divergence, inference complexity index increment prediction, and routing decision-related processing. The difficulty input parameters include a set of knowledge points, an initial inference complexity index, and a target difficulty threshold, thereby obtaining selected logical knowledge points and operation instructions. First, knowledge neighborhood divergence processing is performed on the knowledge point set. Based on the knowledge reserves built into the large model, several candidate knowledge points logically related to existing knowledge points are dynamically generated. After the candidate knowledge points are generated, heuristic inference complexity index increment prediction is performed on the candidate knowledge points, the initial inference complexity index, and the target difficulty threshold. The corresponding inference complexity index increment is estimated for each candidate knowledge point.
[0036] After obtaining the inference complexity index increment corresponding to each candidate knowledge point, the candidate knowledge points, inference complexity index increment, initial inference complexity index, and target difficulty threshold are screened. The objects that can make the initial inference complexity index plus the inference complexity index increment smoothly approach the target difficulty threshold without difficulty overshoot are selected, and the corresponding selected logical knowledge points and operation instructions are output.
[0037] like Figure 4 and Figure 5 As shown, after acquiring the selected logical knowledge points and operation instructions, a dynamic calibration process is further executed. The actual inference complexity index increment is calculated using the new inference complexity index formula (new RCI formula). The difference between this actual increment and the inference complexity index increment output by the large model is calculated to obtain the prediction bias. This prediction bias is then used to construct target context examples from a small number of sample context examples. These target context examples are then injected into the context window of the large model, completing the context learning feedback process for the large model and resulting in an updated large model. This updated large model will be used for predicting the inference complexity index increment in subsequent iterations, thereby correcting the subsequent prediction weights of the large model and reducing the deviation between the heuristic prediction results and the actual inference complexity index increment.
[0038] In some embodiments, in step S140, such as Figure 6 As shown, the selected logical knowledge points and their corresponding operation instructions are mounted onto the abstract syntax tree, resulting in an updated abstract syntax tree, thus completing the integration of the knowledge point logic into the syntax tree structure. The difficulty verification parameters include the set of knowledge point levels and the total number of domains involved. After the mounting and update are completed, the set of knowledge point levels K and the total number of domains D are extracted from the updated abstract syntax tree. These extracted parameters are then substituted into the new inference complexity index formula (new RCI formula) to calculate the actual difficulty value. The RCI calculation formula is as follows: ; Where RCI represents the reasoning complexity index, and C represents the global coefficient. This indicates the knowledge point level of the main knowledge point. Let represent the knowledge point level of the i-th auxiliary knowledge point, and n represent the total number of knowledge points involved in the calculation in the abstract syntax tree. α represents the dimensionality reduction attenuation coefficient of auxiliary knowledge points, α represents the cross-domain penalty coefficient, and D represents the total number of knowledge domains involved in the question's logic.
[0039] After calculating the actual difficulty value, the actual difficulty value is compared with the preset target difficulty fluctuation range. If the calculated actual difficulty value does not meet the conditions of the target difficulty fluctuation range, the process returns, and the knowledge neighborhood divergence processing is re-executed to continue the pathfinding expansion of knowledge points or to perform a logical rollback and downgrade operation to re-select suitable knowledge points.
[0040] When the calculated actual difficulty value meets the conditions of the target difficulty fluctuation range, the subsequent knowledge point search and expansion process is terminated, the search process is truncated, the logic corresponding to the current abstract syntax tree is fixed, and finally a solidified logical path is obtained, providing a definite logical basis for the subsequent symbol engine reverse solving steps.
[0041] In some embodiments, in step S150, such as Figure 7 As shown, after solidifying the logical path and obtaining the corresponding abstract syntax tree, a symbolic engine is needed to solve for the specific numerical parameters of the problem. This removes the large model from the numerical calculation process, fundamentally avoiding the computational illusion caused by the large model. First, the symbolic engine import interface is called to import the abstract syntax tree corresponding to the solidified logical path, converting it into a parsable logical object that the symbolic engine can recognize and parse, thus completing the migration of the problem-generating logic to the symbolic computation environment.
[0042] After obtaining the logical object that the engine can parse, integer or rational number constraints are applied to the logical object, and the Diophantine equation is solved in reverse. This solution process is entirely completed by the symbolic engine, no longer relying on large models for numerical calculations. By limiting the value type of the output parameters through constraints, the specific numerical parameters of the problem that conform to the logical constraints are obtained.
[0043] This solution method does not rely on the numerical extrapolation capabilities of large models. All numerical solution logic is executed deterministically by the symbolic engine, which can avoid problems such as unsolvable parameters and numerical errors that are prone to occur when large models generate mathematical problems. It ensures that the specific numerical parameters of the output problem are mathematically true and valid, providing a reliable numerical foundation for subsequent rendering and generation of natural language question stems.
[0044] In some embodiments, in step S160, such as Figure 8 As shown, after solidifying the abstract syntax tree logic and solving for the specific numerical parameters of the question, scene mapping and rendering processing is required to obtain the final natural language question stem and standard answer. This process first performs implicit conditional mapping on the abstract logic carried by the abstract syntax tree and the specific numerical parameters of the question output by the symbol engine. The abstract syntax tree stores the inherent logical constraints and knowledge point relationships of the science question, while the specific numerical parameters of the question are reliable values obtained through verification and solution by the symbol engine. Implicit conditional mapping binds the various problem-solving constraints, logical relationships, and solved numerical parameters implicit in the abstract syntax tree to each other, completing the organization and output of logical materials, resulting in logical materials that can be used for text generation.
[0045] After obtaining the logical material, further processing is performed to generate business scenario text. Leveraging the text generation capabilities of the large model, the logical material, detached from real-world scenarios, is transformed into readable exercise text with practical business contexts. Abstract mathematical logic relationships are packaged into natural language expressions closely aligned with the application scenarios of the exercises. Simultaneously, based on the mapped logical and numerical information, the corresponding standard answers are derived, thus outputting complete and complementary natural language question stems and standard answers, completing the transformation from internal machine logic representation to user-facing exercise content.
[0046] This application abandons the traditional static knowledge graph model that requires manual construction and continuous maintenance. Instead, it leverages pre-trained knowledge from a large model to achieve dynamic divergence of mathematical knowledge neighborhoods. This significantly reduces the high maintenance costs associated with manually sorting through massive amounts of knowledge nodes and their relationships, and substantially lowers the engineering costs of system implementation and iteration. Furthermore, the solution employs a novel, self-developed RCI (Rich Knowledge Interpretation) precision calculation formula. This formula rationally adjusts the weights of primary and secondary knowledge points through the dimensionality reduction and attenuation coefficients of auxiliary knowledge points. It quantifies interdisciplinary cognitive difficulty using cross-domain penalty coefficients, and combines this with a large-scale model-based heuristic RCI difficulty increment prediction and path optimization difficulty routing architecture. Combined with backend deterministic numerical verification, this ensures that the difficulty of questions is precisely positioned within a preset range, strictly adhering to the laws of educational cognitive load and resolving the shortcomings of traditional question difficulty fluctuations and subjective judgment.
[0047] Furthermore, this solution constructs an innovative architecture that deeply couples RCI verification and symbolic solution. Only after the difficulty level accurately meets the target is the question logic solidified and sent to the symbolic engine for reverse parameter calculation. This completely decouples the large model's logical creativity generation from rigorous numerical calculation. The large model is only responsible for knowledge point expansion and logic construction, while the SymPy symbolic engine handles the precise numerical solution with integer constraints, completely eliminating the illusion of large model computation and ensuring logical consistency and rigorous accuracy of the questions. Simultaneously, this decoupling mode avoids ineffective and complex decimal calculations, effectively saving model computing power and token consumption, guiding the model to focus on core mathematical reasoning capabilities, and optimizing model learning and generation logic. In addition, this solution implements an end-to-end question generation process with multi-model collaboration. Relying on solidified abstract syntax tree logic, it can complete implicit condition mapping and natural language question stem rendering for multiple scenarios. It can generate new science questions of the same difficulty and multiple scenarios based on the same core logic in batches, exhibiting strong question type expansion and content derivation capabilities, and can be widely adapted to diverse teaching question bank scenarios such as daily homework and standardized tests.
[0048] The following is a detailed description and explanation of the solutions in the embodiments of the present invention, using specific application examples: This application embodiment describes the dynamic question generation process for comprehensive science questions related to ellipses. The overall process follows the steps of obtaining the starting knowledge points and target difficulty threshold, constructing an abstract syntax tree to obtain the initial reasoning complexity index, diverging the knowledge neighborhood and estimating the incremental reasoning complexity index and making routing decisions, extracting the knowledge point level set and the total number of domains and conducting deterministic verification, reverse solving with a symbolic engine, and scene mapping rendering to obtain the question stem and standard answer.
[0049] First, establish the starting point and target difficulty, and input the starting knowledge points into the model. The model determines the grade level and knowledge domain of the textbook. The absolute difficulty level k corresponds one-to-one with the grade level of the math textbook; in this embodiment, k=8 for 8th grade and k=10 for 10th grade. A pre-defined RCI score range is used to differentiate the difficulty of exercises, with the range set from 10 to 100 points. 10-25 points are easy, 26-50 points are medium, 50-75 points are relatively difficult, and 75-100 points are very difficult. In this embodiment, the goal is to generate relatively difficult comprehensive questions within the 50-70 range, setting the Target RCI to 60.0. The starting knowledge point is selected as the basic equation of an ellipse. The model identifies and outputs the knowledge point level k=10, belonging to the geometry domain, with a domain number D=1. The initial Current_RCI is obtained through underlying calculation, calculated as 3.0 × 10 × (1 + 0) = 30.0, where 3.0 is the global coefficient C and 10 is the primary knowledge point level. The total number of domains D equals 1, and the cross-domain penalty term (1+α(D-1)) takes the value of 1, resulting in an initial reasoning complexity index of 30.0.
[0050] The following steps involve dynamically generating a large model and performing divergent routing, inputting the starting knowledge points and difficulty rules into the large model. The task requires outputting a parameterized problem logic without specific numerical values, along with candidate knowledge points. The overall model output should include a structured thought process chain containing candidate knowledge points, difficulty increment prediction, and routing decisions. Two candidate knowledge points are provided here; the first is the parametric equation of a straight line, with a knowledge point level of [missing information]. =6, belonging to the geometry domain, the corresponding question logic involves finding the intersection point of a line equation and an ellipse equation in parametric form, constructing a quadratic equation, and then calculating the chord length; the second candidate knowledge point is constructing an inscribed area function and finding its extrema, knowledge point level. =12, belonging to the field of calculus. The problem logic involves constructing an inscribed symmetrical rectangle area function from points in the first quadrant of an ellipse, calculating the first derivative of the area function and setting it to 0 to find the extreme value of the area, and establishing an algebraic relationship between the extreme value and the ellipse parameters. The large model performs inference complexity index increment estimation for two candidate knowledge points. If the parametric equation of a straight line is selected, it belongs to the same field expansion, and the level of secondary knowledge points is halved in the calculation, with an estimated total RCI of about 39 and an increment of 9, which is too slow to approach the target difficulty. If the inscribed area function is constructed and the extreme value is found, calculus is introduced to form a cross-field, triggering a cross-field expansion coefficient. This knowledge point is upgraded to a primary knowledge point, and the level of the original primary knowledge point is halved in the calculation, with an estimated total RCI of about 61.2 and an increment of 31.2. This value falls steadily into the target range of 50-70. Therefore, the routing decision selects to construct the inscribed area function and find the extreme value, and outputs the corresponding operation instructions.
[0051] Next, we will conduct precise underlying calculation and verification, update the knowledge point level set K={12,10}, and the total number of cross-domain applications D=2, then substitute the new RCI calculation formula: ; Complete accurate calculations. In this embodiment, the global coefficient C is set to 3.0. (Main knowledge point) =12, auxiliary knowledge points are 10, the dimensionality reduction attenuation coefficient λ of auxiliary knowledge points is 0.5, the cross-domain penalty coefficient α is 0.2, D is the total number of cross-domains, and substituting them, we get RCI=3.0×(12+0.5×10)×(1+0.2×(2-1))=61.2. The calculated RCI value of 61.2 falls into the pre-set target range of 50-70, and the path finding is determined to be successful, and the current abstract syntax tree logical path is solidified; if the calculation result is not in the target range, the candidate knowledge point information and RCI score will be sent back to the large model to perform dynamic calibration for subsequent generation of new candidate knowledge points.
[0052] After completing the solidification of the logic path, the symbolic engine is executed for reverse solving, the solidified abstract syntax tree is imported into the SymPy symbolic engine, constraint conditions are imposed, and the elliptical parameters a and b are limited to positive integers, and the maximum area c is a positive integer. The symbolic engine completes the symbolic definition, declares symbolic variables a, b, and x, and is based on the standard equation of an ellipse Derive the expression of the ordinate in the first quadrant , further construct the total area function of the symmetric rectangle inscribed in the ellipse , take the first derivative of the independent variable x, set the first derivative equal to 0 to solve for the critical point, and obtain the effective critical point , substitute the critical point back into the area function and simplify it to obtain the maximum area identity . Then impose Diophantine integer constraints, the constraint conditions include that the ellipse definition requires a>b>0, a, b, and c are all positive integers, the equation constraint is 2ab=c, enumerate feasible integer solutions within the semi-axis traversal range 1≤b<a≤10, obtain a set of feasible solutions a=3, b=1, c=6, and determine the ellipse equation as , complete the solution of the specific numerical parameters of the problem.
[0053] Finally, perform implicit condition mapping and scene mapping rendering processing, call the large model , perform implicit condition mapping processing on the abstract logic carried by the abstract syntax tree and the specific numerical parameters of the problem solved by the symbolic engine to obtain logical materials, then carry out business scenario text generation processing on the logical materials, hide the underlying formulas and internal variable symbols, map the ellipse-related parameters to the physical dimensions of the real scenario, and derive multiple natural language questions with different questioning directions and corresponding standard answers. The first problem takes precision optical lenses as the business scenario, given that the short semi-axis is 1 centimeter and the maximum filter rectangular area is 6 square centimeters, asks to solve for the length of the long semi-axis, and the solution target is a=3; the second problem takes the elliptical urban green space and artificial lake as the business scenario, given that the long semi-axis is 3 kilometers and the short semi-axis is 1 kilometer, asks to solve for the maximum area of the rectangular artificial lake, and the solution target is 2ab=6, completing the output of the entire set of dynamic science problem generation.
[0054] Specifically, in the symbolic engine reverse solving stage, the solidified abstract syntax tree is imported into the SymPy symbolic engine for code-based deduction. First, the sympy calculation library is imported, symbolic variables a, b, and x are declared, where a represents the ellipse's semi-major axis, b represents the ellipse's semi-minor axis, x represents the abscissa of a point on the ellipse, and the variable values are set to be positive without being forced to be integers. Then write the standard equation of the ellipse ; where y is the ordinate of the point on the ellipse, and the expression for the ordinate of the upper half of the ellipse is obtained by solving this equation . Relying on this ordinate expression to construct the total area function of the symmetric rectangle inscribed in the ellipse: ; Where S(x) represents the total area of the inscribed rectangle when the x-coordinate is x, and the coefficient 4 comes from the symmetrical extension of the rectangle in the first quadrant of the ellipse to the four quadrants; then, the derivative of the area function is obtained by taking the first derivative with respect to the independent variable x, and an equation with a derivative equal to zero is constructed to find the extreme critical point. After solving, the unique effective positive critical point is obtained. The x-axis corresponds to the location where the area of the rectangle reaches its extreme value. By substituting this critical point back into the area function and simplifying the calculation, the maximum area identity is derived. , This represents the maximum area that can be obtained by inscribing a symmetrical rectangle within an ellipse.
[0055] After completing the analytical derivation, Diophantine integer constraints are further applied to enumerate feasible numerical solutions. A new symbol 'c' is added to represent the maximum area of the rectangle, and 'c' is limited to a positive integer. The equation constraint 2ab = c is established, and geometric domain constraints are superimposed: the major semi-axis of the ellipse is greater than the minor semi-axis (i.e., a > b), the minor semi-axis has a value greater than 0, and a, b, and c must all be integers. To prevent unbounded infinite traversal, the traversal interval of the semi-axis is limited to satisfy... The algorithm iterates through all combinations of b from 1 to 9 and a from b+1 to 10, calculating the maximum area c using the relation c=2ab. All feasible parameter combinations are collected, and in this embodiment, a solution is obtained: a=3, b=1, c=6. This symbolic derivation and constraint solution logic can also be implemented using an open-source computing website that supports constraint input; inputting the corresponding equations and constraints will yield the same parameter values.
[0056] Please see Figure 9 This application also provides a dynamic science question-generating system based on knowledge divergence and difficulty routing, which can implement the above-mentioned method. The system includes: The acquisition module is used to acquire the starting knowledge points and the target difficulty threshold; A computation module is constructed to build an abstract syntax tree based on the starting knowledge points and the target difficulty threshold, and to perform calculations to obtain the initial inference complexity index. The incremental estimation module is used to sequentially perform knowledge neighborhood divergence, inference complexity index incremental estimation, and routing decision processing on the difficulty input parameters to obtain the selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold. The extraction and verification module is used to verify the difficulty verification parameters based on the selected logical knowledge points, operation instructions and abstract syntax tree, and obtain the fixed logical path; The reverse solving module is used to reverse solve the abstract syntax tree corresponding to the fixed logic path based on the symbol engine to obtain the specific numerical parameters of the problem; The mapping and rendering module is used to perform scene mapping and rendering processing on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer.
[0057] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0058] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0059] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0060] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 101 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 102 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 102 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 102 and is called and executed by the processor 101 using the methods described in the embodiments of this application. Input / output interface 103 is used to implement information input and output; The communication interface 104 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 105 transmits information between various components of the device (e.g., processor 101, memory 102, input / output interface 103, and communication interface 104); The processor 101, memory 102, input / output interface 103 and communication interface 104 are connected to each other within the device via bus 105.
[0061] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0062] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0063] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0064] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0065] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0066] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0067] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0068] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0069] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0070] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0072] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0073] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0074] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A dynamic science question-generating method based on knowledge divergence and difficulty routing, characterized in that, The method includes the following steps: Obtain the starting knowledge points and the target difficulty threshold; An abstract syntax tree is constructed and calculated based on the starting knowledge points and the target difficulty threshold to obtain the initial reasoning complexity index. The difficulty input parameters are sequentially processed through knowledge neighborhood divergence, inference complexity index increment estimation, and routing decision processing to obtain selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold; Based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree, the difficulty verification parameters are verified to obtain a fixed logical path. The symbol engine is used to reverse solve the abstract syntax tree corresponding to the solidified logical path to obtain the specific numerical parameters of the problem. The abstract syntax tree and the specific numerical parameters of the question are processed by scene mapping rendering to obtain the natural language question stem and standard answer.
2. The method according to claim 1, characterized in that, The abstract syntax tree is constructed and calculated based on the starting knowledge points and the target difficulty threshold to obtain the initial inference complexity index. Includes the following steps: The starting knowledge points are processed for knowledge point level and domain identification to obtain knowledge point metadata. The initial abstract syntax tree is generated and its difficulty is calculated based on the knowledge point metadata and the target difficulty threshold to obtain the initial inference complexity index.
3. The method according to claim 1, characterized in that, The process of sequentially performing knowledge neighborhood divergence, inference complexity exponential increment estimation, and routing decision processing on the difficulty input parameters to obtain the selected logical knowledge points and operation instructions includes the following steps: The knowledge point set is subjected to knowledge neighborhood divergence processing to obtain candidate knowledge points; Heuristic reasoning complexity index increment prediction is performed on the candidate knowledge points, the initial reasoning complexity index, and the target difficulty threshold to obtain the reasoning complexity index increment; The candidate knowledge points, the incremental reasoning complexity index, the initial reasoning complexity index, and the target difficulty threshold are filtered to obtain the selected logical knowledge points and the operation instructions.
4. The method according to claim 3, characterized in that, After obtaining the selected logical knowledge point and the operation instruction, the method further includes the following steps: The difference between the actual inference complexity index increment and the inference complexity index increment is calculated to obtain the estimated deviation. The large model is fed back into the context learning process based on the predicted deviation to obtain an updated large model; the updated large model is used to predict the exponential increment of inference complexity in the next iteration.
5. The method according to claim 4, characterized in that, The updated large model is obtained by performing context learning feedback processing on the large model based on the estimated deviation. Includes the following steps; Based on the predicted bias, the few-sample context examples are constructed to obtain the target context examples; The target context instance is injected into the large model context window to obtain the updated large model.
6. The method according to claim 1, characterized in that, The difficulty verification parameters include a set of knowledge point levels and the total number of domains involved; the step of verifying the difficulty verification parameters based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree to obtain a fixed logical path includes the following steps: The abstract syntax tree is mounted according to the selected logical knowledge points and the operation instructions to obtain the mounted and updated abstract syntax tree. The set of knowledge point levels and the total number of involved fields extracted from the updated abstract syntax tree are subjected to difficulty calculation to obtain the actual difficulty value. The actual difficulty value is compared and judged based on the target difficulty fluctuation range: If the actual difficulty value does not meet the conditions of the target difficulty fluctuation range, then return to perform the knowledge neighborhood divergence for processing; If the actual difficulty value meets the condition of the target difficulty fluctuation range, then the search is truncated to obtain the fixed logical path.
7. The method according to claim 1, characterized in that, The specific numerical parameters of the problem are obtained by reverse solving the abstract syntax tree corresponding to the fixed logical path using the symbol engine. Includes the following steps: The abstract syntax tree corresponding to the solidified logic path is imported according to the symbol engine import interface to obtain the engine-parsable logic object. The engine-parseable logical objects are subjected to integer or rational number constraints and Diophantine equations in reverse processing to obtain the specific numerical parameters of the problem.
8. The method according to claim 1, characterized in that, The process of performing scene mapping and rendering on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer includes the following steps: Implicit conditional mapping is performed on the abstract logic of the abstract syntax tree and the specific numerical parameters of the question to obtain logical material; The logical material is processed to generate business scenario text, resulting in the natural language question stem and the standard answer.
9. A dynamic science question-generating system based on knowledge divergence and difficulty routing, characterized in that, The system includes: The acquisition module is used to acquire the starting knowledge points and the target difficulty threshold; A computation module is constructed to build an abstract syntax tree based on the starting knowledge points and the target difficulty threshold, and to perform calculations to obtain the initial inference complexity index. The incremental estimation module is used to sequentially perform knowledge neighborhood divergence, inference complexity index incremental estimation, and routing decision processing on the difficulty input parameters to obtain the selected logical knowledge points and operation instructions; the difficulty input parameters include the knowledge point set, the initial inference complexity index, and the target difficulty threshold; The extraction and verification module is used to perform verification processing on the difficulty verification parameters based on the selected logical knowledge points, the operation instructions, and the abstract syntax tree to obtain the fixed logical path; The reverse solving module is used to reverse solve the abstract syntax tree corresponding to the solidified logic path based on the symbol engine to obtain the specific numerical parameters of the problem; The mapping and rendering module is used to perform scene mapping and rendering processing on the abstract syntax tree and the specific numerical parameters of the question to obtain the natural language question stem and standard answer.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.
