# Construction and Optimization of Mental Health Education Consultation Management System Based on Decision Tree Association Rule Mining

Authors: Haoxian Liu; Xiuyuan Chen
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

This paper studies association rule mining and decision tree algorithm, focusing on the extended research of association rule mining, including the number of generated rules, mining association rules of long itemsets with low support, attribute selection criteria and multivalue attributes in decision tree algorithm. This paper conducts in-depth research and analysis on the design and optimization of the mental health education consultation management system using the association rule decision tree algorithm. This paper analyzes the meaning of parameters under the support-confidence-interest model, and uses regression method to design equations between the number of rules and parameters. We use the multiple correlation coefficient to test the fitting effect of the equation, and use the significance test to verify whether the coefficient of the parameter is significantly zero. On the one hand, the widely used psychological crisis prevention measures generally include the screening of the SCL psychological scale in the early stage of first-year enrolment, the holding of general psychological knowledge lectures and courses, and the opening of psychological counselling rooms with a low penetration rate, but these practices are to a certain extent. In other words, it cannot enable the student administrator to grasp the psychological status of the students in a timely, effective, and dynamic manner, to timely intervene in the possible crisis. Not only the number of attribute values of the current node is considered but also the size of the variable precision clear area of the lower node is considered, that is, the two-layer nodes of the tree are considered at the same time. The new attribute selection method not only overcomes the shortcomings of the original algorithm, but also has the advantages of variable precision rough sets. This paper uses a new criterion for attribute selection, weighted roughness and complexity, which comprehensively considers the classification accuracy and the number of branches. In order to reduce the influence of noisy data and missing values, the algorithm uses a class prediction method based on matching degree. Through comparative experiments, the effectiveness of the method proposed in this paper is verified. We propose a new calculation formula for the similarity of the child nodes of the label set to evaluate the effect of attribute classification, and comprehensively consider the situation that the elements in the two multilabel sets appear or not appear at the same time, so that the calculation of the similarity of the label set is more comprehensive. The experimental results show that the model proposed in this paper can excavate the dialectical combination of multiple factors. By comparing with the existing algorithms, the classification effect of the proposed algorithm is verified. The classification algorithm proposed in this paper is more suitable for dealing with multi-value attributes and multiclass data classification problems. The psychological evaluation and counselling system designed in this paper has achieved the expected goal. The results of this paper can improve the problems existing in the work of psychological counselling services.


---

## Body

## 1. Introduction

Mental health issues have only entered the stage of systematic research and the emergence of new terms like mental health. The World Health Organization lists several mental illnesses that are prone to psychological problems, mainly depression and schizophrenia [1]. According to United Nations statistics, about 20 million people die each year from mental disorders. In response, the World Health Organization has stated that mental health is a global priority and requires a new understanding of mental health. However, most colleges and universities are still using traditional psychological crisis warning methods, and the effectiveness of such warnings is limited. The traditional psychological crisis early warning methods are theoretically complete, but the practical operability and the effectiveness of early warning are still very limited. With the rapid development of information technology, big data mining technology has begun to play an important role in the field of crisis early warning. On the other hand, with the rapid development of Internet technology, “Internet Education” has made great achievements in the process of modernization of education, and major universities have basically realized the Informa ionization of student management, but most of the current Informa ionization only stays in the simple collection, storage, and management of student information by using basic information technology means, and combined with the literature [2]. It is found that there are relatively few research applications in the screening and early warning of psychological crisis using the accurate, real, timely and effective data to deepen the hidden correlations behind the information technology.The traditional psychological crisis early warning tools are theoretically sound but the practical operability and effectiveness of early warning are still very limited. With the rapid development of information technology, big data mining technology has started to play an important role in the field of crisis early warning. The concept of data mining was formally introduced at the 11th International Joint Academic Conference on Artificial Intelligence held in the United States and has been widely used in industrial applications, government engineering, health problems, educational problems, and other research biased toward solving practical applications problems [3]. Classification is an important branch of data mining, which can be used to extract models describing important data categories or to predict future data trends, and to provide good decision support for the future development of the industry through classification and prediction. Data mining generally refers to the process of searching hidden information from a large amount of data through algorithms. At present, data mining technology has been fruitfully applied in telecommunications, finance, retail, and other industries [4]. If the same data mining technology is applied to the development of mental health management system, and through the relevant algorithm to the student mental health file in a large number of fuzzy, random data information related to the processing, mining potential valuable information, which to a certain extent helps the psychological counsellor to improve efficiency, can be a more scientific, rapid psychological judgment of patients, and time to carry out the patient Psychological counselling and intervention.This project is mainly based on the laboratory project of psychological cloud big data platform, firstly, the psychological cloud big data platform is a comprehensive service system mainly about users’ mental health, which consists of a scale management system, user management system, psychological assessment system, crisis warning system, and online consultation system and other subsystems. The main purpose of this project is to study the potential laws between the user’s basic attribute information and the results of the scale assessment factors, using data mining techniques, establishing algorithmic models through experimental comparisons, mining out the potential laws between the data, and finally applying them to the psychological cloud big data platform, designing a user psychological portrait module to be used with the psychological cloud big data platform system.


## 2. Related Works

Regarding data mining about mental health, the ID3 decision tree algorithm was used to generate a model with and without anxiety symptoms, and then the extracted rules were analysed and studied to finally conclude that the degree of family harmony and gender are the most critical factors influencing anxiety disorders [5]. The psychometric scales in the college student psychological profile system were studied using the C4.5 algorithm, and the assessment data of psychological abnormalities were first screened as the data set, and then the final decision tree was constructed for data analysis [6]. The same C4.5 algorithm was used to construct a decision tree, and the two characteristics of somatization and hostility were found to have a significant impact on college students’ mental health [7]. However, these three scholars mainly used a single-decision tree algorithm to analyse the degree of influence of the individual’s underlying factors on their mental health indicators, and could not obtain the mental health information of the whole population [8]. By using three algorithms, such as CART decision tree, BP artificial neural network, and pattern recognition network, we established a psychological mining model for college students, and then experimentally verified and analysed the three algorithms separately, and finally designed a data mining kernel program to classify the data by combining the three methods. But although he used a variety of algorithms to analyse, each algorithm is independent of the other and is a parallel way to research [9].When determining the data, it is generally done in two ways. First, a data model is created, along with rules describing the definition of the concept set or data class set; then the data to be processed is classified according to the model and rules that have been set [10]. Speculative data are analysed and studied by analysing previous historical data, building models, and classifying them into two categories, the first one is to analyse and study the marked samples to make a value assessment; the second one is to analyse and predict the attributes and value domains of the fixed samples [11]. To a certain extent, it will help psychological counsellors to improve work efficiency, make psychological judgments on patients more scientifically and quickly, and conduct timely diagnosis and treatment of patients. Psychological counselling and intervention. Data analysis work is to analyse the variables and dependent quantities in the data to find out the potential patterns, or to change the dependent quantities to find out the variables that bring changes. In simple terms, the rules that exist between dependent quantities and variables are identified in terms of time or sequencing [12]. For antiaircraft artillery soldiers, they are often required to perform missions during the day, night, and in extreme weather, and because the targets are unpredictable, they are subjected to a higher psychological burden, which in turn leads to their mental health often being in a poor state [13]. For soldiers in the peacekeeping force, because of the poor environment and social instability, the living environment is also different from the environment they grew up in, which will produce serious psychological pressure on them and affect their psychological health development, making them more likely to develop psychological stress disorder.The data in the entire database, taken from many data tables, therefore has a low level of data quality, with a large amount of duplicate data, noisy data, and other useless data. These data can interfere with the screening of the target data and make the research results inaccurate. Therefore, before this data is targeted for discovery, the original data must be cleaned. The algorithm is suitable for the classification of discrete and continuous variables. The smaller the Gini coefficient, the smaller the heterogeneity of the sample and the better the segmentation effect. The main advantage of the CART algorithm is that no logarithmic operation is involved in the process of tree building, so the computation is fast and the operation efficiency is high. Also, it can do the processing for highly skewed and polymorphic numerical data ordered or unordered category-based attribute data. However, its disadvantages are also prominent, i.e., the chance of misclassification is higher in the case of many categories, and the prediction results are unstable for samples of smaller data sets.


## 3. Design and Optimization Analysis of Mental Health Education Consultation Management System with Information Gain Decision Tree Algorithm

### 3.1. Information Gain Decision Tree Algorithm Design

A decision tree is a tree structure to represent the final classification, and the generated If-Then forum rules are easy to understand. The decision tree method is relatively inexpensive to compute, which can shorten the computation time and improve efficiency. Finally, a decision tree to generate mental health symptoms of vocational students is constructed. Valuable laws and knowledge information are mined through algorithms, and some reasonable and effective decision-making basis for future school mental health education is provided. Using the C4.5 algorithm in the decision tree to mine student mental health data, the decision tree generating mental health symptoms of higher education students is finally constructed by recursively selecting the attributes in the sample set that are of the highest information gain value as the test attributes. The algorithm mines valuable laws and knowledge information and provides some reasonable and effective decision bases for future school mental health education work [14].Typically, decision trees are constructed to generate decision trees based on the probability of occurrence in certain situations, and it is a decision tree method for assessing project risk, moreover, it is a graphical method using probability analysis. The decision tree is constructed by first training the sample set, and by classifying the sample set to produce the final set of decisions. Overall, the final decision tree is a decision set composed of a tree structure, whose leaf nodes represent attribute class names, the leaf nodes connected to the decision root node represent a classification, and the path between the decision root node and the leaf nodes represents the classification rules of the attributes, as shown in Figure1.Figure 1
Decision tree.First, assume that the sample data setD has m samples. Then assume that there is an attribute with value n in this sample one of which is denoted as C and n have different categories denoted as Eii=1,2,…,n. Where dn denotes the number of samples of category E. Based on this dataset D, its total information first can be calculated by equation.(1)Id1,d1,…,dn=∑i=1Npi2Inpi.Suppose the range of values in attributeC is 1 m, and each value is noted as C1,C2,…,Cm, then the dataset D can be divided into m word sets d1,d1,…,dn by the attribute C: since the dataset D includes the subset D1, each set D is divided into m words., dm}: Since the dataset D includes the containing subset D, each set D1 has C; values in it [15]. If attribute C is a test value, then the new subset after division from the sample set D represents the new leaf node. Suppose D; represents the number of samples with category E in the leaf set D, then the information first EC of the samples divided according to the attribute C in equation:(2)EC=∑i=1ND1j2+D2j2+⋯,+Dnj2D.The final information gain value for the sample data setD divided according to attribute C is as in equation:(3)CainC=Id1,d1,…,dn+EC.The ID3 algorithm is clear in theory, simple in algorithm implementation, and the first reference information is firstly incorporated into the decision tree algorithm, which makes the final constructed decision tree have the least number of nodes. However, when selecting attributes, it may choose attributes with more concentrated values, which are more sensitive to noisy data, which may lead to the decision tree model changing accordingly with different training data. Overall, due to its simplicity and ease of use, it is widely used in major fields, and the ID3 algorithm is relatively classical and important in the field of data mining. Overall, the final decision tree is a decision set composed of a tree structure. Its leaf nodes represent attribute class names, and the leaf nodes connected to the decision root node represent a classification. The paths between represent the classification rules for attributes.(4)Infod1,d1,…,dn=∑i=1kdidlndid,EC=∑i=1NdidD1j2+D2j2+…,+Dnj2D.The filtering rules are filtered based on the support, which is the number of instances found to meet the rules. Confidence is the ratio of instances determined by the conclusion, and support is the number of instances that satisfy the rule. The rules with high support/confidence are found, but usually, the confidence level is not set to 100% to find all rules, even if there are hundreds of rules, many of them have very low support. In general, the minimum confidence is set to the minimum to find the maximum support at the minimum confidence. The function of the Apriorism algorithm is to extract the high support itemset from the generated rules and extract the rules above the minimum confidence level. The strategy of the Apriorism algorithm is to reduce the minimum support level repeatedly until the specified number of rules are found within the minimum confidence range. Association rules and classification rules require different skills when used, the former being significantly larger than the latter. Therefore, support and confidence are two important indicators of association rules.(5)CainC=Infod1,d1,…,dn+EC.The matter database is partitioned to form several panels, and they are made into Boolean matrices, which are successfully processed before several Boolean matrices are merged into one whole. The matrix is scanned, their support is counted, the data below the minimum support criterion is removed, and the remaining row vectors are sorted from smallest to largest according to their numerical size to construct the final matrix to obtain the set of frequent terms. The resulting Boolean matrix is then weighted to calculate the sum, find the values smaller than the minimum support, and discard such values to obtain the frequent item set. The Boolean positive calculation is processed in this way, and when the matrix meets the minimum support, it is no longer processed.We maintain and update the user names of database users regularly, so that data security can be greatly improved and hackers can be evaded, which will not cause users to lose data or reduce the occurrence of such situations. With the use of the database, the data is also increasing accordingly, so how to deal with the database becomes a more critical issue. For example, when we use the system, some functions are used more and some less, and the data is the same principle, some will be used more frequently, while others are not used much, so the importance of classifying the data is shown. For the more frequently used data should be saved so that the response time of the database can play a certain role in the protection, as shown in Figure2.Figure 2
Algorithm flow.Because the decision tree is not entirely based on the training sample set, and it fails to deal with the noise data and the point data outside the data group, which makes the decision tree constructed with a large number of branches generated by abnormal data, these branches are not reasonable, because the existence of a large number of useless branches makes the whole decision tree looks too lush, resulting in the overall lack of readability and validity of the decision tree as a whole [16]. For the first time, the information is directly referenced to the decision tree algorithm, so that the final decision tree has the fewest nodes. However, when selecting attributes, attributes with relatively concentrated values may be selected, which are more sensitive to noise data. Based on this unfavourable phenomenon, a pruning method may be used to remove the branches that are not useful and replace them with leaves, which is a very effective simplification method that can largely reduce the complexity and improve the actual prediction speed and classification efficiency of the decision tree.(6)e′t≥e′Tt−See′Tt.The first one is the first pruning method, and the second one is the second pruning method. The first one mainly foresees the formulation of some rules to restrict the growth of the decision tree, emphasizing the execution before the split. The second one is to cut off the unreasonable branches and replace them with leaf points after the decision tree model is built, which is usually more effective than the first one and is widely used in practice. In the paper, the PEP postpruning algorithm is mainly applied when pruning is implemented for the model.Tt denotes the subtree at node t as the root node, See′Tt is the standard error defined as(7)See′Tt=e′Tt−See′Ttnt.The PEP method also has shortcomings when pruning, e.g., it may prune reasonable nodes while pruning unreasonable ones. Despite these shortcomings, the algorithm is accurate in its application, and all subtrees are visited only once during pruning, which is more efficient than other methods and does not require separation of the training data set.The student mental health assessment module is designed for higher vocational students, mainly for the maintenance of basic information and the collection of psychological survey and assessment information, and the establishment of mental health data files for students [17]. After students log in to the system, the system collects the basic information of students by modifying and maintaining their basic information, and the system collects the data of mental health assessment by online mental health assessment.Mental health data management module for managers, mainly to achieve assessment information page settings, basic student information management, psychological survey question settings, assessment results management, and data mining analysis, and other operations. Find rules with high support/confidence, but usually do not set the confidence to 100% to find all rules, if there are hundreds of rules, many of them have low support. In general, the minimum confidence is set to the minimum to find the maximum support under the minimum confidence. The backend managers use the psychological survey questions to add and modify the assessment contents; collect the basic information of students and the submitted psychological assessment information data, and then prepare the data through the data mining function to realize the mining and analysis of classification rules and association rules, and then predict the mental health status of the higher vocational students.


### 3.2. Design Optimization Analysis of Mental Health Education and Consultation Management System

The psychological status of students is reflected through the collection of data in three areas, including their intelligence, personality traits, and mental health status. These data generally come from the test results of psychological test forms and the corresponding situation data generated by teachers, parents, and students themselves in their counselling needs. Based on the data content of the surveys, scientific data mining techniques are used to rationally coordinate and analyse them to make scientific evaluations of students’ mental health status. Observation record means that the teacher corresponding to the student takes extra care and records the abnormal behaviour patterns of the student, and it serves as a side supplement to the psychological evaluation, for example, the abnormal behaviour of a student in a certain period, and the teacher records the detailed events as well as the place and time of occurrence.With the help of the assessment management system, the questions can be selected according to the basic conditions of the students, and the comparative analysis of the student’s mental health can be made based on the results stored in the question bank [18]. The psychological assessment can reflect the social and communicative quality and personality orientation of individuals, and can also identify the existence of adverse psychological conditions, and has high reliability and validity.The psychometric system in this paper is mainly designed in a minimalist style in terms of the colour scheme of the display interface. To obtain frequent itemset. Operation to obtain the Boolean matrix, and then calculate the weighted value, calculate their sum, find out the value smaller than the minimum support degree, and discard such values to obtain frequent itemset. To improve the input accuracy, drop-down boxes are added in the windows where input is required to replace text input by selecting the requirements. Some browsers may show only part of the content in the drop-down box, so when testing the system, the performance of different browsers in the market should be tested to ensure that the assessment data can be displayed normally on all common browsers, as shown in Figure3.Figure 3
Model health factor prediction fold line.From Figure3, we can see that the number of clusters initialized has different effects on the accuracy of the prediction of different mental health factors; the initial value of clusters has a greater effect on the factor of interpersonal sensitivity, but a smaller effect on the factor of terror symptoms and emotional impulsivity; overall, the accuracy of the prediction of terror symptoms is higher than that of interpersonal sensitivity, reaching an average of more than 80%. For practical use, we need to use the initial value used for each factor when it has the largest prediction value.When organizing the information in the system, we need to make use of the reports, because the system is designed to numerous data, therefore, different types of data need to have an automatic filing function. To ensure a short waiting time for the feedback results, we are required to specify the process for each operation of the system. When a certain step is executed, the system can complete the work automatically according to the process. The amount of data in the system is also very important, if the amount of data in the system is larger, then the amount of data in the system for the operation will also be large, which will have an impact on the user experience, but also on the archiving inconvenience, so this requires us to create indexes, the creation of indexes will reduce the workload of the system, relatively speaking, the speed of the system will also be improved.The system uses a B/S structure, which allows the user to access the system through any browser software. The web design is implemented using JSP technology and the database is MYSQL. Tomcat 6.0 server was chosen to facilitate the development and testing of the software. When we use the system, there will definitely be some functions that are used more and some functions that are used less. The data is the same principle, some will be used more frequently, and some will not be used very much, so classify the data. importance is shown. The system was developed using the MyEclipse platform, which significantly improved the efficiency of the software development and shortened the development cycle of the project. The development environment for the whole system in this thesis is shown in Table1.Table 1
System implementation environment configuration.
Environment configuration nameEnvironment configurationIntegrated development environmentMyeclipse 6.0Project operating environmentIE browserNetwork service environmentMYSQL database, J2EESupporting system environmentStruts, spring, hibernateMyEclipse significantly improved the efficiency of our work in database design, shortened the development cycle of the project, and increased the efficiency of development. Table1 is the development environment we set up for the whole system in this article [19]. As we know, the interface of the system is the intuitive feeling of the user, so the interface of the system will directly affect the first impression of the user, to make the user actively cooperate with our psychological assessment work and seriously answer the questions related to psychological assessment, the interface needs to be designed simply and freshly.An important issue facing the management and maintenance of the database is the cumulative increase in the volume of information, which is inevitable but also needs to be dealt with promptly to reduce the burden on the server and avoid risks. For example, in the specific use of the system, there will certainly be frequently applied and less applied functions, data is the same, some data will be frequently used, while some are less used, so it is very necessary to classify the data, to save those frequently used data, to protect the response time of the database to a certain extent, as shown in Figure4.Figure 4
Comparison of the results of the assessment of students’ psychological problems by different algorithms.When organizing system information, to bring the role of reports into full play, the system design will inevitably involve a large amount of data, and it is very necessary to design functions for the automatic filling of various types of data. To make the waiting time for feedback as short as possible, it is necessary to plan a fixed process for a series of different types of operations [20]. Using the system settings, automatic procedures can be selected for specific items. The amount of data in the system will increase with the amount of data in the system, which will make the system slow, affect the user experience, and is not conducive to archiving, so it is necessary to create indexes, which will reduce the workload of the system and improve the speed of the system to a certain extent.Database information storage to be supported by operational data, the query time will be longer with the accumulation of data, and the opposite time is shorter. When the system response is sluggish, it is necessary to significantly improve the system response time. Therefore, it is very necessary to establish a caching mechanism to improve the problem of stagnation. In the actual pruning, all subtrees are only visited once. Compared with other methods, this method has higher efficiency and does not need to separate the training data set. Data that is used frequently can be stored in the cache, and when the data is used later, it can be searched directly from the cache, which can reduce the response time to a great extent.


