Training methods and evaluation methods for the assessment model of classroom teaching comfort

By combining generative adversarial networks, dynamic population evolution optimization, and autoencoder neural networks, a classroom teaching comfort assessment model is constructed, which solves the problem of insufficient data in classroom teaching comfort assessment and improves the accuracy of assessment and the level of intelligent management.

CN119760555BActive Publication Date: 2025-10-28CHENGDU KAIYUAN COMPUTING ECOLOGICAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411826212.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-10-28
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

The lack of effective artificial intelligence models in existing technologies for assessing classroom teaching comfort leads to deficiencies in smart classroom management.

Method used

A generative adversarial network model is used to expand the data sample, a neural network model with dynamic population evolution optimization is used for feature extraction, an autoencoder neural network is used for feature dimensionality reduction, and finally a deep neural decision tree algorithm with local topology is used for classification to construct a classroom teaching comfort evaluation model.

Benefits of technology

It improves the accuracy and intelligent management level of classroom teaching comfort assessment, solves the problem of insufficient data, enhances the generalization ability and training efficiency of the model, and ensures the consistency and diversity of generated data with real data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760555B_ABST
    Figure CN119760555B_ABST
Patent Text Reader

Abstract

A training method and evaluation method for a classroom teaching comfort assessment model are disclosed. The method includes: collecting data samples through IoT sensors in the classroom; expanding the labeled data samples using a data augmentation model, where the data augmentation model is the generator in a trained adversarial network model; inputting the augmented labeled data samples into a feature extraction model for feature extraction to obtain multidimensional feature representations, where the feature extraction model is trained using a dynamic population evolution optimization neural network model; inputting the multidimensional feature representations into a feature dimensionality reduction model for feature reduction to obtain low-dimensional feature representations, where the feature dimensionality reduction model is the encoder in a trained autoencoder neural network algorithm; and inputting the low-dimensional feature representations into a classifier for training, where the classifier is a trained local topology deep neural decision tree algorithm, and the classifier is used to output the classroom teaching comfort level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a training method and evaluation method for an assessment model of classroom teaching comfort. Background Art

[0002] With the development of intelligent technologies, the concept of smart classrooms has gradually emerged and become an important application scenario in the education field. By deploying various IoT sensors in the classroom, such as temperature, light, sound, and location sensors, real-time environmental data and student behavior data can be collected, providing strong support for the monitoring, control, and management of the teaching environment.

[0003] As one application approach, artificial intelligence models are used to assess classroom teaching comfort based on real-time data collected from smart classrooms, and the assessment results are fed back to smart classroom administrators for further processing. However, in practice, it has been found that there is currently no perfect artificial intelligence model solution that can achieve good results in the above application area. Summary of the Invention

[0004] In view of this, the purpose of this disclosure is to provide a training method and an evaluation method for an assessment model of classroom teaching comfort, so as to solve the above problems.

[0005] In a first aspect, embodiments of this disclosure provide a method for training a classroom teaching comfort assessment model, including:

[0006] Data samples were collected using IoT sensors within the classroom.

[0007] The labeled data samples are augmented using a data augmentation model. The labeled data samples are obtained by adding classroom teaching comfort level labels to the data samples. The data augmentation model is a generator in a trained adversarial network model.

[0008] The expanded labeled data samples are input into a feature extraction model for feature extraction to obtain multidimensional feature representations. This feature extraction model is trained using a neural network model optimized through dynamic population evolution.

[0009] The multidimensional feature representation is input into the feature dimensionality reduction model to perform feature dimensionality reduction, so as to obtain a low-dimensional feature representation. The feature dimensionality reduction model is the encoder in a trained autoencoder neural network algorithm.

[0010] The low-dimensional feature representation is input into a classifier for training. The classifier is a trained deep neural decision tree algorithm with local topology, and it is used to output the classroom teaching comfort level.

[0011] In some embodiments, the loss function of the generator includes a sparse regularization term related to the weights and biases of each layer of the generator.

[0012] In some embodiments, the loss function of the generator is expressed as the following equation:

[0013]

[0014] in, The loss function of the generator is y. c,real y is the probability that the discriminator identifies it as real data. c,fake R is the probability that the discriminator classifies a piece of data as fake. c () represents the sparse regularization term, and ||||1 represents the L1 norm. Let λ represent the L1 norm of each parameter of the generator. c It is a hyperparameter of the regularization strength, ||W c,i ||1 and||b c,i ||1 represents the L1 norm of the weights and biases of the i-th layer, respectively.

[0015] In some embodiments, the learning rate of the generator and the learning rate of the discriminator in the generative adversarial model are both related to the loss difference between the generator and the discriminator.

[0016] In some embodiments, the learning rate of the generator and the learning rate of the discriminator in the generative adversarial model are expressed by the following equation:

[0017]

[0018] in, This represents the loss of the discriminator. The loss of the generator is represented by ΔL. c This represents the loss difference between the discriminator and the generator. and These are the learning rates of the generator and the discriminator, respectively, where η0 is the base learning rate and α is the base learning rate. c It is an adjustment factor.

[0019] In some embodiments, the parameter update method of the generator and the discriminator is expressed by the following equation:

[0020]

[0021] In the formula, and These are the updated learning rates for the generator and the discriminator. and These are the learning rates of the generator and discriminator before the update. and These are the gradients of the generator's loss function and the discriminator's loss function, respectively.

[0022] In some embodiments, the training process of the dynamic population evolution optimization neural network model includes:

[0023] An initial population is set up based on the biomimetic algorithm initialization method;

[0024] For each individual in the population, the input data is processed using its corresponding neural network configuration, the output of the model is calculated, and its performance is evaluated according to a predetermined loss function.

[0025] Based on the individual's fitness, the best-performing individual from the current population is selected and retained as a candidate solution for the next generation;

[0026] For the candidate solutions of the next generation, new individuals are generated through crossover and mutation operations; and

[0027] Determine whether the preset stopping iteration condition is met. If not, jump to the step of processing the input data, calculating the model output, and evaluating its performance according to the predetermined loss function for each individual in the population using its corresponding neural network configuration. If yes, end the training process.

[0028] In some embodiments, the predetermined loss function is expressed as the following equation:

[0029]

[0030] Among them, L pi Let be the loss of the neural network corresponding to the i-th individual, and mps represent the number of samples input in the current batch; The function represents the composite loss function, and fsig() represents the neural network model function. Represents the features of the j-th sample. W represents the label of the j-th sample. pi Here, MSE() represents the weights of the neural network corresponding to the i-th individual, and Reg(W) is the mean squared error function. pi ) is the regularization term, λ ps W is the regularization parameter. pi,k Let k be the weight of the neural network corresponding to the i-th individual.

[0031] In some embodiments, the autoencoder neural network algorithm includes an encoder, a decoder, and a feature adjustment module. The encoder employs a multi-layer nonlinear mapping structure to map high-dimensional data to a low-dimensional feature space. The feature adjustment module performs multiple rounds of recursive optimization on the low-dimensional features and adjusts the weights of each feature in each iteration based on the performance of the features in the previous round. The decoder remaps the low-dimensional features back to the high-dimensional space.

[0032] In some embodiments, the training process of the local topology-based deep neural decision tree algorithm includes the following steps:

[0033] Initialize the deep neural decision tree;

[0034] Perform a node nonlinear transformation on each decision node;

[0035] The decision rules of each node in the decision tree are optimized by using the quantum state-based quantum optimization search principle.

[0036] Based on information obtained from neural network modules and quantum search, the tree structure is dynamically adjusted.

[0037] Determine whether the preset stopping iteration condition is met. If not, proceed to the step of optimizing the decision rules of each node in the decision tree using the quantum optimization search principle based on quantum states. If yes, end the training process.

[0038] In some embodiments, performing node nonlinear transformation on each decision node includes:

[0039] Each decision node is implemented using a feedforward network, with the data features of the decision node as input and the decision signal as output.

[0040] The feature weights in each decision node are dynamically adjusted based on the adaptive feature feedback mechanism, and the feature weights are automatically adjusted based on the performance of each feature in the classification process by monitoring the feature utility of each feature.

[0041] In some embodiments, the output is represented as:

[0042]

[0043] In the formula, D is the dimension of the input feature, and W... u,i and b u These are the weights and biases of the feedforward network, Sh u () is an activation function based on non-linear components, Sig() is the Sigmoid activation function, and γ u It is the learning rate parameter, E u,i Let be the feature utility of the i-th feature.

[0044] In some embodiments, at each decision node, the feature utility of the i-th feature is defined as follows:

[0045]

[0046] In the formula, C is the classification result set, and O is the classification result set. c δ is the output probability of class c. c It is the gain corresponding to classification accuracy. Indicates feature x u,i For output O c Sensitivity.

[0047] In some embodiments, the activation function based on the nonlinear component is expressed as:

[0048] h u (x u,i W ' u,i ) = tanh(W ' u,i ·x u,i +b ' u,i (4.4)

[0049] In the formula, tanh(W) ' u,i ·x u,i +b ' u,i W is the hyperbolic tangent function. ' u,i and b ' u,i It refers to additional weights and biases within the same decision node.

[0050] In some embodiments, the data sample includes one or more of the following items: classroom temperature, light intensity, noise level, student density, time, student interaction frequency, classroom door and window status, and student attention index.

[0051] Secondly, embodiments of this disclosure provide a method for evaluating classroom teaching comfort, including:

[0052] Collect real-time data through IoT sensors;

[0053] A feature extraction model is used to extract features from real-time data to obtain multidimensional feature representations. The feature extraction model is trained by a neural network model optimized by dynamic population evolution.

[0054] The multidimensional feature representation is input into a feature dimensionality reduction model to obtain a low-dimensional feature representation. The feature dimensionality reduction model is the encoder in a trained autoencoder neural network algorithm.

[0055] The low-dimensional feature representation is input into a classifier to output the corresponding classroom teaching comfort level. The classifier is a trained deep neural decision tree algorithm with local topology.

[0056] Thirdly, embodiments of this disclosure provide a computer device, including: a memory, the memory being used to store a processing program;

[0057] A processor that implements the above-described method when executing the processing program.

[0058] The classroom teaching comfort assessment model training method and classroom teaching comfort assessment method provided in this disclosure apply artificial intelligence to classroom teaching comfort assessment, which helps to improve the level of intelligent management of classroom teaching. Attached Figure Description

[0059] The above and other objects, features and advantages of the present disclosure will become clearer from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0060] Figure 1 This is a flowchart of a classroom teaching comfort assessment model training method provided in an embodiment of this disclosure;

[0061] Figure 2 yes Figure 1 A flowchart of the training process for a generative adversarial network model in [the context of the training process].

[0062] Figure 3 yes Figure 1 A flowchart illustrating the training process of the feature extraction model (a neural network model based on dynamic population evolution optimization) in the diagram.

[0063] Figure 4 yes Figure 1 A flowchart illustrating the training process of the feature dimensionality reduction model (a neural network model based on dynamic population evolution optimization) in the image.

[0064] Figure 5 yes Figure 1 A flowchart of the training process of the classifier (local topology deep neural decision tree algorithm) in the algorithm;

[0065] Figure 6 This is a flowchart of a method for evaluating classroom teaching comfort provided in an embodiment of this disclosure. Detailed Implementation

[0066] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. In the various drawings, the same elements are indicated by similar reference numerals. For clarity, the various parts in the drawings are not drawn to scale. Furthermore, certain well-known parts may not be shown.

[0067] The following description of embodiments of the present disclosure is based on examples, but the embodiments of the present disclosure are not limited to these embodiments. In the detailed description of the embodiments of the present disclosure below, certain specific details are described in detail. Those skilled in the art can fully understand the embodiments of the present disclosure without these details. To avoid obscuring the essence of the embodiments of the present disclosure, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0068] Unless the context explicitly requires it, the terms "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than exclusive or exhaustive; that is, meaning "including but not limited to." Furthermore, in the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0069] Figure 1 This is a flowchart illustrating a method for training a classroom teaching comfort assessment model, as provided in an embodiment of this disclosure. Figure 1 As shown, the method includes the following steps.

[0070] In step S10, data samples are collected using IoT sensors.

[0071] In step S20, the labeled data samples are augmented using a generative adversarial network model.

[0072] In step S30, the expanded labeled data samples are input into the feature extraction model for feature extraction to obtain multidimensional feature representation.

[0073] In step S40, the multidimensional feature representation is input into the feature dimensionality reduction model to perform feature dimensionality reduction in order to obtain a low-dimensional feature representation.

[0074] In step S50, the low-dimensional feature representation is input into the classifier for training.

[0075] Regarding step S10, the data sources in this embodiment mainly consist of various IoT sensors deployed in the smart classroom, including but not limited to temperature sensors, light sensors, sound sensors, and student location tracking sensors. Data acquisition is performed using a real-time wireless transmission system, and all collected data is stored in a structured format in a locally secure database. In some embodiments, the data collected by the IoT sensors includes classroom temperature (Ra), light intensity (Rb), noise level (Rc), student density (Rd), time (Re), student interaction frequency (Rh), classroom door and window status (Ri), and student attention index (Rj). In some embodiments, this data is organized in JSON (JavaScript Object Notation) format and stored in a locally secure database.

[0076] Below is an example of organizing this data in JASON format:

[0077]

[0078] Furthermore, the data samples are labeled with classroom teaching comfort levels, using manual labeling. For example, classroom teaching comfort levels are divided into 5 levels, with higher levels indicating greater comfort. The labels can be combined with the aforementioned JASON format data; for instance, using the above sample, a data item can be added as: {"Classroom Teaching Comfort Level":1}.

[0079] Regarding step S20, it is understood that the collection, labeling, and preprocessing of data samples for smart classrooms are time-consuming and labor-intensive, and insufficient samples can easily lead to poor generalization ability of model training and affect the accuracy of the model. Therefore, this step uses a generative adversarial network model based on dummy variables to expand the data samples in order to solve the problem of insufficient samples in certain categories of the smart classroom dataset, and enhances the generalization ability of model training by using the powerful capabilities of the generative adversarial network model to generate high-quality and reliable data samples.

[0080] In Generative Adversarial Networks (GANs), the generator and discriminator are two key components. Through an adversarial process, they learn how to generate realistic data and how to distinguish between real and generated data. The GAN model used in this step adds a sparse regularization technique for local smoothness to the traditional GAN, optimizing the characteristics of the generated data and ensuring a more uniform distribution of the generated data in the feature space while maintaining a high degree of consistency with real data. The training process of this GAN model is as follows: Figure 2 As shown, it includes the following steps:

[0081] In step S201, the network parameters of the generator and discriminator in the generative adversarial network are initialized. The generator is responsible for generating seemingly realistic data, and the discriminator's task is to distinguish between real data and fake data generated by the generator. Let the generator be G. c The discriminator is D. c The method for initializing its parameters is represented by formulas (1.1) and (1.2):

[0082]

[0083] In the formula, and , respectively, are the initial parameters of the generator and discriminator; ~ indicates that it follows a specific distribution; N(0,1) represents a normal distribution with a mean of 0 and a variance of 1.

[0084] In step S202, the generator and discriminator are adversarially trained using their respective loss functions. During the adversarial training phase, the generator and discriminator enter a dynamic training process. The generator attempts to generate increasingly realistic data, while the discriminator strives to improve its ability to identify fake data. c The data generation method is represented by formulas (1.3) and (1.4):

[0085]

[0086] z c ~N(0,1)(1.4)

[0087] In the formula, z c It is random noise generated from the standard normal distribution. These are the parameters of the generator; For the generator's generated data; G c () represents a generator function.

[0088] Furthermore, discriminator D c The determination of real data and generated data is represented by formulas (1.5) and (1.6):

[0089]

[0090]

[0091] In the formula, x c For real data, y c,real and y c,fake These are the discriminator's judgment results for the real data and the generated data, respectively; D c () represents the discriminator function; These are the parameters of the discriminator.

[0092] During adversarial training, the loss functions of the discriminator and generator are calculated using equations (1.7) and (1.8):

[0093]

[0094] In the formula, It is the loss function of the discriminator, which aims to maximize the ability to distinguish between real data and generated data; It is the generator's loss function, designed to deceive the discriminator into mistaking the generated data for real data; y c,real y is the probability that the discriminator identifies it as real data; c,fake R is the probability that the discriminator identifies the data as fake; c () represents the sparse regularization term.

[0095] In step S203, during adversarial training, a sparse regularization term is used to control the distribution of generated data. By adjusting the regularization parameter, a balance between diversity and novelty in the generated data is ensured, avoiding overfitting or generating poor-quality data. Specifically, the sparse regularization term is calculated as shown in formulas (1.9) and (1.10):

[0096]

[0097] In the formula, ||||1 represents the L1 norm; λ represents the L1 norm of the generator parameters. c It is a hyperparameter of the regularization strength, ||W c,i ||1 and||b c,i ||1 represents the L1 norm of the weights and biases of the i-th layer, respectively, where i represents the layer index. The L1 norm is the sum of the absolute values ​​of all components of the vector. Preferably, λ c Set it to 0.3.

[0098] Therefore, by adjusting the contribution of each layer's weights and biases to regularization, the sparsity of the network can be controlled more precisely, leading to more effective data generation.

[0099] In step S204, during adversarial training, a dynamically adjusted adversarial balance mechanism is adopted. This involves adjusting the learning rates of the generator and discriminator in real time to maintain a dynamic balance between them, optimizing the training process, reducing training time, and improving the quality of generated data. The learning rate is a parameter used in optimization algorithms to adjust the step size of model parameter updates. When training a generative adversarial network model, the weights of the generator and discriminator are updated according to the gradient of the loss function, and the learning rate determines the magnitude of each update. Traditional learning rates are usually statically set, which can easily lead to the discriminator rapidly surpassing the generator or the generator over-optimizing in the early stages of training. This is addressed by calculating the loss difference and dynamically adjusting the learning rate based on it. The calculation of the loss difference is expressed as formula (1.11):

[0100]

[0101] In the formula, This indicates the loss of the discriminator. The loss of the generator is represented by ΔL. c This represents the loss difference between the discriminator and the generator.

[0102] Furthermore, the learning rate adjustment method is expressed as follows:

[0103]

[0104] In the formula, and These are the learning rates for the generator and discriminator, respectively, where η0 is the base learning rate and α is the base learning rate. c This is an adjustment factor used to control the rapid adaptation of the learning rate. Preferably, α... c Set it to 0.3, and η0 to 0.01.

[0105] Furthermore, the parameter update method for the generator and discriminator is expressed as follows:

[0106]

[0107] In the formula, and These are the parameters for the updated generator and discriminator. and These are the parameters of the generator and discriminator before the update. and These are the gradients of the loss functions for the generator and discriminator, respectively.

[0108] In steps S205 and S206, it is determined whether a preset stopping iteration condition is met. If not, the process jumps to step S202 to continue execution; if yes, the training process ends, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0109] After training, the trained generator is used to increase the number of samples. In one embodiment, if the original number of collected samples is 800, and 200 samples are generated by expansion, then the expanded dataset contains 1000 samples.

[0110] Regarding step S30, this step uses a multi-layered, fully connected neural network structure based on dynamic population evolution optimization (e.g., NPDOA, a neural population dynamic optimization algorithm) as the feature extraction model. In existing technologies, using traditional neural networks for feature extraction may encounter problems such as vanishing gradients, exploding gradients, or getting trapped in local optima in certain neural network structures, affecting training stability and model performance. The neural network model based on dynamic population evolution optimization in this step utilizes a self-correction mechanism to automatically adjust the evolutionary rules according to the characteristics of the current training data, adjusting the probabilities of crossover and mutation based on the changing trend of the loss function, thereby naturally reducing the risk of overfitting. Furthermore, compared to traditional population evolution algorithms where the evolution of all individuals is based on fixed rules, automatically adjusting the evolutionary rules allows for more flexible adaptation to different data distributions, thereby improving the model's generalization ability and training efficiency. The training process of the neural network model based on dynamic population evolution optimization is as follows: Figure 3 As shown, the following steps are included:

[0111] In step S301, an initial population is generated according to the biomimetic algorithm initialization method, where each individual represents a network weight configuration. Specifically, let the population size be N. p Let the weights and biases of the i-th individual be initialized as follows:

[0112]

[0113] In the formula, W pi Let b be the weight of the neural network corresponding to the i-th individual. pi Let be the bias of the neural network corresponding to the i-th individual. This represents the weight matrix of the i-th individual in the initial state; σ represents the bias of the i-th individual in the initial state; 2 Represents the initial variance; This indicates that the mean is 0 and the variance is σ. 2 The normal distribution; It follows a normal distribution. Preferably, σ2 Set to 0.01.

[0114] In step S302, for each individual in the population, the input data is processed using its corresponding neural network configuration, the model output is calculated, the loss is calculated according to a predetermined loss function, and its performance is evaluated based on the loss. Specifically, for the i-th individual, the loss on the training dataset is calculated using its weights and biases, expressed as:

[0115]

[0116] Where, L pi is the loss of the neural network corresponding to the i-th individual; mps represents the number of samples input in the current batch; The function represents the composite loss function, and fsig() represents the neural network model function. Represent the features of the j-th sample; W represents the label of the j-th sample. pi Let be the weights of the neural network corresponding to the i-th individual.

[0117] In one embodiment, the composite loss function includes a regularization term, which can increase the model's generalization ability. The calculation method is expressed as follows:

[0118]

[0119] In the formula, MSE() is the mean squared error function, and Reg(W pi ) is the regularization term, λ ps This is the regularization parameter.

[0120] Furthermore, the calculation method for the regularization term is expressed as follows:

[0121]

[0122] In the formula, W pi,k Let k be the weight of the neural network corresponding to the i-th individual.

[0123] In step S303, based on the individual's fitness, the best-performing individual is selected from the current population and retained as a candidate solution for the next generation. Specifically, selection is based on individual fitness, with superior individuals having a higher probability of being selected. The probability of an individual being selected is calculated as follows:

[0124]

[0125] In the formula, P select (i) represents the probability that the i-th individual is selected; γ pse It is a parameter that controls the selected pressure; L pkLet γ be the loss of the neural network corresponding to the k-th individual. Preferably, γ pse Set to 2.

[0126] In step S304, using the candidate solutions output in the previous steps, new individuals are generated through crossover and mutation operations. Crossover allows two superior individuals to exchange some genes, generating new offspring; mutation randomly alters some genes in an individual to increase population diversity. Specifically, the crossover operation randomly selects two individuals for gene exchange, as shown below:

[0127] W ' pi =α pcs W p1 +(1-α pcs W p2 (2.7)

[0128] b ' pi =α pcs b p1 +(1-α pcs )b p2 (2.8)

[0129] In the formula, α pcs It's the crossover rate, W p1 b represents the weights of the neural network corresponding to the first selected individual. p1 W is the bias of the neural network corresponding to the first selected individual. p2 b represents the weights of the neural network corresponding to the selected second individual. p2 W is the bias of the neural network corresponding to the selected second individual. ' pi b represents the weights of the neural network corresponding to the individuals after the crossover operation. ' pi This refers to the bias of the neural network corresponding to the individual after the crossover operation. Preferably, α pcs Set it to 0.3.

[0130] Furthermore, the mutation operation applies a small-amplitude random perturbation to the weights of the newly generated individuals, as follows:

[0131]

[0132] In the formula, τ 2 The variance, W″ represents the variation. pi b″ represents the weights of the neural network corresponding to the individual after the mutation operation. pi This represents the bias of the neural network corresponding to the individual after the mutation operation. Preferably, τ 2 Set to 0.04.

[0133] In steps S305 and S306, it is determined whether a preset stopping iteration condition is met. If not, the process jumps to step S302 to continue execution; if yes, training ends, indicating that model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0134] Regarding step S40, a feature-refining-based autoencoder neural network is used as the dimensionality reduction model. This network consists of an encoder, a decoder, and a feature adjustment module. The encoder maps high-dimensional input data to a low-dimensional feature space, and the decoder reconstructs the reduced features back to the original space, ensuring the reversibility of the dimensionality reduction process. The feature adjustment module dynamically adjusts the reduced feature space through recursive feature adaptive optimization, strengthening important features and gradually weakening secondary features. This results in a dimensionality-reduced feature representation that retains data information while maintaining good simplicity.

[0135] The training process of the feature-refinement-based autoencoder neural network algorithm is as follows: Figure 4 As shown, the following steps are included:

[0136] In step S401, let the data input to the autoencoder neural network be X. r The encoder employs a multi-layer nonlinear mapping structure to map high-dimensional data to an initial low-dimensional feature space, represented as:

[0137] Z r =Sig enc (W r X r +b r (3.1)

[0138] In the formula, Z r W represents the initial low-dimensional features. r Let b be the weight matrix of the encoder. r Sig is the bias vector of the encoder. enc () is the multi-layer Sigmoid activation function of the encoder.

[0139] In step S402, after the low-dimensional features are generated, the feature adjustment module automatically generates feature weights based on the importance of features in the current feature space. This module assigns the same initial weights to all features during initialization, so that they can be gradually adjusted in subsequent steps based on feature contributions. The initial weight matrix is ​​calculated as follows:

[0140] A r =diag(α) r (3.2)

[0141] In the formula, Ar The initial weight matrix; α r Let α be the feature weight vector. r Each element α in r,i Initializing to the same value indicates that all features have the same importance in the initial stage; diag() is a function to extract the diagonal elements of the matrix.

[0142] Furthermore, the adjusted features can be represented as:

[0143] Z ' r =A r Z r (3.3)

[0144] In the formula, Z ' r This is the feature representation after feature weight adjustment.

[0145] In step S403, the feature adjustment module performs multiple rounds of recursive optimization on the initially generated low-dimensional features. In each iteration, the module adjusts the weights of each feature based on the performance of the features in the previous round, gradually strengthening those features with significant influence and gradually weakening redundant or noisy features. Let the weight update rule in the t-th iteration be as follows:

[0146]

[0147] In the formula, This represents the feature weights in the (t+1)th iteration. η represents the feature weights in the t-th iteration. r L represents the learning rate of the autoencoder neural network. r () represents the loss function of the autoencoder neural network, Y r For label data, This represents the gradient of the loss function with respect to the feature weights. Preferably, the loss function of the autoencoder neural network is the reconstructed error loss function. Preferably, η r Set to 0.01.

[0148] In step S404, to ensure the effectiveness of the dimensionality reduction process, the decoder remaps the low-dimensional features back to the high-dimensional space to ensure that no important information is lost during the dimensionality reduction process. The decoder's reconstruction process is represented as follows:

[0149] X ' r =Sig dec (W ' r Z ' r +b ' r (3.5)

[0150] In the formula, X ' r For the reconstructed high-dimensional data, W ' r Let b be the weight matrix of the decoder. ' r Sig is the bias vector of the decoder. dec () represents the multi-layer Sigmoid activation function of the decoder.

[0151] In steps S405 and S406, it is determined whether a preset stopping iteration condition is met. If not, the process jumps to step S403 to continue execution; if yes, training ends, indicating that model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0152] Regarding step S50, the dimensionality-reduced data is input into the classifier for training. This invention employs a Deep Neural Decision Tree (DNDT) algorithm based on local topology as the classification algorithm. It uses a quantum mechanics-based optimal solution search algorithm to optimize the decision tree construction process, effectively locating the optimal decision path in the complex feature space, thereby improving classification accuracy and efficiency. The Deep Neural Decision Tree algorithm is a machine learning model that combines the advantages of deep learning and decision trees. Each neural network layer essentially corresponds to a decision tree, progressing layer by layer to form a composite tree-like network. The characteristic of the Deep Neural Decision Tree algorithm in local topology is its ability to simulate the branching structure of a decision tree. This structure allows the model to make decisions within local regions, similar to the segmentation of a decision tree within a local region.

