# Research on the Fusion of Hybrid Fuzzy Clustering Algorithm and Computer Automatic Test Paper Composition Algorithm

Authors: Baopeng Kan
Journal: Advances in Multimedia
 (2022)

---

## 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.


---

## Body

## 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 ofn-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 discourseU, and any mapping of U to the closed interval [0.1] is μA.(1)μA:U⟶0,1u⟶μAu.It is determined that a fuzzy subset ofU is A, μA is called the membership function of the fuzzy subset, and μAu is called the membership degree of u to A. The degree of membership can also be denoted as Au. Without confusion, fuzzy subsets are also called fuzzy sets.When the value range ofμAu is equal to 0 or 1, μAu 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:(2)A=Au1u1+Au2u2+⋯+Aunun.Among them,Aui/ui does not represent the score, but represents the correspondence between the element ui in the universe of discourse and its membership function degree Aui. “+” also does not mean “summation,” but means the whole of fuzzy sets on the universe of discourse U.(2)
The ordinal couple representationu and its membership degree Aui constitute an ordinal couple to represent A, and then,(3)A=u1,Au1,u2,Au2,…,un,Aun.(3)
Vector representation:(4)A=Au1,Au2,…,Aun.In vector notation, terms with membershipО cannot be omitted. Sometimes the three methods are also combined and denoted as t.(5)A=Au1u1,Au2u2,…,Aunun.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 domainU=x1,x2,x3,…,xn is the object to be classified, and each object has m indicators to represent its characteristics:(6)xi=xi1,xi2,xi3,…,xim,i=1,2,…,n.Therefore, we can get the original matrix as(7)x11x12⋯x1mx21x22⋯x2m⋯⋯⋯⋯xn1xn2⋯xnm.


### 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:(8)xik′=xik−xik¯sk,i=1,2,…,n;k=1,2,…,m.Among them,(9)xk¯=1n∑i=1nxik,sk=1n∑i=1nxik−xk¯2.After standard transformation, each variable has a mean of 0 and a standard deviation of 1, and the effect of dimensions is eliminated. However,xik′ 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:(10)xik′=xik′−min1≤i≤nxik′max1≤i≤nxik′−min1≤i≤nxik′,k=1,2,…,n.After the translational range transformation, there is obviously0≤xik′≤1, and the influence of the dimension is also eliminated.The second step is to build a fuzzy similarity matrix.The domain of discourse isU=x1,x2,x3,…,xn, xi=xi1,xi2,xi3,…,xim. The similarity coefficient is determined according to the traditional clustering method, and a fuzzy similarity matrix is established, and the similarity between xi and xj is rij=Rxi,xj. The method of determining rij=Rxi,xj mainly borrows the similarity coefficient method. There are many ways to calculate rij, 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:(11)rij=1,i=j,rij=1M∑k=1nxikxjk,i≠j.Among them,M=maxi≠j∑xikxjk.Obviously,rij∈0,1. If a negative value occurs in rij, rij'=rij+1/2, and then rij'∈0,1 . Of course, the above translation range transformation can also be used [19].(2)
Angle cosine method:(12)rij=∑k=1mxikxjk∑k=1mxik2∑k=1mxjk2.(3)
Correlation coefficient method:(13)rij=∑k=1mxik−x¯ixjk−x¯j∑k=1mxik−x¯i2∑k=1mxjk−x¯j2.Among them,x¯i=1/m∑k=1mxik,x¯j=1/m∑k=1mxjk.(4)
Maximum and minimum method:(14)rij=∑k=1mxik∧xjk∑k=1mxik∨xjk.(5)
Geometric mean minimum method:(15)rij=∑k=1mxik∧xjk∑k=1mxikxjk.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:(16)rij=1,i=j,rij=M∑k=1mxik−xjk,i≠j.Among them,M is appropriately selected such that 0≤rij≤1.(2)
Absolute value index method:(17)rij=exp−∑k=1mxik−xjk.When using the distance method directly, we always setrij=1−cdxi,xj, where c is an appropriately chosen parameter such that 0≤rij≤1. Distances that are often used are the following.(1)
Hamming distance:(18)dxi,xj=∑k=1mxik−xjk.(2)
Euclidean distance:(19)dxi,xj=∑k=1mxik−xjk2.(3)
Chebyshev distance:(20)dxi,xj=∨k=1mxik−xjk.


#### 3.3.3. Subjective Evaluation

Subjective evaluation is to ask experts or practical experiencers to directly rate the similarity betweenXik and Xjk, as the value of r.The third step is clustering.Transitive closure method is as follows.Similarity matrixR can find its transitive closure by the square method.(21)R⟶R2⟶R4⟶⋯R2k=R∗.Finally, clustering is performed. The algorithm gives different confidence levelsa and obtains the R-cut matrix. The algorithm finds the a of R to show the ordinary Rλ. When λ=1, 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λ∈0,1 as the cut matrix Rλ and fill in the element symbol on the diagonal of Rλ. In the lower left of the diagonal, replace 1 in Rλ 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 hasn 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 matrixX=X1,X2,…,XnT⊂Rn×p.(2)
Calibration: the algorithm establishes the fuzzy similarity relationship matrixr=rij. There are many calibration methods. Here, the Euclidean distance method is used to obtain the fuzzy similarity relationship matrix.(22)rij=1−c1∑k=1pxik−xjk2,1≤i≤n,1≤j≤n.Among them,c1 is a properly chosen constant such that rij∈0,1 is spread out in [0,1].(3)
There are many ways to draw the largest tree byrij 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λ∈0,1 and cuts the largest tree, that is, cuts the edge of rij<λ 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(23)JU,V=∑k=1n∑i=1cuikmdik2.Here,U=uik is the fuzzy classification matrix, uik∈0,1, V=vi, vi 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(Ui) 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 mth 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. Ug represents the membership value of the k-th sample belonging to the i-th class. In the formula,(24)dik2=xk−vi2=xk−viτAxk−vi.The matrixA is a symmetric matrix, generally taking A = I, and then dik is the Euclidean distance.The clustering criterion is to obtain the appropriate fuzzy partition matrixμ=μk and fuzzy clustering center vi so that the objective function J(U, V) reaches the minimum value.(25)minJU,V=min∑k=1n∑i=1cuikmdik2=∑knmin∑i=1cuikmdik2∑i=1cuik=1.When we solve using the Lagrange multiplier method, we get(26)F=∑k=1n∑i=1cuikmdik2+λ∑i=1cuik−1.The optimal condition is(27)∂F∂λ=∑i=1cuik−1=0,∂F∂uik=muikm−1dik2−λ=0.From (27), we can get(28)uik=1∑j=1cdik/djk2/m−1,1<i<c,1<k<n,(29)vi=∑k=1nuijmxk∑k=1nuijm.The implementation steps of the fuzzy C-means clustering algorithm are as follows:(1)
The algorithm determines the number of classesk.(2)
The algorithm gives the initial cluster center or first gives the initial membership matrixU0=uij0. Obviously, the sum of the elements of each column of U0 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.


## 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 domainU=x1,x2,x3,…,xn is the object to be classified, and each object has m indicators to represent its characteristics:(6)xi=xi1,xi2,xi3,…,xim,i=1,2,…,n.Therefore, we can get the original matrix as(7)x11x12⋯x1mx21x22⋯x2m⋯⋯⋯⋯xn1xn2⋯xnm.


## 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:(8)xik′=xik−xik¯sk,i=1,2,…,n;k=1,2,…,m.Among them,(9)xk¯=1n∑i=1nxik,sk=1n∑i=1nxik−xk¯2.After standard transformation, each variable has a mean of 0 and a standard deviation of 1, and the effect of dimensions is eliminated. However,xik′ 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:(10)xik′=xik′−min1≤i≤nxik′max1≤i≤nxik′−min1≤i≤nxik′,k=1,2,…,n.After the translational range transformation, there is obviously0≤xik′≤1, and the influence of the dimension is also eliminated.The second step is to build a fuzzy similarity matrix.The domain of discourse isU=x1,x2,x3,…,xn, xi=xi1,xi2,xi3,…,xim. The similarity coefficient is determined according to the traditional clustering method, and a fuzzy similarity matrix is established, and the similarity between xi and xj is rij=Rxi,xj. The method of determining rij=Rxi,xj mainly borrows the similarity coefficient method. There are many ways to calculate rij, 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:(11)rij=1,i=j,rij=1M∑k=1nxikxjk,i≠j.Among them,M=maxi≠j∑xikxjk.Obviously,rij∈0,1. If a negative value occurs in rij, rij'=rij+1/2, and then rij'∈0,1 . Of course, the above translation range transformation can also be used [19].(2)
Angle cosine method:(12)rij=∑k=1mxikxjk∑k=1mxik2∑k=1mxjk2.(3)
Correlation coefficient method:(13)rij=∑k=1mxik−x¯ixjk−x¯j∑k=1mxik−x¯i2∑k=1mxjk−x¯j2.Among them,x¯i=1/m∑k=1mxik,x¯j=1/m∑k=1mxjk.(4)
Maximum and minimum method:(14)rij=∑k=1mxik∧xjk∑k=1mxik∨xjk.(5)
Geometric mean minimum method:(15)rij=∑k=1mxik∧xjk∑k=1mxikxjk.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:(16)rij=1,i=j,rij=M∑k=1mxik−xjk,i≠j.Among them,M is appropriately selected such that 0≤rij≤1.(2)
Absolute value index method:(17)rij=exp−∑k=1mxik−xjk.When using the distance method directly, we always setrij=1−cdxi,xj, where c is an appropriately chosen parameter such that 0≤rij≤1. Distances that are often used are the following.(1)
Hamming distance:(18)dxi,xj=∑k=1mxik−xjk.(2)
Euclidean distance:(19)dxi,xj=∑k=1mxik−xjk2.(3)
Chebyshev distance:(20)dxi,xj=∨k=1mxik−xjk.


### 3.3.3. Subjective Evaluation

Subjective evaluation is to ask experts or practical experiencers to directly rate the similarity betweenXik and Xjk, as the value of r.The third step is clustering.Transitive closure method is as follows.Similarity matrixR can find its transitive closure by the square method.(21)R⟶R2⟶R4⟶⋯R2k=R∗.Finally, clustering is performed. The algorithm gives different confidence levelsa and obtains the R-cut matrix. The algorithm finds the a of R to show the ordinary Rλ. When λ=1, 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λ∈0,1 as the cut matrix Rλ and fill in the element symbol on the diagonal of Rλ. In the lower left of the diagonal, replace 1 in Rλ 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 hasn 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 matrixX=X1,X2,…,XnT⊂Rn×p.(2)
Calibration: the algorithm establishes the fuzzy similarity relationship matrixr=rij. There are many calibration methods. Here, the Euclidean distance method is used to obtain the fuzzy similarity relationship matrix.(22)rij=1−c1∑k=1pxik−xjk2,1≤i≤n,1≤j≤n.Among them,c1 is a properly chosen constant such that rij∈0,1 is spread out in [0,1].(3)
There are many ways to draw the largest tree byrij 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λ∈0,1 and cuts the largest tree, that is, cuts the edge of rij<λ 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(23)JU,V=∑k=1n∑i=1cuikmdik2.Here,U=uik is the fuzzy classification matrix, uik∈0,1, V=vi, vi 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(Ui) 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 mth 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. Ug represents the membership value of the k-th sample belonging to the i-th class. In the formula,(24)dik2=xk−vi2=xk−viτAxk−vi.The matrixA is a symmetric matrix, generally taking A = I, and then dik is the Euclidean distance.The clustering criterion is to obtain the appropriate fuzzy partition matrixμ=μk and fuzzy clustering center vi so that the objective function J(U, V) reaches the minimum value.(25)minJU,V=min∑k=1n∑i=1cuikmdik2=∑knmin∑i=1cuikmdik2∑i=1cuik=1.When we solve using the Lagrange multiplier method, we get(26)F=∑k=1n∑i=1cuikmdik2+λ∑i=1cuik−1.The optimal condition is(27)∂F∂λ=∑i=1cuik−1=0,∂F∂uik=muikm−1dik2−λ=0.From (27), we can get(28)uik=1∑j=1cdik/djk2/m−1,1<i<c,1<k<n,(29)vi=∑k=1nuijmxk∑k=1nuijm.The implementation steps of the fuzzy C-means clustering algorithm are as follows:(1)
The algorithm determines the number of classesk.(2)
The algorithm gives the initial cluster center or first gives the initial membership matrixU0=uij0. Obviously, the sum of the elements of each column of U0 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.


## 3.3.1. Similarity Coefficient Method

(1)
Quantity product method:(11)rij=1,i=j,rij=1M∑k=1nxikxjk,i≠j.Among them,M=maxi≠j∑xikxjk.Obviously,rij∈0,1. If a negative value occurs in rij, rij'=rij+1/2, and then rij'∈0,1 . Of course, the above translation range transformation can also be used [19].(2)
Angle cosine method:(12)rij=∑k=1mxikxjk∑k=1mxik2∑k=1mxjk2.(3)
Correlation coefficient method:(13)rij=∑k=1mxik−x¯ixjk−x¯j∑k=1mxik−x¯i2∑k=1mxjk−x¯j2.Among them,x¯i=1/m∑k=1mxik,x¯j=1/m∑k=1mxjk.(4)
Maximum and minimum method:(14)rij=∑k=1mxik∧xjk∑k=1mxik∨xjk.(5)
Geometric mean minimum method:(15)rij=∑k=1mxik∧xjk∑k=1mxikxjk.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:(16)rij=1,i=j,rij=M∑k=1mxik−xjk,i≠j.Among them,M is appropriately selected such that 0≤rij≤1.(2)
Absolute value index method:(17)rij=exp−∑k=1mxik−xjk.When using the distance method directly, we always setrij=1−cdxi,xj, where c is an appropriately chosen parameter such that 0≤rij≤1. Distances that are often used are the following.(1)
Hamming distance:(18)dxi,xj=∑k=1mxik−xjk.(2)
Euclidean distance:(19)dxi,xj=∑k=1mxik−xjk2.(3)
Chebyshev distance:(20)dxi,xj=∨k=1mxik−xjk.


## 3.3.3. Subjective Evaluation

Subjective evaluation is to ask experts or practical experiencers to directly rate the similarity betweenXik and Xjk, as the value of r.The third step is clustering.Transitive closure method is as follows.Similarity matrixR can find its transitive closure by the square method.(21)R⟶R2⟶R4⟶⋯R2k=R∗.Finally, clustering is performed. The algorithm gives different confidence levelsa and obtains the R-cut matrix. The algorithm finds the a of R to show the ordinary Rλ. When λ=1, 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λ∈0,1 as the cut matrix Rλ and fill in the element symbol on the diagonal of Rλ. In the lower left of the diagonal, replace 1 in Rλ 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 hasn 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 matrixX=X1,X2,…,XnT⊂Rn×p.(2)
Calibration: the algorithm establishes the fuzzy similarity relationship matrixr=rij. There are many calibration methods. Here, the Euclidean distance method is used to obtain the fuzzy similarity relationship matrix.(22)rij=1−c1∑k=1pxik−xjk2,1≤i≤n,1≤j≤n.Among them,c1 is a properly chosen constant such that rij∈0,1 is spread out in [0,1].(3)
There are many ways to draw the largest tree byrij 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λ∈0,1 and cuts the largest tree, that is, cuts the edge of rij<λ 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(23)JU,V=∑k=1n∑i=1cuikmdik2.Here,U=uik is the fuzzy classification matrix, uik∈0,1, V=vi, vi 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(Ui) 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 mth 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. Ug represents the membership value of the k-th sample belonging to the i-th class. In the formula,(24)dik2=xk−vi2=xk−viτAxk−vi.The matrixA is a symmetric matrix, generally taking A = I, and then dik is the Euclidean distance.The clustering criterion is to obtain the appropriate fuzzy partition matrixμ=μk and fuzzy clustering center vi so that the objective function J(U, V) reaches the minimum value.(25)minJU,V=min∑k=1n∑i=1cuikmdik2=∑knmin∑i=1cuikmdik2∑i=1cuik=1.When we solve using the Lagrange multiplier method, we get(26)F=∑k=1n∑i=1cuikmdik2+λ∑i=1cuik−1.The optimal condition is(27)∂F∂λ=∑i=1cuik−1=0,∂F∂uik=muikm−1dik2−λ=0.From (27), we can get(28)uik=1∑j=1cdik/djk2/m−1,1<i<c,1<k<n,(29)vi=∑k=1nuijmxk∑k=1nuijm.The implementation steps of the fuzzy C-means clustering algorithm are as follows:(1)
The algorithm determines the number of classesk.(2)
The algorithm gives the initial cluster center or first gives the initial membership matrixU0=uij0. Obviously, the sum of the elements of each column of U0 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 Figure1.Figure 1
Flow analysis diagram of the test paper composition system.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 Figure2.Figure 2
Schematic diagram of the basic structure of the MVC framework.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. Figure3 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 3
The business activity diagram of the teacher’s test paper composition.Figure4 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.Figure 4
Activity diagram of students taking online exams.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 Figure5.Figure 5
Structure diagram of the system network.As shown in Figure6, 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.Figure 6
Flow chart of intelligent test paper composition.The main structure diagram of the intelligent test paper composition system is designed as shown in Figure7.Figure 7
Structure diagram of the test paper composition system.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 Figure8.Figure 8
Overall architecture of the system.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 Table1 and Figure 9.Table 1
Effect verification of computer automatic test paper composition algorithm based on hybrid fuzzy clustering algorithm.
Num.Generate test paper effectNum.Generate test paper effectNum.Generate test paper effectNum.Generate test paper effect187.591979.953788.295581.84287.232091.583887.255684.69379.512186.153988.955779.15491.382286.244090.655879.06579.782383.714183.675982.03687.692487.794290.636090.79780.402590.634389.746187.35884.942680.354489.426287.44981.272790.144585.866381.371085.152889.594682.986488.231183.922979.954782.356587.101287.763080.004889.256683.191379.963191.764984.116781.121488.773282.705083.726890.661583.253379.805182.616991.411682.653480.955291.227090.281783.313590.195391.277190.361883.873688.995480.467291.88Figure 9
Statistical diagram of system effect evaluation.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.



---

*Source: 4264144-2022-06-22.xml*