## 3.1. Information Gain Decision Tree Algorithm Design

A decision tree is a tree structure to represent the final classification, and the generated If-Then forum rules are easy to understand. The decision tree method is relatively inexpensive to compute, which can shorten the computation time and improve efficiency. Finally, a decision tree to generate mental health symptoms of vocational students is constructed. Valuable laws and knowledge information are mined through algorithms, and some reasonable and effective decision-making basis for future school mental health education is provided. Using the C4.5 algorithm in the decision tree to mine student mental health data, the decision tree generating mental health symptoms of higher education students is finally constructed by recursively selecting the attributes in the sample set that are of the highest information gain value as the test attributes. The algorithm mines valuable laws and knowledge information and provides some reasonable and effective decision bases for future school mental health education work [14].Typically, decision trees are constructed to generate decision trees based on the probability of occurrence in certain situations, and it is a decision tree method for assessing project risk, moreover, it is a graphical method using probability analysis. The decision tree is constructed by first training the sample set, and by classifying the sample set to produce the final set of decisions. Overall, the final decision tree is a decision set composed of a tree structure, whose leaf nodes represent attribute class names, the leaf nodes connected to the decision root node represent a classification, and the path between the decision root node and the leaf nodes represents the classification rules of the attributes, as shown in Figure1.Figure 1
Decision tree.First, assume that the sample data setD has m samples. Then assume that there is an attribute with value n in this sample one of which is denoted as C and n have different categories denoted as Eii=1,2,…,n. Where dn denotes the number of samples of category E. Based on this dataset D, its total information first can be calculated by equation.(1)Id1,d1,…,dn=∑i=1Npi2Inpi.Suppose the range of values in attributeC is 1 m, and each value is noted as C1,C2,…,Cm, then the dataset D can be divided into m word sets d1,d1,…,dn by the attribute C: since the dataset D includes the subset D1, each set D is divided into m words., dm}: Since the dataset D includes the containing subset D, each set D1 has C; values in it [15]. If attribute C is a test value, then the new subset after division from the sample set D represents the new leaf node. Suppose D; represents the number of samples with category E in the leaf set D, then the information first EC of the samples divided according to the attribute C in equation:(2)EC=∑i=1ND1j2+D2j2+⋯,+Dnj2D.The final information gain value for the sample data setD divided according to attribute C is as in equation:(3)CainC=Id1,d1,…,dn+EC.The ID3 algorithm is clear in theory, simple in algorithm implementation, and the first reference information is firstly incorporated into the decision tree algorithm, which makes the final constructed decision tree have the least number of nodes. However, when selecting attributes, it may choose attributes with more concentrated values, which are more sensitive to noisy data, which may lead to the decision tree model changing accordingly with different training data. Overall, due to its simplicity and ease of use, it is widely used in major fields, and the ID3 algorithm is relatively classical and important in the field of data mining. Overall, the final decision tree is a decision set composed of a tree structure. Its leaf nodes represent attribute class names, and the leaf nodes connected to the decision root node represent a classification. The paths between represent the classification rules for attributes.(4)Infod1,d1,…,dn=∑i=1kdidlndid,EC=∑i=1NdidD1j2+D2j2+…,+Dnj2D.The filtering rules are filtered based on the support, which is the number of instances found to meet the rules. Confidence is the ratio of instances determined by the conclusion, and support is the number of instances that satisfy the rule. The rules with high support/confidence are found, but usually, the confidence level is not set to 100% to find all rules, even if there are hundreds of rules, many of them have very low support. In general, the minimum confidence is set to the minimum to find the maximum support at the minimum confidence. The function of the Apriorism algorithm is to extract the high support itemset from the generated rules and extract the rules above the minimum confidence level. The strategy of the Apriorism algorithm is to reduce the minimum support level repeatedly until the specified number of rules are found within the minimum confidence range. Association rules and classification rules require different skills when used, the former being significantly larger than the latter. Therefore, support and confidence are two important indicators of association rules.(5)CainC=Infod1,d1,…,dn+EC.The matter database is partitioned to form several panels, and they are made into Boolean matrices, which are successfully processed before several Boolean matrices are merged into one whole. The matrix is scanned, their support is counted, the data below the minimum support criterion is removed, and the remaining row vectors are sorted from smallest to largest according to their numerical size to construct the final matrix to obtain the set of frequent terms. The resulting Boolean matrix is then weighted to calculate the sum, find the values smaller than the minimum support, and discard such values to obtain the frequent item set. The Boolean positive calculation is processed in this way, and when the matrix meets the minimum support, it is no longer processed.We maintain and update the user names of database users regularly, so that data security can be greatly improved and hackers can be evaded, which will not cause users to lose data or reduce the occurrence of such situations. With the use of the database, the data is also increasing accordingly, so how to deal with the database becomes a more critical issue. For example, when we use the system, some functions are used more and some less, and the data is the same principle, some will be used more frequently, while others are not used much, so the importance of classifying the data is shown. For the more frequently used data should be saved so that the response time of the database can play a certain role in the protection, as shown in Figure2.Figure 2
Algorithm flow.Because the decision tree is not entirely based on the training sample set, and it fails to deal with the noise data and the point data outside the data group, which makes the decision tree constructed with a large number of branches generated by abnormal data, these branches are not reasonable, because the existence of a large number of useless branches makes the whole decision tree looks too lush, resulting in the overall lack of readability and validity of the decision tree as a whole [16]. For the first time, the information is directly referenced to the decision tree algorithm, so that the final decision tree has the fewest nodes. However, when selecting attributes, attributes with relatively concentrated values may be selected, which are more sensitive to noise data. Based on this unfavourable phenomenon, a pruning method may be used to remove the branches that are not useful and replace them with leaves, which is a very effective simplification method that can largely reduce the complexity and improve the actual prediction speed and classification efficiency of the decision tree.(6)e′t≥e′Tt−See′Tt.The first one is the first pruning method, and the second one is the second pruning method. The first one mainly foresees the formulation of some rules to restrict the growth of the decision tree, emphasizing the execution before the split. The second one is to cut off the unreasonable branches and replace them with leaf points after the decision tree model is built, which is usually more effective than the first one and is widely used in practice. In the paper, the PEP postpruning algorithm is mainly applied when pruning is implemented for the model.Tt denotes the subtree at node t as the root node, See′Tt is the standard error defined as(7)See′Tt=e′Tt−See′Ttnt.The PEP method also has shortcomings when pruning, e.g., it may prune reasonable nodes while pruning unreasonable ones. Despite these shortcomings, the algorithm is accurate in its application, and all subtrees are visited only once during pruning, which is more efficient than other methods and does not require separation of the training data set.The student mental health assessment module is designed for higher vocational students, mainly for the maintenance of basic information and the collection of psychological survey and assessment information, and the establishment of mental health data files for students [17]. After students log in to the system, the system collects the basic information of students by modifying and maintaining their basic information, and the system collects the data of mental health assessment by online mental health assessment.Mental health data management module for managers, mainly to achieve assessment information page settings, basic student information management, psychological survey question settings, assessment results management, and data mining analysis, and other operations. Find rules with high support/confidence, but usually do not set the confidence to 100% to find all rules, if there are hundreds of rules, many of them have low support. In general, the minimum confidence is set to the minimum to find the maximum support under the minimum confidence. The backend managers use the psychological survey questions to add and modify the assessment contents; collect the basic information of students and the submitted psychological assessment information data, and then prepare the data through the data mining function to realize the mining and analysis of classification rules and association rules, and then predict the mental health status of the higher vocational students.