[0153] Specifically, the training process of the deep neural decision tree algorithm based on local topology is as follows: Figure 5 As shown, the following steps are included:

[0154] In step S501, the deep neural decision tree is initialized, and the deep neural decision tree is denoted as T. u The deep neural decision tree has n nodes. u The decision threshold is θ u The decision threshold setting method is expressed as follows:

[0155]

[0156] In the formula, S u At node n u The sample set assigned at x u It is the feature vector input into the deep neural decision tree.

[0157] In step S502, a nonlinear transformation of the nodes is performed. A small neural network module is used for each decision node. These modules are responsible for learning how to extract effective nonlinear decision boundaries from the data features. Specifically, this is implemented through a feedforward network. The input is the data features of the current decision node, and the output is the decision signal. The network output is represented as follows:

[0158]

[0159] In the formula, D is the dimension of the input feature, and W... u,i and b u It refers to the weights and biases of a feedforward network in a small network, Sh u () is an activation function based on non-linear components; Sig() is the Sigmoid activation function; γ u It is the learning rate parameter, used to control the speed and magnitude of weight updates; E u,i Let be the feature utility of the i-th feature.

[0160] Furthermore, the allocation of feature weights in each decision node is dynamically adjusted according to the adaptive feature feedback mechanism to optimize the adaptability of the decision tree to the current training state. By monitoring the utility of each feature in the classification process and automatically adjusting the feature weights based on their performance, the robustness and accuracy of the model in the face of complex data changes are enhanced. Specifically, at each decision node, the feature utility of the i-th feature is defined as follows:

[0161]

[0162] In the formula, C is the classification result set, and O is the classification result set. c δ is the output probability of class c. c It is the gain corresponding to classification accuracy (i.e., the value when classified correctly minus the value when classified incorrectly). Indicates feature x u,i For output O c Sensitivity.

[0163] In one embodiment, the activation function based on nonlinear components aims to refine the output, allowing decision nodes to process input features more precisely before making classification decisions. The calculation method is expressed as follows:

[0164] h u (x u,i W ' u,i ) = tanh(W ' u,i ·x u,i +b ' u,i (4.4)

[0165] In the formula, tanh(W ' u,i ·x u,i +b ' u,i W is the hyperbolic tangent function; ' u,i and b ' u,i These are additional weights and biases within the same decision node, used to improve the model's ability to respond to nonlinear input data.

[0166] In step S503, the decision rules of each node in the decision tree are optimized using the quantum optimization search principle based on quantum states. Specifically, by simulating quantum behaviors, such as quantum entanglement and quantum superposition, the feature segmentation that maximizes information gain is found, and the decision threshold θ is updated accordingly. u The simulation strategy is implemented through the following iterative process:

[0167]

[0168] In the formula, It is the decision threshold in the t-th iteration. It is the decision threshold in the (t+1)th iteration; α u It is the learning rate of the deep neural decision tree; ΔQ is based on the quantum state Ψ. u The calculated quantum gradient simulates the diffusion and superposition of quantum states in probability space. Preferably, α u Set to 0.01.

[0169] In one embodiment, the quantum gradient is calculated as follows:

[0170]

[0171] In the formula, E(θ) u ,Ψ u ) represents the expected energy value based on the quantum probability distribution.

[0172] Furthermore, the energy expectation value based on the quantum probability distribution enables quantum optimization to find the optimal solution more efficiently in the global search space, and the calculation method is expressed as follows:

[0173] E(θ u ,Ψ u )=∑ i P(Ψ u,i )·L(θ u ,Ψ u,i (4.7)

[0174] In the formula, P(Ψ) u,i ) is the quantum state Ψ u,iThe probability of occurrence, L(θ) u ,Ψ u,i ) is given Ψ u,i The loss function is as follows.

[0175] In step S504, the tree structure is dynamically adjusted based on the information obtained from the neural network module and the quantum search. The dynamic adjustment of the tree structure is based on information gain I. u and the nonlinear output o of the node u The adjustment strategy is defined as follows:

[0176] I u =-∑ k∈K p k logp k (4.8)

[0177]

[0178] In the formula, p k Is category k at node n u The probability distribution of the next sample; τ u It is the information gain threshold, used to determine whether a node needs to be split or pruned; For the nodes of the adjusted deep neural decision tree. Preferably, τ u Set to 0.05.

[0179] As training progresses, the decision tree matures, and the decision paths become more refined. Each leaf node will possess highly specialized classification capabilities, accurately labeling data samples belonging to its assigned region. The classification ability of each leaf node is optimized by minimizing the misclassification rate. The optimization aims to adjust the decision rules of each leaf node to minimize its misclassification rate. The update rules are as follows:

[0180]

[0181] In the formula, ∈ u y represents the misclassification rate. u It is the real label, f(x) u ,θ u () is based on the decision threshold θ u The classification function.

[0182] In steps S505 and S506, it is determined whether a preset stopping iteration condition is met. If not, the process jumps to step S503 to continue execution; if yes, the training process continues, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 300. Accordingly, this disclosure provides a method for evaluating classroom teaching comfort levels, the flowchart of which is shown below. Figure 6As shown, it includes the following steps.

[0183] In step S601, real-time data is collected through IoT sensors.

[0184] In step S602, a feature extraction model is used to extract features from the real-time data to obtain a multidimensional feature representation. The feature extraction model is trained using a neural network model optimized by dynamic population evolution.

[0185] In step S603, the multidimensional feature representation is input into the feature dimensionality reduction model for feature dimensionality reduction to obtain a low-dimensional feature representation. The feature dimensionality reduction model is the encoder in a trained autoencoder neural network algorithm.

[0186] In step S604, the low-dimensional feature representation is input into the classifier to output the corresponding classroom teaching comfort level. The classifier uses a trained local topology deep neural decision tree algorithm.

[0187] The training steps for each model used in this embodiment can be referred to above, and will not be repeated here.

[0188] In summary, the classroom teaching comfort assessment model training method and classroom teaching comfort assessment method provided in this disclosure apply artificial intelligence to classroom teaching comfort assessment, which helps to improve the level of intelligent management of classroom teaching. Furthermore, the training method for the classroom teaching comfort assessment model has the following advantages: First, in terms of dataset expansion, a generator in a generative adversarial model is used to expand the smart classroom dataset, solving the problem of insufficient data. Through the adversarial training mechanism, high-quality virtual data is generated, making the generated data distribution more uniform and consistent with the real data. Second, in terms of feature extraction, a dynamic population evolution optimization algorithm is used to train a multi-layer fully connected neural network, dynamically adjusting the evolution rules to improve the stability and generalization ability of the neural network model in feature extraction. Through a self-correction mechanism, the algorithm can adapt to different data distributions, avoiding problems such as gradient vanishing and exploding. Third, in terms of feature dimensionality reduction, a self-encoding neural network model based on feature refinement is used. Through a recursive feature optimization module, feature weights are dynamically adjusted to gradually weaken unimportant features, achieving simplification of low-dimensional features while maintaining information integrity. The decoder ensures the reversibility of information during the dimensionality reduction process, ensuring minimal information loss. Fourth, in terms of feature classification, a deep neural decision tree algorithm based on local topology is used, combined with quantum mechanical optimization techniques, to improve the classifier's decision-making ability in complex feature spaces. Through a quantum state search mechanism, the feature segmentation rules of the decision tree nodes are optimized to ensure maximum information gain and improve classification accuracy.

[0189] Furthermore, this disclosure also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above methods. Additionally, this disclosure also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the above methods.

[0190] The embodiments of this disclosure are as described above. These embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the above description. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this disclosure, thereby enabling those skilled in the art to make good use of the embodiments of this disclosure and modifications based on them. The embodiments of this disclosure are limited only by the claims and their full scope and equivalents.

Claims

1. A method for training a classroom teaching comfort assessment model, comprising: Data samples were collected using IoT sensors within the classroom. The labeled data samples are augmented using a data augmentation model. The labeled data samples are obtained by adding classroom teaching comfort level labels to the data samples. The data augmentation model is the generator in a trained generative adversarial network model. The expanded labeled data samples are input into the feature extraction model for feature extraction to obtain multidimensional feature representations. The feature extraction model is trained by a neural network model optimized by dynamic population evolution. as well as The multidimensional feature representation is input into the feature dimensionality reduction model to perform feature dimensionality reduction, so as to obtain a low-dimensional feature representation. The feature dimensionality reduction model is the encoder in a trained autoencoder neural network algorithm. The low-dimensional feature representation is input into a classifier for training. The classifier is a trained deep neural decision tree algorithm based on local topology. The classifier is used to output the classroom teaching comfort level. The training process of the local topology-based deep neural decision tree algorithm includes the following steps: Initialize the deep neural decision tree; Perform a node nonlinear transformation on each decision node; The decision rules of each node in the decision tree are optimized by using the quantum state-based quantum optimization search principle. Based on information obtained from neural network modules and quantum search, the tree structure is dynamically adjusted. Determine whether the preset stopping iteration condition is met. If not, proceed to the step of optimizing the decision rules of each node in the decision tree using the quantum optimization search principle based on quantum states. If yes, end the training process.

2. The evaluation model training method according to claim 1, wherein, The loss function of the generator includes a sparse regularization term related to the weights and biases of each layer of the generator.

3. The evaluation model training method according to claim 2, wherein the loss function of the generator is expressed as the following equation: in, The loss function of the generator is y. c,real y is the probability that the discriminator identifies it as real data. c,fake R is the probability that the discriminator classifies a piece of data as fake. c () represents the sparse regularization term, and ||||1 represents the L1 norm. Let λ represent the L1 norm of each parameter of the generator. c It is a hyperparameter of the regularization strength, ||W c,i ||1 and||b c,i ||1 represents the L1 norm of the weights and biases of the i-th layer, respectively.

4. The evaluation model training method according to claim 1, wherein, In the generative adversarial network model, the learning rate of both the generator and the discriminator is related to the loss difference between the generator and the discriminator.

5. The evaluation model training method according to claim 4, wherein, The learning rates of the generator and discriminator in the generative adversarial network model are expressed by the following equations: in, This represents the loss of the discriminator. The loss of the generator is represented by ΔL. c This represents the loss difference between the discriminator and the generator. and These are the learning rates of the generator and the discriminator, respectively, where η0 is the base learning rate and α is the base learning rate. c It is an adjustment factor.

6. The evaluation model training method according to claim 4 or 5, wherein the parameter update method of the generator and the discriminator is expressed by the following equation: In the formula, and These are the updated learning rate of the generator and the parameters of the discriminator. and These are the learning rate of the generator and the parameters of the discriminator before the update. and These are the gradients of the generator's loss function and the discriminator's loss function, respectively. and These are the learning rate of the generator and the learning rate of the discriminator, respectively.

7. The evaluation model training method according to claim 1, wherein the training process of the dynamic population evolution optimization neural network model includes: An initial population is set up based on the biomimetic algorithm initialization method; For each individual in the population, the input data is processed using its corresponding neural network configuration, the output of the model is calculated, and its performance is evaluated according to a predetermined loss function. Based on the individual's fitness, the best-performing individual from the current population is selected and retained as a candidate solution for the next generation; For the candidate solutions of the next generation, new individuals are generated through crossover and mutation operations; as well as Determine whether the preset stopping iteration condition is met. If not, jump to the step of processing the input data, calculating the model output, and evaluating its performance according to the predetermined loss function for each individual in the population using its corresponding neural network configuration. If yes, end the training process.

8. The evaluation model training method according to claim 7, wherein, The predetermined loss function is expressed as the following equation: Among them, L pi Let be the loss function of the neural network corresponding to the i-th individual, mps represent the number of samples in the current batch; l() represents the composite loss function, and fsig() represents the neural network model function. Represents the features of the j-th sample. W represents the label of the j-th sample. pi Here, MSE() represents the weights of the neural network corresponding to the i-th individual, and Reg(W) is the mean squared error function. pi ) is the regularization term, λ ps W is the regularization parameter. pi,k Let b be the k-th weight of the neural network corresponding to the i-th individual. pi This is the bias of the neural network corresponding to the i-th individual.

9. The evaluation model training method according to claim 1, wherein, The autoencoder neural network algorithm includes an encoder, a decoder, and a feature adjustment module. The encoder adopts a multi-layer nonlinear mapping structure to map high-dimensional data to a low-dimensional feature space. The feature adjustment module performs multiple rounds of recursive optimization on the low-dimensional features, and in each iteration, it adjusts the weights of each feature based on the performance of the features in the previous round; the decoder remaps the low-dimensional features back to the high-dimensional space.

10. The evaluation model training method according to claim 1, wherein performing node nonlinear transformation on each decision node includes: Each decision node is implemented using a feedforward network, with the data features of the decision node as input and the decision signal as output. The feature weights in each decision node are dynamically adjusted based on the adaptive feature feedback mechanism, and the feature weights are automatically adjusted based on the performance of each feature in the classification process by monitoring the feature utility of each feature.

11. The evaluation model training method according to claim 10, wherein the output is represented as: In the formula, D is the dimension of the input feature, and W... u,i and b u These are the weights and biases of the feedforward network, Sh u () is an activation function based on non-linear components, Sig() is the Sigmoid activation function, and γ u It is the learning rate parameter, E u,i Let x be the feature utility of the i-th feature. u,i It is the i-th feature vector of the input.

12. The evaluation model training method according to claim 10, wherein, At each decision node, the feature utility of the i-th feature is defined as follows: In the formula, C is the classification result set, and O is the classification result set. c δ is the output probability of class c. c It is the gain corresponding to classification accuracy. Indicates feature x u,i For output O c Sensitivity.

13. The evaluation model training method according to claim 10, wherein, The activation function based on nonlinear components is expressed as: h u (x u,i ,W′ u,i )=tanh(W′ u,i ·x u,i +b′ u,i ) (4.4) In the formula, tanh(W′) u,i ·x u,i +b′ u,i Let W' be the hyperbolic tangent function. u,i and b′ u,i The additional weights and biases within the same decision node, x u,i It is the i-th feature vector of the input.

14. The evaluation model training method according to claim 1, wherein, The data sample includes one or more of the following items: classroom temperature, light intensity, noise level, student density, time, student interaction frequency, classroom door and window status, and student attention index.

15. A method for assessing classroom teaching comfort, comprising: Collect real-time data through IoT sensors; A feature extraction model is used to extract features from real-time data to obtain multidimensional feature representations. The feature extraction model is trained by a neural network model optimized by dynamic population evolution. The multidimensional feature representation is input into a feature dimensionality reduction model for feature reduction to obtain a low-dimensional feature representation. The feature dimensionality reduction model is a trained encoder based on an autoencoder neural network algorithm. The low-dimensional feature representation is input into a classifier to output the corresponding classroom teaching comfort level. The classifier is a trained local topology-based deep neural decision tree algorithm. The training process of the local topology-based deep neural decision tree algorithm includes the following steps: Initialize the deep neural decision tree; Perform a node nonlinear transformation on each decision node; The decision rules of each node in the decision tree are optimized by using the quantum state-based quantum optimization search principle. Based on information obtained from neural network modules and quantum search, the tree structure is dynamically adjusted. Determine whether the preset stopping iteration condition is met. If not, proceed to the step of optimizing the decision rules of each node in the decision tree using the quantum optimization search principle based on quantum states. If yes, end the training process.

16. A computer device, comprising: The memory is used to store the processing program; A processor that, when executing the processing program, implements the method as described in any one of claims 1 to 15.

Citation Information

Patent Citations

  • Building thermal comfort prediction method and device based on indoor number of people

    CN116485026A

  • Decision-making method for unmanned aerial vehicle control system based on edge calculation

    CN118394112A