Paper— New Scheduling Algorithm for Mobile Teaching Cloud Resource Push New Scheduling Algorithm for Mobile Teaching Cloud Resource Push

— In order to solve the drawbacks of the traditional message push mechanism in terms of diversity, power consumption, traffic consumption, and message real-time performance, an adaptive scheduling algorithm was designed. Based on the algorithm, an adaptive message push strategy that can dynamically allocate message push mode for the terminal was proposed. The experimental results showed that this strategy could reduce the power consumption of mobile terminals and save network traffic while adapting to the diversity of terminals. Therefore, it can ensure the real-time performance of messages.


Introduction
At present, there are two ways of pushing: polling and long connection. In polling mode, the speed of polling frequency is inversely proportional to the Interval set by the client. If the Interval setting is too large, the polling frequency will be too slow, which may lead to the following problems. The message acquired by the user is outdated and data is lost. If the Interval setting is too small, the polling frequency will be too fast. Connections are frequently established and frequently closed, and system resources are frequently allocated. These frequent operations will cause the server to consume a lot of CPU time and memory resources. It also makes the phone consume a lot of power and traffic. If the server does not update data, frequent operations will waste traffic and power. The long connection method is that the client uses the heartbeat to maintain a persistent connection with the server. This kind of connection can solve the performance problems of the polling mode.
In polling mode, the client creates a connection with the server. When the client receives a response from the server, the connection is disconnected. This connection creation and disconnection mode occupies less resources of the server and saves resources. However, if all clients send to the server at the same time, the memory requirements for the server will increase, and the server's resources will be wasted. According to the working principle and characteristics of the polling mode, if the occurrence frequency is fixed and the real-time performance is not required at the same time, the polling mode may be selected. In the long connection mode, the client and the server maintain a long-term connection, and the server can be sent to the client in time after being updated. Therefore, real-time performance is guaranteed. However, maintaining a long-term connection with server will use server resources. At the same time, as the number of connections increases, server capacity is exceeded, which may lead to server collapse. In addition, the long connection method is related to the type of the OS of the terminal and requires multiple developments, resulting in high development costs.
The long connection method and the polling method are compared in four aspects: real-time message, terminal power consumption, terminal network traffic consumption, and terminal diversity. Long-message messaging is more real-time than polling. Long-connection mode consumes more battery power than polling mode. Long connections consume less network traffic than polling. The polling method can support various types of OS terminals in one development. The long connection method needs to be developed once for different types of OS terminals. Long connection methods and polling methods have their own advantages and disadvantages. The long connection method and the polling method are combined. The operating parameters of the mobile terminal are analyzed. The adaptive scheduling algorithm designed in this paper is used to dynamically allocate push methods for mobile terminals. The traditional message push mechanism is difficult to take into consideration the terminal's diversity, power consumption, traffic consumption, and message real-time performance requirements. To solve these problems, an adaptive message push strategy is proposed. This strategy analyzes the operating parameters of the terminal and dynamically allocates message push methods for the terminal.

2
State of the art Massive teaching resources are presented at the same time. On the one hand, it is very difficult for users to discover the parts that they are interested in; on the other hand, hotspot information becomes "dark information" in the network, which cannot be obtained by general users. Personalized recommendation system has important application value in social economy. It is also a scientific issue that is worth studying. In fact, it is the most effective tool to solve the problem of information overload.
At present, there are not many systems for providing recommendation services, such as WebSIFT, FAB, and DynamicProfiler. The current research on personalized service technology in academic circles has gradually become a hot topic. Hong et.al [1] discussed the key technologies based on content recommendation. Chen et.al [2] pointed out that vector space methods and social filtering methods were used to help users obtain useful information. Xuepei, H. et.al [3] designed a web recommendation system based on Web log mining and clustering technology for distance education. Zhao, B. and Wei, L. [4] discussed the application of association rules in personalized information retrieval systems. Deng Ailin et al. studied the collaborative filtering algorithm based on project scoring prediction with the background of e-commerce recommendation system. Zhang, F. [5] improved the collaborative filtering technology based on user project scoring based on previous research. A relatively efficient personalized recommendation algorithm is proposed. The algorithm includes two processes: dimension reduction and item set similarity calculation. The sparseness and scalability problems of collaborative recommendation can be solved better.
At present, some personalized recommended prototype systems are designed. Oliveira et.al [6] introduced a hybrid recommendation prototype system for Web sites. An agent-based information filtering system OpenBookmark was proposed. It provides an open information organization environment. Hong, Y. [7] researched and developed a field-oriented personalized intelligent retrieval system MySpy. The system uses multi-agent technology to implement web document index database management. Intelligent agent-based information filtering and personalization services are implemented. Auxiliary dictionaries, synonym dictionaries, and implied word dictionaries are used to conceptually expand query terms. The search results can return documents similar to the query requirements. Zhang et.al [8] studied KingbaseDL, a digital library personalized information service system. The system is a service platform integrating resource recommendation, consulting service and information retrieval. According to the professional characteristics and research interests of users, it provides and recommends teaching and scientific re-search materials and information to users.
Personalized recommendation system is currently one of the hot research areas. It has also been widely used in the actual personalized service system. Currently, terminal-based message push methods are divided into two types according to the adopted technical principles: polling-based push mode (abbreviation: polling) and longconnection-based push mode (abbreviation: long connection). However, neither of these two push methods can meet the requirements of supporting the diversity of hardware and software of the terminal, saving resource overhead (power of the terminal, network traffic) and ensuring the real-time performance of the message. Therefore, push technology is the bottleneck for the optimization of campus information instant push platform. The design of a push method suitable for the platform is imminent.

The demand analysis of teaching resources pushing
In the push of teaching resources, two core issues need to be solved. One of the core issues is that the immediate push platform for teaching resources needs to provide a unified and convergent communication platform for relevant content generated during the learning, research, life, and work of campus members. Campus members include students, teachers, administrators, logistics personnel, communities, and businesses. The types of users are complex and their identities are complex. Different identities have different permissions. Therefore, it is necessary to make a correct judgment and processing of the user's authority to ensure the correctness and security of the user's authority management. According to the source of the platform message, the message types of the platform mainly include notifications of various departments or organizations, user-defined instant notifications, and release information. For the diversity of message types, messages need to be accurately classified. At the same time, the storage of messages needs to be reasonable, secure, etc. to ensure the realtime nature of the messages and the confidentiality of the user's message records. The method of message dissemination can be divided into three types: immediacy, timing, and periodicity. The way of message acquisition is changed from traditional search request mode to subscription push mode. This method of message acquisition allows the user to automatically obtain the type of information that they are interested in.
Another key problem is that the instant push platform of teaching resource information needs to provide users with a convenient and personalized content release and access platform. Multi-terminal refers to the ability to support different models of mobile phones, tablet PCs, PCs, and handheld computers. Convenience means that the mobile terminal can automatically receive notification messages. The login PC can automatically receive messages, send notifications to users within its own rights, subscribe to messages, and publish information for other users. Personalization is reflected in the virtual service of the official website of all departments of the university. Users only need to subscribe. The website automatically informs users when new information is released, as shown in Figure 1. The teaching resource information instant push platform aims at the user, and all messages are generated by the user. According to the services provided by the platform for users, users are divided into three categories: information pushers, information receivers, and system maintenance personnel. Pushed information is classified into two types, a notification type message and a release type message. The published class messages can only be received by subscribers. The notification message comes from the user. The user generates the message content and sends it among the people in the group. Published news comes from various departments of the school, such as: graduate school, undergraduate school and so on. According to the type of terminal used by the user, the platform needs to provide a C/S version and a web version (Web version) for mobile terminal devices, and a web version (Web version) for nonportable devices such as desktop computers. The function diagram of teaching resource immediate push platform is shown in Figure 2.  In order to facilitate the operation of the message pusher, the platform adopts the B/S mode when designing a message pushing function module. The pusher can push messages after successfully logging in through the browser of the mobile terminal or PC. Message push has authority management mechanism. Users can only push messages to users within their own rights. Pushed messages are divided into two categories: instant messages and timing messages. The pusher's message is stored in the database after being verified by the server. If it is an instant message, after the server stores the message successfully, it pushes the message to the corresponding pusher. If it is a timing message, the server will listen to the message. After the set time is reached, the message is pushed to the corresponding recipient. The message push process is shown in Figure 3. Personal information management provides users with the ability to view personal information, change passwords, bind mobile phone numbers, and modify phone numbers that are bound. Some of the user's personal information comes from the school information center, such as the user's name, gender, student number or job number, group and account number, etc. The information cannot be modified.
The custom message management function provides users with a personalized message service. In this service, users can reject unwanted messages according to their needs and choose to receive the required messages. The message types are divided into two categories: notification messages and publication messages. Notification messages come from friends of the user's group, such as meeting notices, pay-ment notices, and so on. Posting class messages can be customized according to individual needs.
The user memo provides the user with a personalized message alert function. After the user sets the memo, the memo reminds the user by message when the reminder time arrives. Users can delete or modify the added notes. At the same time, the memo is automatically added to the user's calendar, so that users can arrange schedules.
The timetable for the management of the timetable comes from the school information center. Users do not need to manually add the timetable. Users only need to set up reminder time. The day's timetable will remind users of class time and class place at the corresponding time.

Adaptive scheduling algorithm
The ASA algorithm considers the real-time nature of the message, the consumption of traffic, the amount of power consumed, and the type of operating system supported, so that the push service provided by the adaptive message push policy can achieve higher real-time performance than the polling method. The consumption flow is lower than the long connection method, the power consumption is lower than the polling method, and the diversity of operating systems of the mobile terminal is supported. In the ASA algorithm, the server assigns the push mode when the user logs in for the first time or when the user refreshes. If the operating parameters of the mobile terminal conform to the long connection mode, the long connection mode is the preferred push mode to ensure the real-time nature of the message.

Performance evaluation parameter model
This model is designed based on four aspects such as the real-time (R) received by the mobile terminal, the consumed flow (F), the consumed power (E), and the operating system type (S) of the mobile terminal.
First, the real-time nature of the message. The real-time performance of messages is judged by the average delay time of messages. The shorter the average delay time t , the higher the real-time performance of the message. The real-time R of the message can be expressed as: The number n of messages received in N hours is recorded, that is, the delay time of each message (milliseconds). t i is the delay time of the ith message. Based on the acquired data, the average delay time is calculated. The polling mode delay time is related to the polling request cycle T. The larger the value of T, the larger the t , the smaller the value of R, and the worse the real-time nature of the message.
Second, traffic consumption. Traffic consumption is determined by testing the average consumption of traffic per unit of time. The unit of time is minutes. By measuring the traffic consumed in N hours, the traffic consumption value is recorded every 10 minutes. Then, the average consumed flow per minute is calculated. F's assessment model can be expressed as: n ! ,f i is the flow consumed in t i time (2) The polling method and the long connection method consume different traffic. Therefore, the client uses the adaptive push method proposed in this paper. At the same time, equal amounts of messages consume different amounts of traffic. In order to ensure the accuracy of the performance assessment, multiple test methods are used to test the flow of a cell phone from a fixed charge to a depleted battery. The traffic consumed every 10 minutes is recorded and then the average consumed traffic per minute is found. f i indicates the amount of traffic consumed by the ith sample during the t i time. The unit is KB. The value is accurate to two decimal places.
Third, electricity consumption. Power consumption is the amount of time t i used to test a mobile phone from fixed power to depleted power. The unit is minutes. The greater t i is, the less power is consumed. E's assessment model can be expressed as: In the ASA algorithm, one of the factors triggering the push mode scheduling conversion is the power of the mobile terminal. For clients with long connection, the mobile terminal will switch to polling after the battery power is less than 10%. In order to ensure the accuracy of the performance evaluation, when testing the power, multiple tests were used to test a mobile phone from a fixed power (that is, the value of A) to 0% power. The unit of time is minutes. The average is the value of t i .
Fourth, terminal diversity. The diversity of mobile terminals refers to the diversity of mobile terminal operating systems. By testing the server, it can be judged by the supported mobile terminal operating system type. The long connection method is related to the type of operating system of the mobile terminal, and a service needs multiple development. If the server only provides long connection service, the new mobile terminal operating system is not supported. Adaptive push mode combines polling mode and long connection mode. Mobile terminals of the new operating system can receive push messages by polling. S's assessment model can be expressed as: S i denotes the i-th mobile terminal operating system. When the S i value is 1, it indicates that the push service supports this type of operating system. When the S i value is 0, the push service does not support this type of operating system. The value of S is the number of mobile terminal operating system types supported by the server. When the value of S is larger, more types of mobile terminal operating systems are supported.
Performance evaluation parameters are R, F, E, S. When the value of R is smaller, the real-time nature of the message received by the client is good. When the value of F is smaller, less traffic is consumed to consume the mobile terminal, ie, traffic is saved. When the value of E is smaller, the power of the mobile terminal is saved. This can guarantee the normal working time of the mobile terminal. When the value of S is larger, multiple types of mobile terminals are supported by the server.
In theory, the message real-time performance of the adaptive push method designed in this paper is similar to the long connection method. The consumption of mobile terminal traffic is not higher than the polling method. It ensures that the normal use of the mobile terminal is longer than the long connection method. The supported mobile terminal types are the same as the polling methods.

Implementation of adaptive message push strategy
The adaptive message policy is based on the terminal parameters and dynamically assigns the push mode (polling or long connection) to the terminal. The working principle is shown in Figure 4. After the user starts the client, the client sends a connection request to the server. At the same time, parameters such as the IP address of the terminal, the remaining battery power, and the type of operating system are transmitted to the server. The server provides suitable push methods based on the above parameters.
After the user logs in successfully, the server obtains terminal parameters and instantiates the PushControl class. The PollingPush class or the LongConnPush class is instantiated based on the terminal parameter dynamics. It establishes a connection with the server and passes information. The client sends a connection request to the server. The server obtains the terminal OS type and the remaining power. If the server supports the long connection service of the terminal OS, the number of long connections supported by the server does not exceed the national value, and the remaining power of the terminal can keep the terminal running normally for one hour, the server provides a long connection mode for the terminal; otherwise, it assigns polling to the terminal. The user refreshes the server according to the current push mode of the terminal. If it is a poll, the terminal obtains the number of consecutive empty polls. When the empty polling threshold is exceeded, the server doubles the polling period. If the number of empty polls is much lower than the previous time (it is less than 0.5 times the number of empty polls before the previous polling cycle adjustment), the server will adjust the polling period to 0.5T. If the number of empty polls is 0, the server supports the long connection service of the terminal OS. The number of long connections supported by the server does not exceed the threshold, and the remaining power of the terminal can keep the terminal running normally for one hour. It allocates a long connection to the terminal. If it is a long connection, the server obtains the remaining power of the terminal. If it is less than 10% of its total power, the push mode changes from a long connection to a polling mode. In order to facilitate the experiment and also try to be close to the actual application, a set of random numbers is generated in the experiment. According to this set of random numbers, the server pushes messages to achieve random push messages.

Result analysis and discussion
To achieve the performance comparison, the polling mechanism and the long connection mechanism are first implemented. In the polling mode, the user client intermittently initiates a request to the server to check if a new message arrives. The server gives a response and then disconnects. The user then requests and re-establishes the connection, and the cycle continues. The implementation of the long connection is based on the Android terminal. A continuous TCP/IP connection is maintained between the client and server, and it is suspended immediately after a request is launched. Until the server side is updated, the server initiatively pushes the updated data to the client. The connection is always maintained until the client initiatively closes the connection, or the network fails or the connection is timeout.
After the implementation of adaptive message push mechanism, polling push mechanism and long connection mechanism, the performance of the three mechanisms is compared. The equipment used in the experiment is shown in Table 1. The experiment compares polling mode, long connection mode, and ASA mode in terms of real-time performance of messages, traffic consumption, power consumption, and diversity of mobile terminals. To facilitate testing the average delay time of the polling mode, the polling request period T takes a value of 5 seconds. According to the definition of the power threshold Et, A=30% is taken when the power consumption is calculated. To facilitate experimentation, N=l is used when testing message delay time and traffic consumption. The number of received messages, the delay time of the messages, and the consumed traffic are recorded every ten minutes, and the average delay time and the average consumed traffic of each message are calculated.

4.1
The real time of the message The average delay time was tested in the experiment, as shown in Table 2. Real-time comparison of messages: From Table 2, it can be known that polling t >ASA t > long connection t . Long connected R > ASA R> Polled R. The real-time performance of the ASA message is better than that of the polling method. In Table 2, the average delay of the ASA mode after 30 minutes starts to become smaller, which is similar to the long connection delay. After 30 minutes, the push mode changed from polling to long connection.

Power consumption
The power consumption was tested during the experiment, as shown in Table 3. Comparison of power consumption: From Table 3, it can be seen that long connection E>ASA E> polling E. The ASA push method consumes less power than the long connection method.

Traffic consumption
The flow consumption in the experiment is shown in Table 4. Comparison of traffic consumption: It can be known from Table 4 that polling F>ASA F> long connection F. The ASA push method consumes less traffic than the polling method. In Table 4, the traffic consumption of the ASA mode after 30 minutes starts to become smaller, which is similar to the long connection delay. After 30 minutes, the push mode changed from polling to long connection.

Diversity of mobile terminals
Comparison of mobile terminal diversity: ASA S=polling S>= long connection S. The ASA mode and polling mode support various types of operation. The long connection mode only supports the operating system that provides the corresponding service.
The results of performance comparison show that the adaptive message push strategy adapts to the terminal diversity and reduces the power consumption of the mobile terminal compared to the long connection method. Compared with the polling mode, network traffic is saved and the real-time nature of the message is guaranteed.
The adaptive message push strategy is to dynamically allocate a long connection method or a polling method for a mobile terminal according to an adaptive scheduling algorithm. In order to ensure that the experiment is close to the actual application, the remaining power of the mobile terminal is randomly selected in this experiment, and the user refresh operation is also random. From Table 2 and Table 4, it can be seen that the polling method is used 30 minutes ago, and the long connection method is used after 30 minutes, indicating that the user performed a refresh operation between 30-40 minutes. From Table 3, it can be seen that the adaptive message push consumes less power per hour than the long connection mode in terms of power consumption. It is larger than the polling method. The refresh operation in the experiment was random, and the experimental data of Table 3 was obtained when the polling method and the long connection method used approximately the same time. If the long connection method is used for more time than the polling method, the power consumed by the adaptive message pushing in the experiment will be closer to the long connection method. The average delay time and traffic consumption are also close to the long connection. If there are more polling methods than the long connection method, adaptive message pushing is closer to the polling method in terms of power consumption, power consumption, and message real-time performance.

Conclusions
In the mobile teaching cloud resource pushing process, the traditional message pushing mechanism has the problems of difficulty in balancing the terminal's diversity, power consumption, traffic consumption, and message real-time performance requirements. The terminal-oriented push method was studied. Firstly, the development status of terminal message push technology is introduced, and an adaptive message push strategy for terminal is proposed. In order to facilitate the design of the ASA algorithm, related parameters were designed in detail. Afterwards, the ASA algorithm was designed based on four aspects: real-time message, traffic consumption, power consumption, and operating system diversity. To facilitate the verification of the ASA algorithm, a performance evaluation parameter model was designed. Through experiments, the adaptive message push mechanism is compared with the long connection push mechanism and the polling push mechanism. While adapting to the diversity of the terminal, the power consumption of the terminal is reduced, network traffic is saved, and the real-time nature of the message is also ensured.