Research on Semisupervised Affective Interaction Technology in Immersive Virtual Teaching Environment

The separation of time and space in immersive virtual teaching makes students unable to realize emotional communication, which may a ﬀ ect students ’ mental health. In recent years, the use of a ﬀ ective computing technology to solve the problem of a ﬀ ective loss in distance education has become a key research topic. In order to realize the problem of emotion interaction in immersive virtual teaching, a semisupervised support vector machine- (SVM-) based a ﬀ ective interaction model was proposed. First, the natural language sequences of students in the virtual teaching environment are preprocessed using a statistical-based framing method, and mutual information and expected cross-entropy are used as feature selection methods. Then, a vector space model based on TF/IDF feature term weights is proposed to implement the feature vector representation of natural language sequences. Finally, after the constructed sentiment space, a semisupervised SVM is employed as the classi ﬁ er to complete the a ﬀ ective interaction computation. The experimental results of emotion classi ﬁ cation show that the proposed model is able to determine and understand the emotional state more accurately than other traditional models and signi ﬁ cantly improves the training speed. In addition, the proposed model can provide emotional encouragement or emotional compensation according to the speci ﬁ c emotional state of the learner.


Introduction
In recent years, virtual reality technology has gained widespread attention as a new type of educational media, providing a new technical means for modern distance education. Distance virtual instruction technology (DVIT) mainly combines modern information technology and human-computer interaction technology into the actual teaching tasks. At present, the networked education system has entered the era of personalised development. The networked education system needs to be intelligently adapted to the learning interests or learning emotions of different learners. Therefore, in order to promote the development of virtual distance learning, a very interesting research topic is how to apply psychology and affective computing to the field of education.
Virtual instruction is a two-way interactive teaching model using computer technology, communication technol-ogy, simulation technology, artificial intelligence technology, and so on [1][2][3][4][5][6][7]. In the United States, the number of people learning through the Internet is growing at an annual rate of over 300%. The U.S. Education Technology Forum has proposed the "Digital Learning" initiative. The "Smart Classroom" introduces the concept of interactive spaces to distance learning systems, where the key technologies are interactive spaces and human-computer interaction models.
Communication between humans and computers using natural means is the goal of human-computer interaction theory. As computers play an increasing role, there is a pressing desire to be able to manipulate them in a natural way. People can interact with machines in the same way that they interact with each other in everyday life (voice, gestures, and expressions) [8][9][10][11][12]. As a result, there has been an increasing amount of research in recent years on interacting with computers through multiple modalities, such as simple voice, gesture, and expression interaction. This human-like interaction has opened up a new generation of humancomputer interaction research [13][14][15]. The main point to note is that the connection between humans and computers has a certain natural and social character. Therefore, the most critical issue to be addressed in human-computer interaction is the capacity for affective intelligence, which is the main focus of this study. Affective interaction in virtual teaching refers to the positive and active tendencies between teachers and students in the virtual teaching process, reflecting the social relations and psychological activities of people in the virtual learning environment. In order to realize the problem of emotional interaction in immersive virtual teaching, this paper proposes an affective interaction model based on semisupervised support vector machines and verifies its effectiveness through testing.

Related Works
Affective computing is a hot topic in information science, cognitive science, and psychological science in recent years, based on human emotion and sentiment theory [16][17][18]. As an important research area of affective computing, natural language processing (NLP) is an important way to obtain emotional information during human-computer interaction.
Although emotions are an internal experience of attitudes, they are often accompanied by external manifestations, such as a person's facial expressions, body posture, and verbal expressions. Verbal expressions refer to the characteristics of an individual's speech in terms of tone, rhythm, and speed when emotions occur. The concept of affective computing was first introduced by the MIT Media Lab in the USA. At present, typical emotion models include the Vonte 3-D theory model, the Plutchik 3-D model, and the hidden Markov models (HMM). The aim of affective computing research is to create a computing system that can recognise and understand human emotions and respond intelligently to them. The primary problem in the study of affective computing is the acquisition of emotional signals, including changes in pulse rate, skin current intensity, speech, and facial expressions. Speech is one of the most intuitive signals of human emotion in virtual teaching. Moreover, speech signals are easier to acquire than other signals. The essence of the speech recognition task is NLP [19].
Traditional supervised learning methods have been effective in improving the performance of NLP by annotating large amounts of information. However, the annotation of training data is time and labour intensive and presents a number of problems when dealing with large data tasks. For example, there is no sufficient annotated corpus, or the quality of the labelling resources is poor. Therefore, natural language processing techniques based on semisupervised learning have become a hot topic of research [20]. Semisupervised learning has become an important emerging direction in the field of machine learning recently. Unlike supervised learning methods, semisupervised learning uses both labelled and unlabelled data. In addition, semisupervised learning has better performance than supervised learning methods that only use labelled data. Semisupervised support vector machine (semi-SVM) is a typical semisupervised learning algorithm. Mohapatra [21] proposed a sampling-based semi-SVM that can effectively predict the presence of defective problems in software. However, the excessive number of iterations makes it unsuitable for largescale situations. Ying et al. [22] proposed a direct optimisation of semi-SVM using a concave-convex process, which greatly reduces the training time, but the complexity is still high.
Therefore, this paper attempts to use semi-SVM to implement affective interaction in virtual teaching. The proposed model is based on affective computing and NLP as the core technology, which captures and recognises the learner's voice characteristics, determines and understands his or her emotional state, and provides corresponding emotional encouragement or emotional The proposed model is, to a certain extent, a model of the learner's emotional state. The proposed model enhances the emotional interaction in the distance learning system to a certain extent and makes a useful exploration to solve the emotional deficit in distance virtual teaching. The main innovations and contributions include the following: (1) a vector space model based on TF/IDF feature term weights is proposed to implement the feature vector representation of language sequences; (2) after the constructed emotion space, semi-SVM is employed as a classifier to complete the emotion interaction calculation.

