Design and implementation of a Java-based psychological assessment system (with source code network disk link)


The source code is open source and can be obtained by yourself. The link is at the end of the article.

Summary

With the rapid development of my country's social economy, the pace of life and work is accelerating, and social competition is becoming more and more fierce. People are under increasing social pressure in life, study and work, especially college students, and their psychological problems are The problem is becoming more and more prominent, and mental diseases and psychological disorders are increasing day by day. If they cannot be solved in time, they may cause serious social consequences. Therefore, it is increasingly important for colleges and universities to develop a psychological assessment system for students. The psychological assessment system for college students is based on the psychological development characteristics of college students. It comprehensively evaluates the abilities, interpersonal skills, personality and other aspects of college students to understand the mental health status of college students, provide timely guidance to students with problems, and prevent various problems. To prevent the occurrence of similar campus cases, realize the connection between college students and society, promote the all-round development of college students in social, emotional, motivation, intelligence and other aspects, thereby building a safe campus and a harmonious society.
This system uses Java programming language, ASP technology, etc. for system development. It uses the MySQL database with data confidentiality, data integrity and other functions as the support platform of the system to improve the data of system users. safety. This article first analyzes the research background of the psychological assessment system and the current research status at home and abroad. Then, through a detailed analysis of the needs of the psychological assessment system for college students, the system is divided into the following functional modules: basic information management functional module, There are four main functional modules: the test question management functional module, the student psychological assessment functional module and the assessment results analysis functional module.

Keywords: Java language; MySQL database; psychological assessment; SSM framework

1. Introduction

(1) Purpose and significance of the subject

1. Purpose of the project
The main purpose of psychological assessment system research is to evaluate and quantify individual psychological characteristics through scientific means, including individual cognition, emotion, behavior, etc. . Among them, the research purposes involve the following aspects. To help people better understand themselves, the psychological assessment system can use various tests and questionnaires to allow individuals to better understand themselves and understand their psychological characteristics and behavior patterns, thereby helping them better utilize their strengths and deal with problems. and solve difficulties. Assisting personal development and career planning, the psychological assessment system can provide individuals with scientific development and career planning suggestions by evaluating individual abilities, interests, personality traits and other characteristics, allowing them to find the career and development direction that best suits them. To help organize human resource management, the psychological assessment system can refer to certain scientific standards and better manage and motivate human resources and improve corporate performance by examining employees' abilities, personality, professionalism and other characteristics. Promote the development of academic research and the field of psychology. As an important research method and tool in the field of psychology, the psychological assessment system can promote the development and improvement of the discipline of psychology through empirical research, exploration and discovery of the laws of human psychological characteristics. The purpose of psychological assessment system research is to help individuals and organizations better understand individual psychological characteristics, design corresponding intervention strategies, and assist with work effects in career planning and talent management.
2. Significance of the topic
The research significance of the psychological assessment system is mainly reflected in the following aspects: providing accurate psychological assessment for individuals. Psychological assessment systems can quantify the psychological characteristics, abilities and strengths of different individuals, helping them understand themselves more deeply and better cope with various challenges and opportunities in life. Provide powerful tools for psychological research. The psychological assessment system can provide rich and detailed data for psychological research based on carefully designed test items and analysis methods. Through the analysis and interpretation of these data, psychological researchers can gain a deeper understanding of human psychological characteristics and behavioral patterns. Provide support for education and career development. Psychological assessment systems can help individuals understand their own strengths and abilities, provide them with support and guidance, and help them better explore their potential, formulate career plans and manage themselves. Provide reference and support for social life. Psychological assessment systems can help social institutions better understand the psychological characteristics and needs of social members, and provide reference and support for policy formulation and social management. For example, psychological assessment systems can play an important role in recruitment, marriage matching, criminal psychological assessment, etc. Therefore, the study of psychological assessment systems has important theoretical and practical significance, and it promotes the further development and promotion of psychology.

(2) Subject background

The research background of psychological assessment systems can be traced back to the late 19th century, when German psychologist Watts developed a psychological measurement method called the "sensory test". Subsequently, many psychologists developed different psychological assessment methods, such as Freud's free association method, Bingham's personality test, Wechsler's intelligence test, etc. These psychological assessment methods are widely used to assess a range of psychological characteristics, such as personal abilities, personality, emotional state, etc.
However, there are some problems with traditional psychological assessment methods, such as low measurement accuracy, long test time, complex operations, etc. In recent years, the development of artificial intelligence technology has brought new opportunities to psychological assessment. The psychological assessment system based on artificial intelligence technology can not only improve the accuracy and efficiency of the test, but also facilitate the tester to conduct the test, record and analyze the comprehensive assessment results, and provide clinical psychologists with more reliable diagnosis and treatment basis and improvement direction.

(3) Literature review

Psychological assessment systems are receiving more and more attention in modern society. With the popularity of smartphones and tablets, mobility has become an important trend in the development of psychological assessment systems. Future psychological assessment systems will pay more attention to adapting to the needs of users of different devices and provide more convenient and faster assessment services. At the same time, we will also draw on the characteristics of mobile social applications to enhance user interactivity and improve user participation. With the continuous development of artificial intelligence technology, the intelligence of psychological assessment systems has become an increasingly important trend. Future psychological assessment systems will use artificial intelligence technology to achieve more intelligent assessments, such as self-learning, personalized recommendations, etc., so as to better meet user needs and provide more accurate assessment results. The psychological assessment system will continue to develop in a diversified manner in the future, including more personalized, cultural, and diversified assessment contents and forms. From the perspective of test subjects, future psychological assessment systems will gradually expand to more fields, such as education, employment, medical care and other fields. Future psychological assessment systems will focus more on data analysis and mining to better understand user needs and psychological states. At the same time, big data technology will be used to summarize and analyze a large amount of evaluation data to form more scientific and accurate evaluation conclusions. In short, future psychological assessment systems will pay more attention to the development trends of humanization, intelligence, diversification and data. We look forward to the rapid development of this industry and providing accurate psychological assessment services to more people.

2. Related technologies

(1) SSM framework

The SSM framework is the current mainstream Java Web application development framework. It is integrated by the three frameworks of Spring, SpringMVC and MyBatis. Spring provides container services such as IoC and AOP, SpringMVC serves as the front-end controller, and MyBatis provides ORM support. The integration of these three frameworks makes full use of their respective advantages to make development simpler, more efficient, and more flexible.
Spring: Provides IoC and AOP container services, and implements dependency injection and aspect-oriented programming functions. Through the Spring container, we can easily manage objects and reduce the coupling between objects.
SpringMVC: It is a Web framework based on the MVC pattern. It uses DispatcherServlet as the front-end controller, dispatches requests to different processors, and renders the corresponding views according to the view resolver. The characteristic of SpringMVC lies in its high degree of customizability and flexibility. We can achieve more refined control by customizing SpringMVC's interceptors, controllers, view resolvers and other components.
MyBatis: It is a lightweight ORM framework that maps Java objects to the database through mapping files. The difference between MyBatis and other ORM frameworks is that it uses the method of directly writing SQL statements, which allows us to better control the execution process of SQL and improves development efficiency and code maintainability.
In short, the SSM framework is a mature and classic framework in Web application development. Its advantages are simplifying development, improving efficiency, flexible customization and compatibility. Whether you are a novice or an experienced Java developer, it is worth learning and using.

(2) Java language

Advantages of developing psychological assessment systems in Java. Applications developed in Java can run on different operating systems, such as Windows, Linux, etc., which makes the psychological assessment system developed in Java very cross-platform. Java has a good reputation in terms of security. It provides multi-layer protection mechanisms in terms of security, such as memory management, exception handling, access control, etc. These mechanisms help ensure the safety and reliability of the psychological assessment system. The Java open source development model brings many advantages, such as high customizability, good maintainability, and support for multiple operating systems and platforms. This also means that the cost of developing a psychological assessment system in Java is relatively low, and it also has wider technical support and community resources. Java has numerous class libraries and frameworks, which are equivalent to verified code modules, which can save development time and improve the usability, performance and readability of the psychological assessment system. Java's virtual machine parses the intermediate code into JIT (just-in-time compiler) code. This JIT can make Java's performance very efficient. The advantages of developing a psychological assessment system in Java are very obvious. It can provide high efficiency, security, openness, high maintainability, and can be cross-platform. It has rich class libraries and framework support, so it is very suitable for the development of psychological assessment systems. language.

(3) tomcat server

Tomcat is an open source Java Servlet container that implements the Java Servlet and JavaServer Pages (JSP) specifications and provides an environment for running Java Web applications. The developer of Tomcat is the Apache Software Foundation, which has released multiple stable versions.
The main features of Tomcat include:
Open source and free. Tomcat is a completely open source software. Users can obtain installation packages and source code for free anywhere, and Tomcat There is an extensive community support and good technical support and resource sharing are available.
Cross-platform, Tomcat can run on a variety of operating systems, including Windows, Linux, Unix, etc., which ensures the portability of Web applications.
Lightweight, Tomcat is a lightweight web server. It is small in size, does not require high hardware configuration, and can run well on devices with limited resources. .
Ease of use. The configuration and use of Tomcat are very simple and easy to use. It does not require too many professional skills to get started. At the same time, Tomcat also provides a Web management interface and a command line interface for convenient management. personnel to manage and monitor.
High performance, Tomcat has very good performance and can handle high concurrency and large traffic requests. At the same time, Tomcat also supports multi-thread processing, which can improve the concurrent access capability of the system.
Tomcat is a Java Web application server with full functions, high ease of use and stable performance. Its open source, free, cross-platform and lightweight characteristics make it very suitable for deploying Java. Web applications, especially small and medium-sized applications.

3. Demand analysis

(1) Business needs analysis

The business of this system mainly includes: registration and login, training and evaluation, training knowledge popularization, and system management.
(1) Login and registration: Each psychological tester can only register one account. After logging in to the account, he can perform psychological testing and other services; the administrator can log in to the account to fully manage the psychological testing system.
(2) Psychological assessment: Psychological test administrators can publish assessment information, and users can select test questions on the home page.
(3) Psychological knowledge popularization: Administrators can publish popular science articles about the mental health testing system, and users can view them.
(4) System management: In order to serve psychological test users more conveniently, the administrator can publish topics here for users to choose. The business requirements analysis flow chart is shown in Figure 3-1.
Insert image description here

Figure 3-1 Business requirements analysis flow chart

(2) Functional requirements analysis

The main functions of this system include: a complete collection of psychological assessments, creating new psychological assessments, viewing assessment reports, psychological science popularization management, and system management.
(1) Psychological Assessment Encyclopedia
The function of the Training Assessment Encyclopedia is that the psychological test administrator can view and modify all assessment messages in this system in the background. Users can view all psychological assessment questions in this module and choose the ones they need to answer.
(2) New psychological assessment
The psychological test administrator can add new assessment questions in the new psychological assessment module for users to choose, allowing users to answer questions more accurately. Have diversity.
(3) View the evaluation report
If the user has conducted a psychological evaluation in this mental health evaluation system, he or she can view his or her evaluation report in this module. If you have not yet taken a psychological assessment, you can take the test in our system and get a personalized assessment report.
(4) Psychological science popularization management
Log in to the backend of the website, and the administrator can add new popular science articles. The system will automatically publish the popular psychological science articles in the appropriate location. Users You can view popular science articles. The popular science information published by administrators must be authentic and must not mislead users.
(5) System management
This module can manage user and system information. Add or delete modified user information.
Insert image description here

Figure 3-2 Administrator use case diagram

4. System design

(1) System function module design

This system adopts B/S architecture. MVC design pattern thinking. The overall design is divided into three levels.
The first layer: the user interface layer, its task is to display the page.
The second layer: the data logic layer, which is mainly responsible for the logical processing of data, the update of flight information, the implementation of the booking process and other operations related to ticket booking requirements.
The third layer: database layer, which performs CRUD operations on the database.
According to the demand analysis of the mental health assessment system, in order to fully realize the functions of the system, the main modules of the system are as follows: login module, home page module, psychological assessment module, psychological science popularization module, and user management module. The overall structure diagram of the system design is shown in Figure 3-1.
Insert image description here

Figure 3-1 System function module diagram

(2) Database design

1. Conceptual structure design
ER diagram refers to the Entity-Relationship Diagram, which is used to display the relationship between entities (Entities) in the database. ER diagrams are usually composed of three forms of patterns: Entity, Attribute and Relationship. An entity represents an object, attributes are properties or characteristics of the entity, and relationships represent associations between entities. In ER diagrams, entities are represented by rectangles, attributes are ovals within rectangles, and relationships are represented by diamonds. These forms can be combined together to show a clear view of the entire data structure. ER diagrams are commonly used in database design and data modeling to help developers plan and design the structure and relationships of a database. The E-R diagram of this system is shown in Figure 3-2.
Insert image description here

Figure 3-2 System E-R diagram

2. Logical structure design
On the basis of database analysis and conceptual structure design, the conceptual model of the database is transformed into a logical structure, that is, the structure of the database is designed. The structure design of the MySQL data table in this system is as follows.
(1) User information table
The fields it includes are: empid is the test user id, varchar type, and can store up to 9 characters. Password is the customer account password, varchar type, with a maximum of 12 characters. realname is the real name of the test user, which is of varchar type and can store up to 10 characters. Sex is the gender of the test user, char type, and can store up to one character. Birthdate is a date type, the user's birthday. phone is the test user’s phone number, char type, length 11. qq is customer QQ, varchar type, length 17. idcard is the test user ID number, char type, length 18. The customer information table is shown in Table 3-1.

Table 3-1 User information table
Whether the field name, data type, length is the primary foreign key and whether it can be empty
empid varchar 9 No No< /span> (2) Administrator information table< /span> idcard char 18 No No qq varchar 10 no no phone char 11 no no birthdate date 20 no no sex char 1 no no realname varchar 10 no no password varchar 12 no no empid varchar 9 no no Whether the field name, data type, length is the primary foreign key and whether it can be empty Table 3-2 Administrator information table The fields it includes are: empid is the administrator ID, varchar type, and can store up to 9 characters. password is the administrator account password, varchar type, can store up to 12 characters. realname is the real name of the administrator. It is of varchar type and can store up to 10 characters. Birthdate is a date type, the administrator’s birthday. phone is the administrator’s phone number, char type, length 11. qq is the administrator QQ, varchar type, length 17. idcard is the administrator's ID number, char type, length 18. The administrator information table is shown in Table 3-2. idcard char 18 No No phone char 11 No No birthdate date 20 No No sex char 1 No No realname varchar 10 No No
password varchar 12 No No
















5. System implementation

(1) Login implementation

Users need to register an account first to log in to the system. When registering, users need to fill in their identity information, including name, ID number, etc., in the box. In order to prevent others from stealing the user's identity information or maliciously logging in to the account, they must fill in a random verification code. After registration, users can fill in their account and password in the box and then use the system. The login implementation is shown in Figure 4-1.
Insert image description here

Figure 4-1 Login page renderings

(2) Home page module implementation

After the administrator logs in with the account and password, enters the mental health assessment system and enters the homepage module, all psychological test progress and processes will be displayed. When users log in to their account, they can also view the entire process and progress of the mental health test on the home page. Mental health assessment administrators can edit the assessment process and time on the home page, and mental health assessment users can view the assessment progress on the home page. The rendering of the home page module is shown in Figure 4-2.
Insert image description here

Figure 4-2 Home page implementation

(3) Implementation of psychological assessment

This module is the most important module of the mental health assessment system. The psychological assessment administrator can view all assessment questions, create new assessments, and view assessment reports. Assessment users can answer assessments and view their own assessment results. The rendering of the complete psychological assessment is shown in Figure 5-3.
Insert image description here

Figure 5-3 Psychological assessment renderings

(4) Implementation of psychological science popularization module

The main function of this module is that psychological assessment administrators can publish and manage popular science knowledge in the system, and psychological assessment users can view popular science knowledge to learn. The rendering of psychological science popularization is shown in Figure 5-4.
Insert image description here

Figure 5-4 Psychological science popularization renderings

(5) Implementation of user management module

This module is used to query and add user information. If a user wants to conduct mental health assessment in this system, the system administrator can manage the user's information in this module. The system administrator can view the user's personal information. . The rendering of the user management module is shown in Figure 5-5.
Insert image description here

Figure 5-5 User management module renderings

6. System test

(1) Login module test

If you want the system to be used normally, you must first ensure that the login function of the system is used normally, because only when the login is correct can the next operation be carried out. The main purpose of this test is to test how the system will react when entering the administrator account and entering the correct password and incorrect password; when entering the user account, how will the system react if the correct password and incorrect password are entered. Test whether one account can correspond to one password. The login module test case table is shown in Table 6-1.
Table 6-1 Login test case table
Number Test data Expected effect Actual effect Test status
1 Enter the administrator account " admit"
and the correct password 12345678. You can log in to the account normally. You can log in to the account normally. The results are the same as expected.
2 Enter the administrator account "admit"
and error secret 888888 cannot log in to the account normally. The result is the same as expected.
3 Enter the user account "user" and
the correct password 987654321. It can work normally. The account can be logged in normally and the expected results are the same.
4 Enter the user account "user" and
The wrong password is 1234653. The account cannot be logged in normally. The account cannot be logged in normally and the expected results are the same. Same

(2) Psychological assessment module test

This test is to ensure that the psychological assessment administrator can conduct assessment management normally and that users can smoothly answer questions. The psychological assessment administrator has absolute control over the assessment system. If passengers want to answer questions, the assessment administrator can Questions are given normally; if the assessment administrator needs to view the assessment information, the psychological assessment information can be viewed normally. The use case table of the psychological assessment module is shown in Table 6-2.
Table 6-2 Psychological assessment test case table
Number Test data Expected effect Actual effect Test status
1 In the psychological assessment module Click New Assessment to create a new assessment question information. You can create a new assessment question information. The information is the same as the expected result.
2. Click New Question in the New Assessment function to create a new test question. You can create a new test question and the result is the same as expected >
Click Delete Question in the New Assessment function to delete the question. Deletion of the question is the same as the expected result.
Click View Assessment Report in the View Psychological Assessment Report function to investigate the user assessment report. Able to investigate the case, the user evaluation report is the same as the expected result
The user clicks to answer the question in this module. The user is able to answer the question. The user is able to answer the question. The result is the same as expected
The user clicks in this module to answer the question. The module clicks to submit the answer sheet. The user can submit the answer sheet. The user can submit the answer sheet. The result is the same as expected

in conclusion

This article describes the process of the mental health assessment system from analysis to completion to testing. I think this system was developed under the conditions of the post-epidemic era. The epidemic has brought heavy pressure to people, and a system is urgently needed for them. Detecting mental health, so the fundamental value of the mental health assessment system is immeasurable. During the development of this system and the writing of this graduation project description, I encountered various problems. For example, due to insufficient understanding of the actual market situation, the data when I designed the database content was inconsistent with the market, resulting in serious errors in the data. Later, after many revisions, the data was successfully adjusted. Also, in the process of writing this article, I always had problems with my formatting and my sentences frequently made mistakes. Therefore, I went through twists and turns before finally completing the writing of the graduation project description.

Source code network disk link address
Link: https://pan.baidu.com/s/1ISDkrz4P9Q8gmV4j3JPxsQ?pwd=dnr7
Extraction code: dnr7
The source code is open source and can be obtained by yourself, and remote deployment is available

Guess you like

Origin blog.csdn.net/a1g45/article/details/131398828