A method and system for assessing computer programming abilities of a teenager

By constructing contextualized programming assessment tasks, collecting data in real time, identifying cognitive load status, and dynamically adjusting task parameters, the problem of single-dimensionality in traditional assessment methods is solved, enabling accurate and multi-dimensional assessment of teenagers' programming abilities and improving the accuracy and comprehensiveness of the assessment.

CN122115167APending Publication Date: 2026-05-29SHANDONG KULEMAO EDUCATION CONSULTING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG KULEMAO EDUCATION CONSULTING CO LTD
Filing Date
2026-04-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing methods for assessing programming skills among teenagers are too simplistic and fail to dynamically adjust the difficulty based on cognitive states. This results in inaccurate assessments that do not accurately reflect the thought processes and implicit competencies involved in solving complex problems.

Method used

We construct contextualized programming assessment tasks, collect programming behavior data in real time, dynamically identify cognitive load status, combine narrative scripts with state machines to achieve non-linearity of task paths, and use multi-task learning mechanisms to train classifiers to identify cognitive load, providing adaptive adjustment and auxiliary intervention.

Benefits of technology

It enables precise and multi-dimensional assessment of teenagers' programming abilities, improves the accuracy and comprehensiveness of the assessment, dynamically adjusts task parameters, and provides multi-dimensional ability assessment results, which is in line with the incentive principles of youth education.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115167A_ABST
    Figure CN122115167A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer education, and provides a juvenile computer programming ability evaluation method and system, which comprises the following steps: constructing a programming evaluation task presented in a situational manner; collecting programming behavior data of an evaluation object in real time during execution of the programming evaluation task; dynamically identifying a current cognitive load state of the evaluation object according to the programming behavior data; dynamically adjusting task parameters of the programming evaluation task or providing auxiliary intervention based on the cognitive load state, and synchronously recording response characteristics of the evaluation object; and generating a multi-dimensional ability evaluation result of the evaluation object based on the programming behavior data and the response characteristics obtained by the adjusted programming evaluation task. The application can realize real-time sensing of a cognitive state of a juvenile, dynamic adjustment of an evaluation difficulty, and precise and multi-dimensional evaluation of the programming ability of the juvenile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer education technology, and in particular to a method and system for assessing the computer programming ability of teenagers. Background Technology

[0002] Currently, in the field of programming education for teenagers, the assessment of programming ability typically employs static standardized tests or project-based assessments. Static tests primarily focus on memorizing grammatical knowledge and judging simple logic, failing to accurately reflect the thought processes of teenagers in solving complex problems. While project-based assessments can demonstrate comprehensive abilities, their evaluation dimensions are often singular, mainly focusing on the correctness and functionality of the final code, neglecting implicit qualities such as changes in cognitive state, resilience, and resource utilization during the programming process. Furthermore, existing assessment methods often use problems of fixed difficulty, failing to dynamically adjust based on teenagers' real-time performance. This results in highly capable teenagers finding the problems too easy and lacking challenge, while those with weaker foundations experience frustration due to overly difficult problems, making it impossible to accurately assess their true ability level. Therefore, how to construct an assessment scheme that can perceive teenagers' cognitive state in real time, dynamically adjust the assessment difficulty, and present assessment results in multiple dimensions has become an urgent technical problem to be solved. Summary of the Invention

[0003] To address the problems of existing technologies, such as the single assessment dimension and the inability to dynamically adjust the assessment difficulty according to cognitive state, which leads to inaccurate assessment results, this application proposes a method and system for assessing the computer programming ability of teenagers. This method constructs contextualized tasks and monitors cognitive load in real time, thereby achieving adaptive adjustment of the assessment process and generation of multidimensional ability results.

[0004] To achieve the above objectives, this application adopts the following technical solution: A method for assessing the computer programming skills of teenagers includes: Construct programming assessment tasks presented in a contextualized manner; During the execution of the programming evaluation task, programming behavior data of the object to be evaluated is collected in real time; Based on the programming behavior data, dynamically identify the current cognitive load state of the object to be evaluated; Based on the cognitive load status, the task parameters of the programming assessment task are dynamically adjusted or auxiliary interventions are provided, and the response characteristics of the object to be assessed are recorded simultaneously. Based on the programming behavior data and response characteristics obtained from the adjusted programming assessment task, a multidimensional capability assessment result for the object to be assessed is generated.

[0005] The above-mentioned solution enhances the sense of immersion for the subjects being assessed by constructing contextualized tasks, collects behavioral data in real time and identifies cognitive load status, and then dynamically adjusts task parameters or intervenes. It can accurately capture the implicit ability characteristics in the assessment process, solve the problems of rigidity and single dimension in traditional assessment methods, and achieve accurate and multidimensional assessment of teenagers' programming abilities.

[0006] As one implementation, the construction of a contextualized programming assessment task includes: Construct multiple programming subtasks; the programming subtasks include code completion, logic correction, function implementation, and algorithm design; A narrative script is constructed based on programming subtasks, and the narrative script includes multiple plot nodes, each plot node being associated with a programming subtask. A corresponding narrative state machine is constructed based on the narrative script. The narrative state machine determines the jump path of the next plot node based on the task completion status, time consumption and number of errors of the object to be evaluated at the current plot node. The narrative script is integrated with a programming environment to build a programming interface; the programming interface is used to continuously present character dialogues and scene descriptions. Multiple programming subtasks, narrative scripts, narrative state machines, and programming interfaces are packaged and encapsulated to obtain a programming evaluation task.

[0007] The above solution integrates programming tasks into the storyline by combining narrative scripts and state machines. This not only enhances the fun of the evaluation but also achieves non-linearity of the task path through the jump logic of plot nodes, thus more realistically simulating complex problem-solving scenarios.

[0008] As one implementation method, the real-time acquisition of programming behavior data of the object to be evaluated includes: Embed event listeners in the programming editor and record programming events; the programming events include keyboard input events, mouse click events, code execution events, and code version change events; Attach a timestamp and cursor position parameter to each programming event to obtain the corrected programming event; Based on timestamps, corrective programming events are sequentially stored in a memory buffer and serialized into a structured format to obtain a programming behavior log. The programming behavior logs are reorganized and cleaned to obtain programming behavior data.

[0009] The above solution ensures the integrity and accuracy of the original behavioral data through fine-grained event monitoring and data correction processing, providing a reliable data foundation for subsequent cognitive state recognition.

[0010] As one implementation method, the dynamic identification of the current cognitive load state of the object to be evaluated includes: The programming behavior data is divided into sequences according to a preset time window to obtain the programming behavior sequence; Within each time window, the programming behavior sequence is processed and extracted to obtain programming behavior features; the programming behavior features include average pause interval, edit rollback rate, run attempt frequency, and help trigger density. The programming behavior features are input into a pre-trained load state classifier, which outputs the cognitive load label for the current time window; the cognitive load label includes at least low load, medium load, high load confusion, and high load anxiety. The cognitive load status is obtained by performing temporal smoothing on cognitive load labels across multiple consecutive time windows.

[0011] The above scheme achieves quantitative identification of cognitive load state by extracting multidimensional behavioral features and applying classification models, and uses temporal smoothing technology to eliminate misjudgments caused by instantaneous fluctuations, thereby improving the stability of state identification.

[0012] As one implementation method, the training method of the load state classifier includes: Obtain a set of programming behavior samples. Each programming behavior sample includes programming behavior sample features within a time window, as well as the age information and cognitive load true labels of the subject to be evaluated. A multi-task classifier is constructed based on a gradient boosting decision tree and trained using a set of programmed behavior samples. The multi-task classifier learns two tasks simultaneously: the primary task is to identify the cognitive load label of the current time window, and the auxiliary task is to predict the age group of the object to be evaluated. Define the total loss function as a weighted sum of the main task loss and the auxiliary task loss, and optimize the parameters of both tasks simultaneously during training. After training is complete, the auxiliary task is removed to obtain the load state classifier.

