An AI-based online teaching management method and system
By enhancing and extracting features from the image dataset, and utilizing an improved YOLOv7 model and conditional generative adversarial networks, the problem of feature extraction failure caused by low camera resolution was solved, enabling real-time and accurate recognition of user learning status and improving the recognition success rate of online teaching management.
Patent Information
- Application Number
- CN202510938755.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-07-08
AI Technical Summary
The low resolution of images captured by existing cameras leads to a high failure rate in facial feature extraction, making it impossible to accurately identify the user's learning status and thus hindering effective online teaching management.
By acquiring image datasets from target users, the images are enhanced, 3D models are constructed, and features are extracted. An improved YOLOv7 model and a conditional generative adversarial network are used to optimize image features, and a state recognition model is combined to provide early warnings.
It enables real-time and accurate identification of users' learning status, improves the success rate of identification, and can dynamically adjust the collection frequency to ensure data richness and system resource utilization, thereby enhancing the effectiveness of online teaching management.
Smart Images

Figure CN120599684B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of teaching management technology, specifically relating to an AI-based online teaching management method and system. Background Technology
[0002] With the rapid advancement of internet technology, the continuous emergence of new technologies such as 5G and artificial intelligence, the acceleration of social knowledge updates, the popularization of the concept of lifelong learning, and the growing demand for convenient and personalized education, people have laid a solid technological foundation for the development of online teaching technology.
[0003] Patent No. CN115936944A discloses a virtual teaching management method and device based on artificial intelligence. It rationally utilizes and integrates different dimensions of characteristics from both teachers and students in the classroom to achieve more accurate emotion recognition results than using a single feature. Simultaneously, it takes corresponding measures for teaching management based on the warning level corresponding to the classroom atmosphere evaluation value. This not only effectively promotes student learning and helps teachers reflect on their teaching, but also allows for continuous optimization of teaching plans by analyzing the characteristics of the video itself. Furthermore, it provides a solid foundation of data support for improving teaching quality and determining the direction of educational reform.
[0004] The low resolution of images captured by existing cameras leads to a high failure rate in facial feature extraction, making it impossible to accurately identify the user's learning status and thus hindering effective online teaching management. Summary of the Invention
[0005] The purpose of this invention is to solve the problem that existing cameras capture images with low resolution, resulting in a high failure rate in facial feature extraction and an inability to accurately identify the user's learning status, thus hindering effective online teaching management. The invention proposes an AI-based online teaching management method and system.
[0006] In a first aspect of this invention, an AI-based online teaching management method is proposed, the method comprising:
[0007] A target image set is obtained by acquiring an image dataset of the target user and enhancing the images in the image dataset to obtain a target image set; the target image set contains multiple target images.
[0008] Structural features are obtained by constructing three dimensions from the target images in the target image set, and feature groups are obtained by extracting features from the target images in the target image set; the feature groups include: global features and local features.
[0009] The feature group and the structural features are input into the state recognition model to obtain a state score, and the target user is given an early warning based on the state score.
[0010] Optionally, the images in the image dataset are enhanced to obtain the target image set, including:
[0011] Pixel recognition is performed on each image in the image dataset to obtain a blurred pixel set. Then, a CNN is used to deblur each blurred pixel image in the blurred pixel set to obtain a deblurred image set.
[0012] The noise pixels in the target deblurred image are identified, and an image matrix is calculated based on the noise pixels. The image matrix and the target deblurred image are then input into a neural blurring system to obtain a noise-enhanced image. The noise-enhanced image is an image containing the locations of the noise pixels. The target deblurred image is any one of the blurred images in the set.
[0013] The noise-enhanced image is optimized using a conditional generative adversarial network to obtain a detail-enhanced image. The detail-enhanced image and the noise-enhanced image are then fused to obtain a target image. Finally, the target images corresponding to each deblurred image in the deblurred image set are combined to form a target image set.
[0014] Optionally, before deblurring each blurred pixel image in the blurred pixel image set by fusing CNN to obtain a deblurred image set, the parameter optimization method of the fused CNN includes:
[0015] Step 1: Initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution;
[0016] Step 2: Generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance between each initial solution and the candidate optimal solution, sort the initial solutions in descending order according to the Euclidean distance, and filter the initial solutions according to preset rules to obtain the tracking set and the escape set;
[0017] Step 3: Update the initial solution in the escape set using the random offset escape formula to obtain the suboptimal solution. Calculate the fitness of each suboptimal solution and compare the fitness of the initial solution with that of the corresponding suboptimal solution. If the fitness of the initial solution is greater than that of the corresponding suboptimal solution, replace the initial solution with the corresponding suboptimal solution; otherwise, retain the initial solution.
[0018] Step 4: Determine the optimal solution in the current population based on the fitness value. Repeat steps 2 and 3 until the maximum number of iterations is reached, or the fitness converges, then output the optimal solution.
[0019] Optionally, feature extraction is performed on the target images in the target image set to obtain a feature group, including:
[0020] Feature groups are obtained by extracting features from the target images in the target image set using the target YOLOv7 model.
[0021] The improvements to the target YOLOv7 include:
[0022] The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure; the backbone network and the neck structure are components of the YOLOv7-tiny model.
[0023] The working principle of the separated Conv module includes:
[0024] An initial feature tensor is obtained, and the initial feature tensor is sequentially input into a batch normalization layer and a SiLU activation function to obtain a first feature tensor. The initial feature tensor is input into a depthwise separable convolutional layer to obtain a second feature tensor. The initial feature tensor, the first feature tensor, and the second feature tensor are multiplied together to obtain a third feature tensor. The third feature tensor is used as the output of the separation Conv module.
[0025] The working principle of the target CBL module includes:
[0026] An initial feature map is obtained, and the initial feature map is decomposed into multiple blocks according to a preset size. The blocks are then stitched together according to the number of channels in each block to obtain an intermediate feature map. The intermediate feature map is then input into a 1×1 Conv module to obtain an output feature map, which is then used as the output of the target CBL module.
[0027] Optionally, feature extraction is performed on the target images in the target image set to obtain feature groups. The working principle of the MDA module includes:
[0028] Obtain the target feature map, and input the target feature map into a 1×1 Conv module and a fully connected layer in sequence to obtain Query, Key and Value. Input the Query and the Key into the separate Conv module to obtain the target Query and the target Key. Perform matrix multiplication on the target Query and the target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix.
[0029] The Value is sequentially input into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied by the target Value to obtain the fused feature map.
[0030] In a second aspect of this invention, an AI-based online teaching management system is proposed, comprising: an image enhancement module, a feature extraction module, and a teaching management module.
[0031] The image enhancement module is used to acquire an image dataset of the target user, and enhance the images in the image dataset to obtain a target image set; the target image set contains multiple target images;
[0032] The feature extraction module is used to perform 3D construction to obtain structural features based on the target images in the target image set, and to extract features from the target images in the target image set to obtain feature groups; the feature groups include: global features and local features;
[0033] The teaching management module is used to input the feature group and the structural features into the state recognition model to obtain a state score, and to issue a warning to the target user based on the state score.
[0034] Optionally, the image enhancement module further includes: a deblurring module, a noise enhancement module, and a feature fusion module.
[0035] The deblurring module is used to perform pixel recognition on each image in the image dataset to obtain a blurred pixel map set, and to deblur each blurred pixel map in the blurred pixel map set by fusing CNN to obtain a deblurred image set.
[0036] The noise enhancement module is used to determine the noise pixels in the target deblurred image, calculate an image matrix based on the noise pixels, and input the image matrix and the target deblurred image into the neural blurring system to obtain a noise-enhanced image; the noise-enhanced image is an image containing the locations of the noise pixels; the target deblurred image is any one of the blurred images in the set;
[0037] The feature fusion module is used to optimize the noise-enhanced image through a conditional generative adversarial network to obtain a detail-enhanced image, fuse the detail-enhanced image and the noise-enhanced image to obtain a target image, and form a target image set by combining the target images corresponding to each deblurred image in the deblurred image set.
[0038] Optionally, the system further includes:
[0039] The first operation module is used to initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution;
[0040] The second operation module is used to generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance between each initial solution and the candidate optimal solution, sort each initial solution in descending order according to the Euclidean distance, and filter each initial solution according to preset rules to obtain the tracking set and the escape set.
[0041] The third operation module is used to update the initial solution in the escape set to obtain a suboptimal solution through the random offset escape formula, calculate the fitness of each suboptimal solution, compare the fitness of the initial solution with the fitness of the corresponding suboptimal solution, and replace the initial solution with the corresponding suboptimal solution if the fitness of the initial solution is greater than the fitness of the corresponding suboptimal solution; otherwise, the initial solution is retained.
[0042] The fourth operation module is used to determine the optimal solution in the current population based on the fitness value, and repeatedly execute the second and third operation modules until the maximum number of iterations is reached, or the fitness converges, and then output the optimal solution.
[0043] Optionally, it is also used to extract features from the target images in the target image set using the target YOLOv7 model to obtain feature groups;
[0044] The improvements to the target YOLOv7 include:
[0045] The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure; the backbone network and the neck structure are components of the YOLOv7-tiny model.
[0046] The working principle of the separated Conv module includes:
[0047] An initial feature tensor is obtained, and the initial feature tensor is sequentially input into a batch normalization layer and a SiLU activation function to obtain a first feature tensor. The initial feature tensor is input into a depthwise separable convolutional layer to obtain a second feature tensor. The initial feature tensor, the first feature tensor, and the second feature tensor are multiplied together to obtain a third feature tensor. The third feature tensor is used as the output of the separation Conv module.
[0048] The working principle of the target CBL module includes:
[0049] An initial feature map is obtained, and the initial feature map is decomposed into multiple blocks according to a preset size. The blocks are then stitched together according to the number of channels in each block to obtain an intermediate feature map. The intermediate feature map is then input into a 1×1 Conv module to obtain an output feature map, which is then used as the output of the target CBL module.
[0050] Optionally, the working principle of the MDA module includes:
[0051] Obtain the target feature map, and input the target feature map into a 1×1 Conv module and a fully connected layer in sequence to obtain Query, Key and Value. Input the Query and the Key into the separate Conv module to obtain the target Query and the target Key. Perform matrix multiplication on the target Query and the target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix.
[0052] The Value is sequentially input into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied by the target Value to obtain the fused feature map.
[0053] The beneficial effects of this invention are:
[0054] This invention proposes an AI-based online teaching management method. It acquires an image dataset of the target user, enhances the images in the dataset to obtain a target image set, which contains multiple target images. Based on the target images in the target image set, a 3D model is constructed to obtain structural features. Feature extraction is then performed on the target images in the target image set to obtain feature groups, including global and local features. The feature groups and structural features are input into a state recognition model to obtain a state score. Based on the state score, warnings are issued to the target user. By acquiring and enhancing images, structural features of facial movement and global and local features can be accurately extracted. Inputting these features into the state recognition model enables real-time and accurate identification of the user's learning state, improving the recognition success rate. Attached Figure Description
[0055] The invention will now be further described with reference to the accompanying drawings.
[0056] Figure 1 A flowchart illustrating an AI-based online teaching management method provided in an embodiment of the present invention;
[0057] Figure 2 A schematic diagram illustrating the structure of an AI-based online teaching management method provided in an embodiment of the present invention;
[0058] Figure 3 This is a framework diagram of an AI-based online teaching management system provided for an embodiment of the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and B can represent: A alone, A and B simultaneously, and B alone. Furthermore, descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" can explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0060] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] This invention provides an AI-based online teaching management method. See also... Figure 1 , Figure 1 A flowchart illustrating an AI-based online teaching management method provided in this embodiment of the invention. The method includes the following steps:
[0062] S101, Obtain the image dataset of the target user, and enhance the images in the image dataset to obtain the target image set;
[0063] S102, construct the structural features in three dimensions based on the target images in the target image set, and extract the features from the target images in the target image set to obtain feature groups;
[0064] S103, input the feature group and structural features into the state recognition model to obtain the state score, and issue a warning to the target user based on the state score.
[0065] The target image set contains multiple target images; the feature set includes global features and local features;
[0066] Based on the AI-based online teaching management method provided in this invention, by acquiring and enhancing images, the structural features and global and local features of facial movement can be accurately extracted and input into a state recognition model, which can identify the user's learning status in real time and accurately, thereby improving the recognition success rate.
[0067] In one implementation, when a user uses an electronic device (e.g., a tablet, mobile phone, or laptop) for online learning, the user's state is captured through the device's camera. The acquired data is processed locally to evaluate the user's learning state (using a state recognition model) and obtain a state score. This state score is then uploaded to the cloud, where it provides alerts based on the state score, such as voice prompts or text warnings. The criteria for issuing alerts to target users based on state scores are as follows: the image dataset contains multiple images, resulting in multiple feature groups and structural features. These feature groups and structural features are input into the state recognition model to obtain multiple state scores. When a preset number of state scores exceed a preset threshold, an alert is issued.
[0068] In one implementation, images of the target user are acquired, with the acquisition frequency set to 10 to 30 frames per second. Dynamically setting the frequency range ensures both data richness and efficient use of system resources. If the acquisition frequency is too low, the data will lack real-time performance, while too high a frequency will increase the burden on data processing.
[0069] In one implementation, structural features refer to lines used to characterize the movement state of the face. These lines include, but are not limited to, the contour lines of the eyebrows, the curvature lines of the corners of the mouth, and the opening and closing contour lines of the eyes. These lines exhibit dynamic changes during facial movement, intuitively reflecting the facial movement state. For example, when a person smiles, the curvature line of the corners of the mouth changes from a straight state to an upward-curving arc; while when frowning, the contour lines of the eyebrows become tighter and move closer to the center. By extracting and analyzing these lines, three-dimensional structural features of the face under different expressions and movements can be constructed, providing important geometric morphological basis for subsequent state recognition and helping the model to more accurately understand the movement patterns and state changes of the face.
[0070] In one implementation, structural features can be extracted using a deep learning model to extract two-dimensional / three-dimensional key points, constructing contour lines for areas such as eyebrows, eyes, and corners of the mouth. Temporal analysis of the key point coordinates in consecutive frames is then performed to calculate the motion parameters (displacement, velocity, curvature changes) of the lines.
[0071] In one implementation, the feature set encompasses both global and local facial features. Global features primarily focus on macroscopic information such as the overall shape, size, and general facial expression tendency of the face. For example, the overall contour shape of the face, the width-to-width ratio, and whether the overall expression leans towards happiness, sadness, or anger provide a general direction and background information for state recognition. Local features, on the other hand, focus on specific areas of the face, such as detailed features of the eye area (e.g., changes in pupil size and eyelid opening), features of the nose area (e.g., the degree of nasal flare), and features of the mouth area (e.g., changes in lip thickness and the degree of tooth exposure). These local features can capture more subtle changes in expression and movement details. Combined with global features, they can more comprehensively and accurately describe the state of the face, providing rich feature information for the state recognition model, thereby improving the accuracy and reliability of state recognition.
[0072] In one implementation, the state recognition model can be a convolutional neural network (CNN), a long short-term memory network (LSTM), etc.; the training data of the model includes: manually labeled scoring sheets (where experts classify the user's state in the image / video, such as "focused", "mildly distracted", "severely fatigued" and get a score of 100), historical image data and historical structural data.
[0073] In one embodiment, enhancing images in an image dataset to obtain a target image set includes:
[0074] Pixel recognition is performed on each image in the image dataset to obtain a blurred pixel map set. Then, CNN is used to deblur each blurred pixel map in the blurred pixel map set to obtain a deblurred image set.
[0075] The noise pixels in the target deblurred image are identified, and an image matrix is calculated based on the noise pixels. The image matrix and the target deblurred image are then input into a neural blurring system to obtain a noise-enhanced image. The noise-enhanced image is an image containing the locations of the noise pixels, and the target deblurred image is any one of the blurred images in the set.
[0076] A conditional generative adversarial network is used to optimize the noisy enhancement image to obtain a detail enhancement image. The detail enhancement image and the noisy enhancement image are then fused to obtain the target image. The target images corresponding to each deblurred image in the deblurred image set are combined to form a target image set.
[0077] In one implementation, a deep residual network (DRN) is used to process the region surrounding the image to detect complex noise pixels, thereby identifying blurred and non-blurred pixels in the image. Here, a blurred pixel does not refer to a single pixel being "blurred" in itself, but rather to a pixel value deviating from the ideal imaging result, causing its grayscale transition with neighboring pixels to become smooth and edge information to be lost. In ideal imaging, sharp pixels should exhibit steep grayscale abrupt changes at edges (such as a change from black to white), while the grayscale changes of blurred pixels are exhibited as gentle transitions (such as gradual changes), quantized by the pixel's gradient value or the variance of its neighborhood grayscale.
[0078] In one implementation, a deblurred image set is obtained by fusing CNNs to deblur the blurred pixel images in the blurred pixel image set. The blurred images are then input into the CNN encoder, which extracts multi-scale features (from edges and textures to global structure) through multiple convolutions. Skip connections or cross-layer fusion are used to preserve shallow details. The decoder restores resolution through deconvolution upsampling and focuses on key regions using attention mechanisms (such as channel / spatial attention) to suppress redundant information caused by blurring. The network learns a non-linear mapping from blurred to sharp images by minimizing pixel loss (MSE), perceptual loss (VGG feature similarity), and adversarial loss (GAN distinguishing between real and sharp images), which is the deconvolution process. Through training with a large number of blurred-sharp image pairs, the CNN implicitly models the point spread function (PSF) and noise distribution, directly predicting high-frequency details (such as edge sharpness and texture contrast) of the sharp image.
[0079] In one implementation, the neurofuzzy system integrates the explicit knowledge representation of the fuzzy reasoning system and the learning ability of the artificial neural network. The image matrix and the deblurred image of the target are used as inputs to the neurofuzzy system, and a new image matrix is generated by using the nearest neighbors of the noisy pixels.
[0080] Image matrix calculation formula:
[0081]
[0082] Among them, X p X represents the original image matrix. pAB This represents the generated new image matrix, AB indicates that the operation applies to all blurred pixels in the image, q and v represent the coordinates of the target pixel, and r and n represent the summation indices. 1 / 9 represents the summation of neighboring pixels, and 1 / 9 represents the calculation of the mean.
[0083] X p X represents the original image matrix, and X represents the input noisy image, where each element X p (q,v) represents the pixel value at coordinates (q,v); X pABThe generated new image matrix is obtained by weighting the nearest neighbor pixels of the noisy pixels in the original image and is used for subsequent neural blurring processing; AB is a subscript suffix indicating that the operation applies to all blurred pixels in the image; (q,v) represents the coordinates of the target pixel, and represents the coordinates of the new matrix X. p The row and column indices of the pixel to be calculated; (r,n) represents the summation index, used to traverse the neighborhood range of the target pixel in the original image, which is to traverse the 3×3 neighborhood of the target pixel (i.e., r,n∈{-1,0,1}). The summation of neighboring pixels represents the summation of the gray values of the target pixel (q,v) and its 8 neighboring pixels (top, bottom, left, right, and diagonal); 1 / 9 is the mean calculation, which is the average of the summation of the gray values of the 9 neighboring pixels, and is used as the pixel value at (q,v) in the new matrix to achieve smoothing of noise.
[0084] In one implementation, the conditional generative adversarial network comprises a generator network and a discriminator network, with the most important network used to enhance contrast. The generator network produces optimal enhancement results when supported by the discriminator network. During training, the generator network is trained to deceive the discriminator network, preventing it from distinguishing between the enhanced output and the labeled image.
[0085] In one implementation, a sub-network is generated: Image enhancement requires a model that can produce improved results in various applications and network performance. The Tanh activation function is used to restore the cascaded features to the original resolution through deconvolutional layers. The generated network is as follows: GU-GSU-GSU-ρ-Tanh; where G represents a convolutional layer, U represents ReLU, s represents a batch normalization layer, ρ represents a deconvolutional layer, and Tanh represents the hyperbolic tangent activation function.
[0086] G: Convolutional Layer, extracts local image features (such as edges and textures) using convolutional kernels of different sizes; U: ReLU activation function (Rectified Linear Unit), introduces non-linear mapping capability to the network, enhancing feature representation (output is max(0,x)); S: Batch Normalization layer, standardizes each batch of input data, stabilizing the training process and accelerating convergence; ρ: Deconvolution Layer, achieves upsampling through transposed convolution operation, restoring image resolution (mapping low-dimensional features to high-dimensional space); Tanh: Hyperbolic Tangent activation function, compresses the output value to the [-1,1] interval, adapting to the grayscale range of image pixels.
[0087] In one implementation, a discriminative subnetwork is defined as follows: The goal of the discriminative network is to identify labeled images from the augmented results that help the generative subnetwork produce foreground results. The structure of the discriminative network is as follows: Where G represents a convolutional layer, denoted by LeakyReLU activation function, S represents batch normalization layer, and ω represents output layer;
[0088] G: Convolutional layer, similar to the generative subnetwork, but with a greater focus on extracting discriminative features of the image (such as real / fake texture differences); The LeakyReLU activation function is a variant of ReLU that allows negative inputs to have small slopes (such as 0.2), solving the problem of neuron "death"; S: batch normalization layer, as above, stabilizes the feature distribution of the discriminator; The output layer, typically a sigmoid activation function, outputs probability values between 0 and 1 (1 represents "real image", 0 represents "generated image").
[0089] In one implementation, the weights and parameters of the conditional generative adversarial network are optimized using the FJBA algorithm, with mean squared error as the metric. As the fitness function (where MSE fit Represents the fitness function. ξj represents the expected output, P represents the sum of the data, and the process iteratively optimizes until the termination condition is met, thereby improving the image enhancement capabilities of the generative adversarial network.
[0090] FJBA stands for Fractional Jaya Bat Algorithm, a hybrid optimization algorithm formed by the fusion of two basic algorithms: JBA (Jaya Bat Algorithm): a hybrid of the Jaya algorithm (JOA) and the Bat Algorithm (BA); and FC (Fractional Calculus): fractional calculus theory, used to enhance the algorithm's global search capability and convergence accuracy.
[0091] By optimizing the weights of the conditional generative adversarial network for image enhancement and leveraging the global optimization capability of the algorithm through non-integer order differential operators, the model convergence is accelerated and the quality of image detail restoration is improved. Ultimately, the PSNR, SSIM, and other indicators of image restoration are significantly improved, effectively solving the efficiency and accuracy bottlenecks of traditional algorithms in blurry pixel recognition and image enhancement.
[0092] In one embodiment, before deblurring each blurred pixel image in the blurred pixel image set by fusing CNN to obtain a deblurred image set, the parameter optimization method of fusing CNN includes:
[0093] Step 1: Initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution;
[0094] Step 2: Generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance between each initial solution and the candidate optimal solution, sort the initial solutions in descending order according to the Euclidean distance, and filter the initial solutions according to preset rules to obtain the tracking set and the escape set;
[0095] Step 3: Update the initial solution in the escape set using the random offset escape formula to obtain the suboptimal solution. Calculate the fitness of each suboptimal solution and compare the fitness of the initial solution with that of the corresponding suboptimal solution. If the fitness of the initial solution is greater than that of the corresponding suboptimal solution, replace the initial solution with the corresponding suboptimal solution; otherwise, retain the initial solution.
[0096] Step 4: Determine the optimal solution in the current population based on the fitness value. Repeat steps 2 and 3 until the maximum number of iterations is reached, or the fitness converges, then output the optimal solution.
[0097] In one implementation, the parameter optimization method for fused CNNs is achieved through metaheuristic algorithms. By adjusting the learnable weights / biases and hyperparameter configurations, the network can achieve end-to-end optimization of "feature extraction-representation-recovery" in the deblurring task. For example, optimizing the convolutional kernel weights through the PSO (Particle Swarm Optimization) algorithm can specifically enhance the recognition of blurred patterns, and adjusting the learning rate can balance convergence speed and accuracy, ultimately improving the structural realism and detail integrity of the deblurred image.
[0098] In one implementation, the optimization direction is determined by calculating the fitness of each solution in the initial solution set and selecting the maximum value as the current optimal solution. This enables the algorithm to quickly locate a better solution in the initial stage, laying the foundation for subsequent iterations and ensuring that the algorithm can develop in the direction of improving solution quality. This avoids blind searching and improves optimization efficiency.
[0099] In one implementation, candidate optimal solutions are generated by randomly perturbing the current optimal solution, w new =w best +rand*(α-β*w best ), where w new For the candidate optimal solution, w best Let α be the current optimal solution, β be the global optimal eigenvector, β be the scaling factor, and rand be a random number between (0,1). New solutions are introduced through random perturbation, balancing the algorithm's exploration (exploring new solution spaces) and exploitation (utilizing known optimal solutions) capabilities. Simultaneously, the Euclidean distance between the initial solution and candidate optimal solutions is calculated and sorted, further enhancing the algorithm's ability to track high-quality solutions. This allows the algorithm to gradually approach the global optimum while maintaining population diversity.
[0100] In one implementation, for each initial solution, its Euclidean distance to the optimal solution is calculated:
[0101]
[0102] Where D is the Euclidean distance, w i Let w be any initial solution. new Here, m represents the number of candidate optimal solutions.
[0103] In one implementation, a suboptimal solution is obtained by updating the initial solution in the escape set using a random offset escape formula;
[0104] Random offset escape formula:
[0105]
[0106] in, For the suboptimal solution, P loc The position of the candidate optimal solution, A is the balance parameter, iter now iter is the current iteration number. max The maximum number of iterations is given by w, where rand is a random number within the interval (0,1). i For any initial solution, there is a one-to-one correspondence between the initial solution and the suboptimal solution;
[0107] The balance parameter is a constant used to control the escape amplitude, typically ranging from 0.5 to 1.0; `rand` is a random number within the interval (0,1), introducing directional randomness. The introduction of the balance parameter `A` and the random number `rand` allows the algorithm to dynamically adjust the escape amplitude and direction during iteration, preventing the algorithm from getting trapped in local optima. As the number of iterations increases, the escape amplitude gradually decreases, allowing the algorithm to fully explore the solution space in the early stages and stably converge to the global optimum in the later stages. This adaptive escape mechanism enhances the algorithm's global search capability and also improves its robustness and optimization accuracy.
[0108] In one implementation, a preset maximum number of iterations (e.g., 200) is reached. If the change in fitness of the optimal solution is less than a threshold in T consecutive iterations, the fitness is considered to have converged. Setting the maximum number of iterations and the fitness convergence condition as the algorithm's termination conditions allows for precise control of the algorithm's execution. The maximum number of iterations provides a time constraint, preventing the algorithm from running for an extended period without convergence. The fitness convergence condition, from the perspective of solution quality, determines that the algorithm has found a stable optimal solution when the change in fitness of the optimal solution is less than a threshold in multiple consecutive iterations, thus terminating the iteration. This ensures that the algorithm can find a high-quality solution within a finite time, avoiding excessive iteration, improving algorithm efficiency, and reducing resource consumption.
[0109] In one embodiment, feature extraction is performed on target images in a target image set to obtain a feature group, including:
[0110] Feature groups are obtained by extracting features from target images in the target image set using the target YOLOv7 model;
[0111] The improvements targeted at YOLOv7 include:
[0112] The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure. The backbone network and neck structure are the components of the YOLOv7-tiny model.
[0113] The working principle of separating the Conv module includes:
[0114] Obtain the initial feature tensor, input the initial feature tensor sequentially into the batch normalization layer and the SiLU activation function to obtain the first feature tensor, input the initial feature tensor into the depthwise separable convolutional layer to obtain the second feature tensor, multiply the initial feature tensor, the first feature tensor and the second feature tensor to obtain the third feature tensor, and use the third feature tensor as the output of the separation Conv module;
[0115] The working principle of the target CBL module includes:
[0116] Obtain the initial feature map, decompose the initial feature map into multiple blocks according to the preset size, and stitch them together according to the number of channels in each block to obtain the intermediate feature map. Input the intermediate feature map into the 1×1 Conv module to obtain the output feature map, and use the output feature map as the output of the target CBL module.
[0117] In one implementation, see [link to implementation details]. Figure 2 , Figure 2 A schematic diagram of an AI-based online teaching management method provided in an embodiment of the present invention; working principle of the neck structure:
[0118] The outputs of the first CBL module and the first MDA module are concatenated to obtain the first output. The first output is then sequentially input into the second CBL module and the third CBL module to obtain the second output. The second output is then upsampled and concatenated with the output of the second MDA module to obtain the third output. The third output is then sequentially input into the first ELAN module and the fourth CBL module to obtain the fourth output. The fourth output is then upsampled and concatenated with the output of the third MDA module to obtain the fifth output. The fifth output is then passed through the fourth ELAN module and used as the output of the neck structure (first).
[0119] The fifth output and the fourth output are input into the sixth CBL module to obtain the sixth output. The sixth output and the fourth output are concatenated to obtain the target sixth output. The target sixth output and the output of the first ELAN module are input into the third ELAN module to obtain the seventh output. The seventh output is used as the output of the neck structure (second).
[0120] The seventh output and the second output are input into the fifth CBL module to obtain the eighth output. The eighth output and the second output are concatenated to obtain the ninth output. The ninth output is then passed through the second ELAN module and the CBL module in sequence as the output of the neck structure (third).
[0121] The labels for each module are used only for differentiation (e.g., "first" and "second" in "first CBL module" and "second CBL module").
[0122] In one implementation, the Separate Conv module inputs the initial feature tensor into a batch normalization layer, a SiLU activation function, and a depthwise separable convolutional layer respectively, obtaining feature tensors for different processing paths. These feature tensors are then multiplied to obtain the final output. By leveraging the normalization and non-linear enhancement effects of batch normalization and activation functions on the features, and utilizing the efficient computational characteristics of depthwise separable convolution, the computational load and number of parameters are reduced. Furthermore, the feature tensor multiplication operation further integrates feature information from different paths, enhancing the expressive power of the features. This allows the model to maintain high computational efficiency while reducing the number of parameters, lowering the computational burden and storage requirements of the model, and improving its operational efficiency.
[0123] In one implementation, the target CBL module decomposes the initial feature map into multiple blocks, concatenates them according to the number of channels in each block, and then processes them through a 1×1 convolution module to obtain the output feature map. This process achieves recombination and optimization of the feature map in both spatial and channel dimensions. Through decomposition and concatenation operations, local feature information can be captured, and the concatenated features are further fused and compressed by the 1×1 convolution module, making the channel information of the feature map more compact and having stronger semantic expressive power. This helps improve the model's accuracy in extracting target features, enhances the model's ability to detect targets of different scales and shapes, and thus improves the overall accuracy and robustness of target detection.
[0124] In one embodiment, feature groups are obtained by extracting features from target images in a target image set. The working principle of the MDA module includes:
[0125] Obtain the target feature map, and input the target feature map into the 1×1 Conv module and the fully connected layer in sequence to obtain Query, Key and Value. Input the Query and Key into the separate Conv module to obtain the target Query and target Key. Perform matrix multiplication on the target Query and target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix.
[0126] The Value is sequentially fed into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied with the target Value to obtain the fused feature map.
[0127] In one implementation, the target feature map is sequentially input into a 1×1 Conv module and a fully connected layer to obtain Query(Q), Key(K), and Value(V). This enables the generation of different feature components from a single input data, reducing the limitation of shared input for Q, K, and V in traditional self-attention mechanisms. This allows the model to process these features independently, achieving data parallel decoupling. This decoupling method improves the model's flexibility, allowing each feature component to be transformed in an independent linear layer, thus enhancing the model's ability to express different features.
[0128] In one implementation, the Query and Key are input into the separable Conv module to obtain the target Query and target Key. A similarity matrix is then obtained through matrix multiplication, followed by a Softmax function to obtain the attention weight matrix. The introduction of the separable Conv module further enhances the feature fusion and extraction capabilities. Depthwise separable convolution reduces the number of parameters and computational complexity while maintaining feature independence and interpretability. The use of the Softmax function ensures the normalization of attention weights, enabling the model to more effectively aggregate features and improving the accuracy and robustness of feature fusion.
[0129] In one implementation, the Value is sequentially input into a fully connected layer and a separate Conv module to obtain the target Value. Then, the attention weight matrix is multiplied by the target Value to obtain a fused feature map. This process, through independent decoupling operations and feature enhancement mechanisms, ensures that the feature representation of the Value is richer and more accurate. The final fused feature map integrates the feature information of the Query, Key, and Value. Guided by the attention mechanism, it achieves accurate extraction and fusion of target features, improving the model's ability to recognize target features and its overall performance.
[0130] Based on the same inventive concept, this invention also provides an AI-based online teaching management system. See also Figure 3 , Figure 3A framework diagram of an AI-based online teaching management system provided in this embodiment of the invention includes: an image enhancement module, a feature extraction module, and a teaching management module.
[0131] The image enhancement module is used to acquire the target user's image dataset, enhance the images in the image dataset to obtain the target image set; the target image set contains multiple target images.
[0132] The feature extraction module is used to construct 3D structures from target images in the target image set to obtain structural features, and to extract feature groups from the target images in the target image set; the feature groups include: global features and local features;
[0133] The teaching management module is used to input feature groups and structural features into the state recognition model to obtain a state score, and to issue warnings to target users based on the state score.
[0134] Based on the AI-based online teaching management system provided in this embodiment of the invention, by acquiring and enhancing images, the system can accurately extract the structural features and global and local features of facial movements, and input them into a state recognition model, which can identify the user's learning state in real time and accurately, thereby improving the recognition success rate.
[0135] In one embodiment, the image enhancement module further includes: a deblurring module, a noise enhancement module, and a feature fusion module.
[0136] The deblurring module is used to perform pixel recognition on each image in the image dataset to obtain a blurred pixel map set. By fusing CNN, the blurred pixel map in the blurred pixel map set is deblurred to obtain a deblurred image set.
[0137] The noise enhancement module is used to determine the noise pixels in the target deblurred image, calculate an image matrix based on the noise pixels, and input the image matrix and the target deblurred image into the neural blurring system to obtain the noise enhancement image; the noise enhancement image is an image containing the locations of the noise pixels; the target deblurred image is any one of the blurred images in the set;
[0138] The feature fusion module is used to optimize the noisy enhancement image through a conditional generative adversarial network to obtain a detail enhancement image, fuse the detail enhancement image and the noisy enhancement image to obtain the target image, and combine the target images corresponding to each deblurred image in the deblurred image set to form a target image set.
[0139] In one embodiment, the system further includes:
[0140] The first operation module is used to initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution.
[0141] The second operation module is used to generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance from each initial solution to the candidate optimal solution, sort each initial solution in descending order according to the Euclidean distance, and filter each initial solution according to preset rules to obtain the tracking set and the escape set.
[0142] The third operation module is used to update the initial solution in the escape set to obtain the suboptimal solution through the random offset escape formula, calculate the fitness of each suboptimal solution, compare the fitness of the initial solution with the fitness of the corresponding suboptimal solution, and replace the initial solution with the corresponding suboptimal solution if the fitness of the initial solution is greater than the fitness of the corresponding suboptimal solution; otherwise, the initial solution is retained.
[0143] The fourth operation module is used to determine the optimal solution in the current population based on the fitness value. The second and third operation modules are executed repeatedly until the maximum number of iterations is reached, or the fitness converges, and then the optimal solution is output.
[0144] In one embodiment, the feature extraction module is further configured to extract features from the target images in the target image set using the target YOLOv7 model to obtain a feature group;
[0145] The improvements targeted at YOLOv7 include:
[0146] The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure. The backbone network and neck structure are the components of the YOLOv7-tiny model.
[0147] The working principle of separating the Conv module includes:
[0148] Obtain the initial feature tensor, input the initial feature tensor sequentially into the batch normalization layer and the SiLU activation function to obtain the first feature tensor, input the initial feature tensor into the depthwise separable convolutional layer to obtain the second feature tensor, multiply the initial feature tensor, the first feature tensor and the second feature tensor to obtain the third feature tensor, and use the third feature tensor as the output of the separation Conv module;
[0149] The working principle of the target CBL module includes:
[0150] Obtain the initial feature map, decompose the initial feature map into multiple blocks according to the preset size, and stitch them together according to the number of channels in each block to obtain the intermediate feature map. Input the intermediate feature map into the 1×1 Conv module to obtain the output feature map, and use the output feature map as the output of the target CBL module.
[0151] In one embodiment, the working principle of the MDA module includes:
[0152] Obtain the target feature map, and input the target feature map into the 1×1 Conv module and the fully connected layer in sequence to obtain Query, Key and Value. Input the Query and Key into the separate Conv module to obtain the target Query and target Key. Perform matrix multiplication on the target Query and target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix.
[0153] The Value is sequentially fed into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied with the target Value to obtain the fused feature map.
[0154] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. An AI-based online teaching management method, characterized in that, The method includes: A target image set is obtained by acquiring an image dataset of the target user and enhancing the images in the image dataset to obtain a target image set; the target image set contains multiple target images. Structural features are obtained by constructing three dimensions from the target images in the target image set, and feature groups are obtained by extracting features from the target images in the target image set; the feature groups include: global features and local features. The feature group and the structural features are input into the state recognition model to obtain a state score, and the target user is given an early warning based on the state score; The target image set is obtained by enhancing the images in the image dataset, including: Pixel recognition is performed on each image in the image dataset to obtain a blurred pixel set. Then, a CNN is used to deblur each blurred pixel in the blurred pixel set to obtain a deblurred image set. The noise pixels in the target deblurred image are identified, and an image matrix is calculated based on the noise pixels. The image matrix and the target deblurred image are then input into a neural blurring system to obtain a noise-enhanced image. The noise-enhanced image is an image containing the locations of the noise pixels. The target deblurred image is any one of the blurred images in the set. The noise-enhanced image is optimized using a conditional generative adversarial network to obtain a detail-enhanced image. The detail-enhanced image and the noise-enhanced image are then fused to obtain a target image. The target images corresponding to each deblurred image in the deblurred image set are then combined to form a target image set. Before deblurring each blurred pixel image in the blurred pixel image set by fusing CNN to obtain a deblurred image set, the parameter optimization method of the fused CNN includes: Step 1: Initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution; Step 2: Generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance between each initial solution and the candidate optimal solution, sort the initial solutions in descending order according to the Euclidean distance, and filter the initial solutions according to preset rules to obtain the tracking set and the escape set; Step 3: Update the initial solution in the escape set using the random offset escape formula to obtain the suboptimal solution. Calculate the fitness of each suboptimal solution and compare the fitness of the initial solution with that of the corresponding suboptimal solution. If the fitness of the initial solution is greater than that of the corresponding suboptimal solution, replace the initial solution with the corresponding suboptimal solution; otherwise, retain the initial solution. Step 4: Determine the optimal solution in the current population based on the fitness value. Repeat steps 2 and 3 until the maximum number of iterations is reached, or the fitness converges, then output the optimal solution.
2. The AI-based online teaching management method according to claim 1, characterized in that, Feature extraction is performed on the target images in the target image set to obtain feature groups, including: Feature groups are obtained by extracting features from the target images in the target image set using the target YOLOv7 model. The improvements to the target YOLOv7 include: The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure; the backbone network and the neck structure are components of the YOLOv7-tiny model. The working principle of the separated Conv module includes: An initial feature tensor is obtained, and the initial feature tensor is sequentially input into a batch normalization layer and a SiLU activation function to obtain a first feature tensor. The initial feature tensor is input into a depthwise separable convolutional layer to obtain a second feature tensor. The initial feature tensor, the first feature tensor, and the second feature tensor are multiplied together to obtain a third feature tensor. The third feature tensor is used as the output of the separation Conv module. The working principle of the target CBL module includes: An initial feature map is obtained, and the initial feature map is decomposed into multiple blocks according to a preset size. The blocks are then stitched together according to the number of channels in each block to obtain an intermediate feature map. The intermediate feature map is then input into a 1×1 Conv module to obtain an output feature map, which is then used as the output of the target CBL module.
3. The AI-based online teaching management method according to claim 2, characterized in that, Feature groups are obtained by extracting features from the target images in the target image set. The working principle of the MDA module includes: Obtain the target feature map, and input the target feature map into a 1×1 Conv module and a fully connected layer in sequence to obtain Query, Key and Value. Input the Query and the Key into the separate Conv module to obtain the target Query and the target Key. Perform matrix multiplication on the target Query and the target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix. The Value is sequentially input into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied by the target Value to obtain the fused feature map.
4. An AI-based online teaching management system, characterized in that, The system includes: an image enhancement module, a feature extraction module, and a teaching management module. The image enhancement module is used to acquire an image dataset of the target user, and enhance the images in the image dataset to obtain a target image set; the target image set contains multiple target images; The feature extraction module is used to perform 3D construction to obtain structural features based on the target images in the target image set, and to extract features from the target images in the target image set to obtain feature groups; the feature groups include: global features and local features; The teaching management module is used to input the feature group and the structural feature into the state recognition model to obtain a state score, and to issue a warning to the target user based on the state score; The image enhancement module further includes: a deblurring module, a noise enhancement module, and a feature fusion module. The deblurring module is used to perform pixel recognition on each image in the image dataset to obtain a blurred pixel map set, and to deblur each blurred pixel map in the blurred pixel map set by fusing CNN to obtain a deblurred image set. The noise enhancement module is used to determine the noise pixels in the target deblurred image, calculate an image matrix based on the noise pixels, and input the image matrix and the target deblurred image into the neural blurring system to obtain a noise-enhanced image; the noise-enhanced image is an image containing the locations of the noise pixels; the target deblurred image is any one of the blurred images in the set. The feature fusion module is used to optimize the noise-enhanced image through a conditional generative adversarial network to obtain a detail-enhanced image, fuse the detail-enhanced image and the noise-enhanced image to obtain a target image, and form a target image set by combining the target images corresponding to each deblurred image in the deblurred image set. The system further includes: a first operation module, a second operation module, a third operation module, a fourth operation module, and a fifth operation module. The first operation module is used to initialize the population and parameters to obtain an initial solution set, calculate the fitness of each initial solution in the initial solution set, and take the initial solution with the largest fitness value as the current optimal solution; The second operation module is used to generate candidate optimal solutions by randomly perturbing the current optimal solution, calculate the Euclidean distance between each initial solution and the candidate optimal solution, sort each initial solution in descending order according to the Euclidean distance, and filter each initial solution according to preset rules to obtain the tracking set and the escape set. The third operation module is used to update the initial solution in the escape set to obtain a suboptimal solution through the random offset escape formula, calculate the fitness of each suboptimal solution, compare the fitness of the initial solution with the fitness of the corresponding suboptimal solution, and replace the initial solution with the corresponding suboptimal solution if the fitness of the initial solution is greater than the fitness of the corresponding suboptimal solution; otherwise, the initial solution is retained. The fourth operation module is used to determine the optimal solution in the current population based on the fitness value, and repeatedly execute the second and third operation modules until the maximum number of iterations is reached, or the fitness converges, and then output the optimal solution.
5. The AI-based online teaching management system according to claim 4, characterized in that, The feature extraction module is also used to extract features from the target images in the target image set using the target YOLOv7 model to obtain feature groups; The improvements to the target YOLOv7 include: The target YOLOv7 is obtained by replacing the CBS module in the backbone network with the separate Conv module, replacing the CBL module in the YOLOv7-tiny model with the target CBL module, and adding the MDA module to the neck structure; the backbone network and the neck structure are components of the YOLOv7-tiny model. The working principle of the separated Conv module includes: An initial feature tensor is obtained, and the initial feature tensor is sequentially input into a batch normalization layer and a SiLU activation function to obtain a first feature tensor. The initial feature tensor is input into a depthwise separable convolutional layer to obtain a second feature tensor. The initial feature tensor, the first feature tensor, and the second feature tensor are multiplied together to obtain a third feature tensor. The third feature tensor is used as the output of the separation Conv module. The working principle of the target CBL module includes: An initial feature map is obtained, and the initial feature map is decomposed into multiple blocks according to a preset size. The blocks are then stitched together according to the number of channels in each block to obtain an intermediate feature map. The intermediate feature map is then input into a 1×1 Conv module to obtain an output feature map, which is then used as the output of the target CBL module.
6. The AI-based online teaching management system according to claim 5, characterized in that, The working principle of the MDA module includes: Obtain the target feature map, and input the target feature map into a 1×1 Conv module and a fully connected layer in sequence to obtain Query, Key and Value. Input the Query and the Key into the separate Conv module to obtain the target Query and the target Key. Perform matrix multiplication on the target Query and the target Key to obtain the similarity matrix. Input the similarity matrix into the Softmax function to obtain the attention weight matrix. The Value is sequentially input into the fully connected layer and the separate Conv module to obtain the target Value. The attention weight matrix is then multiplied by the target Value to obtain the fused feature map.
Citation Information
Patent Citations
Virtual teaching management method and device based on artificial intelligence
CN115936944A
Three-way pipe detection method and system based on improved YOLOv7
CN117523311A
KR20250030058A