CN115208873A - File transmission method, device and storage medium - Google Patents

File transmission method, device and storage medium Download PDF

Info

Publication number
CN115208873A
CN115208873A CN202210674703.7A CN202210674703A CN115208873A CN 115208873 A CN115208873 A CN 115208873A CN 202210674703 A CN202210674703 A CN 202210674703A CN 115208873 A CN115208873 A CN 115208873A
Authority
CN
China
Prior art keywords
file
target file
equipment
request message
storage
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.)
Pending
Application number
CN202210674703.7A
Other languages
Chinese (zh)
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.)
Beijing Shareit Information Technology Co Ltd
Original Assignee
Beijing Shareit Information 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 Beijing Shareit Information Technology Co Ltd filed Critical Beijing Shareit Information Technology Co Ltd
Priority to CN202210674703.7A priority Critical patent/CN115208873A/en
Publication of CN115208873A publication Critical patent/CN115208873A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The present disclosure relates to the field of communications technologies, and in particular, to a file transmission method, an apparatus, and a storage medium. The method comprises the following steps: receiving a first request message sent by third equipment, wherein the third equipment stores a file icon generated according to a storage directory and a file identifier of the second equipment in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon; after receiving the first request message, acquiring a target file required by the third equipment from the second equipment based on remote connection; sending the target file to the third device; and after the target file is successfully sent to the third equipment, determining whether to delete the target file according to the network storage subscription information of the user account of the third equipment.

Description

