Display control method and generation method of programming simulation operation question and related products

By breaking down code blocks into large language models and generating questions, combined with displaying variable changes and programming simulation exercises in the output area, the problem of young users understanding the execution order of programming code and variable changes is solved, thus improving learning efficiency.

CN121565043APending Publication Date: 2026-02-24BEIJING SIMING QICHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511771058.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Younger users find it difficult to understand the execution order and variable changes in programming code, especially loop statements and nested class code. Existing teaching exercises are insufficient to visualize the process of program code execution in their minds.

Method used

It provides a method for displaying and controlling programming simulation questions. It breaks down code blocks into blocks and generates questions based on a large language model. The code blocks are triggered sequentially according to the code logic, and the questions are displayed when the code block to be tested is needed. Combined with a variable change display area and an output area, it helps users understand the code logic.

Benefits of technology

It reduces the difficulty of learning code for younger users, improves learning efficiency, enables users to more intuitively understand the code execution order and variable changes, and enhances the learning effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121565043A_ABST
    Figure CN121565043A_ABST
Patent Text Reader

Abstract

The invention provides a display control method and a generation method of programming simulation operation questions and a related product, and relates to the technical field of programming education. The programming simulation run question comprises question codes and questions corresponding to code blocks needing to be investigated in the question codes. The code blocks needing to be investigated are code blocks generating actual operation in the title codes. When the program simulation operation question is used, all code blocks of the question codes are displayed, all the code blocks are sequentially triggered according to the operation logic of the question codes, under the condition that the currently-triggered code blocks are code blocks which are provided with the questions and need to be investigated, the questions are displayed, and after the questions are answered, the next-generation code blocks of the currently-triggered code blocks are allowed to be triggered. According to the method, the understanding difficulty of a user on the change condition of variable and other difficult contents related to actual operation in the whole code running process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of programming education technology, and more specifically, to a method for displaying and controlling programming simulation exercises, a method for generating such exercises, and related products. Background Technology

[0002] Currently, in the field of children's programming education, the age of users is constantly decreasing, with many young children learning programming. However, the current teaching methods in children's programming education mainly consist of fill-in-the-blank, drag-and-drop, connect-the-dots, and code-handling exercises. For younger users, it is difficult to visualize the execution process of program code in their minds, and therefore difficult to understand the internal logic and variable changes. This is especially true for loop statements (such as for-cin) and nested if-else statements; younger users, limited by their cognitive habits, find it even more difficult to understand the internal code execution order, loop counts, and variable changes. Summary of the Invention

[0003] The purpose of this application is to provide a method for displaying and controlling programming simulation exercises, a method for generating such exercises, and related products, in order to reduce the learning difficulty of code for younger users and improve their learning efficiency.

[0004] This application provides a method for displaying and controlling a programming simulation exercise. The programming simulation exercise includes a question code and a question corresponding to a code block that needs to be examined within the question code. The code block that needs to be examined is a code block in the question code that generates the actual operation. The question corresponding to the code block that needs to be examined is generated based on the execution result when the code block that needs to be examined is executed. The method includes: acquiring and displaying all code blocks of the question code; sequentially triggering each code block according to the execution logic of the question code, and when the currently triggered code block is a code block that needs to be examined and has a question set, displaying the question, and after the question is answered, allowing the triggering of the next code block of the currently running code block.

[0005] In the above implementation scheme of this application, a programming simulation exercise is provided. Through the aforementioned display control method, all code blocks of the exercise code are displayed, and each code block is triggered sequentially according to the execution logic of the exercise code. This allows users to understand the sequential execution process of each code block in the exercise code, thereby gaining a more intuitive understanding of the code's execution order and its internal logic. Furthermore, when the currently triggered code block is a code block containing a question, the above implementation scheme of this application will display the question. Since the code block containing the question is the code block that generates the actual operation, it is usually related to variables, and the question corresponding to the code block is generated based on the execution result of that code block. Therefore, by promptly displaying the question when a code block containing a question is triggered, users can learn about the difficult aspects related to variables and actual operations in a timely manner, based on the code's execution order. This reduces the difficulty for users in understanding the changes of variables and other difficult aspects related to actual operations throughout the code's execution process. Therefore, the solution proposed in this application makes it easier for younger users to understand the internal logic of the program code and the changes in variables, which reduces the learning difficulty of the code for younger users and improves learning efficiency.

[0006] Optionally, the code blocks of the question code and the corresponding questions generated from the code blocks to be examined are obtained in the following way: the question code is input into a preset large language model, and a preset requirement description is input, so that the large language model splits the question code into multiple code blocks, and generates corresponding question information for the code blocks to be examined in the code blocks; questions are generated for each code block to be examined based on the question information corresponding to each code block to be examined; wherein, the requirement description describes the code splitting requirements, the question generation object, and the question information generation rules.

[0007] In the above implementation method, by using a large language model to process the question code, it is relatively easy to split the code block and generate questions, without the need to develop additional question code splitting programs, which makes it easier to implement in industrial applications.

[0008] Optionally, there are multiple preset large language models; after the question code is input into each of the large language models, the code blocks of the question code and the corresponding questions generated by the code blocks to be examined are obtained in the following way: the optimal result is selected from the output results of the large language models; the output result includes the split code blocks and the question information corresponding to the code blocks to be examined; the split code blocks and the question information corresponding to the code blocks to be examined in the optimal result are used as the final code blocks and question information. In the above implementation, by using multiple large language models to process simultaneously and selecting the optimal output as the final code block and question information, the impact of an inappropriate selection of a large language model on the final split code block and generated questions can be reduced, thus improving the reliability of the solution.

[0009] Optionally, the output of each large language model includes the output values ​​and / or variable values ​​of each code segment when the question code is run; selecting the optimal result from the outputs of the large language models includes: debugging the question code using a preset debugging tool, reading the output values ​​and / or variable values ​​of each code segment when the question code is run; matching the output values ​​and / or variable values ​​of each code segment in the output of each large language model with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; and determining the output of the large language model with the highest matching degree as the optimal result.

[0010] In the above implementation method, the output values ​​and / or variable values ​​of each code segment when the problem code is running normally are obtained by the debugging tool, and then matched with the output values ​​and / or variable values ​​of each code segment output by various language models. This can achieve a more objective evaluation of the accuracy of the output results of various language models and determine the optimal result more objectively and accurately.

