Classroom teaching comfort evaluation model training method and evaluation method

By collecting data in the intelligent classroom and using models such as generative adversarial networks, dynamic group evolution optimization neural networks, auto-coding neural networks and deep neural decision trees for feature extraction and classification, the problem of teaching comfort assessment in the intelligent classroom is solved, and efficient and intelligent management is achieved.

CN119760555AActive Publication Date: 2025-04-04CHENGDU KAIYUAN COMPUTING ECOLOGICAL TECHNOLOGY CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology lacks a complete set of artificial intelligence models and cannot effectively evaluate the teaching comfort of smart classrooms.

Method used

Data samples are collected through IoT sensors, and the data samples are expanded using the generative adversarial network model. Then the expanded data samples are input to the feature extraction model for feature extraction, then feature dimensionality reduction is performed, and finally the feature after dimensionality reduction is input to the classifier to output the classroom teaching comfort level.

Benefits of technology

It has achieved an effective assessment of classroom teaching comfort, improved the intelligence level of intelligent classroom management, and solved the problems of insufficient data and poor generalization capabilities of model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760555A_ABST
    Figure CN119760555A_ABST
Patent Text Reader

Abstract

The invention discloses an evaluation model training method and an evaluation method for classroom teaching comfort. The method comprises the following steps: collecting a data sample through an Internet of Things sensor in a classroom; expanding the labeled data sample by using a data expansion model, wherein the data expansion model is a generator in the trained adversarial network model; the expanded labeled data samples are input into a feature extraction model for feature extraction so as to obtain multi-dimensional feature expression, and the feature extraction model is obtained through training of a neural network model subjected to dynamic group evolution optimization; the multi-dimensional feature expression is input into a feature dimension reduction model for feature dimension reduction so as to obtain low-dimensional feature expression, and the feature dimension reduction model is an encoder in a trained self-encoding neural network algorithm; and inputting the low-dimensional feature expression to a classifier for training, the classifier being a trained local topology deep neural decision tree algorithm, and the classifier being used for outputting a classroom teaching comfort level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of artificial intelligence technology, and in particular to a training method and an evaluation method for an evaluation model of classroom teaching comfort. Background Art

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

[0003] As an application direction, the AI ​​model is used to evaluate the classroom teaching comfort based on the data collected in real time from the smart classroom, and the evaluation results are fed back to the managers of the smart classroom for processing. However, in practice, it is found that there is currently no complete AI model solution that can achieve good results in the above application direction. Summary of the invention

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

[0005] In a first aspect, an embodiment of the present disclosure provides a method for training a classroom teaching comfort evaluation model, comprising:

[0006] Collect data samples through IoT sensors in the classroom;

[0007] Using a data expansion model to expand the labeled data samples, the labeled data samples are obtained by adding classroom teaching comfort level annotations to the data samples, and the data expansion model is a generator in a trained adversarial network model;

[0008] Inputting the expanded labeled data samples into a feature extraction model for feature extraction to obtain a multi-dimensional feature expression, wherein the feature extraction model is trained by a neural network model optimized by dynamic population evolution; and

[0009] Inputting the multi-dimensional feature expression into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression, wherein the feature dimensionality reduction model is an encoder in a trained autoencoder neural network algorithm;

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

[0011] In some embodiments, the loss function of the generator includes a sparse regularization term associated with 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]

[0015]

[0016] in, is the loss function of the generator, y c,real is the probability that the discriminator identifies the data as real data, y c,fake is the probability that the discriminator identifies it as false data, R c () is the sparse regularization term, ∥∥1 represents the L1 norm, represents the L1 norm of each parameter of the generator, λ c is a hyperparameter of the regularization strength, ∥W c,i ∥1 and ∥b c,i ∥1 are the L1 norms of the weights and biases of the i-th layer respectively.

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

[0018] In some embodiments, the learning rate of the generator and the learning rate of the discriminator in the generative adversarial model are expressed as the following equations:

[0019]

[0020]

[0021]

[0022] in, represents the loss of the discriminator, represents the loss of the generator, ΔL c represents the loss difference between the discriminator and the generator, and are the learning rates of the generator and the discriminator respectively, η0 is the base learning rate, α c is the adjustment factor.

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

[0024]

[0025]

[0026] In the formula, and are the learning rates of the updated generator and the discriminator, respectively. and is the learning rate of the generator and the learning rate of the discriminator before updating, and are the gradient of the loss function of the generator and the gradient of the loss function of the discriminator, respectively.

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

[0028] According to the bionic algorithm initialization method, set an initial population;

[0029] For each individual in the population, use its corresponding neural network configuration to process the input data, calculate the model's output, and evaluate its performance based on a predetermined loss function;

[0030] According to the fitness of the individual, the best performing individual is selected from the current population and retained as the candidate solution for the next generation;

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

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

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

[0034]

[0035]

[0036]

[0037] Among them, L pi is the loss of the neural network corresponding to the i-th individual, and mps represents the number of samples input in the current batch; represents the composite loss function, fsig() represents the neural network model function, represents the characteristics of the jth sample, represents the label of the jth sample, W pi is the weight of the neural network corresponding to the i-th individual, MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter, W pi,k is the kth weight of the neural network corresponding to the ith individual.

[0038] In some embodiments, the autoencoding neural network algorithm includes an encoder, a decoder and a feature adjustment module. The encoder uses 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 low-dimensional features, and in each round of iteration, adjusts the weight of each feature based on the performance of the previous round of features; the decoder remaps the low-dimensional features back to the high-dimensional space.

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

[0040] Initialize the deep neural decision tree;

[0041] Perform node nonlinear transformation on each decision node;

[0042] Utilize the quantum optimization search principle based on quantum states to optimize the decision rules of each node in the decision tree;

[0043] Dynamically adjust the tree structure based on information obtained from the neural network module and quantum search, and

[0044] Determine whether the preset stop iteration condition is met. If not, jump to the step of optimizing the decision rule of each node in the decision tree by using the quantum optimization search principle based on the quantum state. If yes, end the training process.

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

[0046] A feedforward network is used to implement each decision node, the input is the data feature of the decision node, and the output is the decision signal;

[0047] The feature weights in each decision node are dynamically adjusted according to the adaptive feature feedback mechanism, and the feature utility of each feature in the classification process is monitored and the feature weights are automatically adjusted according to its performance.

[0048] In some embodiments, the output is represented by:

[0049]

[0050] In the formula, D is the dimension of the input feature, Wu,i and b u are the weights and biases of the feedforward network, Sh u () is the activation function based on nonlinear components, Sig() is the Sigmoid activation function, γ u is the learning rate parameter, E u,i is the feature utility of the ith feature.

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

[0052]

[0053] In the formula, C is the classification result set, O c is the output probability of category c, δ c is the gain corresponding to classification accuracy, Represents feature x u,i For output O c sensitivity.

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

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

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

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

[0058] In a second aspect, the present disclosure provides a method for evaluating classroom teaching comfort, including:

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

[0060] Using a feature extraction model to extract features from real-time data to obtain multi-dimensional feature expression, the feature extraction model is trained by a neural network model optimized by dynamic population evolution;

[0061] Inputting the multi-dimensional feature expression into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression, wherein the feature dimensionality reduction model is an encoder in a trained autoencoder neural network algorithm; and

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

[0063] In a third aspect, an embodiment of the present disclosure provides a computer device, including: a memory, the memory being used to store a processing program;

[0064] A processor implements the above method when the processor executes the processing program.

[0065] The classroom teaching comfort assessment model training method and classroom teaching comfort assessment method provided by the embodiments of the present disclosure apply artificial intelligence to classroom teaching comfort assessment, which helps to improve the level of intelligent management of classroom teaching. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The above and other objects, features and advantages of the embodiments of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0067] Figure 1 It is a flow chart of a method for training a classroom teaching comfort evaluation model provided by an embodiment of the present disclosure;

[0068] Figure 2 yes Figure 1 Flowchart of the training process of the generative adversarial network model in ;

[0069] Figure 3 yes Figure 1 Flowchart of the training process of the feature extraction model (neural network model based on dynamic population evolution optimization);

[0070] Figure 4 yes Figure 1 Flowchart of the training process of the feature dimension reduction model (neural network model based on dynamic population evolution optimization) in ;

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

[0072] Figure 6 It is a flow chart of a method for evaluating classroom teaching comfort provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0073] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale. In addition, some well-known parts may not be shown.

[0074] The following describes the embodiments of the present disclosure based on the embodiments, 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, some specific details are described in detail. For those skilled in the art, the embodiments of the present disclosure can be fully understood without the description of these details. In order to avoid confusing the essence of the embodiments of the present disclosure, well-known methods, processes, processes, components and circuits are not described in detail.

[0075] Unless the context clearly requires otherwise, the words "include", "comprising" and the like throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as "including but not limited to". In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0076] Figure 1 1 is a flow chart of a method for training a classroom teaching comfort evaluation model provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes the following steps.

[0077] In step S10, data samples are collected through IoT sensors.

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

[0079] In step S30, the expanded labeled data samples are input into a feature extraction model for feature extraction to obtain a multi-dimensional feature expression.

[0080] In step S40, the multi-dimensional feature expression is input into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression.

[0081] In step S50, the low-dimensional feature expression is input to the classifier for training.

[0082] Regarding step S10, the data collected in this embodiment are mainly from a variety of IoT sensors deployed in the smart classroom, including but not limited to temperature sensors, light sensors, sound sensors, and student position tracking sensors. The data collection method adopts a real-time wireless transmission system, and all collected data are stored in a local secure database in a structured format. In some embodiments, the data collected by the IoT sensors include the temperature (Ra), light intensity (Rb), noise level (Rc), student density (Rd), time (Re), student interaction frequency (Rh), door and window status (Ri), and student attention index (Rj) in the classroom. In some embodiments, these data are organized in JSON (JavaScript Object Notation) format and stored in a local secure database.

[0083] The following is an example of organizing this data in JASON format:

