#### Abstract

In order to improve the effect of intelligent automatic test paper composition, this paper combines the hybrid fuzzy clustering algorithm to study the computer automatic test paper composition algorithm. In this paper, a computer automatic test paper composition system based on hybrid fuzzy clustering algorithm is constructed. Moreover, the hybrid fuzzy clustering method used in this paper is used as the basic algorithm of the system, and the algorithm is improved according to the actual needs of intelligent paper composition. In addition, this paper uses an intelligent algorithm to input the relevant constraint parameters and combines the original parameters to select the most suitable test questions from the database and combine them into test papers. Finally, this paper constructs the system structure based on the requirements of intelligent test paper composition. The experimental research shows that the computer automatic test paper composition system based on the hybrid fuzzy clustering algorithm proposed in this paper has a good test paper composition function, which can effectively promote the progress of the intelligent examination mode in colleges and universities.

#### 1. Introduction

In the teaching work of the school, in order to grasp the learning situation of students and the effect of teachers’ teaching in time, a large number of examinations are organized every year. This is a very important link in the teaching process, which can better help teachers improve teaching methods and improve teaching quality. Therefore, it is very important to generate a test paper with comprehensive knowledge points and moderate difficulty, which is often the most troublesome problem for teachers. With the rise of online education, there will inevitably be higher requirements for online exams in the future. Therefore, an efficient and intelligent test paper composition scheme is urgently needed. Generally, the algorithms used to solve the problem of intelligent test paper composition include granular synthesis method, priority algorithm, backtracking heuristic method, error compensation algorithm, random extraction algorithm, and genetic algorithm. The first several algorithms have low success rate of test paper composition and take a long time, and it is difficult to obtain a better solution. Although the genetic algorithm is a global search algorithm and has a certain effect on the improvement of the success rate of test paper composition, it is easy to fall into the trap of local optimum, resulting in premature phenomenon, and its test paper composition efficiency and effect still need to be improved.

The main function of the network teaching management system is that students can learn and train online, and teachers can test students by selecting test papers from the test question bank. Extracting test papers that meet different teaching test requirements from a large number of test questions in the test bank is the realization of online testing. The key to the students’ real learning situation, and the quality of the test papers is whether they can truly reflect the teachers’ teaching level and the students’ mastery of knowledge and skills. At present, the method of extracting test questions and test papers from the question bank mainly includes random selection and test paper algorithm, backtracking heuristic algorithm and genetic algorithm and other intelligent test papers. The method of random selection of test questions can only be set up according to the user’s requirements when the number of questions is not large and the conditions are reasonable. It will fall into the nonideal question area and repeat the selection of questions, and it is impossible to form a test paper that meets the user’s requirements. The retrospective test paper group algorithm requires a lot of retrospective test operations in the test selection, which can no longer meet the frequently changed questions in the test question bank. The test set requirements of the network test test set system. Although the genetic algorithm has adaptive global optimization and intelligent search technology and has good convergence, it is prone to problems such as local optimal solutions and premature maturity.

In this paper, the hybrid fuzzy clustering algorithm is used to study the computer automatic test paper composition algorithm, and a computer automatic test paper composition system based on the hybrid fuzzy clustering algorithm is constructed, which promotes the improvement of the efficiency of intelligent test paper composition.

#### 2. Related Work

The intelligent test-setting system can easily realize the semiautomation of the test, which can not only help teachers to automatically set up test papers, but also meet the different requirements of different teachers for the test to the greatest extent. The intelligent test-setting system implemented by genetic algorithm has the advantages of moderate difficulty and more reasonable distribution of test questions, which can ensure the fairness and rationality of the test [1]. The intelligent group volume system has at least three types of users: teachers, students, and administrators [2]. Teachers can view all students in their class, manage all test questions under their own subjects, add test paper requirements, compose test papers for the subjects they teach, publish tests, mark subjective questions, view score analysis, etc., online test, and view the score analysis; administrators can manage user information and basic data management of test questions. User management includes user name, account number, password, e-mail, class, and subjects, and basic data management of test questions includes question types, questions, answers, difficulty, score, and knowledge points [3]. The intelligent group volume system usually has the following functions: (1) user management: user login; administrators create, delete, and grant permissions to users and edit user information. (2) Subject management: the administrator manages the subjects of each subject, including the management of the basic information of the subjects and the knowledge points contained therein. (3) Test question management: manage the test questions of each subject, including the entry, editing, deletion, and export of the test questions of each subject. The administrator can operate all the test questions, and the teacher can only operate the test questions of the subjects he is responsible for. (4) Test paper management: according to the requirements of teachers of each subject, test papers are automatically composed. (5) Online test: provide students with online tests of different subjects and give their scores. (6) Score analysis: automatically review objective questions, provide students with a personal analysis of wrong questions, and provide teachers with the situation of each student and the overall situation of each class [4].

In essence, intelligent test preparation is an objective optimization problem with multiple constraints. The computer system automatically generates the optimal solution of *n*-question combinations that meet these constraints according to the test parameters set by the test teacher [5]. A test paper generally includes constraints such as total score, test time, test paper difficulty, test question type, number of questions for each question type, and knowledge point distribution. These constraints of the test paper are usually based on the question type, score, difficulty, knowledge points, and other attributes obtained [6]. The genetic algorithm, as its name suggests, simulates Darwin’s theory of evolution, first initializes a random population, and then continuously hybridizes to generate the next generation. During this period, there will also be variation. Finally, the best one or more individuals are retained through the principle of survival of the fittest down. It is more suitable to apply it to the intelligent volume system [7]. It can intelligently generate a set of test papers that meet the requirements according to the test paper difficulty, test paper structure (question type, quantity and score), knowledge point distribution, and other test paper group parameters expected by the teacher. After analyzing the function of intelligent test, first design the database and test question data table, generally according to the type of test questions (such as multiple-choice questions, multiple-choice questions, multiple-choice questions, true and false questions, fill-in-the-blank questions, short answer questions, comprehensive questions, etc.). Each question type corresponds to a data table [8]. When coding realizes the function of intelligent test paper, according to the set test paper parameters, first select the test questions from the database to generate test paper, and then judge whether the test paper is the best test paper. Specifically, you can first find all the test questions under the knowledge point through the selected knowledge point and then randomly form these test questions into multiple sets of test papers. For the fitness of each set of test papers, the one with the highest fitness is taken as the male parent, and the others are randomly selected as the female parent to generate the next generation, until the fitness reaches more than 0.98 or the number of cycles reaches 10,000 [9].

The smart component system is designed primarily to test student learning outcomes. In the teaching process, students often rely on examinations to test their achievements, and a high-standard test paper is often needed, so that such test papers can effectively test students’ learning achievements. The arrangement of the test papers often requires the educators to have a high degree of evaluation and professional requirements. However, many teachers are often only responsible for the teaching link. There is not much research on the test papers, and there are often omissions in the test papers, or if you cannot grasp the key points, you cannot achieve good test results [10]. To carry out the design of the intelligent test question bank, we can deal with the questions of the test paper according to the syllabus through the scientific and intelligent nature of the test question bank [11].

After using the intelligent group test question bank system, the composed test papers need to be divided into different levels in difficulty and distributed in steps, so as to divide the test scores in detail [12]. If the exam papers are too difficult or too simple, it will affect the degree of examination of the students, and even there will be no difference in the test scores. If the exam papers are too difficult and beyond the scope of the students’ knowledge, it will not be able to truly show the students’ learning level. In severe cases, students will lose confidence in learning; if the exam questions are too simple, all candidates can easily answer them, resulting in students with the same grades in a large area, and it is impossible to distinguish the individual learning level of students, and this formalized exam will also affect the enthusiasm of students, making it difficult for students to concentrate and devote themselves to learning. To sum up, the design of the test question bank needs to involve the ability level of most middle-level students, so that most students can accept the difficulty, so that the grades can be distributed in steps [13].

In the current educational atmosphere, students often attach great importance to more formal examinations, so examinations can play a certain guiding role in students’ learning [14]. Therefore, the test questions should not focus on memory, which will lead to rigid thinking of students and make students study purely for test scores, which is not conducive to the achievement of educational purposes.

The symbols and expressions of the questions in the question bank are correct. Exams are solemn and serious. Problems in exam papers will make students feel funny and lose the seriousness of exams. Therefore, the composition of the test papers needs to be carefully arranged, not only to take into account the requirements of the syllabus, but also to clarify the purpose and nature of the test [15]. Before the test paper is officially put into use, the teacher also has to conduct a strict review and calculation on the test paper, find out the hidden errors in the test questions, and revise them in time. At the same time, it is necessary to have a clear understanding of the type, difficulty, and scope of each question in the test paper, so as to provide targeted guidance and teaching for students’ mistakes after the test is over.

Speed up the generation of test papers. Aiming at the shortcomings of traditional genetic algorithm, such as precociousness and slow optimization speed, the combination of cellular automata and genetic algorithm is used for intelligent test composition, and the test question query two-dimensional space uses a spatial topological structure, which better guarantees the diversity of test questions and provides favorable conditions to find the optimal combination of test questions [16]. Literature [17] improved the foraging, tail-chasing, and other behaviors of the artificial fish swarm algorithm and applied it to the group rolls, which achieved good results and improved the speed and quality of the rolls.

#### 3. Hybrid Fuzzy Clustering

We are given a domain of discourse *U*, and any mapping of *U* to the closed interval [0.1] is .

It is determined that a fuzzy subset of *U* is *A*, is called the membership function of the fuzzy subset, and is called the membership degree of *u* to *A*. The degree of membership can also be denoted as *A*_{u}. Without confusion, fuzzy subsets are also called fuzzy sets.

When the value range of is equal to 0 or 1, degenerates into a characteristic function of a classical subset, and the fuzzy subset *A* degenerates into a classical subset. It is not difficult to see that the classical set is a special form of the fuzzy set, and the fuzzy set is the generalization of the concept of the classical set.

There are several ways to express fuzzy sets [18]:(1)Zadeh representation: Among them, does not represent the score, but represents the correspondence between the element in the universe of discourse and its membership function degree . “+” also does not mean “summation,” but means the whole of fuzzy sets on the universe of discourse *U*.(2)The ordinal couple representation *u* and its membership degree constitute an ordinal couple to represent *A*, and then,(3)Vector representation:

In vector notation, terms with membership *О* cannot be omitted. Sometimes the three methods are also combined and denoted as *t*.

The dynamic clustering method based on fuzzy equivalence relation is generally divided into three steps.

The first step is data normalization.

##### 3.1. The Role of Data Standardization

In practical application problems, different data may have different dimensions. In order to enable data of different dimensions to be compared, it is necessary to appropriately transform the data.

##### 3.2. Data Matrix

The domain is the object to be classified, and each object has *m* indicators to represent its characteristics:

Therefore, we can get the original matrix as

##### 3.3. Data Normalization

However, even then, the resulting data is not necessarily on the interval [0,1]. Therefore, to standardize the data is to compress the data to the interval [0.1] according to the requirements of the fuzzy matrix.

Data normalization requires the following two transformations:(1)Translation standard deviation transformation: Among them, After standard transformation, each variable has a mean of 0 and a standard deviation of 1, and the effect of dimensions is eliminated. However, obtained in this way is not necessarily on [0, 1], so the next transformation needs to be done, that is, the translation range transformation.(2)Translation range transformation:

After the translational range transformation, there is obviously , and the influence of the dimension is also eliminated.

The second step is to build a fuzzy similarity matrix.

The domain of discourse is , . The similarity coefficient is determined according to the traditional clustering method, and a fuzzy similarity matrix is established, and the similarity between and is . The method of determining mainly borrows the similarity coefficient method. There are many ways to calculate , so it depends on the nature of the problem to decide which method to use.

###### 3.3.1. Similarity Coefficient Method

(1)Quantity product method: Among them, . Obviously, . If a negative value occurs in , , and then . Of course, the above translation range transformation can also be used [19].(2)Angle cosine method:(3)Correlation coefficient method: Among them, .(4)Maximum and minimum method:(5)Geometric mean minimum method:

It should be noted that the abovementioned maximum-minimum method; otherwise, appropriate transformations are also required.

###### 3.3.2. Distance Method

(1)Absolute value reciprocal method: Among them, *M* is appropriately selected such that .(2)Absolute value index method:

When using the distance method directly, we always set , where *c* is an appropriately chosen parameter such that . Distances that are often used are the following.(1)Hamming distance:(2)Euclidean distance:(3)Chebyshev distance:

###### 3.3.3. Subjective Evaluation

Subjective evaluation is to ask experts or practical experiencers to directly rate the similarity between *X*_{ik} and *X*_{jk}, as the value of *r*.

The third step is clustering.

Transitive closure method is as follows.

Similarity matrix *R* can find its transitive closure by the square method.

Finally, clustering is performed. The algorithm gives different confidence levels *a* and obtains the *R*-cut matrix. The algorithm finds the *a* of *R* to show the ordinary . When , each sample is in a class of its own, and then the value of *a* is gradually decreased, and the class is gradually merged from fine to coarse.

The matrix analysis based on the fuzzy equivalence relationship firstly establishes the fuzzy similarity relationship matrix and then transforms it by the square method, and the workload is large. Therefore, people study the netting method of direct clustering starting from the fuzzy similarity matrix. This method avoids the matrix self-multiplication operation, which is convenient and intuitive. The so-called netting method is to first take a fixed level as the cut matrix and fill in the element symbol on the diagonal of . In the lower left of the diagonal, replace 1 in with , replace “0” with space, and call the node of the position. Then, the warp and weft lines are drawn diagonally from the nodes, and this process is called netting. That is, the warp and weft lines are used to connect the nodes, and the warp and weft lines passing through the same node can be regarded as being bundled together. That is, it is knotted. The points that can be connected with each other through “knotting” belong to the same category, so as to realize the classification.

For matrices with only reflexive and symmetric fuzzy similarity relations, the maximum tree method can be used for direct classification. The maximum tree method is to construct a special graph for clustering according to the concept of “tree” in graph theory, which has *n* vertices, *n* − 1 connected edges, but does not contain any loops.

The implementation steps of the maximum tree method are as follows:(1)Sample survey: the algorithm determines the sample characteristic index matrix .(2)Calibration: the algorithm establishes the fuzzy similarity relationship matrix . There are many calibration methods. Here, the Euclidean distance method is used to obtain the fuzzy similarity relationship matrix. Among them, *c*_{1} is a properly chosen constant such that is spread out in [0,1].(3)There are many ways to draw the largest tree by and to find the largest tree. In order to facilitate the realization with computer programming, the following steps are adopted: ① For each vertex, it first finds a vertex that is most similar to it, draw each vertex, connect the lines in turn, and mark the weights, and it is required that no circles be generated. ② By taking any one of the subtrees, the algorithm searches for each vertex of it and finds a path that is most similar to the vertices of other subtrees but is not connected and connects the two subtrees. ③ If the maximum tree is not yet formed, the algorithm repeats operation ② until the maximum tree is formed.(4)The algorithm selects the appropriate threshold value and cuts the largest tree, that is, cuts the edge of to get a disconnected graph, and each of its connected branches is the class at the entry level .

Traditional clustering is a kind of hard division, which strictly divides each object to be identified into a certain class, which has the characteristics of either one or the other. However, in fact, most objects do not have strict properties and often have properties of one and the other. Therefore, fuzzy mathematics is introduced into cluster analysis to form a more reasonable fuzzy C-means clustering algorithm (FCM).

The objective function of fuzzy clustering is

Here, is the fuzzy classification matrix, , , represent the *i*-th cluster center (*i* = 1, …, *c*), and me[1, 0] is the weighting index, generally *m* ∈ [1, 2.5], taking *m* = 2. *J*(*U*_{i}) represents the weighted sum of squared distances from the samples in each category to the cluster center. The smaller *J*(*U*, *V*) is, the better the clustering effect is. The weight is the *m*th power of the membership degree of the sample *x* to the *i*-th class. Di is the Euclidean distance, the distance between each sample and the cluster center. represents the membership value of the *k*-th sample belonging to the *i*-th class. In the formula,

The matrix *A* is a symmetric matrix, generally taking *A* = I, and then is the Euclidean distance.

The clustering criterion is to obtain the appropriate fuzzy partition matrix and fuzzy clustering center so that the objective function *J*(*U*, *V*) reaches the minimum value.

When we solve using the Lagrange multiplier method, we get

The optimal condition is

From (27), we can get

The implementation steps of the fuzzy C-means clustering algorithm are as follows:(1)The algorithm determines the number of classes *k*.(2)The algorithm gives the initial cluster center or first gives the initial membership matrix . Obviously, the sum of the elements of each column of should be equal to 1.(3)The algorithm uses formula (28) to calculate a new membership matrix.(4)The algorithm uses formula (29) to find the cluster centers of various types.(5)If the cluster center distance between two iterations is less than the set value, the algorithm stops; otherwise, the algorithm turns to 3.

#### 4. Computer Automatic Test Paper Composition System Relying on Hybrid Fuzzy Clustering Algorithm

The main theoretical sources of the intelligent test paper composition system are based on the mathematical model of test paper composition, test paper composition target constraints, test paper composition algorithm, test paper evaluation indicators, test question structure, algorithm coding method, etc. The difficulty and focus of the test paper composition system lies in the intelligent algorithm used by the test paper composition, which is also the focus of this article. The execution process of the intelligent test paper composition module is to input the relevant constraint parameters first and then combine the original parameters to select the most suitable test questions from the database and combine them into test papers. The specific steps are shown in Figure 1.

MVC is an architectural pattern for designing and creating web applications using the form of Model-View-Controller, which is used to represent the structure of the application and the division of labor of each part. In order to improve the efficiency of research and development, we increase the scalability and maintainability of the program and realize the separation of the business layer and the view layer. The system is developed using the MVC architecture. The basic structure of the MVC framework is as shown in Figure 2.

Combining users’ requirements for intelligent test paper composition system, this paper uses business activity diagrams to describe the work and behavior of teachers’ test paper composition and students’ online test execution. Figure 3 shows the teacher’s test paper composition business activity diagram. Through the activity diagram, we can see the process of the teacher completing the test paper composition. The teacher enters the test paper composition system and sets the test paper constraints according to the prompts, and the system reads the test paper composition conditions to determine whether the test questions meet the test paper composition requirements. If the conditions are met, the test questions will be selected and the test paper will be generated. If it does not meet the requirements, it prompts that the test paper composition fails, and the process ends.

Figure 4 shows the activity diagram of students’ online examination, through which the flow of students’ online examination can be seen. Students log in to the system, retrieve the course units of the exam according to the student ID, select the course unit, take the online exam, submit the answers, save the exam results, and complete the process activities.

The B/S system that processes test paper composition for each subject has been implemented within the school. This system is designed and developed for the current test paper composition work in various disciplines and is deployed and implemented in various teaching and research offices (departments) of the school. The designed system network topology is shown in Figure 5.

As shown in Figure 6, it is the flow chart of intelligent test paper composition. As can be seen from the test paper composition flow chart, the system first reads the settings of the test paper to obtain the number of test questions of each different type. At the same time, the system initializes the selection state of each test question, sets the unselected state of the test question as 0, and performs random initialization selection. Then, the system calculates the fitness of the test paper in this state and then judges whether the fitness meets the requirements. If the requirements are not met, tail-chasing, flocking activities, or foraging activities are performed, and the fitness can be recalculated only if the standard is met. If the fitness is reached, the test paper will be published. If the teacher is satisfied, the test paper composition is completed; otherwise, the test paper composition process is repeated.

The main structure diagram of the intelligent test paper composition system is designed as shown in Figure 7.

In terms of overall system architecture, the system divides the entire business application into three layers: presentation layer, business logic layer, and data access layer. The overall system architecture diagram is shown in Figure 8.

After constructing the system structure of this paper, this paper verifies the effect of the system proposed in this paper. In this paper, a large number of test questions are obtained from the network as the basic data of the database, and the results of the output test paper composition are verified by the automatic test paper composition system in this paper. Moreover, this paper evaluates the test paper composition results, analyzes multiple sets of evaluation data, and finally obtains the results shown in Table 1 and Figure 9.

It can be seen from the above research that the computer automatic test paper composition system based on the hybrid fuzzy clustering algorithm proposed in this paper has a good test paper composition function, which can effectively promote the progress of the intelligent examination mode in colleges and universities.

#### 5. Conclusion

The research of intelligent test paper composition system is a key link to realize scientific and efficient educational administration management, and it is an important research direction of computer test paper composition. Computer test paper composition is a process of solving multiobjective constraints for the quality indicators that affect the test paper, such as difficulty, content, time, score, and teaching requirements to form a test paper that meets the requirements. Moreover, the intelligent test paper composition system is the basis for realizing paperless examination, examination standardization and personalization, online testing, etc. In addition, the intelligent test paper composition system integrates artificial intelligence technology with the test paper composition knowledge and experience of human education experts, completes the design of the test paper content through the computer, and ensures that the test paper generated by the computer meets the expert-level standard. In this paper, the computer automatic test paper composition algorithm is researched by combining the hybrid fuzzy clustering algorithm, and a computer automatic test paper composition system based on the hybrid fuzzy clustering algorithm is constructed. The experimental research shows that the computer automatic test paper composition system based on the hybrid fuzzy clustering algorithm proposed in this paper has a good test paper composition function, which can effectively promote the progress of the intelligent examination mode in colleges and universities.

#### Data Availability

The labeled dataset used to support the findings of this study is available from the author upon request.

#### Conflicts of Interest

The author declares no conflicts of interest.

#### Acknowledgments

The study was supported by Philosophical and Social Sciences Research Projects “Research and Practice of Deep Interactive Learning Model under the Background of Big Data Fusion Media,” Jiangsu, China (No. 2019SJA1311).