Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Fig. 1 is a kind of file download system Organization Chart that the embodiment of the present invention provides.See Fig. 1, this system comprises: first terminal, the second terminal and server.First terminal and the second terminal all for installing the application of viewing files, and pass through this application login user account, and check this file by this application, and first terminal can be personal computer, palmtop PC etc., and the second terminal can be mobile phone, pad etc.Server can comprise web server, storage server and data server, and the first file download request that web server sends for receiving first terminal, storage server is used for when the second non-login user account of terminal, store the corresponding relation between this user account and file identification, data server is used for storage file, and file to be downloaded is sent to the second terminal.
Fig. 2 is a kind of document down loading method flow chart that the embodiment of the present invention provides.See Fig. 2, the method comprises:
Step 201: receive the first file download request that first terminal sends, the listed user account of first terminal and the first file identification to be downloaded are carried in first file download request, and the first file download request is for asking second terminal of extremely being bound with this user account by the first file download.
Step 202: determine that the second terminal has logged in this user account.
Step 203: based on this user account and the first file identification, send the first file to the second terminal.
In embodiments of the present invention, after first terminal sends the first file download request to server, when server determines that the second terminal has logged in this user account, this server sends the first file directly to the second terminal, if first terminal is computer, second terminal is mobile phone, like this, the first file download request is sent to server by computer, avoid the less situation of easily makeing mistakes of mobile phone screen, and by computer to after server sends the first file download request, server directly by the first file download on mobile phone, do not have the first file download to computer, eliminate the process of file copy, decrease the time of download file, and then improve the efficiency of download file.
Alternatively, determine that the second terminal has logged in this user account, comprising:
Judge whether the second terminal has logged in this user account;
When the second terminal does not log in this user account, send login prompt information to first terminal, make the second terminal log in this user account.
Alternatively, judge whether the second terminal has logged in this user account, comprising:
According to this user account, obtain the connection logged between the terminal of this user account and server;
Determine the second terminal iidentification bound with this user account;
Based on the second terminal iidentification, judge the connection whether comprised in the connection obtained between the second terminal and server;
When the connection obtained comprises the connection between the second terminal and server, determine that the second terminal has logged in this user account;
When not comprising the connection between the second terminal and server in the connection obtained, determine that the second terminal does not log in this user account.
Alternatively, when the second terminal does not log in this user account, send login prompt information to first terminal, make the second terminal log in this user account, comprising:
Store this user account and the first file identification;
Send login prompt information to first terminal, this login prompt information makes the second terminal log in this user account for pointing out user;
When setting up the connection between the second terminal, determine that the second terminal has logged in this user account.
Alternatively, determine the second terminal iidentification bound with this user account, comprising:
According to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtain the second terminal iidentification bound with this user account, the terminal iidentification stored in the corresponding relation between this user account and terminal iidentification is the terminal iidentification of this user account of historical log; Or,
When the second terminal iidentification is also carried in the first file download request, the second terminal iidentification that the first file download request is carried is defined as the second terminal iidentification bound with this user account.
Alternatively, before receiving the first file download request of first terminal transmission, also comprise:
Receive the mark acquisition request that first terminal sends, this mark obtains request and carries this user account;
According to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtain corresponding terminal iidentification;
The terminal iidentification of acquisition is sent to first terminal, makes first terminal determine the second terminal iidentification from the terminal iidentification obtained, and the second terminal iidentification is carried in the first file download request.
Alternatively, based on this user account and the first file identification, send the first file to the second terminal, comprising:
Based on the first file identification, generate the second file download instructions;
Based on this user account, the second file download instructions is sent to the second terminal, make the second terminal to server send the second file download request, the first file identification is carried in the second file download request;
When receiving the second file download request, according to the first file identification, from the corresponding relation between the file identification stored and file, obtain the first file;
First file is sent to the second terminal.
Alternatively, based on this user account and the first file identification, after the second terminal sends the first file, also comprise:
By the connection between the second terminal and server, send prompting download information to the second terminal, this prompting download information is downloading the first file for pointing out user second terminal.
Alternatively, the method also comprises:
Receive the file playing request that first terminal sends, this file playing request carries user account and the second file identification to be played, and this file playing request is for asking the second terminal plays second file, and described second file is multimedia file;
According to this user account and the second terminal iidentification, inquire about the connection between the second terminal and server;
By the connection between the second terminal and server, send play instruction to the second terminal, make the second terminal plays second file, in this play instruction, carry the second file identification.
Alternatively, the method also comprises:
Receive the sharing files request that first terminal sends, good friend's user account and the 3rd file identification to be shared are carried in sharing files request, and sharing files request is for asking the 3rd sharing files to third terminal corresponding to the good friend of user;
According to the 3rd file identification, from the corresponding relation between the file identification stored and file, obtain the 3rd file;
Based on good friend's user account, the 3rd file is sent to third terminal.
Above-mentioned all alternatives, all can form optional embodiment of the present invention according to combining arbitrarily, the embodiment of the present invention repeats no longer one by one at this.
Fig. 3 is a kind of document down loading method flow chart that the embodiment of the present invention provides.In the method, server can comprise web server, storage server and data server, and web server, storage server and data server can be different servers, also can be the difference in functionality module on a station server.See Fig. 3, the method comprises:
Step 301: when first terminal receives the first file download instructions, first terminal sends the first file download request to web server, the listed user account of first terminal and the first file identification to be downloaded are carried in first file download request, and the first file download request is for asking second terminal of extremely being bound with this user account by the first file download.
In embodiments of the present invention, if first terminal is computer, second terminal is mobile phone, in order to reduce the error rate of download file, and improve the efficiency of download file, when needs are by file download to the second terminal, user can log in this user account at first terminal, and submits the first file download instructions to.This first file download instructions is used for the first file download to the second terminal logging in this user account.In concrete enforcement, when the first file is song, user can show instruction as shown in Figure 4 by modes such as right click first file, right click File menus and submit interface to, click " downloading to mobile phone " option in Fig. 4 as user after, determine that user submits the first file download instructions to first terminal.
Wherein, the first file can be document files, multimedia file etc., and multimedia file can be the file such as video, audio frequency, and when the first file is multimedia file, data server can be streaming media server.In addition, the first file identification can be the numbering of this article part, the title etc. of this file.Such as, this file is song, and the first file identification can be song title.
When web server receives the first file download request, this web server needs to judge whether the second terminal has logged in this user account, and when the second terminal does not log in this user account, login prompt information is sent to first terminal, make the second terminal log in this user account, specifically comprise following step 302 to step 309.
Step 302: when web server receives the first file download request, web server, according to this user account, obtains the connection logged between the terminal of this user account and web server.
During terminal login user account, all can set up one between terminal with web server and be connected, for the instruction message between transmission terminal and web server.And web server only has when determining the second terminal login user account, and data server just can be made in the first file download to the second terminal.So, when web server receives the first file download request, first need according to this user account, obtain the connection logged between the terminal of this user account and web server, and then judge whether the second terminal logs in this user account.
Because multiple terminal can log in same user account simultaneously, such as, mobile phone and computer can log in same user account simultaneously, so, user account can corresponding multiple connection, and during terminal login user account, web server all can record connection corresponding to this user account, such as, web server can be numbered the connection of setting up, and store user account and be connected the corresponding relation of numbering, when web server obtains connection corresponding to this user account, server can according to this user account, obtain corresponding connection from the user account stored and number with connecting the corresponding relation between numbering, and then obtain the connection logged between the terminal of this user account and web server.
It should be noted that, in embodiments of the present invention, the connection logged between the terminal of this user account and web server can connect for long, also can be short connection, preferably, the connection logged between the terminal of this user account and web server connects for long, can improve the efficiency of download file like this.
Step 303:web server determines the second terminal iidentification bound with this user account.
As described above, the corresponding multiple connection of a user account possibility, like this, connection between the terminal obtained and web server also can exist multiple, if web server judges whether the second terminal logs in this user account, this web server needs acquisition second terminal iidentification, and in embodiments of the present invention, the method obtaining the second terminal iidentification can comprise two kinds of modes:
First kind of way, according to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtain the second terminal iidentification bound with this user account, the terminal iidentification stored in the corresponding relation between this user account and terminal iidentification is the terminal iidentification of this user account of historical log.
Owing to storing the terminal iidentification of this user account of historical log in web server, the terminal iidentification of this this user account of historical log logs in the terminal iidentification of this user account before comprising the terminal iidentification of current this user account of login and current time, so, web server can according to this user account, corresponding terminal iidentification is obtained with the corresponding relation between terminal iidentification from the user account stored, and from the terminal iidentification obtained, select the second terminal iidentification, and then the second terminal iidentification selected is defined as the second terminal iidentification of binding with this user account.
Further, generally, only can there is the situation that a computer and mobile phone log in this user account simultaneously, so, in order to reduce the complexity of download file, when web server receives the first file download request, this web server directly can search current the second terminal iidentification having logged in this user account, if found, then the second terminal iidentification found is defined as the second terminal iidentification bound with this user account.
The second way, when the second terminal iidentification is also carried in the first file download request, the second terminal iidentification that the first file download request is carried is defined as the second terminal iidentification bound with this user account.
Be directed to the second way, before first terminal sends the first file download request to web server, first terminal can send to server and identify the request of acquisition, and this mark obtains in request and carries this user account, when server receives this mark acquisition request.Server, according to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtains corresponding terminal iidentification; The terminal iidentification of acquisition is sent to first terminal.When first terminal receives the terminal iidentification of acquisition, the terminal iidentification that display receives, make user select the second terminal iidentification from the terminal iidentification of display, when first terminal receives the second terminal iidentification of user's selection, the second terminal iidentification is carried in the first file download request.
Step 304: this web server, based on the second terminal iidentification, judges the connection whether comprised in the connection obtained between the second terminal and web server.
Particularly, this web server determines each terminal iidentification connecting correspondence obtained, the mark of the terminal of acquisition and the second terminal iidentification are compared, if there is the second terminal iidentification in the terminal iidentification obtained, then determine that the connection obtained comprises the connection between the second terminal and web server, otherwise, determine the connection do not comprised in the connection obtained between the second terminal and web server.
Step 305: when the connection obtained comprises the connection between the second terminal and web server, determine that the second terminal has logged in this user account, perform step 311.
When determine the second terminal with exist between web server be connected time, determine that the second terminal has logged in this user account, now, web server can directly notification data server by the first file download to the second terminal.
Step 306: when not comprising the connection between the second terminal and web server in the connection obtained, determine that the second terminal does not log in this user account.
In embodiments of the present invention, when determining that the second terminal does not log in this user account, this web server can not directly notification data server by the first file download to the second terminal, prompting user is needed to make the second terminal log in this user account, so this user account and the first file identification can send to storage server to store by this web server.
This user account and the first file identification are sent to storage server by step 307:web server, make storage server store this user account and the first file identification.
Particularly, this user account and the first file identification are sent to storage server by web server, when storage server receives this user account and the first file identification, storage server, by this user account and the first file identification, is stored in the corresponding relation between user account and file identification.
Step 308:web server sends login prompt information to first terminal, and this login prompt information makes the second terminal log in this user account for pointing out user.
This web server can according to this user account and the second terminal iidentification, from historical log record, determine whether this second terminal used multimedia application in the past, if this second terminal did not use this multimedia application in the past, then this web server sends login prompt information to first terminal, and can comprise the download address downloading this application in this login prompt information, this download address can be included in graphic code, such as, Quick Response Code, bar code etc.As shown in Figure 5, the login prompt information of first terminal display can comprise this Quick Response Code, and now, the second terminal can scan this graphic code, obtains the download address of this application, and then downloads and install this application.If this second terminal used this application in the past, then can comprise information in the login prompt information that web server sends to first terminal, such as, this information can be " please logging in the second terminal ".
Preferably, in order to reduce the complexity of download file, web server can not judge whether the second terminal used this application in the past, and this web server can directly generate login prompt information according to the download address of this application and information, as shown in Figure 6.So, after first terminal shows this login prompt information, if user determines that the second terminal installs this application, then the second terminal can directly log in this user account, if user determines that the second terminal does not install this application, then the second terminal according to this download address, can be downloaded and install this application, and logging in this user account.
The step of above-mentioned 307 and 308 does not have sequencing, that is to say, step 307 can perform before step 308, can perform after step 307 yet, and certainly, also can perform with step 307, the embodiment of the present invention is not specifically limited this simultaneously.
Step 309: when web server sets up the connection between the second terminal, determine that the second terminal has logged in this user account.
Wherein, after the prompting by above-mentioned steps 307, the second terminal can log in this user account, and sets up the connection between web server, and now, web server just can determine that the second terminal has logged in this user account.
Step 310: this web server, according to this user account, obtains the first file identification from storage server.
Particularly, this web server sends to storage server the request of acquisition, carries this user account in this acquisition request.When storage server receives this acquisition request, storage server, according to this user account, obtains the first file identification, and the first file identification is sent to this web server from the corresponding relation between the user account stored and file identification.
Step 311: this user account and the first file identification are sent to data server by this web server.
When by above-mentioned steps, web server determines that the second terminal has logged in this user account, this user account and the first file identification can be sent to server by this web server, make data server that the first file is sent to the second terminal.
Step 312: when data server receives this user account and the first file identification, data server, based on this user account and the first file identification, sends the first file to the second terminal.
Particularly, when data server receives this user account and the first file identification, data server is according to the first file identification, from the corresponding relation between the file identification stored and file, obtain the first file, and based on this user account, the first file is sent to the second terminal.
Further, data server is based on this user account and the first file identification, after the second terminal sends the first file, also comprise: data server sends response message to web server, when web server receives this response message, web server is by the connection between the second terminal and server, and send prompting download information to the second terminal, this prompting download information is downloading the first file for pointing out user second terminal.Such as, the name of the first file is called " we are always in searching ", then the second terminal can show prompting download information as shown in Figure 7.
Further, when the first file download completes, data server can also send download to web server and complete message, when web server receive this download complete message time, web server, by the connection between the second terminal and server, sends download to the second terminal and completes information.
Alternatively, the step of above-mentioned 311 and 312 can also replace in the following method, comprise: this web server is based on the first file identification, generate the second file download instructions, and based on this user account, by the connection between the second terminal and web server, the second file download instructions is sent to the second terminal.When the second terminal receives the second file download instructions, this second terminal sends the second file download request to data server, carries the first file identification in the second file download request.When data server receives the second file download request, this data server, according to the first file identification, from the corresponding relation between the file identification stored and file, obtains the first file, and based on this user account, the first file is sent to the second terminal.
Alternatively, because the first file is comparatively large, the downloading flow taken is more, so, in order to save the flow of the second terminal, when the second terminal downloads the first file from data server, whether the network of the current connection of the second terminal judges is hotspot network, if the second terminal current connection hotspot network, then the second terminal performs download step, if current connection mobile data network, then the second display reminding information, whether prompting downloads the first file under mobile data network.When determining to download the first file under mobile data network, then the second terminal performs download step.
Further, in embodiments of the present invention, when the file downloaded is multimedia file, not only can by first terminal to the second terminal downloading files, fileinfo etc. corresponding to the second terminal plays file, display file can also be controlled, such as, by conputer controlled mobile phone played songs by first terminal, or the special edition shown belonging to this song, and the singer informations etc. of this song.Specific as follows:
Web server receives the file playing request that first terminal sends, this file playing request carries this user account and the second file identification to be played, this file playing request is for asking the second terminal plays second file bound with this user account, and the second file is multimedia file; Web server, according to this user account and the second terminal iidentification, inquires about the connection between the second terminal and web server; By the connection between the second terminal and web server, send play instruction to the second terminal, make the second terminal plays second file, in this play instruction, carry the second file identification.
Wherein, web server is according to this user account and the second terminal iidentification, before inquiring about the connection between the second terminal and web server, this web server also can determine the second terminal iidentification bound with this user account, and determine that the method in the Methods and steps 303 of the second terminal iidentification bound with this user account is identical or similar, the embodiment of the present invention does not repeat them here.
Further, user can also share file by first terminal to the good friend of user, comprise: web server receives the sharing files request that first terminal sends, good friend's user account and the 3rd file identification to be shared are carried in this sharing files request, and this sharing files request is for asking the 3rd sharing files to third terminal corresponding to the good friend of user; Good friend's user account and the 3rd file identification are sent to data server by this web server, and data server, according to the 3rd file identification, from the corresponding relation between the file identification stored and file, obtains the 3rd file; Based on good friend's user account, the 3rd file is sent to third terminal.
Wherein, third terminal corresponding to good friend is the terminal of binding with good friend's account, and this terminal can be mobile phone, and can be also computer, the embodiment of the present invention be not specifically limited this.
Further, if when third terminal corresponding to good friend does not log in good friend's user account, also the corresponding relation between good friend's user account and the 3rd file identification can be stored in storage server, when third terminal logs in good friend's user account, the 3rd file identification is obtained again from storage server, and by the 3rd sharing files to third terminal corresponding to good friend.
In embodiments of the present invention, after first terminal sends the first file download request to server, when server determines that the second terminal has logged in this user account, this server sends the first file directly to the second terminal, if first terminal is computer, second terminal is mobile phone, like this, the first file download request is sent to server by computer, avoid the less situation of easily makeing mistakes of mobile phone screen, and by computer to after server sends the first file download request, server directly by the first file download on mobile phone, do not have the first file download to computer, eliminate the process of file copy, decrease the time of download file, and then improve the efficiency of download file.
Fig. 8 is a kind of file downloading device structural representation that the embodiment of the present invention provides.See Fig. 8, this device comprises: the first receiver module 801, determination module 802 and the first sending module 803.
First receiver module 801, for receiving the first file download request that first terminal sends, the listed user account of first terminal and the first file identification to be downloaded are carried in first file download request, and the first file download request is for asking second terminal of extremely being bound with this user account by the first file download;
Determination module 802, for determining that the second terminal has logged in this user account;
First sending module 803, for based on this user account and the first file identification, sends the first file to the second terminal.
Alternatively, as shown in Figure 9, determination module 802 comprises:
Judging unit 8021, for judging whether the second terminal has logged in this user account;
First transmitting element 8022, for when the second terminal does not log in this user account, sends login prompt information to first terminal, makes the second terminal log in this user account.
Alternatively, judging unit 8021 comprises:
Obtain subelement, for according to this user account, obtain the connection logged between the terminal of this user account and server;
First determines subelement, for determining the second terminal iidentification bound with this user account;
Judgment sub-unit, for based on the second terminal iidentification, judges the connection whether comprised in the connection obtained between the second terminal and server;
Second determines subelement, during for comprising the connection between the second terminal and server when the connection obtained, determines that the second terminal has logged in this user account;
3rd determines subelement, for when not comprising the connection between the second terminal and server in the connection obtained, determines that the second terminal does not log in this user account.
Alternatively, the first transmitting element 8022 comprises:
Storing sub-units, for storing this user account and the first file identification;
Send subelement, for sending login prompt information to first terminal, login prompt information makes the second terminal log in this user account for pointing out user;
4th determines subelement, for when setting up the connection between the second terminal, determines that the second terminal has logged in this user account.
Alternatively, first determines subelement, specifically for:
According to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtain the second terminal iidentification bound with this user account, the terminal iidentification stored in the corresponding relation between user account and terminal iidentification is the terminal iidentification of user account described in historical log; Or,
When the second terminal iidentification is also carried in the first file download request, the second terminal iidentification that the first file download request is carried is defined as the second terminal iidentification bound with this user account.
Alternatively, as shown in Figure 10, this device also comprises:
Second receiver module 804, the mark sent for receiving first terminal obtains request, and this mark obtains request and carries this user account;
First acquisition module 805, for according to this user account, from the corresponding relation between the user account stored and terminal iidentification, obtains corresponding terminal iidentification;
Second sending module 806, for the terminal iidentification of acquisition is sent to first terminal, makes first terminal determine the second terminal iidentification from the terminal iidentification obtained, and is carried in the first file download request by the second terminal iidentification.
Alternatively, as shown in figure 11, the first sending module 803 comprises:
Generation unit 8031, for based on the first file identification, generates the second file download instructions;
Second transmitting element 8032, for based on this user account, sends to the second terminal by the second file download instructions, and make the second terminal to server send the second file download request, the first file identification is carried in the second file download request;
Acquiring unit 8033, for when receiving the second file download request, according to the first file identification, from the corresponding relation between the file identification stored and file, obtains the first file;
3rd transmitting element 8034, for sending to the second terminal by the first file.
Alternatively, as shown in figure 12, this device also comprises:
3rd sending module 807, for passing through the connection between the second terminal and server, send prompting download information to the second terminal, prompting download information is downloading the first file for pointing out user second terminal.
Alternatively, as shown in figure 13, this device also comprises:
3rd receiver module 808, for receiving the file playing request that first terminal sends, this file playing request carries this user account and the second file identification to be played, and this file playing request is for asking the second terminal plays second file, and the second file is multimedia file;
Enquiry module 809, for according to this user account and the second terminal iidentification, inquires about the connection between the second terminal and server;
4th sending module 810, for by the connection between the second terminal and server, sends play instruction to the second terminal, makes the second terminal plays second file, carry the second file identification in this play instruction.
Alternatively, as shown in figure 14, this device also comprises:
4th receiver module 811, for receiving the sharing files request that first terminal sends, good friend's user account and the 3rd file identification to be shared are carried in this sharing files request, and this sharing files request is for asking the 3rd sharing files to third terminal corresponding to the good friend of user;
Second acquisition module 812, for according to the 3rd file identification, from the corresponding relation between the file identification stored and file, obtains the 3rd file;
5th sending module 813, for based on good friend's user account, sends to third terminal by the 3rd file.
In embodiments of the present invention, after first terminal sends the first file download request to server, when server determines that the second terminal has logged in this user account, this server sends the first file directly to the second terminal, if first terminal is computer, second terminal is mobile phone, like this, the first file download request is sent to server by computer, avoid the less situation of easily makeing mistakes of mobile phone screen, and by computer to after server sends the first file download request, server directly by the first file download on mobile phone, do not have the first file download to computer, eliminate the process of file copy, decrease the time of download file, and then improve the efficiency of download file.
It should be noted that: the file downloading device that above-described embodiment provides is when file download, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by device is divided into different functional modules, to complete all or part of function described above.In addition, the file downloading device that above-described embodiment provides and document down loading method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.