Abstract

With cloud computing's powerful computing power, many end users can create a variety of effective network applications using the cloud's services without having to worry about computing technology or access methods. Based on CC technology's on-demand service characteristics and unlimited dynamic expansion capability, this article designs and implements a shared network examination system. In the Web mode, the functions of receiving and distributing examination data, identity verification, online examination, and examination result collection can be realized using the SaaS deployment structure, MVC three-tier architecture, Java modeling language, XFIE, JSON, web service, DES, and other technologies combined with MySQL database. At the same time, the improved parallel genetic annealing algorithm (IPGAA) is proposed as a CC resource scheduling strategy. The IPGAA has better adaptability in the CC system with various cloud resources because it combines the fast global search ability of the genetic algorithm (GA) with the local search ability of the simulated annealing algorithm. Simulation tests show that the IPGAA is effective.

1. Introduction

With the application of various modern information technologies and the rapid development of network technology, many schools or institutions have gradually replaced the traditional paper examinations with online examination systems, thus improving the examination efficiency and the examination quality, and making the examinations no longer restricted by places and regions [1]. The existing online examination system structure modes mainly include client/server (C/S) structure and browser/server (B/S) structure [2, 3]. For the examination system with the C/S structure, the examination center is independent. During the examination, the administrator pushes the examination questions and examinee information down to the examination center, and the examinee takes the examination at the examination center. This kind of structure is mainly distributed in the local area network, and candidates can only take exams in the prescribed environment, which is limited to a certain extent in time and space. In addition, this kind of system has limited carrying capacity, is not easy to expand, and is easy to cause candidates' answers to be lost in emergencies, and there are some phenomena such as disconnected examination systems and difficult data synchronization, which makes it difficult for examination systems based on the B/S structure to be widely used. Therefore, a new technology is urgently needed to improve this dilemma [4].

Cloud computing (CC) is the product of the rapid development of the new generation Internet technology and is a new neural computing mode [57]. CC makes computing distributed on a large number of distributed computers, instead of local computers or remote servers. CC is the product of the integration and development of distributed computing, utility computing, virtualization technology, web services, grid computing, and other technologies. Its goal is that users can use virtual resource pools to the maximum at any time and any place through the network to deal with large-scale computing problems [8]. SaaS (software as a service) is one of the services provided by CC, which is a software application mode that provides software services based on the Internet, and represents the latest trend of software technology development [9, 10]. At the same time, double cache technology and adapter technology are used to help solve the problems of the examinee's answer loss and data synchronization among the examination systems under unexpected circumstances. Therefore, CC provides a technical solution for the design of the current online examination system.

The design of an online examination system based on CC in this article refers to the actual needs, given the rapid advancement of CC technology and the rapid development of the economy. The system can help enterprises enjoy high concurrent examination services at a lower cost, and distributed examination services can be configured at any time according to the needs of examination scale, reducing the pressure on the main system, increasing the concurrent number, and providing a stable and reliable platform for large-scale online examinations, thanks to CCs unlimited dynamic expansion capability.

The main innovations of this article are as follows:(1)According to the functions of the system, aiming at the problems that the traditional random algorithm has weak control ability on knowledge points and difficulty in generating test papers, and low efficiency caused by a large number of repeated invalid test questions, an improved random test paper generating algorithm based on knowledge points and difficulty is proposed for job generation.(2)A cloud computing resource scheduling strategy based on IPGAA is proposed. It solves the problems of single-point failure, high communication overhead, and relatively low efficiency of scheduling algorithm in existing resource scheduling.

CC and its applications are rapidly developing and expanding as a result of the academic and industrial communities' understanding of it, affirmation of its role, and joint promotion of its technology. Literature [11] connects data in a new way, adjusting and improving them at the same time, ensuring their independence, addressing user and cloud security, and integrating resource usage, which is a secure new cloud security technology. Literature [12] demonstrates that through Hadoop, “cloud” can execute parallel applications on huge datasets in a reasonable time, thus supporting computation-intensive services. Literature [13] studies the secure storage of CC and proposes a recoverable proof model to ensure the recoverability and error correction performance of data. Literature [14] puts forward a method to integrate the virtual machine model into the existing resource management framework. Using a two-level scheduling method, virtual machine management will be integrated into batch scheduling to provide better scheduling services for cloud users. However, at present, reservation services for virtual resources are not supported. Literature [15] puts forward a method of automatically and quickly deploying context, which is mainly realized by analyzing the context environment of a virtual cluster, such as IP address of a virtual machine and security information. In addition, a virtual private network provides a customizable network environment for cloud users.

Because system parameters such as CPU time and virtual machine memory size are not independent of one another in a CC system, the impact of system parameters on performance is frequently nonmonotonic. Classic optimization algorithms are rarely used in online parameter configuration because of their high time complexity. Literature [16] automatically manages resources based on self-management strategy and describes how to coordinate according to policies and messages. Literature [17] proposes a CC virtual resource allocation algorithm based on the ant colony algorithm. The algorithm gets better quality and response time, but it can only be used to search computing resources and is limited in the simulation stage. Literature [18] studies the application of CC technology in smart grid, introduces CC technology into traditional smart grid technology, puts forward the idea of intelligent cloud, and makes in-depth research along with the construction of intelligent cloud, resource management, and corresponding security mechanism. Literature [19] puts forward a resource allocation and pricing strategy based on particle swarm optimization. Literature [20, 21] suggests that the feedback control method can be used in the CC system to complete the adaptive configuration and dynamic resource allocation of virtual machines.

3. Research Method

Based on CC technology, the university online examination system studied in this article uses the algorithm for generating test papers. At the same time, a genetic annealing algorithm with double fitness is proposed, which enables the cloud computing system to dynamically formulate cloud resource scheduling solutions to meet the cloud resource requirements of different cloud users and ensure the response time of the cloud computing system to cloud user requests.

3.1. Overall Design of the System
3.1.1. Overall Business Architecture of Cloud Examination System

Cloud examination system is based on CC service, aiming at realizing “on-demand” subscription. Its design and development require scalability and foresight, and it must be able to exchange data with other existing systems. As an independent system, the cloud examination system will provide multiple interfaces to obtain reference personnel and examination information. Besides feeding back the examination results to external systems, it can also provide comprehensive examination information. The overall business structure is shown in Figure 1.

The external subsystem, examination subsystem, examination information input interface, examination login interface, examination result feedback interface, and monitoring information query interface are shown in Figure 1. The entire business architecture is divided into two subsystems and four interfaces: external subsystem, examination subsystem, examination information input interface, examination login interface, examination result feedback interface, and monitoring information query interface. A detailed description of the subsystems and interfaces is given as follows:

(1) External system: Peripheral subsystem refers to all systems that need examination services. The number of these subsystems is unlimited and can be expanded as needed to achieve the purpose of customizing examination services.

(2) Examination system: Examination system is a system that provides examination services for the periphery. The examination server uses distributed deployment, adopts the shortest path principle to route and forward the examination service request of the external system, and obtains the nearest normal server to process the request.

(3) Examination information input interface: The examination subsystem obtains the basic information of the examinees, examination papers, and so on through the examination information input interface.

(4) Test result feedback interface: The test result feedback interface is that the test system feeds back the test results to the peripheral system.

(5) Examination login interface: The login interface is a separate entrance of examination service provided by the examination system, through which reference personnel can directly enter the examination system for examination without logging into the peripheral system.

(6) Monitoring information query interface: The information query interface is an internal interface of the examination system, which is mainly used to monitor the running status of each server of the examination system and provide reference for routing and forwarding.

3.1.2. System Function Module Design

According to the demand analysis of the online homework and examination system, the whole system is divided into two subsystems: homework system and examination system. The Homework subsystem is composed of student module and teacher module, which mainly completes three functions: students' independent training, online work, and test paper generation.

The periodic examination function is performed by the examination subsystem. For example, a teacher may send out an examination notice instructing students to complete a paperless mid-term examination with the specified difficulty coefficient, number of questions, and time limit. Teachers can dynamically understand students' weak links in the course learning process, strengthen students' training on weak knowledge points, and realize intelligent guidance of autonomous learning based on homework feedback.

Figure 2 shows the design of the total functional modules of the system.

3.1.3. Design and Implementation of Database

Online homework and examination system is an application system based on database, in which user information, question bank information, and test paper information are stored. In fact, the database design of this system is to design the structure of every two-dimensional table stored in the database. The system includes two subsystems: homework and exam. It is necessary to design a table for storing exam information, as well as a table for each user's homework information, exam information, and score information. Because the system has the function of answering questions online, it is necessary to design a table for storing questions and replies.

According to the results of requirement analysis, conceptual design uses conceptual data model to express the relationship between data and requirements. This model has nothing to do with the database management system, is universal [22], is independent of computer software and hardware systems, and is very convenient to communicate with users. Through the analysis of system requirements, the entities such as students, teachers, test questions and assignments, and their relationships are designed. The E-R diagram of the relationship among students, teachers, homework, and test questions is shown in Figure 3.

3.2. Research on Key Technologies of System Development
3.2.1. System Development Environment

This system adopts MVC (model-view-controller) three-tier architecture mode (namely, presentation layer, business logic layer, and data access layer logic) and is written in the Java language. As Java is an object-oriented cross-platform language, this system can be applied to many operating systems such as Windows and Linux. During the development of the system, the following key technologies are involved:(1)ActiveMQ is Apache's open-source message stack. The system mainly uses ActiveMQ to share some data transmission and relieve the pressure on the database. Data enters the queue first and then the queue stores the data in the database.(2)Encryption technology of DES (data encryption standard). It is used to transmit important data, and all passwords of users in the database are encrypted by DES, which improves the security of the system.(3)XFire is the Java web service engine. It can easily publish the web service interface for other programs to call.(4)MyBatis is the persistence layer framework. It can easily map Java objects into database records by annotation, write SQL code in XML (Extensible Markup Language), and separate it from Java code, which is beneficial to the maintenance of the system.(5)JSON (JavaScript Object Notation) is a lightweight data interactive format, which is easy for programmers to read and write, and also easy for computers to parse and generate.

3.2.2. Test Paper Generation Algorithm

The users of online homework and examination system are students and teachers. For students, the purpose of homework and examination is to test their mastery of knowledge, while teachers judge students' mastery of course content through students' training and submitted homework, and adjust teaching plans appropriately. The algorithm for generating test paper should be reasonable, fair, and scientific.

The process of generating test papers is to select appropriate parameters, and according to a certain strategy of generating test papers, select the test questions that meet the requirements from the test question bank to form a test paper. The process of volume formation has the following steps, as shown in Figure 4.

Explain the process of generating test paper as follows:(1)Because this strategy is used for homework and test paper generation, the requirements of these two operations are different. When the job is generated, the score is not determined and adjusted.(2)When determining the number of questions, considering that the examination time is limited, an appropriate number of questions should be arranged.(3)The purpose of adjusting test scores is to make the test scores more reasonable. Teachers can adjust the test scores slightly according to the difficulty of the test questions when the total score is 100.

Test paper is the process of making the selected test attributes meet these conditions according to the constraint conditions. Specifically, it can be understood that the test paper consists of test questions, and each question has 7 attributes to meet, which are represented by a matrix:

In the above matrix, each line represents a test question, and corresponds to the attributes in the test question attribute table, namely, question number , question type , chapter , difficulty coefficient , discrimination , test question score , and secondary knowledge point . The matrix should satisfy the following Jordan conditions:

Knowledge point constraint:

The test questions belong to the first knowledge point, the chapter points plus 1.

Question constraint:

According to the characteristics of the course of communication electronic circuit, the types of test questions are set as selection, filling in the blanks, short answers, and calculation. In the process of grouping questions, the structure of test questions is fixed. is used to represent, where is the number of different types of questions, and the calculating formula is

Total score constraint:

The total score of a test paper can be expressed as , and the default full score is 100.

Difficulty constraint:

The difficulty factor is expressed as

The problem of creating test paper is essentially a multiconstraint combinatorial optimization problem. Many constraints, such as question type, knowledge point, and difficulty, must be met in order to generate a reasonable and scientific test paper. These issues are intertwined. When creating test paper, different weights are assigned based on the importance of each attribute, in order to meet as many constraints as possible.

Define the overall error of the test paper, which is equal to the error value of each index multiplied by their weight value , and the final ideal result is that the error value is simplified to the minimum value problem of as much as possible, that is,

3.2.3. CC Resource Scheduling

The distribution, heterogeneity, and dynamics of CC resources determine the complexity of the CC resource scheduling system. Therefore, the research on cloud resource scheduling has become another key issue in the CC system. To solve the above problems, this study proposes a CC resource scheduling strategy based on the improved parallel genetic annual algorithm (IPGAA). Figure 5 shows the specific algorithm flow. It enables the CC system to dynamically formulate cloud resource scheduling solutions to meet the cloud resource requirements of different cloud users, while ensuring the response time of the CC system to cloud user requests.

According to the optimal solution scheme, cloud users can request effective scheduling of available cloud resources in the CC system, which makes the resources of the whole CC system be scheduled in a balanced way and effectively improves the efficiency of the whole system.

A virtual machine resource can be described by a sextuple, as shown in the following formula:

The type, represents the virtual machine's unique identifying number; represents the number of virtual CPUs in the CC system; represents the memory size of virtual machines in the CC system; represents the maximum bandwidth allowed by virtual machines in the CC system; represents the failure rate of virtual machines in the CC system; and represents the price of using virtual machines per unit time in the CC system.

According to the characteristics of resource scheduling in the CC system, this study proposes to encode the available cloud resources occupied by each cloud user's subtasks by indirect encoding. Figure 6 shows the coding method used in this study, and its specific coding scheme is as follows: the position number of each bit of chromosome indicates the number of cloud user subtasks; chromosome represents the number of available resources occupied by cloud user subtasks, which is represented by the positive integer value of each bit.

In Figure 6, represents the number of cloud user subtasks and represents the number of available cloud resources occupied when executing the cloud subscriber subtask .

The total completion time of all cloud subscriber request tasks running on a virtual machine is the virtual machine's cloud subscriber task execution time. As a result, the total completion time required to run all cloud user tasks in the entire CC system is equal to the maximum running time of all virtual machines running cloud user tasks, that is,

In the above formula, represents the time required to execute the -th cloud user task on the virtual machine with the identification number of ; represents the number of cloud user tasks running on the virtual machine labeled ; and indicates the total number of running virtual machines in the CC system.

The operation of the selection operator of the IPGAA algorithm proposed in this study is realized by roulette model; that is, the selection probability of each individual is proportional to the value of its fitness, and is used to represent the selection probability of individuals; then,

It should be pointed out that in the IPGAA algorithm proposed in this study, the crossover probability and mutation probability are dynamically changed, and the function and function are

The maximal fitness value of chromosomes in a modern evolutionary population is represented by type , which is a constant; represents the maximum fitness value of chromosomes in contemporary evolutionary population; indicates that the fitness of two chromosomes crossing in the contemporary evolutionary population is larger; represents the minimum fitness value of chromosomes in contemporary evolutionary population; represents the average fitness value of all chromosomes in the contemporary evolutionary population; indicates that the fitness of two chromosomes crossing in contemporary evolutionary population is small; and represents the fitness value of variant chromosomes in contemporary evolutionary population.

From the above analysis, it can be concluded that the IPGAA algorithm proposed in this study uses the indirect coding mode of “resource-task,” and the process of redistributing cloud resources occupied by cloud users' tasks corresponds to the process that chromosomes in the population are operated by crossover and mutation operators to generate new chromosomes in the IPGAA algorithm. Therefore, the IPGAA algorithm is adopted to solve the resource scheduling problem in the CC system, which combines the characteristics of both, and provides an effective method for the resource scheduling problem in the CC system.

4. Result Analysis and Discussion

4.1. Test Paper Generating Results and Analysis

In order to test the improvement of GA on the performance of generating test paper, the following groups of experiments were performed, each experiment was conducted 20 times, the successful running time was averaged, and the algorithm success rate and knowledge points were counted.

Experiment: 6 multiple-choice questions, 7 fill-in-the-blank questions, 8 short-answer questions, and 5 calculation questions, with a difficulty coefficient of 0.55. Chapters: all chapters, select all secondary knowledge points, and the amount of question bank: 600;

Experiment 2 : 12 multiple-choice questions, 14 fill-in-the-blank questions, 15 short-answer questions, and 10 calculation questions, with a difficulty coefficient of 0.55. Chapters: all chapters, select all secondary knowledge points, and the amount of question bank is 600.

Experiments were conducted 20 times, and the results are shown in Figures 7 and 8.

Figures 7 and 8 show that, while the GA takes much longer than a random algorithm to generate test papers under the same conditions, its success rate has greatly improved, especially as the number of test banks and questions grows larger. It is worthwhile to sacrifice time for system applications in order to improve the success rate.

4.2. Map/Reduce Model Performance Analysis

Due to the limitation of experimental conditions, one Hadoop distributed platform is selected as the main server, and the remaining seven are node servers. Make relevant verification under the Linux environment. This study gives full consideration to the computing performance of each different computing node, the distance between map tasks, and the distance between the node and the master node. Map/reduce considers load balancing, but balanced allocation cannot. By taking the first 10 tasks in an average of 20 tests, we compare the accuracy of data results retrieved by one map/reduce model and two map/reduce models, as shown in Figure 9.

While the secondary map/reduce classified storage ensures the time efficiency of tasks, its index retrieval effect in the secondary classified storage is obviously better than that in the primary map/reduce model. The reason for this is that the primary map/reduce has too much data and too many returned results, and the data results are often incomplete and inaccurate, resulting in a decline in users' interest.

However, the secondary map/reduce classified storage reduces the number of searches , improves the accuracy of returned results and the user satisfaction, and is more targeted.

4.3. Simulation Analysis

In order to prove the effectiveness and efficiency of the IPGAA algorithm proposed in this article, this article uses CC simulation tool CloudSim to conduct simulation experiments and chooses Cloudsim-3.0.2 version software. In the Cloudsim working model, cloud information service is responsible for allocating appropriate CC resources for user requests. Among them, the data center agent is responsible for the assignment of tasks to virtual machines. The virtual machine allocation control policy is responsible for completing the mapping between virtual machines and hosts. A virtual machine scheduler is an abstract class that implements host components and simulates the allocation and scheduling strategy of virtual machines.

This simulation is mainly an extension of DatacenterBroker, in which the IPGAA is introduced to realize the deployment of Task to the virtual machine.

There are tasks and virtualized resources . The experiment simulates two groups of resource scheduling scenarios: the first group simulates 20 resources and 30/70/100 tasks, and the second group simulates 30 resources and 30/70/100 tasks. When the population size is set to 300 and divided into 6 subpopulations, the size of each subpopulation is .

Through a large number of simulation tests, Figure 10 shows the specific experimental results. In Figure 10, the algorithm completion time and algorithm evolution algebra of the IPGAA algorithm are the average values obtained by running the algorithm 50 times.

It can be concluded from Figure 10 that when the number of cloud user tasks remains unchanged, for example, when the number of cloud user tasks , as the number of available cloud resources increases from 20 to 30, the completion time of the IPGAA algorithm decreases; when the number of cloud user tasks , with the increasing number of available cloud resources, that is, when the number of available resources increases from 20 to 30, the completion time of the IPGAA algorithm decreases greatly.

At the same time, Figure 10 shows that the number of cloud user tasks has increased from 30 to 70 and 100, and the algorithm completion time of the IPGAA algorithm shows an overall upward trend. However, the completion time of the algorithm did not increase exponentially with the number of cloud user tasks; on the contrary, it was a process in which the growth ratio was relatively reduced, which showed an optimization trend in essence. Similarly, when the number of available cloud resources is set to , a similar conclusion can be obtained.

Figure 11 lists the simulation execution results of the IPGAA algorithm under the conditions that the number of resources is and , and the number of scheduled cloud user tasks is .

It can be concluded from Figure 10 that when the number of available cloud resources is set to and the number of cloud user tasks is set to , the IPGAA algorithm converges to the global optimal solution around the 38th generation, and the solution of the average completion time of the IPGAA algorithm in each generation after the 38th generation is the same as that around the 38th generation. Therefore, it can be concluded that the IPGAA algorithm is convergent and has good stability.

When the number of available cloud resources is set to and the number of cloud user tasks is set to , the IPGAA algorithm converges to the global optimal solution when it runs to the 28th generation or so. And in the generations after the 28th generation, the solution of the average completion time of the IPGAA algorithm is the same as that in the 28th generation or so, and it can also be concluded that the IPGAA algorithm is convergent and has good stability.

In order to further verify the efficiency of the IPGAA algorithm proposed in this article, this article compares the IPGAA algorithm, simple GA algorithm, and simple simulated annealing algorithm, and compares the performance of these three algorithms in total task completion time and cloud user task completion dispersion. The performance comparison results of the above two aspects are shown in Figures 12 and 13.

It can be concluded from Figure 12 that for the total completion time of all cloud user tasks in the CC system, the final task completion time of three scheduling algorithms, that is, IPGAA algorithm, GA algorithm, and simulated annealing algorithm, is almost the same. However, compared with simulated annealing algorithm, the IPGAA algorithm shows that its convergence is better and faster.

This fully shows that IPGAA algorithm can not only get less total completion time of cloud user tasks, but also accept nonoptimal solutions with a certain probability, thus effectively avoiding local convergence caused by fast convergence of GA and greatly improving the performance of the cloud user task scheduling algorithm.

From Figure 13, it can be concluded that the convergence speed of the IPGAA algorithm is slower than that of GA because it can accept the nonoptimal solution of the IPGAA algorithm according to a certain probability.

In addition, the IPGAA algorithm can effectively prevent local convergence, and its final cloud user task completion dispersion is smaller than simple GA and simple simulated annealing algorithm. The smaller the dispersion of cloud user task completion, the higher the cloud user satisfaction, indicating that the IPGAA algorithm has achieved higher cloud user satisfaction than the other two algorithms.

5. Conclusion

Due to the closed, scattered, and uneven distribution of resources in the network examination system's application in enterprises, CC technology was introduced into the network examination system, which solved the problem of dynamic distribution of examination resources on demand, and successfully designed and implemented an online examination system based on CC. There were two subsystems created: online homework and online exams. The online homework module gives students the ability to do online practice and homework, which makes it easier for teachers to keep track of their students' homework and spot any leaks or gaps in their instruction. The IPGAA algorithm has better adaptability in the CC system with various cloud resources, as it introduces the basic idea of the genetic annealing algorithm, fully combining the fast global search ability of the GA and the local search ability of the simulated annealing algorithm.

Cloud technology requires a large number of users to participate, and privacy problems inevitably arise. Users' participation means collecting some user data, which leads to the worry about the safety of user data. Many users are worried that their privacy will be collected by cloud technology. For this reason, when joining the cloud plan, many vendors promise to avoid collecting user privacy as much as possible, and even if they do, they will not disclose or use it.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The author declares that there are no conflicts of interest.