Self-organizing Community Learning Based on P2P Network in a University Computer Foundation Course

— In order to solve the problem of lack of targeted guidance for learners in the community learning process, an improved algorithm for constructing communities was proposed. The algorithm used P2P architecture. Through the improved learning rules, the links between learners with similar interests were continuously strengthened. The community structure was automatically adjusted. In the end, learners with similar interests were grouped together. Taking university computer basic courses as an example, a self-organizing community learning system based on p2p network-based university computer basic courses was constructed. The results showed that compared with the traditional P2P architecture learning algorithm, this algorithm achieved better community construction quality and higher community construction speed. Therefore, this method can improve the learning effect of the university computer basic curriculum community.


Introduction
With the rapid development of modern computer information technology and network technology, the application of multimedia network technology with computer as the core in higher education is becoming more and more in-depth and extensive. Especially the connection between campus network and Internet enables the education system, teaching mode, teaching content, teaching means and ways of colleges and universities have a fundamental change in all aspects. Multimedia network teaching makes full use of the computer network to carry out comprehensive transmission of various multimedia information, such as words, graphics, images, audio, video, animation and so on. It is a new education mode to realize interactive teaching activities on the basis of multimedia information resources sharing. The teaching of multimedia network in colleges and universities can provide an interactive multimedia virtual learning environment for students, change the existing teacher-centered teaching mode, and enable students change from passive learning to active learning. In addi-tion, it can expand the teaching surface of excellent teachers effectively and broaden the way and channel for educators to accept the knowledge under limited educational resources. Thus, the teaching form is richer and the teaching mode is more modern.
At present, the network multimedia education in China is in the starting and developing stages, and there are the following problems in its practical application: the information is mainly text and static picture form, which is single, abstract, and lack of attraction; the interaction between teachers and students is less, and the content transferred is mainly written and lack of real-time; there are many learning materials in the form of multimedia, which have high teaching value, but they cannot be effectively transmitted on the network because of the large volume. Therefore, the current "bottleneck" to restrict the development of network teaching is how to effectively transmit multimedia teaching resources in distance education so as to effectively play the advantage of audio and video resources in network teaching.
At present, the transmission way of multimedia information on the network is mainly downloading and streaming transmission. Downloading is a traditional transmission way, that is, before the play, the users need to download the relevant audio and video files to the local computer, so that the normal play can be conducted. Although this method makes it possible to transmit multimedia information on the Internet, this kind of file is usually large, and requires a long download time under the current network bandwidth, and needs high storage capacity for the user. In addition, streaming transmission can solve the problem of quality of service setting the buffer at the user's playback by referring to computer using its cache to improve the operation speed of the file. Streaming transmission divides audio, video and animation and other multi-media files into several compressed packets by special compression methods, and then transmitted to the user in a continuous and real time by the video server. Using this mode of transmission, the user does not need to wait until the entire file is downloaded to see the required content. Only after a few seconds or dozens of seconds of startup delay, the user can use the corresponding player to un-press and play the received streaming multimedia file information. The remaining part of the multi-media file continues to be downloaded in the background, achieving "downloading and playing at the same time". Compared with the traditional way of download, streaming transmission has many notable advantages. Streaming media technology is an effective way to solve the problem of efficient transmission of multimedia resources and interactive teaching under limited bandwidth.
In recent years, the application of video streaming technology has increased rapidly on the Internet, and the number of users visiting has increased sharply. Streaming media technology has been widely used in news release, network advertising, electronic commerce, network radio, video on demand, live broadcast, distance education, remote medical treatment, real-time video conference and other information service fields. But the current streaming media service is mainly based on the server / client model, which is limited by the existing bandwidth and the service quality is far from reaching the standard.

Literature review
Because the P2P real-time streaming media system uses the "downloading while playing" mode of work, compared with the general P2P system, it pays more attention to the efficiency and real-time of data distribution. As a result, it has higher requirements for the design and implementation of the system. In Figure 1, Huang and others [1] present a three-layer software architecture for P2P streaming application scheme: network abstraction layer, media control layer and media player layer. Scholars Xing and so on [2] proposed an optimized business optimization scheme for P2P-TV applications. On the deployed business volume model, a sudden high rate UDP packet is observed between Peer. Based on a header compression and reuse optimization method, Rohmer and others [3] created a management package and sent to the same destination with the packets. Wang and others [4] added a new application layer to UDP to improve the QOS assurance capability of UDP, reduce the demand for the network and improve the scalability of the method; the traffic volume of the entire network is reduced by compressing and reusing data packet head. Quintana-Ramirez et al. [5] illustrated that the disadvantage of the application layer was that the processing time was increased and the average delay of the packet was delayed.
Wang and other researchers [6] put forward the incentive function of conditional reciprocity strategy in nodes in a scenario. Using the evolutionary game theory, they considered the node's locality and limited cognitive ability in obtaining information.
Gao and other researchers [7] believed that a hybrid P2P network model could be used to integrate the advantages of centralized and distributed models. Tang et al. [8] introduced the concept of super nodes on the basis of distributed network model. The query requests submitted by common nodes are preferred to search in group super nodes, only local resources are not satisfied. When conditions are in place, it will broadcast between different super nodes, effectively alleviating the network blocking phenomenon caused by excessive information.
Since the research of P2P streaming media technology in 1998, because of its superior service performance, more and more universities, scientific research institutions and commercial organizations have paid more and more attention to it. Foreign countries, especially European and American countries, have made good research results in the research of P2P streaming system. Hernández-Orallo and so on [9] put forward several system models, which promoted the further development of P2P streaming media technology. At present, the main models are divided into two categories: tree based topology protocol, extended model and Gossip protocol based model.
Srinivasan et al. [10] classified the tree-based topology protocol and the extended model into two types: single tree structure and multi tree structure. The typical models of single tree structure are PeerCast, SpreadIt, NICE and ZigZag. The typical models based on multi tree structure are mainly Splitstream and CoopNet.
The streaming media system based on Gossip protocol does not need to build a complex topology between nodes, but through the Gossip protocol, each node maintains a view of some other nodes, and other nodes dynamically exchange caching information. The nodes exchange data according to the caching information, and the system usually needs a larger cache. As a result, the starting delay of the system is relatively large. Table 1 describes the overall performance comparison of the existing single multicast tree models, multi multicast tree models and the three models based on Gossip protocol.

3
Design of P2P streaming media network teaching system

System requirement analysis
At present, the construction of campus network in universities is becoming more mature, which has favorable conditions for extensively carrying out network teaching. Combined with campus network environment and application needs, we propose to build a streaming media teaching system based on campus network, which is an auxiliary way of classroom teaching. The system should have the following functions: Transform the original teaching resources into a streaming media format suitable for campus network, for learning on demand; Broadcast classroom teaching, major conferences and activities through campus network to teachers and students. At the same time, after the completition of live broadcast, the system can generate teaching resources of streaming media format and store it for learners to free demand at any time; It is convenient for teachers to create teaching resources of streaming media format, and store them in the resource pool for other teachers and students to browse. At the same time, during the teaching process, teachers can broadcast relevant resources for all students in the classroom to watch, and support multi-classroom simultaneous demand; Construct a virtual classroom learning environment for the students, so that students can go to the electronic reading room, computer room, or the student bedroom with network connection at any time to free on demand teaching courseware and download teacher's lecture notes according to the learning progress and learning goals; Through online testing, real-time answering questions, real-time interaction and other functions, we should enhance interaction between students and teachers in spare time, and improve the efficiency of students' extracurricular learning.

System design
The campus network needs no reconfiguration of the network structure when implementing the P2P technology. The technical idea of the design of this teaching system is carried out in the current good campus network environment. Based on the characteristics of the streaming media application, on the basis of not changing the existing streaming media service system architecture and transmission protocol, we use P2P technology to disperse the concentrated streaming media. The ultimate goal is to reduce the server load caused by the traditional C/S mode and provide a good streaming media service platform for the teachers and students.
System management adopts Web architecture, providing streaming media services for users in webpage form. In streaming media data transmission, the P2P technology is used. The streaming media data that the client needs is not only available from the server, but also from other clients. This design can significantly reduce server load and improve the speed and quality of streaming media data. The whole system is made up of three parts: the media production side, the server side and the client side. The media production side is responsible for providing the coding work of the audio and video data streams; the streaming media server is responsible for the establishment of the P2P network and the distribution and scheduling of the streaming media data; the Web server is responsible for the operation of the whole system, and provides the Web interface for the user to access; the client side can access the service program through the access interface, and use browser to watch and conduct the course learning by means of live or on demand. Teachers and administrators can also modify courseware and related information on the client side. The system structure is shown in Figure 2.
Based on the idea of Brusilovsky and Miller, the network teaching system is not only simple to publish teaching materials on the network for students to browse, but also to build a virtual interactive platform to achieve the purpose of full communication and exchange between teachers and students and between students and students.
In Web-based teaching mode, teachers and students, students and students are separated from each other in space. As a result, this communication and exchange is particularly important. In this study, the streaming media network teaching system takes the campus network as the supporting platform and uses the technology of combining P2P with the streaming media. It orientates to teaching demand, and provides the functions of system management, courseware on demand, live broadcast, courseware downloading, online communication, practice and testing and so on, as shown in Figure 3.

Media production end
The Web server Streaming media server

Campus network
The client

System module function design
System management module: this module is mainly used for user management (including user information registration and user information maintenance) and streaming media teaching resource management (including the construction and maintenance of resource repositories).
Courseware on demand module: courseware on demand is the main form of network teaching. Its advantage is that students can arrange their own learning time in their spare time, make use of multimedia courseware to pre-review the course and review it after class, change passive learning into active learning, improve learning efficiency, give full play to the expressiveness of courseware, and extend the teaching activities from class to extracurricular. In addition, in the process of classroom teaching, teachers can also request video courseware to achieve better teaching results. The purpose of this module is to provide users with an autonomous learning environment for Internet on demand and downloading resources to meet the students' desire for individualized and autonomous learning anytime and anywhere.
The class on demand module: the on demand module is an important application of the network teaching system for the construction of a virtual multimedia classroom teaching environment for the space and time separating teachers and students. At the same time, the modules can be carried out in the teaching activities. The complete teaching process, such as explanation, demonstration and experiment in the classroom can be transferred to every corner of the campus network in real time with high quality audio-visual effect. It solves the problem of the space and time restriction of the traditional classroom teaching, expands the teaching scale, and carries out the sharing of the famous teachers' teaching.
Courseware download module: this module provides the downloading function of course resources. For some important or rather difficult curriculum resources, students can download them to the local computer through this module and learn repeatedly to strengthen the understanding and mastery of knowledge. With the advantage of P2P network information sharing, user downloaded courseware can be shared to other users.
Online communication module: this module sets up an exchange platform for teachers and students, and makes the discussion and communication done between teachers and students, between teachers and students after class. Since the system has introduced the P2P technology, the user will not need the support of the server after logging. Compared with the restriction of server's chat room and other tools between the users in the C/S mode, the user's communication will not only be limited by the increase of the user, but will be quicker.
Test and practice module: the module provides two functions of online testing and online exercise, and users can choose according to their own needs. When students login and learn in in their spare time, they can choose the exercises corresponding to the content of the study in the exercise library to deepen the understanding of the content of the class and improve the learning efficiency. The management and maintenance of exercise database and question bank is responsible by the system administrator, but the updating of its content is limited to teachers who have the right to modify the courses.

Design of the structure of the live broadcast module
The working principle of the streaming media live module based on P2P is as follows: the media production terminal collects the real time information of the field class teaching, the meeting live and so on, and uses the Windows Media Encoder software to make the streaming media information stream, and then transmits it to the streaming media server S. The server S divides the received media files into multiple formats with fixed size according to a certain format. Then, it is sent to the buffer area of its own to provide services for the client who requests the live broadcast. In the process of live broadcast, when a new client node C is added, it first of all sends a connection request to the server. If the server has enough bandwidth resources, the server will respond to the request of the node and connect with the node to send a media packet for it. Figure 4 shows a model map of streaming media live broadcast system. The main function of the server is to respond to the user's request, manage the connection of the node, and read and distribute the streaming media data in the streaming media file. It is composed of three parts: the data transmission control module, the node management module and the media data management module. The media data management module can be divided into several sub modules, including media data reading, media data buffer and media data providing. The node management module responds to the client request and updates the node table, including the addition, exit and isolation of the new nodes, and the random selection of the partner nodes. When a node requests to join the P2P live broadcast network, the module will find the appropriate parent node for the node based on the establishment and maintenance algorithm of the application layer multicast tree, and assist the node and its parent node to be directly connected. The data transmission control module is responsible for managing the client's data requests, setting up the TCP connection, opening the thread and transmitting the streaming media packet to the client of the request media service. The server side design architecture is shown in Figure 5.
In the P2P mode, the client is composed of four parts: data transmission control module, partnership management module, media data buffer and media data play. Partnership management module is mainly responsible for the management and maintenance of the relationship between the node and other nodes. The media data buffer is mainly responsible for receiving streaming media data from the server or other clients, updating the streaming media data of the node and storing it. The function of the media data play module is to play the data in the buffer area by calling the Windows Media Player. The data transmission control module opens the data buffer in the client's host memory and stores the received streaming media data to the buffer area. After the buffer area is full, the data that first enters the buffer zone is submitted to the player at a certain rate to play in the player. While caching data stream, it also distributes data stream to its sub nodes. The client design architecture is shown in Figure 6.

Exploration and implementation of key technologies in network teaching system
In network teaching system, streaming media resources used for class teaching live broadcast and on demand are mainly generated by the streaming media sources of the system. For colleges and universities, the information sources of streaming media include ordinary classrooms, multimedia classrooms, laboratories, sports venues and conference rooms and other teaching places which can be connected to the campus network.

Production of streaming media courseware
In the network teaching system based on Windows Media streaming media service components, the general flow of live broadcasting or recording of streaming media courseware is: convert the existing audio files, video files, pictures and slides to stream format ASF files by the creation tools provided by the software toolkit Windows Media Tools; use Windows encoder -Windows Media Encoder to carry out real-time acquisition of audio and video information and create ASF files; apply Windows Media Encoder to publish a live streaming to a Windows Media server, used for on-demand or live broadcast content; Windows Media server can use ASF files as on demand or live broadcast program source; Windows Media transmits ASF media stream to the client.

Establishment of P2P network
In view of the small and medium-sized campus network environment and the functional requirements of the teaching system, a single tree structure is proposed and used to build a multicast tree. According to the principle of network address proximity, the node is scheduled and a low delay single multicast tree is constructed to realize application layer multicast service. In the transmission of the streaming media data, the streaming server first of all transfers the data stream to the direct sub node, and then these sub nodes transmit the data stream to their direct sub nodes. In this way, it is repeated until it is transmitted to the final sub nodes in a multicast tree. Such a system has the advantages of simple structure, easy management and low system cost. At the same time, in order to improve the reliability of the system, we also introduce a standby node in the construction of multicast tree, which adds redundant paths for data transmission. As a result, it can alleviate the adverse effects of node failure or data packet loss on the whole system to a certain extent.

Implementation of system management module
The system divides user identity into the following 4 categories: 1. System administrators: they have the right to use all functions; 2. General administrators: approved of by the system administrator, they can make maintenance for the corresponding modules; 3. Teachers: they have the right to use teacher specific functions, such as uploading curriculum resources, updating exercises database and question bank and so on. 4. Students: they have the right to use the special functions of the students, such as courseware on demand, live broadcast, resource download, online testing, practice and other functions. The user authentication work flow is shown in Figure 7. In this system, one class of curriculum corresponds to one column, and the column information is stored in the Class_infor data table of curriculum resource database, as shown in Table 2. Each column corresponds to the unique identification field, which is automatically coded by the system according to certain rules. The administrator of the module is responsible for maintaining the database table, including the addition, deletion and modification of teaching columns.
The module administrator or class teacher can use the upload function provided by the system to add the course streaming file to the database and maintain the existing information. When streaming media files are uploaded, columns must be selected, and the names and simple instructions of courses should be input.

Implementation of live broadcast module
The live broadcast module mainly includes classroom audio and video live broadcast and screen live broadcast. Audio and video live broadcast is to collect audio and video information from the live broadcast classroom through cameras, microphones and sound cards to the media production end. The media production end uses the coding software to make it into a real-time streaming media data stream and transmit it to the streaming media server. Screen live broadcast is the transmission of captured teacher's screen information to streaming media server. The streaming media server is equipped with Windows Media Server system. It can set up publishing points and apply P2P multicast technology to transmit streaming media. The Web server sends live broadcast information in the form of webpage. When the client clicks the live broadcast website, we can see the live broadcast content through browser. And after the live broadcast, the live content can also be saved as streaming media file for later viewing on demand. The live broadcast module can also conduct not real-time publish of pre-produced streaming media courseware by streaming media server.

System performance analysis and testing
After the system is completed, in order to test the support capability of the streaming media resource playing service and the actual playing effect in the P2P network, we run the test on the live broadcast module of the system on the campus network.
In this test, the start delay is from the client clicking program index boot program to start the timing until the client Windows Media Player starts playing. In streaming media system, players need to buffer certain data to start playing. The startup delay is from several seconds to tens of seconds in general. From the test results, when the P2P mode is used for streaming media data distribution, the node's startup delay is close to the traditional C/S mode, and some nodes are better than the C/S mode. This is mainly because the nodes in the system choose the nodes that provide services according to the principle of "proximity to address".
The occupancy test of CPU resources and network bandwidth in C/S mode and P2P mode is shown in Figure 8.
From figure 8, it can be seen that the streaming media system using P2P mode is more prominent in the occupancy of CPU resources and network bandwidth, and can effectively solve the problem of rapid increase of system load caused by the increase of users in the C/S mode, and the demand for the processing capability and network bandwidth of the server is obviously reduced. During the whole test process, the system does not have the server crash, service pause, and service failure, and the client does not have the media stream interruption or the obvious pause. Therefore, from the perspective of the whole test, the system can better fulfill the streaming live broadcast service and guarantee better quality of service.

Conclusion
With the rapid development of network technology and multimedia information technology, network teaching has been widely applied in higher education. Streaming media technology has injected new vitality into network teaching with its unique entertainment and interaction. The P2P technology is introduced into the network teaching system and it can reduce the load on the server side and support a large scale of streaming media release, which can better solve the problem of sharing and interaction of teaching resources, and has a broad application prospect. This paper designs a network teaching system based on P2P and streaming media technology. The system combines the advantages of P2P technology and C/S mode, and is easy to manage, control and expand.