## 3.2. Design Optimization Analysis of Mental Health Education and Consultation Management System

The psychological status of students is reflected through the collection of data in three areas, including their intelligence, personality traits, and mental health status. These data generally come from the test results of psychological test forms and the corresponding situation data generated by teachers, parents, and students themselves in their counselling needs. Based on the data content of the surveys, scientific data mining techniques are used to rationally coordinate and analyse them to make scientific evaluations of students’ mental health status. Observation record means that the teacher corresponding to the student takes extra care and records the abnormal behaviour patterns of the student, and it serves as a side supplement to the psychological evaluation, for example, the abnormal behaviour of a student in a certain period, and the teacher records the detailed events as well as the place and time of occurrence.With the help of the assessment management system, the questions can be selected according to the basic conditions of the students, and the comparative analysis of the student’s mental health can be made based on the results stored in the question bank [18]. The psychological assessment can reflect the social and communicative quality and personality orientation of individuals, and can also identify the existence of adverse psychological conditions, and has high reliability and validity.The psychometric system in this paper is mainly designed in a minimalist style in terms of the colour scheme of the display interface. To obtain frequent itemset. Operation to obtain the Boolean matrix, and then calculate the weighted value, calculate their sum, find out the value smaller than the minimum support degree, and discard such values to obtain frequent itemset. To improve the input accuracy, drop-down boxes are added in the windows where input is required to replace text input by selecting the requirements. Some browsers may show only part of the content in the drop-down box, so when testing the system, the performance of different browsers in the market should be tested to ensure that the assessment data can be displayed normally on all common browsers, as shown in Figure3.Figure 3
Model health factor prediction fold line.From Figure3, we can see that the number of clusters initialized has different effects on the accuracy of the prediction of different mental health factors; the initial value of clusters has a greater effect on the factor of interpersonal sensitivity, but a smaller effect on the factor of terror symptoms and emotional impulsivity; overall, the accuracy of the prediction of terror symptoms is higher than that of interpersonal sensitivity, reaching an average of more than 80%. For practical use, we need to use the initial value used for each factor when it has the largest prediction value.When organizing the information in the system, we need to make use of the reports, because the system is designed to numerous data, therefore, different types of data need to have an automatic filing function. To ensure a short waiting time for the feedback results, we are required to specify the process for each operation of the system. When a certain step is executed, the system can complete the work automatically according to the process. The amount of data in the system is also very important, if the amount of data in the system is larger, then the amount of data in the system for the operation will also be large, which will have an impact on the user experience, but also on the archiving inconvenience, so this requires us to create indexes, the creation of indexes will reduce the workload of the system, relatively speaking, the speed of the system will also be improved.The system uses a B/S structure, which allows the user to access the system through any browser software. The web design is implemented using JSP technology and the database is MYSQL. Tomcat 6.0 server was chosen to facilitate the development and testing of the software. When we use the system, there will definitely be some functions that are used more and some functions that are used less. The data is the same principle, some will be used more frequently, and some will not be used very much, so classify the data. importance is shown. The system was developed using the MyEclipse platform, which significantly improved the efficiency of the software development and shortened the development cycle of the project. The development environment for the whole system in this thesis is shown in Table1.Table 1
System implementation environment configuration.
Environment configuration nameEnvironment configurationIntegrated development environmentMyeclipse 6.0Project operating environmentIE browserNetwork service environmentMYSQL database, J2EESupporting system environmentStruts, spring, hibernateMyEclipse significantly improved the efficiency of our work in database design, shortened the development cycle of the project, and increased the efficiency of development. Table1 is the development environment we set up for the whole system in this article [19]. As we know, the interface of the system is the intuitive feeling of the user, so the interface of the system will directly affect the first impression of the user, to make the user actively cooperate with our psychological assessment work and seriously answer the questions related to psychological assessment, the interface needs to be designed simply and freshly.An important issue facing the management and maintenance of the database is the cumulative increase in the volume of information, which is inevitable but also needs to be dealt with promptly to reduce the burden on the server and avoid risks. For example, in the specific use of the system, there will certainly be frequently applied and less applied functions, data is the same, some data will be frequently used, while some are less used, so it is very necessary to classify the data, to save those frequently used data, to protect the response time of the database to a certain extent, as shown in Figure4.Figure 4
Comparison of the results of the assessment of students’ psychological problems by different algorithms.When organizing system information, to bring the role of reports into full play, the system design will inevitably involve a large amount of data, and it is very necessary to design functions for the automatic filling of various types of data. To make the waiting time for feedback as short as possible, it is necessary to plan a fixed process for a series of different types of operations [20]. Using the system settings, automatic procedures can be selected for specific items. The amount of data in the system will increase with the amount of data in the system, which will make the system slow, affect the user experience, and is not conducive to archiving, so it is necessary to create indexes, which will reduce the workload of the system and improve the speed of the system to a certain extent.Database information storage to be supported by operational data, the query time will be longer with the accumulation of data, and the opposite time is shorter. When the system response is sluggish, it is necessary to significantly improve the system response time. Therefore, it is very necessary to establish a caching mechanism to improve the problem of stagnation. In the actual pruning, all subtrees are only visited once. Compared with other methods, this method has higher efficiency and does not need to separate the training data set. Data that is used frequently can be stored in the cache, and when the data is used later, it can be searched directly from the cache, which can reduce the response time to a great extent.


## 4. Results and Analysis

### 4.1. Information Gain Decision Tree Algorithm Performance Results

Both system and performance tests were conducted. The system was found to be in a relatively stable state and could run at a high speed, with a good performance in terms of resource consumption, and the CPU utilization rate could be controlled at around 30 percentage points. In terms of test stress, the CPU utilization rate can be controlled at around 20 percentage points in a particular environment, which can meet the expectation. From the analysis of the test report, the performance of the system can meet the standard. However, if more than five hundred customers are using the system at the same time, the system’s response speed is significantly slower and the CPU utilization rate is significantly higher; if there are less than five hundred users online at the same time, the system is more stable. The effect of student counselling was tested, and Figure5 shows the comparison of the accuracy of student psychological problem evaluation results of different algorithms.Figure 5
Comparison of the results of the assessment of students’ psychological problems by different algorithms.From the figure, the psychological assessment using the Apriori algorithm achieved higher accuracy than the correlation analysis, using the correlation analysis algorithm than the manual analysis mode. Using different algorithms and modes of assessment for 200, 400, 600, and 1000 students, the accuracy based on the Apriori algorithm was higher when using the three modes of assessment.The preprocessed 847 data were randomly divided into a training set and test set according to the ratio of 7 : 3, with 593 data set in the training set and 254 data set in the test set. In the integrated development environment of PyCharm 3.3, two decision tree algorithms, C4.5 and CART, were applied to construct different college students’ psychological crisis, early warning models, using the training set data, and then the same test set data were used to evaluate the performance of the two models, and the optimal algorithm suitable for this study was selected based on four evaluation indexes of accuracy, precision, recall andF-value. Then, through the data mining function, the data is prepared, the classification rules and association rules are mined and analysed, and then the mental health status of higher vocational students is predicted.After reaching the labelled root node, the remaining attributes are then recursively classified based on the left and right branches of the root node according to the above process until all samples fall into the same category or all attributes are traversed. After the tree is built, overfitting may occur, so the decision tree is postpruned to further improve the generalization ability of the decision tree model. Combining the characteristics of the two algorithms and the performance evaluation of the prediction results, the C4.5 decision tree algorithm is more applicable and the prediction results are more reliable for this study. Therefore, the psychological crisis early warning model constructed using the C4.5 decision tree algorithm will be studied and applied in this paper, as shown in Figure6.Figure 6
Results of component factor analysis.The data mining technique was applied to the mental health data of higher vocational students by using basic student information and SCL90 psychometric scale data as the training set. The results obtained from the analysis of mental health problems of higher vocational students in Chapter 4 were compared with the data mining results in the mental health assessment system, and the analysis rules obtained from the system were consistent with the experience and psychological perceptions in psychological counselling, which confirmed that the data mining techniques applied to the research and analysis of mental health data of higher vocational students are implementable. Therefore, the development and application of this system play a good early warning role in promoting the mental health of higher vocational students and providing effective technical support for the informatization of mental health management.Project management is a starting point of this system, and the project management system starts with the creation of projects. The project creation is done by the system administrator, and after the project creation is completed, the system administrator assigns the corresponding project manager, and then the project management is done by the project manager. The accuracy rate based on the Apriori algorithm is higher. The preprocessed 847 pieces of data are randomly divided into training set and test set according to the ratio of 7 : 3, with 593 pieces of data set for training set and 254 pieces of test set. The project manager needs to manage the project members and assign roles to them. Through the analysis and mining of the assessment information, we obtain that many objective factors affect the mental health of college students. Therefore, in the future mental health counselling work of college students, it is targeted to improve the awareness of college students’ mental health through many ways and help them solve their psychological problems.


