# Construction of College Students’ Mental Health Education Model Based on Data Analysis

Authors: Fengxia Tang
Journal: Scientific Programming
 (2022)

---

## Abstract

This paper presents an in-depth study and analysis of the model of college students’ mental health education using fine-grained parallel computational programming. In the experimental group, the total level of positive thoughts and the level of life satisfaction significantly increased and the level of depression significantly decreased before and after the implementation of the intervention; in the control group, the level of life satisfaction significantly increased before and after the implementation of the intervention, and there was no significant difference in the total level of positive thoughts and the level of depression. Based on the above results, the positive thinking group-assisted training in this study was effective in improving the level of positive thinking and life satisfaction and reducing the level of depression into two categories of high school students: those who were susceptible and those who were symptomatic but satisfied, thus improving their mental health status, and may provide operational references for future intervention studies. At the same time, some studies have pointed out that when college students are faced with stressful situations, they will have higher psychological levels if they take a positive way to deal with them, and when college students are under stress, they will use a positive psychological restraint mechanism to cope. From a macroperspective, the research results can also be used to guide the training system of mental health education teachers, teachers’ professional development, and career development planning, showing certain application value.


---

## Body

## 1. Introduction

Health has always been a personal state that people desire. A healthy individual can maintain good communication links with other people in daily social interactions, work, life, and study and can deal well with various situations that occur in life. The psychopathological model is based on the diagnostic manual of mental and psychological disorder (DSM), which correlates the state of presence of a psychological disorder with the state of mental health [1]. This traditional assessment model uses diagnostic scales that have good discriminant validity for people with psychological problems and can effectively screen individuals with some degree of psychological disorders in the population. However, this assessment model is confined to the framework of physiopathology and ignores the positive potential and self-healing possibilities of individuals themselves. On the other hand, the model defines mental health status roughly as the presence or absence of a mental disorder, making it difficult to classify people with intermediate or borderline conditions, who are absent or less symptomatic, into the exact health category and difficult to distinguish accurately [2]. This has led to deficiencies in the way traditional health models are diagnosed, and the effectiveness of interventions is therefore problematic. At the same time, today’s society is increasingly competitive, and the pressure from various identity transitions such as study and employment is even heavier, so it is easy to breed some psychological distress or even psychological problems [3]. According to the application of the DASS-21 scale, the total average score of the scale is 2 points as the critical point of the level of psychopathology. According to the classification of the comprehensive vitality index, the total score of the version of the scale is 155 points as the critical point of the comprehensive vitality level, and more than 155 points are regarded as high-level comprehensive vitality individuals, indicating that the individual has more positive psychological qualities. Therefore, exploring the mechanism of the influence of left-behind experience on the mental health condition of college students is helpful to provide a reasonable basis for improving the physical and mental health and good development of this special group.When the actual problem (high-precision model) is very computationally intensive and not easy to solve, a simplified model with less computation and rapid solution can be used to replace the original model and accelerate the optimization process. For most engineering design problems, simulation experiments are required to evaluate the objective and constraint functions when different design parameters are used [4]. One way to improve this situation is to use a proxy model to simulate a high-precision simulation model. In deep neural network learning algorithms for multilayer deep neural networks with millions of connections, they are now often routinely trained by gradient descent algorithms. However, in recent years many scholars believe that in addition to gradient descent algorithms that can effectively optimize the parameters in neural networks, population intelligence optimization algorithms can also train deep convolutional networks with more than 4 million parameters [5]. So, when solving problems with large computational tasks, the consumption in time is very huge, so the acceleration of algorithms is now an important direction of research in today’s academia.In this study, we construct a mathematical model for the fine-grained flow process, introduce the complex control equations used in the fine-grained flow simulation, and discretize them with SPH. In addition, the boundary particle integration is truncated in the SPH method, so the dummy particle method is used to solve the problem of error in the solution. To improve the computational efficiency, the SPH-GPU parallel-accelerated two-phase coupled gas-sand model is established on a CUDA hardware and software platform supporting parallel computing. Then, the SPH-GPU parallel computational model of fine grain flow is validated, and the spatiotemporal variation pattern of sand particle population motion is obtained macroscopically.


## 2. Related Works

The size of the problem solution affects the execution efficiency of the particle swarm algorithm, such as the accuracy of the solution problem, the length of time consumption, and the degree of convergence of the results of the problem. As the size of the optimization problem increases, the particle swarm algorithm is limited in its optimization performance in high-dimensional problems due to the drawback of easy premature convergence [6]. In addition, in many engineering fields, the influence of locally optimal solutions is often encountered, making the solution of the problem fail to meet the engineering requirements. Previously, many improvements of particle swarm algorithms have been introduced, such as particle swarm algorithms with inertia weights, particle swarm algorithms with shrinkage factors, and particle swarm algorithms based on island models [7]. 23.9% of the symptomatic but satisfied group remained unchanged, and 45.3% of the diseased group remained unchanged. This shows that the completely healthy group has the highest stability, the susceptible group and the diseased group maintain a moderate degree of stability, and the least stable group is the symptomatic but satisfied group. Non-gradient evolutionary algorithms working on deep learning and population-based optimization algorithms evolving the weights of neural networks were investigated, and networks with more than four million free parameters were successfully evolved. Although these methods can improve the algorithms’ ability to solve high-dimensional optimization problems, at the same time the number of their adaptation values evaluated is relatively much higher, which leads to slower operation of the algorithms [8]. With the development of hardware, distributed computing and GPU parallel computing have received strong attention.The two-factor model of mental health breaks through the inadequacy of the traditional mental health model, which mostly takes psychopathological indicators as the measure of mental health, and advocates a more inclusive perspective by defining the controversial concept of mental health in terms of two factors, the positive state of mental health and the negative state of mental ill-health, simultaneously [9]. Thus, the elimination of psychologically unhealthy states and the acquisition of positive mental health traits should be two simultaneous efforts to improve mental health. In terms of determining the indicators of the two-factor model of mental health, the current academic consensus is to use subjective well-being as a positive indicator and psychopathology (including internalizing problems such as depression and anxiety and externalizing problems such as to conduct disorder) as a negative indicator, both of which are artificially synthesized composite indicators [10]. The two-factor model of mental health integrates positive and negative indicators [11]. In terms of the selection of positive indicators, some researchers believe that life satisfaction, which is the core indicator of subjective well-being, is more stable compared with positive or negative emotional indicators and can be considered as an evaluation criterion for an individual’s positive psychological status. Life satisfaction was found to be the most stable internal factor of subjective well-being [12].Positive psychology is a discipline that studies the best human function. It is analyzed at the level of meta psychology. Its main purpose is to deal with the imbalance in the process of psychological research and application, pay more attention to the positive aspects of individual experience and function, and advocate the combination of individual experience and negative aspects. So, it is also possible to combine the evolutionary 4 intelligence algorithm with the current distributed parallel processing framework. Through 11 kinds of test functions to test various improved PSO algorithms, the simulation experiment shows that the accuracy of the algorithm solution becomes higher and the acceleration effect is obvious.


## 3. Enterprise Critical Link Digital Transmission System Model Setup for Mental Health Data Fine-Grained Parallel Computing Programming Algorithm Design

The research of parallel algorithms is based on the research of serial algorithms, so it has less experience compared with serial algorithms. The common design idea of the parallel algorithm is the PCAM method, which is the four steps of division, communication, combination, and mapping [13]. The first is division, which divides the required problem into several parts equally or randomly so that multiple processors can perform the corresponding processing at the same time; communication is to exchange data and coordinate tasks between the individual processors when solving each small problem; the combination is to combine the small problems in the processors according to certain rules to improve performance and task overhead; and mapping is to assign the previously divided [14].For the processors dealing with this shared model, each processor can perform simple logical and arithmetic computations, and in the ideal case, a shared memory with infinite capacity is assumed to exist, and at any time, any processor can exchange data with any other processor through the shared cells of the shared memory. The best case is that each processing unit only processes one population individual, which will require strong communication capabilities between each computing unit; otherwise, it will be counterproductive, for particle velocity, position update, and corresponding fitness value calculation to be performed in the computing unit where it is located.MIMD shared storage means that all processors share a common memory and each processor does its task individually, and communication among processors is achieved through global variables of the shared memory. The algorithms developed on this model are called asynchronous parallel algorithms, as shown in Figure1.Figure 1
Parallel computing programming model.MIMD asynchronous communication means that there is no shared memory between the processors and each processor accesses instructions and data from its memory. The processors exchange data between each other in messages using a communication network. The algorithms developed on this model are called distributed parallel algorithms.The PSO algorithm consists of four processes: initialization of the population, calculation of the fitness of each particle, updating of the individual global optimal solution, and updating of the velocityV and position X of the particles, where the population initialization process is equivalent to an iterative calculation of the initialization results as input to the subsequent processes [15].Further analysis of the PSO algorithm shows that all particles have two key indicators, velocity and position, and both contain the same dimension, and all particles are randomly initialized, so there is no correlation between them; the solution for the adaptation value of the particles is also calculated independently without any connection, and parallel computation is possible. Significant differences can be found in the total score of positive quality, moderation dimension, justice dimension, interpersonal dimension, and cognitive dimension, and further analysis shows that the positive psychological quality score also increases with the age of the subjects.In this study, six benchmark test functions, sphere (F1), Schoeffel (F4), Rosenbrock (F5), restringing (F9), Ackley (F10), and grievance (F11), are used to test the performance of CPU-PSO and GPU-PSO algorithms in time. The expressions of their test functions are as follows:(1)fX=∑i=1Dxi3,xi≤100,fX=minxi,xi≤100.The CUDA programming model is a global serial local parallel model; i.e., programs are executed serially and some individual parts of the program can be executed in parallel when needed. In this study, the SPH sand flow program is serial, and then, parallel execution is adopted for functions that are easily parallelized and time-consuming. To be able to make full use of the GPU core, the application should decompose many threads that can be executed in parallel and then execute them efficiently according to the computational power of the actual device.(2)F=k=k0′fsTf0=f0′fsT23.GPU cores are by nature vector processing units that can apply the same instructions to a large amount of data. Therefore, when a GPU performs multicore parallel computing, the same sequence of instructions is synchronized by many processing units called stream processors (SPs) [16]. However, when the amount of data increases to a certain scale, the calculation speed is greatly improved. When the amount of data reaches 16 million, the calculation speed is about 18 times that of the traditional algorithm. A group of SPs executing under the control of the same control unit is called a streaming multiprocessor (SM). A GPU can contain multiple SMs (not necessarily the same number of SMs on different GPU models), each running its block of threads and many SPs in the SM.(3)fX=∑i=1Dxi3+10sin2πxi+10.Choosing the right execution configuration will provide the best performance for a given system. The above allocation of 15 threads per thread block is very unreasonable (to simplify the graphics) because threads are scheduled to execute on the SM in thread blocks, and all threads within the same thread block are not executed in parallel, but in a warp. Warp size is related to the device hardware. Currently, CUDA defines 32 threads per warp, so the number of threads per thread block is chosen to ensure that it is an integer multiple of 32, such as 64, 128, 256, and 512, as shown in Figure2.Figure 2
CUDA thread hierarchy.Although the CUDA program can obtain the identification ID of each thread, the thread block does not know where it is assigned to run and when it will finish running. For example, if there are 10,000 threads in a thread block in the grid, each thread may take a different amount of time to finish computing, and each thread block will take a different amount of time to finish computing. Of course, this is the same reason the program runs faster, without the need for threads to wait. CUDA provides functions for thread synchronization in a thread block.(4)fX=13000∑i=1Dxi3+∏i=1Dsinxii−1.People with high subjective well-being and high level of psychopathy are partly healthy people, who may have mental illness symptoms, but they have a high level of subjective well-being and other positive forces, i.e., symptomatic but self-satisfied people, and this positive psychological force helps such people to achieve the result of gradual cure of psychological problems.(5)fx=∫Ωfx′Wx+x′,h2dx′.The mixed-dimension approach in the algorithm is that the global optimal solutions in each subpopulation are collected by Spark’s collect function when each subpopulation reaches the migration cycle, and then, the particle data in each dimension of the global optimal solution are collected to form a D (D is the number of particle dimensions) set, and then, the data in the data set are sent to each subpopulation without overlapping by random [17].(6)∇fxi=∑i=1Dmj2pifxj2∇Wij.The two-factor model of mental health, the quadratic and septic, divides the population into different health types based on two-dimensional indicators, which can be used to identify treatment options for people with different health status types and to detect partially healthy and partially sick people so that those people can be identified to receive treatment. The model effectively solves the drawback of the traditional model; that is, it cannot well check the middle zone of the population so that mental health prevention and intervention work is gradually refined, efficient, and targeted. In particular, the two-factor model of mental health proposes a more realistic definition of complete mental health and achieves complete mental health by enhancing positive psychological indicators or lowering negative psychological indicators; it evokes the importance of positive mental health education and psychological quality education work. It can effectively screen out individuals with a certain degree of psychological disorder in the population. At present, the proposal and practice of the two-factor model have injected fresh blood into mental health services and public health services, and countries around the world have begun to advocate the use of this concept for health defines work.


### 3.1. The Design of Constructing the Model of Mental Health Education for College Students

Research on the effects of stress on mental health began in the 1930s, and it is believed that stress is a process that includes many complex factors, and many adolescents may have cognitive or behavioural biases when facing stress problems, which may lead to mental health problems. Therefore, in the process of investigating the factors influencing mental health problems of adolescents, especially college students, several scholars have turned their perspectives to the effects of stress on college students. Studies have shown that college students’ mental health status is negatively affected when they face campus stress while showing a positive correlation with mental health problems [18].In recent years, many literature sources have been constructed in various research fields such as psychology and education to model the mediating effects and the mechanisms of mediating the effects between the independent and dependent variables. If the independent variable, the dependent variable, and the intermediate variables between them are denoted byX, Y, and M, respectively, then the following three equations can be used to describe the relationship between the explanatory variables:(7)Y=cX−e1,M=aX−e2,Y=c′X−bM−e3.In the above three equations, the first equation represents the regression analysis of the independent variableX and the dependent variable Y. The second equation represents the regression analysis of the independent variable X, the mediating variable M, and the dependent variable Y; the third equation represents the regression analysis of the independent variable M and the mediating variable M. c represents the value of the total effect of the independent variable X on the dependent variable Y, a represents the value of the effect of the independent variable X on the mediating variable M, and ca represents the direct effect of the independent variable X on the dependent variable Y after controlling for the effect of the mediator variable M. e1, e2, and e3 represent the residual values, respectively. According to the above equation, the mediating effect in the model is equal to the product of the indirect effect, i.e., a and b, i.e., the relationship between the total effect, indirect effect, and direct effect.Among them, mental health status can divide into positive psychological, negative psychological, and overall levels of mental health according to the division of conceptual scale dimensions of mental health, when the mediating effect was analysed. AMOS was applied to construct a model map of positive psychological qualities, stress, and mental health. The relevant data are imported to divide the dimensions, and the fit indices and path coefficients of the model were calculated to further analyse the degree of influence of positive psychological quality on depression and anxiety stress and subjective well-being and to verify whether the model hypotheses were valid.In the process of item analysis, the questionnaire items are firstly analysed for differentiation. Step 1: the total scores of the subjects’ questionnaire were arranged in ascending order, and the high and low groups were established, with the first 27% being the high group and the next 27% being the low group. It is difficult to classify it into an accurate health category, and it is difficult to accurately distinguish it. This has led to flaws in the diagnostic methods of traditional health models, and the effect of interventions is therefore questionable. The scores of the subjects in the high and low groups on each question item were subjected to a t-test, and the t value was used as the critical break or ratio value, and if the t value of the group differences was less than 3, it indicated poor differentiation among the question items, and the results showed that the difference between the scores of the high and low groups on each question item was significant (t > 3). Therefore, the differentiation between the question phases of the initial version of the questionnaire was significant. The correlation analysis between the subjects’ scores on each question item and the total score of the questionnaire was performed by first looking at the significance value, which is the p value [19]. In the results of this study, the correlation between subjects’ scores on each question and the total score was significant, p < 0.001; then, we looked at the R value, the larger the R value, the better the correlation, and a positive number means positive correlation, and a negative number means negative correlation. In this study, the R value is defined as 0.5 < |r| < 0.8, and the two variables are generally considered to be moderately correlated if the absolute value of r is within this range, and the results of item analysis are shown in Figure 3.Figure 3
Results of data item analysis.
(a)(b)(c)(d)(e)(f)A single-factor modelA with a bipolar unidimensional index of mental health was constructed, and each question item was loaded on the same latent variable mental health, with positive factor loading for the comprehensive vitality question item and negative factor loading for the DASS-21 item. In addition to the gradient descent algorithm that can effectively optimize the parameters in the neural network, the swarm intelligence optimization algorithm can also train deep convolutional networks with more than 4 million parameters.The first is division. The problem to be solved is divided into several parts on average or randomly, so that multiple processors can perform corresponding processing at the same time; communication is when each processor solves each small problem, but each problem needs to exchange data and communicate with each other. The comprehensive vitality index was divided according to the comprehensive vitality index, and the total score of 155 on the Chinese version of the scale was taken as the critical point of the comprehensive vitality level, and more than 155 was the high level of comprehensive vitality individuals, indicating the existence of more positive psychological qualities of individuals, as shown in Figure4.Figure 4
Comparison of positive and negative index status of people with four types of mental health status.The scores of students in the four mental health types were analysed in terms of subjective well-being level, academic achievement, and perceived campus climate [20]. The results revealed significant differences in the scores of subjective well-being level, academic achievement, and perceived campus climate among the four groups. Post hoc analyses revealed that on the campus climate scores: the perfectly healthy group > the susceptible group > the disordered group, which was not significantly different from the symptomatic but satisfied group. On academic achievement: perfectly healthy group > susceptible group > disordered group, and no significant difference from the symptomatic but satisfied group. In subjective well-being scores: perfectly healthy group > susceptible group and symptomatic but satisfied group > disordered group, and there was no significant difference between susceptible and symptomatic but satisfied groups.


## 3.1. The Design of Constructing the Model of Mental Health Education for College Students

Research on the effects of stress on mental health began in the 1930s, and it is believed that stress is a process that includes many complex factors, and many adolescents may have cognitive or behavioural biases when facing stress problems, which may lead to mental health problems. Therefore, in the process of investigating the factors influencing mental health problems of adolescents, especially college students, several scholars have turned their perspectives to the effects of stress on college students. Studies have shown that college students’ mental health status is negatively affected when they face campus stress while showing a positive correlation with mental health problems [18].In recent years, many literature sources have been constructed in various research fields such as psychology and education to model the mediating effects and the mechanisms of mediating the effects between the independent and dependent variables. If the independent variable, the dependent variable, and the intermediate variables between them are denoted byX, Y, and M, respectively, then the following three equations can be used to describe the relationship between the explanatory variables:(7)Y=cX−e1,M=aX−e2,Y=c′X−bM−e3.In the above three equations, the first equation represents the regression analysis of the independent variableX and the dependent variable Y. The second equation represents the regression analysis of the independent variable X, the mediating variable M, and the dependent variable Y; the third equation represents the regression analysis of the independent variable M and the mediating variable M. c represents the value of the total effect of the independent variable X on the dependent variable Y, a represents the value of the effect of the independent variable X on the mediating variable M, and ca represents the direct effect of the independent variable X on the dependent variable Y after controlling for the effect of the mediator variable M. e1, e2, and e3 represent the residual values, respectively. According to the above equation, the mediating effect in the model is equal to the product of the indirect effect, i.e., a and b, i.e., the relationship between the total effect, indirect effect, and direct effect.Among them, mental health status can divide into positive psychological, negative psychological, and overall levels of mental health according to the division of conceptual scale dimensions of mental health, when the mediating effect was analysed. AMOS was applied to construct a model map of positive psychological qualities, stress, and mental health. The relevant data are imported to divide the dimensions, and the fit indices and path coefficients of the model were calculated to further analyse the degree of influence of positive psychological quality on depression and anxiety stress and subjective well-being and to verify whether the model hypotheses were valid.In the process of item analysis, the questionnaire items are firstly analysed for differentiation. Step 1: the total scores of the subjects’ questionnaire were arranged in ascending order, and the high and low groups were established, with the first 27% being the high group and the next 27% being the low group. It is difficult to classify it into an accurate health category, and it is difficult to accurately distinguish it. This has led to flaws in the diagnostic methods of traditional health models, and the effect of interventions is therefore questionable. The scores of the subjects in the high and low groups on each question item were subjected to a t-test, and the t value was used as the critical break or ratio value, and if the t value of the group differences was less than 3, it indicated poor differentiation among the question items, and the results showed that the difference between the scores of the high and low groups on each question item was significant (t > 3). Therefore, the differentiation between the question phases of the initial version of the questionnaire was significant. The correlation analysis between the subjects’ scores on each question item and the total score of the questionnaire was performed by first looking at the significance value, which is the p value [19]. In the results of this study, the correlation between subjects’ scores on each question and the total score was significant, p < 0.001; then, we looked at the R value, the larger the R value, the better the correlation, and a positive number means positive correlation, and a negative number means negative correlation. In this study, the R value is defined as 0.5 < |r| < 0.8, and the two variables are generally considered to be moderately correlated if the absolute value of r is within this range, and the results of item analysis are shown in Figure 3.Figure 3
Results of data item analysis.
(a)(b)(c)(d)(e)(f)A single-factor modelA with a bipolar unidimensional index of mental health was constructed, and each question item was loaded on the same latent variable mental health, with positive factor loading for the comprehensive vitality question item and negative factor loading for the DASS-21 item. In addition to the gradient descent algorithm that can effectively optimize the parameters in the neural network, the swarm intelligence optimization algorithm can also train deep convolutional networks with more than 4 million parameters.The first is division. The problem to be solved is divided into several parts on average or randomly, so that multiple processors can perform corresponding processing at the same time; communication is when each processor solves each small problem, but each problem needs to exchange data and communicate with each other. The comprehensive vitality index was divided according to the comprehensive vitality index, and the total score of 155 on the Chinese version of the scale was taken as the critical point of the comprehensive vitality level, and more than 155 was the high level of comprehensive vitality individuals, indicating the existence of more positive psychological qualities of individuals, as shown in Figure4.Figure 4
Comparison of positive and negative index status of people with four types of mental health status.The scores of students in the four mental health types were analysed in terms of subjective well-being level, academic achievement, and perceived campus climate [20]. The results revealed significant differences in the scores of subjective well-being level, academic achievement, and perceived campus climate among the four groups. Post hoc analyses revealed that on the campus climate scores: the perfectly healthy group > the susceptible group > the disordered group, which was not significantly different from the symptomatic but satisfied group. On academic achievement: perfectly healthy group > susceptible group > disordered group, and no significant difference from the symptomatic but satisfied group. In subjective well-being scores: perfectly healthy group > susceptible group and symptomatic but satisfied group > disordered group, and there was no significant difference between susceptible and symptomatic but satisfied groups.


## 4. Results and Analysis

### 4.1. Analysis of Fine-Grained Parallel Calculation Results

The dimensionality of the test function and the corresponding particle number design are given, whereD denotes the function dimensionality and N denotes the total population size. The abort condition of the algorithm is that the number of iterations run reaches 4000. In the micro-population algorithm, the inertia weight w is set to 0.7298, the social learning factor C1 = C2 = 1.4962, and the value of Vmax in each dimension is set to 0.15 times the range of variation of the corresponding dimension. Each algorithm is run 10 times independently on each problem. There is something special about the data settings in the table because to satisfy the architecture of parallel computing CUDA, CUDA itself requires the number of threads to be preferably a multiple of 16 or 32, so the problem dimensions and the number of population particles are set to the data in Figure 5.Figure 5
Sphere function speedup ratio.The dynamics and stability of the cohorts under the quadratic approach were assessed by a one-year follow-up survey, which divided the first four cohorts tested into 12 categories for shifts in the follow-up test. The proportion of students in each mental health category remained generally consistent at both time points, indicating good stability of the four mental health cohorts based on the composite vitality index. Communication between processors is achieved through global variables in shared memory. Algorithms developed on this model are called asynchronous parallel algorithms. The stability results for the four cohorts showed that 71.3 percent of the fully healthy group remained in the group at the time of the follow-up test, 50.7 percent of the susceptible remained stable and unchanged, 23.9 percent of the symptomatic but satisfied remained unchanged, and 45.3 percent of the disordered group remained unchanged. This indicates that the population in the completely healthy group had the highest stability, the susceptible and disordered groups maintained moderate stability, and the least stable group was the symptomatic but satisfied group. The dynamic results show that 31.8% of the susceptible group transformed into the fully healthy group, 13.6% transformed into the disordered group, 34.8% of the symptomatic but satisfied group transformed into the fully healthy group, and only 17.9% of the disordered group transformed into the fully healthy group, as shown in Figure6.Figure 6
Running time trend of the two algorithms at different scales.The results of the six tested functions show that the computational performance of GPU-PSO is significantly better than that of the CPU-PSO algorithm. From the data in the above table, the running time of the CPU-PSO algorithm grows faster when the problem size grows, and the speedup ratio of the two algorithms becomes larger and larger; i.e., the performance of the GPU-PSO algorithm is stronger and stronger than that of CPU-PSO algorithm, and it can be inferred that GPU-PSO algorithm may not be stronger than CPU-PSO when the problem size is not large. Since the performance of the two algorithms is evaluated using the test function, it only shows the superiority of the primary GPU-PSO algorithm, which can be highlighted when solving practical problems (e.g., mechanical part life prediction and part parameter optimization).The fine-grained model, also known as the neighbourhood model, has to keep the population division very small during the execution of the algorithm to meet the requirements of the fine-grained model, and the best case is that each processing unit only deals with one individual of the population, which would require strong communication capability between each computing unit; otherwise, it would be counterproductive for the particle velocity, position update, and the corresponding adaptation value calculation to be performed in the computational unit in which they are located. Therefore, there are very few processes of the global operation population in the whole process, so the parallelism of the PSO algorithm itself can be fully utilized.


