Computer interactive programming platform automatic evaluation system based on deep learning

Through deep learning technology, an automatic evaluation system for programming platforms is built, which solves the limitations of existing systems in structural understanding and semantic judgment, realizes the precise expression and adaptive evaluation of programming logic, identifies innovative solutions, and optimizes resource allocation and feedback mechanisms.

CN120670266APending Publication Date: 2025-09-19HAINAN NORMAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510721832.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing programming assessment systems have limitations in structural understanding, semantic judgment, and innovation recognition. They are unable to distinguish between solutions that are structurally equivalent but different in form, lack adaptive capabilities, and have difficulty dynamically determining scoring feedback.

Method used

The automatic evaluation system for computer interactive programming platforms based on deep learning uses a structure diagram construction module to parse the source code to generate an abstract syntax structure tree and a syntax structure diagram. It is combined with a semantic graph generation module to extract semantic embedding vectors. The dynamic evaluation trigger module calculates the structure matching rate and logical deviation, and initiates the deep evaluation process. The semantic solution identification module identifies potential innovative solutions, and the exponential deduction feedback module generates a rating level.

Benefits of technology

It improves the accuracy of recognition of programming logic structures, optimizes the allocation of computing resources, identifies non-template solutions, and realizes adaptive evaluation processes and dynamic absorption of innovative knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670266A_ABST
    Figure CN120670266A_ABST
Patent Text Reader

Abstract

The invention discloses a computer interactive programming platform automatic evaluation system based on deep learning, and particularly relates to the technical field of deep learning, the system comprises five modules, namely a structure diagram construction module, a semantic diagram generation module, a dynamic evaluation trigger module, a semantic solution identification module and an exponential deduction feedback module, and full-process evaluation from code structure abstraction to semantic modeling is realized. The system dynamically controls a deep evaluation process through a structure matching rate and a logic deviation degree, identifies a potential innovation solution, generates a semantic equivalence degree and a path innovation index, outputs a grade in combination with a neural network score, and embeds a high-innovation sample into a training buffer area to update a model, so as to realize intelligent evaluation and adaptive optimization; according to the method, the modeling precision of a program structure and a control flow is improved, dynamic regulation and control of semantic understanding and an evaluation process are realized, a potential innovation solution can be identified, and model self-updating is realized through scoring grade feedback, so that the intelligent analysis and adaptive evolution capability of an evaluation system on complex programming behaviors is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and more specifically, to an automatic evaluation system for a computer interactive programming platform based on deep learning. Background Art

[0002] With the rapid development of programming education and technology competition platforms, higher requirements are placed on automated evaluation capabilities in interactive programming environments. Existing evaluation systems generally adopt methods based on test case comparison or template matching. Although they can determine whether the program output is correct, they have obvious limitations in structural understanding, semantic judgment and innovation recognition. On the one hand, traditional methods do not take into account the control flow relationship and grammatical structure within the program, and cannot well understand the nested logic, branch structure and function call path of the code, and thus cannot distinguish between solutions that are structurally equivalent but different in form. On the other hand, existing systems lack the deep modeling capabilities of the semantic layer, and it is difficult to identify the logical correctness and potential innovation contained in non-templated expressions. In addition, the evaluation process of most systems is fixed and lacks adaptive capabilities, and it is impossible to dynamically decide whether to conduct in-depth analysis or score feedback based on program performance. Therefore, the present invention proposes an automatic evaluation system for a computer interactive programming platform based on deep learning, in order to solve the above problems. Summary of the Invention

[0003] To achieve the above object, the present invention provides the following technical solutions:

[0004] An automatic evaluation system for computer interactive programming platforms based on deep learning, including:

[0005] The structure diagram construction module receives the source code submitted by the user, parses it to generate an abstract syntax structure tree, and constructs a syntax structure diagram based on it to represent the syntax organization and control flow path of the program;

[0006] The semantic graph generation module generates a semantic association graph based on the grammatical structure graph output by the structure graph construction module by modeling node types and control dependencies. It then uses the graph structure embedding model to extract features from the semantic graph and generate an embedding vector for semantic analysis.

[0007] The dynamic evaluation trigger module calculates the structural similarity between the user's grammatical structure graph and the standard structure graph to obtain the structural matching rate; and calculates the logical deviation based on the cosine distance between the semantic graph embedding vector and the standard semantic cluster center. When the structural matching rate is lower than the matching threshold and the logical deviation is higher than the deviation threshold, and the program running result is consistent with the reference output, the deep evaluation process is initiated;

[0008] The semantic solution identification module, when the in-depth evaluation process starts, inputs the semantic embedding vector of the user code into the pre-trained semantic clustering model to determine the semantic cluster to which it belongs. If the user code does not fall into any known cluster, and the execution path is closed and the complexity is within an acceptable range, it is marked as a potential innovative solution.

[0009] The index deduction feedback module combines the semantic graph similarity and cluster offset to generate a semantic equivalence index and a path innovation index respectively; the index combination is input into the trained multi-layer nonlinear neural reasoning network to output a scoring level, which includes four levels: high innovation, conventional excellence, structural optimization, and logical error. The source code solutions classified as high innovation will be embedded in the training buffer for use in updating the semantic clustering model.

[0010] In a preferred embodiment, the structure graph construction module adopts a hierarchical syntax node extraction mechanism in the process of constructing an abstract syntax structure tree, and generates three types of nodes step by step according to predefined syntax rules: statement-level nodes, block-level structure nodes, and control dependency nodes. When constructing the syntax structure graph, the three types of nodes are respectively mapped to vertex elements in the graph, and the vertices are connected by directed edges according to the program execution order and control flow logic, forming a graph structure with clear hierarchical and execution path description capabilities.

[0011] Each control flow edge is annotated with the execution jump type information, including sequence, condition, iteration, and return path, and reflects the control intensity or nesting level in the code through edge weight encoding.

[0012] In a preferred embodiment, the grammatical structure graph constructed by the structure graph construction module has a node type classification mechanism and a control path labeling mechanism. The node type classification mechanism is based on the sentence classification rules in the abstract syntax structure tree, and sets uniquely identified graph node category tags for different types of grammatical components, which is used by the semantic graph generation module to accurately perceive the attributes of grammatical elements.

[0013] The control path annotation mechanism is used to mark the path type of directed edges representing process jump relationships in the graph structure and attach logical representations of control conditions, so that the control semantics are fully retained when the semantic graph generation module embeds the graph structure.

[0014] In a preferred embodiment, after receiving the grammatical structure diagram generated by the structure diagram construction module, the semantic graph generation module establishes a semantic association graph by identifying the grammatical role and control dependency relationship of each node based on the structure information of the statement type labeled nodes and control path labeled edges constructed in the grammatical structure diagram;

[0015] Each node in the semantic association graph corresponds one-to-one to the functional statement node in the grammatical structure graph, and the semantic propagation direction edge is constructed through the sequence flow, conditional jump and function call path represented by the original control path annotation edge to express the semantic dependency logic between different statements in the program;

[0016] The semantic graph generation module jointly models the node features and edge connection patterns in the semantic association graph through the graph structure embedding model, and extracts high-dimensional embedding vectors across control structures. The generated embedding vectors serve as the basic semantic representation of the processing logic of the dynamic evaluation trigger module and the semantic solution identification module, and maintain a one-to-one correspondence with the output content of the structural graph construction module in terms of node index and structural topology.

[0017] In a preferred embodiment, the dynamic evaluation trigger module performs a graph matching operation between the grammatical structure graph generated by the structure graph construction module and the pre-built standard structure graph. The calculation method based on the graph edit distance is used to compare the node types, edge connection methods and topological structure differences between the two graphs, calculate the minimum conversion cost, and then obtain the structural matching rate after normalization based on the cost, which is used to quantify the structural similarity between the user's grammatical structure graph and the standard structure graph.

[0018] The dynamic evaluation trigger module performs vector space calculations on the embedding vector output by the semantic graph generation module and the standard semantic cluster center vector in the pre-trained clustering model. By calculating the cosine distance between the embedding vector and the nearest cluster center, the logical deviation is obtained to measure the degree of deviation between the semantic expression of the user program and the existing semantic paradigm.

[0019] In a preferred embodiment, when the depth evaluation process is started, the semantic solution identification module inputs the semantic embedding vector output by the semantic graph generation module into a pre-trained semantic clustering model trained on a large number of annotated program samples. By calculating the similarity between the embedding vector and the center of each semantic cluster, it determines whether the semantic embedding vector of the user code falls within any known semantic cluster.

[0020] If the distance between the semantic embedding vector and the centers of all semantic clusters exceeds the set cluster acceptance radius, it means that the user program does not belong to any existing semantic expression path in terms of semantic expression, and it is determined that it is not included in any known cluster.

[0021] In a preferred embodiment, the semantic solution identification module performs a path integrity check based on the control path in the syntax structure diagram generated by the structure diagram construction module, with the support of control flow annotation information, to verify whether the program execution logic forms a closed path. At the same time, based on the control flow path length, the number of branch nodes and the nesting depth index, a weighted summation calculation is performed to obtain the program complexity. If the closure holds and the complexity is within an acceptable range, the user code is marked as a potential innovative solution and used as a candidate input sample for scoring processing in the subsequent index deduction feedback module. The nesting depth index is the maximum level of control structure nesting in the abstract syntax structure tree.

[0022] In a preferred embodiment, the generation of the semantic equivalence index in the index deduction feedback module includes the following calculation process:

[0023] Extract all control nodes and function call nodes in the semantic graph output by the semantic graph generation module to form a core subgraph set. Then compare the node identifiers in this set with the corresponding nodes in the standard semantic graph and calculate the structural matching ratio. The structural matching ratio is the ratio of the number of overlapping node labels in the core subgraph to the total number of corresponding nodes in the standard semantic graph.

[0024] Calculate the Euclidean distance between the embedding vector of each node in the semantic graph and the embedding vector of the central node of the graph, and calculate the standard deviation of all distances as the semantic concentration value;

[0025] The structural matching ratio and semantic concentration value are used as dual input variables and mapped through a fitted second-order polynomial regression function to generate a semantic equivalence index. The output value is between zero and one, which is used to measure the structural retention level and semantic consistency of user code.

[0026] In a preferred embodiment, the generation of the path innovation index in the index deduction feedback module includes the following calculation process:

[0027] Get the Euclidean distance between the semantic embedding vector output by the semantic solution identification module and the center of its nearest semantic cluster, set it as the current distance, then get the average distance of all samples in the semantic cluster to the cluster center, and calculate the ratio of the two as the distance deviation coefficient;

[0028] Extract branch structure nodes and nested structure nodes from the semantic graph, count the frequencies of occurrence of various structure nodes, form a structure node type distribution vector, and calculate the Euclidean distance between this vector and the standard path structure node type distribution vector as the structure variation value;

[0029] The distance offset value and structural variation are normalized to exponential growth values ​​in the interval [0,1] using the Sigmoid function, and the product of the two is used as the final path innovation index.

[0030] In a preferred embodiment, after receiving the semantic equivalence index and the path innovation index, the index deduction feedback module organizes the two indexes into a two-element real-valued vector in a fixed order and inputs them into a trained multi-layer nonlinear neural inference network. The network is composed of multiple continuous hidden layers, and each hidden layer contains a preset nonlinear activation function for deep representation learning and decision boundary mapping of the dual-index combination features; during the training phase, the inference network constructs a nonlinear mapping relationship from the index combination to the rating level space through fitting learning of a large number of labeled samples. The rating levels include four levels: high innovation, conventional excellence, structural optimization, and logical error. After receiving the dual-exponential vector during the inference phase, the inference network outputs a set of multi-class probability distribution results through the forward propagation path, and then determines the final rating level by the corresponding item with the maximum probability.

[0031] Technical effects and advantages of the present invention:

[0032] This invention uses a structure graph construction module to receive user-submitted source code, parse it to generate an abstract syntax structure tree, and further construct a syntax structure graph, effectively extracting the program's grammatical organization and control flow paths. This approach enables graphical modeling of program structure, allowing subsequent semantic analysis to be conducted on a graphical basis with clear structural hierarchies and control relationships. This improves the accuracy of identifying the user's programming logic structure and facilitates the precise expression and processing of nonlinear control structures, nested logic, and multi-branch paths.

[0033] The present invention constructs a semantic association graph through a semantic graph generation module, extracts semantic embedding vectors, and calculates the structural matching rate and logical deviation in a dynamic evaluation trigger module. When specific trigger conditions are met, the in-depth evaluation process is initiated. This mechanism combines static structural features with dynamic semantic features and establishes a conditional trigger mechanism, enabling the system to automatically control whether to enter a more costly analysis path based on the degree of deviation between program structure and semantics. This improves semantic understanding capabilities while significantly optimizing the allocation efficiency of computing resources and avoiding redundant processing of conventional code.

[0034] The present invention uses a semantic solution identification module and an exponential deduction feedback module to work together to identify potential innovative solutions that do not fall into any known semantic clusters, have closed structures, and have reasonable complexity, and outputs a rating level through a multi-layer nonlinear neural reasoning network. For source code solutions classified as highly innovative, the system embeds them into the training buffer for use in the semantic update process of subsequent models. This mechanism not only improves the ability to discover non-templated solutions, but also builds a feedback-driven adaptive evaluation process to provide support for the continuous evolution of the system and the expansion of its semantic recognition capabilities, thereby achieving dynamic absorption and structural utilization of innovative knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings;

[0036] Figure 1 This is a schematic diagram of the automatic evaluation system of the computer interactive programming platform based on deep learning in the present invention.

[0037] Figure 2 This is a schematic diagram of the exponential deduction feedback module in the present invention.

[0038] Figure 3 This is a schematic diagram of the structural diagram building module in the present invention. DETAILED DESCRIPTION

[0039] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0040] Reference Figure 1-3 The following examples were obtained:

[0041] Example 1:

[0042] An automatic evaluation system for computer interactive programming platforms based on deep learning, including:

[0043] The structure graph construction module receives user-submitted source code, parses it to generate an abstract syntax structure tree (ABST), and constructs a grammatical structure graph based on this structure graph, representing the program's grammatical organization and control flow paths. The structure graph construction module performs low-level syntax analysis on the user-submitted source code and serves as the starting point for the entire evaluation process, providing basic structural modeling and program behavior abstraction. This module parses the source code into an ABST, establishing the hierarchical relationships between program language elements under grammatical rules. Based on this ABST, the structure graph construction module further constructs a grammatical structure graph. This graph represents the organizational order and control dependencies between statements in the program. Nodes represent grammatical elements, such as statements, control structures, and functions, while edges represent the execution order or control jumps between statements. By modeling the node types and connection patterns in the structure graph, this module provides subsequent modules with a data structure capable of expressing both grammar and control. This enables the evaluation system to perform semantic understanding and behavior recognition using graph computing, laying the structural foundation for structural matching and control path analysis.

[0044] The semantic graph generation module, based on the syntactic structure graph output by the structural graph construction module, generates a semantic association graph by modeling node types and control dependencies. It then uses a graph structure embedding model to extract features from the semantic graph and generate an embedding vector for semantic analysis. Building on the structural graph construction module, the semantic graph generation module further abstracts the program's underlying meaning and semantic behavior. This module first receives the syntactic structure graph and identifies the syntactic types of nodes in the graph (such as statements, loops, and calls) and the control paths between nodes to construct a semantic association graph. This semantic association graph not only preserves structural information but also makes the actual logical dependencies between statements explicit, forming a semantic representation of program behavior. The semantic graph generation module, using the graph structure embedding model, jointly models the information of nodes and edges in the graph, converting the structural graph into a computable high-dimensional semantic embedding vector. This vector represents the program's semantic structure distribution and is a key foundation for the system's understanding of the user's code "thoughts." The embedding vector output by this module serves both as a similarity evaluation tool in subsequent evaluation processes and as a tool for determining whether a program is representative, original, or unusual at the semantic level.

[0045] The dynamic evaluation trigger module calculates the structural similarity between the user's grammatical structure graph and the standard structure graph to obtain the structural matching rate. It also calculates the logical deviation based on the cosine distance between the semantic graph embedding vector and the center of the standard semantic cluster. When the structural matching rate falls below the matching threshold, the logical deviation exceeds the deviation threshold, and the program execution results are consistent with the reference output, the in-depth evaluation process is initiated. The dynamic evaluation trigger module is the decision-making control core that implements the "intelligent scheduling" of the evaluation process. This module's primary responsibility is to determine whether to proceed to the in-depth semantic recognition and innovation evaluation process, thereby avoiding wasting computing resources on conventional code and dedicating more processing power to potential innovative solutions. Specifically, the module receives the grammatical structure graph output by the structure graph construction module and compares it with the preset standard structure graph for structural similarity to obtain the structural matching rate. Simultaneously, based on the embedding vector output by the semantic graph generation module, it calculates the cosine distance between the embedding vector and the center of the standard semantic cluster to obtain the logical deviation. When the structural matching rate is low (i.e., structural novelty), the logical deviation is high (i.e., semantic uniqueness), and the program execution results are correct, it indicates that the code is likely not an incorrect implementation, but rather a reasonable but non-templated solution. The system then triggers the in-depth evaluation process. This module plays a role of "strategy diversion" in the overall architecture, improving evaluation efficiency and targeted response.

[0046] When the deep evaluation process starts, the semantic solution identification module inputs the user code's semantic embedding vector into a pre-trained semantic clustering model to determine its semantic cluster. If the user code does not fall into any known clusters, its execution path is closed, and its complexity is within an acceptable range, it is marked as a potential innovative solution. The semantic solution identification module is responsible for determining the user code's belonging and uniqueness in the semantic space and serves as the system's discriminant node for identifying "innovative solutions." This module runs after the dynamic evaluation trigger module is activated. It receives the embedding vector output by the semantic graph generation module and inputs it into the trained semantic clustering model to determine whether it belongs to the center of an existing semantic cluster. If the code's semantic embedding does not match any existing cluster, it may contain novel solution logic. The module then further analyzes whether the code's control path is completely closed and its execution structure is reasonable. If these conditions are met, the code is not only semantically unique but also structurally sound, indicating that it has the potential to be an innovative solution. The module outputs a "potential innovative solution" flag, which provides a basis for scoring in the next step and also identifies the solution as a candidate sample to be entered into the training buffer.

[0047] The index deduction feedback module combines semantic graph similarity and cluster offset to generate a semantic equivalence index and a path innovation index, respectively. This index combination is fed into a trained multi-layer nonlinear neural inference network, which outputs a four-level rating: high innovation, general excellence, structural optimization, and logical error. Source code solutions classified as high innovation are embedded in the training buffer for use in updating the semantic clustering model. The index deduction feedback module provides quantitative evaluation results for the system and is a core component of the "decision-making layer." It receives two key input metrics: the semantic equivalence index and the path innovation index. The former measures the structural and semantic consistency of the user code with the standard solution, while the latter measures its structural uniqueness and semantic deviation. The module inputs these two indices as two-dimensional vectors into the trained multi-layer nonlinear neural inference network. The network uses a deep model to classify the index combination and output a rating of four levels: high innovation, general excellence, structural optimization, and logical error. The output of the rating level can not only be used to provide feedback to users, but also serve as an internal feedback signal to embed high-innovation level samples into the training buffer for updating the semantic clustering model to enhance the system's ability to recognize new solutions in the future and achieve self-evolution.

[0048] It should be noted that: if the dynamic evaluation trigger module does not start the deep evaluation process, the evaluation system will call the basic scoring mechanism to make a quick judgment based on factors such as whether the structural matching rate is not lower than the matching threshold, whether the logical deviation is not higher than the deviation threshold, and whether the program runs successfully, combined with the standard solution structure and typical error patterns recorded in the rule library to generate a preliminary scoring level as the evaluation result when deep processing is not triggered, and quickly evaluate the user's source code programming.

[0049] When processing user-submitted source code, the structure graph construction module first constructs an abstract syntax tree (ABST) based on the programming language's syntax specifications. This ABST is a structured representation of the hierarchical relationships between code grammatical components in a tree-like structure. Using this ABST, the module employs a hierarchical syntax node extraction mechanism, categorizing nodes from the lowest to the highest grammatical level. Nodes are divided into three categories according to predefined rules:

[0050] Statement-level nodes: refer to the grammatical components that represent basic operation units in the source code, such as variable declarations, assignment statements, function calls, expressions, etc.; block-level structure nodes: refer to structural grammatical blocks with independent semantic boundaries, such as function bodies, conditional blocks, loop bodies, etc.; control dependency nodes: refer to the grammatical control structure nodes used to describe program control logic, such as if conditional branches, for / while loops, switch branch selection structures, etc.

[0051] In the process of constructing the syntax structure graph, the structure graph construction module maps the above three types of nodes as vertex elements in the graph. Each node retains its original type label in the graph so that subsequent modules can identify node attributes; then, based on the actual execution order and control flow logic in the source code, the vertices in the graph are connected through directed edges to form a graph structure that can represent the flow of program behavior.

[0052] This graph structure not only reflects the hierarchical organization of the syntax but also depicts the execution path of the program. Each directed edge represents a statement jump relationship within the program's control process, and control flow edges are used to annotate the execution jump type. Specifically, these include: sequential paths, which represent the naturally sequential execution of statements; conditional paths, which represent the paths guided by different conditional judgments in a branch structure, such as if-else branches; iterative paths, which represent the jump relationship in a loop structure where the program may repeatedly execute a certain logic segment; and return paths, which represent the jump behavior that returns to the calling location after the execution of a function or procedure. Furthermore, to more accurately represent program control complexity, the structure graph construction module introduces edge weight encoding on connecting edges. This weight reflects the control strength or nesting level of each jump edge in the code. Control strength can be quantified based on the importance, frequency, or logical proportion of the control structure connected by the edge. The nesting level indicates the number of control structure nesting levels within which the jump occurs, which facilitates the evaluation of structural characteristics such as control complexity and path depth in subsequent modules.

[0053] The syntax structure diagram constructed by the structure diagram construction module has two key structural enhancement mechanisms: node type classification mechanism and control path annotation mechanism. These two mechanisms work together to ensure that the syntax structure diagram not only has complete syntax construction information, but also can accurately express the program execution control process, forming an intermediate expression structure for semantic modeling.

[0054] The node type classification mechanism involves classifying and encoding each node in the grammatical structure graph during the construction of the graph, based on the statement classification rules for each grammatical node in the abstract syntax tree (ABST). The ABST is a hierarchical tree of grammatical relationships extracted from the source code, where nodes represent different types of grammatical components. The node type classification mechanism identifies the node's category based on the grammatical specification, including but not limited to the following common grammatical components: expression nodes (e.g., assignment statements, arithmetic expressions), declaration nodes (e.g., variable declarations, function declarations), control nodes (e.g., if statements, for loops, switch branches), and call nodes (e.g., function calls, method executions). Each node type is assigned a unique category in the graph structure, for example, using a type tag, category ID, or color coding. This classification allows the semantic graph generation module to distinguish the semantic roles of different grammatical components during the graph embedding phase, thereby establishing a more semantically expressive node feature representation.

[0055] The control path annotation mechanism adds additional path semantic tagging information to each edge when constructing the graph structure's edges (i.e., directed edges connecting different nodes). This mechanism is used to indicate the jump types and jump conditions of the program control flow in the graph, thus giving the syntax structure graph complete control semantics capabilities. Control paths include four typical jump types, which have been disclosed in the relevant description of the structure graph construction module: sequential path; conditional path; iterative path; and return path. In the syntax structure graph, the control path annotation mechanism encodes the path type by setting the edge attribute field and attaching a logical expression or conditional value (such as the Boolean expression in the if conditional judgment) as the control condition attribute of the edge. This attribute is retained when the semantic graph generation module embeds the graph structure, so that the generated semantic graph not only contains information about the node itself, but also reflects the actual impact of different control paths in the program flow on the semantic relationships between nodes.

[0056] For example, when processing a certain code snippet, the structure graph construction module will generate three control nodes (a judgment condition and two assignment operations) in the graph, and establish two control path edges between the "if" condition and the "assignment statement", respectively labeled as "conditional path-true branch" and "conditional path-false branch", with the logical identifier of the conditional expression "x>0". This annotation result will directly affect the semantic propagation direction and control weight in the semantic graph generation module, enabling subsequent evaluations to identify the control semantic information in the judgment logic. The combination of the node type classification mechanism and the control path annotation mechanism enables the grammatical structure graph to have the ability to express the program control hierarchy while maintaining structural accuracy, providing a distinguishable, traceable, and expressible basic graph structure semantics for the subsequent graph embedding calculation of the semantic graph generation module.

[0057] It needs to be clarified that: in the present invention, the structural graph construction module adopts three types of node structure division methods, namely statement-level nodes, block-level structure nodes and control dependency nodes, which are used to clarify the graph topology hierarchy; and when extracting node features, the statement-level nodes are further semantically refined and marked, and divided into semantic function labels such as expression class, declaration class, control class and call class, which are used to finely model the semantic role of each node in the graph. The two are hierarchical modeling, and there is no classification logic conflict.

[0058] After receiving the grammatical structure diagram generated by the structural diagram construction module, the semantic graph generation module performs the semantic layer modeling process, with the aim of further transforming the program from a structural representation into a semantic expression carrier to support subsequent semantic evaluation and innovation judgment.

[0059] First, the graph structure is parsed based on the structure information of the statement type labeled nodes and control path labeled edges constructed in the grammatical structure graph. Statement type labeled nodes are the category labels that the structure graph construction module assigns to each statement node in the graph, such as those indicating semantic attributes such as expression, control statement, and function call. Control path labeled edges are directed edges connecting nodes in the structure graph and carry information indicating jump types. These include three types of paths: sequential flow (continuous execution), conditional jumps (path branches based on Boolean conditions), and function call paths (subroutine jumps).

[0060] Based on this structural information, the semantic graph generation module constructs a semantic association graph by identifying the syntactic role and control dependency relationships of each node. Syntactic role refers to the functional positioning of a node in the program's execution logic, such as whether it controls the flow of the program or participates in data operations. Control dependency refers to whether the execution of a statement in the program depends on the execution result or path of another statement.

[0061] Each node in the semantic association graph corresponds one-to-one to a functional statement node in the syntax structure graph. Functional statement nodes are code units involved in the implementation of program functions, excluding comments, whitespace, or nodes without logical execution meaning. The semantic graph constructs semantic propagation direction edges using the path type information provided by the original control path annotation edges to ensure that the program execution semantics are expressed in the graph. Propagation direction edges are generated as follows: sequential flow edges point to subsequent execution nodes; conditional jump edges lead to different execution branches based on logical judgment; function call path edges jump from the call location to the start node of the called function, and then return to the original call point from the end of the function.

[0062] The semantic graph generation module jointly models the node features and edge connection patterns in the semantic association graph through a graph structure embedding model. The graph structure embedding model is a deep modeling technology that converts unstructured data in the graph (such as control attributes and type labels) into a computable vector representation. During the construction process, the model integrates node attributes, adjacency structure, and edge label information to generate a high-dimensional embedding vector. The embedding vector is used to retain the characteristic expression of each statement node in the control semantic context. The generated embedding vector has the ability to express across control structures and can reflect the differences in the role of statements on different semantic paths. For example, the same assignment statement may have different control meanings in conditional and iterative structures. The embedding vector serves as the basic semantic representation of the processing logic of the dynamic evaluation trigger module and the semantic solution identification module, that is, the main input for calculating the structural matching rate, logical deviation, and semantic cluster affiliation judgment.

[0063] During the modeling process, the semantic graph generation module maintains a one-to-one correspondence between the node index and structural topology of the output content of the structural graph construction module. This means that each embedding vector in the semantic graph can be traced back to the source node number in the grammatical structure graph and its connection method in the graph, thereby realizing a unified mapping between structure and semantics, facilitating the subsequent integrated analysis of structural logic and semantic expression.

[0064] The dynamic assessment trigger module matches the grammatical structure graph generated by the structure graph construction module with a pre-built standard structure graph to determine whether the user-submitted program deviates from existing standard templates or reference solutions at the structural level. A grammatical structure graph is a graphical representation of the program's control flow and grammatical hierarchy as a directed graph. Nodes represent statements or control structures, and edges represent control relationships or execution paths between statements.

[0065] The standard structure graph is a set of reference program graphs preset by developers before the system goes online on the evaluation platform. It represents a known correct, standardized, and high-quality code structure. In the graph matching process, the dynamic evaluation trigger module adopts a calculation method based on the graph edit distance. The graph edit distance refers to the minimum operation cost required to convert one graph into another. These operations include the insertion, deletion, and replacement of nodes, as well as the insertion, deletion, and replacement of edges. The module specifically performs the following operations: comparing whether the type labels of the nodes in the two graphs are consistent (such as control nodes, call nodes, etc.); checking whether the edge connection methods are the same, for example, whether the same control flow path exists; and evaluating whether the nesting level of the overall graph topology and the execution process path are consistent.

[0066] Through this comparison, the system determines the minimum conversion cost required to transform the user's grammatical structure diagram into a standard structure diagram. This cost is normalized, mapping its value to the range [0, 1] to obtain the structural matching rate. A structural matching rate closer to 1 indicates that the user's program structure closely matches the standard template; a rate closer to 0 indicates significant structural differences. This metric serves as a key factor in determining whether to proceed to the in-depth evaluation process.

[0067] The dynamic evaluation trigger module simultaneously performs vector space calculations on the embedding vectors output by the semantic graph generation module and the standard semantic cluster center vectors from the pre-trained clustering model. This allows for a quantitative analysis of the degree of deviation between user code and the existing code base at a semantic level. The semantic embedding vector is a high-dimensional vectorization of the program's overall semantic structure, representing its position in the semantic space. The standard semantic cluster center vector is a cluster center derived from clustering a large number of standard samples and represents the paradigm of a typical semantic structure.

[0068] Logical deviation is calculated by calculating the cosine distance between the embedding vector and the nearest cluster center. Cosine distance is a commonly used vector similarity metric that reflects the angle between two vectors. Its value ranges from [0 to 1]. Larger values ​​indicate greater semantic dissimilarity and deviation between the two vectors. Logical deviation is therefore an important indicator for measuring whether the semantic expression of a user program deviates from known semantic patterns.

[0069] For example, the linear structure of "input → judgment → processing → output" often appears in standard semantic graphs, while user code adopts the logical structure of "function nesting → recursive processing → output" for the same function. In this case, its semantic embedding vector may be far away from the original cluster center, resulting in an increase in logical deviation.

[0070] The structural matching rate and logical deviation together form the logical basis for determining whether to trigger the subsequent in-depth evaluation process. If the structural matching rate is below the matching threshold, the logical deviation is above the deviation threshold, and the program's execution results are consistent with the reference output, the system deems the program a potential innovative solution with novel structure, unique semantics, and correct functionality. This triggers the in-depth evaluation process, entering the semantic solution identification and exponential deduction process.

[0071] The Semantic Solution Identification module is triggered when the deep evaluation process starts. It determines whether the user code follows an existing semantic pattern and whether it possesses innovative semantic and structural features. This module first generates a semantic embedding vector based on the output of the semantic graph generation module. This embedding vector represents a high-dimensional vector encoding of the program's overall control structure and semantic logic. This embedding vector is constructed using a graph structure embedding model and can express each node's control semantics, path structure, and interactions with upstream and downstream nodes.

[0072] The semantic solution identification module inputs the above embedding vectors into a pre-trained semantic clustering model. This clustering model is pre-trained based on a large number of annotated program samples. It uses a clustering algorithm to categorize historical samples. Each cluster represents a typical semantic pattern, and the cluster center vector represents the average semantic expression of samples in that cluster. By calculating the similarity between the user's embedding vector and the center vectors of all semantic clusters, the system determines whether the user's program can be classified into any existing semantic clusters.

[0073] The specific calculation method is: calculate the Euclidean distance or cosine similarity between the user embedding vector and the center of each semantic cluster respectively. If at least one cluster center distance is within the cluster acceptance radius (the radius is the set threshold), the program is considered to belong to the semantic cluster; if all distances exceed the cluster acceptance radius, it means that the embedding vector cannot be classified into any known cluster in the semantic space, indicating that its semantic expression is independent, that is, it is a potential non-templated or undocumented new solution type.

[0074] To determine whether a user program is structurally sound, the semantic solution identification module also verifies the control paths in the grammatical structure diagram generated by the structure diagram construction module. A control path refers to all possible paths from the entry node to the exit node in the program execution process, including sequential execution paths, conditional jump paths, loop control paths, and function call paths. Based on the control flow annotation information, the system analyzes the jump methods and logical nodes of the control path to confirm whether there are any logical anomalies such as no-exit paths, dead loops, and illegal jumps, ensuring path closure.

[0075] On this basis, the semantic solution identification module further calculates the structural complexity of the program. This module evaluates the following three quantitative dimensions: control flow path length, which refers to the maximum number of path nodes from the entry node to any exit path, used to measure the length of the program execution chain; branch node number, which refers to the total number of nodes in conditional judgment control structures such as if and switch; nesting depth index, which is defined as the maximum level of nesting of control structures (such as if, for, while) in the program's abstract syntax structure tree, used to measure structural complexity;

[0076] The three indicators are combined into a program complexity value in a weighted summation manner and compared with the upper limit of the acceptance range set by the system. Weighted summation is a mathematical method used to combine multiple indicators into a total score according to different levels of importance. The core idea is that different indicators have different importance to the overall result, so different weights are given (the greater the weight, the greater the impact) and then summed. The mathematical expression is as follows: Complexity value = α × control flow path length + β × number of branch nodes + γ × nesting depth index, α, β, γ are the corresponding weight coefficients, representing the importance of each indicator in the total complexity; the three indicators are all real numbers, with unified units or standardized processing; the weighted sum is the final program complexity value.

[0077] If the system determines that path closure holds, program complexity is within acceptable limits, and the semantic embedding vector does not fall into any known semantic clusters, indicating novel logic, clear structure, and robust functionality, the Semantic Solution Identification Module will flag the user code as a potential innovative solution. This code, as a candidate input sample, will be submitted to the Index Deduction Feedback Module for subsequent generation of a semantic equivalence index and a path innovation index, and then enter the scoring process.

[0078] The generation of the semantic equivalence index in the index deduction feedback module includes the following calculation process, which aims to evaluate the consistency between the user program and the standard semantic structure from two dimensions: structure and semantics. As one of the core inputs of the final scoring process, the semantic equivalence index can quantify the degree of fit between the user code and the reference sample in terms of semantic expression and structural expression. First, all control nodes and function call nodes in the semantic graph output by the semantic graph generation module are extracted. Control nodes are nodes in the semantic graph that have the function of controlling the execution process, and are commonly found in control structures such as conditional statements and loop statements. Function call nodes are nodes that represent explicit calls to functions or methods, and usually undertake functional transfer tasks. These nodes constitute the core path of program semantic control.

[0079] After the system filters these two types of nodes, a core subgraph is formed: a subgraph consisting of control semantic backbone nodes, representing the key control semantic structures of the user code. The system then compares this subgraph with the corresponding node set in the standard semantic graph. This comparison is done by node label matching, comparing the semantic type tags (e.g., IF, WHILE, CALL, etc.) of the nodes to ensure they match those of the corresponding nodes in the standard graph.

[0080] Based on the comparison results, a structural matching ratio is calculated, defined as the number of node labels in the core subgraph that match the labels of nodes at the same location in the standard semantic graph, divided by the total number of nodes corresponding to that region in the standard semantic graph. The structural matching ratio ranges from [0 to 1]. A higher value indicates a higher degree of structural preservation, meaning that the closer the user code is to the reference model in terms of control structure and function calls. The system then calculates the Euclidean distance between the embedding vector of each node in the semantic graph and the embedding vector of the graph's center node. The node embedding vector, generated by the graph structure embedding model, represents multi-dimensional features of each node in the semantic graph, including its position, semantics, and connection context. The center node of the graph can be selected as the reference point, with the node having the most convergent semantic propagation paths or the shortest average distance. The Euclidean distances of all nodes to the graph center are sampled, and the standard deviation is calculated to form the semantic concentration value. This value measures whether the semantic expression is dispersed or concentrated: a smaller standard deviation indicates a more concentrated semantic distribution and more consistent expression; a larger standard deviation indicates a divergent semantic structure and unstable expression.

[0081] Finally, the structural matching ratio and semantic concentration value are used as dual input variables, and the semantic equivalence index is generated by joint modeling through the fitted second-order polynomial regression function. The function is:

[0082] f(x,y)=a0+a1·x+a2·y+a3·x 2 +a4·x·y+a5·y 2 ;

[0083] Where: x is the structural matching ratio; y is the semantic concentration value; a0-a5 are the coefficients obtained by fitting the training sample set; the output value is in the range [0,1], and the closer it is to 1, the more consistent the structure and semantics are with the standard solution.

[0084] The generation of the path innovation index in the index deduction feedback module includes the following calculation process, the purpose of which is to identify whether the user program shows a deviation higher than the conventional path expression in structural configuration and semantic distribution, thereby identifying code instances with potential creativity.

[0085] Obtain the Euclidean distance between the semantic embedding vector output by the semantic solution identification module and the center of its nearest semantic cluster. This distance represents the closest distance between the user program and a known semantic pattern in semantic space and is recorded as the current distance. Euclidean distance is a metric that represents the geometric difference between two vectors in high-dimensional space and is used to quantify the difference between semantic embeddings.

[0086] For all samples within the semantic cluster, the Euclidean distance between each sample's embedding vector and the cluster center is calculated, and the average of these distances is calculated to represent the degree of convergence of the samples in the cluster with respect to the cluster center. The ratio of the current distance to the average distance is then calculated, denoted as the distance deviation coefficient. This coefficient reflects the degree of outlier of the current user code relative to the cluster center. A larger coefficient indicates a greater degree of deviation from the cluster center in semantic expression, indicating a greater degree of differentiation.

[0087] Branching and nested structure nodes are extracted from the semantic graph. Branching structure nodes include control statements that express conditional judgments or branching logic, such as if and switch. Nested structure nodes represent statement blocks that appear within other control structures, such as nested if statements within a for loop. After extraction, the frequency of each type of structure node is counted, that is, the number of times each type of node appears in the semantic graph, forming a structure node type distribution vector, whose each dimension represents the frequency of occurrence of a certain structure type.

[0088] The Euclidean distance between this structural distribution vector and the pre-set standard path structure node type distribution vector is calculated to obtain a structural variation value. The Euclidean distance reflects the degree of deviation between the two distributions, indicating whether the user program's structural configuration differs from the typical path in terms of structural components and proportions. A larger structural variation value indicates a more novel structural combination and a more atypical expression path.

[0089] Finally, the above two results, the distance offset value and the structural variation value, are normalized respectively. The normalization uses the Sigmoid function, which is in the form of:

[0090] Sigmoid(u)=1 / (1+exp(-d·(up)));

[0091] u is the original value (the distance deviation coefficient or structural variation value); d is the coefficient that adjusts the steepness of the function; p is the center of the deviation, which determines the critical point of the function. The output value increases exponentially within the interval (0, 1), with larger values ​​indicating more significant deviation. The two normalized values ​​are multiplied together to form the path innovation index, which serves as the final output metric to measure the degree of structural and semantic deviation and the atypicality of the program's combined expression. Values ​​closer to 1 indicate a more novel program path combination; values ​​closer to 0 indicate a conventional expression of both structural and semantic configuration.

[0092] For example, user code contains a control structure that combines multiple nested functions, conditional judgments, and loop hierarchies. Compared with the standard path (usually a sequential judgment structure), the following is true: the Euclidean distance between the embedding vector and the semantic cluster center = 0.95; the average distance within the cluster = 0.50; the distance deviation coefficient = 1.9; the branch node frequency = [3, 2, 1], the standard is [1, 1, 1]; the Euclidean distance (structural variation) = 2.45; the two are normalized to 0.86 and 0.81 respectively; the path innovation index = 0.86×0.81 = 0.70.

[0093] After receiving the semantic equivalence index and path innovation index, the index deduction feedback module combines these two indices in a fixed order into a two-element real-valued vector, which is then input into the trained multi-layer nonlinear neural inference network. The semantic equivalence index is a scoring metric that reflects whether the user's program structure and semantics adhere to the standard path, while the path innovation index measures whether the program's structural expression and semantic distribution exhibit innovative characteristics. Both indices are real numbers ranging between [0, 1]. This two-element vector, constructed in the order [semantic equivalence index, path innovation index], uniformly represents the current program's performance in terms of structural preservation and semantic deviation, and serves as the input vector for the neural network model.

[0094] A multi-layer nonlinear neural inference network is a deep learning model consisting of multiple consecutive hidden layers. Each hidden layer contains a preset nonlinear activation function (such as ReLU, Tanh, or Sigmoid) to perform nonlinear transformations on the input features. This network structure has strong expressive power, can model complex nonlinear decision boundaries, and can handle multi-classification tasks. The model structure includes: an input layer (dimension 2, receiving double exponentials); several hidden layers (the number of layers and nodes is adjustable); and an output layer (dimension 4, corresponding to the number of rating categories). The connection weights and bias parameters between each layer are learned through training.

[0095] During the training phase, the neural inference network receives a large number of annotated historical samples as a training set. Each sample contains a combination of its semantic equivalence index and path innovation index, along with its corresponding human-annotated rating (highly innovative, generally excellent, structurally optimizable, logically incorrect). The network continuously adjusts weight parameters through a backpropagation algorithm to minimize the difference between the predicted and actual ratings, ultimately constructing a nonlinear mapping relationship from the dual-index input to the output rating.

[0096] During the inference phase—the actual evaluation run—the model receives a double exponential input generated by the user program, propagates through each hidden layer and activation function in turn, and outputs a set of real-valued vectors representing the probability distribution of each rating level. For example, the output vector [0.05, 0.20, 0.60, 0.15] indicates that the model believes the program is most likely to be classified as "structurally optimizable." The index of the maximum probability item is used as the final rating level. That is, the category with the largest value in the output vector is the rating level, achieving a decision-making transition from a fuzzy rating space to discrete evaluation labels. This rating level is fed back to the user and participates in subsequent decision-making mechanisms.

[0097] Source code solutions classified as "highly innovative"—those with a "highly innovative" output category—have their corresponding source programs marked as exhibiting significant structural and semantic innovation. The system embeds these program samples into a training buffer, which temporarily stores candidate semantic solution samples. These samples are then incorporated into the semantic clustering model during subsequent updates, expanding existing semantic cluster centers and adding new semantic categories, thereby enhancing the model's coverage and adaptability to potential novel solutions. This process forms a positive feedback loop of "highly innovative samples → model updates → improved new recognition capabilities."

[0098] In the technical solution of the present invention, the introduction of the training buffer is not only for temporary storage purposes, but also plays a key role in "dynamic knowledge updating". When a section of user code is rated as "highly innovative", it means: its structure and semantic expression significantly deviate from the existing semantic pattern (semantic cluster); but the running result is correct, the structure is closed, and the complexity is controllable; the system believes that the solution represents a new and effective way to solve the problem. Therefore, the primary purpose of embedding it into the training buffer is to use such samples as the center of a new semantic cluster or to expand the boundaries of an existing cluster when the semantic clustering model is subsequently updated. This means that the system has the ability to "learn unseen solutions and adapt to the future", which is an engineering implementation of a continuous learning mechanism.

[0099] The semantic solution identification module relies on a semantic clustering model to determine whether user code belongs to an existing semantic cluster and whether there is potential innovation. Once "highly innovative" code is embedded in the training buffer, it can be used in the subsequent retraining phase of the semantic clustering model, enabling the model to identify more non-templated solutions and achieving a system capability upgrade from static clustering to incremental semantic classification. During system iterations, the scoring network can select highly innovative samples from the training buffer as new sample supplements to participate in the retraining or fine-tuning process of the neural inference model. This makes the scoring logic more adaptable to diverse, highly complex, and nonlinear input structures, preventing the model from overfitting to outdated solutions and maintaining long-term scoring accuracy.

[0100] After completing the rating level determination, the system converts the rating level into the user's final score according to the preset level-score mapping rules, and combines the floating factors of the semantic equivalence index and the path innovation index to form a detailed score within the level range as the user evaluation feedback result, realizing the quantitative unified output of structural evaluation and semantic understanding ability.

[0101] Specifically, the system's rating output comes from a multi-layer nonlinear neural inference network. Based on the inputs of the semantic equivalence index and the path innovation index, it outputs four rating levels: "High Innovation, Conventional Excellence, Structural Optimization, and Logical Error." However, these ratings are still categorized labels, not user-visible "scoring results." Therefore, a mapping mechanism from rating levels to final scores is needed.

[0102] The system presets a corresponding basic score for each rating level. For example, the basic score for high innovation is 90, and the basic score for general excellence is 75. To ensure that programs within the same level can also have different levels, the system further uses two indices as floating factors within the level: semantic equivalence index (E) and path innovation index (P). The system uses the following strategy to generate the final score:

[0103] Final score = grade benchmark score + weight adjustment item;

[0104] Weight adjustment term = (w1×E+w2×P)×corresponding interval floating range;

[0105] Grade benchmark score: if the general excellence is 75; w1, w2: configurable weighting coefficients (such as w1 = 0.4, w2 = 0.6); interval floating range: if the upper limit of the floating range for "general excellence" is 14 points, the maximum score = 89; if the upper limit of the floating range for "high innovation" is 10 points, the maximum score = 100; the weighted items are used to control the fluctuation of the score within the grade interval to achieve personalized feedback. Suppose program A: is judged as "general excellence" by the neural network; the semantic equivalence index E = 0.85; the path innovation index P = 0.30; the weight setting: w1 = 0.5, w2 = 0.5; the grade floating limit of "general excellence" is 14 points, then the corresponding interval floating range is 14 (removing the dimension), and the system finally feedbacks the user score as 83 points.

[0106] The above function formulas are all dimensionless and numerically calculated. The function formula is a function formula obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the function formula are set by technicians in this field according to actual conditions.

[0107] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0108] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0109] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0110] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An automatic evaluation system for a computer interactive programming platform based on deep learning, characterized in that: include: The structure diagram construction module receives the source code submitted by the user, parses it to generate an abstract syntax structure tree, and constructs a syntax structure diagram based on it to represent the syntax organization and control flow path of the program; The semantic graph generation module generates a semantic association graph based on the grammatical structure graph output by the structure graph construction module by modeling node types and control dependencies. It then uses the graph structure embedding model to extract features from the semantic graph and generate an embedding vector for semantic analysis. The dynamic evaluation trigger module calculates the structural similarity between the user's grammatical structure graph and the standard structure graph to obtain the structural matching rate; and calculates the logical deviation based on the cosine distance between the semantic graph embedding vector and the standard semantic cluster center; When the structural matching rate is lower than the matching threshold and the logical deviation is higher than the deviation threshold, and the program running result is consistent with the reference output, the deep evaluation process is started; The semantic solution identification module, when the in-depth evaluation process starts, inputs the semantic embedding vector of the user code into the pre-trained semantic clustering model to determine the semantic cluster to which it belongs. If the user code does not fall into any known cluster, and the execution path is closed and the complexity is within an acceptable range, it is marked as a potential innovative solution. The index deduction feedback module combines the semantic graph similarity and cluster offset to generate a semantic equivalence index and a path innovation index respectively; the index combination is input into the trained multi-layer nonlinear neural reasoning network to output a scoring level, which includes four levels: high innovation, conventional excellence, structural optimization, and logical error. The source code solutions classified as high innovation will be embedded in the training buffer for use in updating the semantic clustering model.

2. The automatic evaluation system for computer interactive programming platform based on deep learning according to claim 1 is characterized in that: The structure graph construction module uses a hierarchical syntax node extraction mechanism in the process of constructing an abstract syntax structure tree. It generates three types of nodes step by step according to predefined syntax rules: statement-level nodes, block-level structure nodes, and control dependency nodes. When constructing the syntax structure graph, these three types of nodes are mapped to vertex elements in the graph. At the same time, the vertices are connected through directed edges according to the program execution order and control flow logic, forming a graph structure with clear hierarchical and execution path description capabilities. Each control flow edge is annotated with the execution jump type information, including sequence, condition, iteration, and return path, and reflects the control intensity or nesting level in the code through edge weight encoding.

3. The automatic evaluation system for computer interactive programming platform based on deep learning according to claim 2 is characterized in that: The grammatical structure graph constructed by the structure graph construction module has a node type classification mechanism and a control path annotation mechanism. The node type classification mechanism is based on the sentence classification rules in the abstract syntax structure tree. It sets unique graph node category tags for different types of grammatical components, which are used by the semantic graph generation module to accurately perceive the properties of grammatical elements. The control path annotation mechanism is used to mark the path type of directed edges representing process jump relationships in the graph structure and attach logical representations of control conditions, so that the control semantics are fully retained when the semantic graph generation module embeds the graph structure.

4. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 3 is characterized in that: After receiving the grammatical structure diagram generated by the structure diagram construction module, the semantic graph generation module marks the nodes and control paths according to the structure information of the sentence types and edges in the grammatical structure diagram, and builds a semantic association diagram by identifying the grammatical role and control dependency of each node. Each node in the semantic association graph corresponds one-to-one to the functional statement node in the grammatical structure graph, and the semantic propagation direction edge is constructed through the sequence flow, conditional jump and function call path represented by the original control path annotation edge to express the semantic dependency logic between different statements in the program; The semantic graph generation module jointly models the node features and edge connection patterns in the semantic association graph through the graph structure embedding model, and extracts high-dimensional embedding vectors across control structures. The generated embedding vectors serve as the basic semantic representation of the processing logic of the dynamic evaluation trigger module and the semantic solution identification module, and maintain a one-to-one correspondence with the output content of the structural graph construction module in terms of node index and structural topology.

5. The automatic evaluation system for computer interactive programming platform based on deep learning according to claim 4 is characterized in that: The dynamic evaluation trigger module performs a graph matching operation between the grammatical structure graph generated by the structure graph construction module and the pre-built standard structure graph. It uses a calculation method based on graph edit distance to compare the node types, edge connection methods and topological structure differences between the two graphs, calculates the minimum conversion cost, and then normalizes the cost to obtain the structural matching rate, which is used to quantify the structural similarity between the user's grammatical structure graph and the standard structure graph. The dynamic evaluation trigger module performs vector space calculations on the embedding vector output by the semantic graph generation module and the standard semantic cluster center vector in the pre-trained clustering model. By calculating the cosine distance between the embedding vector and the nearest cluster center, the logical deviation is obtained to measure the degree of deviation between the semantic expression of the user program and the existing semantic paradigm.

6. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 5, characterized in that: When the deep evaluation process starts, the semantic solution identification module inputs the semantic embedding vector output by the semantic graph generation module into a pre-trained semantic clustering model trained on a large number of annotated program samples. By calculating the similarity between the embedding vector and the center of each semantic cluster, it determines whether the semantic embedding vector of the user code falls within any known semantic cluster. If the distance between the semantic embedding vector and the centers of all semantic clusters exceeds the set cluster acceptance radius, it means that the user program does not belong to any existing semantic expression path in terms of semantic expression, and it is determined that it is not included in any known cluster.

7. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 6, characterized in that: The semantic solution identification module performs a path integrity check based on the control path in the syntax structure diagram generated by the structure diagram construction module, with the support of control flow annotation information, to verify whether the program execution logic forms a closed path. At the same time, based on the control flow path length, the number of branch nodes and the nesting depth index, a weighted summation calculation is performed to obtain the program complexity. If the closure holds and the complexity is within an acceptable range, the user code is marked as a potential innovative solution and used as a candidate input sample for scoring processing in the subsequent index deduction feedback module. The nesting depth index is the maximum level of control structure nesting in the abstract syntax structure tree.

8. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 7, characterized in that: The generation of the semantic equivalence index in the index deduction feedback module includes the following calculation process: Extract all control nodes and function call nodes in the semantic graph output by the semantic graph generation module to form a core subgraph set. Then compare the node identifiers in this set with the corresponding nodes in the standard semantic graph and calculate the structural matching ratio. The structural matching ratio is the ratio of the number of overlapping node labels in the core subgraph to the total number of corresponding nodes in the standard semantic graph. Calculate the Euclidean distance between the embedding vector of each node in the semantic graph and the embedding vector of the central node of the graph, and calculate the standard deviation of all distances as the semantic concentration value; The structural matching ratio and semantic concentration value are used as dual input variables and mapped through a fitted second-order polynomial regression function to generate a semantic equivalence index. The output value is between zero and one, which is used to measure the structural retention level and semantic consistency of user code.

9. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 8, characterized in that: The generation of the path innovation index in the index deduction feedback module includes the following calculation process: Get the Euclidean distance between the semantic embedding vector output by the semantic solution identification module and the center of its nearest semantic cluster, set it as the current distance, then get the average distance of all samples in the semantic cluster to the cluster center, and calculate the ratio of the two as the distance deviation coefficient; Extract branch structure nodes and nested structure nodes from the semantic graph, count the frequencies of occurrence of various structure nodes, form a structure node type distribution vector, and calculate the Euclidean distance between this vector and the standard path structure node type distribution vector as the structure variation value; The distance offset value and structural variation are normalized to exponential growth values ​​in the interval [0,1] using the Sigmoid function, and the product of the two is used as the final path innovation index.

10. The automatic evaluation system for a computer interactive programming platform based on deep learning according to claim 9, characterized in that: After receiving the semantic equivalence index and the path innovation index, the index deduction feedback module organizes the two indexes into a two-element real-valued vector in a fixed order and inputs it into the trained multi-layer nonlinear neural inference network. The network consists of multiple continuous hidden layers, and each hidden layer contains a preset nonlinear activation function, which is used to perform deep representation learning and decision boundary mapping on the dual-index combination features; during the training phase, the inference network constructs a nonlinear mapping relationship from the index combination to the rating level space through fitting learning of a large number of labeled samples. The rating levels include high innovation, conventional excellence, structural optimization, and logical error. After receiving the dual-exponential vector in the inference phase, the inference network outputs a set of multi-class probability distribution results through the forward propagation path, and then the final rating level is determined by the corresponding item with the maximum probability.

Citation Information

Cited By

  • Intelligent student competition system based on number competition big model and virtual engine

    CN121766847A

  • Industrial software operation environment dynamic adaptation verification method and device based on artificial intelligence

    CN122152663A

  • Artificial intelligence-based industrial software runtime environment dynamic adaptation verification method and device

    CN122152663B