CN104967646B - Document down loading method and device - Google Patents

Document down loading method and device Download PDF

Info

Publication number
CN104967646B
CN104967646B CN201410583633.XA CN201410583633A CN104967646B CN 104967646 B CN104967646 B CN 104967646B CN 201410583633 A CN201410583633 A CN 201410583633A CN 104967646 B CN104967646 B CN 104967646B
Authority
CN
China
Prior art keywords
terminal
file
user account
identifier
sending
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
CN201410583633.XA
Other languages
Chinese (zh)
Other versions
CN104967646A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201410583633.XA priority Critical patent/CN104967646B/en
Publication of CN104967646A publication Critical patent/CN104967646A/en
Application granted granted Critical
Publication of CN104967646B publication Critical patent/CN104967646B/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 kind of document down loading method and devices, belong to network technique field.The method includes:Receive the first file download request that first terminal is sent, first file download request carries the listed user account of the first terminal and the first file identification to be downloaded, and first file download request is used to ask by the first file download to the second terminal bound with the user account;Determine that the second terminal has logged in the user account;Based on the user account and first file identification, first file is sent to the second terminal.Described device includes:First receiving module, determining module and the first sending module.The present invention avoids the case where mobile phone screen smaller easy error, and eliminates the process of file duplication, reduces the time for downloading file, and then improves the efficiency for downloading file.

Description

File downloading method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a file downloading method and apparatus.
Background
With the development of network technology, the terminal can not only check files such as videos, audios and documents on line, but also check the files off line. Before checking the file offline, the terminal needs to download the file from the server and store the file.
If the terminal is a mobile phone, at this time, the method for downloading the file by the mobile phone may include two types, the first type: the mobile phone downloads and installs an application for checking files, and when receiving a downloading instruction submitted by a user through the application, the mobile phone sends a downloading request to the server, wherein the downloading request carries a file identifier to be downloaded. When the server receives the downloading request, the server acquires a corresponding file from the corresponding relation between the stored file identification and the file according to the identification of the file to be downloaded, and sends the acquired file to the mobile phone. And the second method comprises the following steps: after downloading the file according to the first method, the computer connects the mobile phone to the computer through a USB (Universal Serial Bus), and copies the file downloaded by the computer to the mobile phone.
Because the screen of the mobile phone is small, when the file is downloaded through the first mode, the operation is difficult, and errors are easy to make. When the file is downloaded to the mobile phone by the second method, the downloading operation and the copying operation need to be executed, the operation is complex, and the efficiency of downloading the file is reduced.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a file downloading method and apparatus. The technical scheme is as follows:
in one aspect, a file downloading method is provided, and the method includes:
receiving a first file downloading request sent by a first terminal, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account;
determining that the second terminal has logged in to the user account;
and sending the first file to the second terminal based on the user account and the first file identifier.
In another aspect, a file downloading apparatus is provided, the apparatus including:
the first receiving module is used for receiving a first file downloading request sent by a first terminal, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account;
the determining module is used for determining that the second terminal logs in the user account;
and the first sending module is used for sending the first file to the second terminal based on the user account and the first file identifier.
In the embodiment of the invention, after the first terminal sends the first file downloading request to the server, when the server determines that the second terminal logs in the user account, the server directly sends the first file to the second terminal, and if the first terminal is a computer and the second terminal is a mobile phone, the first file downloading request is sent to the server through the computer, so that the condition that a mobile phone screen is small and error is easy to occur is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram of a file download system architecture according to an embodiment of the present invention;
fig. 2 is a flowchart of a first file downloading method according to an embodiment of the present invention;
fig. 3 is a flowchart of a second file downloading method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an instruction issue interface according to an embodiment of the present invention;
fig. 5 is a schematic view of a first login prompt information display interface according to an embodiment of the present invention;
fig. 6 is a schematic view of a second login prompt information display interface according to an embodiment of the present invention;
fig. 7 is a schematic view of a display interface for downloading prompt information according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a first file downloading device according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a second file downloading apparatus according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating a third exemplary file downloading apparatus according to the present invention;
FIG. 11 is a diagram illustrating a fourth file downloading apparatus according to an embodiment of the present invention;
FIG. 12 is a schematic structural diagram of a fifth file downloading device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a sixth file downloading device according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a seventh file downloading device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a diagram of a file downloading system architecture according to an embodiment of the present invention. Referring to fig. 1, the system includes: the system comprises a first terminal, a second terminal and a server. The first terminal and the second terminal are both used for installing an application for viewing files, logging in a user account through the application, and viewing the files through the application, the first terminal can be a personal computer, a palm computer and the like, and the second terminal can be a mobile phone, a pad and the like. The server can comprise a web server, a storage server and a data server, wherein the web server is used for receiving a first file downloading request sent by the first terminal, the storage server is used for storing the corresponding relation between the user account and the file identifier when the second terminal does not log in the user account, and the data server is used for storing the file and sending the file to be downloaded to the second terminal.
Fig. 2 is a flowchart of a file downloading method according to an embodiment of the present invention. Referring to fig. 2, the method includes:
step 201: receiving a first file downloading request sent by a first terminal, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account.
Step 202: and determining that the second terminal is logged in the user account.
Step 203: and sending the first file to the second terminal based on the user account and the first file identifier.
In the embodiment of the invention, after the first terminal sends the first file downloading request to the server, when the server determines that the second terminal logs in the user account, the server directly sends the first file to the second terminal, and if the first terminal is a computer and the second terminal is a mobile phone, the first file downloading request is sent to the server through the computer, so that the condition that a mobile phone screen is small and error is easy to occur is avoided.
Optionally, determining that the second terminal has logged in to the user account includes:
judging whether the second terminal logs in the user account or not;
and when the second terminal does not log in the user account, sending login prompt information to the first terminal to enable the second terminal to log in the user account.
Optionally, the determining whether the second terminal has logged in the user account includes:
acquiring connection between a terminal which logs in the user account and a server according to the user account;
determining a second terminal identifier bound with the user account;
judging whether the acquired connection comprises the connection between the second terminal and the server or not based on the second terminal identification;
when the acquired connection comprises the connection between the second terminal and the server, determining that the second terminal logs in the user account;
and when the acquired connection does not include the connection between the second terminal and the server, determining that the second terminal does not log in the user account.
Optionally, when the second terminal does not log in the user account, sending login prompt information to the first terminal, so that the second terminal logs in the user account, including:
storing the user account and a first file identifier;
sending login prompt information to the first terminal, wherein the login prompt information is used for prompting a user to enable the second terminal to log in the user account;
and when the connection with the second terminal is established, determining that the second terminal is logged in the user account.
Optionally, determining the second terminal identifier bound to the user account includes:
according to the user account, acquiring a second terminal identifier bound with the user account from a corresponding relation between the stored user account and the terminal identifier, wherein the terminal identifier stored in the corresponding relation between the user account and the terminal identifier is the terminal identifier for logging in the user account in history; or,
and when the first file downloading request also carries a second terminal identifier, determining the second terminal identifier carried by the first file downloading request as the second terminal identifier bound with the user account.
Optionally, before receiving the first file download request sent by the first terminal, the method further includes:
receiving an identification acquisition request sent by a first terminal, wherein the identification acquisition request carries the user account;
acquiring a corresponding terminal identifier from a corresponding relation between the stored user account and the terminal identifier according to the user account;
and sending the acquired terminal identification to the first terminal, so that the first terminal determines a second terminal identification from the acquired terminal identification, and the second terminal identification is carried in the first file downloading request.
Optionally, sending the first file to the second terminal based on the user account and the first file identifier includes:
generating a second file downloading instruction based on the first file identifier;
based on the user account, sending a second file downloading instruction to the second terminal, so that the second terminal sends a second file downloading request to the server, wherein the second file downloading request carries the first file identifier;
when a second file downloading request is received, acquiring a first file from the corresponding relation between the stored file identification and the file according to the first file identification;
and sending the first file to the second terminal.
Optionally, after sending the first file to the second terminal based on the user account and the first file identifier, the method further includes:
and sending download prompting information to the second terminal through the connection between the second terminal and the server, wherein the download prompting information is used for prompting a user that the second terminal is downloading the first file.
Optionally, the method further comprises:
receiving a file playing request sent by a first terminal, wherein the file playing request carries a user account and a second file identifier to be played, and is used for requesting a second terminal to play a second file, and the second file is a multimedia file;
inquiring the connection between the second terminal and the server according to the user account and the second terminal identification;
and sending a playing instruction to the second terminal through the connection between the second terminal and the server, so that the second terminal plays the second file, wherein the playing instruction carries the second file identifier.
Optionally, the method further comprises:
receiving a file sharing request sent by a first terminal, wherein the file sharing request carries a friend user account and a third file identifier to be shared, and the file sharing request is used for requesting to share a third file to a third terminal corresponding to a friend of a user;
acquiring a third file from the corresponding relation between the stored file identification and the file according to the third file identification;
and sending the third file to a third terminal based on the friend user account.
All the above optional technical solutions can be combined arbitrarily to form an optional embodiment of the present invention, and the embodiment of the present invention is not described in detail herein.
Fig. 3 is a flowchart of a file downloading method according to an embodiment of the present invention. In the method, the server may include a web server, a storage server and a data server, and the web server, the storage server and the data server may be different servers or different functional modules on one server. Referring to fig. 3, the method includes:
step 301: when the first terminal receives a first file downloading instruction, the first terminal sends a first file downloading request to the web server, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account.
In the embodiment of the present invention, if the first terminal is a computer and the second terminal is a mobile phone, in order to reduce an error rate of downloading a file and improve efficiency of downloading the file, when the file needs to be downloaded to the second terminal, the user may log in the user account at the first terminal and submit the first file downloading instruction. The first file downloading instruction is used for downloading a first file to a second terminal logging in the user account. In specific implementation, when the first file is a song, the user may display the instruction submitting interface shown in fig. 4 by right-clicking the first file, right-clicking a file menu, and the like, and after the user clicks the "download to cell phone" option in fig. 4, it is determined that the user submits the first file download instruction to the first terminal.
The first file may be a document file, a multimedia file, and the like, the multimedia file may be a video file, an audio file, and the like, and when the first file is the multimedia file, the data server may be a streaming server. In addition, the first file identification may be a number of the file, a name of the file, or the like. For example, the file is a song and the first file identification may be a song name.
When the web server receives the first file downloading request, the web server needs to determine whether the second terminal has logged in the user account, and when the second terminal has not logged in the user account, the web server sends login prompt information to the first terminal to enable the second terminal to log in the user account, which specifically includes the following steps 302 to 309.
Step 302: when the web server receives the first file downloading request, the web server acquires the connection between the terminal logged in by the user account and the web server according to the user account.
When the terminal logs in the user account, a connection is established between the terminal and the web server for transmitting the instruction message between the terminal and the web server. And the web server can only make the data server download the first file to the second terminal when determining that the second terminal logs in the user account. Therefore, when the web server receives the first file downloading request, the web server first needs to acquire a connection between the terminal that has logged in the user account and the web server according to the user account, and further determines whether the second terminal logs in the user account.
The web server can record the connection corresponding to the user account, for example, the web server can number the established connection and store the corresponding relationship between the user account and the connection number, and when the web server obtains the connection corresponding to the user account, the server can obtain the corresponding connection number from the stored corresponding relationship between the user account and the connection number according to the user account, so as to obtain the connection between the terminal which has logged in the user account and the web server.
It should be noted that, in the embodiment of the present invention, the connection between the terminal that has logged in the user account and the web server may be a long connection or a short connection, and preferably, the connection between the terminal that has logged in the user account and the web server is a long connection, so that the file downloading efficiency can be improved.
Step 303: the web server determines the second terminal identification bound with the user account.
As described above, one user account may correspond to multiple connections, so that there are multiple connections between the acquired terminal and the web server, and if the web server determines whether the second terminal logs in the user account, the web server needs to acquire the second terminal identifier, but in the embodiment of the present invention, the method for acquiring the second terminal identifier may include two ways:
in the first mode, according to the user account, a second terminal identifier bound with the user account is obtained from a stored corresponding relationship between the user account and the terminal identifier, and the terminal identifier stored in the corresponding relationship between the user account and the terminal identifier is a terminal identifier for logging in the user account in history.
The web server stores the terminal identifier of the historical login user account, and the terminal identifier of the historical login user account comprises the terminal identifier of the current login user account and the terminal identifier of the login user account before the current time, so that the web server can acquire the corresponding terminal identifier from the corresponding relationship between the stored user account and the terminal identifier according to the user account, select the second terminal identifier from the acquired terminal identifiers, and further determine the selected second terminal identifier as the second terminal identifier bound with the user account.
Further, in general, only one computer and one mobile phone may log in the user account at the same time, so that in order to reduce complexity of downloading a file, when the web server receives the first file downloading request, the web server may directly search for the second terminal identifier that has currently logged in the user account, and if the second terminal identifier is found, the found second terminal identifier is determined as the second terminal identifier bound to the user account.
In a second mode, when the first file downloading request also carries a second terminal identifier, the second terminal identifier carried by the first file downloading request is determined as the second terminal identifier bound with the user account.
For the second mode, before the first terminal sends the first file downloading request to the web server, the first terminal may send an identifier obtaining request to the server, where the identifier obtaining request carries the user account, and when the server receives the identifier obtaining request. The server acquires a corresponding terminal identifier from the stored corresponding relation between the user account and the terminal identifier according to the user account; and sending the acquired terminal identification to the first terminal. And when the first terminal receives the second terminal identification selected by the user, the second terminal identification is carried in the first file downloading request.
Step 304: and the web server judges whether the acquired connection comprises the connection between the second terminal and the web server or not based on the second terminal identification.
Specifically, the web server determines a terminal identifier corresponding to each acquired connection, compares the acquired terminal identifier with a second terminal identifier, determines that the acquired connection includes a connection between the second terminal and the web server if the acquired terminal identifier includes the second terminal identifier, and otherwise determines that the acquired connection does not include a connection between the second terminal and the web server.
Step 305: when the acquired connection includes a connection between the second terminal and the web server, it is determined that the second terminal has logged in the user account, and step 311 is executed.
When the connection between the second terminal and the web server is determined, the second terminal is determined to have logged in the user account, and at this time, the web server can directly inform the data server to download the first file to the second terminal.
Step 306: and when the acquired connection does not include the connection between the second terminal and the web server, determining that the second terminal does not log in the user account.
In the embodiment of the present invention, when it is determined that the second terminal does not log in the user account, the web server cannot directly notify the data server to download the first file to the second terminal, and the user needs to be prompted to log in the user account by the second terminal, so that the web server can send the user account and the first file identifier to the storage server for storage.
Step 307: and the web server sends the user account and the first file identification to a storage server, so that the storage server stores the user account and the first file identification.
Specifically, the web server sends the user account and the first file identifier to the storage server, and when the storage server receives the user account and the first file identifier, the storage server stores the user account and the first file identifier in a corresponding relationship between the user account and the file identifier.
Step 308: and the web server sends login prompt information to the first terminal, wherein the login prompt information is used for prompting the user to enable the second terminal to log in the user account.
The web server may determine whether the second terminal has used the multimedia application before from a historical login record according to the user account and the second terminal identifier, and if the second terminal has not used the multimedia application before, the web server sends login prompt information to the first terminal, where the login prompt information may include a download address for downloading the application, and the download address may be included in a graphic code, such as a two-dimensional code, a barcode, or the like. As shown in fig. 5, the login prompt information displayed by the first terminal may include the two-dimensional code, and at this time, the second terminal may scan the graphic code, obtain the download address of the application, and then download and install the application. If the second terminal has used the application before, the web server may include a prompt message in the login prompt message sent to the first terminal, for example, the prompt message may be "please login on the second terminal".
Preferably, in order to reduce the complexity of downloading the file, the web server may not determine whether the second terminal has used the application before, and the web server may directly generate the login prompt information according to the download address of the application and the prompt information, as shown in fig. 6. Therefore, after the first terminal displays the login prompt information, if the user determines that the second terminal installs the application, the second terminal may directly log in the user account, and if the user determines that the second terminal does not install the application, the second terminal may download and install the application according to the download address and log in the user account.
The steps 307 and 308 are not in sequence, that is, the step 307 may be executed before the step 308, or may be executed after the step 307, or may be executed simultaneously with the step 307, which is not specifically limited in this embodiment of the present invention.
Step 309: and when the web server establishes connection with the second terminal, determining that the second terminal is logged in the user account.
After the prompt in step 307, the second terminal may log in the user account and establish a connection with the web server, and at this time, the web server may determine that the second terminal has logged in the user account.
Step 310: and the web server acquires the first file identifier from the storage server according to the user account.
Specifically, the web server sends an acquisition request to a storage server, where the acquisition request carries the user account. When the storage server receives the acquisition request, the storage server acquires a first file identifier from the corresponding relation between the stored user account and the file identifier according to the user account, and sends the first file identifier to the web server.
Step 311: the web server sends the user account and the first file identification to a data server.
When the web server determines that the second terminal has logged in to the user account through the above steps, the web server may send the user account and the first file identifier to the server, so that the data server sends the first file to the second terminal.
Step 312: and when the data server receives the user account and the first file identifier, the data server sends the first file to the second terminal based on the user account and the first file identifier.
Specifically, when the data server receives the user account and the first file identifier, the data server obtains the first file from the corresponding relationship between the stored file identifier and the file according to the first file identifier, and sends the first file to the second terminal based on the user account.
Further, after the data server sends the first file to the second terminal based on the user account and the first file identifier, the method further includes: and the data server sends a response message to the web server, and when the web server receives the response message, the web server sends download prompting information to the second terminal through the connection between the second terminal and the server, wherein the download prompting information is used for prompting the user that the second terminal is downloading the first file. For example, if the first document is named "we are always looking for", the second terminal may display a download alert message as shown in fig. 7.
Furthermore, when the first file is downloaded, the data server may further send a download completion message to the web server, and when the web server receives the download completion message, the web server sends a download completion prompt message to the second terminal through the connection between the second terminal and the server.
Alternatively, the steps 311 and 312 may be replaced by the following methods, including: the web server generates a second file downloading instruction based on the first file identification, and sends the second file downloading instruction to the second terminal through the connection between the second terminal and the web server based on the user account. And when the second terminal receives a second file downloading instruction, the second terminal sends a second file downloading request to the data server, wherein the second file downloading request carries the first file identifier. And when the data server receives the second file downloading request, the data server acquires the first file from the corresponding relation between the stored file identification and the file according to the first file identification, and sends the first file to the second terminal based on the user account.
Optionally, since the first file is larger and occupies more download traffic, in order to save traffic of the second terminal, when the second terminal downloads the first file from the data server, the second terminal determines whether the currently connected network is a wireless hotspot network, if the second terminal is currently connected to the wireless hotspot network, the second terminal performs a downloading step, and if the second terminal is currently connected to the mobile data network, the second terminal displays a prompt message to prompt whether to download the first file under the mobile data network. When it is determined that the first file is downloaded under the mobile data network, the second terminal performs the downloading step.
Further, in the embodiment of the present invention, when the downloaded file is a multimedia file, the file may be downloaded to the second terminal through the first terminal, and the second terminal may be controlled to play the file and display file information corresponding to the file through the first terminal, for example, a computer may be used to control a mobile phone to play a song, or display an album to which the song belongs, and singer information of the song. The method comprises the following specific steps:
the method comprises the steps that a Web server receives a file playing request sent by a first terminal, wherein the file playing request carries a user account and a second file identifier to be played, the file playing request is used for requesting a second terminal bound with the user account to play a second file, and the second file is a multimedia file; the web server inquires the connection between the second terminal and the web server according to the user account and the second terminal identification; and sending a playing instruction to the second terminal through the connection between the second terminal and the web server, so that the second terminal plays the second file, wherein the playing instruction carries the second file identifier.
Before the web server queries the connection between the second terminal and the web server according to the user account and the second terminal identifier, the web server may also determine the second terminal identifier bound to the user account, and the method for determining the second terminal identifier bound to the user account is the same as or similar to the method in step 303, which is not described herein again in this embodiment of the present invention.
Further, the user may also share the file with the friends of the user through the first terminal, including: the method comprises the steps that a web server receives a file sharing request sent by a first terminal, the file sharing request carries a friend user account and a third file identifier to be shared, and the file sharing request is used for requesting to share a third file to a third terminal corresponding to a friend of a user; the web server sends the friend user account and the third file identification to a data server, and the data server acquires a third file from the corresponding relation between the stored file identification and the file according to the third file identification; and sending the third file to a third terminal based on the friend user account.
The third terminal corresponding to the friend is a terminal bound with the friend account, and the terminal may be a mobile phone or a computer.
Further, if a third terminal corresponding to a friend does not log in the friend user account, the corresponding relationship between the friend user account and the third file identifier may be stored in the storage server, and when the third terminal logs in the friend user account, the third file identifier is obtained from the storage server, and the third file is shared with the third terminal corresponding to the friend.
In the embodiment of the invention, after the first terminal sends the first file downloading request to the server, when the server determines that the second terminal logs in the user account, the server directly sends the first file to the second terminal, and if the first terminal is a computer and the second terminal is a mobile phone, the first file downloading request is sent to the server through the computer, so that the condition that a mobile phone screen is small and error is easy to occur is avoided.
Fig. 8 is a schematic structural diagram of a file downloading device according to an embodiment of the present invention. Referring to fig. 8, the apparatus includes: a first receiving module 801, a determining module 802 and a first sending module 803.
A first receiving module 801, configured to receive a first file download request sent by a first terminal, where the first file download request carries a user account that the first terminal has logged in and a first file identifier to be downloaded, and the first file download request is used to request to download a first file to a second terminal bound to the user account;
a determining module 802, configured to determine that the second terminal has logged in the user account;
the first sending module 803 is configured to send the first file to the second terminal based on the user account and the first file identifier.
Optionally, as shown in fig. 9, the determining module 802 includes:
a determining unit 8021, configured to determine whether the second terminal has logged in the user account;
a first sending unit 8022, configured to send login prompt information to the first terminal when the second terminal does not log in the user account, so that the second terminal logs in the user account.
Alternatively, the judging unit 8021 includes:
the acquiring subunit is used for acquiring the connection between the terminal which has logged in the user account and the server according to the user account;
the first determining subunit is used for determining a second terminal identifier bound with the user account;
the judging subunit is used for judging whether the acquired connection comprises the connection between the second terminal and the server or not based on the second terminal identifier;
the second determining subunit is used for determining that the second terminal logs in the user account when the acquired connection comprises the connection between the second terminal and the server;
and the third determining subunit is used for determining that the second terminal does not log in the user account when the acquired connection does not include the connection between the second terminal and the server.
Optionally, the first sending unit 8022 includes:
the storage subunit is used for storing the user account and the first file identifier;
the sending subunit is configured to send login prompt information to the first terminal, where the login prompt information is used to prompt a user to log in a second terminal to the user account;
and the fourth determining subunit is used for determining that the second terminal has logged in the user account when the connection with the second terminal is established.
Optionally, the first determining subunit is specifically configured to:
according to the user account, acquiring a second terminal identifier bound with the user account from a corresponding relation between the stored user account and the terminal identifier, wherein the terminal identifier stored in the corresponding relation between the user account and the terminal identifier is the terminal identifier for logging in the user account in history; or,
and when the first file downloading request also carries a second terminal identifier, determining the second terminal identifier carried by the first file downloading request as the second terminal identifier bound with the user account.
Optionally, as shown in fig. 10, the apparatus further includes:
a second receiving module 804, configured to receive an identifier obtaining request sent by a first terminal, where the identifier obtaining request carries the user account;
a first obtaining module 805, configured to obtain, according to the user account, a corresponding terminal identifier from a stored correspondence between the user account and the terminal identifier;
a second sending module 806, configured to send the obtained terminal identifier to the first terminal, so that the first terminal determines the second terminal identifier from the obtained terminal identifier, and carries the second terminal identifier in the first file download request.
Optionally, as shown in fig. 11, the first sending module 803 includes:
a generating unit 8031, configured to generate a second file downloading instruction based on the first file identifier;
a second sending unit 8032, configured to send a second file download instruction to the second terminal based on the user account, so that the second terminal sends a second file download request to the server, where the second file download request carries the first file identifier;
an obtaining unit 8033, configured to, when a second file downloading request is received, obtain, according to the first file identifier, the first file from the stored correspondence between the file identifier and the file;
a third sending unit 8034, configured to send the first file to the second terminal.
Optionally, as shown in fig. 12, the apparatus further includes:
a third sending module 807, configured to send, through the connection between the second terminal and the server, a download prompting message to the second terminal, where the download prompting message is used to prompt the user that the second terminal is downloading the first file.
Optionally, as shown in fig. 13, the apparatus further includes:
a third receiving module 808, configured to receive a file playing request sent by the first terminal, where the file playing request carries the user account and a second file identifier to be played, and the file playing request is used to request the second terminal to play a second file, where the second file is a multimedia file;
the query module 809 is configured to query the connection between the second terminal and the server according to the user account and the second terminal identifier;
a fourth sending module 810, configured to send a play instruction to the second terminal through the connection between the second terminal and the server, so that the second terminal plays the second file, where the play instruction carries the second file identifier.
Optionally, as shown in fig. 14, the apparatus further includes:
a fourth receiving module 811, configured to receive a file sharing request sent by the first terminal, where the file sharing request carries a friend user account and a third file identifier to be shared, and the file sharing request is used to request to share a third file to a third terminal corresponding to a friend of the user;
a second obtaining module 812, configured to obtain a third file from a corresponding relationship between the stored file identifier and the file according to the third file identifier;
a fifth sending module 813, configured to send the third file to the third terminal based on the friend user account.
In the embodiment of the invention, after the first terminal sends the first file downloading request to the server, when the server determines that the second terminal logs in the user account, the server directly sends the first file to the second terminal, and if the first terminal is a computer and the second terminal is a mobile phone, the first file downloading request is sent to the server through the computer, so that the condition that a mobile phone screen is small and error is easy to occur is avoided.
It should be noted that: in the file downloading device provided in the above embodiment, only the division of the above functional modules is used for illustration when downloading the file, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the file downloading device and the file downloading method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (18)

1. A method for downloading a file, the method comprising:
receiving a first file downloading request sent by a first terminal, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account;
determining that the second terminal has logged in to the user account;
sending the first file to the second terminal based on the user account and the first file identifier;
the sending the first file to the second terminal based on the user account and the first file identifier includes:
generating a second file downloading instruction based on the first file identification;
sending the second file downloading instruction to the second terminal based on the user account, so that the second terminal sends a second file downloading request to a server, wherein the second file downloading request carries the first file identifier;
when the second file downloading request is received, acquiring a first file from the corresponding relation between the stored file identification and the file according to the first file identification;
and sending the first file to the second terminal.
2. The method of claim 1, wherein the determining that the second terminal is logged into the user account comprises:
judging whether the second terminal logs in the user account or not;
and when the second terminal does not log in the user account, sending login prompt information to the first terminal to enable the second terminal to log in the user account.
3. The method of claim 2, wherein the determining whether the second terminal is logged in to the user account comprises:
acquiring connection between a terminal which logs in the user account and a server according to the user account;
determining a second terminal identification bound with the user account;
judging whether the acquired connection comprises the connection between the second terminal and the server or not based on the second terminal identification;
when the acquired connection comprises the connection between the second terminal and the server, determining that the second terminal logs in the user account;
and when the acquired connection does not include the connection between the second terminal and the server, determining that the second terminal does not log in the user account.
4. The method of claim 2, wherein when the second terminal does not log in to the user account, sending a login prompt message to the first terminal to enable the second terminal to log in to the user account comprises:
storing the user account and the first file identification;
sending login prompt information to the first terminal, wherein the login prompt information is used for prompting a user to enable the second terminal to log in the user account;
and when the connection with the second terminal is established, determining that the second terminal has logged in the user account.
5. The method of claim 3, wherein the determining the second terminal identity bound to the user account comprises:
acquiring a second terminal identifier bound with the user account from a corresponding relation between the stored user account and the terminal identifier according to the user account, wherein the terminal identifier stored in the corresponding relation between the user account and the terminal identifier is the terminal identifier for logging in the user account in history; or,
and when the first file downloading request also carries a second terminal identifier, determining the second terminal identifier carried by the first file downloading request as the second terminal identifier bound with the user account.
6. The method of claim 1, wherein before receiving the first file download request sent by the first terminal, further comprising:
receiving an identification acquisition request sent by the first terminal, wherein the identification acquisition request carries the user account;
acquiring a corresponding terminal identifier from a corresponding relation between the stored user account and the terminal identifier according to the user account;
and sending the acquired terminal identification to the first terminal, so that the first terminal determines a second terminal identification from the acquired terminal identification, and the second terminal identification is carried in the first file downloading request.
7. The method of claim 1, wherein after sending the first file to the second terminal based on the user account and the first file identifier, further comprising:
and sending download prompt information to the second terminal through the connection between the second terminal and the server, wherein the download prompt information is used for prompting a user that the second terminal is downloading the first file.
8. The method of any one of claims 1-7, further comprising:
receiving a file playing request sent by the first terminal, wherein the file playing request carries the user account and a second file identifier to be played, and is used for requesting the second terminal to play a second file, and the second file is a multimedia file;
inquiring the connection between the second terminal and the server according to the user account and the second terminal identification;
and sending a playing instruction to the second terminal through the connection between the second terminal and the server, so that the second terminal plays the second file, wherein the playing instruction carries the second file identifier.
9. The method of any one of claims 1-7, further comprising:
receiving a file sharing request sent by the first terminal, wherein the file sharing request carries a friend user account and a third file identifier to be shared, and the file sharing request is used for requesting to share a third file to a third terminal corresponding to a friend of the user;
acquiring a third file from the corresponding relation between the stored file identification and the file according to the third file identification;
and sending the third file to the third terminal based on the friend user account.
10. A file download apparatus, characterized in that the apparatus comprises:
the first receiving module is used for receiving a first file downloading request sent by a first terminal, wherein the first file downloading request carries a user account logged in by the first terminal and a first file identifier to be downloaded, and the first file downloading request is used for requesting to download a first file to a second terminal bound with the user account;
the determining module is used for determining that the second terminal logs in the user account;
a first sending module, configured to send the first file to the second terminal based on the user account and the first file identifier;
the first transmitting module includes:
the generating unit is used for generating a second file downloading instruction based on the first file identification;
a second sending unit, configured to send the second file download instruction to the second terminal based on the user account, so that the second terminal sends a second file download request to a server, where the second file download request carries the first file identifier;
the acquisition unit is used for acquiring a first file from the corresponding relation between the stored file identification and the file according to the first file identification when the second file downloading request is received;
and the third sending unit is used for sending the first file to the second terminal.
11. The apparatus of claim 10, wherein the determining module comprises:
the judging unit is used for judging whether the second terminal logs in the user account or not;
and the first sending unit is used for sending login prompt information to the first terminal when the second terminal does not log in the user account, so that the second terminal logs in the user account.
12. The apparatus of claim 11, wherein the determining unit comprises:
the acquiring subunit is used for acquiring the connection between the terminal which has logged in the user account and the server according to the user account;
the first determining subunit is used for determining a second terminal identifier bound with the user account;
a determining subunit, configured to determine, based on the second terminal identifier, whether the obtained connection includes a connection between the second terminal and the server;
a second determining subunit, configured to determine that the second terminal has logged in the user account when the acquired connection includes a connection between the second terminal and the server;
and the third determining subunit is configured to determine that the second terminal does not log in the user account when the acquired connection does not include the connection between the second terminal and the server.
13. The apparatus of claim 11, wherein the first sending unit comprises:
the storage subunit is used for storing the user account and the first file identifier;
a sending subunit, configured to send login prompt information to the first terminal, where the login prompt information is used to prompt a user to log the second terminal in the user account;
and the fourth determining subunit is used for determining that the second terminal has logged in the user account when the connection with the second terminal is established.
14. The apparatus of claim 12,
the first determining subunit is specifically configured to:
acquiring a second terminal identifier bound with the user account from a corresponding relation between the stored user account and the terminal identifier according to the user account, wherein the terminal identifier stored in the corresponding relation between the user account and the terminal identifier is the terminal identifier for logging in the user account in history; or,
and when the first file downloading request also carries a second terminal identifier, determining the second terminal identifier carried by the first file downloading request as the second terminal identifier bound with the user account.
15. The apparatus of claim 10, wherein the apparatus further comprises:
a second receiving module, configured to receive an identifier obtaining request sent by the first terminal, where the identifier obtaining request carries the user account;
the first acquisition module is used for acquiring a corresponding terminal identifier from the stored corresponding relation between the user account and the terminal identifier according to the user account;
and the second sending module is used for sending the acquired terminal identification to the first terminal, so that the first terminal determines a second terminal identification from the acquired terminal identification, and the second terminal identification is carried in the first file downloading request.
16. The apparatus of claim 10, wherein the apparatus further comprises:
and the third sending module is used for sending download prompt information to the second terminal through the connection between the second terminal and the server, wherein the download prompt information is used for prompting a user that the second terminal is downloading the first file.
17. The apparatus of any one of claims 10-16, wherein the apparatus further comprises:
a third receiving module, configured to receive a file playing request sent by the first terminal, where the file playing request carries the user account and a second file identifier to be played, and the file playing request is used to request the second terminal to play a second file, where the second file is a multimedia file;
the query module is used for querying the connection between the second terminal and the server according to the user account and the second terminal identification;
and the fourth sending module is configured to send a play instruction to the second terminal through the connection between the second terminal and the server, so that the second terminal plays the second file, where the play instruction carries the second file identifier.
18. The apparatus of any one of claims 10-16, wherein the apparatus further comprises:
the fourth receiving module is configured to receive a file sharing request sent by the first terminal, where the file sharing request carries a friend user account and a third file identifier to be shared, and the file sharing request is used to request that a third file is shared to a third terminal corresponding to a friend of the user;
the second obtaining module is used for obtaining a third file from the corresponding relation between the stored file identification and the file according to the third file identification;
and the fifth sending module is used for sending the third file to the third terminal based on the friend user account.
CN201410583633.XA 2014-10-27 2014-10-27 Document down loading method and device Active CN104967646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410583633.XA CN104967646B (en) 2014-10-27 2014-10-27 Document down loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410583633.XA CN104967646B (en) 2014-10-27 2014-10-27 Document down loading method and device

Publications (2)

Publication Number Publication Date
CN104967646A CN104967646A (en) 2015-10-07
CN104967646B true CN104967646B (en) 2018-08-14

Family

ID=54221587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410583633.XA Active CN104967646B (en) 2014-10-27 2014-10-27 Document down loading method and device

Country Status (1)

Country Link
CN (1) CN104967646B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530239B (en) * 2015-11-26 2019-08-13 广州酷狗计算机科技有限公司 Multi-medium data acquisition methods and device
CN105763601A (en) * 2016-01-29 2016-07-13 北京小米移动软件有限公司 File sharing method and device
CN105933403A (en) * 2016-04-19 2016-09-07 乐视控股(北京)有限公司 Method and system for sharing content based on family account
CN106302773A (en) * 2016-08-23 2017-01-04 惠州市拉维尼科技有限公司 remote data processing method
CN108960378B (en) * 2018-08-08 2020-05-12 腾讯科技(深圳)有限公司 Data downloading method, system, device and storage medium
CN114024953B (en) * 2021-10-22 2024-02-23 北京达佳互联信息技术有限公司 File transmission method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101080056A (en) * 2006-12-21 2007-11-28 腾讯科技(深圳)有限公司 A management method and system of network browser collection folder of mobile terminal
CN103260079A (en) * 2013-04-12 2013-08-21 深圳市龙视传媒有限公司 Control method and control device for multi-screen interaction
CN103945009A (en) * 2014-05-09 2014-07-23 张志强 Software sharing method and device
CN104092723A (en) * 2014-04-04 2014-10-08 腾讯科技(深圳)有限公司 File downloading method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7797529B2 (en) * 2003-11-10 2010-09-14 Yahoo! Inc. Upload security scheme

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101080056A (en) * 2006-12-21 2007-11-28 腾讯科技(深圳)有限公司 A management method and system of network browser collection folder of mobile terminal
CN103260079A (en) * 2013-04-12 2013-08-21 深圳市龙视传媒有限公司 Control method and control device for multi-screen interaction
CN104092723A (en) * 2014-04-04 2014-10-08 腾讯科技(深圳)有限公司 File downloading method, device and system
CN103945009A (en) * 2014-05-09 2014-07-23 张志强 Software sharing method and device

Also Published As

Publication number Publication date
CN104967646A (en) 2015-10-07

Similar Documents

Publication Publication Date Title
CN104967646B (en) Document down loading method and device
US11991249B2 (en) Method, user equipment, server, and apparatus for implementing information sharing
US10193970B2 (en) Wireless synchronization of media content and subscription content
US10284494B2 (en) Device controlling method, client, server and intermediate device
CN107645561B (en) Picture preview method of cloud mobile phone
CN102819461B (en) Desktop synchronous method, device, equipment and system
WO2019134306A1 (en) Message processing method, device, terminal apparatus, and readable storage medium
US10187474B2 (en) Method and device for resource sharing between devices
US20140019582A1 (en) Method for processing invitation information and service server, mobile communication terminal and computer-readable recording medium for performing the same
CN102271165B (en) Device and method for sharing and managing resources searched on Internet
CN103634389A (en) File transfer method, device and system between calculation device and mobile device
CN107168765B (en) Method and system for remotely compiling software
EP3163946A1 (en) Information transmission method and apparatus, device, computer program and recording medium
CN103944994A (en) Distributed resource obtaining method and device
CN103747436A (en) Application program downloading method and device
CN110838969A (en) Picture transmission method, device, equipment and medium
CN110677443A (en) Data transmitting and receiving method, transmitting end, receiving end, system and storage medium
CN114610449B (en) Multi-cluster resource operation method and system based on unified request entry
CN115225627B (en) File transmission method, device, computer equipment and storage medium
CN115098301A (en) Snapshot generation method and system for stateful application in cloud native scene
CN111367592B (en) Information processing method and device
CN101997895A (en) File downloading method and equipment
CN108920658B (en) Mobile device desktop moving method and device and electronic device
CN102792328A (en) Method and apparatus for transmitting and receiving application/content based on purchase information
CN107395583B (en) Method and device for realizing communication between different applications based on natural language

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161101

Address after: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518000 Zhenxing Road, SEG Science Park 2 East Room 403

Applicant before: Tencent Technology (Shenzhen) Co., Ltd.

CB02 Change of applicant information

Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant before: Guangzhou KuGou Networks Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant