Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the invention, when the mobile terminal uploads the target file to the cloud server, the portable wifi (also called portable Wi-Fi) is used as an intermediate node for uploading the target file, the target file uploaded by the mobile terminal is cached and the operation of uploading the target file to the cloud server is asynchronously executed, so that the mobile terminal is separated from the uploading process of the target file, and the mobile terminal does not need to keep the working state of the mobile terminal and the stability and the usability of a mobile network for a long time because the time spent by the mobile terminal for uploading the target file to the portable wifi is short and the process of uploading the target file to the cloud server by the portable wifi is not needed.
The following embodiments are provided to illustrate the present invention:
referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a file transfer system according to an embodiment of the present invention, and as shown in fig. 1, the file transfer system includes: themobile terminal 10, the portable wifi20 and thecloud server 30; themobile terminal 10 is connected to a personal wifi20, and accesses thecloud server 30 through apersonal wifi 20.
In this embodiment, themobile terminal 10 is configured to receive an upload request for a target file, detect whether the target file is stored in thecloud server 30 and the personal wifi20, and upload the target file to the personal wifi20 when the detection determines that the target file is not stored in neither thecloud server 30 nor thepersonal wifi 20.
In this embodiment, the wifi20 is used for asynchronously uploading the target file to thecloud server 30 when the target file is stored; the method is used for receiving and storing the target file uploaded by themobile terminal 10 under the condition that the target file is not stored, and asynchronously uploading the target file to thecloud server 30.
In this embodiment, thecloud server 30 is configured to receive and store the target file asynchronously uploaded by the wifi with the user.
According to the file transmission system shown in fig. 1, in this embodiment, themobile terminal 10 is connected to the portable wifi20, and accesses thecloud server 30 through the portable wifi20, and when uploading the target file to thecloud server 30, if the target file is not stored in both thecloud server 30 and the portable wifi20, the target file only needs to be uploaded to the portable wifi20, and the portable wifi20 asynchronously transmits the target file to thecloud server 30. After themobile terminal 10 uploads the target file to the personal wifi20, the process of asynchronously uploading the target file to thecloud server 30 by the personal wifi20 does not need the participation of themobile terminal 10, so that the working state of themobile terminal 10 and the stability and availability of the mobile network do not need to be maintained for a long time.
The embodiment of the present invention further provides a second file transfer system, where the second file transfer system has the same system architecture as the file transfer system shown in fig. 1, that is, the second file transfer system also includes: themobile terminal 10, the portable wifi20 and thecloud server 30; themobile terminal 10 is connected to a personal wifi20, and accesses thecloud server 30 through apersonal wifi 20.
In this embodiment, themobile terminal 10 is configured to receive an upload request for a target file triggered by a user, detect whether the target file is stored in thecloud server 30 and the personal wifi20, and upload the target file to the personal wifi20 when it is determined by the detection that the target file is not stored in neither thecloud server 30 nor thepersonal wifi 20.
In this embodiment, themobile terminal 10 is further configured to: when detecting and determining that the target file is stored in thecloud server 20, a file upload prompt may be input, and the upload process is ended; when the detection determines that the target file is stored in the personal wifi20, a file cached prompt can be output, and the uploading process is ended.
In this embodiment, the wifi20 is used for asynchronously uploading the target file to thecloud server 30 when the target file is stored; the method is used for receiving and storing the target file uploaded by themobile terminal 10 under the condition that the target file is not stored, and asynchronously uploading the target file to thecloud server 30.
In practical applications, after themobile terminal 10 uploads the target file to the personal wifi20, if the user triggers the upload request for the target file again during the process of asynchronously uploading the target file to thecloud server 30 through the personal wifi20, the personal wifi20 may have stored the target file, and in this case, the personal wifi20 may automatically execute the operation of asynchronously uploading the stored target file to thecloud server 30, without the participation of themobile terminal 10.
In this embodiment, thecloud server 30 is configured to receive and store the target file asynchronously uploaded by the wifi with the user.
In this embodiment, themobile terminal 10 can know from theserver 30 whether the target file is stored in thecloud server 30 and thepersonal wifi 20.
Specifically, themobile terminal 10, detecting whether the target file is stored in thecloud server 30 and the personal wifi20, includes: the uploading request aiming at the target file is sent to thecloud server 30 through the personal wifi20, the uploading response returned by thecloud server 30 through the personal wifi20 is received, and whether the target file is stored in thecloud server 30 and the personal wifi20 or not is determined according to the uploading response.
Here, themobile terminal 10, determining whether the target file is stored in thecloud server 30 and the personal wifi20 according to the upload response, specifically includes: if the upload response indicates that thecloud server 30 has stored the target file, it is determined that thecloud server 30 has stored the target file, if the upload response indicates that the personal wifi20 has stored the target file, it is determined that the target file has stored in the personal wifi20, and if the upload response indicates that the target file has not been stored in both thecloud server 30 and the personal wifi20, it is determined that the target file has not been stored in both thecloud server 30 and thepersonal wifi 20.
In this embodiment, thecloud server 30 is configured to receive an upload request sent by themobile terminal 10 via the personal wifi20, detect whether a target file is stored in thecloud server 30, and whether thecloud server 30 is receiving the target file uploaded by the personal wifi20, if the target file is stored in thecloud server 30, return an upload response indicating that thecloud server 30 has stored the target file via the personal wifi20, if thecloud server 30 is receiving the target file uploaded by the personal wifi20, return an upload response indicating that the personal wifi20 has stored the target file via the personal wifi20, and otherwise return an upload response indicating that the target file is not stored in both thecloud server 30 and the personal wifi20 via thepersonal wifi 20.
As can be seen from the content of the second file transmission system, in this embodiment, after receiving the upload request for the target file, themobile terminal 10 sends the upload request to thecloud server 30 via the portable wifi20, and thecloud server 30 locally detects whether the target file is already stored and whether the portable wifi20 is uploading the target file to thecloud server 30, so as to notify the detection result to themobile terminal 10 through the upload response, so that themobile terminal 10 determines that the target file is not stored in both thecloud server 30 and the portable wifi20, and only needs to upload the target file to the portable wifi20, and asynchronously transmit the target file to thecloud server 30 through theportable wifi 20. After themobile terminal 10 uploads the target file to the personal wifi20, the process of asynchronously uploading the target file to thecloud server 30 by the personal wifi20 does not need the participation of themobile terminal 10, so that the working state of themobile terminal 10 and the stability and availability of the mobile network do not need to be maintained for a long time.
The embodiment of the present invention further provides a third file transfer system, where the third file transfer system has the same system architecture as the file transfer system shown in fig. 1, that is, the third file transfer system also includes: themobile terminal 10, the portable wifi20 and thecloud server 30; themobile terminal 10 is connected to a personal wifi20, and accesses thecloud server 30 through apersonal wifi 20.
In this embodiment, themobile terminal 10 is configured to receive an upload request for a target file triggered by a user, detect whether the target file is stored in thecloud server 30 and the personal wifi20, and upload the target file to the personal wifi20 when it is determined by the detection that the target file is not stored in neither thecloud server 30 nor thepersonal wifi 20.
In this embodiment, themobile terminal 10 is further configured to: when detecting and determining that the target file is stored in thecloud server 20, a file upload prompt may be input, and the upload process is ended; when the detection determines that the target file is stored in the personal wifi20, a file cached prompt can be output, and the uploading process is ended.
In this embodiment, the wifi20 is used for asynchronously uploading the target file to thecloud server 30 when the target file is stored; the method is used for receiving and storing the target file uploaded by themobile terminal 10 under the condition that the target file is not stored, and asynchronously uploading the target file to thecloud server 30.
In practical applications, after themobile terminal 10 uploads the target file to the personal wifi20, if the user triggers the upload request for the target file again during the process of asynchronously uploading the target file to thecloud server 30 through the personal wifi20, the personal wifi20 may have stored the target file, and in this case, the personal wifi20 may automatically execute the operation of asynchronously uploading the stored target file to thecloud server 30, without the participation of themobile terminal 10.
In this embodiment, the personal wifi20 receives and stores the target file uploaded by themobile terminal 10, and asynchronously uploads the target file to thecloud server 30, which specifically includes: and receiving the target file uploaded by themobile terminal 10, storing the target file into a free storage space when detecting that the free storage space enough for storing the target file exists in the personal wifi20, and asynchronously uploading the target file stored in the space storage space to thecloud server 30. Correspondingly, thecloud server 30 is configured to receive and store the target file asynchronously uploaded by the portable wifi.
In this embodiment, after receiving the target file uploaded by themobile terminal 10, the wifi20 further includes: and synchronously uploading the target file to thecloud server 30 when detecting that no free storage space enough for storing the target file exists in thepersonal wifi 20. Correspondingly, thecloud server 30 is used for receiving and storing the target file uploaded synchronously by thepersonal wifi 20.
According to the content of the third file transmission system, in this embodiment, when receiving the target file uploaded by themobile terminal 10, the portable wifi20 is divided into two processing modes according to whether there is enough free storage space locally for storing the target file, one is enough free storage space, in this case, the target file is stored in the free storage space, and the portable wifi20 will asynchronously store the stored target file to thecloud server 30; the other is that there is not enough free storage space, in which case the personal wifi20 will not store the target file, but rather upload the target file to thecloud server 30 synchronously. In this way, on one hand, the wifi20 can be enabled to perform the target file asynchronous uploading operation instead of themobile terminal 10 when there is enough storage space, so that themobile terminal 10 does not need to keep the working state and the mobile network stable and available for a long time, and on the other hand, the wifi20 can still support themobile terminal 10 to upload the target file to thecloud server 30 when there is not enough storage space.
The embodiment of the present invention further provides a fourth file transfer system, where the fourth file transfer system has the same system architecture as the file transfer system shown in fig. 1, that is, the fourth file transfer system also includes: themobile terminal 10, the portable wifi20 and thecloud server 30; themobile terminal 10 is connected to a personal wifi20, and accesses thecloud server 30 through apersonal wifi 20.
In this embodiment, themobile terminal 10 is configured to receive an upload request for a target file triggered by a user, detect whether the target file is stored in thecloud server 30 and the personal wifi20, and upload the target file to the personal wifi20 when it is determined by the detection that the target file is not stored in neither thecloud server 30 nor thepersonal wifi 20.
In this embodiment, themobile terminal 10 is further configured to: when detecting and determining that the target file is stored in thecloud server 20, a file upload prompt may be input, and the upload process is ended; when the detection determines that the target file is stored in the personal wifi20, a file cached prompt can be output, and the uploading process is ended.
In this embodiment, the wifi20 is used for asynchronously uploading the target file to thecloud server 30 when the target file is stored; the method is used for receiving and storing the target file uploaded by themobile terminal 10 under the condition that the target file is not stored, and asynchronously uploading the target file to thecloud server 30.
In practical applications, after themobile terminal 10 uploads the target file to the personal wifi20, if the user triggers the upload request for the target file again during the process of asynchronously uploading the target file to thecloud server 30 through the personal wifi20, the personal wifi20 may have stored the target file, and in this case, the personal wifi20 may automatically execute the operation of asynchronously uploading the stored target file to thecloud server 30, without the participation of themobile terminal 10.
In practical application, users can share files with each other. For example, a user may share a file a (which may be the target file) with another user during uploading of the file a to thecloud server 30 or after uploading of the file a to thecloud server 30 by using themobile terminal 10, specifically, the user may trigger a sharing request for the file a being uploaded or having been uploaded to the cloud server, after receiving the sharing request, themobile terminal 10 may send the sharing to thecloud server 30 via the wifi20, thecloud server 30 generates a sharing link pointing to the file a, and returns the sharing link to themobile terminal 10, and then, the user may provide the sharing link to another user by using themobile terminal 10, so that another user may download the file a through the sharing link.
In this embodiment, themobile terminal 10 is configured to receive a sharing request for a first file to be shared that is being uploaded or is uploaded to thecloud server 30, send the sharing request to thecloud server 30 via the wifi with the mobile terminal, receive a sharing response returned by thecloud server 30 via the wifi with the mobile terminal, and provide a sharing link carried by the sharing response to other users. Here, the sharing link is provided to the other user, for example, it may be sent to the other user by mail or instant messaging software (such as WeChat), so that the other user may download the file by clicking the sharing link.
In this embodiment, thecloud server 30 is configured to receive a sharing request for the first file to be shared, which is sent by themobile terminal 10 via the personal wifi20, generate a sharing link pointing to the first file to be shared according to the sharing request, and return a sharing response carrying the sharing link to themobile terminal 10 via thepersonal wifi 20.
In practical application, themobile terminal 10 may serve as a sharing initiator to provide the sharing link pointing to the first file to be shared to other users, and may also serve as a sharing receiver to obtain the sharing link pointing to the second file to be shared, which is provided by other users as the sharing initiator.
In this embodiment, the mobile terminal 10 is configured to receive a download request for a second file to be shared, which is pointed by a sharing link provided by another user, and send the download request to the wifi20, where the sharing link provided by the another user is generated by the cloud server 30 according to the sharing request sent by the another user for the second file to be shared, which is being uploaded or is uploaded to the cloud server 30; the file sharing system is used for receiving a second file to be shared issued by the portable wifi20 when the second file to be shared is determined to be stored (namely, the second file to be shared is downloaded from the portable wifi20, and the situation that the second file to be shared is downloaded from the portable wifi20 occurs when the sharing initiator and the sharing receiver are connected with the same portable wifi); the file sharing method includes receiving a second file to be shared (that is, downloading the second file to be shared from the cloud server 30) issued by the cloud server 30 when the second file to be shared is determined to be stored; the file uploading schedule is used for receiving the uploading schedule of the second file to be shared returned by the cloud server 30 through the personal wifi20 when the second file to be shared is determined not to be stored;
in this embodiment, the portable wifi20 is configured to receive a download request for a second file to be shared sent by themobile terminal 10, detect whether the portable wifi stores the second file to be shared, if the portable wifi stores the second file to be shared, send the second file to be shared to themobile terminal 10, and if the portable wifi does not store the second file to be shared, send the download request for the second file to be shared to thecloud server 30;
in this embodiment, thecloud server 30 is configured to receive a download request for a second file to be shared sent by the personal wifi20, detect whether the second file to be shared is stored in thecloud server 30, if the second file to be shared is stored, send the second file to be shared to themobile terminal 10 via the personal wifi20, otherwise, determine an upload progress of the second file to be shared, and send the upload progress of the second file to be shared to themobile terminal 10 via thepersonal wifi 20.
In this embodiment, when the second file to be shared is not stored in thecloud server 30, it indicates that the second file to be shared is not uploaded to thecloud server 30 by the wifi20, and at this time, thecloud server 30 may determine the uploading progress of the second file to be shared according to the content size of the uploaded file.
According to the content of the fourth file transmission system, in this embodiment, the users can share files, specifically, the sharing initiator initiates a sharing request for the file to be shared to thecloud server 30 by using themobile terminal 10, so that thecloud server 30 generates a sharing link pointing to the file to be shared and returns the sharing link to themobile terminal 10, and thus the sharing initiator can provide the sharing link to the sharing recipient, and the sharing recipient can download the file to be shared through the sharing link, thereby implementing file sharing between the users. In the process of sharing the file, for the situation that the sharing initiator and the sharing receiver are located in the same personal wifi, the sharing receiver also reduces the processing pressure of thecloud server 30 by downloading the file to be shared from the personal wifi20 in the situation that the file to be shared may be stored in thepersonal wifi 20.
The embodiment of the present invention further provides a fifth file transfer system, where the fifth file transfer system has the same system architecture as the file transfer system shown in fig. 1, that is, the fifth file transfer system also includes: themobile terminal 10, the portable wifi20 and thecloud server 30; themobile terminal 10 is connected to a personal wifi20, and accesses thecloud server 30 through apersonal wifi 20.
In this embodiment, themobile terminal 10 is configured to receive an upload request for a target file triggered by a user, detect whether the target file is stored in thecloud server 30 and the personal wifi20, and upload the target file to the personal wifi20 when it is determined by the detection that the target file is not stored in neither thecloud server 30 nor thepersonal wifi 20.
In this embodiment, themobile terminal 10 is further configured to: when detecting and determining that the target file is stored in thecloud server 20, a file upload prompt may be input, and the upload process is ended; when the detection determines that the target file is stored in the personal wifi20, a file cached prompt can be output, and the uploading process is ended.
In this embodiment, the wifi20 is used for asynchronously uploading the target file to thecloud server 30 when the target file is stored; the method is used for receiving and storing the target file uploaded by themobile terminal 10 under the condition that the target file is not stored, and asynchronously uploading the target file to thecloud server 30.
In practical applications, after themobile terminal 10 uploads the target file to the personal wifi20, if the user triggers the upload request for the target file again during the process of asynchronously uploading the target file to thecloud server 30 through the personal wifi20, the personal wifi20 may have stored the target file, and in this case, the personal wifi20 may automatically execute the operation of asynchronously uploading the stored target file to thecloud server 30, without the participation of themobile terminal 10.
In this embodiment, the user can select two uploading modes of uploading files through the portable wifi and uploading files without the portable wifi to be performed simultaneously, thecloud server 30 can compare the uploading end times of the two modes, and after the uploading of one of the uploading modes is finished, the uploading operation of the other uploading mode can be stopped, so that the uploading speed competition of the two uploading modes can be realized.
In this embodiment, after uploading the target file to the wifi20, themobile terminal 10 further includes: the connection with the portable wifi20 is disconnected, and thecloud server 30 is accessed through an access mode except theportable wifi 20.
In this embodiment, after themobile terminal 10 accesses thecloud server 30 by an access method other than the wifi20, the method further includes: receiving an uploading request aiming at the target file again, determining whether the target file needs to be uploaded again, and if the target file needs to be uploaded again, directly uploading the target file to thecloud server 30 according to an access mode of accessing thecloud server 30; if the target file does not need to be uploaded again, the target file is not directly uploaded to thecloud server 30.
In this embodiment, thecloud server 30 is configured to receive and store a target file directly uploaded by themobile terminal 10; the method is used for detecting the end time of directly uploading the target file by themobile terminal 10 and the end time of asynchronously uploading the target file by the portable wifi20, stopping the operation of asynchronously uploading the target file by the portable wifi20 when the first end of directly uploading the target file by themobile terminal 10 is detected, and stopping the operation of directly uploading the target file by themobile terminal 10 when the first end of asynchronously uploading the target file by the portable wifi20 is detected.
In practical applications, the target file is asynchronously transmitted to thecloud server 30 by the personal wifi20, since the target file has already been uploaded to the personal wifi20 before themobile terminal 10 disconnects from thepersonal wifi 20. Therefore, when themobile terminal 10 disconnects from the personal wifi20 and uploads the target file to thecloud server 30 again, thecloud server 30 may already store the target file or receive the file uploaded by the personal wifi20, and therefore, thecloud server 30 may notify that the stored target file or the target file is being uploaded, and in the case that the target file is being uploaded, the client may output an upload confirmation prompt and perform an upload operation after the user confirms the upload, so as to avoid a repeated upload situation that does not meet the user requirements.
In this embodiment, themobile terminal 10, determining whether the target file needs to be uploaded again, includes: the uploading request is directly sent to thecloud server 30, an uploading response directly returned by thecloud server 30 is received, and when the uploading response indicates that thecloud server 30 has stored the target file, it is determined that the target file does not need to be uploaded again; when the uploading response indicates that the wifi20 has stored the uploading response of the target file (at this time, it indicates that the wifi20 is uploading the target file to the cloud server 30), outputting a re-uploading confirmation request, if the uploading confirmation response indicating that the user needs to upload again is received, determining that the target file needs to be uploaded again, and if the uploading confirmation response indicating that the user does not need to upload again is received, determining that the target file does not need to be uploaded again;
in this embodiment, thecloud server 30 is configured to receive an upload request directly sent by themobile terminal 10, detect whether a target file is stored in thecloud server 10 and whether thecloud server 30 is receiving the target file uploaded by the wifi20, and return an upload response indicating that thecloud server 30 has stored the target file when thecloud server 30 has stored the target file; when thecloud server 30 is receiving a target file uploaded by the personal wifi20, an upload response is returned indicating that the personal wifi20 has stored the target file.
According to the content of the fifth file transmission system, in this embodiment, when themobile terminal 10 asynchronously uploads the target file to thecloud server 30 by using the portable wifi20, the connection with the portable wifi20 may also be disconnected, and then the target file is directly uploaded to thecloud server 30, the cloud server detects the end time of the two uploading manners, and after the uploading operation of any one uploading manner is completed, the uploading operation of the other uploading manner is stopped, so that the speed competition of the two uploading manners is realized, and by using the method, when a user is in a hurry to upload the file, the two manners can be selected for uploading, so that the file can be transmitted to thecloud server 30 in the shortest time.
The file transfer system provided in the embodiment of the present invention is described in detail above, and the embodiment of the present invention also provides a file transfer method, which is described in detail below with reference to fig. 2:
referring to fig. 2, fig. 2 is a flowchart of a file transmission method according to an embodiment of the present invention, where the method is applied to a mobile terminal, and the mobile terminal is connected to a portable wifi and accesses a cloud server through the portable wifi; as shown in fig. 2, the method comprises the steps of:
step 201, receiving an uploading request aiming at a target file;
step 202, detecting whether a target file is stored in the cloud server and the portable wifi;
step 203, when detecting and determining that the portable wifi has the stored target file, the portable wifi asynchronously uploads the stored target file to the cloud server;
and step 204, when the detection determines that the target file is not stored in the cloud server and the portable wifi, uploading the target file to the portable wifi, and asynchronously uploading the target file to the cloud server by the portable wifi.
In this embodiment, further comprising: and when the target file stored in the cloud server is detected and determined, no uploading operation is executed any more, and the process is ended.
In the process shown in figure 2 of the drawings,
whether the target file is stored in the cloud server and the portable wifi or not is detected, and the method comprises the following steps:
sending an uploading request aiming at a target file to a cloud server through a personal wifi so that the cloud server detects whether the target file is stored in the cloud server and whether the cloud server receives the target file uploaded by the personal wifi, if the target file is stored in the cloud server, returning an uploading response indicating that the cloud server has stored the target file through the personal wifi, if the cloud server receives the target file uploaded by the personal wifi, returning an uploading response indicating that the personal wifi stores the target file through the personal wifi, and if not, returning an uploading response indicating that the cloud server and the personal wifi do not store the target file through the personal wifi;
and receiving an uploading response returned by the cloud server through the portable wifi, and determining whether the target file is stored in the cloud server and the portable wifi according to the uploading response.
The method of fig. 2, further comprising:
receiving a sharing request aiming at a first file to be shared which is being uploaded or is uploaded to a cloud server, sending the sharing request to the cloud server through a portable wifi, enabling the cloud server to generate a sharing link pointing to the first file to be shared according to the sharing request, and returning a sharing response carrying the sharing link to the mobile terminal through the portable wifi;
and receiving a sharing response returned by the cloud server through the personal wifi, and providing the sharing link carried by the sharing response to other users.
In the method shown in fig. 2, further comprising:
receiving a downloading request of a second file to be shared, which is pointed by sharing links provided by other users, sending the downloading request to the portable wifi, so that the portable wifi detects whether the second file to be shared is stored in the portable wifi, and if the second file to be shared is stored, sending the second file to be shared to the mobile terminal; if the second file to be shared is not stored, sending a downloading request aiming at the second file to be shared to the cloud server, so that the cloud server detects whether the second file to be shared is stored in the cloud server, if the second file to be shared is stored, sending the second file to be shared to the mobile terminal through the personal wifi, and if the second file to be shared is not stored, determining the uploading progress of the second file to be shared, and sending the uploading progress of the second file to be uploaded to the mobile terminal through the wifi; the sharing link provided by other users is generated by the cloud server according to a sharing request sent by the other users for a second file to be shared which is being uploaded or is uploaded to the cloud server;
receiving a second file to be shared issued by the personal wifi when the second file to be shared is determined to be stored; or receiving a second file to be shared issued by the cloud server when the second file to be shared is determined to be stored; or receiving the uploading progress of the second file to be shared returned by the cloud server through the personal wifi when the second file to be shared is determined not to be stored.
In the process shown in figure 2 of the drawings,
after uploading the target file to the wifi, the method further comprises: disconnecting the connection with the portable wifi, and accessing the cloud server in an access mode except the portable wifi;
after accessing the cloud server through an access mode except the wifi, the method further comprises the following steps: receiving an uploading request aiming at the target file again, determining whether the target file needs to be uploaded again, if the target file needs to be uploaded again, directly uploading the target file to the cloud server according to an access mode of the access cloud server, enabling the cloud server to receive and store the target file directly uploaded by the mobile terminal, detecting the end time of the target file directly uploaded by the mobile terminal and the end time of the target file asynchronously uploaded by the portable wifi, stopping the operation of the target file asynchronously uploaded by the portable wifi when the first end of the target file directly uploaded by the mobile terminal is detected, and stopping the operation of the target file directly uploaded by the mobile terminal when the first end of the target file asynchronously uploaded by the portable wifi is detected.
In the process shown in figure 2 of the drawings,
the determining whether the target file needs to be uploaded again includes:
the uploading request is directly sent to the cloud server, so that the cloud server detects whether a target file is stored in the cloud server and whether the cloud server receives the target file uploaded by the portable wifi, and when the cloud server stores the target file, an uploading response indicating that the cloud server stores the target file is returned; when the cloud server is receiving the target file uploaded by the personal wifi, returning an uploading response indicating that the personal wifi has stored the target file;
receiving an uploading response directly returned by the cloud server, and determining that the target file does not need to be uploaded again when the uploading response indicates that the target file is stored in the cloud server; when the uploading response indicates that the uploading response of the target file has been stored in the wifi, a re-uploading confirmation request is output, if the uploading confirmation response that the indication of the user needs to be uploaded again is received, the target file is determined to need to be uploaded again, and if the uploading confirmation response that the indication of the user does not need to be uploaded again is received, the target file does not need to be uploaded again.
The embodiment of the invention also provides a file transmission device, which is applied to a mobile terminal, wherein the mobile terminal is connected to the portable wifi and is accessed to the cloud server through the portable wifi; as shown in fig. 3, the apparatus includes:
atransceiving unit 301, configured to receive an upload request for a target file;
thedetection unit 302 is used for detecting whether a target file is stored in the cloud server and the portable wifi;
theuploading unit 303 is used for asynchronously uploading the stored target file to the cloud server by the portable wifi when thedetection unit 302 detects and determines that the portable wifi has the stored target file; when thedetection unit 302 detects that the target file is not stored in the cloud server and the portable wifi, the target file is uploaded to the portable wifi, and the target file is asynchronously uploaded to the cloud server through the portable wifi.
In the device shown in figure 3 of the drawings,
the detectingunit 302 detects whether a target file is stored in the cloud server and the portable wifi, and includes:
sending an uploading request aiming at a target file to a cloud server through a personal wifi so that the cloud server detects whether the target file is stored in the cloud server and whether the cloud server receives the target file uploaded by the personal wifi, if the target file is stored in the cloud server, returning an uploading response indicating that the cloud server has stored the target file through the personal wifi, if the cloud server receives the target file uploaded by the personal wifi, returning an uploading response indicating that the personal wifi stores the target file through the personal wifi, and if not, returning an uploading response indicating that the cloud server and the personal wifi do not store the target file through the personal wifi;
after receiving an upload response returned by the cloud server via the personal wifi, thetransceiving unit 301 determines whether the target file is stored in the cloud server and the personal wifi according to the upload response;
thetransceiver unit 301 is configured to receive an upload response returned by the cloud server via the personal wifi.
In the device shown in figure 3 of the drawings,
thetransceiver unit 301 is further configured to: receiving a sharing request aiming at a first file to be shared which is being uploaded or is uploaded to a cloud server, sending the sharing request to the cloud server through a portable wifi, enabling the cloud server to generate a sharing link pointing to the first file to be shared according to the sharing request, and returning a sharing response carrying the sharing link to the mobile terminal through the portable wifi;
thetransceiver unit 301 is further configured to receive a sharing response returned by the cloud server via the personal wifi, and provide a sharing link carried by the sharing response to other users.
In the device shown in figure 3 of the drawings,
thetransceiving unit 301 is further configured to receive a download request of a second file to be shared, which is pointed by a sharing link provided by another user, and send the download request to the portable wifi, so that the portable wifi detects whether the second file to be shared is stored in the portable wifi, and if the second file to be shared is stored in the portable wifi, the second file to be shared is sent to the mobile terminal; if the second file to be shared is not stored, sending a downloading request aiming at the second file to be shared to the cloud server, so that the cloud server detects whether the second file to be shared is stored in the cloud server, if the second file to be shared is stored, sending the second file to be shared to the mobile terminal through the personal wifi, and if the second file to be shared is not stored, determining the uploading progress of the second file to be shared, and sending the uploading progress of the second file to be uploaded to the mobile terminal through the wifi; the sharing link provided by other users is generated by the cloud server according to a sharing request sent by the other users for a second file to be shared which is being uploaded or is uploaded to the cloud server;
thetransceiver unit 301 is further configured to: receiving a second file to be shared issued by the personal wifi when the second file to be shared is determined to be stored; or receiving a second file to be shared issued by the cloud server when the second file to be shared is determined to be stored; or receiving the uploading progress of the second file to be shared returned by the cloud server through the personal wifi when the second file to be shared is determined not to be stored.
The apparatus shown in fig. 3 further includes aconnection unit 304 and aconfirmation unit 305;
theconnection unit 305 is used for disconnecting the connection with the portable wifi after thetransceiving unit 301 uploads the target file to the portable wifi, and accessing the cloud server in an access mode except the portable wifi;
thetransceiving unit 301 is configured to receive an upload request for the target file again after theconnection unit 304 accesses the cloud server through an access method other than wifi;
the confirming unit 306 is configured to determine whether the target file needs to be uploaded again after thetransceiving unit 301 receives the upload request for the target file again;
theuploading unit 303 is configured to, if the determiningunit 305 determines that the target file needs to be uploaded again, directly upload the target file to the cloud server according to an access manner of accessing the cloud server, so that the cloud server receives and stores the target file directly uploaded by the mobile terminal, detect an end time of directly uploading the target file by the mobile terminal and an end time of asynchronously uploading the target file by the wifi, stop the operation of asynchronously uploading the target file by the wifi when it is detected that the target file directly uploaded by the mobile terminal is first ended, and stop the operation of directly uploading the target file by the mobile terminal when it is detected that the target file asynchronously uploaded by the wifi is first ended.
In the device shown in figure 3 of the drawings,
the determiningunit 305, determining whether the target file needs to be uploaded again, includes:
theinstruction transceiving unit 301 directly transmits the upload request to the cloud server, so that the cloud server detects whether a target file is stored in the cloud server and whether the cloud server is receiving the target file uploaded by the portable wifi, and when the cloud server has stored the target file, returns an upload response indicating that the cloud server has stored the target file; when the cloud server is receiving the target file uploaded by the personal wifi, returning an uploading response indicating that the personal wifi has stored the target file;
after thetransceiving unit 301 receives an upload response directly returned by the cloud server, when the upload response indicates that the cloud server has stored the target file, it is determined that the target file does not need to be uploaded again; when the uploading response indicates that the uploading response of the target file has been stored in the wifi, outputting a re-uploading confirmation request, if the uploading confirmation response that the user indication needs to be uploaded again is received, determining that the target file needs to be uploaded again, and if the uploading confirmation response that the user indication does not need to be uploaded again is received, determining that the target file does not need to be uploaded again;
thetransceiver unit 301 is configured to receive an upload response directly returned by the cloud server.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, where the electronic device includes: at least oneprocessor 401, and amemory 402 connected to the at least oneprocessor 401 through a bus; thememory 402 stores one or more computer programs executable by the at least oneprocessor 401; the at least oneprocessor 401, when executing the one or more computer programs, performs the steps in the file transfer method of fig. 2.
Embodiments of the present invention also provide a computer-readable storage medium, which stores one or more computer programs that, when executed by a processor, implement the steps in the file transfer method shown in fig. 2.
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 made within the spirit and principle of the present invention should be included in the scope of the present invention.