[0084] Sample{

[0085] {

[0086] "Environmental factors":

[0087] {"Temperature":22,"Light intensity":500,"Noise level":45,"Student density":

[0088] 0.8},

[0089] "Time and Courses":

[0090] {"Time":"2023-11-28 10:00","Course Type":"Mathematics"},

[0091] "Classroom Facilities":

[0092] {"Door and Window Status":"Closed"},

[0093] "Student Status":{"Student Attention Index":85}

[0094] }

[0095] Furthermore, the classroom teaching comfort level is annotated for the data sample by manual annotation. For example, the classroom teaching comfort level is divided into 5 levels, and the higher the level, the higher the classroom teaching comfort level. The annotation can be combined with the above JASON format data. Taking the above sample Sample as an example, a data item is added: {"classroom teaching comfort level": 1}.

[0096] Regarding step S20, it can be 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 virtual variables to expand the data samples to solve the problem of insufficient samples that may exist in certain categories of the smart classroom data set, and enhance the generalization ability of model training by leveraging the powerful ability of the generative adversarial network model to generate high-quality and reliable data samples.

[0097] In the Generative Adversarial Network, the Generator and the Discriminator are two key components that learn how to generate realistic data and how to distinguish between real data and generated data through the adversarial process. The Generative Adversarial Network model used in this step adds a sparse regularization technique for local smoothness to the traditional Generative Adversarial Network to optimize the characteristics of the generated data and ensure that the distribution of the generated data in the feature space is more uniform and highly consistent with the real data. The training process of the Generative Adversarial Network model is as follows: Figure 2 As shown, the following steps are included:

[0098] 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 real data, and the discriminator is responsible for distinguishing real data from fake data generated by the generator. Let the generator be G c , the discriminator is D c , the way to initialize its parameters is expressed as formula (1.1) and (1.2):

[0099]

[0100]

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

[0102] In step S202, the generator and the discriminator are trained adversarially using their respective loss functions. In the adversarial training phase, the generator and the discriminator will enter a dynamic training process. The generator tries to generate more and more realistic data, while the discriminator strives to improve its ability to identify fake data. c The way to generate data is expressed as equations (1.3) and (1.4):

[0103]

[0104] zc ~N(0,1)(1.4)

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

[0106] And, the discriminator D c Determine the real data and generated data, expressed as equations (1.5) and (1.6):

[0107]

[0108]

[0109] In the formula, x c is the real data, y c,real and c,fake are the judgment results of the discriminator on real data and generated data respectively; D c () is the discriminator function; are the parameters of the discriminator.

[0110] During adversarial training, the loss functions of the discriminator and generator are calculated as shown in equations (1.7) and (1.8):

[0111]

[0112]

[0113] In the formula, is the loss function of the discriminator, which aims to maximize the ability to distinguish between real data and generated data; is the loss function of the generator, which aims to deceive the discriminator into judging the generated data as real data; c,real is the probability that the discriminator identifies the data as real data; c,fake is the probability that the discriminator identifies it as false data; R c () is the sparse regularization term.

[0114] In step S203, during the adversarial training process, a sparse regularization term is used to control the distribution of generated data. By adjusting the regularization parameter, the generated data is balanced between diversity and novelty to avoid overfitting or generating data of poor quality. Specifically, the calculation method of the sparse regularization term is expressed as formulas (1.9) and (1.10):

[0115]

[0116]

[0117] In the formula, ∥∥1 represents the L1 norm; represents the L1 norm of the generator parameters, λ c is a hyperparameter of the regularization strength, ∥W c,i ∥1 and ∥b c,i ∥1 is the L1 norm of the weight and bias of the i-th layer, i represents the layer number. The L1 norm is the sum of the absolute values ​​of the components of the vector. Preferably, λ c Set to 0.3.

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

[0119] In step S204, during the adversarial training process, a dynamically adjusted adversarial balance mechanism is used to adjust the learning rates of the generator and the discriminator in real time to maintain a dynamic balance between the two, optimize the training process, reduce training time and improve the quality of generated data. The learning rate is a parameter used to adjust the update step size of the model parameters in the optimization algorithm. When training a generative adversarial network model, the weights of the generator and the discriminator are updated according to the gradient of the loss function, and the learning rate determines the magnitude of each update. The traditional learning rate is usually set statically, which can easily lead to the discriminator quickly surpassing the generator or the generator being over-optimized in the early stages of training. By calculating the loss difference and dynamically adjusting the learning rate according to the loss difference, the loss difference is calculated as formula (1.11):

[0120]

[0121] In the formula, represents the loss of the discriminator, represents the loss of the generator, ΔL c represents the loss difference between the discriminator and the generator.

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

[0123]

[0124]

[0125] In the formula, and are the learning rates of the generator and the discriminator, η0 is the base learning rate, α c is an adjustment factor used to control the rapid adaptability of the learning rate. Preferably, α c is set to 0.3, and η0 is set to 0.01.

[0126] Furthermore, the parameter update method of the generator and the discriminator is expressed as:

[0127]

[0128]

[0129] In the formula, and is the learning rate of the updated generator and discriminator, and is the learning rate of the generator and discriminator before updating, and are the gradients of the loss functions of the generator and the discriminator, respectively.

[0130] In steps S205 and S206, it is determined whether the preset stop 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 completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0131] After the training is completed, the trained generator is used to increase the number of samples. In one embodiment, assuming that the original collected samples are 800, and the expanded generated samples are 200, the expanded data set contains 1000 samples.

[0132] Regarding step S30, this step uses a neural network structure based on dynamic population evolution optimization (for example, neural population dynamic optimization algorithm, NPDOA) connected by multiple layers of fully connected layers as a feature extraction model. In the prior art, when using traditional neural networks for feature extraction, in some neural network structures, problems such as gradient vanishing, gradient explosion, or falling into local optimal solutions may be encountered, affecting the stability of training and the performance of the model. The neural network model based on dynamic population evolution optimization in this step uses a self-correction mechanism to automatically adjust the evolution rules according to the characteristics of the current training data, and adjusts the probabilities of crossover and mutation according to the changing trend of the loss function, thereby naturally reducing the risk of overfitting. At the same time, compared with the traditional population evolution algorithm in which the evolution of all individuals is based on fixed rules, the automatic adjustment of the evolution rules can more flexibly adapt to different data distributions, thereby improving the generalization ability and training efficiency of the model. 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:

[0133] In step S301, an initial population is generated according to the bionic algorithm initialization method, and each individual represents a configuration of network weights. Specifically, let the population size be N p, initialize the weights and biases for the i-th individual, expressed as:

[0134]

[0135]

[0136] Where W pi is the weight of the neural network corresponding to the i-th individual, b pi is the bias of the neural network corresponding to the i-th individual, 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 initialization variance; Indicates that the mean is 0 and the variance is σ 2 Normal distribution of is a normal distribution. Preferably, σ 2 Set to 0.01.

[0137] In step S302, for each individual in the population, the corresponding neural network configuration is used to process the input data, calculate the output of the model, and calculate the loss according to the predetermined loss function, and evaluate its performance according to the loss. Specifically, for the i-th individual, the loss on the training data set is calculated using its weight and bias, expressed as:

[0138]

[0139] 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; represents the composite loss function, and fsig() represents the neural network model function; Represents the characteristics of the jth sample; represents the label of the jth sample, W pi is the weight of the neural network corresponding to the i-th individual.

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

[0141]

[0142] Where MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter.

[0143] Furthermore, the calculation method of the regularization term is expressed as:

[0144]

[0145] Where W pi,k is the kth weight of the neural network corresponding to the i-th individual.

[0146] In step S303, based on the fitness of the individual, the best performing individual is selected from the current population and retained as the candidate solution for the next generation. Specifically, based on the fitness of the individual, the excellent individual has a higher probability of being selected, and the calculation method of the probability of the individual being selected is expressed as:

[0147]

[0148] Where P select (i) represents the probability of the i-th individual being selected; γ pse is the parameter that controls the selection pressure; L pk is the loss of the neural network corresponding to the kth individual. Preferably, γ pse Set to 2.

[0149] In step S304, the candidate solutions outputted in the above steps are used to generate new individuals through crossover and mutation operations. The crossover operation allows two excellent individuals to exchange some genes to generate new offspring; the mutation operation randomly changes some genes in an individual to increase the diversity of the population. Specifically, the crossover operation randomly selects two individuals for gene exchange, which is expressed as:

[0150] W′ pi =α pcs W p1 +(1-α pcs )W p2 (2.7)

[0151] b′ pi =α pcs b p1 +(1-α pcs )b p2 (2.8)

[0152] In the formula, α pcs is the crossover rate, W p1 is the weight of the neural network corresponding to the first individual selected, b p1 is the bias of the neural network corresponding to the first individual selected, W p2 is the weight of the neural network corresponding to the second individual selected, b p2 is the bias of the neural network corresponding to the second individual selected, W′ pi is the weight of the neural network corresponding to the individual after the crossover operation, b′ pi is the bias of the neural network corresponding to the individual after the crossover operation. Preferably, αpcs Set to 0.3.

[0153] Moreover, the mutation operation performs a small random perturbation on the newly generated individual weights, which can be expressed as:

[0154]

[0155]

[0156] In the formula, τ 2 represents the variance of variation, W p ″ i is the weight of the neural network corresponding to the individual after the mutation operation, b p ″ i is the bias of the neural network corresponding to the individual after the mutation operation. Preferably, τ 2 Set to 0.04.

[0157] In steps S305 and S306, it is determined whether the preset stop iteration condition is met. If not, the process jumps to step S302 to continue execution. If yes, the training is terminated, indicating that the model training is completed. In one embodiment, the preset stop iteration condition is reaching the preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0158] Regarding step S40, an autoencoder neural network based on feature refinement is used as a dimensionality reduction model. The autoencoder neural network based on feature refinement consists of three parts: an encoder, a decoder, and a feature adjustment module. The encoder is responsible for mapping high-dimensional input data to a low-dimensional feature space, and the decoder is used to reconstruct the reduced-dimensional features back to the original space to ensure the reversibility of the dimensionality reduction process. The feature adjustment module dynamically adjusts the reduced-dimensional feature space through recursive feature adaptive optimization, so that important features can be strengthened and secondary features are gradually weakened, so that the reduced-dimensional feature representation has better simplicity while retaining data information.

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

[0160] In step S401, the data input to the autoencoder neural network is assumed to be X r , the encoder uses a multi-layer nonlinear mapping structure to map high-dimensional data to the initial low-dimensional feature space, which can be expressed as:

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

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

[0163] In step S402, after the low-dimensional features are generated, the feature adjustment module automatically generates feature weights according to the feature importance in the current feature space. When the module is initialized, the same initial weights are assigned to all features so that they can be gradually adjusted according to feature contributions in subsequent steps. The calculation method of the initial weight matrix is ​​expressed as:

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

