# Analysis of Affective Factors and Optimization Strategies of Emotion in Online Teaching Based on Improved SVM Model

Authors: Hong Wu; Trip Huwan
Journal: Security and Communication Networks
 (2022)

---

## Abstract

Online teaching has the advantages of not being limited by location and space but it also has some shortcomings. The lack of face-to-face real-time interaction between teachers and students will affect some students’ learning mood. The improved support vector machine (SVM) model is a simple model based on linear algebra, which can convert text data into structured data that can be processed by a computer and then calculate the similarity between two documents into the similarity between two vectors. The facial expression features of learners in the situation collected and extracted by the students of this project group are analyzed and modeled, and the time consumption, occupied space, and classification effect of the feature vectors produced by the improved model are integrated. The original feature dimension can be optimized from 100 dimensions to 60 dimensions, which not only saves the time of training feature vectors but also reduces the size of the final feature vectors. Besides, on the basis of 60-dimensional preliminary features extracted by SVM model, four classification models can also achieve the best results. Therefore, in the optimization part of feature extraction, the dimension of initial features extracted by SVM model is set to 60 dimensions. We can gradually use the improved SVM model to analyze the emotional influencing factors and optimization strategies in online teaching, so as to keep abreast of students’ lectures and let more students participate in online teaching as much as possible.


---

## Body

## 1. Introduction

With the development of the Internet, education is undergoing various changes. Online teaching has become a common teaching method. Students can realize online learning with the help of online learning platform. Online teaching has the advantages of not being limited by location and space, but it also has shortcomings. The lack of face-to-face and real-time interaction between teachers and students will affect the learning mood of some students. Emotion is a biological reaction tendency of individuals to adapt to important opportunities, events, and challenges in the living environment. It reflects the dynamic state of individual adaptation. Emotional response includes three main components: subjective feeling, expression behavior, and physiological response. Emotion is mainly composed of various specific emotions, including basic emotions and compound emotions [1, 2]. Higher vocational students are in their youth, their ideological and psychological state is not very mature, and their emotions are easily affected by the external environment. Therefore, higher vocational teachers should pay attention to students’ mental health, give full play to the advantages of the main position of “air classroom,” and actively take measures to stabilize students’ emotions. In teaching, we should understand the specific impact of teachers’ emotion on classroom effect and students’ own development, so as to adopt certain strategies to reasonably regulate teachers’ teaching emotion, which has positive practical significance for improving teaching quality [3]. Although the network has already entered ordinary people’s homes, classroom teaching through the network as usual is a thorny thing for teachers and students, which will inevitably produce anxiety and panic. This paper will review and analyze the gains and losses from the personal experience of self-psychological regulation and soothing students’ emotions [4, 5]. Positive teaching emotion should be the external embodiment of Chinese teachers’ learning and cultivation. Lofty ideological realm is the soul of Chinese teachers, profound knowledge is the pillar of Chinese teachers, and exquisite language art is the weapon of Chinese teachers. Trinity and mutual penetration can form the rich learning and cultivation of Chinese teachers. Just as Du Fu said: “the fish in the water is extremely happy, and the birds in the forest know their return,” the deeper and more luxuriant the Chinese teachers learn and cultivate, the more students can be like “fish bliss.”Compared with the schemes of LDCNN, LSCNN, and SoftmaxCNN, the improved support vector machine (SVM) model adopts artificial extraction of emotional features of words, and its accuracy is insufficient; SoftmaxCNN scheme cannot solve the gradient dispersion problem in the process of parameter optimization using the mutual entropy loss function; however, LSCNN scheme, which adopts static pooling, cannot fully extract emotional features according to the actual situation, and it is the best classification surface from the linear separable case [6]. The improved SVM model has a large amount of similarity calculation, and when new documents are added to the model, if new words are added, the vector dimension of the whole space may change, so it is necessary to recalculate the weight of words and update the previous document vector. It is not suitable for dealing with excessively long files because the approximate value is not ideal. The optimal classification surface requires that the two types of samples should be completely separated and the classification interval should be maximized to ensure the minimum real risk. The improved SVM model is a simple model based on linear algebra, which can convert text data into structured data that can be processed by a computer [7, 8]. Then, the similarity problem between two documents becomes the similarity problem between two vectors. Finally, the documents are sorted according to the similarity, and then local matching is performed according to the keyword or key text of the query, and the sorted results are returned [9, 10].The improved SVM model proposed in this paper studies the influence of all feature set training on emotion in online teaching, obtains a basic classifier, or uses three independent basic classifiers to form a combination, and these three classifiers are trained by a set of features [11]. The reason why two different models are selected is that in most cases, the performance of the model adapted from multiple basic classifiers is better than that of the emotion model of a single basic classifier, even if the same features are used in the two scenes, which reflects the advantages of the emotion multiclassifier method in online teaching to a certain extent [12]. In addition, peers have a common language. They can talk to each other when they study together, which is conducive to alleviating each other’s psychological pressure. Under the improved SVM model, teachers can use information-based teaching means to carry out rich and colorful teaching activities, such as using the functions of rush answer, selection, and questionnaire of learning pass to activate the classroom atmosphere and mobilize students’ emotion and enthusiasm. Because in the long-term prevailing hierarchical binary opposition between reason and emotion, reason has the absolute priority, and emotion always takes the second place as the opponent or threat of reason. Especially when it comes to professionals, one of its signs is calm, detached, and emotionally neutral at work. This makes teachers think that emphasizing the emotion of teaching will reduce their professional status, and “real” professional teachers can overcome their emotions and face all kinds of problems calmly and rationally. Gradually use the improved SVM model to analyze the influencing factors and optimization strategies of emotion in online teaching, timely understand the students’ attendance, and let more students participate in online teaching as much as possible. Timely correct the homework arranged through the tablet and promote students to participate in learning more actively by encouraging evaluation; In case of difficult problems, some students will consult teachers through response, WeChat or Hangzhou education, and promote the common growth of themselves and students by answering for students. The innovations of this paper are as follows:(1)
This paper constructs the teaching emotion model graph based on improved SVM. In the initial stage, it is necessary to train the data set used to generate the metadata of teaching emotion in SVM model under various parameter combinations, calculate the features and mark the categories of all the support vectors in the model, and then merge all the metadata samples into one metadata set. Finally, the metadata set is subjected to parameter search and model training to generate the final SVM teaching emotion model.(2)
An emotion analysis system based on improved SVM model is constructed. Analysis of online teaching based on improved SVM model according to the explanation of emotion, teaching emotion, and teachers’ emotional characteristics, teachers’ positive teaching emotion is defined as: teachers’ positive, happy and optimistic attitude towards teaching content, educational objects, educational methods, and teaching effects in online teaching.The overall structure of this paper consists of five parts.The first chapter introduces the background and significance of emotion in online teaching, and then introduces the main work of this paper. The second chapter mainly introduces the related work of emotion in online teaching at home and abroad. The third chapter introduces the research of improved SVM model. The fourth chapter introduces the result analysis and discussion of improving SVM model to analyze emotions in online teaching. The fifth chapter is a summary of the full text.


## 2. Research Status of the Influence of Emotion in Teaching at Home and Abroad

Hao proposed to compare and analyze the twitter data of the 2012 US general election and the 2013 Karnataka parliamentary election in India through machine learning algorithm models such as SVM, naive Bayes, maximum entropy model, and artificial neural network. In the final comparison, the SVM model achieved the best effect [13]. Bolier et al., in many studies, have also found that the internal and external processes of people regulating their emotional response, especially its intensity and long-term temporary characteristics, are related to the realization or achievement of personal goals [14]. Liu et al. crawled the relevant comment information for each topic of the forum, studied how to predict the popularity of hot topics based on text emotion analysis technology, designed the overall architecture, and finally realized its own network public opinion analysis system [15]. Emotion regulation in online teaching is a constructive way to adapt to variability and moderation and quickly and effectively adapt to the changing social situation [16]. Cho et al., in his master’s thesis, first analyzed the characteristics of blog, forum, news, and microblog. As the format and content of these texts are different, this paper proposed corresponding emotion analysis algorithms to solve these problems, and finally designed and implemented an emotion analysis system for online public opinion texts [17]. Online learning is not the cause of anxiety between teachers and students but the strangeness and exclusion of individuals in online learning. These emotions can be alleviated by adjusting cognition, such as taking online teaching as a new attempt and an opportunity to challenge ourselves, which can also help us have a good attitude [18]. Online teaching is different from classroom teaching after all. I hope we can pool our educational wisdom, give better play to the advantages of online teaching, invest in it with a good attitude and positive emotion, accumulate experience and lessons, and meet the arrival of future education with more confidence [19]. In view of the relationship between users’ emotional tendency and market fluctuations in the financial field, through the emotional analysis of relevant texts in the field, it can monitor the financial market and deal with stock price anomalies [20]. Emotion regulation can be understood as the process in which individuals manage, adjust or change their emotions. In this process, through certain behavioral strategies and mechanisms, emotions change in subjective feelings, expressive behaviors, physiological responses, and recognition. Emotion regulation occurs in the process of emotional response, which can be divided into cause regulation and response regulation [21]. Cao pointed out that the understanding of emotion regulation is worth noting in three aspects. First, emotion regulation is not only to reduce negative emotions, but actually it includes the enhancement, maintenance, and reduction of negative and positive emotions. Second, like the arousal of emotions, emotional regulation is sometimes conscious, and sometimes unconscious. Third, emotional regulation is not necessarily good or bad. It is good in one scenario and may be bad in another [22].Based on the improved SVM model, this paper studies the influence of emotion in online teaching and compares a group of domain-dependent strategies and domain-independent strategies. The model-based method enables this paper to directly adapt the existing model to the new target domain data. When empathizing with students in online teaching, we will inevitably find some new problems, which should be solved in new ways, so as to alleviate students’ anxiety, tension, fear, and other emotions, and accumulate more teaching experience. The most obvious feature of teacher emotion research is to put teacher emotion into school culture, management, power relationship, and interpersonal interaction. At the same time, the research on the political characteristics of emotion and the relationship between teachers’ emotion and leadership and management in education also shows that the deep-seated transformation at the cultural level can provide a good background for the implementation process of emotion and reduce the resistance of teachers’ emotion to some norms. Find a direction in empathy to promote teaching and learning. According to the idea of integrating online resource construction and offline classroom, this paper aims to try to build an online and offline hybrid curriculum system through the research on the hybrid teaching of special courses and improve the existing curriculum content and resources, curriculum organization and implementation, and curriculum evaluation to a certain extent. Through domain adaptation, the classification error of five emotion categories is minimized, which are anger, disgust, happiness, surprise, and sadness. Experimental results show that the performance of the proposed adaptive SVM classifier is significantly better than the extradomain classifier and has the same performance as the intradomain classifier.


## 3. Research on Improved SVM Model

### 3.1. Improved SVM Model and Algorithm

The improved SVM model expresses the user’s query requirements and database document information as points in the vector space composed of search terms, calculates the distance between vectors by some metric functions to determine the similarity between documents and queries, and then sorts the query results according to the similarity of documents [23]. The selection of feature vectors and the weight calculation of feature vectors are two key parts of the improved SVM model. If the methods of feature selection and weight calculation are different, the document will be converted into different styles of improved SVM model. According to the theory of the improved SVM algorithm, the samples of nonsupport vectors are bound to be classified correctly in case, so these samples are classified [24]. Second, the theoretical method is used to analyze each support vector in the emotional model of online teaching and calculate it, so as to dig out the potential relationship between each support vector and other support vectors, which can be used as the characteristics of this support vector in the situation. With the development of emotion theory, they put forward the theory of disappointment, which also tries to minimize the disappointment of decision makers in the decision-making process by changing the utility function of expected disappointment. Both regret theory and disappointment theory introduce expected emotion into the decision-making process through comparison, which shows the role of expected emotion in decision-making. Then, the application method is used, that is, an improved SVM model is used to judge whether emotional influencing factors and optimization strategies in online teaching are correct. Finally, the improved SVM model is calculated as shown in Figure 1.Figure 1
Teaching emotion model under improved SVM.Figure 1 shows the whole process of improving SVM algorithm. In the initial stage, it is necessary to train the SVM model under various parameter combinations for the data set used to generate metadata for teaching emotion, calculate the characteristics and mark the categories of all support vectors in the model, then combine all metadata samples into one metadata set, and finally conduct parameter search and model training for this metadata set to generate the final SVM teaching emotion model [25]. The model can be used for model evaluation of all problems in the future. From the perspective of geometry, the essence of SVM algorithm is to find an optimal hyperplane in the feature space, so that it can correctly divide positive and negative samples and obtain the maximum classification gap at the same time.Therefore, according to the theory of SVM algorithm, for a two-class problemxi,yi,i=1,...,m, where yi is +1 or −1, the definition of the problem is as follows:(1)hw,bx=ωTx+b,where ω is the unit normal vector of the hyperplane, and b is the intercept. Then the optimal hyperplane searched by SVM algorithm is hω,bx=0. On both sides of the hyperplane, the closest point to the plane is hω,bx=±1. Therefore, the classification gap between the two categories can be expressed as follows:(2)m=1ω.By maximizing the gap in the formula, the algorithm can find the optimal classification hyperplane for the data set. And maximizing the classification gap can be expressed as follows:(3)objp=minω,b12ω2∀i:yωTxi+b≥1.It is difficult to solve the publicity directly, so using the method of Lagrange multiplier factor, the problem in the formula can be transformed into its dual problem, so as to solve it.(4)objd=minα12∑i,j=1myiyjαiαjxixj−∑i=1mαi.The essence of the problem in publicity is to find the minimum of a constrained multivariate quadratic equation. As the quadratic equation is convex, some iterative algorithms can be used to find the approximate optimal solution.Therefore, the original problem constructed when the algorithm is linear and inseparable is as follows:(5)objp=minω,b,ξ12ω2+C∑i=1mξi.It can be seen from the formula that in addition to the relaxation factorξ, the equilibrium factor C is also introduced. The purpose of introducing the balance factor is to find the solution with the strongest generalization ability in the face of unknown situations by adjusting the balance factor C.The commonly used similarity measure function is to calculate the cosine distance between vectors. The general text data mining system adopts vector space model, which uses feature words and their weight vectors to represent the target information. In information matching, these feature items are used to evaluate the similarity between unknown texts and target samples. In the practical application of the improved SVM algorithm, the generalization ability of the trained SVM model is easily affected by the training parameters. When the trained parameters are not in the optimal range, the trained model is prone to over-fitting when dealing with unknown data. Therefore, it is necessary to evaluate the SVM models trained under different parameter combinations through model selection or parameter search operation, so as to find out the best parameter combination. The method used in this paper is to use the training set as the original data set, but the complete grid search will take a lot of time, and the search process will become more time-consuming if you want to find the best parameter sum in a wider range. Therefore, in this paper, the sum of optimized parameters is adopted in order to find out the best parameters in a short time. The whole algorithm process of improving parameters is shown in Figure2.Figure 2
Flow chart of using improved SVM algorithm.Taking the accuracy under the cross-validation of the training set as the fitness function value, according to the algorithm flow, first initialize the particle swarm, then calculate the fitness value of the particle, and calculate the optimal value of the particle and the global optimal value of the population. Finally, the formula and formula are used to update the velocity and position of particles. Judge whether the fitness value meets the termination conditions: if so, enter the optimal parameters. If not, enter a new iteration, that is, recalculate the fitness value of each particle.The improved SVM operation is usually a mathematical operation on two real valued functions. Improved SVM operation formula(6)St=∫xawt−ada.The first parameterx is called input, and the second parameter w is called core. Discrete SVM is(7)st=x∗wt=∑−∞∞xawt−a.Under the improved SVM, the cross-entropy objective function is adopted in the whole connection layer, and the category probability distribution of the final output is obtained. AssumingK categories, there are K output nodes in Softmax layer, which are denoted as pi,i=1,2,…,K. The specified discrete class probability distribution of pi, therefore, ∑i=1kpi=1. The output of the Softmax layer is denoted as a, the activation function of the previous layer is denoted as h, and W is used as the connection weight vector between the softmax layer and the previous layer.(8)ai=∑khkWki,where class distribution probability pi is as follows:(9)pi=expai∑j=1Kexpaj.The final improvement categoryi∧ is as follows:(10)i^=argmaxpi=argmaxai.The advantage of vector model is that it is a simple and easy-to-implement model, which can easily convert text data into vector data. The disadvantage is that the calculation of similarity is large. One of the biggest problems is that the similarity between words cannot be obtained, and the context information and the scale of data set are ignored, which is prone to dimension disaster. When the improved SVM algorithm is actually used, the features of support vectors are extracted from the models trained under different parameter combinations, and a sample is generated for each support vector. Then, SVM model is used to judge whether the generated samples are classified correctly. After merging the information of whether all the support vectors under all parameter combinations are classified correctly, the parameter combination with the strongest generalization ability is found. Finally, the optimal SVM model is trained by the optimal parameter combination and training set and used to predict the data.