[0013] The above scheme uses a multi-task learning mechanism to train the classifier and uses age grouping as an auxiliary task to enhance the model's ability to extract behavioral features, thereby achieving better generalization performance on the main task and improving the accuracy of cognitive load recognition.

[0014] As one implementation method, the temporal smoothing of cognitive load labels across multiple consecutive time windows includes: The cognitive load labels from multiple consecutive time windows are arranged in chronological order to form a label sequence; Centered on the current time window, the labels of the preset number of windows before and after are used for majority voting, and the label with the most votes is used as the cognitive load label after smoothing the current window. For windows near the boundary of the label sequence, voting is conducted using only the labels within the existing time window; The smoothed cognitive load label is used as the cognitive load status for the current time period.

[0015] The above scheme smooths the label sequence through a majority voting mechanism, effectively filtering out noise interference and ensuring the continuity and rationality of changes in cognitive load.

[0016] As one implementation method, the dynamic adjustment of task parameters for the programming evaluation task or the provision of auxiliary intervention includes: Based on the cognitive load state, determine whether to trigger task adaptive adjustment; when the cognitive load state is high load confusion or high load anxiety, perform task parameter adjustment or provide auxiliary intervention; The task parameter adjustments include changing the granularity of code completion, reducing the logical complexity of the current task, extending the available time of the current task, and adjusting the level of detail in error messages. The assistance provided includes popping up a guided prompt box in a non-intrusive location in the programming editing area, activating virtual characters in the narrative scene to provide dialogue prompts, providing optional code snippet previews, and switching the current task to a step-by-step guided mode; While adjusting task parameters or providing auxiliary interventions, the response characteristics of the object to be evaluated are recorded simultaneously. These response characteristics include the response delay from the intervention to the first code modification, the type of behavioral response to the intervention content, and the relative change in the code execution success rate before and after the intervention.

[0017] The above scheme constructs a comprehensive intervention strategy library, which can provide precise parameter adjustments or auxiliary guidance for different high-load states, while recording response characteristics, providing a direct basis for assessing the resource utilization capacity of the object to be assessed.

[0018] As one implementation method, generating the multidimensional capability assessment results of the object to be evaluated includes: From the programming behavior data obtained from the adjusted programming assessment task, the first quantitative indicators of multiple capability dimensions are extracted; the multiple capability dimensions include: the ability to complete the task independently, the efficiency of recovery from errors, and the task persistence; A second quantitative indicator of auxiliary resource utilization capability is calculated based on the aforementioned response characteristics; The first and second quantitative indicators are normalized to obtain the normalized scores of each dimension indicator. The normalized scores are visualized using radar charts or ability spectra to generate multidimensional ability assessment results. The visualization does not display the total score, ranking, or pass / fail indicators, but only the current performance level of each ability dimension.

[0019] The above scheme achieves comprehensiveness and objectivity in the evaluation results through multi-dimensional quantitative indicator extraction and normalization, and the visual presentation method avoids the sole focus on scores, which is more in line with the incentive principle of youth education.

[0020] As one implementation, the method further includes: The multidimensional capability assessment results are stored in the user profile of the object to be assessed; When the next assessment is initiated, the multidimensional ability assessment results in the user profile are read, and the initial difficulty and narrative branch path of the programming assessment task are adaptively set according to the multidimensional ability assessment results.

[0021] The above solution achieves continuity and personalization across assessments by persistently storing and utilizing user profiles, further improving the accuracy of assessments and user experience.

[0022] In addition, this application also provides a computer programming ability assessment system for teenagers, which is applied to a computer programming ability assessment method for teenagers as described above, including a task construction module, a data acquisition module, a cognitive recognition module, an adaptive adjustment module and an assessment generation module; The task construction module is used to construct programming evaluation tasks presented in a contextualized manner; The data acquisition module is used to collect programming behavior data of the object to be evaluated in real time during the execution of the programming evaluation task. The cognitive recognition module is used to dynamically identify the current cognitive load state of the object to be evaluated based on the programming behavior data. The adaptive adjustment module is used to dynamically adjust the task parameters of the programming assessment task or provide auxiliary intervention based on the cognitive load state, and simultaneously record the response characteristics of the object to be assessed. The evaluation generation module is used to generate a multi-dimensional capability evaluation result of the object to be evaluated based on the programming behavior data obtained from the adjusted programming evaluation task and the response characteristics.

[0023] The system, through the collaborative work of its modules, achieves a closed-loop process from task construction, data collection, status recognition to adaptive adjustment and result generation, ensuring the effectiveness and stability of the method implementation.

[0024] Beneficial effects: This application provides a method and system for assessing the computer programming abilities of teenagers. By constructing contextualized programming assessment tasks, it can effectively improve the participation and actual performance of the subjects being assessed. By collecting programming behavior data in real time and dynamically identifying cognitive load status, it can accurately capture changes in thinking state during the assessment process. Based on the cognitive load status, it can dynamically adjust task parameters or provide auxiliary interventions, which not only avoids assessment failure caused by mismatched difficulty of questions, but also tests the resource utilization ability of the subjects being assessed through intervention during the assessment process. The final multi-dimensional ability assessment results cover multiple dimensions such as independent task completion, error recovery, task persistence, and auxiliary resource utilization, breaking through the limitations of traditional assessments that only focus on the correctness of results, and providing a more comprehensive, objective, and educationally instructive assessment profile of teenagers' programming abilities. Attached Figure Description

[0025] Figure 1 A flowchart illustrating a method for assessing the computer programming skills of teenagers, provided as an embodiment of this application; Figure 2 This is a system architecture diagram of a computer programming ability assessment system for teenagers provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0028] Example 1: like Figure 1 As shown in the figure, this embodiment provides a method for assessing the computer programming ability of teenagers. This method aims to solve the problems of missing process data, single assessment dimensions, and inability to dynamically adjust according to the real-time status of teenagers in traditional assessment methods. By constructing a closed-loop process of "task construction - data collection - status recognition - dynamic adjustment - result generation", it achieves an accurate profile of teenagers' programming ability.

[0029] Step S100: Construct a programming assessment task presented in a contextualized manner.

[0030] Specifically, this step departs from the traditional, dry, pure code-based test format. Instead, it encapsulates programming knowledge points within a coherent narrative. For example, learning about loop structures can be combined with a "Mars rover cruise" storyline, and conditional judgments can be linked to the design of a "smart access control system." This narrative packaging reduces the psychological defenses of those being assessed when facing unfamiliar programming problems, allowing them to demonstrate their true programming thinking skills in a more relaxed and focused state. It should be understood that the construction of contextualized tasks is not limited to storytelling; it can also take various forms such as project-based engineering simulations and gamified level challenges. The core is to enhance the sense of immersion and participation of those being assessed through non-technical background packaging.

[0031] Step S200: During the execution of the programming evaluation task, the programming behavior data of the object to be evaluated is collected in real time.

[0032] Specifically, this step emphasizes the capture of "process data." Unlike traditional evaluations that focus solely on the final submitted code text, this embodiment continuously records every micro-operation of the object being evaluated by embedding a listening mechanism at the underlying programming environment. This data includes, but is not limited to, the frequency and rhythm of keyboard keystrokes, mouse clicks and movement trajectories, code execution and error records, and the modification history of the code text (such as undo and redo operations). These seemingly scattered behavioral data actually contain the thought processes, trial-and-error paths, and problem-solving strategies of the object being evaluated, providing rich raw material for subsequent cognitive state analysis.