### 4.2. System Design Optimization Results

The front-end implementation of the user psychological portrait is using the front-end framework Vue framework, in which the graphics are displayed using the chart plugin. The user psychological portrait page is shown in Figure6, in which the displayed data is the offline test data, and the page has three parts which are user basic information, mental health factor prediction information, and psychological assessment factor information. Before testing the system functions, system testers need to write test cases. Test cases are test inputs, execution conditions, and expected results written for a certain goal to test whether a function achieves the desired effect. The main purpose of writing test cases is to clarify ideas and avoid omissions, to be able to clearly understand the progress of testing and to design test cases that will also provide a reference basis for subsequent testing. Testers will check the integrity of each function of the system according to the test cases. The following is an overview of the test cases for the core sections of the system, project management, performance assessment, and task management modules. Test accounts are divided into two categories: system administrator privileges and general staff privileges.By comparing the difference between the information in the bar chart and the radar chart, i.e., by comparing the assessment information with the prediction information, the counsellor can help the user to make a detailed judgment about the user’s psychological condition, e.g., if there is a large difference between the comparison results of a certain factor, the counsellor needs to pay attention to it and determine whether the user is hiding something in the process of assessment, to help the user more comprehensively, as shown in Figure7.Figure 7
User psychological portrait page.Mental health factor prediction shows the prediction of the mental health factor of the user by the user’s basic attribute information, which is represented by a bar chart: where the bar up represents the probability of being sick on the mental health factor, and the percentage represents the probability of being sick; the bar down represents the probability of not being sick on the mental health factor, and the percentage represents the probability of being sick. For example, the data in the graph represents the prediction that the user has a 68.71% probability of suffering from “depression” and an 84.12% probability of not suffering from “abnormal thinking,” etc. The data is displayed in the radar chart, the light-yellow area in the chart represents the safe area, the factor data falling in the area means the user is free from the symptoms, the factor data beyond the area means the user is suffering from the symptoms of the mental health factor, the farther from the centre of the chart, the more serious the symptoms.This function module mainly refers to the maintenance and modification of the question database information, management of the deletion, query, and correction of individual questions, and other operations. Each answers a test question, you can click on the option for the next test, to maintain the accuracy of the test is generally not set to return to the previous question function, but according to the needs of different types of test questions, will also be arranged to return to answer this option, in the next comment on whether there is a return to answer the information tips. Therefore, the development and application of this system have played a good early warning role in promoting the mental health of vocational students, and provided effective technical support for the informatization of mental health management. The actual operation of the system consists of three major parts: students’ answers, system analysis, and evaluation, and provision of test reports. Based on the information collected from students, the system needs to analyse the information submitted by students, combine it with psychological research models, and interpret the assessment results promptly so that students can visually see their psychological assessment results.The assessment system used by college counsellors can well observe the overall answer situation of students, and the system can also modify the questions regularly according to the assessment results so that counsellors can make necessary psychological interventions for students with psychological problems found in the test during teaching and teaching services, not only that but also spread positive energy to students so that they can live and study with a healthy and positive mindset, as shown in Figure8.Figure 8
Summary of measurement results.In this process, the system uses the SQL function to calculate the score of the questionnaire and classify the family relationship according to the score, and the classification result is stored in the database table. After logging into the system, classroom teachers and super administrator users can enter the information collection module and see the list of student records within their respective authority, and click “Details” to view the details of the student. The class teacher user can search for the specified student information by entering the student’s name or school number, and the super administrator can search, edit, and download the student information.Test each page of the system to check the human-computer interaction of the three types of users and each functional module to ensure that users can access and browse the relevant pages normally. Conduct corresponding tests on the function points of each module in the system to verify whether each function point can operate normally and stably and whether it can achieve the expected results. The system is accessed through several of the most popular browsers on the market, and the stability of the interface is tested and the function points are tested one by one to ensure that the system is compatible.


## 4.1. Information Gain Decision Tree Algorithm Performance Results

Both system and performance tests were conducted. The system was found to be in a relatively stable state and could run at a high speed, with a good performance in terms of resource consumption, and the CPU utilization rate could be controlled at around 30 percentage points. In terms of test stress, the CPU utilization rate can be controlled at around 20 percentage points in a particular environment, which can meet the expectation. From the analysis of the test report, the performance of the system can meet the standard. However, if more than five hundred customers are using the system at the same time, the system’s response speed is significantly slower and the CPU utilization rate is significantly higher; if there are less than five hundred users online at the same time, the system is more stable. The effect of student counselling was tested, and Figure5 shows the comparison of the accuracy of student psychological problem evaluation results of different algorithms.Figure 5
Comparison of the results of the assessment of students’ psychological problems by different algorithms.From the figure, the psychological assessment using the Apriori algorithm achieved higher accuracy than the correlation analysis, using the correlation analysis algorithm than the manual analysis mode. Using different algorithms and modes of assessment for 200, 400, 600, and 1000 students, the accuracy based on the Apriori algorithm was higher when using the three modes of assessment.The preprocessed 847 data were randomly divided into a training set and test set according to the ratio of 7 : 3, with 593 data set in the training set and 254 data set in the test set. In the integrated development environment of PyCharm 3.3, two decision tree algorithms, C4.5 and CART, were applied to construct different college students’ psychological crisis, early warning models, using the training set data, and then the same test set data were used to evaluate the performance of the two models, and the optimal algorithm suitable for this study was selected based on four evaluation indexes of accuracy, precision, recall andF-value. Then, through the data mining function, the data is prepared, the classification rules and association rules are mined and analysed, and then the mental health status of higher vocational students is predicted.After reaching the labelled root node, the remaining attributes are then recursively classified based on the left and right branches of the root node according to the above process until all samples fall into the same category or all attributes are traversed. After the tree is built, overfitting may occur, so the decision tree is postpruned to further improve the generalization ability of the decision tree model. Combining the characteristics of the two algorithms and the performance evaluation of the prediction results, the C4.5 decision tree algorithm is more applicable and the prediction results are more reliable for this study. Therefore, the psychological crisis early warning model constructed using the C4.5 decision tree algorithm will be studied and applied in this paper, as shown in Figure6.Figure 6
Results of component factor analysis.The data mining technique was applied to the mental health data of higher vocational students by using basic student information and SCL90 psychometric scale data as the training set. The results obtained from the analysis of mental health problems of higher vocational students in Chapter 4 were compared with the data mining results in the mental health assessment system, and the analysis rules obtained from the system were consistent with the experience and psychological perceptions in psychological counselling, which confirmed that the data mining techniques applied to the research and analysis of mental health data of higher vocational students are implementable. Therefore, the development and application of this system play a good early warning role in promoting the mental health of higher vocational students and providing effective technical support for the informatization of mental health management.Project management is a starting point of this system, and the project management system starts with the creation of projects. The project creation is done by the system administrator, and after the project creation is completed, the system administrator assigns the corresponding project manager, and then the project management is done by the project manager. The accuracy rate based on the Apriori algorithm is higher. The preprocessed 847 pieces of data are randomly divided into training set and test set according to the ratio of 7 : 3, with 593 pieces of data set for training set and 254 pieces of test set. The project manager needs to manage the project members and assign roles to them. Through the analysis and mining of the assessment information, we obtain that many objective factors affect the mental health of college students. Therefore, in the future mental health counselling work of college students, it is targeted to improve the awareness of college students’ mental health through many ways and help them solve their psychological problems.


## 4.2. System Design Optimization Results

The front-end implementation of the user psychological portrait is using the front-end framework Vue framework, in which the graphics are displayed using the chart plugin. The user psychological portrait page is shown in Figure6, in which the displayed data is the offline test data, and the page has three parts which are user basic information, mental health factor prediction information, and psychological assessment factor information. Before testing the system functions, system testers need to write test cases. Test cases are test inputs, execution conditions, and expected results written for a certain goal to test whether a function achieves the desired effect. The main purpose of writing test cases is to clarify ideas and avoid omissions, to be able to clearly understand the progress of testing and to design test cases that will also provide a reference basis for subsequent testing. Testers will check the integrity of each function of the system according to the test cases. The following is an overview of the test cases for the core sections of the system, project management, performance assessment, and task management modules. Test accounts are divided into two categories: system administrator privileges and general staff privileges.By comparing the difference between the information in the bar chart and the radar chart, i.e., by comparing the assessment information with the prediction information, the counsellor can help the user to make a detailed judgment about the user’s psychological condition, e.g., if there is a large difference between the comparison results of a certain factor, the counsellor needs to pay attention to it and determine whether the user is hiding something in the process of assessment, to help the user more comprehensively, as shown in Figure7.Figure 7
User psychological portrait page.Mental health factor prediction shows the prediction of the mental health factor of the user by the user’s basic attribute information, which is represented by a bar chart: where the bar up represents the probability of being sick on the mental health factor, and the percentage represents the probability of being sick; the bar down represents the probability of not being sick on the mental health factor, and the percentage represents the probability of being sick. For example, the data in the graph represents the prediction that the user has a 68.71% probability of suffering from “depression” and an 84.12% probability of not suffering from “abnormal thinking,” etc. The data is displayed in the radar chart, the light-yellow area in the chart represents the safe area, the factor data falling in the area means the user is free from the symptoms, the factor data beyond the area means the user is suffering from the symptoms of the mental health factor, the farther from the centre of the chart, the more serious the symptoms.This function module mainly refers to the maintenance and modification of the question database information, management of the deletion, query, and correction of individual questions, and other operations. Each answers a test question, you can click on the option for the next test, to maintain the accuracy of the test is generally not set to return to the previous question function, but according to the needs of different types of test questions, will also be arranged to return to answer this option, in the next comment on whether there is a return to answer the information tips. Therefore, the development and application of this system have played a good early warning role in promoting the mental health of vocational students, and provided effective technical support for the informatization of mental health management. The actual operation of the system consists of three major parts: students’ answers, system analysis, and evaluation, and provision of test reports. Based on the information collected from students, the system needs to analyse the information submitted by students, combine it with psychological research models, and interpret the assessment results promptly so that students can visually see their psychological assessment results.The assessment system used by college counsellors can well observe the overall answer situation of students, and the system can also modify the questions regularly according to the assessment results so that counsellors can make necessary psychological interventions for students with psychological problems found in the test during teaching and teaching services, not only that but also spread positive energy to students so that they can live and study with a healthy and positive mindset, as shown in Figure8.Figure 8
Summary of measurement results.In this process, the system uses the SQL function to calculate the score of the questionnaire and classify the family relationship according to the score, and the classification result is stored in the database table. After logging into the system, classroom teachers and super administrator users can enter the information collection module and see the list of student records within their respective authority, and click “Details” to view the details of the student. The class teacher user can search for the specified student information by entering the student’s name or school number, and the super administrator can search, edit, and download the student information.Test each page of the system to check the human-computer interaction of the three types of users and each functional module to ensure that users can access and browse the relevant pages normally. Conduct corresponding tests on the function points of each module in the system to verify whether each function point can operate normally and stably and whether it can achieve the expected results. The system is accessed through several of the most popular browsers on the market, and the stability of the interface is tested and the function points are tested one by one to ensure that the system is compatible.


## 5. Conclusion

Based on the B/S structure, we designed the mental health assessment system for higher education students, applied data mining technology to the psychological system, automated the collection of information of higher education students and psychological assessment information, increased the depth of data analysis of psychological problems through the application of data mining technology, and verified the feasibility of using data mining technology in the mental health assessment system. After data pre-processing, a matrix-based algorithm was used to discover potential correlations among nine psychological dimension factors of college students, and a decision tree algorithm was used to construct a decision tree from which the classification rules of students’ psychological problems were found, and these researches provide some practical references for college psychological counselling work. The system is developed with Spring MVC as the backend framework and MySQL as the database. The next test can be performed according to the clicked option. To maintain the accuracy of the test, the function of returning to the previous question is generally not set, but according to the needs of different types of test questions. All the functions required by the users are realized, and the modules are tested for interface, function, and compatibility to ensure the system can run normally. The system provides a good platform for the effective application of the psychological crisis early warning model. In addition to providing data support for the early warning model, the basic module has been optimized after the actual user requirements research to enhance the practicality of the system and provide some assistance for the electronic office of student managers and the dynamic monitoring of student psychology.



---

*Source: 7307741-2022-03-31.xml*