Framing and Feature Selection for Natural Language
Sequences. Compared to other emotional signals, the speech signal is an easy to capture one-dimensional signal during virtual teaching and learning, which can visually represent the changes in students' emotions. In order to recognise the speech signal, its frequency domain information must be analysed. The flow chart is shown in Figure 1.
As shown in Figure 1, the first step is to perform the framing and windowing operations. Here, the Hamming window is chosen as the window function. The short-term Fourier transform (STFT) is applied to each frame obtained after the windowing.
where zðmÞ denotes the input speech sequence, wðmÞ denotes the window function, F denotes the scaling weights, and T denotes the window size. For the framing task, the greater the number of simultaneous occurrences of adjacent words in the content of a speech sequence, the greater the probability of forming a word. For a statistically based framing approach, i.e., to count the frequency of each combination of words in a natural language sequence, this requires the calculation of its mutual information MðX, YÞ. 2

Wireless Communications and Mobile Computing
where PðXÞ is the probability of word X occurring in the sequence, PðYÞ is the probability of word Y occurring in the sequence, PðX, YÞ is the probability of two words occurring next to each other, and MðX, YÞ provides an objective indication of the tightness of the relationship between two words. By framing the sequences based on MðX, YÞ statistics, the speech sequences are partitioned into representations of feature terms in order to disambiguate as much as possible in the context.
After the natural language sequences have been framed into word sets, a high-dimensional feature set is obtained. In automatic sequence classification, the dimensionality of the feature space needs to be reduced; i.e., the most suitable feature subset is selected from the input feature set. Based on statistical principles, mutual information (MI) and expected cross-entropy (ECE) are used as feature selection methods in this paper. The mutual information is calculated as follows: where Pð⋅Þ is the conditional probability and t is a feature term and the category. The larger MIðt, C i Þ is, the greater the probability that the feature term t and the category C i will occur together. For the whole series, the average of the mutual information is generally used for the calculation.
Expected cross-entropy is calculated as follows: Based on the analysis of the probability distribution of the sequence classification, the feature term with the larger value is usually selected.

Vector Space Representation
Model. Based on the principle of semantic retrieval, we use a vector space model based on TF/IDF feature term weights [23] to implement a feature vector representation of natural language sequences. The initial frequency statistics of sequence word frequencies sf ij in the affective computing system are performed using the following formula.
where f ij is the raw frequency statistic of word sense s i in sequence d j , sf ij is the standard frequency of word sense s i in sequence d j , and jvj is the total number of word sense s i in sequence d j . The inverse sequence frequency idf i is determined by the number of sequences.
where df i is the number of sequences in which sense s i occurs at least once, N is the total number of sequences in the journal's intake system, and idf i is the frequency of inverted sequences of sense s i . The sequence lexical sense weights w ij are defined as follows.
The definition of query word sense weights is as follows.
where w iq is the weight of word sense s i in query q and sf iq is the initial frequency statistic of word sense s i for query q.

Semi-SVM-Based Affective Interaction Model
Affective interaction as an indispensable part of teacherstudent interaction in teaching activities has a positive role in learning: (1) affective interaction can stimulate learners' motivation to learn. (2) Affective interaction facilitates the achievement of emotional goals in teaching. (3) Affective interaction can effectively improve learning efficiency. Generally speaking, pleasant and enthusiastic emotions keep the human brain in an optimal state. When people learn in a pleasant mood, they remember well and learn efficiently.
(4) Affective interaction can relieve learners' real-life stress and regulate their mood.