### 3.2. Design of Emotion Analysis System Based on Improved SVM Model

During online teaching, all tasks assigned by teachers can only be presented to students with the help of e-learning platform, so teachers should consider students’ learning difficulties and psychological state when assigning learning tasks. The learning tasks should be clear and definite, the amount of tasks should be appropriate, and all students should be considered as much as possible. Teachers can adjust students’ psychological state with the help of flexible and diverse teaching methods. For example, teachers can encourage students to establish “air group” with the help of WeChat group and nail group, so that students can explore learning in the “air group.” This teaching method can provide students with an additional channel to communicate with the outside world at home. According to the obtained decision-maker’s emotional state probability, the convergent research decision support is carried out. This paper constructs an emotion analysis system based on the improved SVM model, considers the randomness and fuzziness of decision-makers’ emotion and language evaluation, quantifies the language evaluation by using the cloud model, and then sorts the schemes based on the emotion generalization hypothesis through the prospect theory. Examples show that this method can improve the effectiveness and accuracy of convergent research decision-making. Based on the study of learners’ Academic Emotion in context, combined with the relevant theories of emotional psychology and educational psychology, this paper further analyzes the relevant learning characteristics of learners in normal learning state. According to these characteristics and influencing factors, a new cognitive model of academic emotion recognition is established from the three dimensions of avoidance, concentration, and pleasure, combined with the emotion model. The standard SVM algorithm can only deal with the binary classification problem and output the determined category label. For the problem of emotion perception, on one hand, there are more than two kinds of emotions, so it is a multiclassification problem; On the other hand, the emotional state of decision-makers cannot be clearly classified into a certain category but can only belong to a certain category with a certain probability. In the implementation of many algorithms, the optimal solution is approximated by a large number of complex iterative strategies. In order to improve the efficiency of iteration, the iterative process is continuously optimized. In various implementation versions, the most typical iterative strategy is to judge a stop criterion and end the iteration when the stop criterion is met.Analysis of online teaching based on improved SVM model: According to the explanation of emotion, teaching emotion, and teachers’ emotional characteristics, teachers’ positive teaching emotion is defined as teachers’ positive, happy, and optimistic attitude towards teaching content, educational objects, educational methods and teaching effects in online teaching. In the improved SVM model to analyze emotion system, positive teaching emotion does not mean “all smiles” or “lofty sentiments.” Instead, in the dialogue with students and texts, students can achieve emotional resonance and aesthetic satisfaction, thus forming the teaching effect of “preaching” in “conveying feelings” and “dispelling doubts” in “explaining feelings.” Teachers should also be good at finding problems in students’ homework. When teachers review some homework submitted by students in terms of feelings and experiences, once they find that students have negative words and depressed expressions, teachers should pay more attention to and know the actual situation in time. If necessary, they can help students with various forces. The specific explicit behavior is that, in online teaching, the improved SVM model is used to analyze the emotional system, and the lectures are naturally continuous, accurate, and expressive, which can make students concentrate on listening, listen comfortably and learn happily, and naturally immerse themselves in them, with a harmonious and active atmosphere. Positive teaching mood can improve teachers’ initiative, produce strong teaching impetus, and make teachers willing to devote their energy to classroom teaching. On the contrary, negative teaching mood will reduce teachers’ teaching impetus, make teachers feel tired, and make students learn uninteresting. Teachers in higher vocational colleges should be clear about the influence of psychological factors on students’ health, and fully realize the significance of mental health. Based on the emotion model, using the nonlinear characteristics of small samples of SVM network, and using particle swarm optimization to improve the SVM, this paper analyzes from three dimensions: avoidance, concentration, and pleasure, and establishes learners’ emotion cognitive model and comprehensive emotion model under the situation. Among them, the emotional cognitive model can get a more accurate recognition rate of academic emotions, and the comprehensive emotional model can provide an important basis for subsequent teaching reasoning. In the improved SVM model analysis emotion system, teachers should pay more attention to students’ psychological state, care more, guide more, find and solve problems in time, and strive to be guardians of students’ psychological health in the process of organizing online teaching.


