# The Optimization of Classroom Teaching in Colleges and Universities Based on Network Topology

Authors: Yongqiang Wang; Na Zhang
Journal: Scientific Programming
 (2021)

---

## Abstract

In order to improve the teaching effect of programming courses, this article applies network topology to the construction of programming course teaching platform system and constructs a teaching framework combined with intelligent teaching mode. In addition, this article takes the opportunistic social network composed of mobile smart terminal devices as the application background and briefly introduces the concept, characteristics, and application scenarios of the opportunistic social network. In addition, the typical message forwarding algorithm currently studied in this paper is analyzed. Taking into account the social attributes and forwarding willingness of nodes, in order to increase the message transmission rate and reduce message transmission delay and network overhead, two message transmission strategies are proposed to improve the operating effect of the programming course teaching platform. Finally, this paper verifies the effectiveness of the network topology in the teaching of the algorithm and programming of the intelligent teaching mode through experimental research.


---

## Body

## 1. Introduction

In the information age, the widespread application of Internet and other network technologies has caused tremendous changes in the way of teaching and learning. Moreover, various new teaching methods using microclasses, microvideos, and MOOCs as the media are gradually taking shape, and new learning methods such as personalized learning, mobile learning, and flipped learning are gradually becoming popular. As the main place for imparting knowledge and skills and cultivating quality talents, schools must comply with the requirements of education informatization. At the same time, key changes have taken place in the development of teachers’ curriculum, the establishment of education and teaching models, the update and delivery of learning materials, and the way students learn. This is a response to the development trend of the times and an inevitable requirement for the development of education [1].As a new type of teaching form to promote teaching performance, the flipped classroom mode is the key to efficiently flip educational elements such as teaching concepts, teacher and student roles, teaching methods, and evaluation methods [2]. That is, before class, students watch the learning videos independently and complete knowledge transfer, and in class teachers and students conduct discussions and exchanges, conduct collaborative exploration and internalize knowledge, and evaluate and reflect after class, and provide timely feedback. It reverses the traditional teaching model, reshapes the role of teachers and students and the relationship between teachers and students, highlights the dominant position of students, improves learning enthusiasm, and improves teaching effect and quality [3].Object-oriented programming course is a very important language practice course learned by computer majors. This course focuses on cultivating students’ ability to solve practical problems independently through algorithm design and is highly professional and practical. With the development of Internet technology, the requirements for students’ object-oriented programming have gradually increased, but there are still many problems in the classroom teaching of programming courses. The above-mentioned problems will seriously affect the teaching effect, deviate from the teaching goal of the programming design course, and cause the quality of training students to decline. Therefore, we reform the programming curriculum and traditional teaching mode by adopting the MOOC-based flipped classroom teaching concept. At the same time, we make full use of MOOC’s rich and high-quality online resources while flipping the main role of teachers and students in the classroom and pay more attention to the interactive process and feedback of classroom teaching, to further optimize the teaching quality and effect of programming courses [4].Since most students ignore the review of the class, the teacher will pay more attention to the teaching of basic grammar knowledge in the classroom teaching of the program design course and lack the training and concern for students to solve problems. Most teachers believe that students can make students master the concept, grammar, and knowledge points and then practice the teaching objectives of the course in accordance with the experimental guidance in the experimental course. But in fact, this kind of teaching does not enable students to really internalize in the early stage of classroom and absorb the knowledge points. In the next year, secondary students can not flexibly use knowledge points to solve practical problems.The teaching resources of program design courses are still based on textbooks and experimental guidelines, lacking students’ way to explore, practice, and solve problems. The final exam of the programming course is due to the paper test, so the form of assessment is mainly based on the theoretical knowledge, ignoring the essence of the programming course. As long as the assault review before the exam, you can get a high score, and practice and practice. The ability is not significantly improved. Therefore, the traditional teaching model of the reform program design curriculum, enriching teaching resources, improving students’ learning energy and learning efficiency, has become an important research topic in teaching reform.This article combines the social cognitive network to optimize the flipped classroom teaching mode of programming courses and combines the information transmission improvement algorithm to improve the transmission efficiency of teaching resources and further enhance the flipped classroom teaching effects of programming courses.


## 2. Related Work

With the development of a large number of online social networks at home and abroad, related research on online social network analysis and mining has attracted great attention from scholars at home and abroad. In today’s society, due to the prevalence of social software, social network applications have had a significant impact on people’s clothing, housing, and transportation.People pay more and more attention to large-scale network graph data compression technology. Literature [5] proposed a technique for compressing the original image when it is divided. However, it is still not very good to meet the requirements of fast query. Literature [6] proposed a dictionary-based compression method. This method is to compress web page data. It sorts the URLs in the web page graph in lexicographical order. Since URLs that are close in sequence often contain similar neighbors, using this property can achieve a better compression effect. However, due to general social network graph data, nodes often do not have dictionary attributes, and the compressed places cannot be found in lexicographic order. Literature [7] proposed an FRS algorithm, which defines a social network data node rearrangement technology to achieve the purpose of node rearrangement and then achieve the purpose of compression. Literature [8] proposed BFS-based technology, which also uses the rearrangement method of nodes and uses the difference between adjacent rows in the adjacency table after sorting to store graph data, so as to achieve the purpose of compression. Literature [9] proposed a multipoint linearization of neighborhood query, which uses some data structures to achieve compression purposes, such as quadtrees. Literature [10] showed that the data in the actual graph in reality has the characteristics of power law distribution. Using this feature, literature [11] used the structural equivalence method to transform the points and edges in the original graph into structures with equivalent meanings to achieve the purpose of compression. Literature [12] proposed a method based on attributes, nonoverlapping, and covering node groups to achieve the purpose of compression. The above method considers the problem of thinking from the perspective of how to reduce the size of the original image data and does not consider what content will be lost due to the reduction of the scale and how much impact it will have on the perception of the original image.Graph aggregation is very important in many fields, but at present, there is relatively little research and analysis work on the basis of graph aggregation. The definition of graph aggregation is to discard some noncritical information in the original graph data and reconstruct a similar simple graph to achieve the purpose of easily analyzing the original graph. In this way, intuitively speaking, it introduces some uncertain factors in the data. For example, when accurate query is required, due to the loss of additional information, there is a certain degree of uncertainty for the query results [13]. Literature [14] developed an algorithm to understand large-scale graph data through graph aggregation, which found key structures in graph data. Although the algorithm can find these key structures, it is found through experiments that the structure found by the algorithm is not completely accurate. For example, in the actual graph data, it should be a clique structure, but the algorithm recognizes multiple star structures. This is because the algorithm does not consider the relationship between the words in the proposed graph vocabulary dictionary, which leads to errors in the final recognition of key structures. At the same time, the algorithm only applies to static large-scale graph data, not to large-scale social network graphs, and has no evolutionary research.Literature [15] found in teaching practice that when students encounter problems in classroom learning, teachers need to give students targeted help or guidance instead of imparting systematic knowledge in the classroom. As a result, it changed the way of knowledge transfer in the classroom and allowed students to watch the recorded teaching videos before class and answer questions and tests in the classroom and provided students with learning tasks to promote students to complete the internalization of knowledge. Subsequently, based on the practical reflection on flipped teaching, literature [16] proposed new concepts such as flipped classroom, mastered classroom, and flipped learning. Moreover, it emphasized that flipped classroom is only an entry point for teaching innovation, rather than a goal or end point. From flipped classroom to mastery classroom, the ultimate goal is flipped learning. Literature [17] mentioned that the top students have a high degree of participation in classroom activities under the traditional teaching mode, while the diligent middle school students have equal opportunities to participate in classroom activities under the flipped classroom mode. Therefore, flipped classroom teaching can ensure that more students participate in classroom teaching activities. Literature [18] constructed a flipped classroom teaching model and conducted experimental demonstrations.


## 3. Flipped Classroom Network Model of Programming Courses

This article defines the network topology including the connected graph composed of nodes and links, which isG=(N, L). Among them, N represents the set of all nodes in the network, and N=N1,N2,…,Nmm≥1, ∀Ni∈N, and Ni represents the i-th node in the opportunistic social network, L represents the set of communication links between nodes, and L=L1,L2,…,Lkm≥1 , k∈0.nn−1/2, ∀Li∈L, and Li represents the i-th communication link in the network.Node activity represents the number of times a node has encountered other nodes in the community in a period of time, denoted as NAi. Among them, Cij represents the number of times that the node Ni and the node Nj meet in the period T, and the calculation formula is shown in the following equation [19]:(1)NAi=∑j=1,j≠imCij.The larger the value of∑j=1kMi,jt, the higher the activity of the node, and the greater the probability that the node leaves the local community, indicating that the node encounters other community nodes more frequently in the current time period.The frequency of encounters refers to the ratio of the total number of encounters between nodei and node j in the time period t to the total number of encounters between node j and other nodes from the initial state, namely,(2)Pi,j=Mi,jt∑j=1kMi,jt.Among them,Mi,jt represents the total number of encounters between node i and node j during message forwarding in the time period t in the network, ∑j=1kMi,jt represents the total number of encounters between node i and other nodes in the network, and k represents the number of nodes in the network.Encounter probability estimation: Encounter probability estimation refers to the probability of meeting between two nodes in the next time period based on the historical information of the nodes and the network environment without contact.In order to predict whether two nodes will meet within a specific time Tc, it is predicted whether the node will meet other nodes within the next time Tc since the previous timeT they met, that is, whether the current encounter time interval is shorter than Tc + Tl.(3)Pcp=PIl<Tc+T1.It can be seen fromTc + Tl that the entire problem has been transformed into an estimate of the current time interval It, and the waiting time is Tl, so Il≥Tl and(4)Pcp=PIl<Tc+T1|Il≥Tl.Through the conditional probability formula, we can get(5)PIl<Tc+T1|Il≥Tl=PIl<Tc+T∩Il≥TPIl≥T.From formulas (3)–(5), we can get(6)Pcp=fTl<I<Tc+Tlf<lI.In formula (6), the function f(x) represents the encounter frequency of x, and the encounter frequency is reflected by historical encounter information. In short, historical information can be used to estimate the probability of encounter.Bayesian probability: It is an interpretation of the proposition probability proposed by Bayesian theory and the process of estimating the posterior probability through prior historical information.The Bayesian probability between the node and other nodes is calculated by the following formula [20]:(7)Pik|j=PikPj|ik∑k=1zPikPj|ik.Among them,i1,i2,i3...in...iz represent the number of nodes existing in the network, and k represents the number of historical encounter nodes of node i.When the node message is forwarded, the source node determines the prior probabilitiesPik|j=PikPj|ik/∑k=1zPikPj|ik and Pj|ik through historical encounter data, then calculates Pik|j using formula (7), and determines the probability of encountering the node with other nodes through comparison. The source node can use a variety of probabilities of encounter to determine, thereby improving accuracy.Because the mobile nodes in the opportunistic social network are dynamic and social, the smart device nodes that make up the network are divided into different communities, which are intracommunity and intercommunity methods. The nodes belong to the same community, and the nodes are closely connected, and the number of encounters is high. Between communities, because nodes encounter fewer times when forwarding messages, the probability of encounters is also reduced.After dividing different communities according to the social attributes of the node, the node represents the individual carrying the mobile device, the edge where the node is located represents the social relationship between the mobile device carriers, and the weight of the edge represents the strength of the social relationship between the mobile device carriers. The nodes in the network are divided according to the above method, and the result is shown in Figure1 [21].Figure 1
Results of community division.A single copy mechanism is used in many messaging methods and the forwarding or reception of the message directly when the node and nodes meet. In this case, there is no better encounter opportunity during forwarding. In order to solve the above problem, this paper proposes a method of selecting a Bayesian probability tree forwarding node selection method. This method combines the source node to the probability of the income node and the Bayesian probability between the nodes to select the next forwarding node. In addition, the node carries the node as the root node of the tree, and the node encountered by the node as the second- and third-level nodes of the tree. The Bayesian probability value satisfying these nodes is located on the side where the two nodes are located, and the contents of the tree node indicate that the message is successfully delivered by each node to the target node.This paper mainly contains nodes I, A, B, C, andD in a network, as shown in Figure 2(a) below. Node i stores the generated message and forwards it to the target node J, which meets node A at a certain time T0; if it only depends on the probability of transmitting the message and the node, it will not be determined; send it to the node A and consider the next chance. Whether to send a message to the next node α is determined according to the BFANS algorithm, as shown in Figure 2(b) below. In this case, the transmission probability size of the root node and the value of the Bayesian probability condition satisfying the node are obtained, and finally the probability value is encountered with the node. In case of the node, after encountering the node A, the probability of multiplying the node B by the B node to the target node J probability is higher than the transmission probability of the node I to A, and the node i stores the message after the node A is encountered. Node I hopes to meet the node B; repeat the above steps until the target node J meets and forwards the message.Figure 2
The generation process of Bayesian probability tree. (a) Network situation. (b) Bayesian probability tree.
(a)(b)The application scenario of opportunistic social network is shown in Figure3. Under the premise that there is no end-to-end transmission path between node S and node D, the source node S wants to send a message to the target node D. In this case, the message needs to be forwarded with the opportunity of encountering other nodes in the network. Therefore, node S will select an intermediate node from a group of neighbor nodes (Nq), so that the message is finally transmitted to node D through multihop communication. We assume that S chooses node N, and N forwards the message to N because there is no other neighbor node to forward it. However, node N exhibits selfishness due to resource constraints such as storage and energy and discards the message instead of forwarding it to node D. Due to resource constraints, it is difficult to detect the selfish behavior of nodes in the opportunistic social network, which reduces the message delivery rate and extends the transmission time.Figure 3
Application scenarios of opportunistic social networks.Before analyzing specific problems, we first give the relevant assumptions of the system model:(1)
The network connectivity graph isG=V,E, where V represents the set of all nodes in the network, and E=e=u,v|u,v∈V represents the set of node edges. The network G can be represented by a matrix A of size V×V, and the value of A is as follows [22]:(8)AI,J=1,ei,j∈E0,ei,j∉E.(2)
Nodes in the network are rational and selfish nodes; that is, nodes misrepresent their own information in order to maximize benefits, rather than misrepresenting other information.(3)
For other nodes in the network except the target node, the node has only two choices: forwarding or discarding.In opportunistic social networks, location changes often occur according to the mobility of nodes. In order to predict the meeting position of the nodes, the calculation model based on the distance prediction of the nodes first calculates the angle formed by the moving speed of the nodes and the distance between the nodes. Secondly, the moving position of the node at the next moment is predicted and the distance is calculated. Finally, the Merkle hash tree is used to detect the existence of selfish nodes, and the best forwarding node is selected to complete the message forwarding through the node cooperative forwarding mechanism.Encounter distance calculation: The moving speeds of the carrying node C, the neighbor node N, and the target nodeD are Vc⟶, Vn⟶, and Vd⟶, respectively, and the angles formed by the node C, the neighbor node N, and the target node D are ωc and ωn, respectively. The calculation process is shown in formulas (9) and (10) [23]:(9)cosωc=cos<Vc⟶,Vd⟶>=Vc⟶·Vd⟶Vc⟶Vd⟶,(10)cosωc=cos<Vn⟶,Vd⟶>=Vn⟶·Vd⟶Vn⟶Vd⟶.Among them, the angle calculation ofωc=cos−1Vc⟶·Vd⟶/Vc⟶Vd⟶ and ωn=cos−1Vn⟶·Vd⟶/Vn⟶Vd⟶ is shown in Figure 4, ωc represents the angle formed by the moving speed of the node carrying the message and the target node, and ωn1, ωn2, and ωn3 represent the angle formed by the moving speed of the neighbor node to the target node, respectively.Figure 4
Calculation of the included angle of node moving speed.Average speed indicates the ratio of the distance between the previous position of the node and the current position in timeΔT. The previous position of node C is represented by coordinates (c0x;.coy), the current position is (cx, cy), and the previous position of node N is (n0x, n0y), and the current position is (nx, ny). The calculation process of the average speed of node C and node N is shown in formulas (11) and (12):(11)Vc¯=cx−c0x2+cy−c0y2ΔT,(12)Vn¯=nx−n0x2+ny−n0y2ΔT.Encounter distance indicates the distance between the node’s moving position and the current position at the next moment in timeΔT. The positions of node C, node N, and node D at the next time are (c1x, c1y), (n1x, n1y), and (d1x, d1y), respectively. Among them, (d1x, d1y) represents the sum of the distance from the current position and the distance moved at the next moment, which is calculated by formula cx+ΔT×V0x¯,cy+ΔT×V0y¯ and formula nx+ΔT×V1x¯,ny+ΔT×V1y¯.(13)Lc=d1y−cy+ΔT×V0y¯2+d1x−cx+ΔT×V0x¯2,Ln=d1y−ny+ΔT×V1y¯2+d1x−nx+ΔT×V1x¯2.The Merkle hash tree is a binary tree that maps a set of nodes to a set of fixed-size strings, as shown in Figure5. Among them, each leaf node carries a given value, and the value of internal nodes including the root node is obtained by hashing of two child nodes, and a Merkle hash tree is constructed according to the data packets carried by the node and the distance of encounter.Figure 5
Example of Merkle hash tree.Among them,η∈0,...,2H−1,H≥1 represents the index value stored by the leaf node, and H ≥ 1 represents the height of the Merkle tree. The hash value stored by the node is represented by yhi, where h=0,...,H represents the height of the node in the tree (the height of the leaf node is 0, and the height of the root node is H), and i=0,...,2H−h−1 is the position count of the node from left to right. f:0,1∗⟶0,1n is the hash function, and the hash value of the leaf node is calculated by the function f, where ⊗ represents the connection operation, and the hash value of the nonleaf node in the Merkle tree is calculated as shown in the following formula:(14)yh+1i=fyh2i⊗yh2i+1.We assume that the source node and the target node are legitimate nodes, and the relay node is selfish. The Merkle hash tree creates the first level of the tree by hashing the number of messages, and the value of the nodes hashed in the first level becomes the leaf hash. After that, every two leaf hashes are paired and hashed to create a new hash value, until a hash value is finally created, and this node becomes the Merkle root node (y3[0]), as shown in Figure 6.Figure 6
A Merkle tree containing 8 messages.In the opportunistic social network, the Merkle hash tree will be used to check whether there is a message loss during the forwarding process between the source node and the target node. If a message is removed, its parent node will change. Once the parent node changes, it will cause the root hash value of the entire Merkle tree to change. The source node embeds the Merkle root in the head of each message and sends it to the target node through the intermediate node, as shown in Figure7.Figure 7
The embedding root node to the forwarding node.The algorithm in this paper is compared with the traditional Epidemic and Prophet algorithms in terms of message delivery rate, average delay, and routing cost ratio. The definitions of the three indicators are introduced below.


### 3.1. Message Delivery Rate

The message delivery rate refers to the proportion of the total number of messages that can successfully reach the target node to the total number of messages sent by the source node. The calculation formula is(15)Dratio=RS.In this formula,R represents the total number of messages successfully sent to the target node, and S represents the number of messages that the source node has sent to the target node.


### 3.2. Average Delay

The average delay is the ratio of the total time of messages sent by the node to the total number of successfully reaching the target node. The calculation formula is(16)T¯=∑i=1TiR.Among them, Ti represents the message transmission delay for the i-th node to send a message to the target node within timeT, and R is the total number of messages successfully reaching the target node.


### 3.3. Routing Cost Ratio

It represents the ratio of the total number of messages that the node fails to reach the destination to the total number of messages that successfully reach the destination under the conditions of the experiment. The calculation formula is(17)Rratio=∑j=1nSi−RR.Among them,Rratio represents the routing cost ratio of the message forwarding process, and ∑j=1nSi represents the total number of messages sent by the source node to the destination node.


## 3.1. Message Delivery Rate

The message delivery rate refers to the proportion of the total number of messages that can successfully reach the target node to the total number of messages sent by the source node. The calculation formula is(15)Dratio=RS.In this formula,R represents the total number of messages successfully sent to the target node, and S represents the number of messages that the source node has sent to the target node.


## 3.2. Average Delay

The average delay is the ratio of the total time of messages sent by the node to the total number of successfully reaching the target node. The calculation formula is(16)T¯=∑i=1TiR.Among them, Ti represents the message transmission delay for the i-th node to send a message to the target node within timeT, and R is the total number of messages successfully reaching the target node.


## 3.3. Routing Cost Ratio

It represents the ratio of the total number of messages that the node fails to reach the destination to the total number of messages that successfully reach the destination under the conditions of the experiment. The calculation formula is(17)Rratio=∑j=1nSi−RR.Among them,Rratio represents the routing cost ratio of the message forwarding process, and ∑j=1nSi represents the total number of messages sent by the source node to the destination node.


## 4. Optimization of the Flipped Classroom Teaching Mode of Programming Courses Based on Social Cognitive Network

In this paper, the optimization analysis of the flipped classroom teaching mode of programming courses is carried out by transferring part of the cognitive network. In the teaching process, students should be guided to understand the relationship between the core concepts and key capabilities of this chapter. The relationship between the core concepts and key capabilities of “Algorithm and Program” is shown in Figure8.Figure 8
The relationship between the core concepts and key capabilities of algorithms and programs.On the basis of sorting out and analyzing the research of the flipped classroom model, according to the particularity of the information technology curriculum and the specific situation of the school, this paper designs a three-stage flipped classroom model process including “before class, knowledge transfer,” “in class, knowledge internalization,” and “after class, evaluation and reflection.” The tasks in the preclass stage include the following: teachers make microclasses, design self-learning task lists, and supervise learning, and students watch microclasses to self-learn, complete self-learning task lists, and record confusion. The tasks of the in-class stage are as follows: teachers guide inquiry, guide communication, guide practice, and practice, and students carry out problem exploration, exchange and discuss, and implement practice. The tasks in the after-school phase are as follows: teachers perform guidance and evaluation, and students show results and perform evaluation and reflection. The design of the flipped classroom teaching process is shown in Figure9.Figure 9
Flipped classroom teaching process design.The mobile learning platform is developed based on the mobile terminal platform and is mainly used in mobile devices, such as smart phones and tablet computers, including an operating system, middleware, and some key platform applications. Moreover, it can be ported to different hardware platforms. The system consists of two parts: the foreground and the background. The front desk functions include user login, user registration, interactive communication module, course learning module, and learning resource module. The background is the system management module, which is mainly operated by the administrator, including student management and resource management. Figure10 shows the overall structure of the mobile learning platform.Figure 10
The overall structure design of the system.After constructing the above system, the performance of this system is verified through experimental teaching methods, and the teaching effect is counted. The results obtained are shown in Table1 and Figure 11 below.Table 1
Statistical table of evaluation of the teaching effect of flipped classroom of programming courses based on social cognitive network.
NOTeaching evaluation186.31291.19387.96481.39590.09686.07787.86892.90991.191086.071189.991286.461389.151492.341586.931684.471791.501890.811985.672091.592192.502280.552391.432485.892591.442684.802791.082892.482983.423092.163191.933279.543388.353490.973580.823684.793782.763890.383984.024081.304183.364283.414385.954484.664591.414684.444783.434882.014986.775092.195187.665284.425381.965486.715592.625681.195786.955881.305984.466091.366180.066279.516386.896482.736592.246687.496790.446885.176986.577082.217183.707284.117385.457489.657592.977682.167785.117881.767982.718089.65Figure 11
Statistical diagram of evaluation of the teaching effect of flipped classroom of programming courses based on social cognitive network.From the above research, we can see that the flipped classroom teaching system of programming courses based on social cognitive network constructed in this paper has good teaching effects and can effectively improve the teaching quality of programming courses.


## 5. Conclusion

The emergence of the flipped classroom has provided a new direction and injected fresh vitality for the reform of education and teaching. Based on the relevant theories and practices of microclasses and flipped classrooms, this paper creatively combines microclasses, flipped classrooms, and high school algorithms with programming teaching based on the actual teaching work. Moreover, this paper combines social cognitive network and wireless information dissemination technology to design a three-stage model of flipped classroom teaching based on microclasses and apply it to the teaching practice of algorithm and programming. In addition, this paper analyzes the optimization of the flipped classroom teaching mode of programming courses through the transfer of part of the cognitive network. Finally, this paper designs an experiment to verify the performance of the system constructed in this paper. The research results show the effectiveness of flipped classroom based on social cognitive network in algorithm and programming teaching.



---

*Source: 1271438-2021-11-22.xml*