[0033] Step S300: Dynamically identify the current cognitive load state of the object to be evaluated based on programming behavior data.

[0034] Specifically, cognitive load is a key indicator reflecting the psychological resource consumption of the subject at a specific moment. This step utilizes a pre-built algorithm model to extract features and recognize patterns from the real-time behavioral data collected in step S200. For example, when the system detects prolonged input pauses, frequent code deletion and rewriting (rollback), or aimless mouse clicks, it may determine that the subject is in a state of "high-load confusion" or "high-load anxiety"; conversely, if the input is smooth and the success rate is high, it is determined to be in a state of "low load" or "medium load". By making implicit psychological states explicit and digitized, the system can "understand" the current level of difficulty of the subject, thereby providing a scientific basis for subsequent intervention decisions.

[0035] Step S400: Based on the cognitive load status, dynamically adjust the task parameters of the programming assessment task or provide auxiliary interventions, and simultaneously record the response characteristics of the object to be assessed.

[0036] Specifically, this step constitutes an adaptive feedback loop for the assessment system. Based on the state identified in step S300, the system triggers corresponding adjustment strategies in real time. For example, when "high workload anxiety" is identified, the system can automatically reduce the logical complexity of the task or activate a virtual character to provide non-intrusive guidance; when "low workload" is identified, the system can appropriately increase the challenge difficulty to stimulate the potential of the person being assessed. More importantly, while performing adjustments or interventions, this step records in detail the reactions of the person being assessed, i.e., response characteristics. For example, it records how long after seeing the prompt did the person being assessed begin rewriting the code (response delay), whether they directly copied the prompt or optimized it (behavioral response type). These response characteristics directly reflect the resource utilization ability and resilience of the person being assessed, and are an important data source for assessing implicit competencies.

[0037] Step S500: Based on the programming behavior data and response characteristics obtained from the adjusted programming assessment task, generate a multi-dimensional capability assessment result for the object to be assessed.

[0038] Specifically, the final assessment result is no longer a single score or grade, but a multi-dimensional capability profile. The system comprehensively analyzes behavioral data and response characteristics throughout the assessment process, quantifying them from multiple dimensions such as independence, recovery efficiency, persistence, and resource utilization. For example, by combining the response latency and success rate changes recorded in step S400, a score for "auxiliary resource utilization" can be calculated; by combining the coherence data of code writing, a score for "task persistence" can be calculated. The final assessment result comprehensively and objectively demonstrates the assessed individual's overall performance in programming thinking, problem-solving, and learning potential, providing precise data support for subsequent personalized teaching guidance.

[0039] Example 2: This embodiment is a further refinement of step S100 in Embodiment 1. Specifically, constructing a programming assessment task presented in a contextualized manner includes the following steps: Step S101 involves constructing multiple programming sub-tasks. These sub-tasks include code completion, logic correction, function implementation, and algorithm design. Specifically, the code completion task assesses syntax memorization and basic logic completion skills; the logic correction task assesses code reading and debugging skills; the function implementation task assesses comprehensive application skills; and the algorithm design task assesses higher-order computational thinking. It should be understood that the above task types are merely examples. In practical applications, sub-tasks such as code optimization and refactoring can be added according to evaluation needs to enrich the evaluation dimensions.

[0040] Step S102 involves constructing a narrative script based on programming subtasks. The narrative script includes multiple plot nodes, each associated with a programming subtask. Specifically, this step transforms the originally tedious coding problems into story segments with coherent plots. For example, in a script themed "The Martian," plot nodes could be set as "Repairing the communication module" or "Planning the route," where "Repairing the communication module" is associated with a code completion subtask, and "Planning the route" is associated with an algorithm design subtask. In this way, the person being evaluated is no longer simply solving problems, but is driving the plot forward, thereby significantly reducing their psychological defenses and stimulating intrinsic motivation.

[0041] Step S103: Construct a corresponding narrative state machine based on the narrative script. The narrative state machine determines the jump path to the next plot node based on the task completion status, time taken, and number of errors of the subject being evaluated at the current plot node. This is the key mechanism for realizing a non-linear evaluation path. Specifically, traditional linear evaluation often proceeds sequentially according to the question number, resulting in all teenagers facing the same question sequence, which is difficult to adapt to teenagers with different ability levels. This embodiment introduces state machine logic to realize dynamic branching of the path. For example, when the subject being evaluated fails to complete the task at a certain plot node (such as "repairing the energy core") and the number of errors exceeds a preset threshold (such as 3 times), the narrative state machine determines that the subject is in a cognitive dilemma and points the jump path to the "teaching branch," guiding the subject into a review plot of basic concepts; conversely, if the subject being evaluated completes the task quickly and accurately, with a time taken below the preset threshold, the narrative state machine determines that the subject has surplus ability and points the jump path to the "challenge branch," providing a more difficult hidden plot. Through this mechanism, the evaluation process can adaptively adjust according to the real-time performance of the subject being evaluated, avoiding the defects of a "one-size-fits-all" evaluation.

[0042] Step S104 involves integrating the narrative script with the programming environment to build a programming interface. This interface continuously presents character dialogue and scene descriptions. Specifically, the programming interface is no longer merely a collection of code editors, but rather an organically integrated layout of the code editing area, the execution control area, and the narrative display area. The narrative display area can be located on the side or top of the interface, continuously outputting plot information through dialog boxes, character portraits, or scene diagrams, ensuring the evaluated user remains fully immersed throughout the programming process.

[0043] Step S105 involves packaging and encapsulating multiple programming subtasks, narrative scripts, narrative state machines, and programming interfaces to obtain a programming assessment task. The encapsulated task, as a complete assessment unit, can be loaded and executed by the system. Through the above steps, this embodiment constructs a highly immersive and adaptive contextualized assessment task. This not only solves the problem of the monotony of traditional assessment methods but, more importantly, by introducing a narrative state machine, breaks the limitations of linear assessment, providing a diverse path foundation for subsequent cognitive load identification and dynamic intervention, thereby significantly improving the accuracy and educational value of the assessment results.

[0044] Example 3: This embodiment is a further refinement of step S200 in Embodiment 1. Specifically, the real-time collection of programming behavior data of the object to be evaluated includes the following steps: Step S201: Embed event listeners in the programming editor and record programming events. Programming events include keyboard input events, mouse click events, code execution events, and code version change events. Specifically, the embedding location of the event listeners is crucial. In this embodiment, it is preferable to embed the listeners into the kernel layer of the programming editor (such as the underlying API interface based on Monaco Editor or CodeMirror), rather than just at the browser DOM layer. This deep embedding method can capture more granular operational semantics. For example, when the object to be evaluated presses the "Ctrl+Z" key combination, the system not only records the keyboard event but also simultaneously captures the undo operation event triggered by the editor. The types of programming events cover the main interaction forms in the programming process: keyboard input events record code entry and deletion actions; mouse click events record cursor jumping and menu selection behaviors; code execution events record the frequency of submission for verification of the object to be evaluated; and code version change events record the substantial change history of the code text. It should be understood that the above event types are only examples. In other embodiments, events such as file switching events and external resource pasting events can be added to enrich the data dimensions.

[0045] Step S202 involves attaching a timestamp and cursor position parameters to each programming event to obtain a corrected programming event. Specifically, the original programming event often only contains the event type and simple data payload, lacking spatiotemporal dimension information. This step, while capturing the original event, immediately calls the system's high-precision clock (accurate to milliseconds) to obtain the current timestamp and reads the editor's cursor position information (including line and column numbers), packaging and attaching it to the original event to form a corrected programming event. This correction process is crucial for subsequently reconstructing the programming thought process. For example, the timestamp allows for precise calculation of the pause interval between two keyboard inputs, thus inferring the thought time of the object being evaluated on a certain piece of code; the cursor position parameter determines whether the object being evaluated is writing sequentially or making jump modifications between different code blocks, thereby analyzing its logical construction path.

[0046] Step S203: Based on timestamps, the corrected programming events are sequentially stored into a memory buffer and serialized into a structured format to obtain a programming behavior log. Specifically, considering the high real-time requirements of the programming evaluation process and the frequent data writing, directly writing to a disk database may cause I / O blocking, thus affecting the smoothness of the programming environment. Therefore, this embodiment constructs a memory buffer based on the first-in, first-out (FIFO) principle. Corrected programming events are pushed into the buffer sequentially according to their timestamps. When the amount of data in the buffer reaches a preset threshold or the evaluation task ends, the system uses a serialization engine (such as Protobuf or a JSON serializer) to convert the data in the buffer into a structured log file or data packet. This processing method ensures both the real-time performance and integrity of data acquisition while avoiding performance interference caused by frequent disk operations on the evaluation environment.

[0047] Step S204 involves reorganizing and cleaning the programming behavior log to obtain programming behavior data. Specifically, while the serialized log data is complete, it may contain redundant information or noisy data. Reorganization involves aggregating discrete events according to logical units, such as merging consecutive keyboard input events into a single "code writing behavior" and consecutive mouse click events into a single "interface interaction behavior." Cleaning involves removing invalid events, such as momentary clicks caused by accidental key presses or duplicate events caused by network jitter. After reorganization and cleaning, the resulting programming behavior data has a higher signal-to-noise ratio and can more accurately reflect the programming intent and behavioral patterns of the object being evaluated, providing a high-quality data foundation for subsequent cognitive load state identification.

[0048] Example 4: This embodiment is a further refinement of step S300 in Embodiment 1, and is also the core of the technical solution of this application. Specifically, based on programming behavior data, the current cognitive load state of the object to be evaluated is dynamically identified, which includes the following steps: Step S301: Divide the programming behavior data according to a preset time window to obtain a programming behavior sequence. Specifically, considering the continuous nature of changes in cognitive state, a single instantaneous operation is difficult to reflect the true thinking state. This embodiment introduces a time window mechanism. The length of the time window can be set according to the actual evaluation scenario, for example, 30 seconds, 1 minute, or 5 minutes. The system divides the cleaned programming behavior data from Embodiment 3 into corresponding time windows according to timestamps, forming several continuous programming behavior sequences. It should be understood that overlapping areas (such as sliding windows) can be set between time windows to capture the transition features of state changes and improve the continuity of recognition.

[0049] Step S302 involves calculating and extracting features from the programming behavior sequence within each time window to obtain programming behavior features. These features include average pause interval, edit rollback rate, run attempt frequency, and help trigger density. Specifically, these features characterize the cognitive state of the object being evaluated from different dimensions: The average pause interval refers to the average time difference between two consecutive valid keyboard inputs within a given time window. Longer pause intervals usually indicate that the person being evaluated is in the process of thinking, recalling grammar, or constructing logic, but excessively long pauses may suggest cognitive impairment.

[0050] The rollback rate refers to the percentage of undo operations (such as Ctrl+Z) or delete operations in the total number of editing operations. A high rollback rate often indicates that the thought process of the object being evaluated is unstable, with repeated trial and error or self-doubt, which is a typical characteristic of "high-load confusion".

[0051] Run attempt frequency refers to the frequency with which code execution events are triggered. High-frequency run attempts may indicate that the object being evaluated lacks confidence, is trying to obtain feedback through frequent verification, or is in a state of blind trial and error.

[0052] Help trigger density refers to the frequency with which system help documents or prompts are triggered. High help trigger density usually indicates a knowledge gap or a high cognitive load.

[0053] Through the extraction of the above multidimensional features, the system transforms the originally discrete and abstract behavioral data into quantized feature vectors that can be processed by the model.

[0054] Step S303: Input the programming behavior features into a pre-trained load state classifier, which outputs the cognitive load label for the current time window. The cognitive load label includes at least low load, medium load, high load confusion, and high load anxiety. Specifically, the classifier establishes a mapping relationship between feature vectors and cognitive labels by learning from a large number of labeled samples. "Low load" indicates that the task difficulty is below the assessment subject's ability level, and they are in a smooth and relaxed state; "medium load" indicates that the task difficulty is moderate, and the assessment subject is in a focused and efficient learning zone; "high load confusion" indicates that the assessment subject has encountered logical obstacles, and their thinking is confused and they are trying to figure things out; "high load anxiety" indicates that the assessment subject has not only encountered obstacles but also experienced frustration and tension, possibly accompanied by frequent ineffective operations. By distinguishing between "confusion" and "anxiety," the system can more accurately formulate subsequent intervention strategies.

[0055] Step S304 involves performing temporal smoothing on the cognitive load labels across multiple consecutive time windows to obtain the cognitive load state. Specifically, due to the randomness of individual behavior, the labels output by the classifier may experience drastic changes in a short period (e.g., jumping instantly from "medium load" to "low load" and then quickly back). This transient noise does not represent a true change in cognitive state. Therefore, temporal smoothing is necessary to eliminate the interference of isolated points and ensure the stability of the state recognition results.

[0056] Regarding the construction and training process of the aforementioned load state classifier, this embodiment further proposes a training method based on multi-task learning to improve the model's generalization ability and recognition accuracy. Specifically, it includes the following steps: Step S401: Obtain a programming behavior sample set. Each programming behavior sample includes programming behavior sample features within a time window, as well as the age information and cognitive load true label of the subject to be evaluated. Specifically, the sample features are the aforementioned quantitative indicators such as average pause interval and edit rollback rate; the cognitive load true label can be obtained through expert evaluation, eye tracker data, or physiological sensor data calibration; age information serves as an auxiliary label to introduce prior knowledge.

[0057] Step S402: Construct a multi-task classifier based on a gradient boosting decision tree and train it using a programming behavior sample set. The multi-task classifier learns two tasks simultaneously: the primary task is to identify the cognitive load label of the current time window, and the auxiliary task is to predict the age group of the subject to be evaluated. Specifically, this embodiment innovatively introduces "age prediction" as an auxiliary task. The underlying technical mechanism is that adolescents of different ages exhibit significant differences in programming behavior patterns (for example, younger adolescents typically operate less frequently than younger adolescents, but their pause patterns may differ). By forcing the model to consider age factors when extracting features, the model's feature learning space can be constrained, enabling it to learn more robust general features rather than overfitting to behavioral noise of certain specific groups. This multi-task learning architecture effectively prevents overfitting on the primary task and improves the model's transferability across different age groups of adolescents.

[0058] Step S403: Define the total loss function as a weighted sum of the main task loss and the auxiliary task loss, optimizing the parameters of both tasks simultaneously during training. Specifically, the total loss function L can be expressed as: L = L_main + λ × L_aux; Here, L_main is the loss function for the main task (cognitive load identification), typically using the cross-entropy loss function; L_aux is the loss function for the auxiliary task (age group prediction); and λ is the weighting coefficient used to balance the contributions of the two tasks. During training, the backpropagation algorithm simultaneously optimizes the shared feature extraction layer parameters and the task-specific output layer parameters of the two tasks, enabling the model to gradually learn high-quality feature representations while minimizing the total loss.

[0059] Step S404: After training is complete, the auxiliary task is removed, resulting in the load state classifier. Specifically, during the model deployment phase, since age information is not a necessary output for the evaluation process, to reduce computational overhead and model complexity, the system prunes the output branches of the auxiliary tasks, retaining only the output branch of the main task. At this point, the model has the ability to accurately identify cognitive load states through behavioral features.

[0060] For the timing smoothing logic described in step S304, this embodiment adopts a smoothing strategy based on majority voting, which specifically includes the following sub-steps: Step S3041: The cognitive load labels from multiple consecutive time windows are arranged into a label sequence in chronological order. For example, the label sequence output for five consecutive time windows is [medium load, medium load, high load confusion, medium load, medium load].

[0061] Step S3042: Centered on the current time window, a majority vote is conducted on the labels of a preset number of windows before and after it. The label with the most votes is used as the smoothed cognitive load label for the current window. Specifically, the preset number of windows can be set according to actual needs, for example, one window before and one before (i.e., the sliding window size is 3). Taking the aforementioned label sequence as an example, for the third window (labeled "high load confusion"), the labels of its windows before and after it are both "medium load". During the voting process, "medium load" receives 2 votes, and "high load confusion" receives 1 vote, so the label of this window is corrected to "medium load". This logic is based on the assumption of the continuity of cognitive state changes, that is, the actual cognitive load state will not frequently and drastically change in a very short period of time, thus effectively filtering out recognition noise caused by instantaneous abnormal operation (such as accidental keystrokes).

[0062] Step S3043: For windows near the label sequence boundary, voting is performed using only the labels within the existing time window. Specifically, at the beginning or end of the evaluation, complete sliding window data may not be available. In this case, the system only uses existing label data for voting to ensure the usability of the smoothing algorithm under boundary conditions.

[0063] Step S3044: The smoothed cognitive load label is used as the cognitive load state for the current time period. After the above processing, the cognitive load state sequence output by the system will be smoother and more stable, and can truly reflect the trajectory of the psychological state changes of the subject being evaluated during the evaluation process, providing a reliable state basis for subsequent adaptive adjustments.

[0064] Example 5: This embodiment further refines step S400 in Embodiment 1, specifically addressing how the system adaptively adjusts based on the identified cognitive load state and how it captures the performance of the subject being evaluated after receiving assistance. Specifically, based on the cognitive load state, dynamically adjusting the task parameters of the programming assessment task or providing auxiliary intervention includes the following steps: Step S501: Based on the cognitive load state, determine whether to trigger task adaptive adjustment. When the cognitive load state is high-load confusion or high-load anxiety, perform task parameter adjustments or provide auxiliary intervention. Specifically, the system has a pre-set set of state-policy mapping rules. Not all cognitive load fluctuations require intervention; for example, "medium load" is usually considered the optimal learning state, at which point the system remains silent and does not interrupt the thought process of the person being assessed. The system will only activate the intervention mechanism when it detects that the person being assessed is in a state of "high-load confusion" (thinking block) or "high-load anxiety" (emotional frustration). It should be understood that the trigger threshold can be personalized according to the age or historical ability profile of the person being assessed. For example, for beginners, the trigger threshold can be appropriately increased to avoid excessive intervention leading to dependency.

[0065] Step S502 involves adjusting task parameters. This includes changing the granularity of code completion, reducing the logical complexity of the current task, extending the available time for the current task, and adjusting the detail of error messages. Specifically, this is an "implicit dimensionality reduction" strategy, designed to reduce the intensity of cognitive load without altering the core objectives of the task.

[0066] Changing the granularity level of code completion, such as from "off completion" to "intelligent completion", or from "keyword completion only" to "code snippet completion", can free up the cognitive resources of the object being evaluated for logical construction by reducing keyboard input and the burden of grammar memory.

[0067] Reduce the logical complexity of the current task, for example, by breaking down a task with multiple nested loops into two sequentially executed sub-steps, or by temporarily hiding some non-core code to reduce the visual complexity of code reading.

[0068] Extend the available time for the current task by modifying countdown parameters or removing time limits to alleviate the anxiety of the person being evaluated, giving them ample time to think and adjust.

[0069] Adjust the level of detail in error messages, for example, change "Compilation failed" to "Missing colon on line 5", to provide more targeted feedback and shorten the trial-and-error path.

[0070] Step S503 provides auxiliary intervention. Auxiliary intervention includes popping up guided prompts in non-intrusive locations within the programming editing area, activating virtual characters in the narrative scene to provide dialogue prompts, providing optional code snippet previews, and switching the current task to step-by-step guided mode. Unlike parameter adjustments, auxiliary intervention focuses more on "explicit guidance."

[0071] A guiding prompt box pops up in a non-intrusive location in the programming editing area. Specifically, the prompt box can be located in the sidebar on the right side of the editing area or float at the end of the code line as a semi-transparent bubble. Its content does not give the answer directly, but provides ideas (such as "Consider what the initial value of the loop variable should be?").

[0072] By activating virtual characters in the narrative scene to provide dialogue prompts, and in conjunction with the narrative script in Example 2, when the person to be evaluated is in trouble, the "mentor" or "partner" character in the script will take the initiative to initiate a dialogue and give hints in the way of plot progression. This intervention method can maintain the immersion of the situation to the greatest extent and reduce the psychological resistance of the person to be evaluated to "being helped".

[0073] It provides optional code snippet previews, allowing the object to be evaluated to view code examples of similar functionality and examine its knowledge transfer capabilities.

[0074] Switch the current task to step-by-step guided mode, breaking down a large task into several guided questions and answers, guiding the subject to be evaluated to complete the task step by step.

[0075] Step S504: While adjusting task parameters or providing auxiliary intervention, simultaneously record the response characteristics of the object to be evaluated. Response characteristics include the response delay from the intervention to the first code modification, the type of behavioral response to the intervention content, and the relative change in the code execution success rate before and after the intervention. This is the core innovation of this embodiment, aiming to quantify the "auxiliary resource utilization ability" of the object to be evaluated.

[0076] Response latency records the time difference between when the system provides a prompt and when the subject makes its next valid keyboard input. This metric is not necessarily better the shorter it is; an extremely short latency may indicate that the subject is simply copying the prompt without thinking, while a moderate latency may indicate that the subject is processing and understanding the information.

[0077] The system categorizes the behavioral response to the intervention into "direct adoption," "adoption after modification," "ignoring and attempting independently," or "ineffective operation." For example, if the person being evaluated does not directly copy the code snippet after viewing the preview but modifies it according to their own logic, it is judged as "adoption after modification," reflecting their high level of critical thinking and knowledge integration ability.

[0078] The relative change in code execution success rate before and after intervention is used to measure the effectiveness of the intervention and the recovery ability of the person being evaluated. If the success rate increases significantly after intervention, it indicates that the person being evaluated can quickly use external resources to solve the problem; if the success rate does not change or even decreases, it may mean that the current intervention strategy is ineffective, or that the person being evaluated has fallen into deep cognitive impairment and needs human intervention.

[0079] Through the above steps, this embodiment not only achieves dynamic adaptation of the assessment process, but more importantly, it makes explicit and data-driven the implicit quality of "the ability to solve problems with help," thereby constructing a more comprehensive and objective assessment profile of adolescent programming ability.

[0080] Example 6: This embodiment is a further refinement of step S500 in embodiment 1, specifically involving how to transform process data into intuitive, multi-dimensional evaluation results, and how to utilize historical data to achieve personalized continuation of the evaluation.

[0081] Specifically, generating multidimensional capability assessment results for the object to be evaluated includes the following steps: Step S501: Extract the first quantitative indicators of multiple capability dimensions from the programming behavior data obtained from the adjusted programming assessment task. These capability dimensions include: the ability to complete tasks independently, efficiency in recovering from errors, and task persistence.

[0082] The ability to complete tasks independently is primarily quantified by statistically analyzing the percentage of sub-tasks successfully completed by the assessed individual without any auxiliary intervention (such as prompts or virtual character dialogues as described in Example 5). This indicator reflects the assessed individual's solid knowledge base and confidence in solving problems independently. It should be understood that if interventions are frequently triggered during the assessment process, even if the task is ultimately completed, the individual's independence score will decrease accordingly.

[0083] The efficiency of error recovery is primarily quantified by calculating the average time interval between the "error occurrence time" and the "error correction time." This metric examines the debugging capabilities and error-correction mindset of the evaluated entity. A shorter average recovery time implies that the evaluated entity possesses keen logical troubleshooting abilities and rapid knowledge retrieval capabilities. During the calculation, the system eliminates minor errors caused by erroneous operations, only counting logical errors or critical syntactic errors.

[0084] Task persistence is primarily quantified by statistically analyzing the number of attempts and effective operation time of the subject when faced with highly difficult tasks or repeated failures. For example, in the "challenge side quests" of a narrative script, if the subject can maintain focused operation for an extended period despite the high difficulty of the task, rather than choosing to give up or remaining inactive for a long time, their persistence score will be higher. This dimension is particularly important for assessing the computational thinking resilience of adolescents.

[0085] Step S502: Calculate the second quantitative indicator of auxiliary resource utilization capability based on response characteristics.

[0086] Specifically, this indicator is a unique dimension in the evaluation system of this application. Traditional evaluations often regard "seeking help" as a sign of insufficient ability, while this embodiment regards it as an important resource utilization ability. The calculation logic combines the response characteristics recorded in Embodiment 5: if the subject being evaluated responds with a moderate delay after receiving intervention prompts (indicating that they have thought about it rather than copied it), and the success rate of code execution after intervention is significantly improved (indicating that they have effectively digested the prompt content), then their auxiliary resource utilization ability score is high. Conversely, if the subject being evaluated ignores the intervention prompts, or still cannot run the code successfully after copying it, then the score is low. This indicator can effectively identify adolescents who are "good at learning" and "good at using tools".

[0087] Step S503: Normalize the first quantitative indicator and the second quantitative indicator to obtain the normalized scores of each dimension indicator.

[0088] Because different dimensions have different units of measurement and value ranges (e.g., time intervals are measured in seconds, completion rates are measured in percentages), direct comparison is meaningless. This step uses the max-min standardization method or Z-score standardization method to map the raw scores of each dimension to a preset interval (e.g., 0 to 100 points or 0 to 1), eliminating the influence of units of measurement and ensuring that each dimension has equal weight in the final evaluation result.

[0089] Step S504: Visualize the normalized scores using a radar chart or ability spectrum to generate multidimensional ability assessment results. The visualization does not display the total score, ranking, or pass / fail indicators; it only shows the current performance level of each ability dimension.

[0090] Specifically, this step follows the incentive principle of adolescent education. Traditional ranking by scores can easily trigger anxiety or a competitive mentality in those being assessed, especially for teenagers with weak programming skills, where low scores can severely dampen their interest in learning. Therefore, the assessment results generated in this embodiment are presented in the form of a radar chart, with each axis representing dimensions such as independence, recovery efficiency, persistence, and resource utilization. Those being assessed can visually see their own ability profile, discovering their strengths in "persistence" and areas for improvement in "recovery efficiency." This presentation method shifts the focus from "how much better are you than others" to "where you are strong and where you are weak," which helps cultivate a growth mindset.

[0091] Furthermore, in order to achieve long-term tracking and personalized evolution of the assessment, this embodiment also includes the application of historical data: Step S600: Store the multidimensional capability assessment results in the user profile of the object to be assessed.

[0092] Specifically, after each assessment, the system automatically packages and stores the normalized score, detailed behavioral data for each dimension (such as average pause interval, rollback rate, etc.), and the completion path of the narrative script into a user profile database in the cloud or locally. This profile constitutes a digital capability profile of the person being assessed, recording the development trajectory of their programming skills.

[0093] Step S700: When the next assessment is initiated, read the multidimensional ability assessment results from the user profile, and adaptively set the initial difficulty and narrative branch path of the programming assessment task based on the multidimensional ability assessment results.

[0094] Specifically, when the candidate logs into the system again for a new round of assessment, the system no longer uses a "one-size-fits-all" initial setup. Instead, it reads their historical records. For example, if the records show that the candidate scored high in "ability to complete tasks independently" but low in "efficiency in recovering from errors" in the previous assessment, the system will automatically increase the logical complexity of the initial programming assessment task (to match their independent ability) and pre-set more "error-correction" narrative nodes (to focus on examining and training their recovery efficiency). This initialization setting based on historical data makes the assessment process more targeted, avoids the time wasted on repeated assessments, and ensures dynamic adaptation of assessment difficulty, truly achieving a personalized assessment loop of "teaching according to aptitude."

[0095] Example 7: This embodiment provides a computer programming ability assessment system 800 for teenagers, which is used to implement the computer programming ability assessment methods for teenagers described in the above embodiments. Figure 2 As shown, the system's hardware architecture includes at least a task construction module 801, a data acquisition module 802, a cognitive recognition module 803, an adaptive adjustment module 804, and an evaluation generation module 805. The modules communicate with each other via a data bus or network interface to achieve data flow and interaction.

[0096] The task construction module 801 is used to construct programming evaluation tasks presented in a contextualized manner.

[0097] Specifically, the task construction module is the entry point and foundation of the entire evaluation system. At the hardware level, this module can consist of a high-performance graphics processing unit (GPU) and storage media, used to render scene visuals and character portraits in the narrative script, as well as load programming subtask code. The task construction module has a pre-built narrative script library and programming question bank. Based on the login information or historical records of the object to be evaluated, it calls the logic described in Example 2 to generate a task package containing a narrative state machine and a programming interface. This task package is transmitted over the network to the client terminal of the object to be evaluated, presenting a visual evaluation interface. It should be understood that the task construction module can be deployed not only on a cloud server, but also with some functions pushed down to edge computing nodes to reduce the impact of network latency on the interactive experience.

[0098] The data acquisition module 802 is used to collect programming behavior data of the object to be evaluated in real time during the execution of the programming evaluation task.

[0099] Specifically, the data acquisition module is primarily deployed on the client-side terminal of the object being evaluated, tightly coupled with the programming editor (such as an IDE kernel). This module includes an event listening unit and a data preprocessing unit. The event listening unit captures keyboard, mouse, and internal editor events through hook functions, adding timestamps and cursor position information to form a raw log stream. The data preprocessing unit is responsible for cleaning, reassembling, and serializing the raw log, transforming discrete events into structured programming behavior data, as described in Example 3. The processed data is uploaded in real-time to the cognitive recognition module on the server through an encrypted channel, ensuring the security and real-time nature of data transmission.

[0100] The cognitive recognition module 803 is used to dynamically identify the current cognitive load state of the object to be evaluated based on programming behavior data.

[0101] Specifically, the cognitive recognition module is the core computing unit of this system and is typically deployed on the server side. This module includes a memory and a processor. The memory stores a pre-trained load state classifier model (i.e., the model trained based on multi-task learning as described in Example 4) and a feature extraction algorithm library. The processor is configured to perform the following steps: First, receive programming behavior data uploaded by the data acquisition module and divide it according to time windows; second, call the feature extraction algorithm to calculate behavioral features such as average pause interval and edit rollback rate; then, load the classifier model from the memory, input the behavioral features into the model for inference, and output cognitive load labels; finally, execute a time-series smoothing algorithm to eliminate instantaneous noise and obtain a stable cognitive load state. Through the collaborative work of the memory and the processor, the cognitive recognition module can transform abstract behavioral data into specific cognitive state indicators, providing a decision-making basis for subsequent adaptive adjustments.

[0102] The adaptive adjustment module 804 is used to dynamically adjust the task parameters of the programming assessment task or provide auxiliary intervention based on the cognitive load state, and simultaneously record the response characteristics of the object to be assessed.

[0103] Specifically, the adaptive adjustment module acts as the system's "control center." Internally, this module maintains a state-policy mapping table, storing a library of intervention strategies corresponding to different cognitive load states. When the cognitive load state "high load confusion" or "high load anxiety" is received from the cognitive recognition module, the processor immediately queries the mapping table and generates corresponding adjustment instructions. These instructions fall into two categories: parameter modification instructions, sent to the task construction module to adjust code completion granularity or countdown parameters; and intervention trigger instructions, sent to the client terminal to pop up a prompt box on the control interface or activate a virtual character dialogue. Simultaneously, this module also includes a response recording unit, specifically designed to monitor and record the operational behavior of the evaluated object after intervention, calculating response delay and behavioral reaction type, as described in Example 5. This closed-loop control mechanism ensures that the evaluation process can dynamically adapt to the real-time state of the evaluated object.

[0104] The evaluation generation module 805 is used to generate a multi-dimensional capability evaluation result of the object to be evaluated based on the programming behavior data and response characteristics obtained from the adjusted programming evaluation task.

[0105] Specifically, the assessment generation module is the system's output. At the end of the assessment task or at a key milestone, this module summarizes the behavioral data and response characteristics from the entire process. The processor calls the built-in quantification algorithm to calculate scores for dimensions such as independence, recovery efficiency, persistence, and auxiliary resource utilization, and then performs normalization processing. Finally, a radar chart or capability spectrum is generated through the visualization engine, stored in the user profile database, and pushed to the client terminal for display. As described in Example 6, the assessment results generated by this module do not include rankings or passing grades; they only display capability outlines, which aligns with the incentive principles of youth education.

[0106] Through the collaborative work of the aforementioned task construction module, data acquisition module, cognitive recognition module, adaptive adjustment module, and evaluation generation module, this embodiment constructs a complete "perception-decision-feedback" closed-loop system. Each module performs its specific function, yet they are tightly coupled through data flow. This not only achieves automated evaluation of programming ability but, more importantly, through the combination of hardware and algorithms, enables real-time monitoring and intervention of the implicit indicator of cognitive state, thereby significantly improving the intelligence level and educational practical value of the evaluation system.

[0107] Example 8: To more intuitively demonstrate the actual operational effect of the technical solution of this application, this embodiment takes a specific "Mars Rescue" themed programming ability assessment scenario as an example to provide a detailed explanation of the methods described in the above embodiments.

[0108] In this application scenario, the evaluation system first executes step S100, constructing a programming evaluation task presented in a contextualized manner. Specifically, the task construction module loads a pre-set "Mars Rescue" narrative script. This script sets an emergency mission background: a Mars rover encounters a dust storm during its exploration mission, damaging some functional modules. The subject of evaluation plays the role of a "ground control center engineer," needing to repair the rover and plan its return route by writing code. The script contains multiple plot nodes; for example, the "Energy Module Repair" node is associated with a code completion subtask, requiring the subject of evaluation to complete the code snippet controlling the solar panel deployment angle; the "Path Planning Error Correction" node is associated with a logic error correction subtask, requiring the subject of evaluation to identify and correct logical errors in the obstacle avoidance algorithm. The narrative state machine is configured such that if the subject of evaluation makes more than 3 errors in the "Energy Module Repair" node, it jumps to the "Basic Circuit Review" teaching branch; if it completes the task within the specified time and with fewer than 2 errors, it jumps to the "Emergency Supplies Deployment" challenge branch. In this way, the programming evaluation task is encapsulated in an immersive narrative environment.

[0109] After the object to be evaluated logs into the system to begin the evaluation, the system executes step S200, collecting real-time data on the programming behavior of the object to be evaluated during the programming evaluation task. For example, during the code writing process for the "Energy Module Repair" task, the event listener embedded in the IDE kernel begins to work. When the object to be evaluated enters code in the code editing area, the listener captures keyboard input events; when the object to be evaluated frequently clicks the "Run" button to try to verify the code, the listener captures mouse click events and code execution events. Each event is appended with a timestamp accurate to milliseconds and the current cursor position parameter, forming a correction programming event, which is serialized and stored in the memory buffer in real time. Suppose that the object to be evaluated pauses, deletes, or rewrites operations while writing a loop structure; these micro-behavioral data are all recorded completely.

[0110] As the evaluation progresses, the system executes step S300, dynamically identifying the current cognitive load state of the object being evaluated based on programming behavior data. Specifically, at the "path planning and error correction" node, the system divides the behavior data into preset 30-second time windows. Calculations revealed that within a certain time window, the average pause interval of the object being evaluated significantly increased, reaching over 15 seconds, with an edit rollback rate as high as 40%, and a low frequency of running attempts. These features were extracted and input into a pre-trained load state classifier. The classifier, based on a multi-task learning model and incorporating the age information of the object being evaluated to aid in judgment, outputs the cognitive load label for the current time window as "high load anxiety." Subsequently, the system performs temporal smoothing on the labels of multiple consecutive windows to confirm that this state is persistent rather than a momentary fluctuation.

[0111] Based on the identified "high workload anxiety" state, the system triggers step S400, dynamically adjusting the task parameters of the programming assessment task or providing auxiliary intervention, while simultaneously recording the response characteristics of the person being assessed. Specifically, the adaptive adjustment module determines that the current state meets the intervention trigger conditions. The system first attempts to adjust the task parameters, changing the granularity of code completion from "off" to "intelligent prompts," and extending the available time for the current task by 2 minutes. Simultaneously, the virtual character "Astronaut Alpha" in the narrative scene is activated, and a dialog box pops up in a non-intrusive location on the programming interface: "Engineer, a conflict has been detected in the path planning logic; it is recommended to check the boundary values ​​of the loop conditions." This intervention combines parameter adjustment with auxiliary guidance. During this process, the system simultaneously records response characteristics: it detects that the person being assessed begins modifying the code 8 seconds after seeing the prompt (response delay is 8 seconds), the modification behavior is characterized by referencing the prompt but performing autonomous optimization (behavior response type is "modified and adopted"), and the success rate of the modified code increases from 0% to 100%.

[0112] Finally, after the evaluation task is completed, the system executes step S500, generating a multi-dimensional capability evaluation result for the evaluated object based on the programming behavior data and response characteristics obtained from the adjusted programming evaluation task. The evaluation generation module summarizes all data. Because the evaluated object completed the "Energy Module Repair" node independently and quickly, its "Ability to Complete Task Independently" dimension scored highly. Although it encountered difficulties in the "Path Planning Error Correction" node, it recovered quickly after intervention, resulting in excellent scores in "Efficiency of Recovery from Errors" and "Ability to Utilize Auxiliary Resources." After normalizing the indicators of each dimension, the system generates a multi-dimensional capability evaluation result in the form of a radar chart. This result does not display a total score or ranking, but rather intuitively shows the capability profile of the evaluated object in terms of independence, recovery efficiency, durability, and resource utilization. Simultaneously, this result is stored in the user profile as the basis for the next evaluation initialization. If the evaluated object logs in again, the system will adaptively set a more challenging narrative branch path based on its strong "Resource Utilization Capability."

[0113] As can be seen from the above application scenario examples, this application can transform abstract programming ability assessment into vivid contextualized tasks, and perceive the cognitive state of the subject to be assessed in real time during the assessment process. Through precise intervention strategies, it can stimulate the subject's potential and ultimately generate a comprehensive and objective ability profile, effectively solving the problems of traditional assessment methods being boring, rigid, and having a single dimension.

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

Claims

1. A method for assessing the computer programming ability of teenagers, characterized in that, include: Construct programming assessment tasks presented in a contextualized manner; During the execution of the programming evaluation task, programming behavior data of the object to be evaluated is collected in real time; Based on the programming behavior data, dynamically identify the current cognitive load state of the object to be evaluated; Based on the cognitive load status, the task parameters of the programming assessment task are dynamically adjusted or auxiliary interventions are provided, and the response characteristics of the object to be assessed are recorded simultaneously. Based on the programming behavior data and response characteristics obtained from the adjusted programming assessment task, a multidimensional capability assessment result for the object to be assessed is generated.

2. The method for assessing the computer programming ability of teenagers according to claim 1, characterized in that, The construction of the contextualized programming assessment task includes: Construct multiple programming subtasks; the programming subtasks include code completion, logic correction, function implementation, and algorithm design; A narrative script is constructed based on programming subtasks, and the narrative script includes multiple plot nodes, each plot node being associated with a programming subtask. A corresponding narrative state machine is constructed based on the narrative script. The narrative state machine determines the jump path of the next plot node based on the task completion status, time consumption and number of errors of the object to be evaluated at the current plot node. The narrative script is integrated with a programming environment to build a programming interface; the programming interface is used to continuously present character dialogues and scene descriptions. Multiple programming subtasks, narrative scripts, narrative state machines, and programming interfaces are packaged and encapsulated to obtain a programming evaluation task.

3. The method for assessing the computer programming ability of teenagers according to claim 1, characterized in that, The real-time acquisition of programming behavior data of the object to be evaluated includes: Embed event listeners in the programming editor and record programming events; the programming events include keyboard input events, mouse click events, code execution events, and code version change events; Attach a timestamp and cursor position parameter to each programming event to obtain the corrected programming event; Based on timestamps, corrective programming events are sequentially stored in a memory buffer and serialized into a structured format to obtain a programming behavior log. The programming behavior logs are reorganized and cleaned to obtain programming behavior data.

4. The method for assessing the computer programming ability of teenagers according to claim 1, characterized in that, The dynamic identification of the current cognitive load state of the object to be evaluated includes: The programming behavior data is divided into sequences according to a preset time window to obtain the programming behavior sequence; Within each time window, the programming behavior sequence is processed and extracted to obtain programming behavior features; the programming behavior features include average pause interval, edit rollback rate, run attempt frequency, and help trigger density. The programming behavior features are input into a pre-trained load state classifier, which outputs the cognitive load label for the current time window; the cognitive load label includes at least low load, medium load, high load confusion, and high load anxiety. The cognitive load status is obtained by performing temporal smoothing on cognitive load labels across multiple consecutive time windows.

5. The method for assessing the computer programming ability of teenagers according to claim 4, characterized in that, The training methods for the load state classifier include: Obtain a set of programming behavior samples. Each programming behavior sample includes programming behavior sample features within a time window, as well as the age information and cognitive load true labels of the subject to be evaluated. A multi-task classifier is constructed based on a gradient boosting decision tree and trained using a set of programmed behavior samples. The multi-task classifier learns two tasks simultaneously: the primary task is to identify the cognitive load label of the current time window, and the auxiliary task is to predict the age group of the object to be evaluated. Define the total loss function as a weighted sum of the main task loss and the auxiliary task loss, and optimize the parameters of both tasks simultaneously during training. After training is complete, the auxiliary task is removed to obtain the load state classifier.

6. The method for assessing the computer programming ability of teenagers according to claim 4, characterized in that, The temporal smoothing of cognitive load labels across multiple consecutive time windows includes: The cognitive load labels from multiple consecutive time windows are arranged in chronological order to form a label sequence; Centered on the current time window, the labels of the preset number of windows before and after are used for majority voting, and the label with the most votes is used as the cognitive load label after smoothing the current window. For windows near the boundary of the label sequence, voting is conducted using only the labels within the existing time window; The smoothed cognitive load label is used as the cognitive load status for the current time period.

7. The method for assessing the computer programming ability of teenagers according to claim 4, characterized in that, The dynamic adjustment of task parameters for programming evaluation tasks or the provision of auxiliary interventions include: Based on the cognitive load state, determine whether to trigger task adaptive adjustment; when the cognitive load state is high load confusion or high load anxiety, perform task parameter adjustment or provide auxiliary intervention; The task parameter adjustments include changing the granularity of code completion, reducing the logical complexity of the current task, extending the available time of the current task, and adjusting the level of detail in error messages. The assistance provided includes popping up a guided prompt box in a non-intrusive location in the programming editing area, activating virtual characters in the narrative scene to provide dialogue prompts, providing optional code snippet previews, and switching the current task to a step-by-step guided mode; While adjusting task parameters or providing auxiliary interventions, the response characteristics of the object to be evaluated are recorded simultaneously. These response characteristics include the response delay from the intervention to the first code modification, the type of behavioral response to the intervention content, and the relative change in the code execution success rate before and after the intervention.

8. The method for assessing the computer programming ability of teenagers according to claim 1, characterized in that, The generated multidimensional capability assessment results of the object to be evaluated include: From the programming behavior data obtained from the adjusted programming assessment task, the first quantitative indicators of multiple capability dimensions are extracted; the multiple capability dimensions include: the ability to complete the task independently, the efficiency of recovery from errors, and the task persistence; A second quantitative indicator of auxiliary resource utilization capability is calculated based on the aforementioned response characteristics; The first and second quantitative indicators are normalized to obtain the normalized scores of each dimension indicator. The normalized scores are visualized using radar charts or ability spectra to generate multidimensional ability assessment results. The visualization does not display the total score, ranking, or pass / fail indicators, but only the current performance level of each ability dimension.

9. The method for assessing the computer programming ability of teenagers according to claim 1, characterized in that, Also includes: The multidimensional capability assessment results are stored in the user profile of the object to be assessed; When the next assessment is initiated, the multidimensional ability assessment results in the user profile are read, and the initial difficulty and narrative branch path of the programming assessment task are adaptively set according to the multidimensional ability assessment results.

10. A computer programming ability assessment system for teenagers, applied to the computer programming ability assessment method for teenagers as described in any one of claims 1 to 9, characterized in that, It includes a task construction module, a data acquisition module, a cognitive recognition module, an adaptive adjustment module, and an evaluation generation module; The task construction module is used to construct programming evaluation tasks presented in a contextualized manner; The data acquisition module is used to collect programming behavior data of the object to be evaluated in real time during the execution of the programming evaluation task. The cognitive recognition module is used to dynamically identify the current cognitive load state of the object to be evaluated based on the programming behavior data. The adaptive adjustment module is used to dynamically adjust the task parameters of the programming assessment task or provide auxiliary intervention based on the cognitive load state, and simultaneously record the response characteristics of the object to be assessed. The evaluation generation module is used to generate a multi-dimensional capability evaluation result of the object to be evaluated based on the programming behavior data obtained from the adjusted programming evaluation task and the response characteristics.