Constructing Affective Space.
Psychologists classify human emotions into six categories: happiness, surprise, fear, sadness, disgust, and anger. All human emotions are based on a complex blend of these six emotions. Based on these ideas, emotional interaction requires the solution of two main problems: the selection of affective semantic words and the construction of an artificial emotional space.
On the basis of the 3D theoretical model of affect, and considering the possible affective states of learners in distance virtual teaching, we created an affective space with four components, as shown in Figure 2.
As can be seen from Figure 2, the three pairs of affective elements divide the affective space into eight subspaces. To simplify the problem, the eight subspaces are combined into four affect spaces: excitement, happiness, frustration, and anger. Excitement and happiness are regarded as positive emotions, which are emotional states that contribute to students' learning. Frustration and anger are regarded as negative emotions, which are emotional states that inhibit students' learning. The dots on the three-dimensional coordinate system are neutral emotions, which neither promote nor inhibit student learning.
Let the set of sentiment state spaces be S = fs i ji = 1, 2, ⋯,Ng, where N denotes the number of basic sentiment states. The sentiment states are denoted by the random variable X. Let A be the probability that X = x i (the i-th affective state) and that it satisfies the conditions shown as follows.
In this way, the probabilistic spatial model of the affective state can be expressed as follows.
A person's affective state cannot be directly observed, but the characteristics of a state can be observed. The features are used to find out the possible affective states. On the basis of the HMM model, it is assumed that the transition between emotional states corresponds to different probability values for different external motivational strategies. For example, students are more likely to shift from "calm" to "happy" when they are "positively" motivated than when they are "negatively" motivated. The probability of moving from "calm" to "happy" is higher when motivated by "positive" than by "negative" motivation. In establishing the affective space, we only considered the effect of different motivational strategies on emotions but did not consider the difference in the effect of the same motivational strategy on the emotions of different subjects (the problem of individualisation of emotions), which will be one of the areas to be further investigated in this study.

Affective Interaction Algorithms.
Currently, as a typical machine learning method, support vector machines have been widely used in various automated classification fields [24][25][26]. Semisupervised learning is a popular direction that has emerged in the field of machine learning in recent years, which can make effective use of both labelled and unlabelled data. Researchers have applied semi-SVM to classification tasks in several fields, showing certain advantages. The basic principle model of a support vector machine is shown in Figure 3.
Set the training sample set of the support vector machine as fðx i , y i Þjx i ∈ R d , y i = f−1, 1g, i = 1, 2,: ⋯ , Ng, where y i is the category label of the samples, d is the sample dimension, and N is the number of training samples. As a typical semisupervised machine learning algorithm, in semisupervised learning, the training set can be regarded as a mixture of a labelled and an unlabelled data set. If the data sample set is 4 Wireless Communications and Mobile Computing linearly divisible, then we can find a hyperplane that satisfies the generalised classification optimum [27].
where w is a coefficient and b is an offset. The optimisation problem for the classification task can be represented by It can be seen that maximising the classification interval (2/kwk) means minimising 2/kwk 2 . In general, it is unlikely that the specific data in real life is perfectly linearly divisible. Therefore, a penalty factor is introduced into formula (13) to obtain the Lagrangian transformed optimisation problem, as shown in where C introduces an error penalty factor. Solve for α i via formula (14) and then for w via w = ∑ n i=1 α i y i x i . For vectors with uncertain class attributes, the following judgement function is generally used to discriminate [28].
For a nonlinear support vector machine, the judgement function is shown in where K(.,.) denotes the kernel function, sgn ð:Þ denotes the symbolic function, and n is the number of training samples.

Experimental Setup.
In order to verify the validity of the proposed affective interaction model, simulation experiments and analysis were conducted using 400 real teaching process recordings as the data set. The simulation experimental environment was configured with Windows 7 operating system, I5 CPU processor, 4 GB RAM, and Matlab 2012 simulation platform.
The data set used for the experiments was derived from virtual English teaching videos of 15 classes. The duration of the audio sequences in each video was 30 minutes. Out of the 400 audio sequences, 200 were randomly selected as annotated data and the remaining 200 as unannotated data in order to complete semisupervised learning. For comparison purposes, in addition to accuracy (ACC), we used F1.    Table 2.
As can be seen from Table 2, compared with KNN, semi-SVM has a substantial increase in training speed, although the accuracy improvement is not significant, due to the fact that the total time complexity of semi-SVM is OðNÞ and linear with the total number of samples; i.e., the time complexity reaches linearity.

Stimulating Sentiment
Swings. The next step is to verify whether the proposed affective interaction model fits the pattern of human affective change. Human sentiment states will shift in response to external stimulus signals. As the external stimulus disappears, the human emotional, mood voltage-state should gradually tend to a calm state. The process of emotion fading over time after receiving a stimulus in a given state is shown in Figure 4. The sentiment swings at a given moment when receiving stimulation A1, A2, A3, and A4 in sequence are shown in Figure 5.
The results of the experiment show that the affective state can be effectively changed by different nature of stimulation when the initial affective state is calm. The degree of change in affective state was related to the motivational factors A1, A2, A3 and A4. This result is consistent with the theories of emotional psychology, common sense, and experience and validates the validity of the semi-SVM-based emotional interaction model.

Conclusions
In order to realize the problem of affective interaction in immersive virtual teaching, this paper proposes a semi-SVM-based affective interaction model. A vector space model based on TF/IDF feature term weights is proposed in this paper to implement the feature vector representation of language sequences. After the constructed sentiment space, semi-SVM is employed as a classifier to complete the sentiment interaction computation. The proposed model achieves good results in terms of accuracy and F1 evaluation metrics, validating its feasibility. However, relying only on speech signals to train and test the emotional interaction model is still not satisfactory, and the combination of brain IR detection and face recognition will be considered for more accurate emotional computation in order to make the human-computer emotional interaction more realistic, natural, and effective.

Data Availability
The experimental data used to support the findings of this study are available from the corresponding author upon request.