## 3.1. Improved SVM Model and Algorithm

The improved SVM model expresses the user’s query requirements and database document information as points in the vector space composed of search terms, calculates the distance between vectors by some metric functions to determine the similarity between documents and queries, and then sorts the query results according to the similarity of documents [23]. The selection of feature vectors and the weight calculation of feature vectors are two key parts of the improved SVM model. If the methods of feature selection and weight calculation are different, the document will be converted into different styles of improved SVM model. According to the theory of the improved SVM algorithm, the samples of nonsupport vectors are bound to be classified correctly in case, so these samples are classified [24]. Second, the theoretical method is used to analyze each support vector in the emotional model of online teaching and calculate it, so as to dig out the potential relationship between each support vector and other support vectors, which can be used as the characteristics of this support vector in the situation. With the development of emotion theory, they put forward the theory of disappointment, which also tries to minimize the disappointment of decision makers in the decision-making process by changing the utility function of expected disappointment. Both regret theory and disappointment theory introduce expected emotion into the decision-making process through comparison, which shows the role of expected emotion in decision-making. Then, the application method is used, that is, an improved SVM model is used to judge whether emotional influencing factors and optimization strategies in online teaching are correct. Finally, the improved SVM model is calculated as shown in Figure 1.Figure 1
Teaching emotion model under improved SVM.Figure 1 shows the whole process of improving SVM algorithm. In the initial stage, it is necessary to train the SVM model under various parameter combinations for the data set used to generate metadata for teaching emotion, calculate the characteristics and mark the categories of all support vectors in the model, then combine all metadata samples into one metadata set, and finally conduct parameter search and model training for this metadata set to generate the final SVM teaching emotion model [25]. The model can be used for model evaluation of all problems in the future. From the perspective of geometry, the essence of SVM algorithm is to find an optimal hyperplane in the feature space, so that it can correctly divide positive and negative samples and obtain the maximum classification gap at the same time.Therefore, according to the theory of SVM algorithm, for a two-class problemxi,yi,i=1,...,m, where yi is +1 or −1, the definition of the problem is as follows:(1)hw,bx=ωTx+b,where ω is the unit normal vector of the hyperplane, and b is the intercept. Then the optimal hyperplane searched by SVM algorithm is hω,bx=0. On both sides of the hyperplane, the closest point to the plane is hω,bx=±1. Therefore, the classification gap between the two categories can be expressed as follows:(2)m=1ω.By maximizing the gap in the formula, the algorithm can find the optimal classification hyperplane for the data set. And maximizing the classification gap can be expressed as follows:(3)objp=minω,b12ω2∀i:yωTxi+b≥1.It is difficult to solve the publicity directly, so using the method of Lagrange multiplier factor, the problem in the formula can be transformed into its dual problem, so as to solve it.(4)objd=minα12∑i,j=1myiyjαiαjxixj−∑i=1mαi.The essence of the problem in publicity is to find the minimum of a constrained multivariate quadratic equation. As the quadratic equation is convex, some iterative algorithms can be used to find the approximate optimal solution.Therefore, the original problem constructed when the algorithm is linear and inseparable is as follows:(5)objp=minω,b,ξ12ω2+C∑i=1mξi.It can be seen from the formula that in addition to the relaxation factorξ, the equilibrium factor C is also introduced. The purpose of introducing the balance factor is to find the solution with the strongest generalization ability in the face of unknown situations by adjusting the balance factor C.The commonly used similarity measure function is to calculate the cosine distance between vectors. The general text data mining system adopts vector space model, which uses feature words and their weight vectors to represent the target information. In information matching, these feature items are used to evaluate the similarity between unknown texts and target samples. In the practical application of the improved SVM algorithm, the generalization ability of the trained SVM model is easily affected by the training parameters. When the trained parameters are not in the optimal range, the trained model is prone to over-fitting when dealing with unknown data. Therefore, it is necessary to evaluate the SVM models trained under different parameter combinations through model selection or parameter search operation, so as to find out the best parameter combination. The method used in this paper is to use the training set as the original data set, but the complete grid search will take a lot of time, and the search process will become more time-consuming if you want to find the best parameter sum in a wider range. Therefore, in this paper, the sum of optimized parameters is adopted in order to find out the best parameters in a short time. The whole algorithm process of improving parameters is shown in Figure2.Figure 2
Flow chart of using improved SVM algorithm.Taking the accuracy under the cross-validation of the training set as the fitness function value, according to the algorithm flow, first initialize the particle swarm, then calculate the fitness value of the particle, and calculate the optimal value of the particle and the global optimal value of the population. Finally, the formula and formula are used to update the velocity and position of particles. Judge whether the fitness value meets the termination conditions: if so, enter the optimal parameters. If not, enter a new iteration, that is, recalculate the fitness value of each particle.The improved SVM operation is usually a mathematical operation on two real valued functions. Improved SVM operation formula(6)St=∫xawt−ada.The first parameterx is called input, and the second parameter w is called core. Discrete SVM is(7)st=x∗wt=∑−∞∞xawt−a.Under the improved SVM, the cross-entropy objective function is adopted in the whole connection layer, and the category probability distribution of the final output is obtained. AssumingK categories, there are K output nodes in Softmax layer, which are denoted as pi,i=1,2,…,K. The specified discrete class probability distribution of pi, therefore, ∑i=1kpi=1. The output of the Softmax layer is denoted as a, the activation function of the previous layer is denoted as h, and W is used as the connection weight vector between the softmax layer and the previous layer.(8)ai=∑khkWki,where class distribution probability pi is as follows:(9)pi=expai∑j=1Kexpaj.The final improvement categoryi∧ is as follows:(10)i^=argmaxpi=argmaxai.The advantage of vector model is that it is a simple and easy-to-implement model, which can easily convert text data into vector data. The disadvantage is that the calculation of similarity is large. One of the biggest problems is that the similarity between words cannot be obtained, and the context information and the scale of data set are ignored, which is prone to dimension disaster. When the improved SVM algorithm is actually used, the features of support vectors are extracted from the models trained under different parameter combinations, and a sample is generated for each support vector. Then, SVM model is used to judge whether the generated samples are classified correctly. After merging the information of whether all the support vectors under all parameter combinations are classified correctly, the parameter combination with the strongest generalization ability is found. Finally, the optimal SVM model is trained by the optimal parameter combination and training set and used to predict the data.


## 3.2. Design of Emotion Analysis System Based on Improved SVM Model

During online teaching, all tasks assigned by teachers can only be presented to students with the help of e-learning platform, so teachers should consider students’ learning difficulties and psychological state when assigning learning tasks. The learning tasks should be clear and definite, the amount of tasks should be appropriate, and all students should be considered as much as possible. Teachers can adjust students’ psychological state with the help of flexible and diverse teaching methods. For example, teachers can encourage students to establish “air group” with the help of WeChat group and nail group, so that students can explore learning in the “air group.” This teaching method can provide students with an additional channel to communicate with the outside world at home. According to the obtained decision-maker’s emotional state probability, the convergent research decision support is carried out. This paper constructs an emotion analysis system based on the improved SVM model, considers the randomness and fuzziness of decision-makers’ emotion and language evaluation, quantifies the language evaluation by using the cloud model, and then sorts the schemes based on the emotion generalization hypothesis through the prospect theory. Examples show that this method can improve the effectiveness and accuracy of convergent research decision-making. Based on the study of learners’ Academic Emotion in context, combined with the relevant theories of emotional psychology and educational psychology, this paper further analyzes the relevant learning characteristics of learners in normal learning state. According to these characteristics and influencing factors, a new cognitive model of academic emotion recognition is established from the three dimensions of avoidance, concentration, and pleasure, combined with the emotion model. The standard SVM algorithm can only deal with the binary classification problem and output the determined category label. For the problem of emotion perception, on one hand, there are more than two kinds of emotions, so it is a multiclassification problem; On the other hand, the emotional state of decision-makers cannot be clearly classified into a certain category but can only belong to a certain category with a certain probability. In the implementation of many algorithms, the optimal solution is approximated by a large number of complex iterative strategies. In order to improve the efficiency of iteration, the iterative process is continuously optimized. In various implementation versions, the most typical iterative strategy is to judge a stop criterion and end the iteration when the stop criterion is met.Analysis of online teaching based on improved SVM model: According to the explanation of emotion, teaching emotion, and teachers’ emotional characteristics, teachers’ positive teaching emotion is defined as teachers’ positive, happy, and optimistic attitude towards teaching content, educational objects, educational methods and teaching effects in online teaching. In the improved SVM model to analyze emotion system, positive teaching emotion does not mean “all smiles” or “lofty sentiments.” Instead, in the dialogue with students and texts, students can achieve emotional resonance and aesthetic satisfaction, thus forming the teaching effect of “preaching” in “conveying feelings” and “dispelling doubts” in “explaining feelings.” Teachers should also be good at finding problems in students’ homework. When teachers review some homework submitted by students in terms of feelings and experiences, once they find that students have negative words and depressed expressions, teachers should pay more attention to and know the actual situation in time. If necessary, they can help students with various forces. The specific explicit behavior is that, in online teaching, the improved SVM model is used to analyze the emotional system, and the lectures are naturally continuous, accurate, and expressive, which can make students concentrate on listening, listen comfortably and learn happily, and naturally immerse themselves in them, with a harmonious and active atmosphere. Positive teaching mood can improve teachers’ initiative, produce strong teaching impetus, and make teachers willing to devote their energy to classroom teaching. On the contrary, negative teaching mood will reduce teachers’ teaching impetus, make teachers feel tired, and make students learn uninteresting. Teachers in higher vocational colleges should be clear about the influence of psychological factors on students’ health, and fully realize the significance of mental health. Based on the emotion model, using the nonlinear characteristics of small samples of SVM network, and using particle swarm optimization to improve the SVM, this paper analyzes from three dimensions: avoidance, concentration, and pleasure, and establishes learners’ emotion cognitive model and comprehensive emotion model under the situation. Among them, the emotional cognitive model can get a more accurate recognition rate of academic emotions, and the comprehensive emotional model can provide an important basis for subsequent teaching reasoning. In the improved SVM model analysis emotion system, teachers should pay more attention to students’ psychological state, care more, guide more, find and solve problems in time, and strive to be guardians of students’ psychological health in the process of organizing online teaching.


