Abstract

Using the NS2 network simulation tool to teach the “wireless network” course can enhance students’ understanding of wireless network protocols through visualization and can also improve students’ ability to analyze problems hands on. We built a multimedia wireless network modularized English teaching platform based on NS2 simulation software; made full use of the rich components and network resources provided by NS2 to achieve a high degree of code reuse and reduce the time for developing simulation codes; designed the overall framework of this multimedia wireless network modular English teaching platform based on the B/S structure; and solved the weight coefficient and importance value of the learning input evaluation index, based on the feedback elite teaching optimization algorithm, the improved teaching formula, the increase in the number of exchanges, and the improvement in the learner’s performance. The experimental results show that the LEACH and LEACH-C protocols of the clustered NS2 simulation software have more surviving nodes most of the time, which indicates that the clustering routing protocol has better performance.

1. Introduction

Modular-based teaching focuses on every student as an individual with respective specific propensity and interest. The goal of the module is to help every student to think on their own by allowing every student to have his/her individuality. The assessment of student learning primarily focuses on the knowledge and domain of learning in a particular domain. The learning applies to school- and college-level students. The learning methodology applies to the outcome received from the classification group. The best-designed modules are well versed and defined for learning results; still, they have potential towards failure where improvement policies are used to support the learners in a way in the context of the required learning outcome(s). The use of the package takes into account its special features and agrees that students perform it at their personal pace. This is the reason why individual learning is more at the individual pace (own). Independent learning is a type of learning where an individual is made to think of, autonomously act on, and persuade studies on their own. It is irrespective of the same level(s) of upkeep you take from a perspective teacher at the school.

The essential module components are the following:(i)Rationale: gives an overall description of the module with an explanation of whether the learner should study or not.(ii)Objectives: the desired results of the module. Normally, it is taken as a behavioral term or performance terminology.(iii)Entry test: determines whether a learner has got prerequisite knowledge skills required for entering into the module.(iv)Multimedia materials: an extensive range of media is utilized so that the learners may actively involve and utilize their intelligence.

The “wireless network” course mainly explains wireless network-related technologies, including introducing a large number of wireless protocols. After teaching practice, we found the following problems in the course of teaching [1]:(1)The content of the course mainly involves many network protocols and algorithms. The content of the protocol is relatively abstract and tedious. Generally, it can only be analyzed theoretically and cannot use experimental methods to gain perceptual knowledge. Although the slides in the teaching method can provide a specific animation effect, the effect on improving the teaching effect is not apparent.(2)Most of the network protocols and algorithms explained in the course are difficult to simulate under the traditional experimental environment or the cost is too high to affect the teaching effect. The technical content involved in the course is relatively new, the experimental equipment is expensive, and ordinary colleges and universities do not have the conditions for actual experiments. Even if a real network environment can be obtained, there are many influencing factors in this nonideal scene, and it is difficult for students to understand the real effects of various factors [2].(3)Traditional teaching methods often simply introduce the process of the agreement and the meaning of each field in the agreement, making it impossible for students to integrate the knowledge learned in various professional courses [3]. Students report that after the exam, they often only remember a few professional words and do not know the practical application of the course knowledge.

Using network simulation technology is an effective way to solve the above problems. Network simulation is to use computer technology to construct network topology and realize network protocol to simulate network behavior [4]. It can obtain specific network characteristic parameters and then conduct research and analysis on network performance. At present, the well-known network simulation software mainly includes commercial software, such as OPNET and QualNet, and open-source software, such as NS2. Among them, the free NS2 integrates a large number of typical wired and wireless network protocols at each layer. At the same time, NS2 has powerful secondary development capabilities and event-driven features that are scalable and easy to configure and program. It makes NS widely used in education and scientific research. In terms of education, the use of NS2, especially the animation demonstration of the Nam tool, can clearly and profoundly demonstrate the running process of the network protocol to the students.

Through NS2 teaching, students can intuitively see the behavior of network protocols, understand the impact of various environments or other factors on the network, and also understand the advantages and disadvantages of various strategies by comparing demonstrations and tracking simulation results. This article introduces the working principle and basic characteristics of NS2, summarizes the basic process of NS2 in “wireless network” teaching, and analyzes the advantages of applying NS2 in “wireless network” course teaching. It mainly focuses on the construction of a modular English teaching platform for multimedia wireless networks and gives typical teaching cases.

2. NS2 Simulation Software and Its Application in Wireless Network Teaching

NS2 network simulation software NS is a free software simulation platform with open-source code for network technology. Researchers can use it to easily develop network technology. And today, the modules it contains have been very rich, involving almost all aspects of network technology [5]. Therefore, NS has become a kind of network simulation software widely used in academic circles. Among the academic papers about network technology published at home and abroad each year, the most use of NS is to give simulation results, and the research results obtained by this method are also generally recognized by the academic community. In addition, NS can also be used as a teaching aid tool and has been widely used in the teaching of network technology.

In the process of teaching application, it is necessary to make full use of the characteristics of NS2, that is, making full use of the rich components and network resources provided by NS2. NS2 has provided various network protocol components from the MAC, data link layer to the application layer, and only a slight modification can meet the teaching of various protocols and network concepts in the current network teaching. In addition, on the Internet, the majority of NS users provide a large number of simulation examples, some of which can even be used directly for teaching. The object-oriented characteristics of NS should be fully utilized to achieve a high degree of code reuse and reduce the time for developing simulation code [6]. The specific steps of applying NS2 network simulation software in the teaching of “wireless network” are as follows:(1)Install NS2. NS2 was developed on UNIX systems, so the best platform for installing NS2 should be UNIX and Unix-like systems. Of course, NS2 can also be installed and run under the Windows system. Install a Linux-like platform Cygwin in the Windows system, and then install NS2 and its related extended protocols on Cygwin.(2)Seriously analyze the difficulties and key issues in the course teaching, and study the ways to facilitate students’ understanding. For example, when introducing the concept of packet switching, Nam animation is used to demonstrate the network operation process; when introducing ad hoc routing protocol, rationally design different simulation data (different link bandwidth, delay and loss strategy, etc.) and different protocols for simulation. Then, use the chart tool to analyze the simulation results and illustrate the performance, advantages, and disadvantages of different protocols in different network environments in a graphical manner.(3)Before the simulation, we must first analyze which level the simulation involves. Corresponding to the split object model of NS2, NS2 simulation also has two levels: one level is based on Otcl programming, through Otcl script programming, using existing NS2 elements to achieve simulation without modifying the kernel source code of the NS2 platform, which is easier to implement, and the other level is programming based on C++ and Otcl, that is, using the interface of Otcl and NS2, writing C++ programs, and then recompiling NS2 to add new functions. For example, adding a new protocol module to achieve the simulation of new functions, this level of simulation is more difficult [7].The NS2 network simulation process is shown in Figure 1.(4)Write Otcl scripts. There are many protocols involved in the “wireless network” course, and the simulation code writing workload is very large. To improve efficiency, you can make full use of the modular features of Otcl scripts. First, write a script template, and other simulation codes can be modified under this template. It is also convenient for students to refer to when doing experiments [8].The Otcl script template of a wireless network is generally divided into the following steps:(i)Configuration scenarios: network topology diagram, transmission event file, node movement file(ii)Create simulator objects and topology map objects and specify trace files(iii)Create an object(iv)Node configuration: specify each layer protocol, tracking method, and so on(v)Create a node: specify the node address, physical location, and so on(vi)Define agent(vii)Connect the node and its agent, connect the agent and transmission type, and connect the agents of both parties(viii)Start to transmit data(ix)Determine the start and stop time of the event(x)Run NS simulation(5)Use awk, gnuplot, xgraph, and other tools provided by NS2 to analyze the data generated by the simulation. Usually, in NS2 simulation, the main focus is on the statistics of communication and data packet loss. The meticulous design of typical simulation statistics plays a very important role in teaching. Through examples, we can understand the teaching effect of simulation design and at the same time improve the students’ ability to observe and analyze problems [9].

NS can simulate various IP network environments and realize the simulation of many network protocols, such as TCP, UDP, and data source generators (e.g., FTP, WWW, Telnet, Web, CBR, and VBR). NS can also simulate routing queue management mechanisms, such as Drop Tail, RED, and VBR, and implement Dijkstra and other routing algorithms [10]. In addition, NS can implement multicasting and some protocols that simulate the MAC layer of the LAN. NS2 is implemented by two programming languages, C++ and Otcl.

As the network module of the data exchange center, its main function is to simulate the network environment. The most important factor that the network environment has on the networked control system is the network data delay caused by various network parameters. Therefore, the network environment simulation not only needs to consider the simulation of network delay but also the simulation of network performance such as network bottleneck and network routing.

From the point of view of the mathematical model, the network module is a pure lag link . After the input u(t) passes through the pure lag link, the output is y(t); then, . If T is the calculation step size, , the input and output characteristics of the delay link can be written as

The method of illustration is used as shown in Figure 2.

3. Multimedia Wireless Network Modular English Teaching Platform

3.1. The Overall Framework of the Teaching Platform

The application of the B/S structure simplifies the client software. It only needs to install a browser on the client to send a request to the server through the protocol. The rest of the development, maintenance, and upgrade work is concentrated on the server-side, reducing application development costs and management costs [11].

The advantages of the B/S structure are embodied in the following aspects. As long as the browser is installed on the client, the request can be sent to the server through the protocol. And all development, maintenance, and upgrade work are concentrated on the server side, you only need to update the business logic of the server side, and you do not need to change the client side. The entire software development can be concentrated on the server-side, and the user side does not require special settings and software installation, which greatly reduces maintenance costs [12]. Because the client of the B/S mode only installs the browser software, the browser software provides a unified, friendly, and easy-to-use interface, and users can use it directly without training. It realizes the connection isolation between the client and the database server, and no user can directly operate the database server across the application server. At the same time, the application server provides services such as authentication, authorization, and encryption, which has high security and prevents illegal users from accessing unauthorized data through transaction logic. All the functions of B/S are on the webserver, which greatly reduces maintenance work. At the same time, it is not necessary to develop different versions of client programs for different hardware and software environments [13]. Any browser can be used on the front end, any database can be used on the server-side, and any scripting language can be used in JSP.

In summary, based on the B/S structure design, the overall framework of this multimedia wireless network modular English teaching platform is shown in Figure 3.

The microprocessor in the system adopts STM32F produced by Texas Instruments, which adopts advanced ARM Cortex®-M0, M0+, M3, M4, and M7 cores, and the working speed can reach 1GHz. The SMJ320VC33HFGM150 memory chip produced by the German Instrument Company is used as memory. The memory is made of 0.72 μm double-layer metal CMOS technology, a built-in SQLite relational database system, and a huge storage space and can load a large amount of data. The programmer selected in this system is PIKprog2 produced by Xierte Electronics Co., Ltd. This tool can automatically complete the entire process of chip grabbing, placing, programming, fetching, and packaging [14, 15].

In the B/S system mode, generally speaking, the operation is on the browser side, and a large number of calculation and processing tasks are placed on the server-side, and various instructions are sent through the browser side (B) to the server-side (S). The server (S) returns the result to the browser (B) after a lot of calculation processing. The three-layer structure under the B/S system is mainly logically divided into a presentation layer, a function layer, and a data layer, as long as the main purpose is high cohesion and low coupling [16]. Under the browser/server three-tier architecture (see Figure 4), the presentation, business logic, and data service are divided into three relatively independent units. The first layer (presentation layer) is the web browser. The second layer (functional layer) is the web server with application extension functions. The third layer (data layer) is the database server. Design various functional modules on this basis. The structure diagram based on browser/server is shown in Figure 4.

Among them, the input indicators of learning behavior mainly include attendance rate, interaction rate, participation, and learning time. Affective input index mainly refers to the degree of interest of learners in college English learning, while cognitive input refers to students’ cognition of some knowledge points in English teaching. Table 1 shows the specific settings of evaluation investment indicators under learning investment.

3.2. Student Performance Analysis

Suppose that the set learning input evaluation index is represented by a sequence , each of which is processed by uniformity and dimensionless processing, and the number of learning input evaluation indexes is set as m. Use the analytic hierarchy process to calculate the weight value of the indicator, first select the most important indicator from the indicator sequence, and then select the most important indicator from the remaining indicators. Repeating the above process, when there is only one indicator left in the learning input sequence, a unique indicator sequence relationship can be obtained. Suppose the importance of the learning input evaluation index is close to , and at the same time, the definition represents the probability distribution vector corresponding to the index. Then, the importance of the learning input evaluation index can be calculated as follows:

Based on the calculation result obtained by formula (2), the weight coefficient of each learning input evaluation index can be calculated. The specific calculation method is shown as follows:

Solve the weight coefficient and importance value separately, and substitute each set index parameter into formulas (2) and (3) to get the calculation result of the index weight value.

In order to better carry out the teaching work of teachers, an elite teaching optimization algorithm (ETLBO) is adopted, but this algorithm not only has a slow convergence speed but also has low optimization accuracy and poor stability. For this reason, in the software design part of this system, the algorithm is improved, and a feedback elite teaching optimization algorithm (FTLBO) is proposed. The analysis is carried out in two parts as follows:Part 1: elite teaching optimization algorithm (ETLBO).The results of each student are expressed as follows:Among them, is the total number of subjects.Assuming that the number of participants on the platform is , the initialization isAmong them, and are the upper and lower limit vectors of the score, respectively, and is a random number between 0 and 1.(1)In the teaching phase, all students learn from the teacher. The class and the teaching process ( times) are as follows:Among them, is the score of the best individual (teacher), and is the average score of the class. If the score after learning is better, it is updated; otherwise, it is unchanged. Teaching factor is(2)In the learning stage, each student, such as student , randomly selects a student to learn from. The iterative process isIf the result after the study is better, update it; otherwise, it will not change.(3)Elite strategy: replace students with poor grades with students with good grades, thereby eliminating those with poor grades.The second part: the improvement of elite teaching optimization algorithm-feedback elite teaching optimization algorithm (FTLBO).

3.2.1. Independent Study

In the learning process, outstanding students will learn the knowledge of various subjects independently in the after-school time, with a learning step of :

Among them, is the performance improvement rate per unit time.

3.2.2. Differentiated “Help” Strategy

Divide students into three levels and then provide assistance from top to bottom. The strategy formula is as follows:

Among them, is the adaptive step size, which enables the algorithm to flexibly adapt to the fluctuation of the optimal value and improve the algorithm’s global optimization capability:

Among them, , , and are the optimal fitness values of this iteration.

Substituting the hierarchical adaptive factor into equation (14), the improved teaching formula can be obtained as

3.2.3. Exchange Feedback

Learning communication only occurs between some people. According to the probability (rand), students and are randomly selected to improve the learner’s performance by increasing the number of exchanges:

Among them, is a -dimensional random sampling matrix.

In summary, based on hardware and software, make full use of the rich components and network resources provided by NS2 to achieve a high degree of code reuse and reduce the time for developing simulation code. Based on the B/S structure, design the overall framework of the multimedia wireless network modularized English teaching platform in this article. Solve the weight coefficient and importance value of the learning input evaluation index, based on the feedback elite teaching optimization algorithm, the improved teaching formula, the increase in the number of exchanges, and the improvement in the learner’s performance.

4. NS2 Application Examples in Wireless Network Teaching

4.1. Test Object

The test subjects selected 2020 freshmen from a university, and 2680 candidates with the test paper number LAxx002 were selected as the diagnostic subjects. Candidates come from liberal arts, sciences, and engineering, including 1,502 boys and 1,178 girls, aged between 18 and 20.

4.2. Descriptive Statistics

According to the students’ scores in the reading section, the test takers’ reading scores are converted into grades according to the score-level conversion standard (Table 2). As can be seen in Table 2, the reading volume score (0, 30) can be converted into 11 levels. Students of the 010-025 level are classified into C-level class (beginner), those of the 030-040 level are classified into B-level class (intermediate), and those of the 045-060 level are classified into A-level class (advanced) for classified teaching.

Table 2 lists the statistics of the number of candidates at each level. It can be seen from the table that the total scores of candidates are mostly concentrated in the two score segments (13, 15) and (16, 18), corresponding to the 035 level (20.61%) and the 040 level (16.52%).

Use the SPSS statistical package to perform a descriptive statistical analysis of the overall reading scores of the students, as shown in Table 3. The results show that the sample size of this batch of candidates is large (N = 2682), and the sample distribution is wide (range = 28), and there are large differences between individuals (Std. = 4.92), with certain coverage and representativeness, and the overall reading ability of the sample is better (mean = 15.79, mode = 15). In addition, by observing the histogram of the total score distribution (Figure 5) and the normal Q-Q probability map (Figure 6), it can be seen that the overall reading score distribution of the students deviates slightly from the normal distribution line. The skewness index is −0.174 (less than −1), showing a slight negative skewness. The histogram of the total score distribution is shown in Figure 5. Reading the normal Q-Q probability graph of the total score is shown in Figure 6.

It can be seen from Figures 5 and 6 that the traditional total score distribution presents a normal distribution. The larger the total score difference, the better the statistical result. There is no specific requirement for the total score distribution of the recognition test. Therefore, the negative skewness of the total score has no effect on the cognitive diagnosis analysis. The above analysis results show that the sampling of this experiment is more reasonable.

4.3. LEACH Protocol Performance Analysis

The author of the LEACH protocol has published the NS2 simulation source code of the protocol on the Internet, and we can download and use it freely. The simulation source code also implements minimum energy transfer protocol (MTE) and static clustering protocol using the simulated annealing algorithm (LEACH-C). We run the simulation and analyze the simulation results. Figure 7 shows the curve of the total energy consumption of all nodes in the simulation over time. Total energy consumption, that is, the sum of energy consumed by all nodes in the network, includes energy consumed in various stages such as sending, receiving, sensing, and data fusion. It can be seen that the total energy consumption of the clustered LEACH protocol and LEACH-C protocol is significantly better than that of the MTE protocol. Figure 8 shows the curve of the number of surviving nodes in the network over time. It can be seen that the network using the clustered LEACH protocol and LEACH-C protocol has more surviving nodes most of the time, which shows that the performance of the clustered routing protocol is better.

5. Conclusion

The “wireless network” course teaching has some shortcomings, such as boring content and complex experimentation. The NS2 network simulation tool is used to teach the “wireless network” course. It can enhance students’ understanding of wireless network protocols more intuitively and vividly and improve students’ ability to analyze problems and practice. This article uses the network simulation tool NS2 as a teaching aid to construct a wireless network simulation teaching environment. It is a brand-new exploration of the “wireless network” course teaching and has a positive meaning for improving the teaching effect of the “wireless network” course. Innovations of the author of this article: this article uses the network simulation tool NS2 as a teaching aid to construct a wireless network simulation teaching environment and summarizes the basic process of NS2 in “wireless network” teaching. Analyzing the advantages of applying NS2 in “wireless network” course teaching is a brand-new exploration of “wireless network” course teaching. By applying this network platform, it is possible to highlight further the characteristics of “teachers as guides in teaching activities and students as explorers”; to enable students to explore the world under the guidance of teachers, constantly reflect on themselves in constructing the cognitive world, and think critically about individual roles and problems in learning; and to stimulate students’ learning initiative, achieve the goal of training students’ comprehensive language skills, and cultivate their logical thinking and independent thinking ability.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.