## 4.1. Analysis of Fine-Grained Parallel Calculation Results

The dimensionality of the test function and the corresponding particle number design are given, whereD denotes the function dimensionality and N denotes the total population size. The abort condition of the algorithm is that the number of iterations run reaches 4000. In the micro-population algorithm, the inertia weight w is set to 0.7298, the social learning factor C1 = C2 = 1.4962, and the value of Vmax in each dimension is set to 0.15 times the range of variation of the corresponding dimension. Each algorithm is run 10 times independently on each problem. There is something special about the data settings in the table because to satisfy the architecture of parallel computing CUDA, CUDA itself requires the number of threads to be preferably a multiple of 16 or 32, so the problem dimensions and the number of population particles are set to the data in Figure 5.Figure 5
Sphere function speedup ratio.The dynamics and stability of the cohorts under the quadratic approach were assessed by a one-year follow-up survey, which divided the first four cohorts tested into 12 categories for shifts in the follow-up test. The proportion of students in each mental health category remained generally consistent at both time points, indicating good stability of the four mental health cohorts based on the composite vitality index. Communication between processors is achieved through global variables in shared memory. Algorithms developed on this model are called asynchronous parallel algorithms. The stability results for the four cohorts showed that 71.3 percent of the fully healthy group remained in the group at the time of the follow-up test, 50.7 percent of the susceptible remained stable and unchanged, 23.9 percent of the symptomatic but satisfied remained unchanged, and 45.3 percent of the disordered group remained unchanged. This indicates that the population in the completely healthy group had the highest stability, the susceptible and disordered groups maintained moderate stability, and the least stable group was the symptomatic but satisfied group. The dynamic results show that 31.8% of the susceptible group transformed into the fully healthy group, 13.6% transformed into the disordered group, 34.8% of the symptomatic but satisfied group transformed into the fully healthy group, and only 17.9% of the disordered group transformed into the fully healthy group, as shown in Figure6.Figure 6
Running time trend of the two algorithms at different scales.The results of the six tested functions show that the computational performance of GPU-PSO is significantly better than that of the CPU-PSO algorithm. From the data in the above table, the running time of the CPU-PSO algorithm grows faster when the problem size grows, and the speedup ratio of the two algorithms becomes larger and larger; i.e., the performance of the GPU-PSO algorithm is stronger and stronger than that of CPU-PSO algorithm, and it can be inferred that GPU-PSO algorithm may not be stronger than CPU-PSO when the problem size is not large. Since the performance of the two algorithms is evaluated using the test function, it only shows the superiority of the primary GPU-PSO algorithm, which can be highlighted when solving practical problems (e.g., mechanical part life prediction and part parameter optimization).The fine-grained model, also known as the neighbourhood model, has to keep the population division very small during the execution of the algorithm to meet the requirements of the fine-grained model, and the best case is that each processing unit only deals with one individual of the population, which would require strong communication capability between each computing unit; otherwise, it would be counterproductive for the particle velocity, position update, and the corresponding adaptation value calculation to be performed in the computational unit in which they are located. Therefore, there are very few processes of the global operation population in the whole process, so the parallelism of the PSO algorithm itself can be fully utilized.


## 5. Analysis of the Performance Results of the Mental Health Education Model for College Students

Comparing the pretest and posttest scores of the six dimensions of positive mental quality and the total score of the subjects, Figure7 shows that all the dimensions of positive mental quality and the total score of the subjects have improved to a certain extent after participating in the intervention experiment, among which the five dimensions of transcendence, justice, emotion, interpersonal, and cognition and the total score of positive mental quality all show a highly significant change with a t-test p value less than 0.01; the dimension of abstinence also shows a significant change with a p value less than 0.05. p < 0.05. The three processes of calculating the fitness value of each particle, updating the individual and global optimal solutions, and updating the speed V and position X of each particle are independent of each other and are in the same generation. There is a certain data correlation before and after the iteration process. The scores of all dimensions of positive psychological quality of the intervened college students improved significantly after this experiment, which indicates that the program of this experiment is indeed beneficial to improve the positive psychological quality of college students. The analysis of the abovementioned changes in the mental health status and positive psychological quality of college students before and after the experiment shows that the experiment has a positive effect on all three dimensions, which has a certain reference value for the study of college student’s mental health and positive psychological quality intervention.Figure 7
Analysis of thet-test of the difference in positive psychological quality between the pretests and posttests.In particular, the total score of positive psychological quality, transcendence dimension, moderation dimension, justice dimension, interpersonal dimension, and cognitive dimension was found to be significantly higher for male than female ethnic minority college students. This is consistent with the results of positive psychological qualities of college students obtained in other regions. This is also the reason the program runs fast without thread waiting. If the data are mutually dependent and read from each other, it is necessary to do a good job of mediation, synchronization, and barriers. Also, the scores of positive psychological qualities differed among the college students of different ages, and significant differences were found in the total score of positive psychological qualities, moderation dimension, justice dimension, interpersonal dimension, and cognitive dimension, and further analysis showed that the scores of positive psychological qualities increased with the age of the subjects. The positive psychological quality of ethnic minority college students increases with age. The mean scores of the experimental group and the control group on the five subdimensions of the positive mental quality scale are shown in Figure8.Figure 8
Pretest and posttest mean scores of the experimental and control groups on the five subdimensions of the positive thinking scale.The duration of each training session was set at 50 minutes, which was shorter than the previous training sessions, but could ensure that the subjects were less distracted by the long duration of the training process. To make the training process less monotonous and boring, the researcher innovatively adapted some interesting group activities according to the actual physical and mental development of high school students and incorporated them into the training program after integrating them with the positive thinking training theme. In addition, most of these activities were arranged in a warm-up session in order not to interfere with the consistency of the formal positive thinking training. This way, the participants were not bored and gave up or became distracted; secondly, it helped them to gradually enter the state of mindfulness practice and not to feel that the formal training sessions were too fragmented and abrupt.In terms of the setting, to ensure that the experimental group’s positive thinking training was as close as possible to the effects of previous rigorous training, the researcher made comprehensive preparations in the setting of the research environment (e.g., quiet sound environment, blackout curtains, soft cushions, audio, and video playback equipment) and the setting of the positive thinking training activities and invited experienced in-service psychological teachers to supervise. This may be the reason for the relatively significant effect of this study in improving the total level of positive thinking of the experimental group members.


## 6. Conclusion

This study introduced the basics of the particle swarm algorithm and briefly described the role of some parameters in the algorithm, then introduced the basic concepts of parallel algorithms and the parallel models that exist, and compared the relationship between serial and parallel algorithms. As the total number of CUDA threads continues to increase, the time used for computation becomes less and less, but the reduction becomes weaker and nonlinear. The effect of different thread counts within a single thread block for four-particle counts on the computational efficiency is compared, and it is obtained that the computation time does not decrease gradually as the number of threads increases, and there is a significant increase in computation time from 256 to 512 and 768 thread counts for a particle count of 900. It has aroused people’s attention to the work of positive mental health education and psychological quality education. At present, the proposal and practice of the two-factor model have injected fresh blood into mental health services and public health services, and countries around the world have begun to advocate the use of this concept for health defines work. This positive psychological quality and adaptability make college students, especially first-year students, better able to cope with the new environment and the mental health problems brought about by the corresponding stressful situations.



---

*Source: 7044526-2022-05-16.xml*