[0011] Optionally, each code block is triggered sequentially according to the execution logic of the question code, including: in response to the triggering operation of any code block, if the previously triggered code block is the code block preceding the previous code block in the execution logic of the question code, then the code block is executed and the triggered code blocks and their corresponding execution results are displayed sequentially in a preset result recording area; if the previously triggered code block is not the code block preceding the previous code block in the execution logic of the question code, then a first prompt message indicating an error in the code execution order is fed back.

[0012] In the above implementation, by controlling that each code block can only execute when the preceding code block of the code block currently executing the trigger operation is last triggered within the question code's execution logic, it is ensured that each code block is triggered sequentially according to the question code's execution logic. Therefore, if the user selects the wrong trigger object when issuing a trigger operation, it will not be triggered correctly, thus strengthening the user's understanding of the question code's execution logic. Simultaneously, by sequentially displaying each triggered code block and its corresponding execution result in a preset result recording area, users can intuitively see the execution order and corresponding results of each code block, aiding their understanding of the question code's execution logic and reducing the difficulty of comprehending the code's internal logic. These two aspects effectively improve the user's learning effect regarding the question code's execution logic.

[0013] Optionally, the method further includes: for any code block, if the execution of the code block causes a change in the value of a variable, then displaying the latest value of the variable in a preset variable change display area.

[0014] In the above implementation, by displaying the latest variable value in a preset variable change display area, users can see the changes every time a variable changes. This allows users to intuitively see the changes in variables during code execution, making it easier to understand the logic of code execution and the relationship between variables. It also helps users learn and understand the internal logic of the program code and the changes in variables.

[0015] Optionally, the method further includes: for any code block containing a cout statement, if the code block is triggered to execute, displaying the execution result of the code block in a preset output area.

[0016] In the above implementation, by displaying the execution result of the code block containing the cout statement in the preset output area, users can intuitively see the result after the program code is executed, which can help users to understand the logic of code execution more easily.

[0017] Optionally, the question includes multiple options, including correct options representing correct execution results and incorrect options representing incorrect execution results.

[0018] In the above implementation method, questions are provided to users in the form of options, which makes the questions more in line with the learning needs of younger users, eliminates the obstacle caused by the lack of typing ability of younger users, and better examines the younger users' understanding of knowledge points.

[0019] Optionally, the question may also include: a second hint; the second hint is used to assist in selecting the correct option.

[0020] In the above implementation method, by setting a second hint in the question, the difficulty of the question is reduced, which is more conducive to guiding users to understand the knowledge points.

[0021] Optionally, the method further includes: displaying a third prompt message if the question remains unanswered after a preset answering time; the third prompt message is used to assist in answering the question; or, displaying the third prompt message if the question remains unanswered after a preset answering time.

[0022] In the above implementation, if the question remains unanswered or incorrectly answered after a preset time limit, a third prompt message is displayed, which can reduce the user's learning frustration and increase learning participation.

[0023] Optionally, at least some of the questions corresponding to the code blocks to be examined may be multiple; when the currently triggered code block is a code block to be examined with questions set, the questions are displayed, and after the questions are answered, the next code block of the currently triggered code block is allowed to be triggered, including: when the currently triggered code block is a code block to be examined with questions set, the first question corresponding to the code block to be examined is displayed, and after the first question is answered, the next question corresponding to the code block to be examined is displayed, until all the questions corresponding to the code blocks to be examined are displayed and answered, and then the next code block of the currently triggered code block is allowed to be triggered.

[0024] In the above implementation method, by setting multiple questions, different tests can be conducted on multiple knowledge points or a single knowledge point can be tested repeatedly, thereby improving the learning effect.

[0025] This application embodiment also provides a method for generating programming simulation questions, including: obtaining question code; splitting the question code into multiple code blocks, and generating corresponding questions for the code blocks that need to be examined in the code blocks; the code blocks that need to be examined are the code blocks in the question code that generate actual operations; the questions corresponding to the code blocks that need to be examined are generated based on the running results when the code blocks that need to be examined are executed; the programming simulation questions include question code and questions corresponding to the code blocks that need to be examined in the question code; the programming simulation questions are used for display, wherein: when each code block of the programming simulation questions is displayed, it is allowed to be triggered sequentially according to the running logic of the question code, and if the currently triggered code block is a code block that needs to be examined with questions set, then the questions corresponding to the code blocks that need to be examined are displayed, and after the questions are answered, the next code block of the currently triggered code block is allowed to be triggered.

[0026] In the above implementation scheme of this application, by splitting the question code and generating questions for the code blocks to be examined within the question code, the programming simulation questions required by this application can be obtained. Then, by displaying the question code and triggering each code block sequentially according to the execution logic of the question code, users can understand the sequential execution process of each code block in the question code, thus gaining a more intuitive understanding of the code's execution order and its internal logic. Furthermore, by displaying the questions when the currently triggered code block is a code block with questions set for examination, and since the code block to be examined is the code block that generates actual operations in the question code, usually related to variables, and the questions corresponding to the code block to be examined are generated based on the execution results of that code block, by promptly displaying the questions for users to learn when a code block with questions set for examination is triggered, the learning of difficult content related to variables and actual operations can be achieved in a timely manner in conjunction with the code's execution order. This reduces the difficulty for users to understand the changes of variables and other difficult content related to actual operations throughout the code's execution process. Therefore, the solution proposed in this application makes it easier for younger users to understand the internal logic of the program code and the changes in variables, which reduces the learning difficulty of the code for younger users and improves learning efficiency.

[0027] Optionally, the question code is split into multiple code blocks, and corresponding questions are generated for the code blocks to be examined within the code blocks. This includes: inputting the question code into a preset large language model and inputting a preset requirement description, so that the large language model splits the question code into multiple code blocks and generates corresponding question information for the code blocks to be examined within the code blocks; generating questions corresponding to each code block to be examined based on the question information corresponding to each code block to be examined; wherein, the requirement description describes code splitting rules, question generation objects, and question generation rules.

[0028] In the above implementation method, by using a large language model to process the question code, it is relatively easy to split the code block and generate questions, without the need to develop additional question code splitting programs, which makes it easier to implement in industrial applications.

[0029] Optionally, there are multiple preset large language models; the method further includes: selecting the optimal result from the output results of each large language model; the output result includes the split code blocks and the question information corresponding to the code blocks to be examined; the split code blocks and the question information corresponding to the code blocks to be examined in the optimal result are used as the final code blocks and question information.

[0030] In the above implementation, by using multiple large language models to process simultaneously and selecting the optimal output as the final code block and question information, the impact of an inappropriate selection of a large language model on the final split code block and generated questions can be reduced, thus improving the reliability of the solution.

[0031] Optionally, the output of each large language model includes the output values ​​and / or variable values ​​of each code segment when the question code is run; selecting the optimal result from the outputs of the large language models includes: debugging the question code using a preset debugging tool, reading the output values ​​and / or variable values ​​of each code segment when the question code is run; matching the output values ​​and / or variable values ​​of each code segment in the output of each large language model with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; and determining the output of the large language model with the highest matching degree as the optimal result.

[0032] In the above implementation method, the output values ​​and / or variable values ​​of each code segment when the problem code is running normally are obtained by the debugging tool, and then matched with the output values ​​and / or variable values ​​of each code segment output by various language models. This can achieve a more objective evaluation of the accuracy of the output results of various language models and determine the optimal result more objectively and accurately.

[0033] Optionally, the question information includes the correct and incorrect execution results of the corresponding code block to be examined; generating questions corresponding to each code block to be examined based on the question information includes: converting the correct and incorrect execution results into structured questions.

[0034] This application embodiment also provides a display control system for programming simulation exercises, including: a system backend, configured to: acquire question code, split the question code into multiple code blocks, and generate corresponding questions for the code blocks to be examined; the code blocks to be examined are code blocks in the question code that generate actual operations; the questions corresponding to the code blocks to be examined are generated based on the running results when the code blocks to be examined are executed; the programming simulation exercises include the question code and the questions corresponding to the code blocks to be examined in the question code; and a system frontend, configured to: display all code blocks of the question code, trigger each code block sequentially according to the running logic of the question code, and when the currently triggered code block is a code block to be examined with a question set, display the question, and after the question is answered, allow triggering the next code block of the currently triggered code block.

[0035] This application embodiment also provides a display control device for programming simulation exercises. The programming simulation exercises include question code and questions corresponding to the code blocks to be examined in the question code. The code blocks to be examined are the code blocks in the question code that generate actual operations. The questions corresponding to the code blocks to be examined are generated based on the running results when the code blocks to be examined are executed. The device includes: an acquisition and display module, used to acquire and display all code blocks of the question code; and a control module, used to trigger each code block sequentially according to the running logic of the question code, and when the currently triggered code block is a code block to be examined with a question set, to display the question, and after the question is answered, to allow the triggering of the next code block of the currently triggered code block.

[0036] This application embodiment also provides a device for generating programming simulation exercise questions, including: an acquisition module for acquiring question code; a processing module for splitting the question code into multiple code blocks and generating corresponding questions for the code blocks to be examined; the code blocks to be examined are code blocks in the question code that generate actual operations; the questions corresponding to the code blocks to be examined are generated based on the execution results when the code blocks to be examined are executed; the programming simulation exercise questions include question code and questions corresponding to the code blocks to be examined in the question code; the programming simulation exercise questions are used for display, wherein: when each code block of the programming simulation exercise questions is displayed, it is allowed to be triggered sequentially according to the execution logic of the question code, and if the currently triggered code block is a code block to be examined with a question set, then the question corresponding to the code block to be examined is displayed, and after the question is answered, the next code block of the currently triggered code block is allowed to be triggered.

[0037] This application also provides an electronic device, including a processor and a memory, wherein the processor is configured to execute one or more programs stored in the memory to implement any of the methods described above.

[0038] This application also provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement any of the methods described above.

[0039] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the methods described above. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 A basic flowchart illustrating a method for generating programming simulation questions, provided in an embodiment of this application; Figure 2 A basic flowchart illustrating a display control method for a programming simulation exercise provided in this application embodiment. Figure 3 A schematic diagram illustrating the display of a code block and a title provided in an embodiment of this application; Figure 4 A schematic diagram of the basic structure of a display control system for a programming simulation exercise provided in this application embodiment; Figure 5 A schematic diagram of the basic structure of a display control device for a programming simulation exercise provided in this application embodiment; Figure 6 A schematic diagram of the basic structure of a programming simulation problem generation device provided in this application embodiment; Figure 7 This is a schematic diagram of the basic structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0042] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0043] As the age of users continues to decrease, the current question formats used in children's programming education are not suitable for young users. Therefore, this application proposes a new question format, namely programming simulation questions. By simulating the execution of code and the changes in variables, the execution order of code is displayed to users in a more intuitive way, thereby reducing the difficulty of learning code for young users and improving learning efficiency.

[0044] Therefore, this application provides a method for generating programming simulation questions and a method for controlling the display of programming simulation questions.

[0045] See also Figure 1 As shown, Figure 1 This is a basic flowchart illustrating the method for generating programming simulation challenges provided in this application embodiment, including: S101: Get the problem code.

[0046] In this embodiment of the application, the question code may be provided in advance by the teacher or engineer.

[0047] In this embodiment of the application, the problem code may contain loop statements and / or nested code to enable users to learn code that is not easy to understand, such as loop statements and / or nested code.

[0048] S102: Break down the problem code into multiple code blocks, and generate corresponding problems for the code blocks that need to be tested within each code block.

[0049] In some optional embodiments of this application, the question code can be input into a preset large language model, along with a preset requirement description. The large language model then splits the question code into multiple code blocks, and generates corresponding question information for each code block to be examined. Then, questions corresponding to each code block to be examined are generated based on the question information corresponding to each code block to be examined.

[0050] In the embodiments of this application, the description includes code splitting requirements, question generation objects, and question information generation rules, so that the large language model can split the question code into code blocks according to our requirements, determine the code blocks to be examined in the split code blocks, and generate the corresponding question information.

[0051] In this embodiment of the application, the question generation object, i.e., the code block to be examined, is the code block in the question code that generates the actual operation. For example, for the following question code: #include <iostream> using namespace std; int main() { int a; int n = 0; int m = 0; for (int i = 1; i<= 5; i++) { cin>>a; if (a>5) { n++; } else { m++; } if (a>5&&i<3) { cout< <i<<endl; } cout< <n<<endl; cout< <m<<endl; } return 0; } Taking the `else` block as an example, this is merely code describing a situation and does not perform any actual operation, so it is not considered a code block to be examined. However, taking `int n = 0` as an example, this is code that assigns the value 0 to the variable `n`, which involves an assignment operation, so it can be considered a code block to be examined.

