CN109040217B - Download caching method, mobile terminal and computer readable storage medium - Google Patents

Download caching method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN109040217B
CN109040217B CN201810825452.1A CN201810825452A CN109040217B CN 109040217 B CN109040217 B CN 109040217B CN 201810825452 A CN201810825452 A CN 201810825452A CN 109040217 B CN109040217 B CN 109040217B
Authority
CN
China
Prior art keywords
downloading
network speed
download
cache
task
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
CN201810825452.1A
Other languages
Chinese (zh)
Other versions
CN109040217A (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.)
Nanchang Nubia Technology Co Ltd
Original Assignee
Nanchang Nubia Technology Co ltd
Nubia Technology 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 Nanchang Nubia Technology Co ltd, Nubia Technology Co Ltd filed Critical Nanchang Nubia Technology Co ltd
Priority to CN201810825452.1A priority Critical patent/CN109040217B/en
Publication of CN109040217A publication Critical patent/CN109040217A/en
Application granted granted Critical
Publication of CN109040217B publication Critical patent/CN109040217B/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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

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

Abstract

The invention discloses a method for downloading cache, which comprises the following steps: when a current terminal receives a downloading task, acquiring a first network speed of the downloading task; determining whether to start a segmented download cache according to the first network speed; and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal. The invention also discloses a mobile terminal and a computer readable storage medium. The invention realizes the transfer of the downloading task through the associated equipment, avoids the terminal occupying the network speed of other applications due to the task downloading, improves the downloading efficiency and the network speed of the terminal application and reduces the blockage.

Description

Download caching method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a method for downloading a cache, a mobile terminal, and a computer-readable storage medium.
Background
With the development of networks, terminals are more and more intelligent, and functions are more and more. To save time, users often download other network processes at the same time, for example, if the users watch movies or work on the network, and download other content at the same time. However, since downloading is preferred, when the downloading task is performed at the same time, the performed downloading task will occupy the current network, so that other applications cannot maintain the previous network speed for efficient and fast information transfer.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method for downloading cache, a mobile terminal and a computer readable storage medium, and aims to solve the technical problem of low network speed caused by simultaneous downloading tasks when other applications are used.
In order to achieve the above object, the present invention provides a method for downloading a cache, wherein the method for downloading the cache comprises the following steps:
when a current terminal receives a downloading task, acquiring a first network speed of the downloading task;
determining whether to start a segmented download cache according to the first network speed;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
In an embodiment, the step of determining whether to open the segment download cache according to the first network speed includes:
calculating a second network speed of the application currently running according to the first network speed;
and determining whether to start the segmented download cache or not according to the second network speed.
In an embodiment, the step of determining whether to start the segment download cache according to the second network speed includes:
acquiring a preset running network speed of the application;
and determining whether to start the segmented download cache or not according to the second network speed and the preset running network speed.
In an embodiment, the step of determining whether to start the segment download cache according to the second network speed and the preset running network speed includes:
when the second network speed is lower than the preset running network speed, determining to start a segmented downloading cache;
and when the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
In an embodiment, the step of transferring the download task to the associated device corresponding to the terminal includes:
determining whether the terminal is successfully connected with the corresponding associated equipment;
and transferring the downloading task to the associated equipment when the terminal is determined to be successfully connected with the associated equipment.
In an embodiment, the step of transferring the download task to the associated device when it is determined that the terminal and the associated device are successfully connected includes:
determining whether the associated equipment is connected to the Internet;
and transferring the downloading task to the associated equipment when the associated equipment is determined to be connected to the Internet.
In an embodiment, after the step of transferring the download task to the associated device corresponding to the terminal, the method for downloading the cache further includes:
the associated equipment downloads the downloading task when receiving the downloading task;
and acquiring a downloading process of the downloading task, and feeding back the downloading process to the terminal in real time.
In one embodiment, the method for downloading cache further comprises:
when a current terminal receives a downloading task, acquiring an available memory of the terminal;
determining whether to start a segmented download cache according to the available memory;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
In addition, to achieve the above object, the present invention also provides a mobile terminal, including: the system comprises a memory, a processor and a download cache program which is stored on the memory and can run on the processor, wherein the download cache program realizes the steps of any one of the download cache methods when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium, in which a download caching program is stored, and the download caching program, when executed by a processor, implements the steps of the download caching method according to any one of the above aspects.
According to the invention, when the current terminal receives the downloading task, the first network speed of the downloading task is acquired, then whether the segmented downloading cache is started or not is determined according to the first network speed, and then the downloading task is transferred to the associated equipment corresponding to the terminal when the segmented downloading cache is determined to be started, so that the downloading task is transferred through the associated equipment, the terminal is prevented from occupying the network speed of other applications due to task downloading, the downloading efficiency and the network speed for using the terminal application are improved, and the blockage is reduced.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a diagram of a communication network system architecture according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a first embodiment of a method for downloading a cache according to the present invention;
FIG. 4 is a flowchart illustrating a second embodiment of a method for downloading a cache according to the present invention;
FIG. 5 is a flowchart illustrating a third embodiment of a method for downloading a cache according to the present invention;
FIG. 6 is a flowchart illustrating a fourth embodiment of a method for downloading a cache according to the present invention;
FIG. 7 is a flowchart illustrating a fifth embodiment of a method for downloading a cache according to the present invention;
FIG. 8 is a flowchart illustrating a sixth embodiment of a method for downloading a cache according to the present invention;
FIG. 9 is a flowchart illustrating a seventh embodiment of a method for downloading a cache according to the present invention;
fig. 10 is a flowchart illustrating an eighth embodiment of a method for downloading a cache according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which 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. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device 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 device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 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 cellular phone, and the like. Further, the memory 109 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 processor 110 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 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, 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 the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial radio access Network) 202, an EPC (Evolved packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving GateWay) 2034, a PGW (PDN GateWay) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present invention are proposed.
Referring to fig. 3, fig. 3 is a flowchart illustrating a first embodiment of a method for downloading a cache according to the present invention.
In this embodiment, the method for downloading the cache includes:
step S1000, when the current terminal receives a downloading task, acquiring a first network speed of the downloading task;
in this embodiment, whether a download instruction is received is detected in real time, and when the download instruction is received, a download task corresponding to the download instruction is obtained, where the download task is a content to be downloaded currently corresponding to the download instruction; when a download task is received, a first network speed of the download task is obtained, the first network speed is the download speed corresponding to the current download task, and when the download task is received, whether the segmented cache is started or not can be determined according to the first network speed corresponding to the download task.
Step S2000, determining whether to start a segmented download cache according to the first network speed;
in this embodiment, when the first network speed corresponding to the download task is obtained, it is determined whether to start the segment download cache, and if the segment download cache is started, the current download task may be transferred from the terminal that receives the download instruction to the associated device that is matched with the terminal, so that the download task is downloaded through the associated device.
Specifically, when a first network speed corresponding to the download task is obtained, a second network speed corresponding to an application currently running in the terminal is determined according to the first network speed, wherein if only one application is running in the current terminal, the second network speed is the network speed corresponding to the current application. And when the second network speed is obtained, obtaining a preset running network speed corresponding to the application, wherein the preset running network speed is the most reasonable running speed corresponding to the application obtained in advance. Determining whether to start a segmented download cache according to the preset running network speed and the second network speed, specifically, obtaining the preset running network speed and the second network speed, and if the second network speed is less than the preset running network speed, indicating that the current network speed of the application cannot meet the corresponding most reasonable network speed, and the current download task occupies the network speed corresponding to the application, determining to start the segmented download cache; if the second network speed is not less than the preset running network speed, it means that the current network speed of the application can still enable the application to run normally and quickly while meeting the network speed occupied by the downloading task, and it is determined that the segmented downloading cache is not started.
And step S3000, transferring the downloading task to the associated equipment corresponding to the terminal when the segmented downloading cache is determined to be started.
In this embodiment, when the segmented download cache is determined to be started, the current download task is transferred to the corresponding associated device. Specifically, whether the current terminal is successfully connected with associated equipment is determined, the associated equipment is equipment which is successfully matched with the current terminal, such as a bracelet and other equipment, a user can wear the bracelet, and the bracelet is associated with all terminals, and is the associated equipment; the associated device can be matched with the terminal through Bluetooth and other modes, and if prompt information of successful connection between the associated device and the terminal is received, the associated device and the current terminal are determined to be successfully connected. When the associated device is determined to be successfully connected with the current terminal, whether the associated device is connected with the internet or not needs to be further determined, and the downloading task cannot be downloaded for the bracelet which cannot be connected with the internet. Acquiring internet surfing information of the associated equipment, and if determining that the associated equipment can be connected to the internet according to the internet surfing information, transferring the downloading task to the associated equipment; and if the associated equipment cannot be connected to the Internet according to the Internet surfing information, prompting that the information cannot be transferred and not transferring the downloading task to the associated equipment.
And when the downloading task is transferred to the associated equipment, the associated equipment downloads the downloading task. Specifically, when the associated device receives the download task, the download information of the download task is obtained, where the download information includes information such as a current download progress and a download path of the download task, and the download task can be downloaded according to the download information. According to the acquired downloading information, the associated equipment can download the downloading task. When the associated device downloads the download task, acquiring a download process of the current download task, wherein the download process includes content downloaded by the associated device to the download task at the current moment; when the downloading process is acquired, the downloading process is transmitted to the corresponding terminal in real time, namely the associated equipment changes downloading and transmits, so that the terminal can acquire the content information which is downloaded by the associated equipment in real time.
Further, when a downloading task is received, an available memory of the current terminal is obtained, wherein the available memory is an available internal storage space in the current terminal; if the available memory of the terminal is full when the current terminal receives the downloading task, determining to start a segmented downloading cache, transferring the current downloading task to corresponding associated equipment, and performing downloading cache through the bracelet; when the bracelet finishes downloading, the user can select whether to delete the downloading resource corresponding to the downloading task, and when receiving a deleting instruction of the downloading resource, the user deletes the downloading resource; and if the deletion instruction is not received, the associated equipment stores the download resources in the download task, and when the user needs to use the download resources corresponding to the download task, the associated equipment is transferred to the corresponding terminal.
According to the method for downloading the cache, when the current terminal receives the downloading task, the first network speed of the downloading task is obtained, whether the segmented downloading cache is started or not is determined according to the first network speed, and then the downloading task is transferred to the associated equipment corresponding to the terminal when the segmented downloading cache is determined to be started, so that the downloading task is transferred through the associated equipment, the phenomenon that the terminal occupies the network speed of other applications due to task downloading is avoided, the downloading efficiency and the network speed for using the terminal applications are improved, and the blockage is reduced.
Based on the first embodiment, a second embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 4, in this embodiment, step S2000 includes:
step S2100, calculating a second network speed of the application currently running according to the first network speed;
step S2200, according to the second network speed, determining whether to start the segmented download buffer.
In this embodiment, the first network speed is a downloading speed corresponding to the current downloading task, and when the downloading task is obtained, the current terminal allocates a corresponding downloading speed to the downloading task, where the downloading speed is the first network speed corresponding to the downloading task. When the first network speed is obtained, a second network speed of the application currently running can be determined according to the first network speed; when a plurality of applications are simultaneously operated, the second network speed is the network speed corresponding to the application occupying the maximum network speed in all the applications simultaneously operated.
Specifically, different terminals may correspond to different available network speeds, the total network speed is a currently fixed available network speed of the terminal, when a first network speed corresponding to the download task is obtained, the available network speed is obtained, and according to the available network speed and the first network speed, the second network speed can be calculated through a preset calculation rule. When the second network speed is obtained through calculation, whether a segmented download cache is started or not is determined according to the second network speed; if the segmented downloading cache is started, the downloading task can be transferred to a bracelet connected with the current terminal. Specifically, when the second network speed is obtained through calculation, a preset running network speed of the application corresponding to the second network speed is obtained, where the preset running network speed is a most reasonable running speed corresponding to the application obtained in advance. When the preset network speed is obtained, determining whether to start the segmented download cache according to the second network speed and the preset running network speed; if the second network speed is lower than the preset running network speed, determining to start a segmented downloading cache; and if the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
According to the method for downloading the cache, the second network speed of the application currently running is calculated according to the first network speed, and then whether the segmented downloading cache is started is determined according to the second network speed, so that whether the segmented downloading cache is started is determined according to the current network speeds, the downloading task can be quickly downloaded when the downloading task and the application are simultaneously used, and the normal use of the current application can be ensured.
Based on the second embodiment, a third embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 5, in this embodiment, step S2200 includes:
step S2210, acquiring a preset running network speed of the application;
step S2220, according to the second network speed and the preset running network speed, whether to start the segmented download cache is determined.
In this embodiment, the preset running network speed is the most reasonable running speed corresponding to the application currently running, which is obtained in advance, and the preset running network speed can obtain an average value of the network speeds by collecting the network speeds occupied by the application during running for many times, and taking the average value as the preset running speed of the application; the preset running speed can also be the minimum running network speed of the application, or any preset network speed. When the second network speed of the application currently running is determined, the preset running network speed of the application is obtained, and whether the segmented download cache is started or not can be determined according to the preset running network speed and the second network speed.
Specifically, when the preset running network speed and the second network speed of the application are obtained, the sizes of the preset running network speed and the second network speed are determined, and whether the segmented download cache is started or not is determined according to the sizes. If the second network speed is lower than the preset running network speed, determining to start a segmented download cache; and if the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
According to the method for downloading the cache, whether the segmented download cache needs to be started currently is determined accurately according to the second network speed and the preset running network speed of the application by obtaining the preset running network speed of the application, so that the segmented download cache can be started timely when the segmented download cache needs to be started, and occupation of network resources is avoided.
Based on the third embodiment, a fourth embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 6, in this embodiment, step S2220 includes:
step S2221, when the second network speed is less than the preset running network speed, determining to start a segmented download cache;
step S2222, when the second network speed is not less than the preset running network speed, determining not to start the segmented download cache.
In this embodiment, when the preset running speed and the second network speed of the currently running application are respectively obtained, whether to start the segment download cache is determined according to the preset running speed and the second network speed. If the second network speed is lower than the preset running network speed, the current network speed of the application cannot meet the corresponding most reasonable network speed, and the current downloading task occupies the network speed corresponding to the application; at the moment, the segmented downloading cache is determined to be started, so that the downloading task is transferred, and the network speed of the current terminal ensures that the application runs normally and quickly; if the second network speed is not less than the preset running network speed, it means that the current network speed of the application can still enable the application to run normally and quickly while meeting the network speed required to be occupied by the downloading task, and the current downloading task does not affect the running speed of the application.
In the method for downloading the cache, when the second network speed is lower than the preset running network speed, the segmented download cache is determined to be started, and then when the second network speed is not lower than the preset running network speed, the segmented download cache is determined not to be started, so that whether the segmented download cache needs to be started or not is determined, the download task is timely transferred when the segmented download cache needs to be started, and the running influence of the download task on the currently running application is avoided.
Based on the first embodiment, a fifth embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 7, in this embodiment, step S3000 includes:
step S3100, determining whether the terminal is successfully connected with the corresponding associated equipment;
step S3200, when it is determined that the terminal is successfully connected to the associated device, transferring the download task to the associated device.
In this embodiment, when the segmented download cache is determined to be started, the download task needs to be transferred to the associated device corresponding to the current terminal, so that the download task is downloaded through the associated device; wherein, this associated equipment can realize through modes such as bluetooth that current terminal is connected with the bracelet that corresponds for the bracelet that this terminal matching is successful. Specifically, when the segmented cache is determined to be started, acquiring associated equipment matched with a current terminal, and determining whether the associated equipment is successfully connected with the current terminal, wherein when prompt information that the associated equipment is successfully connected with the terminal is received, the associated equipment is determined to be successfully connected with the current terminal; if the prompt message that the connection between the associated equipment and the terminal is successful is not received, the connection between the associated equipment and the current terminal is determined to be failed.
When the associated equipment is determined to be successfully connected with the current terminal, transferring the downloading task to the associated equipment; specifically, when the associated device is determined to be successfully connected with the current terminal, determining whether the associated device is connected to the internet or not, if the associated device is determined to be connected to the internet, and when the associated device is determined to be connected to the internet, transferring the downloading task to the associated device; and if the associated equipment is determined to be incapable of connecting to the Internet, prompting that information cannot be transferred, and not transferring the downloading task to the associated equipment.
According to the method for downloading the cache, whether the terminal is successfully connected with the corresponding associated equipment is determined, and then the downloading task is transferred to the associated equipment when the terminal is successfully connected with the associated equipment is determined, so that the downloading task is transferred when the terminal is successfully connected with the associated equipment, the bracelet can download the downloading resource corresponding to the downloading task according to the downloading task, and the occupation of network resources when the terminal downloads the downloading task is avoided.
Based on the fifth embodiment, a sixth embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 8, in this embodiment, step S3200 includes:
step S3210, determining whether the associated device is connected to the Internet;
step S3220, when it is determined that the associated device is connected to the internet, transferring the download task to the associated device.
In this embodiment, when it is determined that the connection between the associated device and the current terminal is successful, it is required to determine whether the associated device is connected to the internet, and if the associated device is not connected to the internet, the download task cannot be downloaded; therefore, when the associated equipment is successfully connected with the terminal, the internet surfing information of the associated equipment is obtained, and if the associated equipment is determined to be connected with the internet according to the internet surfing information, the downloading task is transferred to the associated equipment; and if the associated equipment cannot be connected to the Internet according to the Internet surfing information, prompting that the information cannot be transferred and not transferring the downloading task to the associated equipment.
According to the method for downloading the cache, whether the associated equipment is connected with the internet or not is determined, and then the downloading task is transferred to the associated equipment when the associated equipment is determined to be connected with the internet, so that the downloading task is transferred when the associated equipment can be connected with the internet, the downloading task is further downloaded through the associated equipment, the downloading rate of the downloading task is improved, and the occupation of network resources when the terminal downloads the downloading task is avoided.
Based on the first embodiment, a seventh embodiment of the method for downloading a cache according to the present invention is provided, and referring to fig. 9, in this embodiment, after step S3000, the method for downloading a cache further includes:
step S4000, the associated equipment downloads the download task when receiving the download task;
and S5000, acquiring a downloading process of the downloading task, and feeding back the downloading process to the terminal in real time.
In this embodiment, when the download task is transferred to the corresponding associated device, that is, when the associated device receives the download task, the associated device downloads the download task. Specifically, when receiving the download task, the associated device obtains download information of the current download task, where the download information includes information of the current download progress, download path, and the like of the download task, and can download the download task according to the download information. The downloading progress indicates the downloading progress of the current downloading task in the terminal, and the downloading task may be downloaded by half in the terminal, so that the downloading progress of the downloading task needs to be determined, the downloading progress can be determined according to a downloading progress identifier, when the terminal downloads the downloading task, if the downloading task is suspended in the downloading process, the downloading task is identified at the suspended position, and the identifier is the downloading progress identifier; the download path is the path information for acquiring the download task, and the download task can be acquired according to the download path. Therefore, when the associated device acquires the download information, the associated device can download the download task according to the download information.
In the process that the associated terminal downloads the download task, acquiring a download process of the current download task, wherein the download process includes content downloaded to the download task by the associated device at the current moment; when the downloading process is acquired, the downloading process is transmitted to the corresponding terminal in real time, namely the associated equipment changes downloading and transmits, so that the terminal can acquire the content information which is downloaded by the associated equipment in real time.
According to the method for downloading the cache, when the associated device receives the download task, the download task is downloaded, then the download process of the download task is obtained, and the download process is fed back to the terminal in real time, so that the associated device can download and transmit the download task in real time, the download task can be rapidly downloaded, and the download efficiency is improved.
Referring to fig. 10, fig. 10 is a flowchart illustrating an eighth embodiment of a method for downloading a cache according to the present invention.
In this embodiment, the method for downloading the cache further includes:
step S6000, when the current terminal receives the downloading task, the available memory of the terminal is obtained;
step S7000, according to the available memory, determining whether to start the segmented download cache;
and step S8000, transferring the downloading task to the associated equipment corresponding to the terminal when the segmented downloading cache is determined to be started.
When a downloading task is received, acquiring an available memory of a current terminal, wherein the available memory is an available internal storage space in the current terminal; if the available memory of the terminal is full when the current terminal receives the downloading task, determining to start a segmented downloading cache, transferring the current downloading task to corresponding associated equipment, and performing downloading cache through the bracelet; when the bracelet finishes downloading, the user can select whether to delete the downloading resource corresponding to the downloading task, and when receiving a deleting instruction of the downloading resource, the user deletes the downloading resource; and if the deletion instruction is not received, the associated equipment stores the download resources in the download task, and when the user needs to use the download resources corresponding to the download task, the associated equipment is transferred to the corresponding terminal.
According to the method for downloading the cache, when the current terminal receives the downloading task, the available memory of the terminal is obtained, whether the segmented downloading cache is started or not is determined according to the available memory, and then when the segmented downloading cache is determined to be started, the downloading task is transferred to the associated equipment corresponding to the terminal, so that the determination of whether the segmented downloading cache is started or not is realized according to the available memory of the terminal, the downloading task is further transferred, the situation that the terminal occupies the network speed of other applications due to task downloading is avoided, the downloading efficiency and the network speed of the terminal applications are improved, and the blockage is reduced.
In addition, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes: a memory, a processor, and a download cache program stored on the memory and executable on the processor, the download cache program when executed by the processor performing the following operations:
when a current terminal receives a downloading task, acquiring a first network speed of the downloading task;
determining whether to start a segmented download cache according to the first network speed;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
Further, the download caching program when executed by the processor further performs the following operations:
calculating a second network speed of the application currently running according to the first network speed;
and determining whether to start the segmented download cache or not according to the second network speed.
Further, the download caching program when executed by the processor further performs the following operations:
acquiring a preset running network speed of the application;
and determining whether to start the segmented download cache or not according to the second network speed and the preset running network speed.
Further, the download caching program when executed by the processor further performs the following operations:
when the second network speed is lower than the preset running network speed, determining to start a segmented downloading cache;
and when the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
Further, the download caching program when executed by the processor further performs the following operations:
determining whether the terminal is successfully connected with the corresponding associated equipment;
and transferring the downloading task to the associated equipment when the terminal is determined to be successfully connected with the associated equipment.
Further, the download caching program when executed by the processor further performs the following operations:
determining whether the associated equipment is connected to the Internet;
and transferring the downloading task to the associated equipment when the associated equipment is determined to be connected to the Internet.
Further, the download caching program when executed by the processor further performs the following operations:
the associated equipment downloads the downloading task when receiving the downloading task;
and acquiring a downloading process of the downloading task, and feeding back the downloading process to the terminal in real time.
Further, the download caching program when executed by the processor further performs the following operations:
when a current terminal receives a downloading task, acquiring an available memory of the terminal;
determining whether to start a segmented download cache according to the available memory;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a download cache program is stored on the computer-readable storage medium, and when executed by a processor, the download cache program implements the following operations:
when a current terminal receives a downloading task, acquiring a first network speed of the downloading task;
determining whether to start a segmented download cache according to the first network speed;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
Further, the download caching program when executed by the processor further performs the following operations:
calculating a second network speed of the application currently running according to the first network speed;
and determining whether to start the segmented download cache or not according to the second network speed.
Further, the download caching program when executed by the processor further performs the following operations:
acquiring a preset running network speed of the application;
and determining whether to start the segmented download cache or not according to the second network speed and the preset running network speed.
Further, the download caching program when executed by the processor further performs the following operations:
when the second network speed is lower than the preset running network speed, determining to start a segmented downloading cache;
and when the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
Further, the download caching program when executed by the processor further performs the following operations:
determining whether the terminal is successfully connected with the corresponding associated equipment;
and transferring the downloading task to the associated equipment when the terminal is determined to be successfully connected with the associated equipment.
Further, the download caching program when executed by the processor further performs the following operations:
determining whether the associated equipment is connected to the Internet;
and transferring the downloading task to the associated equipment when the associated equipment is determined to be connected to the Internet.
Further, the download caching program when executed by the processor further performs the following operations:
the associated equipment downloads the downloading task when receiving the downloading task;
and acquiring a downloading process of the downloading task, and feeding back the downloading process to the terminal in real time.
Further, the download caching program when executed by the processor further performs the following operations:
when a current terminal receives a downloading task, acquiring an available memory of the terminal;
determining whether to start a segmented download cache according to the available memory;
and when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A method for downloading a cache, the method comprising:
when a current terminal receives a downloading task, acquiring a first network speed of the downloading task;
determining whether to start a segmented download cache according to the first network speed;
when the segmented download cache is determined to be started, transferring the download task to the associated equipment corresponding to the terminal; the step of determining whether to start the segmented download cache according to the first network speed comprises:
calculating a second network speed of the application currently running according to the first network speed;
determining whether to start a segmented download cache or not according to the second network speed;
the step of determining whether to start the segment download cache according to the second network speed comprises:
acquiring a preset running network speed of the application;
determining whether to start a segmented download cache or not according to the second network speed and the preset running network speed;
the step of determining whether to start the segmented download cache according to the second network speed and the preset running network speed comprises:
when the second network speed is lower than the preset running network speed, determining to start a segmented downloading cache;
and when the second network speed is not less than the preset running network speed, determining not to start the segmented downloading cache.
2. The method for downloading cache according to claim 1, wherein the step of transferring the downloading task to the associated device corresponding to the terminal comprises:
determining whether the terminal is successfully connected with the corresponding associated equipment;
and transferring the downloading task to the associated equipment when the terminal is determined to be successfully connected with the associated equipment.
3. The method for downloading cache according to claim 2, wherein the step of transferring the download task to the associated device upon determining that the connection between the terminal and the associated device is successful comprises:
determining whether the associated equipment is connected to the Internet;
and transferring the downloading task to the associated equipment when the associated equipment is determined to be connected to the Internet.
4. The method for downloading cache according to claim 1, wherein after the step of transferring the downloading task to the associated device corresponding to the terminal, the method for downloading cache further comprises:
the associated equipment downloads the downloading task when receiving the downloading task;
and acquiring a downloading process of the downloading task, and feeding back the downloading process to the terminal in real time.
5. A mobile terminal, characterized in that the mobile terminal comprises: memory, processor and a download cache program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the method of download caching as claimed in any one of the claims 1 to 4.
6. A computer-readable storage medium, having stored thereon a download caching program, which when executed by a processor implements the steps of the method of download caching of any one of claims 1 to 4.
CN201810825452.1A 2018-07-25 2018-07-25 Download caching method, mobile terminal and computer readable storage medium Active CN109040217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810825452.1A CN109040217B (en) 2018-07-25 2018-07-25 Download caching method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810825452.1A CN109040217B (en) 2018-07-25 2018-07-25 Download caching method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109040217A CN109040217A (en) 2018-12-18
CN109040217B true CN109040217B (en) 2021-03-26

Family

ID=64645105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810825452.1A Active CN109040217B (en) 2018-07-25 2018-07-25 Download caching method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109040217B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634336A (en) * 2012-08-21 2014-03-12 宏碁股份有限公司 File collaborative download system, apparatus and method
KR20150090566A (en) * 2014-01-29 2015-08-06 한국기술교육대학교 산학협력단 P2p system using social network service
CN106550035A (en) * 2016-11-04 2017-03-29 上海斐讯数据通信技术有限公司 A kind of method of file download terminal and file download
CN106559479A (en) * 2016-10-31 2017-04-05 北京小米移动软件有限公司 Multimedia file downloading method, designated equipment and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634336A (en) * 2012-08-21 2014-03-12 宏碁股份有限公司 File collaborative download system, apparatus and method
KR20150090566A (en) * 2014-01-29 2015-08-06 한국기술교육대학교 산학협력단 P2p system using social network service
CN106559479A (en) * 2016-10-31 2017-04-05 北京小米移动软件有限公司 Multimedia file downloading method, designated equipment and terminal
CN106550035A (en) * 2016-11-04 2017-03-29 上海斐讯数据通信技术有限公司 A kind of method of file download terminal and file download

Also Published As

Publication number Publication date
CN109040217A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109195143B (en) Network access method, mobile terminal and readable storage medium
CN109144705B (en) Application management method, mobile terminal and computer readable storage medium
CN110187808B (en) Dynamic wallpaper setting method and device and computer-readable storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN108563388B (en) Screen operation method, mobile terminal and computer-readable storage medium
CN112597115A (en) Container mirror image compression method and device, terminal equipment and medium
CN109522276B (en) Application icon management method, terminal and computer-readable storage medium
CN109725819B (en) Interface display method and device, double-screen double-system terminal and readable storage medium
CN107239208B (en) Method, apparatus, and computer-readable storage medium for processing screenshot
CN111970738A (en) Network switching control method, equipment and computer readable storage medium
CN110083294B (en) Screen capturing method, terminal and computer readable storage medium
CN110191477B (en) Network search control method, terminal and computer readable storage medium
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN109683796B (en) Interaction control method, equipment and computer readable storage medium
CN109710168B (en) Screen touch method and device and computer readable storage medium
CN109062688B (en) Memory allocation method, server and mobile terminal
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN108040330B (en) WiFi directional transmission method, mobile terminal and readable storage medium
CN107743204B (en) Exposure processing method, terminal, and computer-readable storage medium
CN107404568B (en) Control switch management method and mobile terminal
CN110275667B (en) Content display method, mobile terminal, and computer-readable storage medium
CN110262707B (en) Application program operation recording method and device and computer readable storage medium
CN110058761B (en) Copy selection method, mobile terminal and computer readable storage medium
CN114307136A (en) Game screen-throwing power consumption control method and device and computer readable storage medium
CN109495683B (en) Interval shooting method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181205

Address after: Room 608, Venture Building No. 18, High-tech Second Road, Nanchang High-tech Industrial Development Zone, Nanchang City, Jiangxi Province

Applicant after: Nanchang Nubian Technology Co., Ltd.

Applicant after: Nubian Technologies Ltd.

Address before: 518057 Dazu Innovation Building, 9018 Beihuan Avenue, Nanshan District, Shenzhen City, Guangdong Province, 6-8, 10-11, 6 and 6-10 floors in Area A, B and C

Applicant before: Nubian Technologies Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant