Assessment method and apparatus for block-based programming assignments, and electronic device, storage medium and program product

WO2026200129A1PCT designated stage Publication Date: 2026-10-01BEIJING SIMING QICHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/146202
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-25
Filing Date
2025-12-26
Publication Date
2026-10-01

Smart Images

  • Figure CN2025146202_01102026_PF_FP_ABST
    Figure CN2025146202_01102026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are an assessment method and apparatus for block-based programming assignments, and an electronic device, a storage medium and a program product. The method comprises: acquiring program source codes of a block-based programming assignment; for each block, acquiring, from the program source codes, configuration information of the block; according to the relative positional relationship between text display information and parameter information, combining parameter information of the block and the text display information, so as to obtain a text description for the block; on the basis of the program source codes, acquiring the operational logic among the blocks; according to the operational logic among the blocks, combining text descriptions for the blocks, so as to obtain a structured description for the block-based programming assignment; and inputting the structured description for the block-based programming assignment into a preset large language model. In this way, by means of assessing a block-based programming assignment by means of a large language model, the causes for errors in the block-based programming assignment can be learned, thereby providing guidance and prompts for the causes for the errors.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, devices, electronic equipment, storage media, and program products for grading graphical programming assignments.

[0001] Cross-references to related applications

[0002] This disclosure claims priority to Chinese Patent Application No. 2025103574646, filed on March 25, 2025, entitled "Method, Apparatus, Electronic Device, Storage Medium and Program Product for Correcting Graphical Programming Operations", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure relates to the field of graphical programming technology, and more specifically, to a method, apparatus, electronic device, storage medium, and program product for grading graphical programming jobs. Background Technology

[0004] Graphical programming has been widely used in education, especially in children's programming education. Graphical programming platforms replace traditional text coding with graphical blocks or modules, making programming more visual and easier to use, and lowering the barrier to entry for programming.

[0005] In the teaching practice of graphical programming, students need to complete a large number of graphical programming assignments. Grading students' graphical programming assignments and guiding them to answer correctly helps them to understand and master graphical programming skills more quickly.

[0006] Currently, answer matching is commonly used to grade students' graphical programming assignments and provide guidance. However, the set answer key can only cover a few types of graphical programming errors, while errors in graphical programming assignments are diverse. For programming errors outside the scope of the answer key, it is impossible to analyze the true cause of the graphical programming errors or provide targeted guidance. Summary of the Invention

[0007] The purpose of this disclosure is to provide a method, apparatus, electronic device, storage medium, and program product for grading graphical programming assignments, in order to solve the problem that in related technologies, for programming errors that are outside the scope of the answer, it is impossible to analyze the true cause of the graphical programming error and provide targeted guidance prompts.

[0008] In a first aspect, embodiments of this disclosure provide a method for grading graphical programming jobs, including:

[0009] Obtain the source code of the graphical programming assignment; the graphical programming assignment includes multiple building blocks that are connected together.

[0010] For each block, the configuration information of the block is obtained from the program source code; the configuration information includes the block's parameter information, text display information, and the relative positional relationship between the text display information and the parameter information.

[0011] The parameter information and text display information of the block are combined according to the relative positional relationship between the text display information and parameter information to obtain the text description of the block;

[0012] The operational logic between each of the building blocks is obtained from the program source code.

[0013] According to the operational logic between each block, the text descriptions of each block are combined to obtain a structured description of the graphical programming task;

[0014] The structured description of the graphical programming task is input into a preset large language model, so that the large language model can correct the graphical programming task according to the structured description and provide guidance prompts.

[0015] A large language model is a model that can generate natural language text or understand the meaning of language text. The above-described solution of this disclosure uses a large language model to correct graphical programming assignments and provide guidance prompts. Based on the ability of the large language model to understand the meaning of language text, it can analyze the causes of various programming errors (including programming errors outside the scope of the answer) and provide targeted guidance prompts. This solves to some extent the problem in related technologies that it cannot analyze the true causes of graphical programming errors or provide targeted guidance prompts for programming errors outside the scope of the answer.

[0016] Furthermore, due to the unique nature of graphical programming technology, graphical programming assignments are composed of multiple graphical blocks, which large language models cannot recognize. Therefore, large language models cannot be directly applied to the grading of graphical programming assignments. In the above implementation, by obtaining the textual description of each block in the graphical programming assignment and the operational logic between the blocks, and then combining the textual descriptions of the blocks according to the operational logic, a structured description of the graphical programming assignment is obtained. In this way, the graphical programming assignment, presented in block form, can be transformed into a structured description that large language models can understand. This allows large language models to understand the true intent of the graphical programming assignment based on its structured description, enabling them to grade the assignment, understand the reasons for errors, and provide guidance based on these reasons.

[0017] Furthermore, since large language models can only understand structured descriptions, the accuracy of these descriptions directly affects the grading performance of the large language model. Also, since graphical programming assignments are formed by users dragging and dropping blocks, how to convert these assignments into structured descriptions that more accurately depict their internal logic directly impacts the grading performance of the large language model. Therefore, in the above implementation of this disclosure, the source code of the graphical programming assignment is obtained, which is the program source code composed of the program code of the blocks dragged and dropped by the user. Then, the parameter information and text display information of each block are obtained from the program source code, and a text description of each block is constructed using these information. This allows for a more accurate acquisition of the text descriptions of the blocks dragged and dropped by the user. Finally, according to the operational logic between the blocks, the text descriptions of each block are combined, resulting in a structured description of the graphical programming assignment that more accurately reflects its internal logic.

[0018] Optionally, obtaining the configuration information of the block from the program source code includes: if the field value of the parameter field corresponding to the block in the program source code is a parameter value, then the parameter value is determined to be the parameter information of the block.

[0019] Since the parameter value of the parameter field corresponding to the block is a parameter value, that parameter value is the specific information passed to the block. Therefore, in the above implementation process, when the parameter value of the parameter field corresponding to the block is a parameter value, no processing of the parameter value is required; it can be directly used as the parameter information of the block to obtain the specific information actually passed to the block. Thus, the parameter information of the block can be used to more accurately assemble the text description of the block.

[0020] Optionally, obtaining the configuration information of the block from the program source code includes: if the field value of the parameter field corresponding to the block in the program source code is the block identifier of another block, then the text description of the other block is used as the parameter information of the block.

[0021] Since the textual description of the block corresponding to a parameter field is the block identifier when the parameter field value is the block identifier, the actual information passed to that block is the textual description of that block. Therefore, in the above implementation, if the parameter field value of the block is the block identifier of another block in the program source code, the textual description of that other block is used as the parameter information for that block. This way, the actual information passed to the block can be obtained, allowing for a more accurate combination of the block's textual description using its parameter information. Furthermore, this ensures that nested blocks accurately reflect their original nesting relationship when converted into a structured description.

[0022] Optionally, if the field value of the parameter field corresponding to the block in the program source code is the block identifier of another block, then the text description of the other block is used as the parameter information of the block, including: when it is determined that the field value of the parameter field corresponding to the block is the block identifier of another block, obtaining the configuration information of the other block from the program source code, and combining the parameter information and text display information of the other block according to the relative positional relationship between the text display information and parameter information of the other block to obtain the text description of the other block; and using the text description of the other block as the parameter information of the block.

[0023] In the above implementation, the configuration information of another block is only retrieved from the program source code when the value of a parameter field of one block is found to be the block identifier of another block. The relative positional relationship between the text display information and parameter information of the other block is then used to combine these two pieces of information to obtain the text description of the other block. This text description is then used as the parameter information for that block. This allows for on-demand retrieval of block text descriptions, avoiding the need to retrieve large amounts of text descriptions from the program source code at once, thus reducing server load.

[0024] Optionally, obtaining the execution logic between each of the building blocks based on the program source code includes: parsing the program source code to obtain the abstract syntax tree corresponding to the program source code; and obtaining the execution logic between each of the building blocks from the abstract syntax tree.

[0025] Since a large language model cannot directly obtain the operational logic between the blocks in a graphical programming task from the task itself or its source code, the above implementation process parses the source code to obtain an abstract syntax tree (AST). Because the AST clearly shows the hierarchical and nested relationships between the code segments in the source code, and the source code is composed of multiple interconnected blocks, the AST essentially displays these hierarchical and nested relationships. Therefore, the operational logic between the blocks can be obtained from the AST, allowing the large language model to construct a structured description that it can understand. This enables the large language model to comprehend the true meaning of the graphical programming task and thus correct it.

[0026] Optionally, the running logic includes the running order and running conditions between each block; according to the running logic between each block, the text descriptions of each block are combined to obtain a structured description of the graphical programming job, including: determining the separators corresponding to each running condition according to the running conditions between each block; arranging the text descriptions of each block according to the running order between each block, and using the separators corresponding to the running conditions to separate the text descriptions between the arranged blocks to obtain a structured description of the graphical programming job.

[0027] In the abstract syntax tree (API), the operational logic between building blocks is implemented through the node types and connection structures between them. Therefore, even after obtaining the operational logic from the API, it remains incomprehensible to the large language model. Consequently, in the above implementation, the operational conditions that the large language model cannot understand are transformed into delimiters, and the execution order of the building blocks is converted into the arrangement of their textual descriptions. Finally, the delimiters corresponding to the operational conditions are used to separate the textual descriptions of the arranged building blocks, resulting in a structured description of the graphical programming task. This allows the large language model to understand the operational logic and purpose of the building blocks in the graphical programming task through the structured description, facilitating the grading of the task.

[0028] Optionally, the operating conditions include one of sequential operation, conditional operation, and cyclic operation.

[0029] Optionally, inputting the structured description of the graphical programming task into a preset large language model includes: filling the structured description of the graphical programming task into the corresponding input position of the programming task description in the preset prompt word template; and inputting the filled prompt word template into the large language model.

[0030] In the above implementation process, the structured description of the graphical programming task is filled into the corresponding input field of the programming task description in the preset prompt word template, and then the filled prompt word template is input into the large language model. In this way, the data format of different graphical programming tasks can be unified, avoiding misunderstandings of the graphical programming tasks by the large language model due to different data format expressions.

[0031] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0032] Obtain the role definition for the large language model;

[0033] The role definition for the large language model is filled into the corresponding role description in the prompt word template, so that the large language model outputs guidance prompts for the graphical programming task according to the prompt format corresponding to the role definition.

[0034] In the above implementation process, the role definitions for the large language model are filled into the corresponding role description positions in the prompt word template. This allows the large language model to clearly understand its responsibilities and functions based on the role definitions in the prompt word template, and thus provide guidance prompts for graphical programming tasks according to these responsibilities. Therefore, by obtaining different role definitions for the large language model, customization of the large language model can be achieved, enhancing the user experience.

[0035] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0036] Obtain the task objective of the graphical programming job;

[0037] Fill the task objective into the corresponding task objective description in the prompt word template.

[0038] In the above implementation process, the task objective of the graphical programming assignment is obtained and filled into the corresponding task objective description position in the prompt word template. In this way, the large language model can obtain the basis for grading the graphical programming assignment, i.e., the task objective, from the prompt word template, and thus grade the graphical programming assignment by judging whether the task objective has been achieved.

[0039] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0040] Obtain the stage description information of the stage corresponding to the graphical programming task;

[0041] Fill the stage description information into the corresponding stage description position in the prompt word template.

[0042] In the above implementation process, the stage description information corresponding to the graphical programming task is obtained and filled into the corresponding stage description position in the prompt word template. In this way, the large language model can obtain the stage description information through the prompt word template, thereby enabling the large language model to more accurately correct the graphical programming task based on the stage description information.

[0043] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0044] Obtain the name and function of each preset building block; the preset building blocks are the building blocks allowed to be used in the graphical programming task;

[0045] Enter the name and function of each preset block into the corresponding block description in the prompt word template.

[0046] In the above implementation process, by filling the names and functions of the preset building blocks into the corresponding building block descriptions in the prompt word template, the large language model can obtain the names and functions of the building blocks allowed to be used in the graphical programming task through the prompt word template. In this way, it can use the known names and functions of the preset building blocks to more accurately understand the true intent of the graphical programming task, so as to more accurately correct the graphical programming task.

[0047] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0048] Obtain task assessment information, which includes the building blocks to be assessed in this task;

[0049] The assignment assessment information is filled into the corresponding assignment assessment information description in the prompt word template so that the large language model can correct the graphical programming assignment according to the assignment assessment information.

[0050] In the above implementation process, the building blocks required for this assignment are filled into the corresponding assignment assessment information description positions in the prompt word template. In this way, the large language model can obtain the assignment assessment information through the prompt word template, thereby determining whether the graphical programming assignment utilizes the building blocks required for this assignment, that is, whether the graphical programming assignment has achieved its assessment purpose, thus helping the user better understand the key points of the graphical programming assignment.

[0051] Optionally, before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes:

[0052] Get the preset reference answer;

[0053] Fill in the corresponding reference answer description in the prompt word template.

[0054] In the above implementation process, the reference answer is filled into the corresponding position of the reference answer description in the prompt word template. In this way, the large language model can obtain the reference answer through the prompt word template, and thus correct the graphical programming assignment based on the reference answer, determine the true cause of the error in the graphical programming assignment, and provide more targeted guidance prompts.

[0055] Secondly, embodiments of this disclosure also provide a graphical programming job grading device, comprising:

[0056] The first acquisition module is configured to acquire the program source code of the graphical programming task; the graphical programming task includes multiple building blocks that are connected together.

[0057] The second acquisition module is configured to acquire configuration information of each block from the program source code. The configuration information includes parameter information, text display information, and the relative positional relationship between the text display information and the parameter information of the block.

[0058] The first combination module is configured to combine the parameter information and text display information of the block according to the relative positional relationship between the text display information and the parameter information to obtain a text description of the block.

[0059] The third acquisition module is configured to acquire the running logic between each of the building blocks based on the program source code;

[0060] The second combination module is configured to combine the text descriptions of each block according to the operation logic between each block to obtain a structured description of the graphical programming job.

[0061] The input module is configured to input a structured description of the graphical programming task into a preset large language model, so that the large language model can revise the graphical programming task according to the structured description and provide guidance prompts.

[0062] Thirdly, embodiments of this disclosure also provide an electronic device, including a processor, a memory, and a communication bus; the communication bus is configured to enable communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement the above-described method for grading graphical programming jobs.

[0063] Fourthly, this disclosure also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the graphical programming job grading method described above.

[0064] Fifthly, this disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements the graphical programming job correction method described above. Attached Figure Description

[0065] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments of this disclosure will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this disclosure 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.

[0066] Figure 1(a) is a schematic diagram of a graphical programming interface for performing graphical programming tasks provided in an embodiment of this disclosure;

[0067] Figure 1(b) is a schematic diagram of a stage area provided in an embodiment of this disclosure;

[0068] Figure 1(c) is a schematic diagram of an object area provided in an embodiment of this disclosure;

[0069] Figure 1(d) is a schematic diagram of a block menu bar provided in an embodiment of this disclosure;

[0070] Figure 1(e) is a schematic diagram of a block work area provided in an embodiment of this disclosure;

[0071] Figure 2 is a flowchart illustrating a graphical programming job grading method provided in an embodiment of this disclosure;

[0072] Figure 3 is a schematic diagram of a graphical programming job provided in an embodiment of this disclosure;

[0073] Figure 4 is a schematic diagram of a structured description of a graphical programming job provided in an embodiment of this disclosure;

[0074] Figure 5 is a flowchart illustrating a method for constructing a prompt word template according to an embodiment of this disclosure;

[0075] Figure 6(a) is a schematic diagram of another graphical programming interface provided in an embodiment of this disclosure;

[0076] Figure 6(b) is a schematic diagram of the correction results of a large language model provided in an embodiment of this disclosure;

[0077] Figure 7(a) is a schematic diagram of another graphical programming interface provided in an embodiment of this disclosure;

[0078] Figure 7(b) is a schematic diagram of the correction result of a large language model provided in an embodiment of this disclosure;

[0079] Figure 8(a) is a schematic diagram of another graphical programming interface provided in an embodiment of this disclosure;

[0080] Figure 8(b) is a schematic diagram of the correction results of a large language model provided in an embodiment of this disclosure;

[0081] Figure 9 is a schematic diagram of the structure of a graphical programming job grading device provided in an embodiment of this disclosure;

[0082] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0083] The technical solutions of the embodiments of this disclosure will now be described with reference to the accompanying drawings.

[0084] To address the issues of being unable to analyze the true cause of programming errors outside the scope of the answer key, and being unable to provide targeted guidance and hints, this disclosure provides a method for grading graphical programming assignments. Figure 1(a) is a schematic diagram of a graphical programming interface for performing graphical programming assignments provided in this embodiment. As shown in Figure 1(a), the graphical programming interface may include a stage area 1, an object area 2, and a code area 3.

[0085] Specifically, Stage Area 1 can be as shown in Figure 1(b), which is configured as a stage for displaying graphical programming assignments. Object Area 2 can be as shown in Figure 1(c), which is configured to display the operable objects allowed in the graphical programming assignments, such as: Hemu and grid roads. Code Area 3 includes a block workspace and a block menu bar. The block menu bar can be as shown in Figure 1(d), which is configured to display the blocks allowed in the graphical programming assignments, such as "Move (10) steps", "Face (90) direction", "Say (Hello) (2) seconds", "Play sound (judgment Ulahu 24) wait to play", "When (start) is clicked", "Wait (1) seconds", "Repeat (10) times". The block workspace can be as shown in Figure 1(e), which is configured to assemble blocks to form graphical programming assignments. The block workspace can also include the task objectives of the graphical programming assignments, such as: help Hemu turn around and return to the Carrot Forest. The block workspace can also include graphical programming prompts, such as: "[Facing...direction] code block is in the [Motion] module."

[0086] In this way, users can analyze the task objectives and the stage of the graphical programming assignment, obtain the operation objects required for the assignment, and the code execution logic that can achieve the task objectives. Then, users can select operation objects in the object area and drag blocks from the block menu bar to the block workspace to assemble them according to the code execution logic, thus obtaining the graphical programming assignment.

[0087] Similarly, referring to Figure 1(a), the task objective of the graphical programming task can be, for example, helping Hemu turn around and return to the Carrot Forest. Analyzing the task objective "helping Hemu turn around and return to the Carrot Forest," we can determine that the object of the graphical programming task is "Hemu." Analyzing the stage area, we can determine that Hemu is 4 squares away from the Carrot Forest. Furthermore, Hemu is facing away from the Carrot Forest. Moving the character 10 steps represents 1 square away from the stage area. Therefore, the code execution logic to achieve the task objective of the graphical programming task can be to assemble 4 "move 10 steps" programming blocks and control "Hemu" to face the Carrot Forest.

[0088] The technical solutions of this disclosure and how they solve the above-mentioned technical problems will be described in detail below with specific embodiments.

[0089] As shown in Figure 2, Figure 2 is a flowchart illustrating a graphical programming job grading method provided in this embodiment of the present disclosure, including:

[0090] Step S201: Obtain the program source code of the graphical programming assignment, which includes multiple building blocks that are connected.

[0091] In one optional embodiment of this disclosure, the source code of the graphical programming task can be obtained after the graphical programming task is completed.

[0092] In some embodiments, the completion of a graphical programming task can be determined by clicking a button that represents the task. A button representing a graphical programming task might be, for example, "Submit Task".

[0093] In other embodiments, the starting block of the graphical programming job is an event-triggered block, which represents the execution conditions of the graphical programming job. When the execution conditions in the event-triggered block are met, it can be determined that the graphical programming job is complete and can be executed.

[0094] Event trigger blocks can be, for example, "when start is clicked". Correspondingly, when the user clicks the start button on the stage, the completion of the graphical programming task can be determined, and the graphical programming task can be executed. Event trigger blocks can also be, for example, "when the timer value is greater than A". Correspondingly, when the timer value is greater than A, the completion of the graphical programming task can be determined, and the graphical programming task can be executed.

[0095] In another optional embodiment of this disclosure, the source code of the graphical programming task can also be obtained during the graphical programming task's execution. The graphical programming task's execution is the process of the user dragging and dropping blocks to assemble them. Correspondingly, the source code of the assembled blocks can be obtained while the user is dragging and dropping blocks to assemble them.

[0096] The source code for the graphical programming assignment is implemented based on a graphical programming environment, where the code exists in the form of building blocks. Furthermore, the program code corresponding to each building block can be obtained from the graphical programming environment. The program code can be in JSON format. The source code for the graphical programming assignment includes the program code of multiple building blocks that are interconnected, as well as the operational logic between the program code of these multiple building blocks.

[0097] Step S202: For each block, obtain the configuration information of that block from the program source code. The configuration information includes the block's parameter information, text display information, and the relative positional relationship between the text display information and the parameter information.

[0098] The program source code includes program code corresponding to each block, and each block's program code includes multiple fields, such as: parameter field, text display field, block type field, and block identifier field.

[0099] Correspondingly, for each block, the field value can be obtained from the parameter field of the block's program code. If the field value of the corresponding parameter field is a parameter value, then the parameter value is determined to be the parameter information for that block. Alternatively, for each block, the field value can be obtained from its corresponding parameter field—that is, from the parameter field in the block's program code. If the field value of the corresponding parameter field is the block identifier of another block, then the text description of that other block is used as the parameter information for that block. "Other blocks" refers to any block other than the block itself.

[0100] For example, if the field value of the parameter field corresponding to the block is determined to be the block identifier of another block, the block identifier of the other block can be used to perform a matching operation in the preset correspondence between block identifiers and text descriptions. If the text description of the other block is obtained, it is directly used as the parameter information of the block. If the text description of the other block is not obtained, the configuration information of the other block can be obtained from the program source code, and the parameter information and text display information of the other block can be combined according to the relative positional relationship between the text display information and parameter information of the other block to obtain the text description of the other block; the text description of the other block is then used as the parameter information of the block.

[0101] In some embodiments, the graphical programming task includes block B1. For block B1, its configuration information can be obtained from the program source code. If, in the program source code, the value of a parameter field corresponding to block B1 is the block identifier of another block, such as B2, then the configuration information of block B2 can be obtained from the program source code. The parameter information and text display information of block B2 are then combined according to the relative positional relationship between them to obtain a text description of block B2. This text description of block B2 is then used as the parameter information of block B1.

[0102] Similarly, the text display information of the block and the relative positional relationship between the field value of the parameter field and the text display information of the block can be obtained from the text display field corresponding to the block. The display content on the block includes the text display information and the field value of the parameter field of the block. Similarly, the block identifier of the block can be obtained from the block identifier field corresponding to the block. The block type of the block can also be obtained from the block type field corresponding to the block. The field value in the block type field is one of event triggering, control, action, and variable modification. When the block type is event triggering, the block is configured to describe the conditions that trigger the execution of the graphical programming job. For example, a block of type event triggering: when [Start] is clicked. When the block type is control, the block is configured to describe control logic. For example, a block of type control: repeat (10) times, if...then... When the block type is action, the block is configured to describe a specific operation. An example of an action block is: move (10) steps, set variable [sum] to 0. When the block type is variable, the block is configured to describe the setting and changing of variables. An example of a variable block is: add i to [sum], increment variable [i] by 1.

[0103] Step S203: Combine the parameter information and text display information of the block according to the relative positional relationship between the text display information and the parameter information to obtain the text description of the block.

[0104] For example, the relative positional relationship between the displayed text information and the parameter information represents their spatial positions on the block. Specifically, this can include the distance between the displayed text information and the parameter information, and their directional relationship.

[0105] The text description of the building blocks can be at least one of Chinese description, symbols, and English description.

[0106] Step S204: Obtain the operating logic between each block based on the program source code.

[0107] For example, the program source code can be parsed to obtain the abstract syntax tree (AST). Then, the execution logic between the individual blocks can be extracted from the AST.

[0108] Step S205: According to the operation logic between each block, combine the text descriptions of each block to obtain a structured description of the graphical programming task.

[0109] For example, the execution logic includes the execution order and conditions between each block. The structured description of the graphical programming task can be obtained by combining the text descriptions of each block according to the execution logic, as follows: Determine the delimiters corresponding to each execution condition based on the execution conditions between the blocks. Arrange the text descriptions of each block according to the execution order, and separate the text descriptions between the arranged blocks using the delimiters corresponding to the execution conditions, thus obtaining the structured description of the graphical programming task. Delimiters can be spaces, backslashes, semicolons, new lines, or two-character first-line indents, etc.

[0110] In some embodiments, the operating conditions between building blocks include one of sequential execution, conditional execution, and cyclic execution. Sequential execution means that building blocks are executed sequentially according to a set execution order. Conditional execution means that building blocks are executed in a set execution order only if a set condition is met. Cyclic execution means that building blocks are executed repeatedly.

[0111] Step S206: Input the structured description of the graphical programming task into the preset large language model so that the large language model can correct the graphical programming task according to the structured description and provide guidance prompts.

[0112] A large language model is a model that can generate natural language text or understand the meaning of language text. The above-described solution of this disclosure uses a large language model to correct graphical programming assignments and provide guidance prompts. Based on the ability of the large language model to understand the meaning of language text, it can analyze the causes of various programming errors (including programming errors outside the scope of the answer) and provide targeted guidance prompts. This solves to some extent the problem in related technologies that it cannot analyze the true causes of graphical programming errors or provide targeted guidance prompts for programming errors outside the scope of the answer.

[0113] Furthermore, due to the unique nature of graphical programming technology, graphical programming assignments are composed of multiple graphical blocks, which large language models cannot recognize. Therefore, large language models cannot be directly applied to the grading of graphical programming assignments. In the above implementation, by obtaining the textual description of each block in the graphical programming assignment and the operational logic between the blocks, and then combining the textual descriptions of the blocks according to the operational logic, a structured description of the graphical programming assignment is obtained. In this way, the graphical programming assignment, presented in block form, can be transformed into a structured description that large language models can understand. This allows large language models to understand the true intent of the graphical programming assignment based on its structured description, enabling them to grade the assignment, understand the reasons for errors, and provide guidance based on these reasons.

[0114] Furthermore, since large language models can only understand structured descriptions, the accuracy of these descriptions directly affects the grading performance of the large language model. Also, since graphical programming assignments are formed by users dragging and dropping blocks, how to convert these assignments into structured descriptions that more accurately depict their internal logic directly impacts the grading performance of the large language model. Therefore, in the above implementation of this disclosure, by obtaining the program source code of the graphical programming assignment, the program source code composed of the program code of the blocks dragged and dropped by the user is obtained. Then, the parameter information and text display information of each block are obtained from the program source code, and the text description of each block is constructed using the parameter information and text display information. This allows for a more accurate acquisition of the text descriptions of the blocks dragged and dropped by the user. Then, according to the operational logic between the blocks, the text descriptions of each block are combined, thereby enabling the obtained structured description of the graphical programming assignment to more accurately depict its internal logic.

[0115] In one possible implementation, this embodiment provides further illustrative examples of the present disclosure based on the embodiment shown in FIG2.

[0116] The graphical programming assignment is shown in Figure 3. This assignment consists of blocks "When (Start) Clicked", "Slide (10) Steps", "If (x)? Then (y)", "Slide (10) Steps", "Touch (Mouse Pointer ▼)", and "Say (Hello) (2) Seconds". Specifically, the block "When (Start) Clicked" is followed by the block "Slide (10) Steps", the block "If (x)? Then (y)" is followed by the block "If (x)? Then (y)", and the block "Touch (Mouse Pointer ▼)" is followed by the block "Slide (10) Steps". Furthermore, the block "Touch (Mouse Pointer ▼)" is nested at the x-position of the block "If (x)? Then (y)", and the block "Say (Hello) (2) Seconds" is nested at the y-position of the block "If (x)? Then (y)". For this graphical programming assignment, we can first obtain the source code of the assignment, and then extract the configuration information of each block from the source code. We can then combine the parameter information and text display information of each block according to the relative position of their text display information and parameter information to obtain the text description of each block.

[0117] For example, the parameter information for the block "When (Start) is Clicked" is "Start". The relative positional relationship between the text display information and parameter information of the block "When (Start) is Clicked" is, for example: When () is clicked. Further, the text description of the block "When (Start) is Clicked" can be obtained: When Start is clicked. Where () is the position where the parameter information is filled in. The parameter information for the block "Slide (10) Steps" is "Start". The relative positional relationship between the text display information and parameter information of the block "Slide (10) Steps" is, for example: Slide () Steps. Further, the text description of the block "Slide (10) Steps" can be obtained, that is: Slide 10 Steps.

[0118] Regarding the block "touched (mouse pointer ▼)", the parameter information for "touched (mouse pointer ▼)" is the mouse pointer. The relative positional relationship between the text display information and the parameter information of "touched (mouse pointer ▼)" is, for example, "touched (). Therefore, the text description of "touched (mouse pointer ▼)" is: "touched the mouse pointer".

[0119] The parameter information for the block "Say (Hello) (2) seconds" includes "Hello" and "2". The relative positional relationship between the text display information and the parameter information of the block "Say (Hello) (2) seconds" is "Say () () seconds". Therefore, the text description of the block "Say (Hello) (2) seconds" is: Say Hello for 2 seconds.

[0120] The relative positional relationship between the text display information and parameter information of the block "If (x)? Then (y)" is as follows: If ()? Then (). The field values ​​of the parameter fields of the block "If (x)? Then (y)" include the block identifier S1 of the block "Touched (mouse pointer ▼)" and the block identifier S2 of the block "Say (Hello) (2) seconds". Therefore, the text descriptions of the block "Touched (mouse pointer ▼)" and "Say (Hello) (2) seconds" can be used as the parameter information of the block "If (x)? Then (y)", that is, when the mouse pointer is touched, say hello for 2 seconds.

[0121] Simultaneously, the graphical programming task can be parsed to obtain its abstract syntax tree. Then, the operational logic between the blocks in the graphical programming task can be obtained from the abstract syntax tree. For example, the operational condition between the block "when (start) is clicked" and the block "slide (10) steps" is executed sequentially, with the block "when (start) is clicked" executed first, followed by the block "slide (10) steps". The operational condition between the block "slide (10) steps" and the block "if (x)? then (y)" is executed sequentially, with the block "slide (10) steps" executed first, followed by the block "if (x)? then (y)". However, the operational condition between the block "touches (mouse pointer ▼)" and the block "says (hello) (2) seconds" is conditional, meaning that "says hello" will only occur when the mouse pointer is touched. Finally, based on the operating conditions between each block, the separators corresponding to each operating condition are determined. The text descriptions of each block are arranged according to the operating order between each block, and the separators corresponding to the operating conditions are used to separate the text descriptions between the arranged blocks, resulting in a structured description of the graphical programming task as shown in Figure 4.

[0122] In one possible implementation, based on the above embodiments, this embodiment provides a method for constructing prompt word templates based on the structured description of graphical programming tasks, in order to enable the large language model to better understand the true meaning of the graphical programming task. Referring to Figure 5, the method for constructing prompt word templates may include the following steps:

[0123] Step S501: Fill in the structured description of the graphical programming task into the corresponding input field of the programming task description in the preset prompt word template.

[0124] Step S502: Obtain the role definition for the large language model and fill the role definition for the large language model into the corresponding role description position in the prompt word template.

[0125] The role definition for the large language model is configured to help it clarify its own responsibilities and functions. This allows the large language model to provide guidance and prompts for graphical programming tasks according to its responsibilities.

[0126] For example, in a large language model, you might define roles like a programming teacher. We would write code blocks specifying these roles to control the characters on the stage and help them complete tasks.

[0127] Step S503: Obtain the task objective of the graphical programming assignment; and fill the task objective into the corresponding task objective description in the prompt word template.

[0128] It can retrieve graphical programming problems and extract the task objectives from them. For example, a task objective for a graphical programming assignment could be: controlling a motorcycle to glide onto an elevator.

[0129] Step S504: Obtain the stage description information of the stage corresponding to the graphical programming task, and fill the stage description information into the corresponding stage description position in the prompt word template.

[0130] When a graphical programming platform provides a graphical programming problem, the platform will provide a stage corresponding to the problem, which includes information such as the scene and the objects to be manipulated.

[0131] When a graphical programming job is running, the objects specified by the graphical programming job will move, speak, etc., in the scene of the stage according to the running logic of the graphical programming job.

[0132] For example, a user can specify an object to be manipulated in the stage area, and describe the object's attributes and state. The large language model can then use the received object, along with its attributes and state, to generate stage description information.

[0133] Step S505: Obtain the name and function of each preset block, and fill in the name and function of each preset block into the corresponding block description position in the prompt word template. The preset blocks are the blocks allowed to be used in the graphical programming task.

[0134] For example, the block "When Start is Clicked" indicates that the run has started. The block "Slide 10 Steps" indicates that the manipulated object slides 10 steps, representing 1 block in the stage area. The block "Slide 20 Steps" indicates that the manipulated object slides 20 steps, representing 2 blocks in the stage area. The block "Facing →" indicates that the manipulated object turns to the right.

[0135] Step S506: Obtain the assignment assessment information and fill it into the corresponding assignment assessment information description in the prompt word template. The assignment assessment information includes the building blocks to be assessed in this assignment.

[0136] The large language model can grade graphical programming assignments based on the assessment information. This means it not only determines whether the assignment achieved the task objective but also whether the assigned block was used. Even if the assignment achieved the task objective, if the assigned block was not used, a prompt will be issued reminding the user to use the required block in the graphical programming exercise.

[0137] For example, the information to consider might be: slide 10 steps, while the blocks used in a graphical programming task represent jumping 10 steps. In this case, even if the graphical programming task can achieve the task objective, a guiding prompt will still be issued.

[0138] Step S507: Obtain the preset reference answer and fill it into the corresponding reference answer description in the prompt word template.

[0139] The execution order of steps S501 to S507 can be arbitrarily changed. For example, step S503 can be executed first, followed by the other steps. Alternatively, step S507 can be executed first, followed by the other steps. No restriction is placed on the execution order of steps S501 to S507 here.

[0140] Step S508: Input the filled-in prompt word template into the large language model.

[0141] The method for constructing prompt word templates provided in this disclosure can unify the data format of different graphical programming tasks by constructing prompt word templates, thereby avoiding misunderstandings of graphical programming tasks by large language models due to different data format expressions, and thus improving the accuracy of large language models in grading graphical programming tasks.

[0142] Referring to the schematic diagram of the graphical programming interface shown in Figure 6(a), the task objective of the graphical programming assignment can be obtained from the block workspace in Figure 6(a): control the motorcycle to glide onto the elevator. The graphical programming assignment includes the blocks "When Start is Clicked", "Facing Up", and "Glide 30 Steps". Furthermore, according to the object area in the graphical programming interface shown in Figure 6(a), the learner's selected object is the motorcycle. Simultaneously, according to the stage area in the graphical programming interface shown in Figure 6(a), the distance of the motorcycle from the elevator (3 blocks) can be determined.

[0143] For the graphical programming assignment shown in Figure 6(a), the grading results of the large language model can be shown in Figure 6(b):

[0144] You used the method of facing upwards and gliding for 30 steps. However, the motorcycle's initial direction was to the right. If you keep the motorcycle facing upwards and gliding, it might not reach the elevator.

[0145] Hint: The motorcycle starts facing right, and the elevator is three squares to the right of the motorcycle. Try to imagine the motorcycle gliding directly to the elevator without changing direction. Doing so will allow you to control the distance the motorcycle travels more precisely.

[0146] Try again! You can use the "glide" block to glide a certain number of steps to ensure the motorcycle glides to the right onto the elevator.

[0147] Furthermore, the large language model can also output a structured description of the graphical programming task as shown in Figure 6(a):

[0148] The student's code is as follows:

[0149] The code for the <Motorcycle> character:

[0150] Facing ↑

[0151] Glide 30 steps

[0152] Referring to the schematic diagram of the graphical programming interface shown in Figure 7(a), the task objective of the graphical programming assignment can be obtained from the block workspace in Figure 7(a): control the motorcycle to glide onto the elevator. The graphical programming assignment includes the blocks "When Start is Clicked", "Glide 10 Steps", and "Glide 10 Steps". Furthermore, according to the object area in the graphical programming interface shown in Figure 7(a), it can be determined that the learner has selected the motorcycle as the object to be manipulated. Simultaneously, according to the stage area in the graphical programming interface shown in Figure 7(a), the distance of the motorcycle from the elevator (3 blocks) can be determined.

[0153] For the graphical programming assignment shown in Figure 7(a), the grading results of the large language model can be shown in Figure 7(b):

[0154] You've successfully propelled the motorcycle 20 steps (2 squares), which is great! However, according to the mission objective, the motorcycle needs to slide 3 squares to reach the elevator. You're currently one square short.

[0155] Please think carefully again about how to make the motorcycle glide one more square. You can try adding or modifying existing code blocks to accomplish this task. Good luck!

[0156] Furthermore, the large language model can also output a structured description of the graphical programming task as shown in Figure 7(a):

[0157] Hello! Your current code is as follows:

[0158] When it starts being clicked

[0159] Glide 10 steps

[0160] Glide 10 steps

[0161] Referring to the schematic diagram of the graphical programming interface shown in Figure 8(a), the task objective of the graphical programming assignment can be obtained from the block workspace in Figure 8(a): control the motorcycle to glide onto the elevator. The graphical programming assignment includes the blocks "When Start is Clicked", "Glide 20 Steps", and "Glide 10 Steps". Furthermore, according to the object area in the graphical programming interface shown in Figure 8(a), the learner's selected object is the motorcycle. Simultaneously, according to the stage area in the graphical programming interface shown in Figure 8(a), the distance of the motorcycle from the elevator (3 blocks) can be determined.

[0162] For the graphical programming assignment shown in Figure 8(a), the grading results of the large language model can be shown in Figure 8(b):

[0163] Logically, the student's code can achieve the goal of the motorcycle gliding onto the elevator. The motorcycle initially starts three spaces away from the elevator, glides 20 steps (2 spaces), then glides another 10 steps (1 space), for a total of 3 spaces, reaching the elevator precisely. Therefore, the code is correct.

[0164] However, to help students better understand and improve, the following tips can be given:

[0165] Clear thinking: You made good use of the sliding code block and understood the concept that every 10 steps represent one grid.

[0166] Code optimization: Even if your code has achieved its goal, in some cases, concise code is easier to maintain and understand. You might consider whether the same task can be accomplished in fewer steps.

[0167] Code style: Maintaining code consistency is also a good programming practice. For example, you can consider gliding the same number of steps each time, or explain in a comment why you choose a different number of steps.

[0168] Encourage students to think:

[0169] Are there any other methods to achieve the same effect?

[0170] If the distance between the motorcycle and the elevator changes, can your code still adapt flexibly?

[0171] In short, your code is correct, but you could try a more concise and consistent way to achieve this task. Best of luck in your programming studies!

[0172] Furthermore, the large language model can also output a structured description of the graphical programming task:

[0173] Hello! Your current code is as follows:

[0174] The code for the <Motorcycle> character:

[0175] When it starts being clicked

[0176] Glide 20 steps

[0177] Glide 10 steps

[0178] In one possible implementation, based on the same inventive concept, this disclosure also provides a graphical programming job grading device 900. Please refer to FIG9, which illustrates a graphical programming job grading device employing the method shown in FIG2. The specific functions of device 900 can be found in the description above; to avoid repetition, detailed descriptions are appropriately omitted here. Device 900 includes at least one software function module that can be stored in memory or embedded in the operating system of device 900 in the form of software or firmware. Specifically:

[0179] Referring to Figure 9, the device 900 is applied to a service distribution device and includes: a first acquisition module 901, a second acquisition module 902, a first combination module 903, a third acquisition module 904, a second combination module 905, and an input module 906. Wherein:

[0180] The first acquisition module 901 is configured to acquire the program source code of a graphical programming task; the graphical programming task includes multiple building blocks that are connected together.

[0181] The second acquisition module 902 is configured to acquire configuration information of each block from the program source code. The configuration information includes the block's parameter information, text display information, and the relative positional relationship between the text display information and the parameter information.

[0182] The first combination module 903 is configured to combine the parameter information and text display information of the block according to the relative positional relationship between the text display information and the parameter information to obtain the text description of the block.

[0183] The third acquisition module 904 is configured to acquire the operational logic between each block based on the program source code.

[0184] The second combination module 905 is configured to combine the text descriptions of each block according to the operational logic between the blocks to obtain a structured description of the graphical programming task.

[0185] The input module 906 is configured to input a structured description of a graphical programming task into a preset large language model, so that the large language model can correct the graphical programming task based on the structured description and provide guidance prompts.

[0186] In one feasible implementation of this disclosure, if the field value of the parameter field corresponding to the block is a parameter value in the program source code, then the second acquisition module 902 is specifically configured to determine that the parameter value is the parameter information of the block.

[0187] In one feasible implementation of this disclosure, if the field value of the parameter field corresponding to the block in the program source code is the block identifier of another block, then the second acquisition module 902 is specifically configured to use the text description of the other block as the parameter information of the block.

[0188] In this embodiment, the second acquisition module 902 is specifically configured to, when it is determined that the field value of the parameter field corresponding to the block is the block identifier of another block, obtain the configuration information of the other block from the program source code, and combine the parameter information and text display information of the other block according to the relative positional relationship between the text display information and parameter information of the other block to obtain the text description of the other block; and use the text description of the other block as the parameter information of the block.

[0189] In one feasible implementation of this disclosure, the third acquisition module 904 is specifically configured to parse the program source code to obtain the abstract syntax tree corresponding to the program source code; and to obtain the running logic between each block from the abstract syntax tree.

[0190] In one feasible embodiment of this disclosure, the second combination module 905 is specifically configured to determine the separator corresponding to each running condition according to the running conditions between each block; arrange the text description of each block according to the running order between each block; and separate the text description between each block after arrangement using the separator corresponding to the running condition to obtain a structured description of the graphical programming job.

[0191] In one feasible embodiment of this disclosure, the input module 906 is specifically configured to fill the structured description of the graphical programming task into the corresponding writing position of the programming task description in the preset prompt word template; and input the filled prompt word template into the large language model.

[0192] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain the role definition for the large language model; fill the role definition for the large language model into the position of the corresponding role description in the prompt word template, so that the large language model outputs guidance prompts for the graphical programming task according to the prompt form corresponding to the role definition.

[0193] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain the task objective of the graphical programming job and fill the task objective into the position of the corresponding task objective description in the prompt word template.

[0194] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain stage description information of the stage corresponding to the graphical programming task; and fill the stage description information into the position of the corresponding stage description in the prompt word template.

[0195] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain the name and function of each preset block; the preset blocks are blocks that are allowed to be used in the graphical programming job; and fill the name and function of each preset block into the position of the corresponding block description in the prompt word template.

[0196] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain task assessment information, which includes the building blocks to be assessed in this task; and to fill the task assessment information into the corresponding task assessment information description in the prompt word template so that the large language model can grade the graphical programming task according to the task assessment information.

[0197] In one feasible embodiment of this disclosure, the input module 906 is further configured to obtain a preset reference answer and fill the reference answer into the corresponding reference answer description in the prompt word template.

[0198] It should be understood that, for the sake of brevity, some of the content described in Embodiment 1 will not be repeated in this embodiment.

[0199] In one possible implementation, based on the same inventive concept, this embodiment provides an electronic device, as shown in FIG10, which includes a processor 101 and a memory 102. Wherein:

[0200] The processor 101 is configured to execute one or more programs stored in the memory 102 to implement the above-described method for grading graphical programming jobs.

[0201] It is understandable that processor 101 can be a processor core or processor chip, or other circuitry capable of program configuration and execution. Memory 102 can be RAM (Random Access Memory), ROM (Read-Only Memory), flash memory, etc., but this is not a limitation.

[0202] It is also understood that the structure shown in Figure 10 is merely illustrative, and the electronic device may include more or fewer components than those shown in Figure 10, or have a different configuration than that shown in Figure 10. For example, it may also have an internal communication bus configured to enable communication between the processor 101 and the memory 102; 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.

[0203] Based on the same inventive concept, this embodiment also provides 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 steps are stored. These one or more programs can be executed by one or more processors to implement the above-described method for grading graphical programming tasks. Further details will not be elaborated here.

[0204] Based on the same inventive concept, this embodiment also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for correcting graphical programming tasks. Further details will not be elaborated here.

[0205] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0206] Furthermore, the units described 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.

[0207] Furthermore, the functional modules in the various embodiments of this disclosure 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.

[0208] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0209] In this article, "multiple" refers to two or more.

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

[0211] By adopting the above scheme, the source code of the graphical programming task is obtained, which is composed of the program code of the blocks that are dragged and dropped by the user. Then, the parameter information and text display information of each block are obtained from the program source code. The text description of each block is constructed using the parameter information and text display information. The text description of the blocks that are dragged and dropped by the user can be obtained more accurately. Then, according to the operation logic between the blocks, the text descriptions of each block are combined, so that the structured description of the graphical programming task can more accurately describe the internal logic of the graphical programming task.

Claims

1. A method for grading graphical programming assignments, characterized in that, include: Obtain the source code of the graphical programming assignment; the graphical programming assignment includes multiple building blocks that are connected together. For each block, the configuration information of the block is obtained from the program source code; the configuration information includes the block's parameter information, text display information, and the relative positional relationship between the text display information and the parameter information. The parameter information and text display information of the block are combined according to the relative positional relationship between the text display information and parameter information to obtain the text description of the block; The operational logic between each of the building blocks is obtained from the program source code. According to the operational logic between each block, the text descriptions of each block are combined to obtain a structured description of the graphical programming task; The structured description of the graphical programming task is input into a preset large language model, so that the large language model can correct the graphical programming task according to the structured description and provide guidance prompts.

2. The method according to claim 1, characterized in that, The configuration information of the building block is obtained from the program source code, including: If the field value of the parameter field corresponding to the block in the program source code is a parameter value, then the parameter value is determined to be the parameter information of the block.

3. The method according to claim 1, characterized in that, The configuration information of the building block is obtained from the program source code, including: If, in the program source code, the field value of the parameter field corresponding to the block is the block identifier of another block, then the text description of the other block will be used as the parameter information of the block.

4. The method according to claim 1, characterized in that, The operational logic between each of the building blocks is obtained from the program source code, including: The program source code is parsed to obtain the abstract syntax tree corresponding to the program source code; The operational logic between each of the building blocks is obtained from the abstract syntax tree.

5. The method according to claim 1, characterized in that, The operational logic includes the operational order and conditions between the building blocks; according to the operational logic between the building blocks, the textual descriptions of the building blocks are combined to obtain a structured description of the graphical programming task, including: Based on the operating conditions between each block, determine the separator corresponding to each operating condition; The text descriptions of each block are arranged according to the running order of each block, and the text descriptions between the arranged blocks are separated by the separators corresponding to the running conditions, so as to obtain a structured description of the graphical programming job.

6. The method according to claim 5, characterized in that, The operating conditions include one of sequential operation, conditional operation, and cyclic operation.

7. The method according to any one of claims 1 to 6, characterized in that, The structured description of the graphical programming task is input into a preset large language model, including: Fill in the structured description of the graphical programming task into the corresponding input field of the programming task description in the preset prompt word template; Input the filled-in prompt word template into the large language model.

8. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Obtain the role definition for the large language model; The role definition for the large language model is filled into the corresponding role description in the prompt word template, so that the large language model outputs guidance prompts for the graphical programming task according to the prompt format corresponding to the role definition.

9. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Obtain the task objective of the graphical programming job; Fill the task objective into the corresponding task objective description in the prompt word template.

10. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Obtain the stage description information of the stage corresponding to the graphical programming task; Fill the stage description information into the corresponding stage description position in the prompt word template.

11. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Obtain the name and function of each preset building block; the preset building blocks are the building blocks allowed to be used in the graphical programming task; Enter the name and function of each preset block into the corresponding block description in the prompt word template.

12. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Obtain task assessment information, which includes the building blocks to be assessed in this task; The assignment assessment information is filled into the corresponding assignment assessment information description in the prompt word template so that the large language model can correct the graphical programming assignment according to the assignment assessment information.

13. The method according to claim 7, characterized in that, Before inputting the filled-in prompt word template into the large language model, the method for grading the graphical programming assignment further includes: Get the preset reference answer; Fill in the corresponding reference answer description in the prompt word template.

14. A graphical programming assignment grading device, characterized in that, include: The first acquisition module is configured to acquire the program source code of the graphical programming task; the graphical programming task includes multiple building blocks that are connected together. The second acquisition module is configured to acquire configuration information of each block from the program source code. The configuration information includes parameter information, text display information, and the relative positional relationship between the text display information and the parameter information of the block. The first combination module is configured to combine the parameter information and text display information of the block according to the relative positional relationship between the text display information and the parameter information to obtain a text description of the block. The third acquisition module is configured to acquire the running logic between each of the building blocks based on the program source code; The second combination module is configured to combine the text descriptions of each block according to the operation logic between each block to obtain a structured description of the graphical programming job. The input module is configured to input a structured description of the graphical programming task into a preset large language model, so that the large language model can revise the graphical programming task according to the structured description and provide guidance prompts.

15. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the method for grading graphical programming jobs according to any one of claims 1 to 13.

16. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for grading graphical programming jobs as described in any one of claims 1 to 13.

17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method for grading graphical programming jobs as described in any one of claims 1 to 13.