[0165] In the formula, A r is the initial weight matrix; α r is the feature weight vector, α r Each element α in r,i Initialized to the same value, indicating that all features have the same importance in the initial stage; diag() is a function for extracting the diagonal elements of the matrix.

[0166] Furthermore, the adjusted features can be expressed as:

[0167] Z′ r =A r Z r (3.3)

[0168] In the formula, Z′ r is the feature representation after feature weight adjustment.

[0169] In step S403, the feature adjustment module performs multiple rounds of recursive optimization on the initially generated low-dimensional features. In each round of iteration, the module adjusts the weights of each feature according to the performance of the features in the previous round, gradually enhances those features with important influences, and gradually weakens redundant or noise features. Assume that in the tth round of iteration, the weight update rule is as follows:

[0170]

[0171] In the formula, represents the feature weight of the t+1th iteration, represents the feature weight of the tth iteration, η r is the learning rate of the autoencoder neural network, L r () is the loss function of the autoencoder neural network, Yr is the label data, represents the gradient of the loss function with respect to the feature weight. Preferably, the loss function of the autoencoder neural network is the reconstruction error loss function. Preferably, η r Set to 0.01.

[0172] In step S404, in order 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 in the dimensionality reduction process. The reconstruction process of the decoder is expressed as:

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

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

[0175] In step S405 and step S406, it is determined whether the preset stop iteration condition is met. If not, the process jumps to step S403 to continue execution. If yes, the training is terminated, indicating that the model training is completed. In one embodiment, the preset stop iteration condition is reaching the preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0176] Regarding step S50, the reduced-dimensional data is input into the classifier for training the classifier. The present invention adopts a local topology-based deep neural decision tree algorithm (DNDT) as a classification algorithm, and uses an optimal solution search algorithm based on quantum mechanics to optimize the construction process of the decision tree. It effectively locates the optimal decision path in a complex feature space, thereby improving the accuracy and efficiency of classification. 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, which is progressive layer by layer to form a composite tree network. The characteristics of the deep neural decision tree algorithm in local topology are manifested in its ability to simulate the branching structure of a decision tree. Such a structure allows the model to make decisions in a local area, similar to the segmentation of a decision tree in a local area.

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

[0178] In step S501, the deep neural decision tree is initialized, and the deep neural decision tree is set to T u , the number of nodes in the deep neural decision tree is n u , the decision threshold is θ u , then the setting method of the decision threshold is expressed as:

[0179]

[0180] In the formula, S u is at node n u The sample set assigned to u is the feature vector input to the deep neural decision tree.

[0181] In step S502, a node nonlinear transformation is performed, and 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 data features. Specifically, it is implemented through a feedforward network, the input is the data feature of the current decision node, and the output is the decision signal. The output of the network is expressed as:

[0182]

[0183] Where D is the dimension of the input feature, W u,i and b u are the weights and biases of the feedforward network of the small network, Sh u () is the activation function based on nonlinear components; Sig() is the Sigmoid activation function; γ u is the learning rate parameter, which is used to control the speed and amplitude of weight update; E u,i is the feature utility of the ith feature.

[0184] Furthermore, the distribution 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 according to its 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:

[0185]

[0186] In the formula, C is the classification result set, O c is the output probability of category c, δ c is the gain corresponding to the classification accuracy (i.e., the value when the classification is correct minus the value when the classification is wrong), Represents feature x u,i For output O c sensitivity.

[0187] In one embodiment, the activation function based on the nonlinear component is used to make the output more refined, allowing the decision node to process the input features more carefully before making a classification decision. The calculation method is expressed as:

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

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

[0190] In step S503, the decision rule of each node in the decision tree is optimized by using the quantum optimization search principle based on quantum state. Specifically, by simulating quantum behaviors, such as quantum entanglement and quantum superposition, the feature segmentation that maximizes the information gain is found, and then the decision threshold θ is updated. u , the simulation strategy is implemented in the following iterative way:

[0191]

[0192] In the formula, is the decision threshold at the tth iteration, is the decision threshold at the t+1th iteration; α u 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.

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

[0194]

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

[0196] Furthermore, the energy expectation value based on quantum probability distribution enables quantum optimization to find the optimal solution more effectively in the global search space. The calculation method is expressed as:

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

[0198] In the formula, P(Ψ u,i ) is the quantum state Ψ u,i The probability of occurrence, L(θ u ,Ψ u,i ) is given by u,i The loss function below.

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

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

[0201]

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

[0203] As the training progresses, the decision tree gradually matures, the decision path becomes more refined, and each leaf node will have a highly specialized classification ability, which can accurately mark the data samples belonging to its area of ​​responsibility. The classification ability of each leaf node is optimized by minimizing the misclassification rate. The optimization purpose is to adjust the decision rule of each leaf node to minimize its misclassification rate. The update rule is:

[0204]

[0205]

[0206] In the formula, ∈ u is the misclassification rate, y u is the true label, f(x u ,θ u ) is based on the decision threshold θ uThe classification function.

[0207] In step S505 and step S506, it is determined whether the preset stop 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 completed. In one embodiment, the preset stop iteration condition is to reach the preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 300. Accordingly, the embodiment of the present disclosure provides a classroom teaching comfort level evaluation method, the flow chart of which is as follows: Figure 6 As shown, the following steps are included.

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

[0209] In step S602, a feature extraction model is used to extract features from real-time data to obtain a multi-dimensional feature expression. The feature extraction model is obtained by training a neural network model optimized by dynamic population evolution.

[0210] In step S603, the multi-dimensional feature expression is input into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression. The feature dimensionality reduction model is an encoder in a trained autoencoder neural network algorithm.

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

[0212] The training steps of each model used in this embodiment can be referred to as shown above, and will not be repeated here.

[0213] In summary, the classroom teaching comfort assessment model training method and the classroom teaching comfort assessment method provided by the embodiments of the present 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 of the classroom teaching comfort evaluation model has the following advantages: First, in terms of data set expansion, the generator of the generative adversarial model is used to expand the intelligent classroom data set, which solves 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 adjust the evolution rules, and improve the stability and generalization of the neural network model in feature extraction. Through the self-correction mechanism, the algorithm can adapt to different data distributions to avoid problems such as gradient disappearance and explosion; third, in terms of feature dimensionality reduction, the autoencoder neural network model based on feature refinement dynamically adjusts the feature weights through the recursive feature optimization module, gradually weakens unimportant features, and achieves the effect of simplification while maintaining the integrity of low-dimensional features. The decoder ensures the reversibility of information in the dimensionality reduction process and ensures the minimum information loss; fourth, in terms of feature classification, a deep neural decision tree algorithm based on local topology is used, combined with quantum mechanics optimization technology, to improve the decision-making ability of the classifier in complex feature space, and through the quantum state search mechanism, the feature segmentation rules of the decision tree nodes are optimized to ensure the maximization of information gain and improve classification accuracy.

[0214] In addition, the embodiment of the present disclosure further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements each step in the above method when executing the computer program. At the same time, the embodiment of the present disclosure further provides a computer-readable storage medium, on which the computer program is stored, and the computer program implements the steps in the above method when executed by the processor.

[0215] The embodiments according to the embodiments of the present disclosure are described above, and these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present disclosure, so that those skilled in the art can make good use of the embodiments of the present disclosure and the modified use based on the embodiments of the present disclosure. The embodiments of the present disclosure are limited only by the claims and their full scope and equivalents.

Claims

1. A classroom teaching comfort evaluation model training method, comprising: Collect data samples through IoT sensors in the classroom; Using a data expansion model to expand the labeled data samples, the labeled data samples are obtained by adding classroom teaching comfort level annotations to the data samples, and the data expansion model is a generator in a trained adversarial network model; Inputting the expanded labeled data samples into a feature extraction model for feature extraction to obtain a multi-dimensional feature expression, wherein the feature extraction model is trained by a neural network model optimized by dynamic population evolution; as well as Inputting the multi-dimensional feature expression into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression, wherein the feature dimensionality reduction model is an encoder in a trained autoencoder neural network algorithm; The low-dimensional feature expression is input into a classifier for training. The classifier is a trained local topology deep neural decision tree algorithm. The classifier is used to output the classroom teaching comfort level.

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

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

4. The evaluation model training method according to claim 1, wherein: 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.

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

6. According to the evaluation model training method of claim 4 or 5, the parameter update method of the generator and the discriminator is expressed as the following equation: In the formula, and are the learning rates of the updated generator and the discriminator, respectively. and is the learning rate of the generator and the learning rate of the discriminator before updating, and are the gradient of the loss function of the generator and the gradient of the loss function of the discriminator, respectively.

7. According to the evaluation model training method of claim 1, the training process of the dynamic population evolution optimization neural network model includes: According to the bionic algorithm initialization method, set an initial population; For each individual in the population, use its corresponding neural network configuration to process the input data, calculate the model's output, and evaluate its performance based on a predetermined loss function; According to the fitness of the individual, the best performing individual is selected from the current population and retained as the 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 stop iteration condition is met. If not, jump to the step of processing the input data for each individual in the population using its corresponding neural network configuration, calculating the output of the model, and evaluating its performance according to a predetermined loss function. 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 is the loss of the neural network corresponding to the i-th individual, mps represents the number of samples input in the current batch; l( ) represents the composite loss function, fsig( ) represents the neural network model function, represents the characteristics of the jth sample, represents the label of the jth sample, W pi is the weight of the neural network corresponding to the i-th individual, MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter, W pi,k is the kth weight of the neural network corresponding to the ith individual.

9. The evaluation model training method according to claim 1, wherein: The autoencoding neural network algorithm includes an encoder, a decoder and a feature adjustment module. The encoder uses 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 round of iteration, adjusts the weight of each feature according to 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: The training process of the local topology-based deep neural decision tree algorithm includes the following steps: Initialize the deep neural decision tree; Perform node nonlinear transformation on each decision node; Utilize the quantum optimization search principle based on quantum states to optimize the decision rules of each node in the decision tree; Dynamically adjust the tree structure based on information obtained from the neural network module and quantum search, and Determine whether the preset stop iteration condition is met. If not, jump to the step of optimizing the decision rule of each node in the decision tree by using the quantum optimization search principle based on the quantum state. If yes, end the training process.

11. According to the evaluation model training method of claim 10, the performing of node nonlinear transformation on each decision node comprises: A feedforward network is used to implement each decision node, the input is the data feature of the decision node, and the output is the decision signal; The feature weights in each decision node are dynamically adjusted according to the adaptive feature feedback mechanism, and the feature utility of each feature in the classification process is monitored and the feature weights are automatically adjusted according to its performance.

12. 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, W u,i and b u are the weights and biases of the feedforward network, Sh u () is the activation function based on nonlinear components, Sig() is the Sigmoid activation function, γ u is the learning rate parameter, E u,i is the feature utility of the ith feature.

13. The evaluation model training method according to claim 11, wherein: At each decision node, the feature utility of the i-th feature is defined as: In the formula, C is the classification result set, O c is the output probability of category c, δ c is the gain corresponding to classification accuracy, Represents feature x u,i For output O c sensitivity.

14. The evaluation model training method according to claim 11, wherein: The activation function based on the nonlinear component 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 ) is the hyperbolic tangent function, W′ u,i and b′ u,i are additional weights and biases within the same decision node.

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

16. A method for evaluating classroom teaching comfort, comprising: Collect real-time data through IoT sensors; Using a feature extraction model to extract features from real-time data to obtain multi-dimensional feature expression, the feature extraction model is trained by a neural network model optimized by dynamic population evolution; Inputting the multi-dimensional feature expression into a feature dimensionality reduction model to perform feature dimensionality reduction to obtain a low-dimensional feature expression, wherein the feature dimensionality reduction model is a trained encoder based on an autoencoder neural network algorithm; and The low-dimensional feature expression is input into a classifier to output the corresponding classroom teaching comfort level, and the classifier is a deep neural decision tree algorithm with trained local topology.

17. A computer device comprising: A memory, the memory being used to store a processing program; A processor, wherein when executing the processing program, the processor implements the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Attention mechanism-based in-depth learning diabetic retinopathy classification method

    CN108021916A

  • Adaptive adversarial learning-based urban traffic scene semantic segmentation method and system

    CN110111335A

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

    CN116485026A

  • Agricultural equipment fault prediction data processing method based on artificial intelligence

    CN118152913A

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

    CN118394112A

Cited By

  • Tile durability evaluation method based on deep neural network

    CN120495737A