## 4. Results Analysis and Discussion

In this test, SVM model, logistic regression model (LR), random forest model (RF), and decision tree model (DT) based on RBF kernel are used to classify 12,600 positive comments and 12,600 negative comments in the test corpus. The positive comments are marked with 1 and the negative comments are marked with 0. When adjusting the parameters of their models, compare their accuracy. The experimental results are shown in Figure3.Figure 3
Judgment results of four common classifiers on the accuracy of positive comments.As mentioned earlier, when the parameters of the respective models are better adjusted, the respective recall rates are compared, and the experimental results are shown in Figure4.Figure 4
Recall judgment results of four common classifiers for positive comments.From Figures3 and 4, the improved SVM achieves better results than RF, DT, and LR for both positive and negative comments, while DT is slightly better than RF. In addition, the four classifiers have better classification effect on negative comments. As the 100 dimensional feature vectors are extracted by SVM model, SVM and LR can achieve better results when the data tends to be linearly separable; If the decision boundary is nonlinear and the feature space can be divided by rectangle, the effect of decision tree DT and random forest RF is better. It can be considered that the vectors extracted by SVM model from these comment texts tend to be linearly separable in 100 dimensional space.The effect of the improved SVM is the best among the four dimensions, which is less affected by the change of dimensions, and the effect is stable. SVM takes more time to train the model, but after the training is completed, only the support vector part needs to be saved, so the model capacity is small and the classification speed is fast. The classification effects of the four models in different feature dimensions are shown in Figure5.Figure 5
Comparison of classification effects of four models in different feature dimensions.It can be seen from Figure5 that the time-consuming, space occupied and classification effect of the feature vector produced by the comprehensive improved model can optimize the original feature dimension from 100 dimensions to 60 dimensions, which not only saves the time of training the feature vector, but also reduces the size of the final feature vector. Moreover, on the basis of the 60 dimensional preliminary features extracted by the SVM model, the four classification models can also achieve the best effect. Therefore, in the optimization part of feature extraction, the dimension of extracting preliminary features from SVM model is set to 60 dimensions.In order to further illustrate the gradient dispersion phenomenon in the process of parameter optimization improved by the objective function of the improved SVM model, the updated comparison of SoftmaxCNN and SVM weights is listed. The experimental results are shown in Figure6.Figure 6
Comparison of Softmax and SVM weight update.As can be seen from Figure6, at the beginning of parameter update, the two trends are equal, fluctuating up and down, and there is an intersection between them when the weight is updated. When epochs = 5, the weight of SVM model tends to be stable, whereas SoftmaxCNN model fluctuates constantly. It shows that SVM can improve the gradient dispersion problem in the process of CNN parameter optimization and improve the generalization ability of the model.In order to observe the distribution characteristics of the data, first, the collected face area values of classmatea are grouped and preliminarily analyzed. According to Mosseri [6], the frequency distribution table of face area value of classmate a can be obtained (Table 1).Table 1
Frequency distribution of face area value of classmatea.
Group orderGroup medianFrequencyFrequencyCumulative frequency127,01880.0409080.040908231,132100.040.090907335,242280.1318170.2237814399,354620.2863620.508As can be seen from Table1, the collected face area values of classmate A are mainly concentrated in the changing range of one foot. Therefore, we can assume that if a sufficient number of detected face area bits conform to the normal distribution, then the change range of this face area concentration can be obtained, so as to detect whether the current learner is in a normal learning state.Using the aforementioned method, the collected face area bits of classmate B are equally listened to. Table2 shows the frequency distribution of face area values of students B.Table 2
B frequency distribution table of students’ face area values.
Group orderGroup medianFrequencyFrequencyCumulative frequency128,991110.0454530.045451230,522140.0681820.113635332,056120.0545510.16817433,591160.077260.244It can be seen from Table2 that the face area value of classmate B is about concentrated in the range of pixels [35,000 × 43,000]. The face area value reflects the distance between the face and the computer screen in the process of learning. It can be seen from the aforementioned data that the posture of classmate B is more stable than that of classmate a when learning in front of the screen. It is proved that the face area value detected and collected by different learners during learning has its uniqueness. At the same time, it also shows that the data detected and collected by each learner has certain stability according to their personal habits. The design of using different facial expression eigenvalues to establish the model is not accurate enough. For example, in the pleasure model, we only use the radian of the corner of the mouth to describe. Although good experimental results have been obtained, it can be seen from the experiment that the change of the radian of the corners of the mouth is not very large when learners are learning. Therefore, based on the existing models, the length of eyebrows is introduced to determine the pleasure model.To further verify the classification performance of SVM, the model is evaluated from the perspective of recall rate evaluation. The results of emotional recall rate are shown in Figure7.Figure 7
Recall results of emotional classification.It can be seen from Figure7 that with the increase of epochs, the recall rate results of LDCNN and SoftmaxCNN for SVM tend to be stable, indicating that the SVM loss function can improve the gradient dispersion phenomenon in the parameter update process relative to the cross-entropy loss function. The recall rate of SVM model is significantly higher than that of LDCNN and SoftmaxCNN models, indicating the effectiveness of SVM emotion classification. The design of personalized emotion model is not fine enough. Six personalized emotion models can be established for six basic academic emotions, which can not only improve the recognition accuracy of single academic emotion but also provide more accurate and effective input for avoidance model, focus model, and pleasure model.


## 5. Conclusion

In this paper, the emotion analysis in online teaching is studied by improving SVM model, and an online teaching emotion analysis system based on improved SVM model is constructed. The facial expression features of learners in the situation collected and extracted by the students in this project group are analyzed and modeled, and the original feature dimension can be optimized from 100 dimensions to 60 dimensions by integrating the time-consuming of the improved model to produce feature vectors, the size of the occupied space and the effect of classification. This not only saves the time of training feature vectors but also reduces the size of the final feature vectors. Besides, on the basis of the 60-dimensional preliminary features extracted by SVM model, the four classification models can also achieve the best results. Therefore, in the optimization part of feature extraction, the dimension of the preliminary features extracted by SVM model is set to 60 dimensions. Judge the learners’ emotional response to the current learning content, and then get the learners’ current academic emotional state, and then provide emotional functional support for personalized emotional teaching. Teachers should pay attention to sitting posture, neat, generous and beautiful clothes, smiling, and affable when they appear in the online teaching live broadcast. Teachers’ proper appearance can bring good feelings to students and have positive influence on them. In the future, this paper will study the feature-based deep learning method for Weibo’s cross-topic emotion classification, and analyze the possibility of making it flexible and efficient.



---

*Source: 2334544-2022-08-10.xml*