A learning analysis system and method for online programming learning
By capturing and evaluating the behavior and cognitive load of programming learners in real time through the learning analysis system, and dynamically adjusting the teaching content, the problem of the inability of existing platforms to make personalized adjustments is solved, thereby improving learning efficiency and outcomes.
Patent Information
- Application Number
- CN202510268027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-03-07
AI Technical Summary
Existing online programming learning platforms lack real-time monitoring and analysis of learners' behavior, and cannot adjust teaching content and difficulty according to individual needs, resulting in poor learning outcomes. In particular, beginners are unable to effectively reduce cognitive load when faced with complex programming tasks.
A learning analysis system was designed, including a programming behavior collection module, a code semantic quantification module, a cognitive load assessment module, and a learning stage discrimination module. The system captures user operation behavior data in real time, parses code semantics, assesses cognitive load, and recommends personalized learning resources based on the learning stage.
It enables real-time monitoring of learners' behavior and assessment of their cognitive load, dynamically adjusts teaching content, improves learning efficiency and outcomes, reduces learners' cognitive load, and provides a personalized learning experience.
Smart Images

Figure CN120196809B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of educational technology, and in particular to a learning analysis system and method for online programming learning. Background Technology
[0002] With the popularization of programming education, more and more online programming learning platforms have emerged, providing a wealth of programming courses and interactive learning tools. However, most existing programming learning platforms focus on providing static teaching content, such as code examples and explanations of knowledge points, lacking real-time monitoring and analysis of learners' behavior. This traditional teaching model is difficult to adapt to the different learning needs of each learner, especially for beginners, who often encounter problems such as excessive cognitive load and slow learning progress, resulting in poor learning outcomes. In addition, traditional methods often ignore the differences in learners' cognitive abilities at different stages and cannot dynamically adjust the teaching content and difficulty according to the learners' actual situation, which greatly affects learning efficiency and learning outcomes.
[0003] Therefore, how to monitor learners' behavioral data in real time and comprehensively during online programming learning, and combine this with their cognitive load assessment results to accurately determine the learner's learning stage, and then recommend differentiated and personalized learning resources, is a significant issue in current programming education technology. Existing technologies have not fully addressed this problem; learning resources are often pushed based on general, static syllabi, failing to be precisely adjusted according to learners' individual needs. This results in learners not receiving timely help and guidance when facing different learning challenges, especially when dealing with complex programming tasks, failing to effectively reduce their cognitive load and improve learning efficiency. Summary of the Invention
[0004] To achieve the above objectives, this invention provides a learning analysis system and method for online programming learning.
[0005] A learning analysis system for online programming learning includes a programming behavior collection module, a code semantic quantification module, a cognitive load assessment module, a learning stage discrimination module, and a cognitive adaptation resource library; wherein:
[0006] Programming Behavior Acquisition Module: Used to capture user behavior data in real time during code editing, generating a behavior time-series dataset that includes code modification frequency, debugging trigger interval, and error correction time.
[0007] Code semantic quantization module: used to parse the abstract syntax tree of user-submitted code, extract three metrics: control flow depth, exception handling coverage, and recursive call chain length, and generate semantic quantization vectors;
[0008] Cognitive Load Assessment Module: This module is used to spatiotemporally align behavioral time-series datasets with semantic quantization vectors, and outputs a three-dimensional load index that includes short-term memory stress value, logical reasoning strength, and error correction ability saturation through preset cognitive load calculation rules.
[0009] Learning stage discrimination module: It is used to match the three-dimensional load index with the preset cognitive development stage threshold library to determine whether the user is currently in the grammar sensitive period, logic construction period or engineering optimization period;
[0010] Cognitive Adaptation Resource Module: Based on the discrimination results of the learning stage discrimination module, it extracts code examples, debugging toolkits, and micro-lessons of knowledge points that match the current stage from the preset differentiated teaching resource pool.
[0011] Optionally, the programming behavior acquisition module includes an operation data acquisition unit, a behavior timing generation unit, a modification frequency calculation unit, a debugging trigger interval calculation unit, an error correction time calculation unit, and a data aggregation unit; wherein:
[0012] The operation data acquisition unit is used to monitor the user's operation behavior in real time during the code editing process, including keyboard input, mouse clicks and cursor movement, and record the time when the operation behavior occurs;
[0013] Behavior time series generation unit: used to arrange the operation behaviors in chronological order and generate a behavior time series dataset based on the operation behavior data recorded by the operation data acquisition unit;
[0014] Modification Frequency Calculation Unit: Used to analyze code modification operations in behavioral time series datasets, calculate the frequency of code modifications by users within a certain time range, and generate code modification frequency data;
[0015] Debug trigger interval calculation unit: used to analyze debugging operations in behavioral time series datasets, calculate the time interval between each user-triggered debugging operation, and generate debugging trigger interval data;
[0016] Error correction time calculation unit: used to analyze error correction operations in behavioral time series datasets, calculate the time taken for users to correct each error, and generate error correction time data;
[0017] Data aggregation unit: Used to aggregate the generated code modification frequency data, debugging trigger interval data, and error correction time data into a behavior time series dataset.
[0018] Optionally, the code semantic quantization module includes an abstract syntax tree generation unit, a control flow depth extraction unit, an exception handling coverage extraction unit, a recursive call chain extraction unit, and a semantic quantization vector generation unit; wherein:
[0019] Abstract Syntax Tree Generation Unit: Used to convert user-submitted source code into an abstract syntax tree. By performing lexical and syntactic analysis on the source code, it identifies the structural hierarchy of the code, including statements, expressions, and control structures, and generates an abstract syntax tree corresponding to the code structure.
[0020] Control flow depth extraction unit: used to extract the control flow depth based on the control structure in the abstract syntax tree, and calculate the maximum depth of the control flow by analyzing the branches and nested loops in the abstract syntax tree;
[0021] Exception handling coverage extraction unit: used to analyze the exception handling structure in the abstract syntax tree and calculate the exception handling coverage. Specifically, it traverses all statements with potential exceptions in the abstract syntax tree and counts the proportion of statements covered by the exception handling structure to the total number of statements.
[0022] Recursive call chain extraction unit: used to analyze the function call structure in the abstract syntax tree, extract the length of the recursive call chain, identify recursive calls and calculate the maximum length of the recursive call chain by analyzing the call relationship of functions or methods;
[0023] Semantic Quantization Vector Generation Unit: This unit combines the three extracted metrics—control flow depth, exception handling coverage, and recursive call chain length—into a semantic quantization vector.
[0024] Optionally, the cognitive load assessment module includes a spatiotemporal alignment unit and a cognitive load calculation unit; wherein:
[0025] Spatiotemporal alignment unit: used to match the timestamps in the behavioral temporal dataset with the semantic feature time points in the semantic quantization vector, and align the corresponding data in time so that the behavioral data and semantic features at each moment can correspond, ensuring the temporal consistency between data;
[0026] Cognitive load calculation unit: Based on spatiotemporally aligned data, it applies preset cognitive load calculation rules to evaluate the user's cognitive load and outputs a three-dimensional load index, including short-term memory stress value, logical reasoning strength, and error correction ability saturation.
[0027] Optionally, the spatiotemporal alignment unit includes:
[0028] Extract timestamps: Extract the timestamps of each operation from the behavior time series dataset, and record the time information of each code modification, debugging trigger, and bug correction operation by the user;
[0029] Extracting time points: Extracting semantic feature time points corresponding to the behavioral time series dataset from the semantic quantization vector. These time points represent the calculation time of the semantic quantization index.
[0030] Matching timestamps and time points: The timestamps in the behavioral time series dataset are matched with the semantic feature time points in the semantic quantization vector through a time matching algorithm to ensure that the behavioral data at each moment corresponds one-to-one with the semantic feature time points;
[0031] Interpolation adjustment: For time points that do not correspond directly, interpolation methods are used to adjust them to ensure that the behavioral time series data and the semantic quantization vector can be smoothly aligned in time.
[0032] Optionally, the cognitive load calculation unit includes:
[0033] Load Calculation Rule 1: Used to assess the cognitive load, especially short-term memory load, when a user performs memory operations during programming. The formula is: P memory =α1·F modify +β1·D cf , where P memory F represents the short-term memory stress value. modify α1 and β1 are preset weighting coefficients for the code modification frequency;
[0034] Load calculation rule 2: Used to assess the cognitive load of users when performing logical reasoning, especially the complexity of code logic analysis and structural reasoning. The formula is:
[0035] P logic =α2·ΔT debug +β2·L recursion , where P logic For logical reasoning strength, ΔT debug To adjust the trigger interval, L recursion α2 and β2 are the length of the recursive call chain, and α2 and β2 are preset weight coefficients;
[0036] Load calculation rule 3: Used to assess the cognitive load of users when correcting errors during programming, especially the capacity load when identifying and correcting errors. The formula is: P error =α3·T correction +β3·R exception , where P error T represents the saturation level of error correction capability. correction For error correction time, R exception For anomaly handling coverage, α3 and β3 are preset weighting coefficients;
[0037] Output a three-dimensional load index: Integrate the calculated short-term memory stress value, logical reasoning strength, and error correction capability saturation to generate a three-dimensional load index P. total The formula is: P total =P memory +P logic +P error .
[0038] Optionally, the learning stage discrimination module includes a loading unit, a matching determination unit, and an output determination result unit; wherein:
[0039] Loading unit: Used to load the cognitive development stage threshold library stored in the system. The threshold library contains a three-dimensional load index range for distinguishing different learning stages and their corresponding learning stages. Each learning stage has a set of thresholds, including the upper and lower limits of short-term memory stress value, logical reasoning strength and error correction ability saturation.
[0040] Matching and Judgment Unit: By comparing the three-dimensional load index with the threshold range in the preset cognitive development stage threshold library, it determines the user's current cognitive load level and thus determines the learning stage the user is in.
[0041] Output judgment result unit: Based on the matching results of the three-dimensional load index and the cognitive development stage threshold library, output the user's current learning stage, and the judgment result is either the grammar sensitive period, the logic construction period, or the engineering optimization period.
[0042] Optionally, the rules for determining the user's current cognitive load level include:
[0043] Judgment Rule 1: When the short-term memory stress value in the three-dimensional load index is high, the logical reasoning strength is low, and the error correction ability saturation is low, it indicates that the user is in the grammar-sensitive period. The judgment formula is: P memory >θ syntax_high And P logic <θ logic_low And P error <θ error_low , where θ syntax_high θ logic_low and θ error_low These are the thresholds for the grammar-sensitive period;
[0044] Judgment Rule 2: When the short-term memory stress value in the three-dimensional load index is moderate, the logical reasoning intensity is high, and the error correction capability saturation is low, it indicates that the user is in the logic construction phase. The judgment formula is: θ syntax_low <P memory <θ syntax_high And P logic >θ logic_high And P error <θ error_low , where θ syntax_low θ syntax_high θ logic_high θ error_low These are the inter-values during the logical construction phase;
[0045] Judgment Rule 3: When the short-term memory stress value in the three-dimensional load index is low, the logical reasoning strength is moderate, and the error correction capability saturation is high, it indicates that the user is in the engineering optimization period. The judgment formula is: P memory <θ syntax_low And P logic >θ logic_medium And P error >θ error_high , where θ syntax_low θ logic_medium θ error_high These are the thresholds for the engineering optimization period.
[0046] Optionally, the cognitive adaptation resource module includes a stage resource matching unit, a resource extraction unit, and a resource recommendation unit; wherein:
[0047] Phase Resource Matching Unit: Based on the learning phase assessment results, it matches resources from a pre-defined differentiated teaching resource pool. Specifically, during the grammar-sensitive period, it matches resources related to basic programming language syntax, semantic understanding, and initial debugging; during the logic construction period, it matches resources related to program design logic, algorithm construction, and complex debugging; and during the engineering optimization period, it matches resources related to code optimization, performance improvement, and engineering practice.
[0048] Resource extraction unit: Used to extract resources that match the current learning stage from the differentiated teaching resource pool based on the matching results of the stage resource matching unit;
[0049] Resource recommendation unit: Based on the extracted results, it forms a personalized learning path and provides matching teaching resources to users in the form of recommendations.
[0050] A learning analysis method for online programming learning, implemented by the aforementioned learning analysis system for online programming learning, includes the following steps:
[0051] S1: Real-time collection of user operation behavior data during code editing process, generating behavior time series datasets including code modification frequency, debugging trigger interval, and error correction time;
[0052] S2: Parse the user-submitted code, generate an abstract syntax tree, and extract three semantic metrics: control flow depth, exception handling coverage, and recursive call chain length, to generate a semantic quantization vector;
[0053] S3: Spatiotemporally align the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector to ensure that the behavioral data and semantic features at each moment correspond one-to-one.
[0054] S4: Based on the spatiotemporally aligned data, apply the preset cognitive load calculation rules to assess the user's cognitive load and output a three-dimensional load index including short-term memory stress value, logical reasoning strength, and error correction ability saturation.
[0055] S5: Based on the three-dimensional load index and the preset cognitive development stage threshold library, determine whether the user's current learning stage is the grammar sensitive period, the logic construction period, or the engineering optimization period.
[0056] S6: Based on the learning stage determination results, extract code examples, debugging toolkits, and micro-lessons that match the current learning stage from the differentiated teaching resource pool, and recommend them to users for learning.
[0057] The beneficial effects of this invention are:
[0058] This invention, by collecting learners' behavioral data during the code editing process in real time and combining it with semantic quantization vectors and cognitive load assessment, can dynamically evaluate learners' cognitive load and accurately push personalized teaching resources according to their learning stage. This system can effectively reduce learners' cognitive load, enabling them to receive matching learning content at the appropriate stage, thereby improving learning efficiency and learning outcomes.
[0059] This invention, by combining learner behavior data and cognitive load analysis, can accurately determine the learner's learning status and adjust teaching resources in real time to provide content that matches their cognitive abilities and learning needs. In this way, it can not only improve learners' programming skills, but also help them avoid excessive fatigue and cognitive stress during the learning process, providing a more efficient and humanized learning experience. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a schematic diagram of the learning analysis system according to an embodiment of the present invention;
[0062] Figure 2 This is a schematic diagram of the learning analysis method according to an embodiment of the present invention. Detailed Implementation
[0063] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0064] It should be noted that the use of terms such as "an embodiment," "an embodiment," "an exemplary embodiment," and "some embodiments" in the specification indicates that the described embodiment may include a specific feature, structure, or characteristic, but not every embodiment necessarily includes that specific feature, structure, or characteristic. Furthermore, when a specific feature, structure, or characteristic is described in connection with an embodiment, implementing such a feature, structure, or characteristic in conjunction with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the art.
[0065] Generally, terms can be understood at least partly from their use in context. For example, depending at least partly on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in a singular sense, or a combination of features, structures, or characteristics in a plural sense. Additionally, the term "based on" can be understood not necessarily to convey an exclusive set of factors, but rather, alternatively, depending at least partly on the context, to allow for the presence of other factors that are not necessarily explicitly described.
[0066] like Figure 1 As shown, a learning analysis system for online programming learning includes a programming behavior collection module, a code semantic quantification module, a cognitive load assessment module, a learning stage discrimination module, and a cognitive adaptation resource library; wherein:
[0067] Programming Behavior Acquisition Module: Used to capture user behavior data in real time during code editing, generating a behavior time-series dataset that includes code modification frequency, debugging trigger interval, and error correction time.
[0068] Code semantic quantization module: used to parse the abstract syntax tree of user-submitted code, extract three metrics: control flow depth, exception handling coverage, and recursive call chain length, and generate semantic quantization vectors;
[0069] Cognitive Load Assessment Module: This module is used to spatiotemporally align behavioral time-series datasets with semantic quantization vectors, and outputs a three-dimensional load index that includes short-term memory stress value, logical reasoning strength, and error correction ability saturation through preset cognitive load calculation rules.
[0070] Learning stage discrimination module: It is used to match the three-dimensional load index with the preset cognitive development stage threshold library to determine whether the user is currently in the grammar sensitive period, logic construction period or engineering optimization period;
[0071] Cognitive Adaptation Resource Module: Based on the discrimination results of the learning stage discrimination module, it extracts code examples, debugging toolkits, and micro-lessons of knowledge points that match the current stage from the preset differentiated teaching resource pool.
[0072] The programming behavior acquisition module includes an operation data acquisition unit, a behavior timing generation unit, a modification frequency calculation unit, a debugging trigger interval calculation unit, an error correction time calculation unit, and a data aggregation unit; among which:
[0073] The operation data acquisition unit is used to monitor the user's operation behavior in real time during the code editing process, including keyboard input, mouse clicks and cursor movement, and record the time when the operation behavior occurs;
[0074] Behavior time series generation unit: used to arrange the operation behaviors in chronological order and generate a behavior time series dataset based on the operation behavior data recorded by the operation data acquisition unit;
[0075] Modification Frequency Calculation Unit: Used to analyze code modification operations in behavioral time-series datasets, calculate the frequency of code modifications made by users within a certain time range, and generate code modification frequency data; the calculation formula is: Where, N modify For time range T duration The number of code modifications made by internal users, F modify The modification frequency per unit of time;
[0076] Debug trigger interval calculation unit: Used to analyze debugging operations in behavioral time series datasets, calculate the time interval between each user-triggered debugging operation, and generate debug trigger interval data; the calculation formula is: ΔT debug =T debug_i -T debug_(i-1) , among which, T debug_i Let ΔT be the timestamp of the i-th debugging operation. debug This refers to the time interval between two consecutive debugging operations.
[0077] Error Correction Time Calculation Unit: Used to analyze error correction operations in behavioral time-series datasets, calculate the time spent by the user to correct each error, and generate error correction time data; the calculation formula is: T correction =T fix_end -T fix_start , among which, T fix_end T is the timestamp for the end of the error correction operation. fix_start T is the timestamp for when the error correction operation started. correction The time required to correct a certain error;
[0078] Data aggregation unit: This unit aggregates the generated code modification frequency data, debugging trigger interval data, and error correction time data into a complete behavioral time series dataset for subsequent modules to process and analyze. The above-mentioned programming behavior acquisition module can accurately capture every operation behavior of the user during the programming process, and through the collaborative work of various unit modules, it generates a detailed behavioral time series dataset, providing comprehensive data support to help subsequent modules effectively evaluate the user's learning progress and cognitive load.
[0079] The code semantic quantization module includes an abstract syntax tree generation unit, a control flow depth extraction unit, an exception handling coverage extraction unit, a recursive call chain extraction unit, and a semantic quantization vector generation unit; among which:
[0080] Abstract Syntax Tree Generation Unit: Used to convert user-submitted source code into an Abstract Syntax Tree (AST). By performing lexical and syntactic analysis on the source code, it identifies the structural hierarchy of the code, including statements, expressions, and control structures, and generates an abstract syntax tree corresponding to the code structure.
[0081] Control Flow Depth Extraction Unit: Used to extract the control flow depth based on the control structures (such as loop statements, conditional statements, etc.) in the abstract syntax tree. By analyzing the branches and nested loops in the abstract syntax tree, the maximum control flow depth is calculated as a control flow depth index; the calculation formula is: in, Let N be the depth of the i-th branch statement. loopi Let D be the depth of the i-th loop statement. cf This represents the maximum control flow depth of the code.
[0082] Exception handling coverage extraction unit: This unit analyzes exception handling structures (such as try-catch blocks) in the abstract syntax tree and calculates exception handling coverage. Specifically, it iterates through all statements with potential exceptions in the abstract syntax tree and counts the proportion of statements covered by exception handling structures out of the total number of statements. The calculation formula is as follows: Where, N handled N is the number of statements covered by the exception handling structure. total R represents the total number of statements in the source code. exception For exception handling coverage;
[0083] Recursive call chain extraction unit: Used to analyze the function call structure in the abstract syntax tree, extract the length of the recursive call chain, identify recursive calls by analyzing the call relationships of functions or methods, and calculate the maximum length of the recursive call chain. The calculation formula is: Among them, C call Let L be the depth of the i-th recursive call. recursionThis represents the maximum length of the recursive call chain.
[0084] The semantic quantization vector generation unit combines the three extracted metrics—control flow depth, exception handling coverage, and recursive call chain length—into a semantic quantization vector. This generated semantic quantization vector represents the semantic features of the code, providing subsequent modules with cognitive load assessment and learning phase discrimination. This code semantic quantization module performs in-depth analysis of the abstract syntax tree of the source code, quantifying the semantic features of the code from multiple dimensions. It can effectively extract code complexity metrics and generate accurate semantic quantization vectors, providing a scientific basis for subsequent cognitive load assessment.
[0085] The cognitive load assessment module includes a spatiotemporal alignment unit and a cognitive load calculation unit; wherein:
[0086] Spatiotemporal alignment unit: used to match the timestamps in the behavioral temporal dataset with the semantic feature time points in the semantic quantization vector, and align the corresponding data in time so that the behavioral data and semantic features at each moment can correspond, ensuring the temporal consistency between data;
[0087] Cognitive Load Calculation Unit: Based on spatiotemporally aligned data, this unit applies preset cognitive load calculation rules to assess the user's cognitive load and outputs a three-dimensional load index, including short-term memory stress value, logical reasoning strength, and error correction ability saturation, for subsequent modules to use for learning stage discrimination and cognitive adaptation resource extraction.
[0088] The spatiotemporal alignment unit includes:
[0089] Extract timestamps: Extract the timestamps of each operation from the behavior time series dataset, and record the time information of each code modification, debugging trigger, and bug correction operation by the user;
[0090] Extracting time points: Extracting semantic feature time points corresponding to the behavioral time series dataset from the semantic quantization vector. These time points represent the calculation time of semantic quantization metrics (such as control flow depth, exception handling coverage, and recursive call chain length).
[0091] Matching timestamps and time points: A time matching algorithm is used to match the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector, ensuring a one-to-one correspondence between the behavioral data and the semantic feature time points at each moment; the matching algorithm can be calculated using the following formula:
[0092] ΔT match =|T timestamp -T semantic_point |, where T timestamp Let T be the timestamp of a certain operation in the behavioral time series dataset. semantic_pointFor a certain time point in the semantic quantization vector, ΔT match The optimal match is achieved by minimizing the time difference between the two.
[0093] Interpolation Adjustment: For time points that do not directly correspond, interpolation methods (such as linear interpolation) are used to adjust them, ensuring that the behavioral time series data and semantic quantization vectors are smoothly aligned in time; the interpolation formula is: Among them, S aligned (t) represents the aligned semantic feature value, S prev and S next These are the semantic feature values at adjacent time points, T. prev and T next t represents the timestamps of adjacent time points, and t represents the target time point. Through the above steps, the spatiotemporal alignment unit can achieve precise synchronization of behavioral data and semantic features, providing accurate input data for subsequent cognitive load calculation.
[0094] The cognitive load calculation unit includes:
[0095] Load Calculation Rule 1: Used to assess the cognitive load of users when performing memory operations during programming, especially short-term memory load. Specifically, it is calculated by analyzing the frequency of code modifications and the control flow depth in the semantic quantization vector of the user's behavioral time-series dataset. The formula is: P memory =α1·F modify +β1·D cf , where P memory F represents the short-term memory stress value. modify D is the frequency of code modification. cf To control the flow depth, α1 and β1 are preset weighting coefficients, representing the degree of their influence on short-term memory stress;
[0096] Load calculation rule 2: Used to assess the cognitive load of users when performing logical reasoning, especially the complexity of code logic analysis and structural reasoning. Specifically, it is calculated by analyzing the debugging trigger interval in the behavioral time series dataset and the recursive call chain length in the semantic quantization vector. The formula is:
[0097] P logic =α2·ΔT debug +β2·L recursion , where P logic For logical reasoning strength, ΔT debug To adjust the trigger interval, L recursion α2 and β2 are preset weight coefficients, representing the degree of influence of the two on the strength of logical reasoning.
[0098] Load calculation rule 3: Used to assess the cognitive load of users during error correction in the programming process, especially the capacity load when identifying and correcting errors. Specifically, it is calculated by analyzing the error correction time in the behavioral time series dataset and the anomaly handling coverage in the semantic quantization vector. The formula is: P error =α3·T correction +β3·R exception , where P error T represents the saturation level of error correction capability. correction For error correction time, R exception The error handling coverage is represented by α3 and β3, which are preset weighting coefficients indicating their influence on the error correction capability saturation.
[0099] Output a three-dimensional load index: Integrate the calculated short-term memory stress value, logical reasoning strength, and error correction capability saturation to generate a three-dimensional load index P. total The formula is: P total =P memory +P logic +P error By applying the above-mentioned load calculation rules, the cognitive load calculation unit can accurately assess the cognitive load of users during the programming process and generate a three-dimensional load index that reflects their short-term memory pressure, logical reasoning strength and error correction ability, providing effective evaluation data support for subsequent modules.
[0100] The learning phase discrimination module includes a loading unit, a matching determination unit, and an output determination result unit; wherein:
[0101] Loading unit: Used to load the cognitive development stage threshold library stored in the system. The threshold library contains a three-dimensional load index range for distinguishing different learning stages and their corresponding learning stages. Each learning stage has a set of thresholds, including the upper and lower limits of short-term memory stress value, logical reasoning strength and error correction ability saturation.
[0102] Matching and Judgment Unit: By comparing the three-dimensional load index with the threshold range in the preset cognitive development stage threshold library, it determines the user's current cognitive load level and thus determines the learning stage the user is in.
[0103] Output judgment result unit: Based on the matching results of the three-dimensional load index and the cognitive development stage threshold library, output the user's current learning stage, and determine whether the result is the grammar sensitive period, the logic construction period or the engineering optimization period. The result is then provided to the subsequent cognitive adaptation resource extraction module for targeted teaching resources.
[0104] The rules for determining a user's current cognitive load level include:
[0105] Judgment Rule 1: When the short-term memory stress value in the three-dimensional load index is high, the logical reasoning strength is low, and the error correction ability saturation is low, it indicates that the user is in the grammar-sensitive period. The characteristic of this stage is that the user is mainly focused on learning the basic grammar and semantic rules of the language. The judgment formula is: P memory >θ syntax_high And P logic <θ logic_low And P error <θ error_low , where θ syntax_high θ logic_low and θ error_low These are the thresholds for the grammar-sensitive period;
[0106] Judgment Rule 2: When the short-term memory stress value in the three-dimensional load index is moderate, the logical reasoning intensity is high, and the error correction capability saturation is low, it indicates that the user is in the logic construction phase. The judgment formula is: θ syntax_low <P memory <θ syntax_high And P logic >θ logic_high And P error <θ error_low , where θ syntax_low θ syntax_high θ logic_high θ error_low These are the inter-values during the logical construction phase;
[0107] Judgment Rule 3: When the short-term memory stress value in the three-dimensional load index is low, the logical reasoning strength is moderate, and the error correction capability saturation is high, it indicates that the user is in the engineering optimization period. The judgment formula is: P memory <θ syntax_low And P logic >θ logic_medium And P error >θ error_high , where θ syntax_low θ logic_medium θ error_high These are the thresholds for the engineering optimization period; through the above steps, the learning stage discrimination module can accurately determine the user's current learning stage, providing support for personalized teaching and cognitive load adaptation.
[0108] The cognitive adaptation resource module includes a stage-based resource matching unit, a resource extraction unit, and a resource recommendation unit; among which:
[0109] Phase Resource Matching Unit: Based on the learning phase assessment results, it matches resources from a pre-defined differentiated teaching resource pool. Specifically, during the grammar-sensitive period, it matches resources related to basic programming language syntax, semantic understanding, and initial debugging; during the logic construction period, it matches resources related to program design logic, algorithm construction, and complex debugging; and during the engineering optimization period, it matches resources related to code optimization, performance improvement, and engineering practice.
[0110] Resource Extraction Unit: Based on the matching results of the stage resource matching unit, this unit extracts resources from the differentiated teaching resource pool that match the current learning stage. According to the matching rules, this unit accurately extracts corresponding code examples, debugging toolkits, and micro-lessons of knowledge points from the preset resource library. The extracted resources cover different programming knowledge areas and skill improvement needs according to different learning stages.
[0111] The specific extraction method is as follows:
[0112] Code example extraction: Extracting programming examples that match the current learning stage. These examples cover the basic syntax of programming languages, common programming logic, and complex algorithm implementations. The extracted code examples help users understand the basic structure and application of programming languages and cultivate their programming thinking.
[0113] Debugging toolset extraction: Extract debugging toolsets that meet the needs of the current learning stage. For example, extract simple error message tools during the syntax-sensitive period, extract more complex debugging tools during the logic construction period, and extract performance optimization tools during the engineering optimization period.
[0114] The system extracts micro-lessons related to the current learning stage, including basic programming language knowledge, debugging techniques, algorithm design and optimization, etc. The micro-lessons at different stages are combined with practical examples to help users learn effectively according to their cognitive load.
[0115] Resource recommendation unit: Based on the extraction results, it forms a personalized learning path and provides matching teaching resources to users in the form of recommendations, ensuring that users receive the most effective learning support at the appropriate stage. Through the above steps, the cognitive adaptation resource module can accurately extract learning resources that match the user's current cognitive load from the differentiated teaching resource pool according to the user's learning stage, thereby improving the user's learning efficiency and reducing cognitive load.
[0116] like Figure 2 As shown, a learning analysis method for online programming learning, implemented by the aforementioned learning analysis system for online programming learning, includes the following steps:
[0117] S1: Real-time collection of user operation behavior data during code editing process, generating behavior time series datasets including code modification frequency, debugging trigger interval, and error correction time;
[0118] S2: Parse the user-submitted code, generate an abstract syntax tree, and extract three semantic metrics: control flow depth, exception handling coverage, and recursive call chain length, to generate a semantic quantization vector;
[0119] S3: Spatiotemporally align the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector to ensure that the behavioral data and semantic features at each moment correspond one-to-one.
[0120] S4: Based on the spatiotemporally aligned data, apply the preset cognitive load calculation rules to assess the user's cognitive load and output a three-dimensional load index including short-term memory stress value, logical reasoning strength, and error correction ability saturation.
[0121] S5: Based on the three-dimensional load index and the preset cognitive development stage threshold library, determine whether the user's current learning stage is the grammar sensitive period, the logic construction period, or the engineering optimization period.
[0122] S6: Based on the learning stage determination results, extract code examples, debugging toolkits, and micro-lessons matching the current learning stage from the differentiated teaching resource pool, and recommend them to the user for learning; through the above steps, this method can combine user behavior data and programming semantic analysis to achieve personalized recommendations of targeted learning resources, thereby optimizing the user's programming learning experience.
[0123] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0124] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A learning analysis system for online programming learning, characterized in that, It includes a programming behavior acquisition module, a code semantic quantification module, a cognitive load assessment module, a learning stage discrimination module, and a cognitive adaptation resource library; among which: Programming Behavior Acquisition Module: Used to capture user behavior data in real time during code editing, generating a behavior time-series dataset that includes code modification frequency, debugging trigger interval, and error correction time. Code semantic quantization module: used to parse the abstract syntax tree of user-submitted code, extract three metrics: control flow depth, exception handling coverage, and recursive call chain length, and generate semantic quantization vectors; Cognitive Load Assessment Module: This module is used to spatiotemporally align behavioral time-series datasets with semantic quantization vectors, and outputs a three-dimensional load index that includes short-term memory stress value, logical reasoning strength, and error correction ability saturation through preset cognitive load calculation rules. Learning stage discrimination module: It is used to match the three-dimensional load index with the preset cognitive development stage threshold library to determine whether the user is currently in the grammar sensitive period, logic construction period or engineering optimization period; Cognitive Adaptation Resource Module: Based on the discrimination results of the learning stage discrimination module, it extracts code examples, debugging toolkits, and micro-lessons of knowledge points that match the current stage from the preset differentiated teaching resource pool.
2. The learning analysis system for online programming learning according to claim 1, characterized in that, The programming behavior acquisition module includes an operation data acquisition unit, a behavior timing generation unit, a modification frequency calculation unit, a debug trigger interval calculation unit, an error correction time calculation unit, and a data aggregation unit; wherein: The operation data acquisition unit is used to monitor the user's operation behavior in real time during the code editing process, including keyboard input, mouse clicks and cursor movement, and record the time when the operation behavior occurs; Behavior time sequence generation unit: used to arrange the operation behaviors in chronological order and generate a behavior time sequence dataset based on the operation behavior data recorded by the operation data acquisition unit; Modification Frequency Calculation Unit: Used to analyze code modification operations in behavioral time series datasets, calculate the frequency of code modifications by users within a certain time range, and generate code modification frequency data; Debug trigger interval calculation unit: used to analyze debugging operations in behavioral time series datasets, calculate the time interval between each user-triggered debugging operation, and generate debugging trigger interval data; Error correction time calculation unit: used to analyze error correction operations in behavioral time series datasets, calculate the time taken for users to correct each error, and generate error correction time data; Data aggregation unit: Used to aggregate the generated code modification frequency data, debugging trigger interval data, and error correction time data into a behavior time series dataset.
3. The learning analysis system for online programming learning according to claim 1, characterized in that, The code semantic quantization module includes an abstract syntax tree generation unit, a control flow depth extraction unit, an exception handling coverage extraction unit, a recursive call chain extraction unit, and a semantic quantization vector generation unit; wherein: Abstract Syntax Tree Generation Unit: Used to convert user-submitted source code into an abstract syntax tree. By performing lexical and syntactic analysis on the source code, it identifies the structural hierarchy of the code, including statements, expressions, and control structures, and generates an abstract syntax tree corresponding to the code structure. Control flow depth extraction unit: used to extract the control flow depth based on the control structure in the abstract syntax tree, and calculate the maximum depth of the control flow by analyzing the branches and nested loops in the abstract syntax tree; Exception handling coverage extraction unit: used to analyze the exception handling structure in the abstract syntax tree and calculate the exception handling coverage. Specifically, it traverses all statements with potential exceptions in the abstract syntax tree and counts the proportion of statements covered by the exception handling structure to the total number of statements. Recursive call chain extraction unit: used to analyze the function call structure in the abstract syntax tree, extract the length of the recursive call chain, identify recursive calls and calculate the maximum length of the recursive call chain by analyzing the call relationship of functions or methods; Semantic Quantization Vector Generation Unit: This unit combines the three extracted metrics—control flow depth, exception handling coverage, and recursive call chain length—into a semantic quantization vector.
4. The learning analysis system for online programming learning according to claim 1, characterized in that, The cognitive load assessment module includes a spatiotemporal alignment unit and a cognitive load calculation unit; wherein: Spatiotemporal alignment unit: used to match the timestamps in the behavioral temporal dataset with the semantic feature time points in the semantic quantization vector, and align the corresponding data in time so that the behavioral data and semantic features at each moment can correspond, ensuring the temporal consistency between data; Cognitive load calculation unit: Based on spatiotemporally aligned data, it applies preset cognitive load calculation rules to evaluate the user's cognitive load and outputs a three-dimensional load index, including short-term memory stress value, logical reasoning strength, and error correction ability saturation.
5. A learning analysis system for online programming learning according to claim 4, characterized in that, The spatiotemporal alignment unit includes: Extract timestamps: Extract the timestamps of each operation from the behavior time series dataset, and record the time information of each code modification, debugging trigger, and bug correction operation by the user; Extracting time points: Extracting semantic feature time points corresponding to the behavioral time series dataset from the semantic quantization vector. These time points represent the calculation time of the semantic quantization index. Matching timestamps and time points: The timestamps in the behavioral time series dataset are matched with the semantic feature time points in the semantic quantization vector through a time matching algorithm to ensure that the behavioral data at each moment corresponds one-to-one with the semantic feature time points; Interpolation adjustment: For time points that do not correspond directly, interpolation methods are used to adjust them to ensure that the behavioral time series data and the semantic quantization vector can be smoothly aligned in time.
6. A learning analysis system for online programming learning according to claim 5, characterized in that, The cognitive load calculation unit includes: Load Calculation Rule 1: Used to assess the cognitive load of users when performing memory operations during programming, including short-term memory load, the formula is: ,in, This is the short-term memory stress value. For code modification frequency, and Preset weighting coefficients; Load calculation rule 2: Used to assess the cognitive load of users when performing logical reasoning, including the complexity of code logic analysis and structural reasoning, the formula is: ,in, For logical reasoning strength, To adjust the trigger interval, For the length of the recursive call chain, and Preset weighting coefficients; Load calculation rule 3: Used to assess the cognitive load of users when correcting errors during the programming process, including the capacity load when identifying and correcting errors, the formula is: ,in, To achieve error correction capability saturation, Error correction takes time. For exception handling coverage, and Preset weighting coefficients; Outputting a three-dimensional load index: This involves integrating the calculated short-term memory stress value, logical reasoning strength, and error correction capability saturation to generate a three-dimensional load index. The formula is: .
7. A learning analysis system for online programming learning according to claim 1, characterized in that, The learning phase discrimination module includes a loading unit, a matching judgment unit, and an output judgment result unit; wherein: Loading unit: Used to load the cognitive development stage threshold library stored in the system. The threshold library contains a three-dimensional load index range for distinguishing different learning stages and their corresponding learning stages. Each learning stage has a set of thresholds, including the upper and lower limits of short-term memory stress value, logical reasoning strength and error correction ability saturation. Matching and Judgment Unit: By comparing the three-dimensional load index with the threshold range in the preset cognitive development stage threshold library, it determines the user's current cognitive load level and thus determines the learning stage the user is in. Output judgment result unit: Based on the matching results of the three-dimensional load index and the cognitive development stage threshold library, output the user's current learning stage, and the judgment result is either the grammar sensitive period, the logic construction period, or the engineering optimization period.
8. A learning analysis system for online programming learning according to claim 7, characterized in that, The rules for determining the user's current cognitive load level include: Judgment Rule 1: When the short-term memory stress value in the three-dimensional load index is high, the logical reasoning strength is low, and the error correction ability saturation is low, it indicates that the user is in the grammar-sensitive period. The judgment formula is: and and ,in, , and These are the thresholds for the grammar-sensitive period; Judgment Rule 2: When the short-term memory stress value in the three-dimensional load index is moderate, the logical reasoning intensity is high, and the error correction capability saturation is low, it indicates that the user is in the logic construction phase. The judgment formula is: and and ,in, , , , These are the inter-values during the logical construction phase; Judgment Rule 3: When the short-term memory stress value in the three-dimensional load index is low, the logical reasoning strength is moderate, and the error correction capability saturation is high, it indicates that the user is in the engineering optimization period. The judgment formula is: ,in, , , These are the thresholds for the engineering optimization period.
9. A learning analysis system for online programming learning according to claim 1, characterized in that, The cognitive adaptation resource module includes a stage resource matching unit, a resource extraction unit, and a resource recommendation unit; wherein: Phase Resource Matching Unit: Based on the learning phase assessment results, it matches resources from a pre-defined differentiated teaching resource pool. Specifically, during the grammar-sensitive period, it matches resources related to basic programming language syntax, semantic understanding, and initial debugging; during the logic construction period, it matches resources related to program design logic, algorithm construction, and complex debugging; and during the engineering optimization period, it matches resources related to code optimization, performance improvement, and engineering practice. Resource extraction unit: Used to extract resources that match the current learning stage from the differentiated teaching resource pool based on the matching results of the stage resource matching unit; Resource recommendation unit: Based on the extracted results, it forms a personalized learning path and provides matching teaching resources to users in the form of recommendations.
10. A learning analysis method for online programming learning, implemented by a learning analysis system for online programming learning as described in any one of claims 1-9, characterized in that, Includes the following steps: S1: Real-time collection of user operation behavior data during code editing process, generating behavior time series datasets including code modification frequency, debugging trigger interval, and error correction time; S2: Parse the user-submitted code, generate an abstract syntax tree, and extract three semantic metrics: control flow depth, exception handling coverage, and recursive call chain length, to generate a semantic quantization vector; S3: Spatiotemporally align the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector to ensure that the behavioral data and semantic features at each moment correspond one-to-one. S4: Based on the spatiotemporally aligned data, apply the preset cognitive load calculation rules to assess the user's cognitive load and output a three-dimensional load index including short-term memory stress value, logical reasoning strength, and error correction ability saturation. S5: Based on the three-dimensional load index and the preset cognitive development stage threshold library, determine whether the user's current learning stage is the grammar sensitive period, the logic construction period, or the engineering optimization period. S6: Based on the learning stage determination results, extract code examples, debugging toolkits, and micro-lessons that match the current learning stage from the differentiated teaching resource pool, and recommend them to users for learning.
Citation Information
Patent Citations
Cognitive assessment based recommendations
US20200167670A1
Utilizing similarity, knowledge graphs, and machine learning models to refine / redefine a target skill profile based on skills data from employees of an entity and activate a recommendation system
US20210358065A1