[0052] In this embodiment of the application, the question information refers to the information required to generate the question, which may include the correct execution result and the incorrect execution result of the code block.

[0053] In this embodiment, the code block can be run in a normal environment (i.e., an environment where the code's execution environment, calling relationships, input parameters, etc., are all correct) to obtain the correct execution result of the code block. Furthermore, incorrect execution results can be generated based on the correct execution result. The correct execution result of the code block can be the output result after the code block is executed, the variable value of the variable currently used by the code block, or the result of whether the current code block is true (for example, for the code block i<= 5, the correct execution result could be whether "i<= 5" is true).

[0054] In the embodiments of the present application, it may be an incorrect operation result generated based on a given fixed generation method from a correct operation result. For example, it is set that the incorrect operation results are respectively obtained by subtracting 1, adding 1, adding 2 from the correct operation result, etc. Another example is generating the opposite result based on the original correct operation result (for example, if the current "i <= 5" holds, the opposite result can be generated as "does not hold"). In addition, in the embodiments of the present application, it may be that an incorrect operation result is randomly generated at any time based on the correct operation result.

[0055] In addition, in some optional embodiments of the embodiments of the present application, the incorrect operation result may not be generated based on the incorrect operation result either. Instead, the code block can be run in an incorrect operating environment (such as setting an incorrect call relationship, giving incorrect input parameters, setting an incorrect loop count, etc.) to obtain the incorrect operation result.

[0056] To better understand the solution of the embodiments of the present application, taking the above example of inputting the problem code into a large language model, the description can be as follows: "Input the variable values of a in sequence: 4, 8, 2, 5, 9. For the above input code, please simulate the program operation. The minimum step is a valid code expression, and it is required to output a table. The table header is: Step, Line Number, Current Code Block, Variable List (format requirement: a: 5, b: 6), Output Value (only care about the content of cout, if there is no cout, display blank), Option 1, Option 2, Option 3, Option 4, Answer, Answer Abbreviation. The detailed requirements are as follows: 1. Start from main(), excluding the line where main is located.

[0057] 2. If the variable is not initialized, display a:?.

[0058] 3. Consider a format like cout << n << endl; as one step.

[0059] 4. Consider else as one step.

[0060] 5. Do not separately mark the iteration count in the table.

[0061] 6. Only record the standard output for the output value.

[0062] 7. For a statement like for(int i = 1; i <= 6; i++), disassemble it into three steps according to the ";" sign, which are int i = 1, i <= 6, i++.

[0063] 8. For an if statement without else, there is no need to list the hidden else.

[0064] 9. { that occupies a single line or} that occupies a single line is not considered as one step.

[0065] 10. For each step of assigning a value to a variable in a non-Boolean expression, if the variable will be assigned a value in this step (including steps that assign a value of 0), then present four options for choosing the assignment result. One of these options is correct, and the other three are incorrect. These options are randomly placed into options 1, 2, 3, and 4. The correct option should not always be included. The correct option content should be included in the answer (it must be the content corresponding to the option). The answer is simply called an empty answer.

[0066] For example: if int n = 0;, then option 1 is n=3, option 2 is n=2, option 3 is n=0, option 4 is n=1, and the answer is n=0. The answer is simply blank.

[0067] 11. For each step of a Boolean expression, two options are given: "true" or "false" concatenated with the expression content. The answer is the correct option value. For example, if i <= 5, option 1 is "i <= 5 is true" and option 2 is "i <= 5 is false". The answer is "i <= 5 is true", which can be simply referred to as "true".

[0068] 12. The line numbers of the code block should be checked five times to ensure that the line numbers are correct.

[0069] 13. Preserve spaces in the code block to ensure that the strings in the original project file are matched correctly.

[0070] 14. If it is an endl file containing a newline character, please append \n after the content of cout.

[0071] 15. Complex Boolean expressions can be broken down into sub-steps and parent steps. For example, `if (a>5&&i<3)` can be broken down into three steps: `a>5` and `i<3`. Therefore, based on the existing large language model, the following table can be output:

[0072] The data in the columns for Option 1, Option 2, Option 3, Option 4, Answer, and Answer Abbreviation constitutes the question information and can be used to generate the final question.

[0073] It is understood that the above is only an example given in the embodiments of this application. In actual application, the output format of the large language model may not adopt the above table format or the above requirements description, but may be replaced with other expressions, as long as they clearly explain the code splitting requirements and the question generation objects and question information generation rules.

[0074] In this embodiment of the application, when generating questions corresponding to each code block to be examined based on the question information corresponding to each code block to be examined, the above question information (including correct running results and incorrect running results) can be structured and converted into structured questions that can be displayed and selected by the user.

[0075] In some optional embodiments of this application, multiple large language models can be used to process the question code. In this case, the optimal result can be selected from the outputs of the various language models, and then the split code blocks and question information corresponding to the code blocks to be examined from the optimal result are used as the final code blocks and question information. This reduces the impact of an inappropriately selected large language model on the final split code blocks and generated questions, improving the reliability of the solution.

[0076] For example, a pre-defined debugging tool (such as GDB) can be used to debug the problem code, reading the output values ​​and / or variable values ​​of each code segment when the problem code is run. Then, the output values ​​and / or variable values ​​of each code segment in the output results of various language models are matched with the output values ​​and / or variable values ​​of each code segment read by the debugging tool. The output result of the language model with the highest matching degree is determined as the optimal result. This allows for a more objective evaluation of the accuracy of the output results of various language models, and a more objective and accurate determination of the optimal result.

[0077] Of course, in this embodiment of the application, instead of using a large language model to split the question code and generate the corresponding question information for the code blocks to be examined, any other method that can modularize the question code and generate the corresponding question information for the code blocks to be examined can be used.

[0078] In this embodiment of the application, one or more questions can be generated for each code block to be examined, or one or more questions can be generated for multiple adjacent code blocks to be examined.

[0079] In this embodiment, after obtaining the code blocks of the problem code and the corresponding problems for each code block to be examined, a programming simulation exercise is obtained. Subsequently, the display of the programming simulation exercise can be controlled to realize teaching or assessment based on it.

[0080] See also Figure 2 As shown, Figure 2 This is a basic flowchart illustrating the display control method for the programming simulation exercise provided in this embodiment, including: S201: Get and display all code blocks of the problem code in the programming simulation exercise.

[0081] In the embodiments of this application, the execution entities of the method for generating programming simulation questions and the method for controlling the display of programming simulation questions can be the same device or different devices.

[0082] When the execution entities of the programming simulation test generation method and the programming simulation test display control method are the same device, the device can retrieve all code blocks of the question code in the previously generated programming simulation test and the questions corresponding to each code block to be examined from its own storage device.

[0083] When the entities executing the method for generating programming simulation questions and the method for controlling the display of programming simulation questions are different devices, the device executing the method for controlling the display of programming simulation questions can obtain programming simulation questions by actively requesting them from the device executing the method for generating them, or by actively sending the programming simulation questions to the device executing the method for controlling the display of programming simulation questions after they have been generated.

[0084] S202: Trigger each code block sequentially according to the execution logic of the question code. If the currently triggered code block is a code block that needs to be examined and a question is set, display the question. After the question is answered, the next code block of the currently triggered code block can be triggered.

[0085] In one optional embodiment of this application, the next code block of the currently triggered code block can be triggered immediately after the first answer to a question (regardless of whether it is correct or not). In this optional embodiment, after the question code has been completely executed, the correctness of each of the user's answers can be evaluated based on the correct answer, thereby obtaining the user's evaluation of the answers to all questions, which can be used in scenarios such as examinations.

[0086] In another optional implementation of this application, the next code block of the currently triggered code block can only be triggered after the question has been correctly answered. This ensures that the user answers each question correctly, which can enhance the learning effect and can be used in user learning scenarios.

[0087] In one optional embodiment of this application, each code block can be configured to be actively selected for triggering, so that after displaying each code block, the user can select the code block that needs to be triggered for execution.

[0088] In this optional implementation, the triggering of each code block can be conditionally restricted. When any code block is triggered, in response to the triggering operation, it can be determined whether the previously triggered code block is the previous code block in the execution logic of the problem code.

[0089] If the previously triggered code block is not the preceding code block in the execution logic of the challenge code, it means that the code block selected in the current triggering operation does not match the overall code execution order of the challenge code. Therefore, a first prompt message indicating an error in the code execution order can be provided to inform the user that the wrong code block has been selected. For example, the first prompt message may include, but is not limited to, one or more of the following: screen flash, pre-set prompt sound, vibration, displaying an error message.

[0090] If the previously triggered code block is the code block preceding the code block in the execution logic of the question code, it means that the code block selected by the current triggering operation is consistent with the overall code execution order of the question code. At this time, the code block can be executed and the triggered code blocks and their corresponding execution results will be displayed sequentially in the preset result recording area.

[0091] In this way, by controlling the execution of each code block to ensure that the preceding code block in the question's code's execution logic is triggered only when it was last triggered, it guarantees that each code block is triggered sequentially according to the question's code's execution logic. Therefore, if the user selects the wrong trigger object when issuing a trigger operation, it will not be triggered correctly, thus strengthening the user's understanding of the question's code's execution logic. Simultaneously, by sequentially displaying the triggered code blocks and their corresponding execution results in a preset results recording area, users can intuitively see the execution order and corresponding results of each code block, aiding their understanding of the question's code's execution logic and reducing the difficulty of comprehending the code's internal logic. These two aspects effectively improve the user's learning effect on the question's code's execution logic.

[0092] In other embodiments of this application, each code block can also be automatically triggered and executed sequentially according to the execution logic of the question code. However, if the currently triggered code block is a code block that requires examination and has a question set, the question must be answered first before the next code block is automatically triggered and executed.

[0093] Similarly, in this implementation, the triggered code blocks and their corresponding execution results can be displayed sequentially in a preset result recording area.

[0094] Furthermore, in this implementation, the currently triggered code block can be displayed differently, such as highlighted or flashing, so that users can intuitively understand the execution order of each code block directly based on the display of the code blocks, rather than relying on the changes recorded in the result record area, thereby helping users understand the running logic of the problem code.

[0095] In this embodiment of the application, the questions corresponding to the code blocks to be examined can be provided in the form of multiple-choice questions. For example, see... Figure 3 As shown, a question can include multiple options, including correct options representing the right result and incorrect options representing the wrong result. When the code block to be tested is triggered, the corresponding question can be displayed next to the code block for the user to choose from. This method of providing questions through options makes the questions more suitable for the learning needs of younger users, eliminating the obstacle of limited typing skills and better assessing their understanding of the knowledge points.

[0096] In some optional embodiments of this application, the questions may also include second prompt information to assist in selecting the correct option, thereby reducing the difficulty of the questions and making it easier to guide users to understand the knowledge points. Of course, in other optional embodiments, the questions may not have the second prompt information.

[0097] In some optional embodiments of this application, a third prompt message may be displayed if the question remains unanswered after a preset time limit. Alternatively, a third prompt message may be displayed if the question remains unanswered after a preset time limit. This third prompt message is used to assist in answering the question. This can reduce user frustration and increase learning engagement.

[0098] The preset answering time can be set by engineers or teachers according to actual needs.

[0099] In some optional embodiments of this application, multiple corresponding questions can be generated for at least some of the code blocks that need to be examined. In this case, if the currently triggered code block is a code block that needs to be examined and has questions set, the first question corresponding to the code block that needs to be examined can be displayed. After the first question is answered, the next question corresponding to the code block that needs to be examined can be displayed, and so on, until all questions corresponding to the code block that needs to be examined have been displayed and answered, at which point the next code block of the currently triggered code block can be allowed to be triggered. In this way, by setting multiple questions, different examinations of multiple knowledge points or repeated examinations of a single knowledge point can be achieved, thereby improving the learning effect.

[0100] In some optional embodiments of this application, for any code block, if the value of a variable changes when the code block is triggered for execution, the latest value of the variable can be displayed in a preset variable change display area. This way, users can see the change in the variable change display area every time a variable changes, allowing them to intuitively see the changes in variables during code execution. This makes it easier for users to understand the relationship between the code execution logic and the variables, facilitating their learning and understanding of the program code's internal logic and variable changes.

[0101] In some optional embodiments of this application, for any code block containing a cout statement (indicating that data needs to be output after the code block is executed), the execution result of the code block can be displayed in a preset output area, so that users can intuitively see the result after the program code is executed, which can help users to more easily understand the logic of code execution.

[0102] In some optional embodiments of this application, in order to enhance the fun and increase the user's learning enthusiasm, a preset animation can be displayed when the user answers correctly for a series of times, such as cheering or displaying how many times the user has answered correctly in a series, to encourage the user.

[0103] Furthermore, in some optional embodiments of this application, a mechanism such as settlement coins can be set up to link the final settlement coin amount to whether the level is cleared (i.e., all questions are answered correctly and all code blocks are triggered correctly) and the number of consecutive correct answers, thereby increasing user participation and increasing the cost of random selection for users. For example, the final settlement coin can be set to equal the level completion reward (i.e., the number of coins given for clearing the level) + the consecutive correct answer bonus (i.e., the coins rewarded for different consecutive correct answers).

[0104] In some optional embodiments of this application, the user's answering behavior can also be monitored, and questions that the user answers incorrectly or selects the wrong code block, or questions that the user answers incorrectly more than a preset threshold number of times, or questions that the user fails to select the correct code block for n consecutive times (n is a preset constant) can be captured and sent to the backend. The backend can then perform error clustering, which makes it easier for teachers to identify the user's learning weaknesses.

[0105] Based on the same inventive concept, this application also provides a display control system for programming simulation exercises, see [link to relevant documentation]. Figure 4 As shown, this includes the system backend and the system frontend. Among them: The system backend is used to: obtain the question code, split the question code into multiple code blocks, and generate corresponding questions for the code blocks that need to be examined in the code blocks; the code blocks that need to be examined are the code blocks in the question code that generate actual operations; the questions corresponding to the code blocks that need to be examined are generated based on the running results when the code blocks that need to be examined are executed; the programming simulation running questions include the question code and the questions corresponding to the code blocks that need to be examined in the question code.

[0106] The system front-end is used to: display all code blocks of the question code, trigger each code block sequentially according to the execution logic of the question code, and when the currently triggered code block is a code block that needs to be examined and has a question set, display the question, and after the question is answered, allow the triggering of the next code block of the currently triggered code block.

[0107] In other words, the generation of programming simulation questions can be executed by the system backend, while the display control of programming simulation questions can be executed by the system frontend.

[0108] In this embodiment, the system front-end and system back-end can be located in the same electronic device. Alternatively, the system front-end and system back-end can belong to different electronic devices; for example, the system back-end can be a server, while the system front-end can be a terminal device used by the user.

[0109] Based on the solution provided in this application, by generating programming simulation questions and displaying all code blocks of the question code using the aforementioned display control method, and triggering each code block sequentially according to the execution logic of the question code, users can understand the sequential execution process of each code block in the question code, thereby gaining a more intuitive understanding of the code's execution order and its internal logic. Furthermore, the above implementation of this application displays the question when the currently triggered code block is a code block containing a question for assessment. Since the code block for assessment is the code block in the question code that generates actual operations, it is usually related to variables, and the question corresponding to the code block for assessment is generated based on the execution result of that code block. Therefore, by promptly displaying the question for user learning when a code block containing a question for assessment is triggered, the learning of difficult content related to variables and actual operations can be achieved in a timely manner, combined with the code's execution order. This reduces the difficulty for users in understanding the changes of variables and other difficult content related to actual operations throughout the code's execution process. Therefore, the solution proposed in this application makes it easier for younger users to understand the internal logic of the program code and the changes in variables, which reduces the learning difficulty of the code for younger users and improves learning efficiency.

[0110] To facilitate understanding of the solutions in this application, the following example illustrates the embodiments of this application using a specific system backend generation process and system frontend display as examples.

[0111] First, the system backend retrieves the prompts and question codes submitted by engineers or teachers, along with the required descriptions, and then inputs them into multiple large language models. The backend can provide prompt templates for engineers or teachers, allowing them to input their desired descriptions and obtain the final prompts.

[0112] Then, GDB is used to automatically set debug breakpoints for each line of the problem code, and GDB is run to debug the problem code and read variable values. Each variable value is then matched with the variable values ​​in the corresponding lines of the problem code output by various language models. The output of the language model with the highest matching degree is used as the final result.

[0113] The output of the largest language model with the highest matching degree is structured and converted into code blocks and questions that can be displayed and selected, and then sent to the front end.

[0114] In this embodiment of the application, the front-end display may include a result recording area, a variable change display area, an output area, and a code selection area.

[0115] The problem code is displayed as a code block in the code selection area. Users can read the problem code and the problem in this area, select the code block and the options in the problem, and the display of prompts is also supported.

[0116] The results log area displays the correct order of the code selected by the user and the execution results of the corresponding code.

[0117] The variable change display area is used to display the latest value of a variable in real time when the execution of the current code block causes a change in the variable value, while retaining the value of the variable in previous iterations.

[0118] The output area displays the results of the code block containing the cout statement after it has been executed.

[0119] Based on the above method, the "execution steps → result changes" linkage operation in the code can be realized, which helps users establish a structured thinking of "code sequence - condition - loop", improve the ability to deduce complex code logic, effectively reduce the learning difficulty and improve learning efficiency.

[0120] Based on the same inventive concept, this application also provides a display control device 500 for programming simulation exercises and a generation device 600 for programming simulation exercises. Please refer to... Figure 5 and Figure 6 As shown, Figure 5 It shows the use of Figure 2 The method shown is a programming simulation running problem display control device. Figure 6 It shows the use of Figure 1 The illustrated method is a programming simulation problem generation device. It should be understood that the specific functions of devices 500 and 600 are described above; to avoid repetition, detailed descriptions are omitted here. Devices 500 and 600 include at least one software function module that can be stored in memory or embedded in the operating system of devices 500 and 600 in the form of software or firmware. Specifically: See Figure 5 As shown, the device 500 includes: an acquisition and display module 501 and a control module 502. Wherein: The acquisition and display module 501 is used to acquire and display all code blocks of the problem code in the programming simulation exercise; the programming simulation exercise includes problem code and the problem corresponding to the code block to be examined in the problem code; the code block to be examined is the code block in the problem code that generates the actual operation; the problem corresponding to the code block to be examined is generated based on the running result when the code block to be examined is executed. The control module 502 is used to trigger each of the code blocks sequentially according to the running logic of the question code, and when the currently triggered code block is a code block that needs to be examined and has a question set, it displays the question, and after the question is answered, it allows the triggering of the next code block of the currently triggered code block.

[0121] In one feasible embodiment of this application, the code blocks of the question code and the corresponding questions generated from the code blocks to be examined are obtained in the following way: the question code is input into a preset large language model and a preset requirement description is input, so that the large language model splits the question code into multiple code blocks and generates corresponding question information for the code blocks to be examined in the code blocks; questions corresponding to each code block to be examined are generated according to the question information corresponding to each code block to be examined; wherein, the requirement description describes the code splitting requirements, the question generation object, and the question information generation rules.

[0122] In one optional embodiment of this feasible implementation, there are multiple preset large language models; after the question code is input into each of the large language models, the code blocks of the question code and the corresponding questions generated by the code blocks to be examined are obtained in the following way: the optimal result is selected from the output results of the large language models; the output result includes the split code blocks and the question information corresponding to the code blocks to be examined; the split code blocks and the question information corresponding to the code blocks to be examined in the optimal result are used as the final code blocks and question information.

[0123] In one exemplary embodiment of this optional embodiment, the output of each of the large language models includes the output values ​​and / or variable values ​​of each code segment when the question code is run; Selecting the optimal result from the outputs of various language models includes: debugging the problem code using a preset debugging tool, reading the output values ​​and / or variable values ​​of each code segment when the problem code is run; matching the output values ​​and / or variable values ​​of each code segment in the outputs of each of the major language models with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; and determining the output result of the major language model with the highest matching degree as the optimal result.

[0124] In one feasible embodiment of this application, the control module 502 is specifically used to: respond to the triggering operation of any code block, if the previously triggered code block is the code block preceding the code block in the running logic of the question code, then trigger the execution of the code block and sequentially display the triggered code blocks and their corresponding execution results in a preset result recording area; if the previously triggered code block is not the code block preceding the code block in the running logic of the question code, then provide feedback with a first prompt message indicating an error in the code execution order.

[0125] In one feasible embodiment of this application, the control module 502 is further configured to: for any code block, if the value of a variable changes when the code block is triggered for execution, then display the latest variable value in a preset variable change display area.

[0126] In one feasible embodiment of this application, the control module 502 is further configured to: for any code block containing a cout statement, if the code block is triggered to execute, display the execution result of the code block in a preset output area.

[0127] In one feasible embodiment of this application, the title includes: multiple options, including a correct option representing a correct running result and an incorrect option representing an incorrect running result; the incorrect running result is generated based on the correct running result.

[0128] In this feasible embodiment, the question further includes: a second prompt message; the second prompt message is used to assist in selecting the correct option.

[0129] In one feasible embodiment of this application, the control module 502 is further configured to: display a third prompt message if the question remains unanswered after a preset answering time; the third prompt message is used to assist in answering the question; or, display the third prompt message if the question remains unanswered after a preset answering time.

[0130] In one feasible implementation of this application, at least some of the questions corresponding to the code blocks to be examined are multiple; the control module 502 is specifically used to: when the currently triggered code block is a code block to be examined with questions set, display the first question corresponding to the code block to be examined, and after the first question is answered, display the next question corresponding to the code block to be examined, until all questions corresponding to the code block to be examined are displayed and answered, and then allow the next code block of the currently triggered code block to be triggered.

[0131] See Figure 6 As shown, the device 600 includes: an acquisition module 601 and a processing module 602. Wherein: Module 601 is used to retrieve the question code; Processing module 602 is used to split the question code into multiple code blocks and generate corresponding questions for the code blocks that need to be examined within the code blocks; the code blocks that need to be examined are the code blocks in the question code that generate actual operations; the questions corresponding to the code blocks that need to be examined are generated based on the execution results when the code blocks that need to be examined are executed; the programming simulation exercise includes the question code and the questions corresponding to the code blocks that need to be examined within the question code; the programming simulation exercise is used for display, wherein: When each code block of the programming simulation exercise is displayed, it is allowed to be triggered sequentially according to the execution logic of the exercise code. If the currently triggered code block is a code block that needs to be examined and a question is set, then the question corresponding to the code block that needs to be examined is displayed. After the question is answered, the next code block of the currently triggered code block is allowed to be triggered.

[0132] In one feasible embodiment of this application, the processing module 602 is specifically used to: input the question code into a preset large language model and input a preset requirement description, so that the large language model splits the question code into multiple code blocks and generates corresponding question information for the code blocks to be examined in the code blocks; generate questions corresponding to each code block to be examined according to the question information corresponding to each code block to be examined; wherein, the requirement description describes code splitting rules, question generation objects, and question generation rules.

[0133] In one optional embodiment of this feasible implementation, the preset large language model is multiple; the processing module 602 is further specifically used to: select the optimal result from the output results of the large language models; the output result includes the split code block and the question information corresponding to the code block to be examined; and use the split code block and the question information corresponding to the code block to be examined in the optimal result as the code block and question information to be used in the end.

[0134] In one exemplary embodiment of this optional embodiment, the output of each large language model includes the output values ​​and / or variable values ​​of each code segment when the question code is run; the processing module 602 is specifically used to: debug the question code using a preset debugging tool, and read the output values ​​and / or variable values ​​of each code segment when the question code is run; match the output values ​​and / or variable values ​​of each code segment in the output of each large language model with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; and determine the output of the large language model with the highest matching degree as the optimal result.

[0135] In one feasible embodiment of this application, the question information includes the correct execution result of the corresponding code block to be examined and the incorrect execution result generated based on the correct execution result; the processing module 602 is specifically used to: convert the correct execution result and the incorrect execution result into structured questions.

[0136] It should be understood that, for the sake of brevity, some of the content described in the method embodiments will not be repeated in this device embodiment.

[0137] Based on the same inventive concept, this application provides an electronic device, see [link to relevant documentation]. Figure 7 As shown, it includes a processor 701 and a memory 702. Wherein: The processor 701 is used to execute one or more programs stored in the memory 702 to implement the above-mentioned method for displaying and / or generating programming simulation problems.

[0138] It is understandable that the processor 701 can be a GPU (Graphics Processing Unit), CPU (Central Processing Unit), AI (Artificial Intelligence) processor, NPU (Neural Network Processing Unit), ISP (Image Signal Processor), DPU (Display Processing Unit), VPU (Video Processing Unit), DSP (Digital Signal Processor), or a data processing core, or a processor chip used in scenarios involving large-scale data computation. The memory 702 can be RAM (Random Access Memory), ROM (Read-Only Memory), flash memory, hard disk, etc. The above are merely examples and should not be construed as limiting this application.

[0139] It's understandable. Figure 7 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 7 The more or fewer components shown, or having the same Figure 7 Different configurations are shown. For example, it may also have an internal communication bus for communication between the processor 701 and the memory 702; or it may have an external communication interface, such as a USB (Universal Serial Bus) interface, a CAN (Controller Area Network) bus interface, etc.; or it may have an information display component such as a display screen, but this is not a limitation.

[0140] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium, such as a floppy disk, optical disk, hard disk, flash memory, USB flash drive, SD (Secure Digital Memory Card), MMC (Multimedia Card), etc., in which one or more programs implementing the above-described steps are stored. These one or more programs can be executed by one or more processors to implement the above-described method for displaying and / or generating programming simulation problems. Further details will not be elaborated here.

[0141] Based on the same inventive concept, this application also provides a computer program product, which includes a computer program. When executed by a processor, the computer program implements the above-mentioned display control method and / or programming simulation exercise generation method. Further details will not be elaborated here. The computer program product may be a program package, installation package, etc., but this is not a limitation.

[0142] In the various embodiments of this application, the functional modules can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0143] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features.

[0144] In the description of the embodiments in this application, "multiple" means two or more, unless otherwise explicitly specified.

[0145] In the embodiments provided in this application, and / or include three cases, for example, A and / or B include: A and B, A but not B, and B but not A.

[0146] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand that the embodiments described herein can be combined with other embodiments.

[0147] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.< / iostream>

Claims

1. A method for displaying and controlling a programming simulation exercise, characterized in that, The programming simulation exercise includes question code and the question corresponding to the code block that needs to be examined within the question code; the code block that needs to be examined is the code block in the question code that generates the actual operation. The questions corresponding to the code block to be examined are generated based on the execution results when the code block is executed; the method includes: Retrieve and display all code blocks of the problem code; The code blocks are triggered sequentially according to the execution logic of the question code. If the currently triggered code block is a code block that requires testing and contains a question, the question is displayed. After the question is answered, the next code block of the currently triggered code block is allowed to be triggered.

2. The display control method as described in claim 1, characterized in that, The code blocks for the questions and the corresponding questions generated from the code blocks to be examined are obtained through the following methods: The question code is input into a preset large language model, along with a preset requirement description, so that the large language model splits the question code into multiple code blocks and generates corresponding question information for the code blocks that need to be examined. Generate questions corresponding to each code block to be examined based on the question information corresponding to each code block to be examined. The requirements description includes code splitting requirements, as well as the rules for generating question objects and question information.

3. The display control method as described in claim 2, characterized in that, The preset large language model is multiple; After inputting the question code into each of the large language models, the code blocks of the question code and the corresponding questions generated from the code blocks to be examined are obtained in the following way: The optimal result is selected from the outputs of various language models; the outputs include the split code blocks and the question information corresponding to the code blocks to be examined. The code blocks split from the optimal result and the question information corresponding to the code blocks to be examined are used as the final code blocks and question information.

4. The display control method as described in claim 3, characterized in that, The output of each of the large language models includes the output values ​​and / or variable values ​​of each code segment when the question code is run; The optimal result is selected from the outputs of various language models, including: The problem code is debugged using a preset debugging tool, and the output values ​​and / or variable values ​​of each code segment are read when the problem code is run. Match the output values ​​and / or variable values ​​of each code segment in the output results of each of the large language models with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; The output of the large language model with the highest matching degree is determined as the optimal result.

5. The display control method according to any one of claims 1-4, characterized in that, The code blocks are triggered sequentially according to the execution logic of the question code, including: In response to the triggering operation of any code block, if the previously triggered code block is the code block preceding the code block in the execution logic of the question code, then the code block is executed and the triggered code blocks and their corresponding execution results are displayed sequentially in the preset result recording area. If the previously triggered code block is not the preceding code block in the execution logic of the code in the question, then the first prompt message indicating an error in the code execution order will be returned.

6. A method for generating programming simulation problems, characterized in that, include: Get the question code; The question code is split into multiple code blocks, and corresponding questions are generated for the code blocks that need to be examined within those code blocks; The code block to be examined is the code block in the question code that generates the actual operation; the question corresponding to the code block to be examined is generated based on the execution result when the code block to be examined is executed; the programming simulation exercise includes the question code and the question corresponding to the code block to be examined in the question code; the programming simulation exercise is used for display, wherein: When each code block of the programming simulation exercise is displayed, it is allowed to be triggered sequentially according to the execution logic of the exercise code. If the currently triggered code block is a code block that needs to be examined and a question is set, then the question corresponding to the code block that needs to be examined is displayed. After the question is answered, the next code block of the currently triggered code block is allowed to be triggered.

7. The generation method as described in claim 6, characterized in that, The question code is broken down into multiple code blocks, and corresponding questions are generated for the code blocks that need to be examined within those blocks, including: The question code is input into a preset large language model, along with a preset requirement description, so that the large language model splits the question code into multiple code blocks and generates corresponding question information for the code blocks that need to be examined. Generate questions corresponding to each code block to be examined based on the question information corresponding to each code block to be examined. The requirements description includes code splitting rules, as well as question generation objects and question generation rules.

8. The generation method as described in claim 7, characterized in that, The preset large language model is multiple; the method further includes: The optimal result is selected from the outputs of various language models; the outputs include the split code blocks and the question information corresponding to the code blocks to be examined. The code blocks split from the optimal result and the question information corresponding to the code blocks to be examined are used as the final code blocks and question information.

9. The generation method as described in claim 8, characterized in that, The output of each of the large language models includes the output values ​​and / or variable values ​​of each code segment when the question code is run; The optimal result is selected from the outputs of various language models, including: The problem code is debugged using a preset debugging tool, and the output values ​​and / or variable values ​​of each code segment are read when the problem code is run. Match the output values ​​and / or variable values ​​of each code segment in the output results of each of the large language models with the output values ​​and / or variable values ​​of each code segment read by the debugging tool; The output of the large language model with the highest matching degree is determined as the optimal result.

10. A display control system for programming simulation exercises, characterized in that, include: The system backend is used to: obtain the question code, split the question code into multiple code blocks, and generate corresponding questions for the code blocks that need to be examined; the code blocks that need to be examined are the code blocks in the question code that generate actual operations; the questions corresponding to the code blocks that need to be examined are generated based on the running results when the code blocks that need to be examined are executed; the programming simulation running questions include the question code and the questions corresponding to the code blocks that need to be examined in the question code. The system front-end is used to: display all code blocks of the question code, trigger each code block sequentially according to the execution logic of the question code, and when the currently triggered code block is a code block that needs to be examined and has a question set, display the question, and after the question is answered, allow the triggering of the next code block of the currently triggered code block.