Learning condition analysis system and method for programming online learning
By designing a learning situation analysis system, real-time collection and analysis of learners' programming behavior and code semantics, evaluating cognitive load and recommending personalized learning resources, the problem of inability to dynamically adjust teaching content and difficulty in the existing technology is solved, and learning efficiency and results are improved.
Patent Information
- Application Number
- CN202510268027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-07
AI Technical Summary
The existing programming online learning platform is difficult to monitor and analyze learner behavior data in real time, and cannot dynamically adjust the teaching content and difficulty, resulting in poor learning results.
A learning situation analysis system is designed, including a programming behavior acquisition module, a code semantic quantization module, a cognitive load assessment module, a learning stage discrimination module and a cognitive adaptation resource library. By collecting and analyzing learner behavior data and code semantics in real time, cognitive load is evaluated, and personalized learning resources are recommended based on the learning stage.
Real-time behavior monitoring and analysis of learners is realized, teaching content and difficulty are dynamically adjusted, learning efficiency and results are improved, and cognitive load of learners is reduced.
Smart Images

Figure CN120196809A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of educational technology, and in particular, to a learning situation analysis system and method for online programming learning. Background Art
[0002] With the popularization of programming education, more and more online programming learning platforms have emerged, providing rich programming courses and interactive learning tools. However, most of the existing programming learning platforms focus on providing static teaching content, such as code examples, knowledge point explanations, etc., lacking the monitoring and analysis of learners' real-time behaviors. This traditional teaching mode is difficult to adapt to the different learning needs of each learner. Especially for beginners, they often encounter problems such as excessive cognitive load and slow learning progress during the learning process, resulting in poor learning effects. In addition, traditional methods often ignore the cognitive ability differences of learners at different stages and cannot dynamically adjust teaching content and difficulty according to the actual situation of learners, greatly affecting learning efficiency and learning outcomes.
[0003] Therefore, how to monitor learners' behavioral data in real time and comprehensively during the online programming learning process, and combine the evaluation results of their cognitive load to accurately judge the learning stage of learners, and then recommend differentiated and personalized learning resources for them, is an important issue in current programming education technology. The existing technology has not fully solved this problem, and learners' learning resources are often pushed according to a general and static teaching syllabus, unable to be accurately adjusted according to the personalized needs of learners. This leads to learners being unable to obtain timely help and guidance when facing different learning challenges, especially when facing complex programming tasks, unable to effectively reduce their cognitive load and improve learning efficiency. Summary of the Invention
[0004] Based on the above purposes, the present invention provides a learning situation analysis system and method for online programming learning.
[0005] A learning situation analysis system for online programming learning includes a programming behavior collection module, a code semantics quantification module, a cognitive load evaluation module, a learning stage discrimination module, and a cognitive adaptation resource library. Among them:
[0006] The programming behavior collection module: is used to capture the operation behavior data of users during the code editing process in real time, and generate a behavior time series data set including code modification frequency, debugging trigger interval, and error correction time consumption.
[0007] The code semantics quantification module: is used to parse the abstract syntax tree of the code submitted by users, extract three indicators of control flow depth, exception handling coverage rate, and recursive call chain length, and generate a semantics quantification vector.
[0008] Cognitive Load Assessment Module: It is used to perform spatio-temporal alignment on the behavioral time series dataset and the semantic quantization vector, and output a three-dimensional load index including short-term memory stress value, logical reasoning intensity, and error correction ability saturation through a preset cognitive load calculation rule;
[0009] Learning Stage Discrimination Module: It is used to match the three-dimensional load index with a preset cognitive development stage threshold library to determine whether the user is currently in the grammar sensitive period, logical construction period, or engineering optimization period;
[0010] Cognitive Adaptation Resource Module: Based on the discrimination result of the Learning Stage Discrimination Module, it extracts a combination of code cases, debugging tool sets, and knowledge point micro-lessons that match the current stage from a preset differential teaching resource pool.
[0011] Optionally, the programming behavior acquisition module includes an operation data acquisition unit, a behavioral time series generation unit, a modification frequency calculation unit, a debugging trigger interval calculation unit, an error correction time consumption calculation unit, and a data aggregation unit; among them:
[0012] The operation data acquisition unit is used to monitor the operation behavior of the user during code editing in real time, including keyboard input, mouse click, and cursor movement, and record the time when the operation behavior occurs;
[0013] The behavioral time series generation unit: It is used to arrange the operation behaviors in chronological order according to the operation behavior data recorded by the operation data acquisition unit and generate a behavioral time series dataset;
[0014] The modification frequency calculation unit: It is used to analyze the code modification operations in the behavioral time series dataset, calculate the code modification frequency of the user within a certain time range, and generate code modification frequency data;
[0015] The debugging trigger interval calculation unit: It is used to analyze the debugging operations in the behavioral time series dataset, calculate the time interval between each time the user triggers a debugging operation, and generate debugging trigger interval data;
[0016] The error correction time consumption calculation unit: It is used to analyze the error correction operations in the behavioral time series dataset, calculate the time consumption for the user to correct each error, and generate error correction time consumption data;
[0017] The data aggregation unit: It is used to aggregate the generated code modification frequency data, debugging trigger interval data, and error correction time consumption data into a behavioral 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; among them:
[0019] Abstract Syntax Tree Generation Unit: It is used to convert the source code submitted by the user into an abstract syntax tree. By performing lexical analysis 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: It is used to extract the control flow depth according to the control structures in the abstract syntax tree. By analyzing the branching and loop nesting situations in the abstract syntax tree, it calculates the maximum depth of the control flow;
[0021] Exception Handling Coverage Extraction Unit: It is used to analyze the exception handling structures in the abstract syntax tree and calculate the exception handling coverage. Specifically, by traversing all the statements with potential exceptions in the abstract syntax tree, it counts the proportion of the statements covered by the exception handling structures in the total statements;
[0022] Recursive Call Chain Extraction Unit: It is used to analyze the function call structures in the abstract syntax tree and extract the length of the recursive call chain. By analyzing the call relationships of functions or methods, it identifies recursive calls and calculates the maximum length of the recursive call chain;
[0023] Semantic Quantification Vector Generation Unit: It is used to combine the above three indicators of control flow depth, exception handling coverage, and recursive call chain length into a semantic quantification vector.
[0024] Optionally, the cognitive load assessment module includes a spatio-temporal alignment unit and a cognitive load calculation unit; where:
[0025] Spatio-temporal Alignment Unit: It is used to match the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantification vector and align the corresponding data in time, so that the behavioral data at each moment can correspond to the semantic features, ensuring the temporal consistency of the data;
[0026] Cognitive Load Calculation Unit: It is used to evaluate the user's cognitive load according to the data after spatio-temporal alignment, apply the preset cognitive load calculation rules, and output a three-dimensional load index, including short-term memory stress value, logical reasoning intensity, and error correction ability saturation.
[0027] Optionally, the spatio-temporal alignment unit includes:
[0028] Timestamp Extraction: Extract the timestamps of each operation behavior from the behavioral time series dataset and record the time information of each code modification, debugging trigger, and error correction operation of the user;
[0029] Time Point Extraction: Extract the semantic feature time points corresponding to the behavioral time series dataset from the semantic quantification vector, and this time point represents the calculation moment of the semantic quantification index;
[0030] Match the timestamp with the time point: Use a time matching algorithm to match the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector, ensuring that the behavioral data at each moment can correspond one by one with the semantic feature time points;
[0031] Interpolation adjustment: For time points that cannot be directly corresponded, use interpolation methods for adjustment 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 evaluate the cognitive load of the user during the programming process when performing memory operations, especially the short-term memory load. The formula is: P memory =α1·F modify +β1·D cf , where P memory is the short-term memory stress value, F modify is the code modification frequency, and α1 and β1 are preset weight coefficients;
[0034] Load calculation rule 2: Used to evaluate the cognitive load of the user 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 is the logical reasoning intensity, ΔT debug is the debugging trigger interval, L recursion is the length of the recursive call chain, and α2 and β2 are preset weight coefficients;
[0036] Load calculation rule 3: Used to evaluate the cognitive load of the user when correcting errors during the programming process, especially the ability load when performing error identification and correction. The formula is: P error =α3·T correction +β3·R exception , where P error is the error correction ability saturation, T correction is the error correction time consumption, R exception is the exception handling coverage rate, and α3 and β3 are preset weight coefficients;
[0037] Output the three-dimensional load index: Integrate the calculated short-term memory stress value, logical reasoning intensity, and error correction ability saturation to generate the three-dimensional load index P total , and 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; where:
[0039] Loading unit: used to load the cognitive development stage threshold library stored in the system. This threshold library contains the three-dimensional load index ranges 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 the short-term memory stress value, logical reasoning intensity, and error correction ability saturation;
[0040] Matching determination unit: By comparing the three-dimensional load index with the threshold ranges in the preset cognitive development stage threshold library, it determines the user's current cognitive load level, and further determines the learning stage they are in;
[0041] Output determination result unit: used to output the user's current learning stage according to the matching result of the three-dimensional load index and the cognitive development stage threshold library. The determination result is the grammar sensitive period, the logical construction period, or the engineering optimization period.
[0042] Optionally, the rules for determining the user's current cognitive load level include:
[0043] Determination rule 1: When the short-term memory stress value in the three-dimensional load index is high, the logical reasoning intensity is low, and the error correction ability saturation is low, it indicates that the user is in the grammar sensitive period. The determination formula is: P memory >θ syntax_high and P logic <θ logic_low and P error <θ error_low , where θ syntax_high , θ logic_low and θ error_low are respectively the thresholds of the grammar sensitive period;
[0044] Determination 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 ability saturation is low, it indicates that the user is in the logical construction period. The determination 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 are respectively the thresholds of the logical construction period;
[0045] Determination Rule 3: When the short-term memory stress value in the three-dimensional load index is low, the logical reasoning intensity is moderate, and the error correction ability saturation is high, it indicates that the user is in the engineering optimization period. The determination formula is: P memory <θ syntax_low and P logic >θ logic_medium and P error >θ error_high , where θ syntax_low , θ logic_medium , θ error_high are the thresholds for the engineering optimization period respectively.
[0046] Optionally, the cognitive adaptation resource module includes a stage resource matching unit, a resource extraction unit, and a resource recommendation unit; where:
[0047] Stage resource matching unit: used to match resources in the preset differentiated teaching resource pool according to the learning stage discrimination result. Specifically, in the grammar sensitive period, match resources related to the basic grammar of programming languages, semantic understanding, and preliminary debugging; in the logical construction period, match resources related to programming logic, algorithm construction, and complex debugging; in the engineering optimization period, match resources related to code optimization, performance improvement, and engineering practice;
[0048] Resource extraction unit: used to extract resources matching the current learning stage from the differentiated teaching resource pool according to the matching result of the stage resource matching unit;
[0049] Resource recommendation unit: used to form a personalized learning path according to the extraction result and provide the matching teaching resources to the user in a recommended form.
[0050] A method for analyzing the learning situation for online programming, implemented by the above-mentioned system for analyzing the learning situation for online programming, includes the following steps:
[0051] S1: Real-time collect the operation behavior data of the user during the code editing process, and generate a behavior time series data set including the code modification frequency, debugging trigger interval, and error correction time consumption;
[0052] S2: Parse the code submitted by the user to generate an abstract syntax tree, and extract three semantic indicators: control flow depth, exception handling coverage rate, and recursive call chain length, and generate a semantic quantization vector;
[0053] S3: Align the timestamps in the behavior time series data set with the semantic feature time points in the semantic quantization vector in space-time to ensure that the behavior data and semantic features at each moment can correspond one by one;
[0054] S4: According to the data after spatio-temporal alignment, apply the preset cognitive load calculation rules to evaluate the user's cognitive load, and output a three-dimensional load index including short-term memory stress value, logical reasoning intensity, and error correction ability saturation;
[0055] S5: Match the three-dimensional load index with the preset cognitive development stage threshold library to determine the user's current learning stage as the grammar sensitive period, logical construction period, or engineering optimization period;
[0056] S6: According to the learning stage discrimination result, extract the code cases, debugging tool sets, and knowledge point micro-lesson combinations that match the current learning stage from the differentiated teaching resource pool, and recommend them to the user for learning.
[0057] Advantages of the present invention:
[0058] In the present invention, by collecting the behavior data of learners during the code editing process in real time, and combining semantic quantization vectors and cognitive load evaluation, it is possible to dynamically evaluate the cognitive load of learners, and according to their learning stage, accurately push personalized teaching resources; this system can effectively reduce the cognitive load of learners, enabling them to receive matching learning content at the appropriate stage, thereby improving learning efficiency and learning outcomes.
[0059] In the present invention, by combining the behavior data of learners and cognitive load analysis, the present invention can accurately judge the learning state of learners, and adjust teaching resources in real time to provide content that meets their cognitive abilities and learning needs; in this way, not only can the programming skills of learners be improved, but also it can help them avoid excessive fatigue and cognitive stress during the learning process, providing a more efficient and user-friendly learning experience. Description of the Drawings
[0060] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only those of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0061] Figure 1 It is a schematic diagram of the learning situation analysis system according to the embodiment of the present invention;
[0062] Figure 2 It is a schematic diagram of the learning situation analysis method according to the embodiment of the present invention. Detailed Embodiments
[0063] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments. For some well-known technologies, those skilled in the art can also adopt other alternative methods for implementation; 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 pointed out that in the specification, references to "an embodiment", "embodiments", "exemplary embodiments", "some embodiments", etc. indicate that the described embodiments may include specific features, structures, or characteristics, but not necessarily every embodiment includes such specific features, structures, or characteristics. Additionally, when describing a specific feature, structure, or characteristic in combination with an embodiment, implementing such feature, structure, or characteristic in combination with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the relevant art.
[0065] Generally, terms can be understood at least in part from their use in context. For example, at least in part depending on the context, the term "one or more" used herein can be used to describe any feature, structure, or characteristic in a singular sense, or can be used to describe a combination of features, structures, or characteristics in a plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey a set of exclusive factors, but rather, at least in part depending on the context, can allow for the existence of other factors that may not be explicitly described.
[0066] As Figure 1 shown, a learning situation analysis system for programming online learning includes a programming behavior collection module, a code semantics quantification module, a cognitive load assessment module, a learning stage discrimination module, and a cognitive adaptation resource library; wherein:
[0067] The programming behavior collection module: is used to capture the operation behavior data of the user during the code editing process in real time, and generate a behavior time series dataset including code modification frequency, debugging trigger interval, and error correction time consumption;
[0068] The code semantics quantification module: is used to parse the abstract syntax tree of the user-submitted code, extract three indicators of control flow depth, exception handling coverage rate, and recursive call chain length, and generate a semantics quantification vector;
[0069] The cognitive load assessment module: is used to perform spatio-temporal alignment on the behavior time series dataset and the semantics quantification vector, and output a three-dimensional load index including short-term memory stress value, logical reasoning intensity, and error correction ability saturation through a preset cognitive load calculation rule;
[0070] The learning stage discrimination module: is used to match the three-dimensional load index with a preset cognitive development stage threshold library to determine whether the user is currently in the grammar sensitive period, logical construction period, or engineering optimization period;
[0071] Cognitive adaptation resource module: Based on the discrimination result of the learning stage discrimination module, extract the code cases, debugging tool sets, and knowledge point micro-lesson combinations that match the current stage from the preset differentiated teaching resource pool.
[0072] The programming behavior collection module includes an operation data collection unit, a behavior time sequence generation unit, a modification frequency calculation unit, a debugging trigger interval calculation unit, an error correction time consumption calculation unit, and a data summary unit; among them:
[0073] The operation data collection unit is used to monitor the operation behaviors of the user during the code editing process in real time, including keyboard input, mouse clicks, and cursor movements, and record the time when the operation behaviors occur;
[0074] The behavior time sequence generation unit: is used to arrange the operation behavior data recorded by the operation data collection unit in chronological order and generate a behavior time sequence data set;
[0075] The modification frequency calculation unit: is used to analyze the code modification operations in the behavior time sequence data set, calculate the code modification frequency of the user within a certain time range, and generate code modification frequency data; the calculation formula is: where N modify is the number of code modifications made by the user within the time range T duration and F modify is the modification frequency per unit time;
[0076] The debugging trigger interval calculation unit: is used to analyze the debugging operations in the behavior time sequence data set, calculate the time interval between each time the user triggers a debugging operation, and generate debugging trigger interval data; the calculation formula is: ΔT debug = T debug_i - T debug_(i-1) where T debug_i is the time stamp of the i-th debugging operation, and ΔT debug is the time interval between two consecutive debugging operations;
[0077] The error correction time consumption calculation unit: is used to analyze the error correction operations in the behavior time sequence data set, calculate the time consumption for the user to correct each error, and generate error correction time consumption data; the calculation formula is: T correction = T fix_end - T fix_start where T fix_end is the time stamp when the error correction operation ends, T fix_start is the time stamp when the error correction operation starts, and T correction is the time required to correct a certain error;
[0078] Data aggregation unit: It is used to aggregate the generated code modification frequency data, debugging trigger interval data, and error correction time-consuming data into a complete behavioral timing data set for subsequent modules to process and analyze; the above programming behavior acquisition module can accurately capture each operation behavior of the user during the programming process, and through the collaborative work of each unit module, generate a detailed behavioral timing data set, provide comprehensive data support, and help subsequent modules effectively evaluate the user's learning progress and cognitive load.
[0079] The code semantics quantification 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 semantics quantification vector generation unit; among them:
[0080] Abstract syntax tree generation unit: It is used to convert the source code submitted by the user into an abstract syntax tree (AST). By performing lexical analysis 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: It is used to extract the control flow depth according to the control structures (such as loop statements, conditional statements, etc.) in the abstract syntax tree. By analyzing the branch and loop nesting situations in the abstract syntax tree, it calculates the maximum depth of the control flow as the control flow depth index; the calculation formula is: Among them, is the depth of the i-th branch statement, N loopi is the depth of the i-th loop statement, D cf is the maximum control flow depth of the code;
[0082] Exception handling coverage extraction unit: It is used to analyze the exception handling structures (such as try-catch statement blocks) in the abstract syntax tree and calculate the exception handling coverage. Specifically, by traversing all potential exception statements in the abstract syntax tree, it counts the proportion of statements covered by the exception handling structure in the total statements. The calculation formula is: Among them, N handled is the number of statements covered by the exception handling structure, N total is the total number of statements in the source code, R exception is the exception handling coverage;
[0083] Recursive call chain extraction unit: It is used to analyze the function call structure in the abstract syntax tree and extract the length of the recursive call chain. By analyzing the call relationship of functions or methods, it identifies recursive calls and calculates the maximum length of the recursive call chain. The calculation formula is: Among them, C call is the hierarchical depth of the i-th recursive call, L recursionis the maximum length of the recursive call chain;
[0084] Semantic quantization vector generation unit: It is used to combine the above three indicators of control flow depth, exception handling coverage rate, and recursive call chain length into a semantic quantization vector. The generated semantic quantization vector represents the semantic features of the code and is provided for subsequent modules to evaluate the cognitive load and distinguish the learning stage. By deeply analyzing the abstract syntax tree of the source code, this code semantic quantization module quantifies the semantic features of the code from multiple dimensions, can effectively extract the complexity indicators of the code, and generate an accurate semantic quantization vector, providing a scientific basis for the subsequent cognitive load evaluation.
[0085] The cognitive load evaluation module includes a spatio-temporal alignment unit and a cognitive load calculation unit; among them:
[0086] Spatio-temporal alignment unit: It is used to match the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector, and align the corresponding data in time, so that the behavioral data at each moment can correspond to the semantic features, ensuring the temporal consistency between the data.
[0087] Cognitive load calculation unit: It is used to evaluate the user's cognitive load according to the data after spatio-temporal alignment, apply the preset cognitive load calculation rules, and output a three-dimensional load index, including short-term memory stress value, logical reasoning intensity, and error correction ability saturation, for subsequent modules to distinguish the learning stage and extract cognitive adaptation resources.
[0088] The spatio-temporal alignment unit includes:
[0089] Extract timestamps: Extract the timestamps of each operation behavior from the behavioral time series dataset, and record the time information of each code modification, debugging trigger, and error correction operation of the user.
[0090] Extract time points: Extract the semantic feature time points corresponding to the behavioral time series dataset from the semantic quantization vector. This time point represents the calculation moment of the semantic quantization indicators (such as control flow depth, exception handling coverage rate, recursive call chain length).
[0091] Match timestamps with time points: Match the timestamps in the behavioral time series dataset 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 can correspond one by one to the semantic feature time points. The matching algorithm can be calculated by the following formula:
[0092] ΔT match =|T timestamp -T semantic_point |, where T timestamp is the timestamp of an operation in the behavioral time series dataset, and T semantic_pointis a certain time point in the semantic quantization vector, ΔT match is the time difference between the two, and the optimal matching is achieved by minimizing this time difference;
[0093] Interpolation adjustment: For time points that cannot be directly corresponding, interpolation methods (such as linear interpolation method) are used for adjustment to ensure that the behavioral time series data and the semantic quantization vector can be smoothly aligned in time; the interpolation formula is: where S aligned (t) is the aligned semantic feature value, S prev and S next are the semantic feature values of the adjacent time points before and after respectively, T prev and T next are the timestamps of the adjacent time points before and after, and t is the target time point; through the above steps, the spatio-temporal alignment unit can achieve the precise synchronization of the behavioral data and the semantic features, providing precise input data for the subsequent cognitive load calculation.
[0094] The cognitive load calculation unit includes:
[0095] Load calculation rule 1: Used to evaluate the cognitive load of the user during the memory operation in the programming process, especially the short-term memory load. Specifically, it is calculated by analyzing the code modification frequency in the behavioral time series dataset and the control flow depth in the semantic quantization vector. The formula is: P memory =α1·F modify +β1·D cf , where P memory is the short-term memory stress value, F modify is the code modification frequency, D cf is the control flow depth, and α1 and β1 are preset weight coefficients, indicating the influence degree of the two on the short-term memory stress;
[0096] Load calculation rule 2: Used to evaluate the cognitive load of the user during 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 length of the recursive call chain in the semantic quantization vector. The formula is:
[0097] P logic =α2·ΔT debug +β2·L recursion , where P logic is the logical reasoning intensity, ΔT debug is the debugging trigger interval, L recursion is the length of the recursive call chain, and α2 and β2 are preset weight coefficients, indicating the influence degree of the two on the logical reasoning intensity;
[0098] Load calculation rule 3: Used to evaluate the cognitive load of users when correcting errors during programming, especially the ability load during error identification and correction. Specifically, it is calculated by analyzing the error correction time in the behavioral time series dataset and the exception handling coverage rate in the semantic quantization vector. The formula is: P error = α3·T correction + β3·R exception , where P error is the saturation of error correction ability, T correction is the error correction time, R exception is the exception handling coverage rate, and α3 and β3 are preset weight coefficients, indicating the degree of their influence on the saturation of error correction ability;
[0099] Output three-dimensional load index: Integrate the calculated short-term memory stress value, logical reasoning intensity, and saturation of error correction ability to generate a three-dimensional load index P total , the formula is: P total = P memory + P logic + P error ; By applying the above load calculation rules, the cognitive load calculation unit can accurately evaluate the cognitive load of users during programming and generate a three-dimensional load index reflecting their short-term memory stress, logical reasoning intensity, and error correction ability, providing effective evaluation data support for subsequent modules.
[0100] The learning stage discrimination module includes a loading unit, a matching determination unit, and an output determination result unit; among them:
[0101] Loading unit: Used to load the cognitive development stage threshold library stored in the system. This threshold library contains the three-dimensional load index ranges 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 the short-term memory stress value, logical reasoning intensity, and saturation of error correction ability;
[0102] Matching determination unit: By comparing the three-dimensional load index with the threshold range in the preset cognitive development stage threshold library, judge the current cognitive load level of the user, and then determine the learning stage they are in;
[0103] Output determination result unit: Used to output the current learning stage of the user according to the matching result of the three-dimensional load index and the cognitive development stage threshold library. The determination result is the grammar sensitive period, logical construction period, or engineering optimization period, and provide this result to the subsequent cognitive adaptation resource extraction module for providing teaching resources targeted.
[0104] The rules for judging the current cognitive load level of the user include:
[0105] Determination Rule 1: When the short-term memory stress value in the three-dimensional load index is high, the logical reasoning intensity is low, and the error correction ability saturation is low, it indicates that the user is in the grammar sensitive period. The characteristics of this stage are that the user mainly focuses on learning the basic grammar and semantic rules of the language. The determination formula is: P memory >θ syntax_high and P logic <θ logic_low and P error <θ error_low , where θ syntax_high , θ logic_low and θ error_low are the thresholds of the grammar sensitive period respectively;
[0106] Determination 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 ability saturation is low, it indicates that the user is in the logical construction period. The determination 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 are the thresholds of the logical construction period respectively;
[0107] Determination Rule 3: When the short-term memory stress value in the three-dimensional load index is low, the logical reasoning intensity is moderate, and the error correction ability saturation is high, it indicates that the user is in the engineering optimization period. The determination formula is: P memory <θ syntax_low and P logic >θ logic_medium and P error >θ error_high , where θ syntax_low , θ logic_medium , θ error_high are the thresholds of the engineering optimization period respectively; Through the above steps, the learning stage discrimination module can accurately judge the current learning stage of the user and provide support for personalized teaching and cognitive load adaptation.
[0108] The cognitive adaptation resource module includes a stage resource matching unit, a resource extraction unit, and a resource recommendation unit; among them:
[0109] Stage Resource Matching Unit: It is used to match resources in the preset differentiated teaching resource pool according to the learning stage discrimination result. Specifically, in the grammar sensitive period, it matches resources related to the basic grammar, semantic understanding and preliminary debugging of programming languages; in the logic construction period, it matches resources related to programming logic, algorithm construction and complex debugging; in the engineering optimization period, it matches resources related to code optimization, performance improvement and engineering practice.
[0110] Resource Extraction Unit: It is used to extract resources matching the current learning stage from the differentiated teaching resource pool according to the matching result of the stage resource matching unit; this unit accurately extracts the corresponding code cases, debugging tool sets and knowledge point micro-lecture combinations from the preset resource library according to the matching rules; the extracted resources cover different programming knowledge fields and skill improvement requirements according to different learning stages.
[0111] The specific extraction method is as follows:
[0112] Code Case Extraction: Extract programming cases matching the current learning stage, these cases involve the basic grammar of programming languages, common programming logics, complex algorithm implementations, etc., and the extracted code cases help users understand the basic composition and application of programming languages and cultivate their programming thinking.
[0113] Debugging Tool Set Extraction: Extract debugging tool sets that meet the requirements of the current learning stage, for example, extract simple error prompt tools in the grammar sensitive period, extract more complex debugging tools in the logic construction period, extract performance optimization tools in the engineering optimization period, etc.
[0114] Knowledge Point Micro-lecture Combination Extraction: Extract micro-lecture content related to the current learning stage, and the micro-lecture content includes basic knowledge of programming languages, debugging skills, algorithm design and optimization, etc. The micro-lecture content in different stages combines with actual cases to help users learn effectively according to their cognitive load.
[0115] Resource Recommendation Unit: It is used to form a personalized learning path according to the extraction result and provide the matching teaching resources to the user in the form of recommendations, ensuring that the user obtains the most effective learning support at the appropriate stage; through the above steps, the cognitive adaptation resource module can accurately extract learning resources matching the user's current cognitive load from the differentiated teaching resource pool, thereby improving the user's learning efficiency and reducing the cognitive load.
[0116] As Figure 2 shown, a learning situation analysis method for online programming learning is implemented by the above-mentioned learning situation analysis system for online programming learning, including the following steps:
[0117] S1: Collect the operation behavior data of the user during the code editing process in real time, and generate a behavioral time series dataset including code modification frequency, debugging trigger interval, and error correction time consumption.
[0118] S2: Parse the code submitted by the user to generate an abstract syntax tree, and extract three semantic metrics: control flow depth, exception handling coverage rate, and recursive call chain length, to generate a semantic quantization vector.
[0119] S3: Align the timestamps in the behavioral time series dataset with the semantic feature time points in the semantic quantization vector in terms of time and space to ensure that the behavioral data and semantic features at each moment can correspond one by one.
[0120] S4: According to the data after time-space alignment, apply the preset cognitive load calculation rules to evaluate the user's cognitive load, and output a three-dimensional load index including short-term memory stress value, logical reasoning intensity, and error correction ability saturation.
[0121] S5: Match the three-dimensional load index with the preset cognitive development stage threshold library to determine the user's current learning stage as the grammar sensitive period, logical construction period, or engineering optimization period.
[0122] S6: According to the learning stage discrimination result, extract the code cases, debugging tool sets, and knowledge point micro-lesson combinations that match 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 the user's behavioral data with programming semantic analysis to achieve personalized recommendation of targeted learning resources, thereby optimizing the user's programming learning experience.
[0123] The present invention covers any alternatives, modifications, equivalent methods, and solutions made on the essence and scope of the present invention. In order to enable the public to have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, and those skilled in the art can fully understand the present invention without these detailed descriptions. In addition, in order to avoid unnecessary confusion to the essence of the present invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0124] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A learning situation analysis system for online programming learning, characterized in that: It includes programming behavior collection module, code semantic quantification module, cognitive load assessment module, learning stage identification module and cognitive adaptation resource library; among which: Programming behavior collection module: used to capture the user's operation behavior data in the code editing process in real time, and generate a behavior time series data set including code modification frequency, debugging trigger interval, and error correction time consumption; Code semantic quantification module: used to parse the abstract syntax tree of the user-submitted code, extract three indicators: control flow depth, exception handling coverage, and recursive call chain length, and generate semantic quantification vectors; Cognitive load assessment module: used to align the behavior time series data set with the semantic quantization vector in time and space, and output a three-dimensional load index including short-term memory pressure value, logical reasoning strength, and error correction ability saturation through the preset cognitive load calculation rules; Learning stage identification module: 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 sensitivity period, logic construction period or engineering optimization period; Cognitive adaptation resource module: Based on the judgment results of the learning stage judgment module, the module extracts code cases, debugging tool sets and knowledge point micro-course combinations that match the current stage from the preset differentiated teaching resource pool.
2. A learning situation 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 debugging trigger interval calculation unit, an error correction time calculation unit and a data summary unit; wherein: The operation data collection unit is used to monitor the user's operation behavior during the code editing process in real time, including keyboard input, mouse clicks and cursor movements, and record the time when the operation behavior occurs; A behavior time series generating unit: used for arranging the operation behaviors in chronological order and generating a behavior time series data set according to the operation behavior data recorded by the operation data collecting unit; Modification frequency calculation unit: used to analyze the code modification operations in the behavior time series data set, calculate the frequency of code modification by users within a certain time range, and generate code modification frequency data; Debug trigger interval calculation unit: used to analyze the debugging operations in the behavior time series data set, calculate the time interval between each debugging operation triggered by the user, and generate debugging trigger interval data; Error correction time calculation unit: used to analyze the error correction operations in the behavior time series data set, calculate the time it takes for the user to correct each error, and generate error correction time data; Data aggregation unit: used to aggregate the generated code modification frequency data, debug trigger interval data and error correction time-consuming data into a behavior timing data set.
3. A learning situation 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 the source code submitted by the user into an abstract syntax tree, identify the structural hierarchy of the code, including statements, expressions and control structures, by performing lexical analysis and syntax analysis on the source code, and generate an abstract syntax tree corresponding to the code structure; Control flow depth extraction unit: used to extract the control flow depth according to the control structure in the abstract syntax tree, and calculate the maximum depth of the control flow by analyzing the branches and loop nesting 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 potentially abnormal statements in the abstract syntax tree and counts the proportion of statements covered by the exception handling structure to the total 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 calling relationship of functions or methods; Semantic quantization vector generation unit: used to combine the three indicators of control flow depth, exception handling coverage, and recursive call chain length extracted above into a semantic quantization vector.
4. A learning situation 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 behavior time series data set with the semantic feature time points in the semantic quantization vector, and align the corresponding data in time, so that the behavior data at each moment can correspond to the semantic features, ensuring the temporal consistency between the data; Cognitive load calculation unit: It is used to evaluate the user's cognitive load based on the data after time and space alignment and apply the preset cognitive load calculation rules, and output a three-dimensional load index, including short-term memory pressure value, logical reasoning strength, and error correction ability saturation.
5. A learning situation analysis system for online programming learning according to claim 4, characterized in that: The spatiotemporal alignment unit comprises: Extract timestamps: Extract the timestamp of each operation behavior from the behavior time series dataset, and record the time information of each user's code modification, debugging trigger, and error correction operation; Extract time point: Extract the semantic feature time point corresponding to the behavior time series dataset from the semantic quantization vector. This time point represents the calculation moment of the semantic quantization index. Matching timestamps and time points: Use the time matching algorithm to match the timestamps in the behavior time series data set with the semantic feature time points in the semantic quantization vector to ensure that the behavior data at each moment corresponds to the semantic feature time points one by one. Interpolation adjustment: For time points that are not directly corresponding, interpolation methods are used to make adjustments to ensure that the behavior timing data and the semantic quantization vector can be smoothly aligned in time.
6. A learning situation analysis system for online programming learning according to claim 5, characterized in that: The cognitive load calculation unit comprises: Load calculation rule 1: It is used to evaluate the cognitive load of users when performing memory operations during programming, especially the short-term memory load. The formula is: P memory =α1·F modify +β1·D cf , where P memory is the short-term memory pressure value, F modify is the code modification frequency, α1 and β1 are the preset weight coefficients; Load calculation rule 2: used to evaluate the cognitive load of users when performing logical reasoning, especially the complexity of code logic analysis and structural reasoning. The formula is: P logic =α2·ΔT debug +β2·L recursion , where P logic is the strength of logical reasoning, ΔT debug For debugging trigger interval, L recursion is the length of the recursive call chain, α2 and β2 are the preset weight coefficients; Load calculation rule 3: It is used to evaluate the cognitive load of users when correcting errors during programming, especially the ability load when identifying and correcting errors. The formula is: P error =α3·T correction +β3·R exception , where P error is the error correction capability saturation, T correction It takes time to correct errors, R exception is the exception handling coverage, α3 and β3 are the preset weight coefficients; Output three-dimensional load index: Integrate the calculated short-term memory pressure value, logical reasoning strength and error correction ability saturation to generate a three-dimensional load index P total , the formula is: total =P memory +P logic +P error .
7. A learning situation analysis system for online programming learning according to claim 1, characterized in that: The learning stage determination module includes a loading unit, a matching determination unit and an output determination result unit; wherein: Loading unit: used to load the cognitive development stage threshold library stored in the system, which contains the three-dimensional load index range and its corresponding learning stage for distinguishing different learning stages. Each learning stage has a set of thresholds, including the upper and lower limits of short-term memory pressure value, logical reasoning strength and error correction ability saturation; Matching judgment unit: by comparing the three-dimensional load index with the threshold range in the preset cognitive development stage threshold library, the user's current cognitive load level is judged, and then the learning stage is determined; Output judgment result unit: used to output the user's current learning stage according to the matching result of the three-dimensional load index and the cognitive development stage threshold library, and the judgment result is the grammar sensitive period, logic construction period or engineering optimization period.
8. A learning situation 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 pressure 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_hight ,θ logic_low and θ error_low They are the thresholds of the grammatical sensitive period; Judgment rule 2: When the short-term memory pressure value in the three-dimensional load index is moderate, the logical reasoning strength is high, and the error correction ability saturation is low, it indicates that the user is in the logic construction period. The judgment formula is: θ syntax_low <P memory <θ syntax_high And P logic >θ logic_hight And P error <θ error_low , where θ syntax_low ,θ syntax_high ,θ logic_high ,θ error_low are the interval values during the logic construction period respectively; Judgment rule 3: When the short-term memory pressure value in the three-dimensional load index is low, the logical reasoning strength is moderate, and the error correction ability saturation is high, it indicates that the user is in the engineering optimization period. The judgment formula is: P memory <θ syntax_low And θ logic >θ logic_medium And P error >θ error_high , where θ syntax_low ,θ logic_medium ,θ error_high are the thresholds of the engineering optimization period respectively.
9. The learning situation 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: Stage resource matching unit: used to match the resources in the preset differentiated teaching resource pool according to the results of the learning stage. Specifically, in the grammar-sensitive period, it matches the resources related to the basic grammar, semantic understanding and preliminary debugging of the programming language; in the logic construction period, it matches the resources related to the program design logic, algorithm construction and complex debugging; in the engineering optimization period, it matches the resources related to code optimization, performance improvement and engineering practice; Resource extraction unit: used to extract resources matching the current learning stage from the differentiated teaching resource pool according to the matching results of the stage resource matching unit; Resource recommendation unit: used to form a personalized learning path based on the extraction results, and provide matching teaching resources to users in the form of recommendations.
10. A learning situation analysis method for online programming learning, implemented by a learning situation analysis system for online programming learning according to any one of claims 1 to 9, characterized in that: The following steps are involved: S1: Collect the user's operation behavior data in the code editing process in real time, and generate a behavior time series data set including code modification frequency, debugging trigger interval, and error correction time consumption; S2: Parse the code submitted by the user, generate an abstract syntax tree, extract three semantic indicators: control flow depth, exception handling coverage, and recursive call chain length, and generate a semantic quantization vector; S3: Perform spatiotemporal alignment based on the timestamps in the behavior time series dataset and the semantic feature time points in the semantic quantization vector to ensure that the behavior data and semantic features at each moment can correspond one to one; S4: Based on the data after time-space alignment, the preset cognitive load calculation rules are applied to evaluate the user's cognitive load, and a three-dimensional load index including short-term memory pressure value, logical reasoning strength, and error correction ability saturation is output; S5: According to the three-dimensional load index, the user's current learning stage is matched with the preset cognitive development stage threshold library to determine whether it is a grammar sensitive period, a logic construction period, or an engineering optimization period; S6: According to the learning stage judgment results, extract the code cases, debugging tool sets and knowledge point micro-course combinations that match the current learning stage from the differentiated teaching resource pool, and recommend them to users for learning.
Citation Information
Patent Citations
Teaching scheme recommendation method and device based on student behavior analysis
CN116701774A
Individualized exercise recommendation method based on online learning behavior analysis of learner
CN117668360A
Intelligent language education system and method
CN118135851A
Course teaching resource recommendation system and method based on big data
CN119149814A
Cognitive assessment based recommendations
US20200167670A1
Cited By
Language learning dynamic resource configuration and interaction system based on Internet platform
CN120928957A
Dynamic resource configuration and interaction system for language learning based on internet platform
CN120928957B