CN108512864B - Network request scheduling method and device - Google Patents

Network request scheduling method and device Download PDF

Info

Publication number
CN108512864B
CN108512864B CN201710099916.0A CN201710099916A CN108512864B CN 108512864 B CN108512864 B CN 108512864B CN 201710099916 A CN201710099916 A CN 201710099916A CN 108512864 B CN108512864 B CN 108512864B
Authority
CN
China
Prior art keywords
network
request
sent
network request
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710099916.0A
Other languages
Chinese (zh)
Other versions
CN108512864A (en
Inventor
郭力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710099916.0A priority Critical patent/CN108512864B/en
Publication of CN108512864A publication Critical patent/CN108512864A/en
Application granted granted Critical
Publication of CN108512864B publication Critical patent/CN108512864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method for network request scheduling, which comprises the following steps: acquiring a network request sending instruction, and acquiring the network type of the current network according to the network request sending instruction; determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent; and scheduling the network request to be sent according to the sending priority. The embodiment of the invention also provides a corresponding device. The network request scheduling method provided by the embodiment of the invention can determine the sending priority of the network request according to the network service quality and schedule various network requests according to the sending priority, thereby ensuring the timely sending of the network request with high priority.

Description

Network request scheduling method and device
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for network request scheduling.
Background
With the rapid development of communication technology, the current mobile terminal is more and more intelligent, and various applications can be installed on the mobile terminal, wherein social applications are favored by users. The current social application can frequently exchange data with a server in the using process, and a large number of network requests are generated to meet the demand of instant communication of users.
The network requests are of various types, including basic communication requests, picture uploading requests, video downloading requests and the like, and the mobile terminal generally performs scheduling according to the sequence of the requests when processing the network requests.
In the prior art, when the service quality of the network is poor, the network request scheduling method can cause that various requests cannot be completed normally.
Disclosure of Invention
The embodiment of the invention provides a network request scheduling method, which can determine the sending priority of a network request according to the network service quality and schedule various network requests according to the sending priority, thereby ensuring the timely sending of the network request with high priority. The embodiment of the invention also provides a corresponding device.
The first aspect of the present invention provides a method for network request scheduling, including:
acquiring a network request sending instruction, and acquiring the network type of the current network according to the network request sending instruction;
determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent;
and scheduling the network request to be sent according to the sending priority.
A second aspect of the present invention provides an apparatus for network request scheduling, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a network request sending instruction and acquiring the network type of the current network according to the network request sending instruction;
a determining unit, configured to determine a sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent, which are obtained by the obtaining unit;
and the scheduling unit is used for scheduling the network request to be sent according to the sending priority determined by the determining unit.
The embodiment of the invention adopts the steps of obtaining a network request sending instruction, and obtaining the network type of the current network according to the network request sending instruction; determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent; and scheduling the network request to be sent according to the sending priority. Compared with the prior art that normal sending of the network request cannot be guaranteed when the network service quality is poor, the network request scheduling method provided by the embodiment of the invention can determine the sending priority of the network request according to the network service quality, and schedules various network requests according to the sending priority, thereby ensuring the timely sending of the network request with high priority.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a system for network request scheduling in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a method for scheduling a network request according to an embodiment of the present invention;
fig. 3 is a schematic diagram of another embodiment of a method for scheduling a network request in the embodiment of the present invention;
fig. 4 is a schematic diagram of an embodiment of an apparatus for network request scheduling in an embodiment of the present invention;
fig. 5 is a schematic diagram of another embodiment of an apparatus for network request scheduling in an embodiment of the present invention;
fig. 6 is a schematic diagram of another embodiment of an apparatus for network request scheduling in an embodiment of the present invention;
fig. 7 is a schematic diagram of an embodiment of a mobile terminal in an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. As can be known to those skilled in the art, with the evolution of the graph computation framework and the emergence of new application scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems.
The embodiment of the invention provides a network request scheduling method, which can determine the sending priority of a network request according to the network service quality and schedule various network requests according to the sending priority, thereby ensuring the timely sending of the network request with high priority. The embodiment of the invention also provides a corresponding device. The following are detailed below.
The mobile terminal can comprise mobile phones, intelligent watches, tablet computers and other terminal equipment.
The mobile terminal can be provided with various social applications such as WeChat and QQ, and the social applications can support instant messaging and can realize uploading and downloading of media resources. Therefore, the mobile terminal needs to perform data interaction with the server through a 2G, 3G, 4G or Wi-Fi network, the mobile terminal needs to send a network request to the server, and the server returns a network response to the mobile terminal.
Fig. 1 is a schematic diagram of an embodiment of a system for network request scheduling in an embodiment of the present application. As shown in fig. 1, the system for network request scheduling in the embodiment of the present application includes a mobile terminal 10, a network 20, and a server 30, where the mobile terminal 10 may be multiple, and the network 20 may be a 2G, 3G, 4G, Wi-Fi network, and other wireless networks capable of communicating. The server 30 may be a server of a corresponding social application.
In the process of network request scheduling, when the mobile terminal 10 determines that a network request needs to be sent, the network type of the current network is acquired; determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent; and scheduling the network request to be sent according to the sending priority. Compared with the prior art that normal sending of network requests cannot be guaranteed when the network service quality is poor, the network request scheduling system provided by the embodiment of the invention can determine the sending priority of the network requests according to the network service quality, and schedules various network requests according to the sending priority, thereby ensuring the timely sending of the network requests with high priority.
Optionally, the determining the transmission priority of the network request to be sent according to the network service quality of the current network and the type of the network request to be sent may include:
and determining the sending priority of the network request to be sent corresponding to the network type of the current network according to the priority corresponding relation between the network type and the network request type.
In the embodiment of the present invention, the network type may be predetermined according to the network service quality, the network service quality may be an evaluation parameter such as a packet loss rate, a network delay, and response time, and the packet loss rate and the network delay may be obtained by a network command.
According to the network service quality, the network can be divided into three types of a fast network, a normal network and a slow network, the network types are defined as A, B and C respectively, in an actual scene, different network service quality mobile terminals provide different services, and the service standards are defined as follows:
a, network: all network requests and complete experiences are met;
b, network: the message receiving and sending are guaranteed to be available in priority, and other requests are met as far as possible according to the priority;
c, network: only guaranteed messaging is available.
The correspondence between the type of network request and the transmission priority can be understood with reference to table 1. As shown in table 1:
table 1: correspondence between type of network request and transmission priority
Figure BDA0001231429930000041
Table 1 lists the correspondence between the centralized network request and each network, such as: the update recent message may be sent in both A, B and C networks, with the highest priority. The application list synchronization message may be sent when the network type is a and B, and may not be scheduled first when the network type is C. The version update check message is only scheduled if the network type is a.
Of course, table 1 does not fully enumerate the various network requests.
Based on empirical data, 2G/2.5G and 3G mobile networks are directly divided into C networks (slow networks), while 4G and Wi-Fi can be determined based on evaluation parameters.
Any type of evaluation parameter may be associated with the network type of the current network, such as the packet loss rate and the network type shown in table 2, or the network delay and the network type shown in table 3.
Table 2: corresponding relation between packet loss rate and network type
Figure BDA0001231429930000042
Figure BDA0001231429930000051
As shown in table 2, packet loss ratio values of various networks for different network types are listed, for example: when a network request sending instruction is obtained in a Wi-Fi network, and a network request is determined to be sent according to the network request sending instruction, a network type of a current network is obtained, and if the obtained network type is a, a packet loss rate f < 0.5% when the network type a is determined may be determined, for example: if the packet loss rate f is 0.4% when the network type is determined, because 0.4% < 0.5%, the determined network type of the Wi-Fi network is a, and the transmission of network requests of various priorities can be satisfied, for example: requests such as picture upload requests, video download requests, and text messages can be scheduled. When the network is a 4G network, a network request sending instruction is obtained, and it is determined according to the network request sending instruction that the network request is to be sent, the network type of the current network is obtained, and if the obtained network type is network type B under the 4G network, it can be determined that the loss when the network type B is determined is included in the range of 0.8% < f ≦ 1.3%. For example: if f is 1% when the network type is determined, it may be determined that the network type of the 4G network is B, and if the network type is a normal network, it needs to preferentially meet the requirement that instant messaging is available, the video downloading request may be suspended for scheduling, and if there is a surplus network resource in the picture uploading request, scheduling may be performed.
The correspondence between network delay and network type can be understood with reference to table 3, as shown in table 3:
table 3: correspondence of network delay to network type
Figure BDA0001231429930000052
As shown in table 3, if the network is a Wi-Fi network, the network request sending instruction is obtained, and it is determined according to the network request sending instruction that the network request is to be sent, the network type of the current network is obtained, and if the obtained network type is B, it may be determined that the network delay when determining the network type B is within a range of 30ms < m < — 50ms, for example: if the network delay m is 40ms when the network type is determined, the determined network type of the Wi-Fi network is B, and a request corresponding to the priority corresponding to the Wi-Fi general network may be scheduled. If the network is in the 4G network, when the network type is determined, m is 120ms, the determined network type is a slow network of the 4G network, and only the instant message can be received and sent, and other networks request to suspend scheduling.
Of course, the network type division and the priority corresponding to each network type in the embodiment of the present application may be set according to requirements, and in addition, the value ranges in tables 2 and 3 are only examples for easy understanding, and other examples satisfying the corresponding relationship ideas in tables 2 and 3 are all applicable to the scheme of the present application.
In the embodiment of the application, because a certain time is needed for obtaining the packet loss rate and the network delay through the network command, and for the mobile terminal, the flow and the electric quantity are scarce resources, and when the network service quality assessment scheme is selected, the flow and the electric quantity of a user mobile phone should not be additionally consumed, therefore, the consumed time of the data packet response is used as a key index of the network service quality assessment, not only can the reasonable scheduling of the network request be realized, but also the flow and the electric quantity of the mobile terminal can be saved.
The correspondence between packet response time and network type can be understood by referring to table 4, as shown in table 4:
table 4: correspondence of network delay to network type
Network type A (Rapid network) B (common network) C (Low speed network)
2G\2.5G\3G -- -- --
4G n<2 seconds 2 seconds<n<8 seconds n>8 seconds
Wi-Fi n<1 second 1 second<n<6 seconds n>6 seconds
As shown in table 4, if the network is a Wi-Fi network, the network request sending instruction is obtained, the network request is determined to be sent according to the network request sending instruction, the network type of the current network is obtained, and the obtained network type is B, it may be determined that the response time of the packet is within a range of 1 second < n <6 seconds when the network type B is determined, for example: if the time consumed by the data packet response is 3 seconds, it can be determined that the network type of the Wi-Fi network is a common network, and a request corresponding to the priority of the Wi-Fi common network can be scheduled in the common network. If the network is in the 4G network, a network request sending instruction is obtained, and it is determined according to the network request sending instruction that the network request is to be sent, the network type of the current network is obtained, and the obtained network type is C, it may be determined that when the network type C is determined, the response time of the data packet is n > -8 seconds, for example: if n is 10 seconds, it can be determined that the network type of the 4G network is a slow network, and only the instant message can be received and sent, and other networks request to suspend scheduling.
Of course, the network type division and the priority corresponding to each network type in the embodiment of the present application may be set according to requirements, and in addition, the value range in table 4 is only an example for easy understanding, and other examples satisfying the idea of the corresponding relationship in table 4 are all applicable to the scheme of the present application.
Optionally, the method for network request scheduling provided by the embodiment of the present invention further includes:
after the network request to be sent is sent to become a sent network request, receiving a network response corresponding to the sent network request;
determining the time consumed by the data packet response of the sent network request, wherein the time consumed by the data packet response of the sent network request is the time interval from the sending of the request to be sent to the receiving of the network response corresponding to the sent network request, and the time consumed by the data packet response is used for updating the network type of the current network.
Optionally, the method for network request scheduling provided by the embodiment of the present invention further includes:
accumulating and counting the response time consumption of a preset number of data packets, and determining the average value of the response time consumption of the preset number of data packets;
and updating the network type of the current network according to the average value.
In the embodiment of the application, the mobile terminal determines the time consumed by responding to the data packet of the network request by recording the sending time of the network request and the receiving time of the network response corresponding to the network request, can count a plurality of time consumed by responding, then calculates an average value, and updates the network type according to the average value. If the original network type is a fast network of a Wi-Fi network and the calculated average value is 2 seconds, the network type can be updated to be a common network of the Wi-Fi network, namely from the network type A to the network type B.
Optionally, the updating the network type of the current network according to the average value may include:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
In the embodiment of the application, if the calculated average value is 2 seconds, it can be determined that the target network type is a common network of the Wi-Fi network, that is, the network type B, and the network type of the Wi-Fi network is updated from the network type a to the network type B.
Referring to fig. 2, an embodiment of a method for network request scheduling provided by the embodiment of the present application includes:
101. and acquiring a network request sending instruction, and acquiring the network type of the current network according to the network request sending instruction.
102. And determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent.
103. And scheduling the network request to be sent according to the sending priority.
Compared with the prior art that normal sending of the network request cannot be guaranteed when the network service quality is poor, the network request scheduling method provided by the embodiment of the invention can determine the sending priority of the network request according to the network service quality, and schedules various network requests according to the sending priority, thereby ensuring the timely sending of the network request with high priority.
Referring to fig. 3, another embodiment of the method for scheduling a network request according to the embodiment of the present invention includes:
201. a network request is determined to be sent.
202. A network request sending instruction is obtained, and the network type of the current network is read from the network quality evaluation module according to the network request sending instruction sending module, where the network type may be the network type a, the network type B, and the network type C in the above embodiments, that is, the fast network, the normal network, and the slow network.
203. And after the network type of the current network is obtained, the network request is put into a corresponding priority queue. The priority queue can be understood from the contents of table 1, and the priority queue can have, for example, priority queue 1, priority queue 2, and priority queue 3.
And determining the transmission priority of the network request to be transmitted according to the network type of the current network and the type of the network request to be transmitted, and scheduling the network request to be transmitted according to the transmission priority.
The network request in priority queue 1, which has the highest priority, can be scheduled regardless of which of A, B and C the network type is.
The network requests in priority queue 2 may be scheduled only when the network type is a or B, and the network requests in priority queue 2 may not be scheduled if the network type is C.
The priority in the priority queue 3 is the lowest, and can be scheduled only when the network type is a, and the network requests in the priority queue 3 cannot be scheduled if the network types are B and C.
For example: the network request in the priority queue 1 may be an instant message request, the network request in the priority queue 2 may be a picture upload request, and the network request in the priority queue 3 may be a video download request.
204. And after the network request to be sent is sent to become a sent network request, receiving a network response corresponding to the sent network request.
205. Determining that a packet response of the sent network request is time consuming.
The time consumed by the data packet response of the sent network request is the time interval from the sending of the request to be sent to the receiving of the network response corresponding to the sent network request.
206. And accumulatively counting the response time consumption of a preset number of data packets, determining the average value of the response time consumption of the preset number of data packets, and updating the network type of the current network according to the average value.
Wherein the updating the network type of the current network according to the average value includes:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
According to table 4, the target network type corresponding to the average value may be determined, and the network type of the current network is updated to the target network type, for example: let network type a be updated to network type B, which can be used for the next network request transmission.
The above is a description of a system and a method for network request scheduling, and an apparatus for network request scheduling according to an embodiment of the present invention is described below with reference to the accompanying drawings.
Referring to fig. 4, an embodiment of the apparatus 30 for network request scheduling provided by the embodiment of the present invention includes:
an obtaining unit 301, configured to obtain a network request sending instruction, and obtain a network type of a current network according to the network request sending instruction;
a determining unit 302, configured to determine a sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent, which are obtained by the obtaining unit 301;
a scheduling unit 303, configured to schedule the network request to be sent according to the sending priority determined by the determining unit 302.
In the embodiment of the present invention, the obtaining unit 301 obtains a network request sending instruction, and obtains a network type of a current network according to the network request sending instruction; determining unit 302 determines a sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent, which are obtained by obtaining unit 301; the scheduling unit 303 schedules the network request to be sent according to the sending priority determined by the determining unit 302. Compared with the prior art that normal sending of network requests cannot be guaranteed when the network service quality is poor, the network request scheduling device provided by the embodiment of the invention can determine the sending priority of the network requests according to the network service quality, and schedules various network requests according to the sending priority, thereby ensuring the timely sending of the network requests with high priority.
Optionally, the determining unit 302 is configured to:
and determining the sending priority of the network request to be sent corresponding to the network type of the current network according to the priority corresponding relation between the network type and the network request type.
Optionally, referring to fig. 5, in another embodiment of the apparatus 30 for network request scheduling provided in the embodiment of the present invention, the apparatus 30 further includes: the transceiver unit (304) is used for transmitting and receiving,
the transceiving unit 304 is configured to receive a network response corresponding to the sent network request after the network request to be sent becomes the sent network request;
the determining unit 302 is further configured to determine, after the transceiver unit 304 receives the network response corresponding to the sent network request, a packet response time consumption of the sent network request, where the packet response time consumption of the sent network request is a time interval from sending the request to be sent to receiving the network response corresponding to the sent network request, and the packet response time consumption is used to update the network type of the current network.
Optionally, referring to fig. 6, in another embodiment of the apparatus 30 for network request scheduling provided in the embodiment of the present invention, the apparatus 30 further includes: the updating unit 305 is used to update the data,
the determining unit 302 is further configured to cumulatively count response time consumptions of a preset number of data packets, and determine an average value of the response time consumptions of the preset number of data packets;
the updating unit 305 is configured to update the network type of the current network according to the average value determined by the determining unit 302.
Alternatively, in another embodiment of the apparatus 30 for network request scheduling provided by the embodiment of the present invention,
the update unit 305 is configured to:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
The device for network request scheduling provided by the embodiment of the invention can be realized by a mobile terminal, the mobile terminal can be a mobile phone, a tablet computer and other terminals, and the following takes the mobile phone as an example to describe the process of network request scheduling of the embodiment of the invention.
As shown in fig. 7, for convenience of illustration, only the portion related to the embodiment of the present invention is shown, and details of the technique are not disclosed, please refer to the method portion of the embodiment of the present invention.
Fig. 7 is a block diagram illustrating a partial structure of a mobile terminal 800 according to an embodiment of the present invention. Referring to fig. 7, the mobile terminal includes: camera 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuitry 860, WiFi module 870, processor 880, and power supply 890. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 7 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 7:
camera 810 may be used for photography;
the memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the mobile terminal by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 830 may be used to receive an operation instruction of a user and generate a key signal input related to user setting and function control of the mobile terminal 800. Specifically, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger or a stylus pen) thereon or nearby, and drive a corresponding connected mobile terminal according to a preset program. Alternatively, the touch panel 831 may include two portions of a touch detection mobile terminal and a touch controller. The touch detection mobile terminal detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing mobile terminal, converts it into touch point coordinates, and then sends the touch point coordinates to the processor 880, and can receive and execute commands sent from the processor 880. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 830 may include other input devices 832 in addition to the touch panel 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 840 may be used to display an interface. The Display unit 840 may include an indicator Light 841, and the indicator Light 841 may be optionally configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, touch panel 831 can cover indicator 841, and when touch panel 831 detects a touch operation thereon or nearby, it can transmit to processor 880 to determine the type of touch event, and then processor 880 can provide a corresponding visual output on indicator 841 according to the type of touch event. Although the touch panel 831 and the indicator light 841 are implemented as two separate components in fig. 7 to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 831 and the indicator light 841 may be integrated to implement the input and output functions of the mobile terminal.
The mobile terminal 800 may also include at least one sensor 850.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the mobile terminal. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is processed by the audio data output processor 880 and transmitted to, for example, another mobile terminal via the camera 810, or the audio data is output to the memory 820 for further processing.
WiFi module 870 may be used for communication.
The processor 880 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby integrally monitoring the mobile terminal. Optionally, processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The mobile terminal 800 further includes a power supply 890 (e.g., a battery) for supplying power to the various components, which may be logically connected to the processor 880 via a power management system that may be configured to manage charging, discharging, and power consumption.
Although not shown, the mobile terminal 800 may further include a Radio Frequency (RF) circuit, a bluetooth module, and the like, which will not be described herein.
In the embodiment of the present invention, the processor 880 included in the mobile terminal when the network requests scheduling further has the following functions:
acquiring a network request sending instruction, and acquiring the network type of the current network according to the network request sending instruction;
determining the sending priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent;
and scheduling the network request to be sent according to the sending priority.
Optionally, the determining the transmission priority of the network request to be sent according to the network type of the current network and the type of the network request to be sent includes:
and determining the sending priority of the network request to be sent corresponding to the network type of the current network according to the priority corresponding relation between the network type and the network request type.
Optionally, the method further comprises:
after the network request to be sent is sent to become a sent network request, receiving a network response corresponding to the sent network request;
determining the time consumed by the data packet response of the sent network request, wherein the time consumed by the data packet response of the sent network request is the time interval from the sending of the request to be sent to the receiving of the network response corresponding to the sent network request, and the time consumed by the data packet response is used for updating the network type of the current network.
Optionally, the method further comprises:
accumulating and counting the response time consumption of a preset number of data packets, and determining the average value of the response time consumption of the preset number of data packets;
and updating the network type of the current network according to the average value.
Optionally, the updating the network type of the current network according to the average value includes:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
The mobile phone provided by the embodiment of the present invention can be understood by referring to the related description of the mobile terminal in fig. 1 to 6, and the description is not repeated here.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
The method, apparatus, and system for network request scheduling provided by the embodiment of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the embodiment of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for network request scheduling, which is applied to a mobile terminal, includes:
when a network request is determined to be sent to a server, a network request sending instruction is obtained, sending time of the network request and receiving time of network response of the network request are recorded according to the network request sending instruction, time consumed by data packet response aiming at the network request is determined, a network type of a current network is determined according to the time consumed by the data packet response, the network type at least comprises a fast network, a normal network and a slow network, the fast network can meet the transceiving of all types of network requests, the normal network correspondingly sets that the transceiving priority of a message type in the network request is higher than that of other types of network requests, and the slow network only meets the transceiving of a message type in the network request;
determining the sending priority of the network request to be sent corresponding to the network type of the current network according to the priority corresponding relation between the network type and the network request type;
and scheduling the network request to be sent according to the sending priority, so that the network request with high priority is sent in time.
2. The method of claim 1, wherein the recording the sending time of the network request and the receiving time of the network response of the network request according to the network request sending instruction, and the determining the packet response time for the network request comprises:
after the network request to be sent is sent to become a sent network request, receiving a network response corresponding to the sent network request;
determining the time consumed by the data packet response of the sent network request, wherein the time consumed by the data packet response of the sent network request is the time interval from the sending of the request to be sent to the receiving of the network response corresponding to the sent network request, and the time consumed by the data packet response is used for updating the network type of the current network.
3. The method of claim 2, further comprising:
accumulating and counting the response time consumption of a preset number of data packets, and determining the average value of the response time consumption of the preset number of data packets;
and updating the network type of the current network according to the average value.
4. The method of claim 3, wherein said updating the network type of the current network according to the average value comprises:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
5. An apparatus for network request scheduling, the apparatus being applied to a mobile terminal, and comprising:
an obtaining unit, configured to obtain a network request sending instruction when it is determined that a network request needs to be sent to a server, record sending time of the network request and receiving time of a network response of the network request according to the network request sending instruction, determine time consumed for a packet response of the network request, and determine to obtain a network type of a current network according to the time consumed for the packet response, where the network types at least include a fast network, a normal network, and a slow network, the fast network is capable of satisfying transceiving of all types of network requests, the normal network sets a higher priority for transceiving of a message type in the network request than that of other types of network requests, and the slow network only satisfies transceiving of a message type in the network request;
a determining unit, configured to determine, according to a priority correspondence between a network type and a network request type, a sending priority of the network request to be sent, where the sending priority corresponds to the network type of the current network;
and the scheduling unit is used for scheduling the network request to be sent according to the sending priority determined by the determining unit so that the network request with high priority is sent in time.
6. The apparatus of claim 5, wherein the obtaining unit comprises: a receiving and sending unit for receiving and sending the data,
the receiving and sending unit is used for receiving a network response corresponding to the network request to be sent after the network request to be sent is sent to become a network request to be sent;
the determining unit is further configured to determine, after the transceiver unit receives the network response corresponding to the sent network request, time consumed for the packet response of the sent network request, where the time consumed for the packet response of the sent network request is a time interval from sending the request to be sent to receiving the network response corresponding to the sent network request, and the time consumed for the packet response is used to update the network type of the current network.
7. The apparatus of claim 6, further comprising: an updating unit for updating the data of the data packet,
the determining unit is further configured to cumulatively count response time consumptions of a preset number of data packets, and determine an average value of the response time consumptions of the preset number of data packets;
and the updating unit is used for updating the network type of the current network according to the average value determined by the determining unit.
8. The apparatus of claim 7,
the update unit is configured to:
determining a target network type corresponding to the average value according to the corresponding relation between the response time consumption of the data packet and the network type;
and updating the network type of the current network to the target network type.
9. A mobile terminal, comprising: a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory;
the computer program is for performing the method of network request scheduling according to any of claims 1-4.
10. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program for executing the method of network request scheduling of any of claims 1-4.
CN201710099916.0A 2017-02-23 2017-02-23 Network request scheduling method and device Active CN108512864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710099916.0A CN108512864B (en) 2017-02-23 2017-02-23 Network request scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710099916.0A CN108512864B (en) 2017-02-23 2017-02-23 Network request scheduling method and device

Publications (2)

Publication Number Publication Date
CN108512864A CN108512864A (en) 2018-09-07
CN108512864B true CN108512864B (en) 2021-07-27

Family

ID=63373463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710099916.0A Active CN108512864B (en) 2017-02-23 2017-02-23 Network request scheduling method and device

Country Status (1)

Country Link
CN (1) CN108512864B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745272B (en) * 2020-12-23 2023-09-15 武汉斗鱼网络科技有限公司 Method, server, medium and device for improving starting speed of application program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580019A (en) * 2014-12-26 2015-04-29 小米科技有限责任公司 Network service supplying method and device
CN104602227A (en) * 2015-02-02 2015-05-06 携程计算机技术(上海)有限公司 Network-adaptive mobile application data loading method
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method and apparatus for adjusting network speed of application of intelligent terminal and intelligent terminal
CN105208607A (en) * 2015-08-25 2015-12-30 广东欧珀移动通信有限公司 Scheduling method and apparatus of network data transmission of terminal, and mobile terminal
CN106211251A (en) * 2016-09-18 2016-12-07 广东欧珀移动通信有限公司 The method and apparatus of regulation terminal online pattern

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10015804B2 (en) * 2015-07-21 2018-07-03 Aruba Netwroks, Inc. System and method for providing context-based anticipatory dynamic resource reservation
CN106453147A (en) * 2016-11-28 2017-02-22 北京小米移动软件有限公司 Bandwidth allocation method, bandwidth allocation apparatus and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580019A (en) * 2014-12-26 2015-04-29 小米科技有限责任公司 Network service supplying method and device
CN104602227A (en) * 2015-02-02 2015-05-06 携程计算机技术(上海)有限公司 Network-adaptive mobile application data loading method
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method and apparatus for adjusting network speed of application of intelligent terminal and intelligent terminal
CN105208607A (en) * 2015-08-25 2015-12-30 广东欧珀移动通信有限公司 Scheduling method and apparatus of network data transmission of terminal, and mobile terminal
CN106211251A (en) * 2016-09-18 2016-12-07 广东欧珀移动通信有限公司 The method and apparatus of regulation terminal online pattern

Also Published As

Publication number Publication date
CN108512864A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
KR102666321B1 (en) How to monitor PDCCH, terminals and network devices
CN107391259B (en) Resource processing method and device, computer readable storage medium and mobile terminal
US10956280B2 (en) Data backup method, electronic device, and storage medium
JP6511541B2 (en) Message updating method, apparatus and terminal
CN113259952A (en) Beam indication method, device, equipment and medium
CN106777009B (en) Intelligent equipment and task plan execution control method and device
WO2015085963A1 (en) Distributed system-based monitoring method, device, and system
CN103455330A (en) Application program management method, terminal, equipment and system
CN106371326B (en) Storage method and device for equipment working scene
CN107332997B (en) Method and device for reducing terminal heating, mobile terminal and storage medium
CN103532945A (en) Sharing control method and related equipment and communication system
CN107734618B (en) Application program closing method and device, storage medium and electronic equipment
CN110022405B (en) Radio frequency parameter adjusting method, device and storage medium
CN108270839B (en) Access frequency control system and method
CN112087364B (en) Session list display method, device and storage medium
CN103491421A (en) Content display method and device and smart television
CN108512864B (en) Network request scheduling method and device
CN110876199B (en) Data transmission method, device, equipment and storage medium
CN103457832A (en) Information management method, device and terminal
CN108781348B (en) Scheduling method and terminal
CN111144845B (en) Mobile terminal meeting reminding method and device
US10324974B2 (en) Display control method and apparatus for multimedia data
CN107526668B (en) CPU monitoring method and device, computer equipment and computer readable storage medium
CN110209491B (en) Resource management method, device, server and storage medium
CN106982177B (en) Upgrade control method, device and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant