# Design and Implementation of Online Japanese Examination System Based on Genetic Algorithm

Authors: Zeng Dengqing; Yang Zhangwei
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In order to solve the problem of online inspection of students’ theoretical knowledge of Japanese, this paper further optimizes and adjusts the design of the online Japanese examination system and presents an online Japanese examination system based on genetic algorithm. Taking the Japanese test as the research object, on the basis of comprehensively analyzing the problems of slow test paper composition, low success rate, and low quality of traditional online test systems, an intelligent test composition model based on genetic algorithm is proposed, and the implementation process of genetic algorithm and the key steps are described in detail. The results show that the online Japanese examination system based on genetic algorithm can meet the needs of test paper generation in more complex situations. After a long time of operation and continuous improvement, the online Japanese examination system has obtained the adaptability of the best solution. The value of the fitness is 99.666667; when the fitness is at this value, the error of the question type score of the test paper is 0, the average difficulty error on the test paper is 0, and the error of the section test point distribution is 0.666667. This fully illustrates the stability and effectiveness of the Japanese online examination system, which can meet the needs of daily Japanese majors and improve the efficiency of Japanese teaching.


---

## Body

## 1. Introduction

Since the beginning of the new century, with the rapid development of science and technology, computer network technology has been gradually applied to all walks of life. At the same time, the continuous progress of computer network technology has brought many conveniences to many fields and provided technical support for the development of education industry. For example, a large number of computers are used in the classroom and laboratory to deal with various tasks in the teaching process, which is more convenient, fast, and safe. Among them, we can use the intelligent computing advantages of genetic algorithms to develop and improve the online examination system. Based on the advantages and principles of genetic algorithm, this paper analyzes the advantages and disadvantages of online examination system. At the same time, taking the Japanese examination as the research object, based on the comprehensive analysis of the problems of slow speed, low success rate, and low quality of the traditional online examination system, an intelligent paper generation model based on genetic algorithm is constructed to further improve and optimize the Japanese online examination system. Through an efficient and stable Japanese online examination system, we can effectively detect the problems existing in students’ daily Japanese learning, improve the quality of Japanese teaching, and stimulate students’ enthusiasm and initiative.


## 2. Related Works

Liu and others said that China started late in the research of online examination system. In 1998, China began to rise the online education platform and introduced the online examination system into the online education platform. The introduction of the online examination system improved the efficiency of examination management, reduced the work pressure of teaching staff, and solved the difficult problem of examinee’s remote examination [1]. Sugisawa and others said that soon, major universities in China have successively developed online examination systems, among which the development of Shanghai Jiaotong University and Beijing University of Posts and telecommunications is more prominent [2]. Alaqbi and others said that after the twenty-first century, China’s science and technology has entered an era of rapid development [3]. In addition to colleges and universities, social training institutions have gradually introduced online examination systems, such as computer grade examination and driving school examination involving a wide range of people. Clivaz and others said that with the progress of China’s science and technology, China’s online examination system technology has also made progress and effectively develop various online examination software to make the online examination system more comprehensive [4]. In recent years, Chinese experts have invested a lot of energy in the research of automatic online examination system and have also made breakthroughs in this field and achieved fruitful results. The Dragon Online Examination System developed in recent years has a more complete functional system and can also be optimized for various test questions, ensuring that various operating interfaces are more convenient during the optimization process.Mizuma and others say that the first test developed algorithm in online testing was book test generation. Test paper generation is very inefficient, which makes it more efficient for teaching staff [5]. In addition, the quality of the papers varies, largely depending on the competence of the examiners. To address these issues, automated tests can be performed. Makino and others stated that these tests are not automatically computerized to select the required questions from the education test questions to conduct the test. The accuracy and quality of testing remains difficult to maintain. Therefore, experts have introduced technical testing on this basis, and the main research is the study of nontechnical testing concepts automatic [6]. Lie and others stated that “intelligent test paper generation” has become the core technology of the online test system. For example, by adding complex intelligent algorithms to the automatic online examination system, the efficiency of online examination paper generation has been significantly improved [7]. Tian, Z and others said that the online examination system developed in recent years has become more and more complete, with a convenient and fast test paper generation function [8]. Acosta and others said that the system is mainly applicable to enterprise level examination, has perfect functions and advantages, and can fundamentally solve users’ problems from reality [9]. For example, the operation steps are scientific and convenient, the test paper is convenient and fast, multiple people are supported online, and the confidentiality of the answer process is guaranteed. However, it has not developed more basic functions in the research of examination system technology, mainly expanding, reforming, and perfecting the original functions.The analysis of domestic and foreign research by Cao et al. shows that the online examination system has a high reputation and is relatively developed [10]. At present, the research of online examination system mainly focuses on the production of intelligent examination papers and the automatic scoring technology. With the technical support of genetic algorithm, intelligent technology can effectively improve the efficiency and accuracy of the online examination system, as shown in Figure 1.Figure 1
Design and implementation of online Japanese examination system based on genetic algorithm.


## 3. Method

Genetic algorithms start with a potential population, which is a combination of multiple individuals with different codes. Chromosomes act as the main carrier, which determines the external shape of an individual. In the initial population, according to the principle of natural evolution, a better approximate solution is gradually generated, individuals are selected according to their fitness, and then crossover and mutation are combined to generate a new population. This process enables the new population to be better than the initial population, and the optimal individual in the latest population can be used as an approximate optimal solution to the problem. The flowchart of the genetic algorithm is shown in Figure2.Figure 2
Flow chart of genetic algorithm.The genetic algorithm starts from the population and evaluates the individuals in the population, instead of searching from the individual, which is conducive to the global selection, so the genetic algorithm is easier to achieve optimization; on the contrary, the traditional optimization algorithm is to search for the individual, so it is extremely easy to achieve optimization. It is very likely to fall into a local optimal solution, which is the advantage of genetic algorithm different from traditional optimization algorithm. Genetic algorithms search based on probability, rather than performing deterministic orientation, so the search is larger, and the population is generated and the individuals in the population are evaluated. The genetic algorithm will organize the search by itself according to the fitness function and select individuals with large fitness to form a new group, so it has strong organization and adaptability [11].The initial population is composed of n individuals by using random function. The first step is to measure the number of populations. A common approach is to record the population as 50 or multiples of 50 as the default. Past research has shown that population size is directly related to the success and quality of test paper production. If the population is unreasonably determined, the problem of local optima arises [12].Coding method is the basis of genetic algorithm. The level of coding directly determines the quality of problem-solving. Since genetic algorithm was proposed, after years of development, many different coding methods have been formed, among which the most widely used are as follows: hybrid coding, binary coding, and real coding. In particular, genetic algorithms play a great role in the fields of function optimization, production scheduling, pattern recognition, neural networks, and adaptive control.The selection of fitness function must meet two conditions: There is no “premature” phenomenon in the early stage, and there will be no “recession” in the later stage. Only the fitness function that meets these conditions can improve the fitness between individuals, reduce differentiation, and obtain the optimal results as a whole [13, 14]. In practice, this transformation process is relatively simple, as shown in the following formula:
(1)minfx=max−fx.When the total value of the desired optimization result is positive, it shows that the desired optimization result is basically consistent with the problem of individual fitness, as shown in the following formula:(2)FX=fx.Through the adjustment of the overall fitness function, objective function and constraints, the optimization between corresponding individuals is realized to ensure that the optimal solution can be obtained at present, as shown in the following formula:(3)FX=αfx+β.Above,FX is the fitness function, α is the normal number, fxis the objective function, and β is the constant coefficient. The objective function can be scaled and translated. There are many methods to determine the coefficient, as shown in the following formula (5):
(4)α=Cmult−1favgfmax−favg,(5)β=fmax−Cmultfavgfavgfmax−favg.Or as shown in the following formula (7):
(6)α=favgfavg−fmax,(7)β=−fminfavgfavg−fmin.The selection operator is based on the different fitness of different individuals. The state of its chromosomes in the next stage depends on the optimization degree and limit performance of the chromosomes. Individuals with high fitness will continue to be replicated in the next stage, while those with low fitness Individuals will be eliminated directly in the next stage. Its operation strategy is to retain the best individual, prevent the emergence of local optimal solution, and adhere to the elite retention strategy. The function of selecting operators in the genetic algorithm is to avoid the destruction of the Geshan gene and to improve the computational efficiency as a whole [15]. The main selection methods of the selection operator include the wheel selection method and the random selection method. This document mainly selects the selection method of the roulette, as shown in Figure 3.Figure 3
Schematic diagram of wheel disc selection.The crossover operator is mainly calculated according to specific principles and methods. In the process of random selection of the whole population, it is necessary to ensure that the chromosomes meet the requirements of relevant exchange and groups were randomly paired and selected for crossover operation, which can make the overall optimization effect the best [16].When using a genetic algorithm, certain control parameters must first be established in order for the algorithm to achieve its intended purpose. The control parameters include crossover rate, mutation rate, and termination iteration. In order to optimize the performance, the following parameter design methods are usually selected.The operation process of the trial method is to first arrange and combine all the main parameters, then operate the parameters obtained by these combinations, and finally compare and comprehensively analyze the results obtained by the operation, and select the optimal control list. The empirical method is based on the judgment of professional teachers or scholars and past research experience to determine the analysis value of specific parameters [3].The above introduction shows in detail the application process and operation principle of genetic algorithm in intelligent test paper generation. It also simply points out the problems and avoidance methods of genetic algorithm in each use stage. Through analysis, we can know that the basic strategy of genetic algorithm is “segment coding and survival of the fittest”, and the solution process is the simulation of the survival process of the “chromosome” fittest. To improve operational efficiency and optimize results. It acts as a smart module during the special process of making the test paper. With various combinations of variants and intersections, designs can be considered in a repetitive way of thinking so that the individual situation can be played from the population, so as to ensure that the whole variation is only controlled within the mother for observation. The operation flow chart of the test paper generation system is shown in Figure4.Figure 4
Operation flow chart of test paper generation system.In the overall operation, each participating functional module will be coded to facilitate the real-time search of constraint groups during actual operation. The design of coding should be distinguished according to different question types. Class structure design mainly designs the main module classes and the relationship between classes and uses the way of class diagram to express. According to the question types, a fixed corresponding function module can be directly established. An example of designing a partition code is shown in Table1.Table 1
Example of designing a partition code.
Single choice questionsMultiple choice questionsCompletionNoun interpretationShort answer questionsCase36...3827196...41297175...59677889998775In addition to encoding a large number of individuals with question numbers, there are M questions in the whole question bank, which need to be distinguished by binary string description documents, as shown in the following formula:(8)A1A2⋯An1B1B2⋯Bn2C1C2⋯Cn3.If the total score of the test paper is set toTotal_Mark, the following calculation formula can be obtained, as shown in the following formula:
(9)∑i=1p∂i=Total_Mark,In this formula, set the frequency of each number in the weighted average of each component. The formula is shown in the following formula:(10)Minimizef=r1∗∑i=1pdai/p+r2∗∑i=1pdbi/q+⋯When using a special algorithm, the problem is solved in terms of the minimum value of the motion function so that the corresponding motion function is included as follows:(11)F=C−f.The basic requirements of fitness function are as follows: One is to ensure that all variables are positive in the case of input. The second is to ensure consistent progress throughout the optimization process. The fitness function can construct various benefit parameters, and the fitness function can also be used to represent various individual spaces (S). The corresponding function (F) is shown as follows:(12)f:S⟶R+.The three elements constituting the total fitness function are summed to obtain the value of the total fitness function. The formula is shown in the following formula:(13)fx=Tx+Rx+Ex.After long-term of hard work and continuous improvement of Japanese online testing, the genetic algorithm has gained the strength of the best solution after long-term development and growth. The physical value is 99.666667. When this value is output, the error of the test result query type is 0, the error of the average difficulty of the test is 0, and the error of the distribution of some test points is 0.666667. The process of obtaining the fitness of this optimal solution is shown in Figure5.Figure 5
Fitness curve of optimal solution.In Figure5, the horizontal axis represents the evolutionary algebra, and the vertical axis represents the power of the previous genetic algorithm.The test indicator system must be composed of many practical parameters in order to be optimal. A reasonable test index system directly determines the quality of the test paper. The main indicators are as follows:(1)
Basic knowledge of Japanese. It refers to the basic knowledge and skills that students must master in Japanese learning. These Japanese knowledge and skills are tested in the test paper(2)
Japanese examination outline. Reflect the main direction of the Japanese test to the examinee, and prompt the key knowledge points(3)
The difficulty of Japanese test. It mainly refers to the difficulty and ease of the examinee to correctly answer the test question. The difficulty of objective questions can be calculated by the following formula, as shown in the following formula:(14)P−RN.The complexity of the subjective test questions can be calculated using the following formula, as shown in the following formula:(15)Pi=XiKi.Combined with the actual needs, we can set up a set of mathematical model, and then set some constraint variables for this mathematical model. Controlling the complexity of the overall question types on the Japanese electronic test paper, it is necessary to set up a set of standard test paper mechanism. The NP complete problem is a subclass of the NP class problems, a subclass with special properties and special meaning. Before generating the test paper, we should first determine the question type distribution, test site range, difficulty coefficient, score distribution, etc., of the whole set of test paper. Combined with the actual situation, we can ensure the scientificity and reference value of test paper generation, as shown in Tables2–3.Table 2
Information of objective questions such as single choice questions.
ListingData typeAllow nullQuestion numberbi gint—Question type numberint—Test scoreint—Answer timefloat—Test question stemvarchar(1 000)—Option Avarchar(1 000)—Option Bvarchar(1000)—Option Cvarchar(1 000)—Option Dvarchar(1 000)—Table 3
Information table of subjective questions such as question and answer questions.
ListingData typeAllow nullQuestion numberbigint—Question type numberint—Test score1nt—Answer timefloat—Test question stemvarchar(1 000)—Standard answervarchar(1 000)—Coding discriminationint—Difficulty coding1nt—Course numberint—


## 4. Experiment and Analysis

Establish an examination database named in and complete the creation of the required data table. After the database is created, the connection between the foreground interface of the system and the background database needs to be established. The connection operation to the database is used repeatedly in the program. Therefore, the functions of database connection, query object creation, and result set creation are encapsulated in a name. The database connection of the system adopts data connection pool technology. As a detection means, the examination should be serious and have special high requirements for security. Therefore, users are divided into two categories: administrators and candidates [17]. They have different levels. When entering the system, they need authentication and need to enter the authentication code. The administrator account is specifically set up for people who can make whole-system changes to the computer, install programs, and access all the files on the computer. Only users who have the administrator have full access to other user accounts on the computer. The authentication identification code here is the unique random number directly generated by the system for each server connection. Users must enter the identification code when logging in; otherwise, they will not be able to log in. Especially in the student Japanese examination, once the candidate opens the browser and enters the login interface, the corresponding unique ID code will be generated. At this time, the system will automatically track the user. Before the end of the examination, the user is not allowed to log in again, so the candidate cannot log in from multiple windows and places at the same time, so as to effectively avoid the students cheated in the Japanese online exam, as shown in Figure 6.Figure 6
System login interface.After passing the authentication, students enter the online examination home page, select the specific content of the Japanese test, and call out the test paper for examination, and the candidates’ answers are saved on the server in the form of documents. During the Japanese online examination, you can click to submit the answer after completing each page of the examination questions and then do the examination questions on the next page. If you want to quit the exam halfway, you can click quit halfway. The system will automatically display the test questions and correct answers that you have taken before you quit and make a comparison to get the score. If all the test questions are completed or the test time is over, the system will display all the test questions and their standard answers and compare them with the answers made by the user and give scores. The test question upload interface can use the function of batch upload in the process of uploading test questions, which can effectively reduce the burden of database [18, 19]. Testing the question bank adjustment interface in the test question information management module, the administrator can view, delete, and modify the content of the test question bank. After using the online Japanese examination system, the whole examination process is as follows: The examinee enters the entrance page of the online Japanese examination system through the browser, enters the Japanese examination system after entering the correct user information, and randomly selects the test questions. After clicking “start,” the system will automatically generate the test paper and display it on the client through the browser; The system starts timing and begins the exam. After the examinee submits the test paper, the computer automatically marks the objective questions, obtains the score, and counts the score into the database. Subjective questions such as short answer questions can be marked by a combination of computer and manual. Therefore, the online Japanese examination system should consider the following functions: (1) realize the management of examination question bank, such as the establishment of question bank, the entry, and modification and deletion of questions. The types of questions in the question bank are mainly objective questions such as single choice, blank filling, and judgment. (2) Students log in to the system on the Internet and randomly select test questions for examination. During the examination, it can automatically count the time and display the students’ remaining time. At the end of the examination, it can automatically take up the paper and change the paper [20]. (3) Students’ test scores can be queried online, and their own test papers can be rechecked. (4) Realize the seamless link with the college educational administration management system, and students’ scores can be automatically imported into the educational administration management system to facilitate students’ query. (5) Japanese teachers can set the test parameters before the test, such as test subjects, test time, and test scope. (6) After the examination, the Japanese teacher can analyze the results of the examination, such as the score of each chapter and question type, and the score statistics of each class. (7) Users logging into the system, including system administrators, teachers, and students, should have different permissions [21].Different login identities can be selected for system login: super administrator, administrator, teacher, and student. Log in to different function interfaces according to permissions. The process of administrator login management module is shown in Figure7.Figure 7
System flow chart of administrator login management function.The administrator login management module function is used to verify the administrator’s identity when entering the examination management system. When logging in the examination management system, the system allows the administrator to express his identity. Different administrators have different permissions. The system verifies whether the administrator is a legal user. When the user name and password entered by the administrator are correct, he can enter the management system. Open corresponding management functions for administrators according to different permissions. A complete software testing management tool should be able to manage all aspects of the testing process. The flow of teacher login management module is shown in Figure8.Figure 8
Teacher login management module process.The function of the teacher login management module is mainly to complete the test paper generation, and submission after the teacher is authorized. The system stores the test paper in the database test paper table to generate the form of question bank for students to extract the test and view the results. Teachers can also query student users, enter scores, and publish examination arrangements and other news information. The teacher can review the students’ homework. The process of student user login examination module is shown in Figure9.Figure 9
Student user login examination module process.Student user authentication means that during the Japanese online exam, the examinee can log in to the system to take the exam only after he/she has passed face recognition or ID card recognition [23]. Identity authentication is very important in the process of Japanese online examination. It is related to the seriousness of the examination. The online Japanese examination system supports the exemption of the invigilation link, and all the examination room requirements can be achieved through the examination setting. Therefore, the main thing in the Japanese examination system is the various functions of the examination room environment, such as the test time, the list of candidates, the topic selection group papers, and the scoring criteria. After logging in, students can choose subjects and take tests. After the exam, they can see the correct answers and scores of the questions they have done.The general input and output stream classes in Java language use the single byte reading method for data I/O operation. That is, only one byte of data is read or written at a time. This method is obviously cumbersome and inefficient. The reading and writing process is shown in Figure10.Figure 10
Single byte read and write.Because the Java language provides a buffer class specially used to improve the I/O efficiency of the system, it is like providing a temporary buffer when reading and writing data. A data block of buffer size can be read at a time. It can reduce the number of read and write data. If you transmit only a little data each time, you need to be transmitted many times, which will waste a lot of time. And then this data block can be written to the target device at one time [24]. Setting up a data buffer to read one data block at a time to improve system performance is particularly important in network data transmission. The flow chart of reading and writing using data buffer class is shown in Figure 11.Figure 11
Reading and writing process using data buffer class.For the verification of the existence and legitimacy of the input information from the client, it is realized by client-based programming. For example, the student and teacher administrators must pass the verification of the existence and legitimacy of the input from the client when registering or logging in. Specifically, if the information that must be filled in is not filled in, the system will give an existential warning. For example, for those systems that do not meet the requirements in terms of type composition, length extreme value, and so on, the system will also give a warning on the client. This can greatly reduce the burden of the server and improve the reliability of the program and the running speed of the system.Aiming at server-side user exceptions in the server-side database, the server-side programming is used to correct the user’s misbehavior to ensure the normal operation of the system. For example, when the data content, data type, data format, and data scheduled processing process are obtained by the system from the client conflict with the database in the server, the system can give a warning in time and guide the correct processing method. In this system, this abnormal message processing mechanism runs through the processing of all data and shows good fault-tolerant performance in the practice of remote test run of the Japanese examination system [25].And the system has very strict identity authentication procedures. Student administrators must be authenticated to log in, and their permissions are different for different users. For example, different administrators can only operate with their own permissions. Through strict identity authentication and different authority settings, the security of online examination system and data security are guaranteed. In addition, we also optimize the source code by writing modular functions and encapsulating process code in an object-oriented way to improve the reusability and execution efficiency of the source program.In order to complete the test of all the learning contents of the Japanese course, each database has a data table according to the type of questions (single-choice, fill-in-the-blank, true-false, and short-answer questions) [26]. When the administrator sets the test parameters, he can select the test subjects. The following tables are established in the question bank: multiple-choice question sheet, fill-in-the-blank question sheet, judgment question sheet, and short-answer question sheet, which are used to store questions of various types.Add difficulty, bias, and other attributes to each question to improve test quality. The student information table is used to store important student information, usually including student number, ID number, name, department chair, and other items. Information can be sent through the University’s Academic Administration. The user table is used to store management information, including number, user name, password, authorization, and other equipment. The teacher table is used to store teacher information, including account number, password, name, office, and other items. The quiz table is used to store quizzes created by the quiz algorithm. Answers are used to store answers to student tests. We can also establish a score table to make statistics and analysis of students’ scores.In this way, the online Japanese examination system can be realized both functionally and safely, which improves the convenience of Japanese examination.


## 5. Conclusion

The genetic algorithm is based on the theory of evolution and can complete the intelligent questionnaire very well. In this paper, a mathematical model of the genetic algorithm is established for the test-setting part of the online Japanese examination system, and then the model is realized by editing the code. Genetic algorithm can solve many deficiencies in the traditional way of setting test papers, such as low efficiency and poor quality of test papers, which greatly optimizes the fairness and poor reference of traditional test papers. After a period of testing and analysis of the system, the functional modules of the online Japanese examination system can stably carry out various tasks such as grouping papers, but there are still many imperfections, and various drawbacks are still unavoidable. There are still many undiscovered problems, and various problems must be gradually discovered in the long-term operation and use. By constantly finding problems and solving problems, the system can be made more perfect and more practical.



---

*Source: 3678607-2022-11-26.xml*