File transmission method, device and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a file transmission method, an apparatus, and a storage medium.
Background
With the rapid development of communication technology, more and more communication devices are present in the life of people, and along with this, the amount and types of data that users need to store are increasing, and the storage space of the communication device cannot meet the requirements of people on the storage space.
In the related art, in order to obtain a larger storage space, it is necessary to use a cloud storage service, such as various cloud disks, cloud storage, cloud servers, and the like, so as to facilitate a user to expand his/her storage space.
However, the cloud storage service in the related art mainly depends on the commercial network disk, and the cost is high.
Disclosure of Invention
The disclosure provides a file transmission method, a file transmission device and a storage medium.
A first aspect of the present disclosure provides a file transmission method, including a first device, where the first device is a network device and establishes a remote connection with a second device; the method comprises the following steps:
receiving a first request message sent by third equipment, wherein the third equipment stores a file icon generated according to a storage directory and a file identifier of the second equipment in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
after receiving the first request message, acquiring a target file required by the third device from the second device based on the remote connection;
sending the target file to the third device;
and after the target file is successfully sent to the third equipment, determining whether to delete the target file according to network storage subscription information of a user account of the third equipment.
Optionally, the remote connection is a long connection.
Optionally, the method further includes:
when a target file required by the third device is acquired from the second device based on the remote connection, if the transmission of the target file is interrupted, the received state information of the target file when the transmission of the target file is interrupted is stored;
transmitting a transmission indication to the second device, wherein the transmission indication comprises: the received condition information or non-received information generated from the received information;
and receiving the target file which is continuously sent by the second equipment according to the received condition information or the unreceived information.
Optionally, the method further includes:
receiving a storage directory and a file identification of the second device;
receiving a second request message sent by the third equipment;
and sending the storage directory and the file identification of the second device to the third device based on the second request message.
Optionally, after receiving the first request message, acquiring, from the second device, a target file required by the third device based on the remote connection includes:
after receiving the first request message, determining whether a target file specified to be acquired by the first request message exists in the second device according to a storage directory of the second device and the file identifier, which are locally stored in the first device;
and if the first request message specifies that the acquired target file exists in the second device, acquiring the target file required by the third device from the second device based on the remote connection.
Optionally, after receiving the first request message, acquiring, from the second device, a target file required by the third device based on the remote connection includes:
after the first request message is received, the first device is determined not to store the target file locally, and the target file required by the third device is acquired from the second device based on the remote connection.
Optionally, the method further includes:
after the first request message is received, when the first device is determined to locally store the thumbnail file of the target file, the thumbnail file is sent to the third device while the target file required by the third device is acquired from the second device based on the remote connection.
Optionally, after the target file is successfully sent to the third device, determining whether to delete the target file according to network storage subscription information of a user account of the third device includes:
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file.
Optionally, after the target file is successfully sent to the third device, determining whether to delete the target file according to network storage subscription information of a user account of the third device includes:
and if the user account does not have the network storage authority, deleting the target file cached by the first device.
Optionally, the determining whether to delete the target file according to the storage status information of the storage space signed by the user account and/or the status information of the target file includes at least one of the following:
when the residual capacity of the storage space signed by the user account is smaller than a first threshold value, determining to delete the target file cached by the first device;
when the residual capacity of a storage space signed by the user account is smaller than a first threshold value, determining whether to delete the target file cached by the first device according to the priority of the target file;
when the residual capacity of the storage space signed by the user account is larger than a second threshold value, determining to store the target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than the second threshold and larger than the first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
Optionally, when the remaining capacity of the storage space subscribed by the user account is smaller than a first threshold, determining whether to delete the target file cached by the first device according to the priority of the target file includes:
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold value, if the priority of the target file is a first priority, determining to store the target file.
Optionally, the method further includes:
deleting the files with the second priority of the target account number stored in the first device while storing the target files; the second priority is lower than the first priority.
A second aspect of the present disclosure provides a file transfer method, performed by a third device, the method including:
acquiring a storage directory and a file identifier of second equipment;
displaying a file icon according to the storage directory and the file identifier;
detecting a user operation acting on the file icon;
when user operation of viewing a file corresponding to the file icon is detected, sending a first request message to first equipment; the first request message is used for triggering the first device to acquire a target file corresponding to the file icon from a second device;
and receiving and displaying the target file provided by the first device.
Optionally, the method further includes:
after sending the first request message, determining whether the third device locally stores the target file;
when the user operation of viewing the file corresponding to the file icon is detected, sending a first request message to the first device, including:
and if the target file is not locally stored in the third equipment, sending a first request message to the first equipment.
Optionally, the obtaining of the storage directory and the file identifier of the second device includes:
when a preset application is started, according to the device information of the second device bound by the preset application, requesting a storage directory and the file identifier of the second device from the second device or the first device;
alternatively, the first and second electrodes may be,
receiving the storage directory and the file identification of the second device, which are sent when the storage directory and/or the file identification of the second device stored by the first device are updated;
alternatively, the first and second electrodes may be,
and receiving the storage directory and the file identification of the second equipment, which are sent when the storage directory and/or the file identification of the second equipment stored by the second equipment are updated.
Optionally, the method further includes:
displaying a binding page;
and determining the device information of the second device establishing a binding relationship with the third device based on the operation acting on the binding page, wherein the device information is used for the third device to acquire the storage directory and the file identifier of the second device.
A third aspect of the present disclosure provides a file transmission apparatus, including a first device, where the first device is a network device and establishes a remote connection with a second device; the device comprises:
the first receiving module is used for receiving a first request message sent by a third device, wherein a file icon generated according to the storage directory and the file identifier of the second device is stored in the third device in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
a first obtaining module, configured to obtain, after receiving the first request message, a target file required by the third device from the second device based on the remote connection;
the first sending module is used for sending the target file to the third equipment;
and the first determining module is used for determining whether to delete the target file according to the network storage subscription information of the user account of the third device after the target file is successfully sent to the third device.
Optionally, the remote connection is a long connection.
Optionally, the apparatus further comprises:
a storage module, configured to, when a target file required by the third device is acquired from the second device based on the remote connection, store, if transmission of the target file is interrupted, received state information of the target file when the target file is interrupted;
a second sending module, configured to send a transmission instruction to the second device, where the transmission instruction includes: the received condition information or non-received information generated from the received information;
a second receiving module, configured to receive the target file that is continuously sent by the second device according to the received status information or the unreceived information.
Optionally, the apparatus further comprises:
the third receiving module is used for receiving the storage directory and the file identification of the second device;
a fourth receiving module, configured to receive a second request message sent by the third device;
and a third sending module, configured to send the storage directory of the second device and the file identifier to the third device based on the second request message.
Optionally, the first obtaining module is specifically configured to,
after receiving the first request message, determining whether a target file specified to be acquired by the first request message exists in the second device according to a storage directory of the second device and the file identifier, which are locally stored in the first device;
and if the first request message specifies that the acquired target file exists in the second device, acquiring the target file required by the third device from the second device based on the remote connection.
Optionally, the first obtaining module is specifically configured to,
after the first request message is received, determining that the target file is not stored locally in the first device, and acquiring the target file required by the third device from the second device based on the remote connection.
Optionally, the apparatus further comprises:
a fourth sending module, configured to, when it is determined that the first device locally stores the thumbnail file of the target file after receiving the first request message, send the thumbnail file to the third device while acquiring the target file required by the third device from the second device based on the remote connection.
Optionally, the first determining module is specifically configured to,
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment or not according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file.
Optionally, the first determining module is specifically configured to,
and if the user account does not have the network storage authority, deleting the target file cached by the first device.
Optionally, the first determining module is specifically configured to execute at least one of:
when the residual capacity of the storage space signed by the user account is smaller than a first threshold value, determining to delete the target file cached by the first device;
when the residual capacity of a storage space signed by the user account is smaller than a first threshold value, determining whether to delete the target file cached by the first device according to the priority of the target file;
when the residual capacity of the storage space signed by the user account is larger than a second threshold value, determining to store the target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than the second threshold and larger than the first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
Optionally, the first determining module is specifically configured to,
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold, if the priority of the target file is a first priority, determining to store the target file.
Optionally, the apparatus further comprises:
the deleting module is used for deleting the file with the second priority of the target account number stored in the first equipment while storing the target file; the second priority is lower than the first priority.
A fourth aspect of the present disclosure provides a file transfer apparatus, including, by a third device:
the second acquisition module is used for acquiring a storage directory and a file identifier of the second device;
the first display module is used for displaying a file icon according to the storage directory and the file identifier;
the detection module is used for detecting user operation acting on the file icon;
a fifth sending module, configured to send a first request message to the first device when a user operation for viewing a file corresponding to the file icon is detected; the first request message is used for triggering the first device to acquire a target file corresponding to the file icon from a second device;
and the fifth receiving module is used for receiving and displaying the target file provided by the first equipment.
Optionally, the apparatus further comprises:
a second determining module, configured to determine whether the target file is stored locally by the third device after sending the first request message;
the fifth sending module is specifically configured to,
and if the target file is not locally stored in the third equipment, sending a first request message to the first equipment.
Optionally, the second obtaining module is specifically configured to,
when a preset application is started, according to the device information of the second device bound by the preset application, requesting a storage directory and the file identifier of the second device from the second device or the first device;
alternatively, the first and second electrodes may be,
receiving a storage directory and a file identifier of the second device, which are sent when the storage directory and/or the file identifier of the second device stored by the first device are updated;
alternatively, the first and second electrodes may be,
and receiving the storage directory and the file identification of the second equipment, which are sent when the storage directory and/or the file identification of the second equipment stored by the second equipment are updated.
Optionally, the apparatus further comprises:
the second display module is used for displaying the binding page;
and a third determining module, configured to determine, based on an operation performed on the binding page, device information of the second device that establishes a binding relationship with the third device, where the device information is used by the third device to obtain a storage directory and the file identifier of the second device.
A fifth aspect of the present disclosure provides an electronic device, comprising:
a memory for storing processor-executable instructions;
a processor connected with the memory;
wherein the processor is configured to execute the file transmission method provided by any technical scheme of the first aspect or the second aspect.
A sixth aspect of the present disclosure provides a computer-readable storage medium having a computer program stored thereon; the computer program is configured to be executed by a processor, and can implement the file transmission method provided by any technical scheme of the first aspect or the second aspect.
The technical scheme provided by the disclosure can comprise the following beneficial technical effects:
the method comprises the steps that a file icon generated according to a storage directory and a file identifier of second equipment is stored in the third equipment in advance, when the first equipment receives a first request message which is sent by the third equipment and is triggered by a user acting on the file icon, the first equipment obtains a target file required by the third equipment from the second equipment based on remote connection and sends the target file to the third equipment, and therefore the third equipment calls and views the stored target file. In the process, a user can store files to be stored in the second device, the first device can be used as only one data transfer station and is used for transmitting the files stored in the second device according to the access requirement of the third device, and compared with the prior art that data is stored in a cloud server (such as the first device), the method can reduce the dependence on a commercial network disk and reduce the storage cost.
On the other hand, when the user needs to read the file stored in the second device, the target file required by the third device can be obtained from the second device through the first device only by sending the first request message to the first device, so that the whole process is convenient and fast, and excessive network resources are not required to be consumed.
On the other hand, after the first device sends the target file to the third device, whether the target file is stored or not is determined according to the storage function of the network device and the network storage subscription information of the user account of the third device, so that the target file can be stored or deleted according to the user requirements, different cache services can be provided for different users, and network storage resources can be reasonably distributed according to the requirements of the users on the storage resources.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1A is a schematic flowchart of a file transmission method according to an embodiment of the disclosure;
fig. 1B is a schematic structural diagram of a file icon according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another file transmission method provided in the embodiment of the present disclosure;
fig. 3A is a schematic flow chart of another file transmission method provided in the embodiment of the present disclosure;
fig. 3B is a schematic diagram of a binding page provided by the embodiment of the present disclosure;
fig. 4A is a schematic structural diagram of an application scenario of a file transmission method according to an embodiment of the present disclosure;
fig. 4B is a schematic flowchart of another file transmission method provided by the embodiment of the present disclosure;
fig. 5 is a block diagram of a file transfer device according to an embodiment of the present disclosure;
fig. 6 is a block diagram of another file transmission device provided in the embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Referring to fig. 1A, some embodiments of the present disclosure provide a file transfer method, where a first device is a network device and establishes a remote connection with a second device, the method includes the following steps:
s101, receiving a first request message sent by third equipment, wherein the third equipment stores a file icon generated according to a storage directory and a file identifier of the second equipment in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
s102, after receiving the first request message, acquiring a target file required by the third equipment from the second equipment based on remote connection;
s103, sending the target file to third equipment;
and S104, after the target file is successfully sent to the third equipment, determining whether to delete the target file according to the network storage subscription information of the user account of the third equipment.
The second device and the third device may be both a smart phone, a tablet computer, a notebook computer, a personal computer, and the like, and the embodiment of the disclosure is not limited herein.
The first device may be a cloud platform or a server, or a network device capable of establishing a remote connection with the second device.
A remote connection is when a first device connects the second device remotely. Based on the remote connection, the first device may operate the second device in real-time.
The storage directory may include information such as a storage path of the file in the second device. The file identifier may include a file name of the file, for example, the file name may include a prefix name and a suffix name, the prefix name may be arbitrarily named, and the suffix name indicates a format type of the file. For example, the file is a word file, the suffix of the file name may be doc, and the file is a picture file, the suffix of the file name may be jpg or gif. The file icon includes an image identifier of the file, as shown in fig. 1B, and in some file icons, the file icon may be a dedicated icon representing the type of the file, such as a shortcut icon carried by a word file or a PDF file. While in other file icons, the file icon may be a user-defined icon.
The third device prestores a file icon generated according to the storage directory and the file identifier of the second device, that is, the third device is installed with an app of the second device, where the app may be an app capable of implementing file transmission and viewing functions stored in the second device, as shown in fig. 1B, and the app stores the file icon generated according to the storage directory and the file identifier of the second device.
When the third device monitors that the user acts on the file icon on the app, the file icon indicates that the user wants to view the file corresponding to the file icon, at this time, the third device sends a first request message to the first device, and after receiving the first request message, the first device can obtain a target file required by the third device from the second device based on remote connection, so that transmission and viewing of the target file can be achieved.
In the process, the second device serves as a storage device to store the file, the third device can establish remote connection with the second device through the first device, when the file stored in the second device needs to be read, the second device does not need to be found to check, only the first device needs to be sent with the first request message, and the problems that in the related art, the second device serves as the storage device to store the file, when a user needs to check the file stored in the second device, the second device needs to be found to check, and remote checking cannot be achieved are solved.
The second device may be an electronic device that is not used in a certain place (e.g., an electronic device that is not used at home by a user), and the third device may be an electronic device that is carried by the user.
Therefore, the user can still check the files stored in the second device in time under the condition that the user is out.
Meanwhile, the second device is used as a storage device to store the file, network disk resources can be saved, and compared with the prior art that a user needs to buy a commercial network disk to expand the capacity of the third device, the use of the commercial network disk by the user can be reduced, so that the cost can be reduced.
The first device may be a public network device or a non-public network device, and is not limited herein.
Whether the first device is a public network device or a non-public network device, the third device may have previously subscribed to the network to which the first device belongs, and the network to which the first device belongs may provide the network service for the third device according to the subscription information.
The subscription information may include network stored subscription information, subscription credentials, and the like.
The network storing the subscription information may include: the storage authority information of the user account, the capacity information of the storage space signed by the user, and the like.
In some embodiments, in the case that the first device is a non-public network device, the network storing the subscription information may further include: the network to which the user subscribes stores tariff information and the like.
In some embodiments, after the target file is successfully sent to the third device, determining whether to delete the target file according to the network storage subscription information of the user account of the third device may include:
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment or not according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file. And if the user account does not have the network storage authority, deleting the target file cached by the first device.
In the embodiments, whether a user account has a storage right of a network device is determined by a first device according to different network storage subscription information of the user account, when the user account has the storage right of the network device, whether the target file is deleted is determined according to storage state information of a subscription storage space of the user account and/or status information of the target file, and when the user account does not have the network storage right, the target file cached by the first device is directly deleted. In the process, the first device can perform different processing on the target file cached by the first device according to the network storage subscription information signed by the user, so that the user without the network storage authority can be prevented from additionally occupying network resources, and the legal rights and interests of the subscriber are guaranteed. Meanwhile, network resources can be reasonably distributed according to the requirements of users on the storage resources.
In some embodiments, determining whether to delete the target file according to the storage status information of the storage space signed by the user account and/or the status information of the target file includes at least one of:
when the residual capacity of a storage space signed by a user account is smaller than a first threshold value, determining to delete a target file cached by first equipment;
when the residual capacity of a storage space signed by a user account is smaller than a first threshold value, determining whether to delete a target file cached by first equipment according to the priority of the target file;
when the residual capacity of the storage space signed by the user account is larger than a second threshold value, determining to store a target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than a second threshold and larger than a first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
In these embodiments, the first threshold may be 10% and the second threshold may be 60%, and then when the remaining capacity of the storage space signed by the user account is less than 10%, it indicates that the capacity of the storage space signed by the user account is already used by more than 90%, at this time, the target file cached by the first device may be directly deleted, or whether the target file is deleted may be determined according to the priority of the target file, so that the storage space signed by the user account may be managed more flexibly, and unnecessary cache occupation is avoided.
When the residual capacity of the storage space signed by the user account is larger than 60%, the residual capacity of the storage space signed by the user account is still larger, and the target file can be directly stored. When the remaining capacity of the storage space signed by the user account is greater than 10% and less than 60%, it is indicated that the storage space signed by the user account has a smaller remaining space, and at this time, only the thumbnail file of the target file is saved, and the thumbnail file only contains part of the content in the target file. In the process, the first device can flexibly process the target file according to the residual capacity of the storage space signed by the user account, so that the target file is temporarily stored under the condition of avoiding unnecessary cache, the user can conveniently and directly acquire the target file next time, and the time delay of the user for acquiring the target file through network connection is reduced.
Based on the above, in some embodiments, the method further comprises:
after receiving the first request message, when determining that the first device locally stores the thumbnail file of the target file, acquiring the target file required by the third device from the second device based on remote connection, and simultaneously sending the thumbnail file to the third device.
In these embodiments, when it is determined that the first device locally stores the thumbnail file of the target file, the thumbnail file may be sent to the third device first, so that the user can view the thumbnail file, and after the first device acquires the target file, the target file is viewed. In the process, the time delay of waiting for receiving the target file by the user can be reduced.
Here, it should be noted that the first threshold and the second threshold are both examples, and in practical applications, specific data of the first threshold and the second threshold may be reasonably set according to needs of a user to meet different needs of the user.
In some embodiments, when the remaining capacity of the storage space subscribed by the user account is smaller than the first threshold, determining whether to delete the target file cached by the first device according to the priority of the target file may include:
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold, if the priority of the target file is a first priority, determining to store the target file.
For example, the user may prioritize the files according to whether the files are working files or entertainment files, and the like, such as setting the priority of the working files as a first priority, setting the priority of the entertainment files as a second priority, and prioritizing the files in an order that the first priority is higher than the second priority. The priority of the file can be extracted according to the content of the file, for example, for the file with the first priority, the content of the file can be the content related to work, and for the file with the second priority, the content of the file can be the content related to entertainment.
As another example, the user may prioritize files based on suffixes of the files, such as setting files suffixed with doc and pdf to a first priority and files suffixed with jpg and gif to a second priority, prioritizing the files in order of the first priority over the second priority.
Of course, the above is only an example, and in practical application, a user may perform priority setting on a file according to any mode to meet the use requirement of the user.
In these embodiments, when the remaining capacity of the storage space signed by the user account is smaller than the first threshold, it is indicated that the capacity of the storage space signed by the user account has been used by more than 90%, and at this time, if the priority of the target file is the first priority, it is indicated that the target file is important, so that the target file is saved, the next user can view the target file in time conveniently, and the time delay and the waste of network resources caused by reacquiring when the next user needs the target file are avoided.
In some embodiments, the method further comprises:
and deleting the files with the second priority of the target account number stored in the first device while storing the target file, wherein the second priority is lower than the first priority.
In the embodiments, the files with the priority lower than the priority of the target file are deleted while the target file is saved, so that the files with the higher priority can be saved preferentially, the files with the lower priority are deleted, more storage space is provided for the files with the higher priority, a user can conveniently obtain the files with the higher priority in time, and the obtaining time delay of the files with the higher priority is reduced.
Based on the above, in some embodiments, after receiving the first request message, acquiring, from the second device, a target file required by the third device based on the remote connection may include:
after the first request message is received, the first device is determined not to store the target file locally, and the target file required by the third device is acquired from the second device based on the remote connection.
In these embodiments, the object file may be an object file acquired by a user, the first device may buffer the object file locally, when the first request message is received and the object file needs to be acquired, it may be determined whether the object file is locally stored, and if the object file is locally stored, the object file may be directly sent to the third device, without acquiring the object file from the second device based on a remote connection. And when the target file is not locally stored, the target file is acquired from the second equipment based on remote connection, so that network resources can be saved.
In some embodiments, after receiving the first request message, acquiring, from the second device, a target file required by the third device based on the remote connection, may further include:
after receiving the first request message, determining whether a target file specified and acquired by the first request message exists in the second device according to a storage directory and a file identifier of the second device locally stored in the first device;
and if the first request message specifies that the acquired target file exists in the second equipment, acquiring the target file required by the third equipment from the second equipment based on remote connection. If the first request message specifies that the acquired target file does not exist in the second device, the target file required by the third device does not need to be acquired from the second device based on remote connection, so that the waste of network resources can be avoided.
In these embodiments, the first device may have previously acquired the storage directory and the file identifier of the second device, and cached locally, so that, after receiving the first request message, it may be determined locally whether the target file specified to be acquired by the first request message exists in the second device, and then it may be determined according to specific situations whether the target file required by the third device needs to be acquired from the second device based on the remote connection, and when it is determined that the target file specified to be acquired by the first request message exists in the second device, the target file required by the third device is acquired from the second device based on the remote connection; and when it is determined that the target file specified to be obtained by the first request message does not exist in the second device, obtaining the target file based on the remote connection is not required.
In some embodiments, as shown in fig. 2, the method further comprises:
s201, receiving a storage directory and a file identifier of second equipment;
s202, receiving a second request message sent by third equipment;
s203, based on the second request message, the storage directory and the file identification of the second device are sent to the third device.
In these embodiments, the third device obtains the storage directory and the file identification of the second device by the first device communicating with the second device. The method is suitable for the situation that the first device and the second device cannot be connected in a short distance.
In other embodiments, when the distance between the third device and the second device allows, the third device and the second device may connect by acquiring a bluetooth address of the other device, so that the third device may directly request the storage directory and the file identifier of the second device from the second device.
In some embodiments, the third device may be a portable electronic device, and the second device may be an idle or unused electronic device placed in a certain place.
In some examples, the third device may be a cell phone that the user carries with him, and the second device may be an electronic device that the user is idle at home, such as a cell phone, a personal computer, an ipad, and the like.
In some embodiments, when the third device is a mobile phone carried by a user and the second device is an electronic device that the user is idle at home, such as a mobile phone, a personal computer, an ipad, or the like, and when the third device and the second device are connected through a bluetooth address of the other device to obtain the storage directory and the file identifier of the second device, the third device may first bind an app of the second device and then obtain the storage directory and the file identifier of the second device according to the app.
In a case that the third device binds the app of the second device, the second device and the third device may bind the app of the second device by acquiring a bluetooth address of the other party (specifically, a pairing key and an identification name of the other party may be acquired).
In other embodiments, when the third device is far away from the second device and cannot implement bluetooth connection, the third device may obtain the storage directory and the file identifier of the second device through the first device, and at this time, the third device may bind the app of the second device in a remote connection manner.
Specifically, the third device and the second device may share the same user account, the first device may obtain device information of the second device according to the user account, and the second device may be bound by selecting the device information of the second device.
The device information may include a device identification of the second device. Such as a Media Access Control (MAC) Address, a SIM card number, and/or an International Mobile equipment identity (International Mobile) of the second device.
In the above binding situation, the obtaining, by the third device, the storage directory and the file identifier of the second device may include: and the third equipment requests the storage directory and the file identification of the second equipment from the second equipment or the first equipment according to the bound equipment information of the second equipment.
Specifically, when the third device and the second device are connected by acquiring the bluetooth address of the other device, the third device may directly request the storage directory and the file identifier of the second device from the second device according to the bound device information (e.g., the bluetooth address of the device) of the second device.
In a case where the third device and the second device are connected through the first device, the third device may request, from the first device, a storage directory and a file identifier of the second device according to the bound device information of the second device (e.g., a Media Access Control (MAC) Address, a SIM card identifier, and/or an International Mobile equipment identifier (International Mobile) of the second device).
In some embodiments, the remote connection may include a long connection or a short connection. A long connection is a connection in which a plurality of packets can be continuously transmitted, and during the connection maintenance period, if no packet is transmitted, both of them need to transmit a link check packet (heartbeat packet) to maintain the connection. The short connection is that two communication parties (such as a first device and a second device) establish a connection when data interaction exists, and the connection is disconnected after the data transmission is completed.
Further, the remote connection may be a long connection. The point-to-point communication between the first equipment and the second equipment can be realized, frequent communication between the first equipment and the second equipment is facilitated, and the communication efficiency is improved.
In some embodiments, the method further comprises:
when a target file required by third equipment is acquired from second equipment based on remote connection, if the transmission of the target file is interrupted, the received state information of the target file when the target file is interrupted is stored;
sending a transmission instruction to the second device, wherein the transmission instruction comprises: received status information or non-received information generated from the received information;
and receiving the target file which is continuously sent by the second equipment according to the received condition information or the non-received information.
Wherein, the target file can be an interruption caused by power failure or network failure.
In the embodiments, no matter what reason the target file is interrupted, the received state information of the target file is recorded when the transmission of the target file is interrupted, and the transmission instruction is sent to the second device when the transmission can be continued, so that the second device can continue to send the target file according to the received state information or the non-received information, thereby realizing breakpoint continuous transmission, avoiding occupying network resources after reconnection to re-transmit the target file, and avoiding waste of network resources.
In some embodiments, in order to improve security during transmission of a target file and avoid a disclosure caused by a non-preset user acquiring the target file, the method further includes:
generating a token (encryption character string) according to the user account and the password of the third device, wherein the encryption character string can be used as a token requested by the client;
and verifying the token of the third device before acquiring the target file required by the third device from the second device based on the remote connection.
In the embodiments, the token is generated according to the user account and the password of the third device, the token of the third device is verified before the target file required by the third device is acquired from the second device based on the remote connection, the identity information of the user can be acquired, and whether the target file is acquired from the second device based on the remote connection is determined according to the identity information of the user, so that the leakage of the secret caused by the fact that the target file is acquired by the non-preset user can be avoided, and the security of file viewing is improved.
Referring to fig. 3A, an embodiment of the present disclosure provides a data transmission method, performed by a third device, the method including:
s301, acquiring a storage directory and a file identifier of the second device;
s302, displaying a file icon according to the storage directory and the file identifier;
s303, detecting user operation acting on the file icon;
s304, when user operation of viewing a file corresponding to the file icon is detected, sending a first request message to the first device; the first request message is used for triggering the first equipment to acquire a target file corresponding to the file icon from the second equipment;
s305, receiving and displaying the object file provided by the first device.
As can be seen from the above description, the third device may be a smart phone, a tablet computer, a notebook computer, a personal computer, or the like. Therefore, the third device can establish network connection with the second device through the first device, and can also directly establish connection with the second device through WIFI, bluetooth and the like. The disclosed embodiments are not limited herein.
In some embodiments, according to the connection relationship among the third device, the first device, and the second device, the third device may directly request the storage directory and the file identifier of the second device from the second device, or may obtain the storage directory and the file identifier of the second device through the first device.
In some examples, taking the third device and the second device both adopt bluetooth devices as an example, in a range allowed by the distance, the third device and the second device may connect by acquiring a bluetooth address of the other device, so that the third device may directly request the storage directory and the file identifier of the second device from the second device.
In other examples, taking the case that the third device establishes a data connection with the second device through the first device as an example, the third device sends a second request message through a network connection established with the first device, and based on the second request message, the first device sends the storage directory and the file identifier of the second device to the third device through a remote connection established with the second device, so that the third device obtains the storage directory and the file identifier of the second device.
In still other embodiments, the storage directory and the file identifier of the second device may be obtained at multiple times according to the connection relationship, and the following examples will describe different obtaining times and obtaining manners corresponding to the different obtaining times.
In a first example, when a preset application (which is an app of the second device) is started, a storage directory and a file identifier of the second device are requested from the second device or the first device according to device information of the second device bound by the preset application.
Wherein the device information of the second device may include a device identification of the second device. The device identification may be: a Media Access Control (MAC) Address, a bluetooth Identifier (ID), and/or an International Mobile equipment identity (International Mobile) of the second device.
For example, when the second device and the third device are both bluetooth devices, in a distance-allowed range, the second device and the third device may connect with an identification name by acquiring a bluetooth identification of the other party, such as a pairing key of the other party, so that the third device may directly request the storage directory and the file identification of the second device from the second device.
For example, when the third device is connected to the second device through the first device, the third device may request a storage directory and a file identifier of the second device from the first device according to a Media Access Control (MAC) Address, a SIM card number, and/or an International Mobile equipment identity (International Mobile) of the second device.
In a second example, when a storage directory and/or a file identifier of the second device stored by the first device is updated, the storage directory and the file identifier of the second device are sent.
In this example, the local of the first device may store the storage directory and/or file identifier of the second device in advance, and when the first device updates the storage directory and file identifier of the second device stored therein, the updated storage directory and file identifier of the second device are sent to the third device.
In a third example, when the storage directory and/or the file identifier of the second device stored by the second device is updated, the storage directory and the file identifier of the second device are sent.
In this example, the third device may receive, by the first device, the storage directory and/or the file identifier of the second device, which are stored by the second device, and sent when the storage directory and/or the file identifier of the second device are updated, or may directly receive, by the second device, the storage directory and/or the file identifier of the second device, which are stored by the second device, and sent when the storage directory and/or the file identifier of the second device are updated.
In some embodiments, the method further comprises:
displaying a binding page;
and determining the device information of the second device establishing a binding relationship with the third device based on the operation acting on the binding page, wherein the device information is used for the third device to acquire the storage directory and the file identifier of the second device.
In these embodiments, when the preset application is installed or logged in for the first time, as shown in fig. 3B, a binding page pops up, multiple pieces of device information may be provided in the binding page, and one piece of device information is selected from the pieces of device information for binding, that is, the device information of the second device that establishes a binding relationship with the third device may be determined.
The device information may include SIM card number information of the second device, a Media Access Control (MAC) Address of the second device, a bluetooth Identifier (ID), and/or an International Mobile equipment identity (International Mobile), and the like.
In some embodiments, after the storage directory and the file identifier of the second device are obtained, the file icon is displayed according to the storage directory and the file identifier, so that an operation of a user on the file icon can be detected conveniently, and a target file to be viewed can be transmitted to the user based on the user operation.
The operation performed by the user on the file icon may be a touch operation, a click operation, or the like, which is not limited herein.
In some embodiments, the method further comprises:
after sending the first request message, determining whether the third device locally stores the target file;
when user operation of viewing a file corresponding to the file icon is detected, sending a first request message to the first device, wherein the first request message comprises:
and if the third equipment does not locally store the target file, sending a first request message to the first equipment.
In these embodiments, the target file may be a file that has been obtained by the third device before, and is stored locally, so that, when it is determined that the target file is locally stored in the third device, the user can view the target file conveniently in time, and thus, the time of the user can be saved. And when the target file is not locally stored in the third device, sending a first request message to the first device to acquire the target file for the user to view.
Wherein, the target file can be a thumbnail file. For example, the thumbnail file may be a thumbnail image, or the thumbnail file may include a summary portion of a word file.
Some embodiments of the present disclosure provide a file transfer method, comprising a second device establishing a remote connection with a first device; the method comprises the following steps:
sending a storage directory and a file identifier of a second device to a first device or a third device;
and transmitting the target file required by the third device to the first device based on the remote connection.
As can be seen from the above description, the second device may be a smart phone, a tablet computer, a notebook computer, a personal computer, or the like. Thus, the second device may establish a remote connection with the first device. The disclosed embodiments are not limited herein.
In some embodiments, when the third device installs or logs in the preset application for the first time, the second device may send the storage directory and the file identifier of the second device to the first device through remote connection based on the second request message sent by the third device, or the second device may be connected to the third device through WIFI, bluetooth, or the like, and directly send the storage directory and the file identifier of the second device to the third device, so that the third device may generate a file icon according to the storage directory and the file identifier of the second device, and based on an operation performed by a user on the file icon, the first device may obtain a target file required by the third device from the second device based on remote connection.
In some embodiments, when the third device does not log in the preset application for the first time, the second device may send the updated storage directory and file identifier of the second device to the first device through the remote connection, or the second device may be connected to the third device through WIFI, bluetooth, or the like, and directly send the updated storage directory and file identifier of the second device to the third device.
Next, an application scenario of the present disclosure and a file transfer method in the application scenario will be explained by specific examples.
In this example, an application scenario of the present disclosure may be as shown in fig. 4A.
In fig. 4A, a first device may be a pre-established data transfer site, a second device may be an electronic device with storage and network communication functions for an individual, that is, an electronic device (e.g., a tablet computer) that a user is idle at home, and a third device may be an electronic device (e.g., a smart phone) that the individual carries with him, where a remote connection is established between the first device and the second device, and the remote connection is a long connection. The second device has a data transmission software installed thereon, and the third device has a function software (a preset application (i.e., app of the second device) as described above) installed thereon that can view and receive data.
Based on the application scenario, as shown in fig. 4B, the file transmission method may include:
s401, when the device is used for the first time, the preset application is installed on the third device, a binding page is popped up, a plurality of pieces of device information are contained in the binding page, the device information of the second device is selected to be bound, and the device information of the second device is determined.
S402, according to the device information of the second device, the third device requests the first device for the storage directory and the file identification of the second device.
S403, after receiving the request message from the first device, the first device requests the second device for the storage directory and the file identifier of the second device.
S404, the first device receives the storage directory and the file identification which are sent to the second device by the second device.
S405, the received storage directory and file identification of the second device are sent to a third device.
And S406, the third device generates a file icon according to the storage directory and the file identifier of the second device and displays the file icon.
And S407, when the third device detects the user operation of viewing the file corresponding to the file icon, sending a first request message to the first device. The first request message is used for triggering the first device to acquire the target file corresponding to the file icon from the second device.
S408, the first device requests the target file required by the third device from the second device based on the first request message.
And S409, the second equipment sends the target file required by the third equipment to the first equipment.
S410, the first device receives the target file required by the third device and sent by the first device, and sends the acquired target file required by the third device to the third device.
S411, the third device receives and displays the target file.
Thus, a file transfer process is completed.
As shown in fig. 5, some embodiments of the present disclosure provide a file transfer apparatus 500 for a first device, the first device being not a network device and having a remote connection established with a second device; the apparatus 500 comprises:
a first receiving module 501, configured to receive a first request message sent by a third device, where the third device stores a file icon generated according to a storage directory and a file identifier of the second device in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
a first obtaining module 502, configured to obtain, after receiving the first request message, a target file required by a third device from the second device based on the remote connection;
a first sending module 503, configured to send the target file to a third device;
the first determining module 504 is configured to determine whether to delete the target file according to the network storage subscription information of the user account of the third device after the target file is successfully sent to the third device.
In some embodiments, the remote connection is a long connection.
In some embodiments, the apparatus further comprises:
the storage module is used for storing the received state information of the target file when the target file is interrupted when the target file required by the third equipment is acquired from the second equipment based on remote connection and if the target file transmission is interrupted;
a second sending module, configured to send a transmission instruction to a second device, where the transmission instruction includes: received condition information or non-received information generated from the received condition information;
and the second receiving module is used for receiving the target file which is continuously sent by the second equipment according to the received condition information or the non-received information.
In some embodiments, the apparatus further comprises:
the third receiving module is used for receiving the storage directory and the file identification of the second device;
a fourth receiving module, configured to receive a second request message sent by a third device;
and the third sending module is used for sending the storage directory and the file identifier of the second device to the third device based on the second request message.
In some embodiments, the first obtaining module 502 is specifically configured to,
after receiving the first request message, determining whether a target file specified and acquired by the first request message exists in the second device according to a storage directory and a file identifier of the second device locally stored in the first device;
and if the first request message specifies that the acquired target file exists in the second equipment, acquiring the target file required by the third equipment from the second equipment based on remote connection.
In some embodiments, the first obtaining module 502 is specifically configured to,
after the first request message is received, the first device is determined not to store the target file locally, and the target file required by the third device is obtained from the second device based on the remote connection.
In some embodiments, the apparatus further comprises:
and the fourth sending module is used for obtaining the target file required by the third equipment from the second equipment based on remote connection and sending the thumbnail file to the third equipment when the first equipment is determined to locally store the thumbnail file of the target file after receiving the first request message.
In some embodiments, the first determining module 504 is specifically configured to,
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment or not according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file.
In some embodiments, the first determining module 504 is specifically configured to,
and if the user account does not have the network storage authority, deleting the target file cached by the first device.
In some embodiments, the first determining module 504 is specifically configured to perform at least one of:
when the residual capacity of a storage space signed by a user account is smaller than a first threshold value, determining to delete a target file cached by first equipment;
when the residual capacity of a storage space signed by a user account is smaller than a first threshold value, determining whether to delete a target file cached by first equipment according to the priority of the target file;
when the residual capacity of the storage space signed by the user account is larger than a second threshold value, determining to store a target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than a second threshold and larger than a first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
In some embodiments, the first determining module 504 is specifically configured to,
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold, if the priority of the target file is the first priority, determining to store the target file.
In some embodiments, the apparatus further comprises:
the deleting module is used for deleting the file with the second priority of the target account number stored in the first equipment while storing the target file; the second priority is lower than the first priority.
Referring to fig. 6, some embodiments of the present disclosure provide a file transfer apparatus 600 for a third device, the apparatus 600 including:
a second obtaining module 601, configured to obtain a storage directory and a file identifier of a second device;
a first display module 602, configured to display a file icon according to a storage directory and a file identifier;
a detection module 603 configured to detect a user operation acting on the file icon;
a fifth sending module 604, configured to send a first request message to the first device when a user operation to view a file corresponding to the file icon is detected; the first request message is used for triggering the first equipment to acquire a target file corresponding to the file icon from the second equipment;
a fifth receiving module 605, configured to receive and display the target file provided by the first device.
In some embodiments, the apparatus further comprises:
the second determining module is used for determining whether the third equipment locally stores the target file or not after the first request message is sent;
a fifth sending module, configured to,
and if the third equipment does not locally store the target file, sending a first request message to the first equipment.
In some embodiments, the second obtaining module is specifically configured to,
when the preset application is started, according to the device information of the second device bound by the preset application, requesting a storage directory and a file identifier of the second device from the second device or the first device;
alternatively, the first and second electrodes may be,
receiving a storage directory and a file identifier of second equipment sent when a storage directory and/or a file identifier of the second equipment stored by first equipment is updated;
alternatively, the first and second liquid crystal display panels may be,
and receiving the storage directory and the file identification of the second equipment, which are sent when the storage directory and/or the file identification of the second equipment stored by the second equipment are updated.
In some embodiments, the apparatus further comprises:
the second display module is used for displaying the binding page;
and the third determining module is used for determining the equipment information of the second equipment establishing the binding relationship with the third equipment based on the operation acting on the binding page, wherein the equipment information is used for the third equipment to obtain the storage directory and the file identification of the second equipment.
An embodiment of the present disclosure provides an electronic device, including:
a memory for storing processor-executable instructions;
a processor connected with the memory;
wherein the processor is configured to execute the file transmission method provided by any of the foregoing technical solutions.
The processor may include various types of storage media, non-transitory computer storage media, that can continue to remember to store the information thereon after a terminal device has been powered down.
The processor may be connected to the memory via a bus or the like for reading the executable program stored on the memory, e.g. capable of performing at least one of the methods as shown in any of fig. 1A, fig. 2, fig. 3A and fig. 4B.
Fig. 7 is a block diagram of an electronic device 700 shown in accordance with an example embodiment. For example, the electronic device 700 may be included in a terminal device such as a mobile phone or a mobile computer, or a device such as a server, and in any case, the electronic device 700 may be included in any terminal device.
Referring to fig. 7, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operating state, such as a photographing state or a video state. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operating state, such as a call state, a recording state, and a voice recognition state. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect an open/closed state of the electronic device 700, the relative positioning of components, such as a display and keypad of the electronic device 700, the sensor assembly 714 can also detect a change in position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, orientation or acceleration/deceleration of the electronic device 700, and a change in temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as Wi-Fi,2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The disclosed embodiments provide a non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a UE, enable the UE or a base station to perform the file transfer method provided in any of the foregoing embodiments, and to perform at least one of the methods illustrated in any of fig. 1A, fig. 2, fig. 3A, and fig. 4B.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (34)

1. A file transmission method is characterized in that a first device is a network device and establishes remote connection with a second device; the method comprises the following steps:
receiving a first request message sent by third equipment, wherein the third equipment stores a file icon generated according to a storage directory and a file identifier of the second equipment in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
after receiving the first request message, acquiring a target file required by the third device from the second device based on the remote connection;
sending the target file to the third device;
and after the target file is successfully sent to the third equipment, determining whether to delete the target file according to network storage subscription information of a user account of the third equipment.
2. The method of claim 1, wherein the remote connection is a long connection.
3. The method of claim 1, further comprising:
when a target file required by the third device is acquired from the second device based on the remote connection, if the transmission of the target file is interrupted, the received state information of the target file when the transmission of the target file is interrupted is stored;
transmitting a transmission indication to the second device, wherein the transmission indication comprises: the received condition information or non-received information generated from the received information;
and receiving the target file which is continuously sent by the second equipment according to the received condition information or the unreceived information.
4. The method of claim 1, further comprising:
receiving a storage directory and a file identification of the second device;
receiving a second request message sent by the third equipment;
and sending the storage directory and the file identification of the second device to the third device based on the second request message.
5. The method of claim 4, wherein obtaining the target file required by the third device from the second device based on the remote connection after receiving the first request message comprises:
after receiving the first request message, determining whether a target file specified to be acquired by the first request message exists in the second device according to a storage directory of the second device and the file identifier, which are locally stored in the first device;
and if the first request message specifies that the acquired target file exists in the second device, acquiring the target file required by the third device from the second device based on the remote connection.
6. The method of claim 4, wherein obtaining the target file required by the third device from the second device based on the remote connection after receiving the first request message comprises:
after the first request message is received, the first device is determined not to store the target file locally, and the target file required by the third device is acquired from the second device based on the remote connection.
7. The method of claim 4, further comprising:
after the first request message is received, when the first device is determined to locally store the thumbnail file of the target file, the thumbnail file is sent to the third device while the target file required by the third device is acquired from the second device based on the remote connection.
8. The method of claim 1, wherein after the target file is successfully sent to the third device, determining whether to delete the target file according to network storage subscription information of a user account of the third device comprises:
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file.
9. The method of claim 8, wherein after the target file is successfully sent to the third device, determining whether to delete the target file according to network storage subscription information of a user account of the third device comprises:
and if the user account does not have the network storage authority, deleting the target file cached by the first device.
10. The method according to claim 8, wherein the determining whether to delete the target file according to the storage status information of the storage space signed by the user account and/or the status information of the target file comprises at least one of:
when the residual capacity of the storage space signed by the user account is smaller than a first threshold value, determining to delete the target file cached by the first device;
when the residual capacity of a storage space signed by the user account is smaller than a first threshold value, determining whether to delete the target file cached by the first device according to the priority of the target file;
when the residual capacity of a storage space signed by the user account is larger than a second threshold value, determining to store the target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than the second threshold and larger than the first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
11. The method of claim 8, wherein determining whether to delete the target file cached by the first device according to the priority of the target file when the remaining capacity of the storage space subscribed by the user account is smaller than a first threshold comprises:
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold, if the priority of the target file is a first priority, determining to store the target file.
12. The method of claim 11, further comprising:
deleting the files with the second priority of the target account number stored in the first device while storing the target files; the second priority is lower than the first priority.
13. A file transfer method, performed by a third device, the method comprising:
acquiring a storage directory and a file identifier of second equipment;
displaying a file icon according to the storage directory and the file identifier;
detecting a user operation acting on the file icon;
when user operation of viewing a file corresponding to the file icon is detected, sending a first request message to first equipment; the first request message is used for triggering the first device to acquire a target file corresponding to the file icon from a second device;
and receiving and displaying the target file provided by the first device.
14. The method of claim 13, further comprising:
after sending the first request message, determining whether the third device locally stores the target file;
when the user operation of viewing the file corresponding to the file icon is detected, sending a first request message to the first device, including:
and if the target file is not locally stored in the third equipment, sending a first request message to the first equipment.
15. The method according to claim 13 or 14, wherein the obtaining of the storage directory and the file identification of the second device comprises:
when a preset application is started, according to the device information of the second device bound by the preset application, requesting a storage directory and the file identifier of the second device from the second device or the first device;
alternatively, the first and second electrodes may be,
receiving a storage directory and a file identifier of the second device, which are sent when the storage directory and/or the file identifier of the second device stored by the first device are updated;
alternatively, the first and second electrodes may be,
and receiving the storage directory and the file identification of the second equipment, which are sent when the storage directory and/or the file identification of the second equipment stored by the second equipment are updated.
16. The method of claim 15, further comprising:
displaying a binding page;
and determining the device information of the second device establishing a binding relationship with the third device based on the operation acting on the binding page, wherein the device information is used for the third device to acquire the storage directory and the file identifier of the second device.
17. A file transmission device is characterized in that a first device is a network device and establishes remote connection with a second device; the device comprises:
the first receiving module is used for receiving a first request message sent by third equipment, wherein the third equipment stores a file icon generated according to a storage directory and a file identifier of the second equipment in advance; the first request message is: the third device is sent when detecting a user operation acting on the file icon;
a first obtaining module, configured to obtain, after receiving the first request message, a target file required by the third device from the second device based on the remote connection;
the first sending module is used for sending the target file to the third equipment;
and the first determining module is used for determining whether to delete the target file according to the network storage subscription information of the user account of the third device after the target file is successfully sent to the third device.
18. The apparatus of claim 17, wherein the remote connection is a long connection.
19. The apparatus of claim 17, further comprising:
a storage module, configured to, when a target file required by the third device is acquired from the second device based on the remote connection, store, if transmission of the target file is interrupted, received state information of the target file when the target file is interrupted;
a second sending module, configured to send a transmission instruction to the second device, where the transmission instruction includes: the received condition information or non-received information generated from the received information;
a second receiving module, configured to receive the target file that is continuously sent by the second device according to the received status information or the unreceived information.
20. The apparatus of claim 17, further comprising:
a third receiving module, configured to receive a storage directory and a file identifier of the second device;
a fourth receiving module, configured to receive a second request message sent by the third device;
a third sending module, configured to send the storage directory of the second device and the file identifier to the third device based on the second request message.
21. The apparatus according to claim 20, wherein the first obtaining means, in particular for,
after the first request message is received, determining whether the target file specified and obtained by the first request message exists in the second device according to the storage directory of the second device locally stored by the first device and the file identifier;
and if the first request message specifies that the acquired target file exists in the second device, acquiring the target file required by the third device from the second device based on the remote connection.
22. The apparatus according to claim 20, wherein the first obtaining means, in particular for,
after the first request message is received, the first device is determined not to store the target file locally, and the target file required by the third device is acquired from the second device based on the remote connection.
23. The apparatus of claim 20, further comprising:
a fourth sending module, configured to, when it is determined that the first device locally stores the thumbnail file of the target file after receiving the first request message, send the thumbnail file to the third device while acquiring the target file required by the third device from the second device based on the remote connection.
24. The apparatus according to claim 17, wherein the first determination module is, in particular,
after the target file is successfully acquired, determining whether the user account has the storage authority of the network equipment or not according to the storage subscription information;
and if the user account has the network storage authority, determining whether to delete the target file according to the storage condition information of the signed storage space of the user account and/or the condition information of the target file.
25. The apparatus according to claim 24, wherein the first determining means is, in particular,
and if the user account does not have the network storage authority, deleting the target file cached by the first device.
26. The apparatus of claim 24, wherein the first determining module is specifically configured to perform at least one of:
when the residual capacity of the storage space signed by the user account is smaller than a first threshold value, determining to delete the target file cached by the first device;
when the residual capacity of a storage space signed by the user account is smaller than a first threshold value, determining whether to delete the target file cached by the first device according to the priority of the target file;
when the residual capacity of the storage space signed by the user account is larger than a second threshold value, determining to store the target file cached by the first device;
when the residual capacity of the storage space signed by the user account is smaller than the second threshold and larger than the first threshold, determining to store the thumbnail file of the target file;
wherein the second threshold is greater than the first threshold.
27. The apparatus according to claim 24, wherein the first determining means is, in particular,
and when the residual capacity of the storage space signed by the user account is smaller than a first threshold, if the priority of the target file is a first priority, determining to store the target file.
28. The apparatus of claim 27, further comprising:
the deleting module is used for deleting the file with the second priority of the target account number stored in the first equipment while storing the target file; the second priority is lower than the first priority.
29. A file transfer apparatus, characterized in that, by a third device, the apparatus comprises:
the second acquisition module is used for acquiring a storage directory and a file identifier of the second device;
the first display module is used for displaying a file icon according to the storage directory and the file identifier;
the detection module is used for detecting user operation acting on the file icon;
the fifth sending module is used for sending a first request message to the first equipment when detecting the user operation of viewing the file corresponding to the file icon; the first request message is used for triggering the first device to acquire a target file corresponding to the file icon from a second device;
and the fifth receiving module is used for receiving and displaying the target file provided by the first equipment.
30. The apparatus of claim 29, further comprising:
a second determining module, configured to determine, after sending the first request message, whether the third device locally stores the target file;
the fifth sending module is, in particular,
and if the target file is not locally stored in the third equipment, sending a first request message to the first equipment.
31. The apparatus according to claim 29 or 30, wherein the second obtaining means, in particular for,
when a preset application is started, according to the device information of the second device bound by the preset application, requesting a storage directory and the file identifier of the second device from the second device or the first device;
alternatively, the first and second liquid crystal display panels may be,
receiving a storage directory and a file identifier of the second device, which are sent when the storage directory and/or the file identifier of the second device stored by the first device are updated;
alternatively, the first and second electrodes may be,
and receiving the storage directory and the file identification of the second equipment, which are sent when the storage directory and/or the file identification of the second equipment stored by the second equipment are updated.
32. The apparatus of claim 31, further comprising:
the second display module is used for displaying the binding page;
a third determining module, configured to determine, based on an operation performed on the binding page, device information of the second device that establishes a binding relationship with the third device, where the device information is used for the third device to obtain a storage directory and the file identifier of the second device.
33. An electronic device, comprising:
a memory for storing processor-executable instructions;
a processor connected with the memory;
wherein the processor is configured to perform the method of any one of claims 1 to 12 or 13 to 16.
34. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program; the computer program is configured to enable, when executed by a processor, the method of any one of claims 1 to 12 or 13 to 16.
CN202210674703.7A 2022-06-14 2022-06-14 File transmission method, device and storage medium Pending CN115208873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210674703.7A CN115208873A (en) 2022-06-14 2022-06-14 File transmission method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210674703.7A CN115208873A (en) 2022-06-14 2022-06-14 File transmission method, device and storage medium

Publications (1)

Publication Number Publication Date
CN115208873A true CN115208873A (en) 2022-10-18

Family

ID=83575661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210674703.7A Pending CN115208873A (en) 2022-06-14 2022-06-14 File transmission method, device and storage medium

Country Status (1)

Country Link
CN (1) CN115208873A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192840A (en) * 2023-03-01 2023-05-30 广州文石信息科技有限公司 File transmission method, device, equipment and readable storage medium
CN116303296A (en) * 2023-05-22 2023-06-23 天宇正清科技有限公司 Data storage method, device, electronic equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491172A (en) * 2013-09-25 2014-01-01 深圳Tcl新技术有限公司 Method and system for sharing cloud file
CN103973693A (en) * 2014-05-14 2014-08-06 小米科技有限责任公司 Router accessing method, device and system
CN105409160A (en) * 2013-05-22 2016-03-16 三星电子株式会社 System for remotely controlling electronic device and method of operating the same
CN105991698A (en) * 2015-02-06 2016-10-05 中科云网科技集团股份有限公司 Method, system and device for mobile terminal remotely managing intelligent router file
CN108647077A (en) * 2018-05-15 2018-10-12 麒麟合盛网络技术股份有限公司 File management method and device
CN109388620A (en) * 2018-09-30 2019-02-26 联想(北京)有限公司 A kind of method and the first electronic equipment of striding equipment access data
WO2020220121A1 (en) * 2019-04-29 2020-11-05 Arctec Mobile Inc. Ad hoc file and link sharing for nearby mobile devices
CN113449136A (en) * 2020-03-26 2021-09-28 华为技术有限公司 Data sharing method, electronic equipment and system
CN113992652A (en) * 2021-10-15 2022-01-28 珠海金山办公软件有限公司 Cross-terminal file synchronization method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105409160A (en) * 2013-05-22 2016-03-16 三星电子株式会社 System for remotely controlling electronic device and method of operating the same
CN103491172A (en) * 2013-09-25 2014-01-01 深圳Tcl新技术有限公司 Method and system for sharing cloud file
CN103973693A (en) * 2014-05-14 2014-08-06 小米科技有限责任公司 Router accessing method, device and system
CN105991698A (en) * 2015-02-06 2016-10-05 中科云网科技集团股份有限公司 Method, system and device for mobile terminal remotely managing intelligent router file
CN108647077A (en) * 2018-05-15 2018-10-12 麒麟合盛网络技术股份有限公司 File management method and device
CN109388620A (en) * 2018-09-30 2019-02-26 联想(北京)有限公司 A kind of method and the first electronic equipment of striding equipment access data
WO2020220121A1 (en) * 2019-04-29 2020-11-05 Arctec Mobile Inc. Ad hoc file and link sharing for nearby mobile devices
CN113449136A (en) * 2020-03-26 2021-09-28 华为技术有限公司 Data sharing method, electronic equipment and system
CN113992652A (en) * 2021-10-15 2022-01-28 珠海金山办公软件有限公司 Cross-terminal file synchronization method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192840A (en) * 2023-03-01 2023-05-30 广州文石信息科技有限公司 File transmission method, device, equipment and readable storage medium
CN116192840B (en) * 2023-03-01 2023-08-29 广州文石信息科技有限公司 File transmission method, device, equipment and readable storage medium
CN116303296A (en) * 2023-05-22 2023-06-23 天宇正清科技有限公司 Data storage method, device, electronic equipment and medium
CN116303296B (en) * 2023-05-22 2023-08-25 天宇正清科技有限公司 Data storage method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
JP6214812B2 (en) Transfer processing method and apparatus
WO2016206293A1 (en) Method and device for accessing operator network
CN106211159B (en) Bluetooth-based identity recognition method and device
CN108833585B (en) Information interaction method and device and storage medium
CN115208873A (en) File transmission method, device and storage medium
CN108702763B (en) Method and device for sending lead code and scheduling request
CN107071862B (en) Account number binding method and device and intelligent equipment
CN107094094B (en) Application networking method and device and terminal
CN106713127B (en) Method and device for acquiring and processing instant chat records
CN114629932B (en) Cooperative method between electronic devices, electronic device and storage medium
JP2016537904A (en) WI-FI network connection method, apparatus, program, and recording medium
US11832120B2 (en) Information recording method and information recording apparatus
US20240063980A1 (en) System information reception method and apparatus, and system information transmission method and apparatus
CN107612888B (en) Enterprise user space creation method and device
CN109525652B (en) Information sharing method, device, equipment and storage medium
CN112583896B (en) Session management method, session management device, electronic equipment, session management server and storage medium
US9674768B2 (en) Method and device for accessing wireless network
CN110764847A (en) User information processing method and device, electronic equipment and storage medium
US9219798B2 (en) Client and server terminals and method for controlling the same
CN114430370B (en) Method, device, equipment and storage medium for determining network slice
WO2022104512A1 (en) Method and apparatus for determining paging reason, and storage medium
CN109194639B (en) Message receiving and processing method, device, terminal and readable storage medium
KR102095666B1 (en) Information input methods, devices, programs and storage media
CN108011882B (en) Method, device and system for data synchronization
KR20120085423A (en) System and method of transmitting automatically a photographed image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination