CN107528875B - File downloading method and device - Google Patents

File downloading method and device Download PDF

Info

Publication number
CN107528875B
CN107528875B CN201610624416.XA CN201610624416A CN107528875B CN 107528875 B CN107528875 B CN 107528875B CN 201610624416 A CN201610624416 A CN 201610624416A CN 107528875 B CN107528875 B CN 107528875B
Authority
CN
China
Prior art keywords
target file
request
downloading
client
download
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
CN201610624416.XA
Other languages
Chinese (zh)
Other versions
CN107528875A (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 CN201610624416.XA priority Critical patent/CN107528875B/en
Publication of CN107528875A publication Critical patent/CN107528875A/en
Application granted granted Critical
Publication of CN107528875B publication Critical patent/CN107528875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a file downloading method and device. The file downloading method comprises the following steps: acquiring a first request in a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service; judging whether the first client responds to the first request to download the first target file or not; and downloading the first target file through the download service under the condition that the first client does not respond to the first request to download the first target file. The invention solves the technical problem of low file downloading efficiency in the related technology.

Description

File downloading method and device
Technical Field
The invention relates to the field of internet, in particular to a file downloading method and device.
background
Currently, the file downloading in the web page is to store the target file in the server, and download the target file from the server through a specific Application (APP), for example, a thunder download, which can provide bandwidth between the user network route and the server through its own network to increase the network speed, and further increase the downloading speed of the target file. However, the downloading must be performed through a specific application, for example, fast cloud acceleration, and the downloading cannot be performed on other applications, so that the application for downloading the file is single, the file downloading speed is slow, and the downloading efficiency of the target file is low.
When the target file is downloaded from the server through a specific application, an application popup can appear for a user to select the application so as to determine which application to download the target file, and the process of downloading the target file is complex, so that the downloading efficiency of the target file is low.
in addition, the number of application scales with the cloud acceleration function is very small at present, and due to the fact that files downloaded by a user are various and one or two applications cannot acquire enough files and then store the files in a server, file downloading is limited greatly, the target file downloading efficiency is low, and the requirement of the user for downloading the files cannot be met basically.
Aiming at the problem of low efficiency of file downloading in the related art, no effective solution is provided at present.
Disclosure of Invention
the embodiment of the invention provides a file downloading method and device, which at least solve the technical problem of low file downloading efficiency in the related art.
according to an aspect of an embodiment of the present invention, a file downloading method is provided. The file downloading method comprises the following steps: acquiring a first request in a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service; judging whether the first client responds to the first request to download the first target file or not; and downloading the first target file through the download service under the condition that the first client does not respond to the first request to download the first target file.
According to another aspect of the embodiment of the invention, a file downloading device is also provided. The file downloading device comprises: the system comprises a first acquisition unit, a first processing unit and a second acquisition unit, wherein the first acquisition unit is used for acquiring a first request in a first client of a first application, the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service; the judging unit is used for judging whether the first client responds to the first request to download the first target file; and a downloading unit for downloading the first object file through the downloading service in a case where the first client does not download the first object file in response to the first request.
In the embodiment of the invention, a first request is obtained from a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service; judging whether the first client responds to the first request to download the first target file or not; and downloading the first target file through the download service under the condition that the first client does not respond to the first request to download the first target file, so that the limitation of downloading the target file is reduced, the technical effect of improving the file download efficiency is achieved, and the technical problem of low file download efficiency in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
Fig. 1 is a schematic diagram of a hardware environment of a file downloading method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a file downloading method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for downloading a file according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a file downloading apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another file downloading apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another file downloading apparatus according to an embodiment of the present invention; and
Fig. 7 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, an embodiment of a file downloading method is provided.
Alternatively, in the present embodiment, the file downloading method may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a file downloading method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The file downloading method according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The terminal 104 may execute the file downloading method according to the embodiment of the present invention by a client installed thereon.
fig. 2 is a flowchart of a file downloading method according to an embodiment of the present invention. As shown in fig. 2, the file downloading method may include the following steps:
Step S202, a first request is obtained in a first client of a first application.
In the technical solution provided in the foregoing step S202 of the present application, a first request is obtained from a first client of a first application, where the first request is used to request to download a first target file in a webpage, and the first client is integrated with a download service.
The first application is installed on a first client, and may be an Android client, the first application may be a host application, the host application has a function of controlling and managing other programs, and may be an application program or a manager that controls some activities, or may be original software for installing plug-ins, and optionally, the first application is an instant messaging application.
The first client is integrated with a downloading service, the downloading service is system security software, is not a standard application program and is an Android background service software package, other Android software can call the downloading service to realize a downloading function, and the problem of compatibility of multiple platforms of Android can be solved. The downloading service realizes the automatic queuing downloading function, and is prompted by a task bar, and when a downloaded document exists, the user can be reminded whether to replace, rename or ignore and the like. The developer can also decide what operation to execute after the downloading is finished through the incoming intention, the operation can be executed after the user clicks the notice, and the operation can also be automatically executed, so that any developer can enable the Android program to realize a professional downloading function.
The web page has a first target file, a first request is obtained from a first client of a first application, and the first request requests downloading of the first target file in the web page, where the first target file may be a text file, a video file, an audio file, and the like, and is not limited herein.
The embodiment obtains the first request in the first client of the first application, and the first request can be obtained by receiving an operation instruction for downloading the file to the first application.
the embodiment acquires the first request from the first client integrated with the downloading service on the first application to achieve the purpose of requesting to download the first target file in the webpage.
Step S204, determining whether the first client downloads the first target file in response to the first request.
In the technical solution provided in step S204 of the present application, in the technical solution provided in step S202 of the present application, it is determined whether the first client downloads the first target file in response to the first request.
After obtaining the first request from the first client of the first application, the first client may receive the first request, respond to the first request, and determine whether the first client downloads the first target file in response to the first request. The first application may download the first object file, may not download or process the first object file, or may drop the first request to the system of the first client.
Optionally, an application installed in the system of the first client and capable of downloading the first target file, for example, a thunderbolt application, may respond to the first request to download the first target file. When a plurality of applications with downloading capability installed in the first client all respond to the first request, an application popup box comprising the plurality of applications is displayed, and the application popup box specifically selects which application is used for downloading the first target file.
After acquiring the first request from the first client of the first application, the embodiment determines whether the first client downloads the first target file in response to the first request.
In step S206, the first object file is downloaded through the download service.
In the technical solution provided in the foregoing step S206 of the present application, the first target file is downloaded through the download service when the first client does not respond to the first request to download the first target file.
After determining whether the first client responds to the first request to download the first target file, if it is determined that the first client does not respond to the first request to download the first target file, that is, when the first application of the first client does not respond to the first request to perform on the first target file, the download service processes the first request. The downloading service realizes an automatic queuing downloading function according to the first request, and is prompted by a task bar, and when the downloaded first target file already exists, the user is reminded whether to replace, rename or ignore and the like. After the first target file is downloaded, the operation executed on the first target file can be selected, the operation can be executed after the user clicks the notification, and the operation can also be automatically executed, so that any developer can download the target file through the Android program of the developer through the download service.
the embodiment downloads the target file by using the downloading service when the client of the integrated downloading service does not download at the client. The downloading service helps the first application to download the target file, instead of throwing the first request to the system of the first client and downloading the first target file by manually selecting the application installed in the system of the first client, so that a program for selecting the application from an application pop-up box is avoided, the downloading process of the target file is simplified, and the downloading efficiency of the target file is improved.
according to the embodiment, when the first client does not respond to the first request to download the first target file, the first target file is downloaded through the download service, optionally, the target file can be downloaded only when the client integrated with the download service does not respond to the request for downloading the target file, so that the limitation that the first target file can only be downloaded through a specific application is avoided, and the file download efficiency is improved.
Through the steps S202 to S206, a first request is obtained from a first client of a first application, where the first request is used to request to download a first target file in a web page, and the first client is integrated with a download service; judging whether the first client responds to the first request to download the first target file or not; and under the condition that the first client does not respond to the first request to download the first target file, the first target file is downloaded through the downloading service, so that the technical problem of low file downloading efficiency in the related technology can be solved, and the technical effect of improving file downloading is achieved.
As an optional implementation manner, after downloading the first target file through the download service, the file downloading method further includes: and uploading the first target file to a first server of the download service, wherein the first server is used for backing up the first target file.
The downloading service corresponds to a first server, and the first server is used for backing up the downloaded first target file. After the first target file is downloaded through the download service, the first target file is obtained and uploaded to the first server, so that the purpose of backing up the first target file is achieved, the target file is stored, and the file download speed is improved when the same first target file is downloaded next time.
As an optional implementation manner, after uploading the first target file to the first server of the download service, the file download method further includes: acquiring a second request, wherein the second request is used for requesting to download the first target file; requesting a first target file from a first server of a download service; and receiving a first target file sent by a first server.
Fig. 3 is a flowchart of another file downloading method according to an embodiment of the present invention. As shown in fig. 3, the file downloading method may further include the steps of:
Step S301, a second request is acquired.
In the technical solution provided in the foregoing step S301 of the present application, a second request is obtained, where the second request is used to request downloading of the first target file.
The second request may be used to request the first server of the download service to download the first target file, that is, resources of the first target file may be stored on the web page or may be stored on the first server, where the storing of the resources of the first target file is implemented after the first target file has been downloaded from the web page.
Step S302, a first target file is requested from a first server of the download service.
In the technical solution provided in the foregoing step S302 of the present application, a first target file is requested from a first server of a download service.
After the second request is obtained, the second request is sent to the first server of the download service, and the first server of the download service receives the second request and performs analysis on the second request to obtain an analysis result, where the analysis result includes information of the first target file, for example, identification information used for identifying that the first target file has uniqueness. The first server of the download service determines whether the first target file is backed up according to the information of the first target file, and if the first server of the download service determines that the first target file is backed up according to the information of the first target file, the first target file is sent.
Step S303, receiving the first target file sent by the first server.
In the technical solution provided in the foregoing step S303 of the present application, a first target file sent by a first server is received.
After a first target file is requested to a first server of a download service, if the first server of the download service backups the first target file, the first target file sent by the first server is received, so that when the same target file is downloaded for the second time, the target file does not need to be downloaded again through a specific application, the sharing of the target file is realized, the limitation of file downloading is reduced, the steps of file downloading are simplified, and the efficiency of file downloading is further improved.
the embodiment obtains a second request after uploading the first target file to a first server of the download service, wherein the second request is used for requesting to download the first target file; requesting a first target file from a first server of a download service; the first target file sent by the first server is received, so that the effect of improving the file downloading efficiency is achieved when the same first target file is downloaded.
As an optional implementation, obtaining the second request includes at least one of: a first client of a first application acquires a second request; a second client of the first application acquires a second request, wherein the second client is integrated with a downloading service; and a third client of the second application acquires the second request, wherein the third client is integrated with a downloading service.
The second request for downloading the first target file may be obtained by different clients of the same application, or may be obtained by different clients of different applications. The first application may be installed on a plurality of clients, for example, the first application is an instant messaging application, which may be installed on a plurality of clients. The second request may be obtained by a plurality of clients installing the first application. After the first target file is uploaded to a first server of the downloading service, a first client of the first application acquires a second request, and a second client of the first application acquires the second request, wherein the second client and the first client are integrated with the downloading service; the third client side of the second application acquires a second request, wherein the third client side is integrated with a downloading service, after the first client side, the second client side and the third client side acquire the second request, the first client side requests the first server to download a first target file, and the first client side, the second client side and the third client side receive the first target file sent by the first server.
it should be noted that the number of the clients is not limited in this embodiment, all the clients integrating the download service are applicable to the present solution, and the time for the client integrating the download service to obtain the second request may not be sequential, may be simultaneous, or may be different, so that the limitation of single file download application is reduced, and the file download efficiency is improved.
The embodiment does not distinguish applications, and the applications corresponding to all the clients integrating the downloading service are suitable for the scheme, so that the convenience of file downloading is realized, the problem that a specific application cannot acquire enough files to be stored in the server due to the fact that the downloaded files are various is solved, and the downloading requirement of a user is met.
As an alternative embodiment, downloading the first object file through the download service includes: and downloading the first target file from a second server through a downloading service, wherein the second server is used for storing the first target file.
The second server is a proxy server and is used for storing the first target file. Usually, the website is directly connected with the destination host, and the first request is sent to the proxy server by first connecting with the proxy server, and the first target file is downloaded by the proxy server. The general proxy server has a large buffer area for buffering, and continuously stores the newly acquired data of the first target file into a corresponding memory; if the data of the first target file requested by the client exists on the corresponding memory and is latest, the data of the first target file on the memory is directly transmitted to the client without acquiring the data of the first target file from the webpage server again, and further, the downloading speed and efficiency of the client to the file are remarkably improved.
As an alternative embodiment, the download service is arranged to be integrated on different clients of the same application, and/or the download service is arranged to be integrated on different clients of different applications; the first server of the download service is configured to allow access by different clients integrated with the download service and to provide the target file to the different clients.
The same application may be installed on different clients and the download service is configured to be integrated on different clients of the same application, e.g., the instant messaging application may be installed on terminals of different users, the download service is configured to be integrated on different terminals of the instant messaging application, and/or the download service is configured to be integrated on different clients of different applications; the first server for downloading the target file is set to allow different clients integrated with the downloading service to access, and the different clients integrated with the downloading service access the first server at different times, and can access at the same time or at different times. After different clients integrated with the download service access the first server, the first server provides the target file for different clients, and when the clients of multiple applications are integrated with the download service, the multiple applications can share the target file backed up in the download server during downloading, so that the target file sharing is realized, and the file downloading efficiency is improved.
Example 2
The technical solution of the present invention will be described below with reference to preferred embodiments.
The download service can integrate the underlying technology, content framework and advertisement system big data, and can solve the compatibility problem of the android multiple platforms. In a Web page (Web) scene, when a client of an application integrating a download service downloads a file in a Web page, a kernel of the download service throws a download request for downloading a target file to a host application, the host application processes the download request, and the host application can download the file by itself or not download or not process the download request or throw the download request to a system for processing. And responding after the application declares that the target file has the downloading capacity, and enabling an application popup box comprising a plurality of applications to be presented for a user to select which application to download the target file.
Optionally, the downloading service may help the host to download the target file by using its own downloading capability when the client of the application does not process the downloading request, so as to implement processing for web service interception. After the downloading service executes the downloading, the target file can be obtained and uploaded to the server of the downloading service, and the target file is backed up through the server of the downloading service, so that the storage of the target file is realized.
the target file is uploaded to a server of the download service, after the server of the download service backs up the target file, when a client of other application requests to download the target file, the file backed up by the server of the download service can be scanned, whether the target file is backed up in the server of the download service is determined, if the target file is backed up in the server of the download service, the target file can be directly obtained from the file backed up by the server of the download service, and then the target file is downloaded to the client. Optionally, the target file is downloaded from a proxy server through a download service, wherein the proxy server is used for storing the target file, so that the download speed of the file in the whole internet is increased. Example 3
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application for implementing the file downloading method.
the following describes the technical solution of the present invention by taking the download Service as a Tencent Browser Service (TBS for short) as an example.
when the client of the application integrated with the TBS does not download the target file, a first request for requesting to download the target file is sent to a first server, the first server scans whether the target file exists or not after receiving the first request, if the target file exists on the first server as a result of scanning the server, the file on the first server can be directly downloaded to the client, and if the target file does not exist on the first server as a result of scanning the server, the target file is downloaded through the TBS, and optionally, the target file is downloaded through a proxy server storing the TBS of the target file, so that the file downloading efficiency is improved.
Optionally, when the integrated TBS application downloads a target file in a web page, the existing default procedure is to throw the TBS kernel to the host application, the host application processes the request, the host wants to download the target file by itself, and does not want to download or not process the target file, or the request is thrown to the system, and the application installed in the system declares a response to the target file having a downloading capability, and then an application popup box including multiple applications appears for the user to select which application to download.
The TBS can help the host to download the file by utilizing the downloading capability of the TBS under the condition that the application does not process the request, and the file can be acquired after the downloading is finished and uploaded to the TBS server for backup, so that the processing under the condition of intercepting the webpage file request is realized.
When other clients download the same target file, the server can be scanned to determine whether the target file exists, and if the server has backed up the target file, the target file can be directly obtained from the server and then downloaded to the mobile phone of the user. Optionally, the TBS network is used to proxy cloud acceleration, and the target file can also be downloaded quickly, so that file downloading cloud acceleration is realized.
All applications integrating TBS can use the above scheme, thereby solving the limitation of downloading target files by a single application.
it should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be substantially embodied in the form of a software product, which is stored in a storage medium, such as a Read-Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, and an optical disk, and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 4
According to the embodiment of the invention, the device for implementing the file downloading method is also provided. Fig. 4 is a schematic diagram of a file downloading device according to an embodiment of the present invention. As shown in fig. 4, the file downloading device may include: a first acquiring unit 10, a judging unit 20 and a downloading unit 30.
The first obtaining unit 10 is configured to obtain a first request in a first client of a first application, where the first request is used to request downloading of a first target file in a web page, and the first client is integrated with a downloading service.
The first application is installed on a first client, and may be an Android client, the first application may be a host application, the host application has a function of controlling and managing other programs, and may be an application program or a manager that controls some activities, or may be original software for installing plug-ins, and optionally, the first application is an instant messaging application. Optionally, the first client is integrated with a downloading service, the downloading service is system security software, is not a standard application program, is an Android background service software package, and other Android software can call the Android background service software package to realize a downloading function, so that the compatibility problem of multiple platforms of Android can be solved. Optionally, the download service implements an automatic queuing download function, and has a taskbar prompt to prompt the user whether to replace, rename, or ignore, etc., when the downloaded document already exists. The developer can also decide what operation to execute after the downloading is finished through the incoming intention, the operation can be executed after the user clicks the notice, and the operation can also be automatically executed, so that any developer can enable the Android program to realize a professional downloading function. The web page has a first target file, and the first obtaining unit 10 obtains a first request from a first client of a first application, and requests to download the first target file through the first request, where the first target file may be a text file, a video file, an audio file, and the like, which is not limited herein.
the embodiment obtains the first request from the first client integrated with the downloading service on the first application through the first obtaining unit 10, so as to achieve the purpose of requesting to download the first target file in the web page.
the determining unit 20 is configured to determine whether the first client downloads the first target file in response to the first request.
After the first obtaining unit 10 obtains the first request from the first client of the first application, the first client may receive the first request and respond to the first request, and the determining unit 20 determines whether the first client downloads the first target file in response to the first request. The first application may download the first object file, may not download or process the first object file, or may drop the first request to the system of the first client.
Optionally, an application installed in the system of the first client and capable of downloading the first target file, for example, a thunderbolt application, may respond to the first request to download the first target file. When a plurality of applications installed in the first client all respond to the first request, an application popup box comprising the plurality of applications is displayed, and the first target file is downloaded by selecting which application is specifically selected through the application popup box.
The embodiment determines, by the determining unit 20, whether the first client downloads the first target file in response to the first request after the first obtaining unit 10 obtains the first request from the first client of the first application.
The downloading unit 30 is configured to download the first object file through the download service in a case where the first client does not download the first object file in response to the first request.
After the determining unit 20 determines whether the first client downloads the first target file in response to the first request, if it is determined that the first client does not download the first target file in response to the first request, that is, when the first application of the first client does not download the first target file in response to the first request, the downloading unit 30 processes the first request through the downloading service, and helps the first application to download the target file through the downloading service, instead of throwing the first request to the system of the first client and downloading the first target file by manually selecting the application installed in the system of the first client, so that a program for selecting an application from an application pop-up box is avoided, a downloading process of the target file is simplified, and downloading efficiency of the target file is improved.
in this embodiment, when the first client does not respond to the first request to download the first target file, the downloading unit 30 downloads the first target file through the downloading service, and optionally, as long as the client integrated with the downloading service does not respond to the request to download the target file, the client can download the target file through the downloading unit 30, thereby avoiding the limitation that the first target file can only be downloaded through a specific application, and improving the efficiency of file downloading.
it should be noted that the first obtaining unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the determining unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, and the downloading unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application.
In this embodiment, the first obtaining unit 10 is configured to obtain a first request in a first client of a first application, where the first request is used to request to download a first target file in a web page, the first client is integrated with a downloading service, the determining unit 20 is configured to determine whether the first client downloads the first target file in response to the first request, and the downloading unit 30 is configured to download the first target file through the downloading service under the condition that the first client does not download the first target file in response to the first request, so that a technical problem of relatively low file downloading efficiency in the related art can be solved, and a technical effect of improving file downloading is achieved.
Fig. 5 is a schematic diagram of another file downloading device according to an embodiment of the present invention. As shown in fig. 5, the downloading device of the file may include: the first acquiring unit 10, the judging unit 20 and the downloading unit 30, the downloading device of the file may further include: and an upload unit 40.
It should be noted that the first obtaining unit 10, the determining unit 20 and the downloading unit 30 of this embodiment have the same functions as those of the file downloading device of the embodiment shown in fig. 4, and are not described again here.
The uploading unit 40 is configured to upload the first target file to a first server of the download service after downloading the first target file through the download service, where the first server is configured to backup the first target file.
The downloading service corresponds to a first server, and the first server is used for backing up the downloaded first target file. After the downloading unit 30 downloads the first target file through the downloading service, the uploading unit 40 obtains the first target file and uploads the first target file to the first server, so that the purpose of backing up the first target file is achieved, and the storage of the target file is realized.
Fig. 6 is a schematic diagram of another file downloading device according to an embodiment of the present invention. As shown in fig. 6, the file downloading device may include: the first acquiring unit 10, the judging unit 20, the downloading unit 30 and the uploading unit 40, the downloading device of the file may further include: a second obtaining unit 50, a requesting unit 60 and a receiving unit 70.
It should be noted that the first obtaining unit 10, the determining unit 20, the downloading unit 30 and the uploading unit 40 of this embodiment have the same functions as those of the file downloading device of the fifth embodiment of the present invention, and are not described again here.
The second obtaining unit 50 is configured to obtain a second request after uploading the first target file to the first server of the download service, where the second request is used for requesting to download the first target file.
After the first target file is uploaded to the first server of the download service through the uploading unit 40 and the first server backs up the first target file, the second obtaining unit 50 obtains a second request, which may be used to request the first server of the download service to download the first target file, that is, resources of the first target file may be stored on the web page or on the first server, where the resources of the first target file are stored after the first target file has been downloaded from the web page through the downloading unit 30.
A requesting unit 60 for requesting the first target file from the first server of the download service.
After the second acquiring unit 50 acquires the second request, the requesting unit 60 requests the first target file from the first server of the download service. The requesting unit 60 sends a second request to the first server of the download service, and the first server of the download service receives the second request, and performs analysis on the second request to obtain an analysis result, where the analysis result includes information of the first target file, such as identification information for identifying that the first target file has uniqueness. The first server of the download service determines whether the first target file is backed up according to the information of the first target file, and if the first server of the download service determines that the first target file is backed up according to the information of the first target file, the first target file is sent.
the receiving unit 70 is configured to receive the first target file sent by the first server.
After the first target file is requested to the first server of the download service through the request unit 60, if the first target file has already been backed up by the first server of the download service, the first target file sent by the first server is received through the receiving unit 70, so that when the same target file is downloaded for the second time, the target file does not need to be downloaded again through a specific application, the sharing of the target file is realized, the limitation of file downloading is reduced, the steps of file downloading are simplified, and the efficiency of file downloading is further improved.
Optionally, the second obtaining unit 50 obtains the second request includes at least one of: a first client of a first application acquires a second request; a second client of the first application acquires a second request, wherein the second client is integrated with a downloading service; and a third client of the second application acquires the second request, wherein the third client is integrated with a downloading service.
The second request for requesting to download the first target file may be obtained by a second obtaining unit 50 by different clients of the same application, or may be obtained by a second obtaining unit 50 by different clients of different applications. The first application may be installed on a plurality of clients, for example, the first application is an instant messaging application, which may be installed on a plurality of clients. The second request may be acquired by a plurality of clients installing the first application through the second acquiring unit 50. After the first target file is uploaded to the first server of the download service through the uploading unit 40, the first client of the first application acquires the second request through the second acquiring unit 50, and the second client of the first application acquires the second request through the second acquiring unit 50, wherein the download service is integrated with both the second client and the first client; the third client of the second application acquires the second request through the second acquiring unit 50, wherein the third client is integrated with a downloading service, after the first client, the second client and the third client acquire the second request through the second acquiring unit 50, the first client requests the first server to download the first target file, and the first client, the second client and the third client respectively receive the first target file sent by the first server through the receiving unit 70, so that the first target file is shared by the client of the same application and different clients of different applications, and the file downloading efficiency is improved.
Optionally, the downloading unit 30 is configured to download the first object file from a second server through a downloading service, where the second server is configured to store the first object file.
The second server is a proxy server and is used for storing the first target file. Usually, the website is directly connected with the destination host, and the first request is sent to the proxy server by first connecting with the proxy server, and the first target file is downloaded by the proxy server. The general proxy server has a large buffer area for buffering, and continuously stores the newly acquired data of the first target file into a corresponding memory; if the data of the first target file requested by the client exists on the corresponding memory and is latest, the data of the first target file on the memory is directly transmitted to the client without acquiring the data of the first target file from the webpage server again, and further, the downloading speed and efficiency of the client to the file are remarkably improved.
Optionally, the download service is arranged to be integrated on different clients of the same application, and/or the download service is arranged to be integrated on different clients of different applications; the first server of the download service is configured to allow access by different clients integrated with the download service and to provide the target file to the different clients.
the same application may be installed on different clients and the download service is configured to be integrated on different clients of the same application, e.g., the instant messaging application may be installed on terminals of different users, the download service is configured to be integrated on different terminals of the instant messaging application, and/or the download service is configured to be integrated on different clients of different applications; the time for accessing the first server by different clients integrated with the download service is not sequential, and the different clients can access the first server at the same time or at different times. After different clients integrated with the downloading service access the first server, the first server provides the target file for different clients, so that the sharing of the target file is realized, and the file downloading efficiency is improved.
it should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the above units and modules as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the unit and the module, the technical problem of low file downloading efficiency in the related technology can be solved, and the technical effect of improving the file downloading efficiency is further achieved.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
example 5
According to the embodiment of the invention, the invention also provides a server or a terminal for implementing the file downloading method.
Fig. 7 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 7, the terminal may include: one or more processors 701 (only one of which is shown), a memory 703, and a transmission apparatus 705 (such as the transmission apparatus in the above-described embodiments), as shown in fig. 7, the terminal may further include an input/output device 707.
The memory 703 may be used to store software programs and modules, such as program instructions/modules corresponding to the file downloading method and apparatus in the embodiments of the present invention, and the processor 701 executes various functional applications and data processing by operating the software programs and modules stored in the memory 703, that is, implements the file downloading method described above. The memory 703 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 703 may further include memory located remotely from the processor 701, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 705 is used for receiving or transmitting data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 705 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 705 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
among other things, the memory 703 is used to store application programs.
The processor 701 may call the application program stored in the memory 703 through the transmission means 705 to perform the following steps:
Acquiring a first request in a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service;
judging whether the first client responds to the first request to download the first target file or not;
And downloading the first target file through the downloading service under the condition that the first client does not respond to the first request to download the first target file.
By adopting the embodiment of the invention, a first request is obtained from a first client of a first application, and the first client is integrated with a downloading service; judging whether the first client responds to the first request to download the first target file or not; and downloading the first target file through the download service under the condition that the first client does not respond to the first request to download the first target file. The first target file is downloaded through the downloading service, and the first target file is downloaded through the downloading service under the condition that the first client does not respond to the first request to download the first target file, so that the limitation of target file downloading is reduced, the technical effect of improving the file downloading efficiency is achieved, and the technical problem of low file downloading efficiency in the related technology is solved.
The processor 201 is further configured to perform the following steps: after downloading the first target file through the download service, uploading the first target file to a first server of the download service, wherein the first server is used for backing up the first target file.
The processor 201 is further configured to perform the following steps: after the first target file is uploaded to a first server of a downloading service, acquiring a second request, wherein the second request is used for requesting to download the first target file; requesting a first target file from a first server of a download service; and receiving a first target file sent by a first server.
The processor 201 obtaining the second request includes at least one of: a first client of a first application acquires a second request; a second client of the first application acquires a second request, wherein the second client is integrated with a downloading service; and a third client of the second application acquires the second request, wherein the third client is integrated with a downloading service.
The processor 201 is further configured to perform the following steps: and downloading the first target file from a second server through a downloading service, wherein the second server is used for storing the first target file.
optionally, the specific example in this embodiment may refer to the example described in embodiment 1 above, and this embodiment is not described again here.
it can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
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 a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, read-only memory ROM, random access memory, simply RAM, magnetic or optical disks, and the like.
Example 6
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be used to execute a program code of a file downloading method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
The method comprises the steps of obtaining a first request in a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service.
and judging whether the first client responds to the first request to download the first target file.
and downloading the first target file through the downloading service under the condition that the first client does not respond to the first request to download the first target file.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after downloading the first target file through the download service, uploading the first target file to a first server of the download service, wherein the first server is used for backing up the first target file.
The storage medium is configured to store program code for performing the steps of: after the first target file is uploaded to a first server of a downloading service, acquiring a second request, wherein the second request is used for requesting to download the first target file; requesting a first target file from a first server of a download service; and receiving a first target file sent by a first server.
The storage medium is configured to store program code for performing the steps of: obtaining the second request includes at least one of: a first client of a first application acquires a second request; a second client of the first application acquires a second request, wherein the second client is integrated with a downloading service; and a third client of the second application acquires the second request, wherein the third client is integrated with a downloading service.
The storage medium is configured to store program code for performing the steps of: and downloading the first target file from a second server through a downloading service, wherein the second server is used for storing the first target file.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a read only memory ROM, a random access memory RAM, a removable hard disk, a magnetic disk, or an optical disk.
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.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
in the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
the foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A method for downloading a file, comprising:
The method comprises the steps that a first request is obtained from a first client of a first application, wherein the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service;
Judging whether the first client responds to the first request to download the first target file or not; and
Downloading the first target file through the download service without the first client downloading the first target file in response to the first request.
2. The method of claim 1, wherein after downloading the first object file via the download service, the method further comprises:
And uploading the first target file to a first server of the download service, wherein the first server is used for backing up the first target file.
3. The method of claim 2, wherein after uploading the first target file to the first server of the download service, the method further comprises:
Acquiring a second request, wherein the second request is used for requesting to download the first target file;
Requesting the first target file from a first server of the download service;
And receiving the first target file sent by the first server.
4. The method of claim 3, wherein obtaining the second request comprises at least one of:
The first client of the first application acquires the second request;
A second client of the first application acquires the second request, wherein the second client is integrated with the downloading service;
And a third client of the second application acquires the second request, wherein the third client is integrated with the downloading service.
5. The method of any of claims 1 to 4, wherein downloading the first object file via the download service comprises:
And downloading the first target file from a second server through the downloading service, wherein the second server is used for storing the first target file.
6. The method according to any of claims 1 to 4, characterized in that the download service is arranged to be integrated on different clients of the same application and/or the download service is arranged to be integrated on different clients of different applications; the first server of the download service is configured to allow access by a different client integrated with the download service and to provide a target file to the different client.
7. An apparatus for downloading a file, comprising:
The system comprises a first acquisition unit, a first processing unit and a second acquisition unit, wherein the first acquisition unit is used for acquiring a first request in a first client of a first application, the first request is used for requesting to download a first target file in a webpage, and the first client is integrated with a downloading service;
A determining unit, configured to determine whether the first client downloads the first target file in response to the first request; and
A downloading unit, configured to download the first object file through the download service when the first client does not respond to the first request to download the first object file.
8. The apparatus of claim 7, further comprising:
the uploading unit is configured to upload the first target file to a first server of the download service after the first target file is downloaded by the download service, where the first server is configured to backup the first target file.
9. The apparatus of claim 8, further comprising:
A second obtaining unit, configured to obtain a second request after uploading the first target file to a first server of the download service, where the second request is used to request to download the first target file;
A request unit for requesting the first target file from a first server of the download service;
A receiving unit, configured to receive the first target file sent by the first server.
10. The apparatus of claim 9, wherein the second obtaining unit obtains the second request comprises at least one of:
The first client of the first application acquires the second request;
A second client of the first application acquires the second request, wherein the second client is integrated with the downloading service;
And a third client of the second application acquires the second request, wherein the third client is integrated with the downloading service.
11. The apparatus according to any one of claims 7 to 10, wherein the downloading unit is configured to download the first object file from a second server through the download service, wherein the second server is configured to store the first object file.
12. The apparatus according to any of claims 7 to 10, wherein the download service is arranged to be integrated on different clients of the same application and/or wherein the download service is arranged to be integrated on different clients of different applications; the first server of the download service is configured to allow access by a different client integrated with the download service and to provide a target file to the different client.
13. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 6.
14. A terminal comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN201610624416.XA 2016-08-02 2016-08-02 File downloading method and device Active CN107528875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610624416.XA CN107528875B (en) 2016-08-02 2016-08-02 File downloading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610624416.XA CN107528875B (en) 2016-08-02 2016-08-02 File downloading method and device

Publications (2)

Publication Number Publication Date
CN107528875A CN107528875A (en) 2017-12-29
CN107528875B true CN107528875B (en) 2019-12-06

Family

ID=60748491

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610624416.XA Active CN107528875B (en) 2016-08-02 2016-08-02 File downloading method and device

Country Status (1)

Country Link
CN (1) CN107528875B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632366B (en) * 2018-04-18 2021-01-29 Oppo广东移动通信有限公司 File downloading method and device and terminal equipment
CN111399927B (en) * 2018-12-14 2024-06-18 北京奇虎科技有限公司 Method and device for sharing Class files by application and computing equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970346A (en) * 2012-11-01 2013-03-13 北京奇虎科技有限公司 Method for software downloading of browser and browser
CN103607409A (en) * 2013-11-29 2014-02-26 中国科学院深圳先进技术研究院 Method for protecting cloud storage data and cloud server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9104517B2 (en) * 2010-01-27 2015-08-11 Code Systems Corporation System for downloading and executing a virtual application
JP5687380B1 (en) * 2014-07-16 2015-03-18 ガンホー・オンライン・エンターテイメント株式会社 Terminal device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102970346A (en) * 2012-11-01 2013-03-13 北京奇虎科技有限公司 Method for software downloading of browser and browser
CN103607409A (en) * 2013-11-29 2014-02-26 中国科学院深圳先进技术研究院 Method for protecting cloud storage data and cloud server

Also Published As

Publication number Publication date
CN107528875A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN106998329B (en) File sharing method and device
EP3292671B1 (en) Securely and reliably transferring startup script
EP2687988A1 (en) Method for contents backup and an electronic device thereof
CN105812435B (en) Application upgrading data packet processing method and device, electronic equipment and system
CN111913738B (en) Access request processing method, device, computing equipment and medium
CN104360883A (en) Method and system for configuring Raid (Redundant array of independent disks)
CN109729386B (en) Video file playing starting method and system, electronic equipment and storage medium
CN110855772B (en) Cross-device data storage method, system, device, server and medium
US20140164750A1 (en) System and method for mobile platform virtualization
US20170055136A1 (en) Method and system for transmitting text messages
CN110708571B (en) Video clip playing control method and related product
CN110753091A (en) Cloud platform management method and device
CN105389175A (en) Application program sharing method and mobile terminal
CN105208065A (en) File transmitting method and device
US20200280596A1 (en) File transfer in a multi-node network
CN104580376A (en) Method, device and system for constructing connection between terminals in local area network
US20210112143A1 (en) Information processing system, service providing device, and information processing method
CN107528875B (en) File downloading method and device
CN113312013A (en) Printing method, printing system and storage medium
CN112751716A (en) Test method and system for controlling response of file server and electronic equipment
US20160323382A1 (en) Cloud images
CN107526758B (en) Message pushing method and device
CN107045452B (en) Virtual machine scheduling method and device
US9577967B2 (en) Method and system for managing an informational site using a social networking application
CN110545453B (en) Content distribution method, device and system of content distribution network

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