CN110324373B - File sharing method and device and file synchronization system - Google Patents

File sharing method and device and file synchronization system Download PDF

Info

Publication number
CN110324373B
CN110324373B CN201810273331.0A CN201810273331A CN110324373B CN 110324373 B CN110324373 B CN 110324373B CN 201810273331 A CN201810273331 A CN 201810273331A CN 110324373 B CN110324373 B CN 110324373B
Authority
CN
China
Prior art keywords
file
terminal
target
sharing
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810273331.0A
Other languages
Chinese (zh)
Other versions
CN110324373A (en
Inventor
郝红霞
孙瑞囡
柴晓前
谭卫国
赵清伟
张园园
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201810273331.0A priority Critical patent/CN110324373B/en
Publication of CN110324373A publication Critical patent/CN110324373A/en
Application granted granted Critical
Publication of CN110324373B publication Critical patent/CN110324373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The application discloses a file sharing method and device and a file synchronization system, and belongs to the technical field of communication. The method is used for a management end in a file synchronization system, and comprises the following steps: the management terminal receives sharing indication information sent by the target terminal, wherein the sharing indication information is used for indicating to acquire a first file set to be shared by the source terminal; acquiring the network address of the file in the first file set from the network address of the file in the source server; sending download instruction information to the target server, so that the target server can download the files in the first file set from the source server according to the download instruction information and synchronize the files in the first file set to the target terminal, wherein the download instruction information includes: the network addresses of the files in the first set of files. According to the file sharing method and the file sharing device, the problem that files cannot be shared among the terminals when the plurality of terminals are respectively synchronized with different servers is solved, file sharing among the terminals is achieved, and the file sharing method and the file sharing device are used for file sharing.

Description

File sharing method and device and file synchronization system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a file sharing method and apparatus, and a file synchronization system.
Background
With the development of communication technology, file synchronization systems are widely used. In the related art, a file synchronization system is composed of terminals and servers, and generally, the file synchronization system has two scenarios, namely a single server scenario and a multi-server scenario, where a plurality of terminals perform file synchronization with the same server and a plurality of terminals perform file synchronization with different servers respectively in the multi-server scenario.
In the single-server scenario, if a file is newly added to a certain terminal, the terminal synchronizes the file to the server, so that the server synchronizes the file to other terminals in the plurality of terminals, thereby realizing file sharing among the terminals. That is, when a plurality of terminals perform file synchronization with the same server, the plurality of terminals can share files with each other through the server.
However, in the multi-server scenario, since the plurality of terminals respectively perform file synchronization with different servers, and the terminals cannot share files, a file sharing method for a file synchronization system suitable for the multi-server scenario is needed.
Disclosure of Invention
The application provides a file sharing method and device and a file synchronization system, which can solve the problem that files cannot be shared among a plurality of terminals when the terminals respectively synchronize with different servers, and adopts the following technical scheme:
in a first aspect, a file sharing method is provided, where the file sharing method is used at a management end in a file synchronization system, and the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, and a target terminal and a target server for file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps: the management terminal receives sharing indication information sent by the target terminal, wherein the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal; acquiring the network address of the file in the first file set from the network address of the file in the source server; sending download instruction information to the target server, so that the target server can download the files in the first file set from the source server according to the download instruction information, and synchronize the files in the first file set to the target terminal, where the download instruction information includes: the network address of the file in the first file set and the identifier of the source server.
When the source terminal and the target terminal respectively perform file synchronization with different servers, in the embodiment of the invention, the management terminal in the file synchronization system can manage the network addresses of the files in the source server, so that the management terminal can indicate the related information of file sharing between the source server and the target server, and the purpose of sharing the files which need to be shared by the source terminal to the target terminal through the target server is achieved.
Optionally, the sharing indication information is further configured to indicate that the sharing object of the first file set is the target terminal, and before the sending of the downloading indication information to the target server, the method further includes: the management terminal sends an authorization code acquisition request to the source server terminal according to the sharing indication information, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing the first file set with the target terminal; receiving the authorization code sent by the source server; and generating the download indication information, wherein the download indication information comprises the authorization code. That is, in the embodiment of the present invention, the event that the first file set is shared with the target terminal is verified by the source terminal, and the downloaded first file and the device that downloads the first file are limited by the authorization code, so that the accuracy of file sharing is ensured.
Optionally, the management end is further configured to manage: the method comprises the following steps that fingerprint information of each file in the source terminal and fingerprint information of each file in the target terminal are obtained, the first file set comprises n first files, n is larger than or equal to 1, and before network addresses of the files in the first file set are obtained, the method further comprises the following steps: comparing the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether a target first file exists in the n first files, wherein the fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal; acquiring the network address of the file in the first file set, including: and when a target first file exists in the n first files, acquiring the network address of the target first file. That is, the management terminal compares the fingerprint information of the files to avoid sharing of duplicate files of both the source terminal and the target terminal, and the file sharing efficiency is improved.
Optionally, the management end is further configured to manage: the attribute information of each file in the source terminal, and the sharing indication information includes: target attribute information, before comparing the fingerprint information of each first file with the fingerprint information of each file in the target terminal, the method further comprising: and comparing the target attribute information with the attribute information of each file in the source terminal to determine the n first files in the source terminal, wherein each first file has the attribute indicated by the target attribute information.
Optionally, before the determining the n first files in the source terminal, the method further includes: receiving attribute information and fingerprint information of each file in the source terminal, which are sent by the source terminal; and receiving the fingerprint information of each file in the target terminal, which is sent by the target terminal. That is, the management terminal can acquire the attribute information and the fingerprint information of the file in advance for subsequent use, so that the efficiency of subsequently determining the first file set is improved.
Optionally, the format of the target attribute information belongs to a preset format set, and after the receiving of the attribute information and the fingerprint information of each file in the source terminal sent by the source terminal, the method further includes: and converting the format of the attribute information of each file in the source terminal into the format in the preset format set. That is, the formats of the attribute information are unified, so that whether the target attribute information is the same as the attribute information of the file can be directly compared, and whether the file is the first file can be determined.
Optionally, the sharing indication information is further used to indicate a validity period of sharing the first file set, and the method further includes: and repeating the steps of acquiring the network address and sending the downloading indication information within the validity period. The sharing of the first file is automatically and repeatedly carried out within the validity period, and the file sharing efficiency is improved.
Optionally, the attribute information of the file includes: at least one information of a creation time, a creation place, a file type, a storage address, and a last modification time of the file.
In a second aspect, a file sharing method is provided, which is used in a file synchronization system, where the file synchronization system includes: the system comprises a management end, a source terminal and a source server end for carrying out file synchronization, and a target terminal and a target server end for carrying out file synchronization, wherein the management end is used for managing: the network address of the file in the source server side, the method comprises the following steps: the target terminal sends sharing indication information to the management terminal, wherein the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal; the management terminal acquires the network address of the file in the first file set from the network address of the file in the source server terminal; the management terminal sends downloading indication information to the target server terminal, wherein the downloading indication information comprises: the network address of the file in the first file set and the identifier of the source server side; the target server downloads the files in the first file set from the source server according to the downloading indication information; and the target server side synchronizes the files in the first file set to the target terminal.
Optionally, the sharing indication information is further configured to indicate that the sharing object of the first file set is the target terminal, and before the management terminal sends the download indication information to the target server, the method further includes: the management terminal sends an authorization code acquisition request to the source server terminal according to the sharing indication information, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing the first file set with the target terminal; the source server side sends a verification request for sharing the first file set to the target terminal to the source terminal according to the authorization code acquisition request; the source terminal feeds back a verification success response to the source server according to the verification request; the source server side generates the authorization code according to the verification success response; the source server side sends the authorization code to the management side; and the management terminal generates the download indication information, wherein the download indication information comprises the authorization code.
In a third aspect, a file sharing method is provided, where the file sharing method is used for a source terminal in a file synchronization system, and the file synchronization system further includes: a source server for performing file synchronization with the source terminal, and a target terminal and a target server for performing file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps: the source terminal receives a verification request sent by the source server terminal and used for sharing the first file set to the target terminal; feeding back a verification success response to the source server according to the verification request, so that the source server sends an authorization code for sharing the first file set to the target terminal to the management terminal according to the verification success response, and the management terminal sends download indication information to the target server, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
In a fourth aspect, a file sharing method is provided, where the file sharing method is used for a source server in a file synchronization system, and the file synchronization system further includes: a source terminal for performing file synchronization with the source server, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the method comprises the following steps: the source server receives an authorization code acquisition request sent by the management terminal, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing a first file set in the source terminal with the target terminal; according to the authorization code obtaining request, sending a verification request for sharing the first file set to the target terminal to the source terminal; receiving a verification success response fed back by the source terminal according to the verification request; generating the authorization code according to the verification success response; sending the authorization code to the management terminal so as to facilitate the management terminal to send download indication information to the target server terminal, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
In a fifth aspect, a file sharing method is provided, where the file sharing method is used for a target terminal in a file synchronization system, and the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, a target server for file synchronization with the target terminal, and a management terminal, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps: sending sharing indication information to the management terminal so that the management terminal sends to the target server terminal: the network address of the file in the first file set indicated by the sharing indication information in the source server side, and the target server downloads the file in the first file set according to the downloading indication information; wherein, the sharing indication information is used for indicating: acquiring a first file set to be shared by the source terminal; the download indication information includes: the network address of the file in the first file set and the identifier of the source server side; and synchronizing the files in the first file set in the target server.
In a sixth aspect, a file sharing method is provided, where the file sharing method is used for a target server in a file synchronization system, and the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, a target terminal for file synchronization with the target server, and a management terminal, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps: receiving download indication information sent by the management terminal, wherein the download indication information comprises: the network address of the file in the first file set and the identification of the source server side; downloading files in a first file set from the source server according to the downloading indication information; and synchronizing the files in the first file set to the target terminal.
A seventh aspect provides a file sharing apparatus, configured to be used at a management end in a file synchronization system, where the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, and a target terminal and a target server for file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the file sharing device includes: the first receiving module is used for receiving sharing indication information sent by the target terminal, wherein the sharing indication information is used for indicating to acquire a first file set to be shared by the source terminal; an obtaining module, configured to obtain, from network addresses of files in the source server, a network address of a file in the first file set; a first sending module, configured to send download indication information to the target server, so that the target server downloads files in the first file set from the source server according to the download indication information, and synchronizes the files in the first file set to the target terminal, where the download indication information includes: the network address of the file in the first file set and the identifier of the source server.
Optionally, the sharing indication information is further configured to indicate that the sharing object of the first file set is the target terminal, and the file sharing apparatus further includes: a second sending module, configured to send an authorization code obtaining request to the source server according to the sharing indication information, where the authorization code obtaining request is used to obtain an authorization code for sharing the first file set with the target terminal; a second receiving module, configured to receive the authorization code sent by the source server; a generating module, configured to generate the download indication information, where the download indication information includes the authorization code.
Optionally, the management end is further configured to manage: the fingerprint information of each file in the source terminal and the fingerprint information of each file in the target terminal, the first file set comprises n first files, n is greater than or equal to 1, and the file sharing device further comprises: a first comparing module, configured to compare the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether a target first file exists in the n first files, where the fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal; the acquisition module is configured to: and when a target first file exists in the n first files, acquiring the network address of the target first file.
Optionally, the management end is further configured to manage: the attribute information of each file in the source terminal, and the sharing indication information includes: the file sharing device further includes: a second comparing module, configured to compare the target attribute information with attribute information of each file in the source terminal to determine the n first files in the source terminal, where each first file has an attribute indicated by the target attribute information.
Optionally, the file sharing apparatus further includes: a third receiving module, configured to receive attribute information and fingerprint information of each file in the source terminal, where the attribute information and the fingerprint information are sent by the source terminal; and the fourth receiving module is used for receiving the fingerprint information of each file in the target terminal, which is sent by the target terminal.
Optionally, the format of the target attribute information belongs to a preset format set, and the file sharing apparatus further includes: and the conversion module is used for converting the format of the attribute information of each file in the source terminal into the format in the preset format set.
Optionally, the sharing indication information is further configured to indicate a validity period of sharing the first file set, and the file sharing apparatus further includes: and the repeating module is used for repeating the steps of acquiring the network address and sending the downloading indication information in the validity period.
Optionally, the attribute information of the file includes: at least one information of a creation time, a creation place, a file type, a storage address, and a last modification time of the file.
In an eighth aspect, a file sharing apparatus is provided, where the file sharing apparatus is used for a source terminal in a file synchronization system, and the file synchronization system further includes: a source server for performing file synchronization with the source terminal, and a target terminal and a target server for performing file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the file sharing device includes: a receiving module, configured to receive a verification request sent by the source server and used for sharing the first file set with the target terminal; a feedback module, configured to feed back a verification success response to the source server according to the verification request, so that the source server sends, to the management end, an authorization code for sharing the first file set with the target terminal according to the verification success response, and the management end sends, to the target server, download indication information, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
In a ninth aspect, a file sharing apparatus is provided, where the file sharing apparatus is used in a source server in a file synchronization system, and the file synchronization system further includes: a source terminal for performing file synchronization with the source server, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the file sharing device includes: a first receiving module, configured to receive an authorization code acquisition request sent by the management end, where the authorization code acquisition request is used to acquire an authorization code for sharing a first file set in the source terminal with the target terminal; a first sending module, configured to send, to the source terminal, a verification request for sharing the first file set with the target terminal according to the authorization code acquisition request; a second receiving module, configured to receive a verification success response fed back by the source terminal according to the verification request; a generation module, configured to generate the authorization code according to the verification success response; a second sending module, configured to send the authorization code to the management end, so that the management end sends download indication information to the target server, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
In a tenth aspect, a file sharing apparatus is provided, where the file sharing apparatus is used for a target terminal in a file synchronization system, and the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, a target server for file synchronization with the target terminal, and a management terminal, wherein the management terminal is used for managing: the network address of the file in the source server side, the file sharing device includes: a sending module, configured to send sharing indication information to the management end, so that the management end sends to the target server: the network address of the file in the first file set indicated by the sharing indication information in the source server side, and the target server downloads the file according to the downloading indication information and synchronizes the file in the first file set to the target terminal; wherein, the sharing indication information is used for indicating: acquiring a first file set to be shared by the source terminal; the download indication information includes: the network address of the file in the first file set and the identifier of the source server.
In an eleventh aspect, a file sharing apparatus is provided, where the file sharing apparatus is used for a target server in a file synchronization system, and the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, a target terminal for file synchronization with the target server, and a management terminal, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps: a receiving module, configured to receive download indication information sent by the management terminal, where the download indication information includes: the network address of the file in the first file set and the identification of the source server side; the downloading module is used for downloading files in a first file set from the source server according to the downloading indication information; and the synchronization module is used for synchronizing the files in the first file set to the target terminal.
In a twelfth aspect, there is provided a file synchronization system, comprising: the file synchronization system comprises a management terminal, a source terminal and a source server terminal for performing file synchronization, and a target terminal and a target server terminal for performing file synchronization, wherein the target terminal is used for sending sharing indication information to the management terminal, and the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal; the management terminal is used for acquiring the network address of the file in the first file set from the network address of the file in the source server terminal; the management terminal is further configured to send download indication information to the target server terminal, where the download indication information includes: the network address of the file in the first file set and the identifier of the source server side; the target server is used for downloading the files in the first file set from the source server according to the downloading indication information; the target server is further configured to synchronize files in the first file set to the target terminal.
Optionally, the sharing indication information is further configured to indicate that a sharing object of the first file set is the target terminal, and the management end is further configured to send an authorization code obtaining request to the source server according to the sharing indication information, where the authorization code obtaining request is used to obtain an authorization code for sharing the first file set with the target terminal; the source server is used for sending a verification request for sharing the first file set to the target terminal to the source terminal according to the authorization code acquisition request; the source terminal is used for feeding back a verification success response to the source server according to the verification request; the source server is further configured to generate the authorization code according to the verification success response; the source server is further configured to send the authorization code to the management end; the management terminal is further configured to generate the download indication information, where the download indication information includes the authorization code.
In a thirteenth aspect, there is provided a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the file sharing method according to any one of the first to sixth aspects.
In a fourteenth aspect, there is provided a computer program product containing instructions for causing a computer to perform the file sharing method of any one of the first to sixth aspects when the computer program product runs on a computer.
In a fifteenth aspect, a file sharing apparatus is provided, including: the system comprises a processor, a network interface, a memory and a bus, wherein the memory and the network interface are respectively connected with the processor through the bus; the processor is configured to execute instructions stored in the memory; the processor executes the instructions to implement the file sharing method provided by any one of the first aspect to the sixth aspect.
The beneficial effect that technical scheme that this application provided brought is:
when the source terminal and the target terminal are respectively synchronized with different server files, in the embodiment of the invention, the management terminal in the file synchronization system can manage the network addresses of the files in the source server, so that the management terminal can indicate the related information of file sharing between the source server and the target server, and the purpose of sharing the files which need to be shared by the source terminal to the target terminal through the target server is achieved.
Drawings
Fig. 1 is a schematic structural diagram of a file synchronization system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a file sharing apparatus according to an embodiment of the present invention;
fig. 3 is a flowchart of a file sharing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a file sharing device according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of another file sharing device according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of another file sharing device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a file synchronization system according to an embodiment of the present invention, and as shown in fig. 1, the file synchronization system 0 may include: management terminal 01, source terminal 021, source server 022, target terminal 031, and target server 032. The source terminal 021 is connected to the source server 022, the target terminal 031 is connected to the target server 032, and the management terminal 01 is connected to the source terminal 021, the source server 022, the target terminal 031, and the target server 032. The source terminal 021 performs file synchronization with the source server 022, the target terminal 031 performs file synchronization with the target server 032, and the management terminal 01 is configured to manage the source terminal 021, the source server 022, the target terminal 031, and the target server 032.
It should be noted that the terminals (such as the source terminal 021 and the destination terminal 022) in the file synchronization system 0 may be electronic devices such as a mobile phone, a tablet computer, a smart watch, a digital camera, or a computer; the servers in the file synchronization system 0 (e.g., the source server 022 and the destination server 023) may be located on one or more servers; the management end can be a server or a server cluster formed by a plurality of servers. The file synchronization system 0 may include multiple sets of terminals and servers for file synchronization, and there may be one or more terminals for file synchronization with each server, and fig. 1 only illustrates that the file synchronization system 0 includes two sets of terminals and servers for file synchronization, and one terminal for file synchronization with each server is taken as an example. The files in the embodiment of the invention can be as follows: text, picture, audio or video type files.
Any two devices connected as described above may be connected via a wired network or a wireless network, where the wired network may include, but is not limited to: universal Serial Bus (USB), wireless networks may include, but are not limited to: wireless Fidelity (WIFI for short), bluetooth, infrared, Zigbee, data, and the like.
Fig. 2 is a schematic structural diagram of a file sharing device according to an embodiment of the present invention, where the file sharing device may be used at a management end, a source terminal, a source server, a destination terminal, or a destination server in the file synchronization system shown in fig. 1. Referring to fig. 2, the file sharing apparatus may include a processor 201, a memory 202, a communication interface 203, and a bus 204. The processor 201, memory 202, and communication interface 203 are communicatively coupled via a bus 204. The communication interfaces 203 are multiple and are used for communicating with other devices under the control of the processor 201, and the memory 202 is used for storing computer instructions; the processor 201 calls computer instructions stored in the memory 202 via the bus 204 to perform the file sharing method.
The source terminal and the target terminal in fig. 1 respectively perform file synchronization with different servers, that is, fig. 1 shows a multi-server scenario in a file synchronization system.
Fig. 3 is a flowchart of a file sharing method according to an embodiment of the present invention, where the file sharing method may be used in the file synchronization system shown in fig. 1. It should be noted that before executing the file sharing method shown in fig. 3, the management end needs to be authenticated, which is specifically as follows:
each terminal needs to register at a server to enable the terminal to perform file synchronization with the server on which the terminal is registered, wherein the server on which the source terminal performs registration is called a source server, the server on which the target terminal performs registration is called a target server, and the source server is different from the target server. Each terminal can also be provided with a client of a management terminal, and after each terminal is provided with the client, the terminal needs to register a user account on the management terminal through the client and sign the authority granted to the client for accessing the files on the terminal. In addition, each terminal also needs to bind the registered server and user account on the client, and authorize the management terminal to access the information of the file in the server.
For example, after the terminal binds the registered server and the user account on the client, the management terminal may send an authorization request of the server to the user through the client, so as to prompt the user of the terminal to control the terminal to send an authorization permission of the server to the management terminal. Then, the management side can forward the authorization permission to the service side so as to trigger the service side to send an access token to the management side. The access token is used for the management terminal to access the information of the file in the server terminal. After obtaining the access token, the management side may call an open Application Programming Interface (API) of the server side to query information of a file in the server side by using the access token. The information of the file in the server may include: the network address of the file, such as a Uniform Resource Locator (URL). It should be noted that the access token is only used for the management end to obtain the information of the file, but not used for the management end to obtain the file itself, and the information of the file in the server may further include other information, such as attribute information of the file, and the like, which is not limited in this embodiment of the present invention.
At this time, the management side has the authority to acquire information (such as a network address) of a file in each service side and the authority to acquire information (such as attribute information and fingerprint information) of the file in each terminal through the client, and the management side stores a synchronization relationship between the terminal and the service side (the service side for indicating synchronization of each terminal). The management terminal is used for managing the information of the files in each service terminal and the information of the files in each terminal. Wherein, the attribute information may include: creation time (× year × month × day × time × minute × second), creation place (× longitude × latitude), file type (such as text type, picture type, audio type, etc.) storage address, last modification time, and the like, where "×" means "some". The fingerprint information of a certain file can be obtained by processing the file through a content-based fingerprint technology by a client, and when the contents of two files are different, the two files are different.
After the management terminal finishes authentication, any two terminals (such as a source terminal and a target terminal) which perform file synchronization with different service terminals in the file synchronization system can share files. As shown in fig. 3, the file sharing method may include:
step 301, the source terminal sends a sharing request to the target terminal.
For example, when a source user (i.e., a user of a source terminal) needs to share a file with a target user (i.e., a user of a target terminal), the source user may operate on a client of the source terminal to select target attribute information, and control the source terminal to send a sharing request to the target terminal, where the sharing request may include: an identification of the source user (e.g., identity information of the user), an identification of the source terminal (e.g., a unique identification code of the source terminal), and target attribute information. Wherein, the attribute indicated by the attribute information in the source terminal includes target attribute information, and the file having the attribute indicated by the target attribute information includes: n first files, the n first files forming a first file set, n ≧ 1, so the share request indicates: the source terminal requests to share the first file set to the target terminal.
Step 302, the target terminal sends a sharing agreement response to the source terminal.
After receiving the sharing request, the target terminal may present the sharing request to the target user. If the target user agrees to obtain the first file set which the source user wants to share, the target user can operate on the target terminal to confirm the sharing request, so that the target terminal generates a sharing agreement response aiming at the sharing request according to the sharing request and sends the sharing agreement response to the source terminal.
Step 303, the target terminal sends sharing indication information to the management terminal.
After the target user can operate on the target terminal to confirm the sharing request, the target terminal can also generate sharing indication information and send the sharing indication information to the management terminal. The sharing indication information may include: the sharing indication information is used for indicating: the method comprises the steps of obtaining a first file set to be shared by a source terminal, and taking a sharing object of the first file set as a target terminal.
And step 304, the management terminal determines a source server for performing file synchronization with the source terminal and a target server for performing file synchronization with the target terminal according to a preset synchronization relationship between the terminal and the server.
After receiving the sharing indication information sent by the target terminal, the management terminal can analyze the sharing indication information to determine a source terminal and a target terminal which need to perform file sharing, and query a preset synchronization relationship between the terminal and the server to determine a source server which performs file synchronization with the source terminal and a target server which performs file synchronization with the target terminal.
And 305, the management terminal sends an authorization code acquisition request to the source server terminal according to the sharing indication information.
The authorization code obtaining request is used for obtaining an authorization code for sharing the first file set with the target terminal, and the authorization code obtaining request may carry an identifier of the active terminal, an identifier of the source server, an identifier of the target terminal, an identifier of the target server, identity information of the target user, and target attribute information.
And step 306, the source server side obtains the request according to the authorization code and sends a verification request for sharing the first file set to the target terminal to the source terminal.
The authentication request may carry identity information of the target user and target attribute information.
And 307, the source terminal feeds back a verification success response to the source server according to the verification request.
After receiving the verification request, the source terminal may present the verification request to the source user, and the source user may verify the identity information and the target attribute information of the target user (i.e., verify an event that the target terminal shares the first file set), and after the verification is successful, control the source terminal to send a verification success response to the source server. For example, the verification request may also carry: the short message verification code, the source user confirming the verification request on the source terminal may include: the source user transmits the short message verification code back to the source server.
Step 308, the source server generates an authorization code for sharing the first file set with the target terminal.
After receiving the verification success response sent by the source terminal, the source server can determine that the event for sharing the first file set with the target terminal is correct, and generate an authorization code for sharing the first file set with the target terminal, wherein the authorization code is used for authorizing the target server to download the files in the first file set in the source server. That is, if the target server holds the authorization code, the target server may download any file in the first file set in the source server according to the authorization code. In the embodiment of the invention, the event of sharing the first file set to the target terminal is verified through the source terminal, the downloaded first file and the equipment for downloading the first file are limited through the authorization code, and the accuracy of file sharing is ensured.
Step 309, the source server sends an authorization code for sharing the first file set to the target terminal to the management terminal.
Step 310, the management terminal compares the target attribute information with the attribute information of each file in the source terminal to determine n first files in the source terminal.
After receiving the sharing indication information sent by the target terminal, the management terminal may further analyze the sharing indication information to determine target attribute information in the sharing indication information, and then may acquire attribute information of each file in the source terminal to determine n first files having an attribute indicated by the target attribute information in the source terminal.
For example, as shown in table 1, files 1, 2, 3, 4, and 5 are stored in the source terminal, the attributes indicated by the attribute information of the files 1, 2, and 3 are a and B, and the attributes indicated by the attribute information of the files 4 and 5 are B. If the attribute indicated by the target attribute information is a, the management end may determine that files 1, 2, and 3 are all first files, and the first file set includes: documents 1, 2 and 3.
TABLE 1
Document Property indicated by property information of file
1 A and B
2 A and B
3 A and B
4 B
5 B
Step 311, the management terminal compares the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether the target first file exists in the n first files. When the target first file exists in the n first files, execute step 312; when the target first file does not exist in the n first files, step 317 is performed.
The fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal. After the management terminal determines the n first files, the fingerprint information of each first file and the fingerprint information of each file in the target terminal can be obtained. Then, the management terminal may compare the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether the target first file exists in the n first files.
For example, if the n first files are files 1, 2, and 3 in table 1, and the files stored in the target terminal include: documents 1, 4, 6, 7 and 8. The management terminal may determine that the files 2 and 3 are both the first target file after comparing the fingerprint information, that is, the files 2 and 3 are files that the source terminal needs to share with the target terminal, and the target terminal does not store the files 2 and 3. Therefore, the file (such as the file 1) stored in the target terminal is prevented from being shared with the target terminal, the occupation of the shared file (such as the file 1) on network resources is reduced, and the file sharing efficiency is improved.
Step 312, the management end obtains the network address of the target first file from the network address of the file in the source server end.
After determining the target first file, the management terminal may obtain the network address of the target first file in the network address of the file in the source server terminal through the open API of the source server terminal according to the access token obtained in the authentication stage.
For example, the management side may send an acquisition request to the source server side, where the acquisition request may include: the storage address of the target first file in the source terminal (attribute information belonging to the target first file), the identification of the source terminal, the identification of the source server side and the access token. Since the source server and the source terminal perform file synchronization, each file and attribute information thereof in the source terminal, and a network address of each file on the source server are stored in the source server. After receiving the obtaining request, the source server may query a network address of the target first file in the source server according to a storage address of the target first file in the source terminal, and send the network address of the target first file in the source server to the management terminal.
The open API of the server in the embodiment of the present invention may be of various types, such as: a HyperText Transfer Protocol (HTTP) type, a Java (one computer programming language) type, or a C + + (another computer programming language) type, and the like. The HTTP types may include: with either Representational State Transfer (Restful) or Simple Object Access Protocol (SOAP).
Step 313, the management end generates download instruction information, wherein the download instruction information includes: the authorization code, the identification of the source server, and the network address of the target first file.
After obtaining the authorization code for sharing the first file set with the target terminal and the network address of the target first file, the management terminal may generate download instruction information including the authorization code, the identifier of the source server, and the network address of the target first file.
And step 314, the management terminal sends downloading indication information to the target service terminal.
The management terminal can send the downloading indication information to the target server terminal by calling the open API of the target server terminal.
And 315, the target server downloads the target first file from the source server according to the downloading indication information.
After receiving the download instruction information sent by the management end, the target server may send a download request to the source server, where the download request may be an HTTP request, and the download request includes: the network address of the target first file, the authorization code, the identifier of the source server and the identifier of the target server. After receiving the download request, the source server may check information in the download request with information in the authorization code acquisition request, and after checking that the information is correct, may send the target first file to the target server.
Step 316, the target server synchronizes the target first file to the target terminal.
After acquiring the target first file, the target server may directly synchronize the target first file with the target terminal, or may send a synchronization request to the target terminal first, and synchronize the target first file with the target terminal only after the target terminal confirms the synchronization request. At this point, the target terminal acquires all the first files in the first file set.
Step 317, the management terminal forbids to instruct the target service terminal to download the files in the first file set.
If the target first file does not exist in the n first files, the management terminal can determine that all the first files are stored in the target terminal, and therefore the management terminal does not need to instruct the target server terminal to download any one first file.
In addition, after each terminal grants the client the right to access the file on the terminal, the client can also extract the fingerprint information of each file in the terminal and control the terminal to send the fingerprint information and the attribute information of each file to the management terminal. It should be noted that the client may also check whether a file is added to the terminal or not in real time, or delete the file; if the newly added file exists, fingerprint information of the newly added file needs to be extracted, and the control terminal uploads the fingerprint information and attribute information of the newly added file to a management terminal; if a certain file is deleted, the control terminal is required to indicate the management terminal to delete the attribute information and the fingerprint information of the file; in addition, the management terminal can independently store the information (such as fingerprint information and attribute information) uploaded by each terminal so as to ensure that the attribute information and the fingerprint information of the file in each terminal stored on the management terminal are synchronous with the file stored on the terminal.
Thus, the management terminal stores the attribute information and the fingerprint information of the file in each terminal, for example, the management terminal stores the attribute information and the fingerprint information of the file in the active terminal, and the attribute information and the fingerprint information of the file in the target terminal. The management terminal can directly read the information from the local when acquiring the attribute information of each file in the source terminal in step 310, and can directly read the information from the local when acquiring the fingerprint information of each first file and each file in the target terminal in step 311, thereby greatly improving the file sharing efficiency. In addition, redundant information (such as fingerprint information of a file) is not stored in the server, so that the stability of the server can be ensured, and the storage pressure of the server is reduced. In addition, each file only has one fingerprint information in the embodiment of the invention, so the complexity of storing and maintaining the fingerprint information is low, and the load of the file synchronization system is low.
Further, the format of the target attribute information belongs to a preset format set, and after receiving the fingerprint information and the attribute information sent by each terminal, the management terminal can convert the format of the attribute information of the file into the format in the preset format set, such as: the attribute information of a certain file before format conversion includes: creation time (x year × month × day × time × minute × second), creation place (x longitude × latitude), where "x" means "some"; the attribute information of the file may include, after the converting: time created (x year x month), place created (x city). In this way, the management side can directly compare whether the target attribute information is the same as the attribute information of each file in the source terminal to determine the first file in step 309, and does not need to determine the first file by comparing whether the attribute indicated by the target attribute information is the same as the attribute indicated by the attribute information of the file, thereby further improving the efficiency of file sharing.
Optionally, the sharing request sent by the source terminal to the target terminal in step 301 may further include: and sharing the validity period of the first file set, wherein the sharing indication information generated by the target terminal also can include the validity period. After step 317, the management side may further repeat steps 310 to 314 and step 317 in the valid period, and the target server may perform steps 315 and 316 each time receiving the download instruction information sent by the management server. Therefore, the first file can be automatically and repeatedly shared within the validity period, and the file sharing efficiency is improved.
In the related art, when two terminals are synchronized with the same server, the server synchronizes with the two terminals, so that the two terminals and the server all store completely identical files. That is, one of the two terminals may share all local files to the other terminal through the server, but the related art cannot realize that a certain terminal shares part of local files to the other terminal. Moreover, if the user of one terminal wants to delete the file 1, the user of the other terminal does not want to delete the file 1, and when the one terminal deletes the local file 1, both the server and the other terminal delete the local file 1, so that different requirements of different users on the files in the terminals cannot be met. In the embodiment of the present invention, through setting the target attribute information, the source terminal can share the file satisfying the restriction condition (the restriction condition is the attribute indicated by the target attribute information) with the target terminal, so that a certain terminal can share a part of the local file with another terminal. In addition, the file is deleted by any one of the source terminal and the target terminal, the file in the other terminal is not influenced, and different requirements of different users on the file in the terminal can be met.
In addition, in the embodiment of the present invention, the first file set includes: the file whose attribute indicated by the attribute information includes the attribute indicated by the target attribute information is taken as an example, in practical application, the first file set may also be a certain file or certain files that include the attribute specified by the source user, which is not limited in this embodiment of the present invention.
In summary, when the source terminal and the target terminal are respectively synchronized with different server files, in the embodiment of the present invention, the management end in the file synchronization system can manage the network addresses of the files in the source server, so that the management end can perform an indication of related information of file sharing between the source server and the target server, so as to achieve a purpose of sharing the files that the source terminal needs to share to the target terminal through the target server.
Fig. 4 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention, where the file sharing device 40 may be used in a management end in the file synchronization system shown in fig. 1, and the management end is used to manage: as shown in fig. 4, the file sharing apparatus 40 may include:
the first receiving module 401 is configured to receive sharing indication information sent by a target terminal, where the sharing indication information is used to indicate to acquire a first file set to be shared by a source terminal;
an obtaining module 402, configured to obtain, from the network address of the file in the source server, a network address of the file in the first file set;
a first sending module 403, configured to send download indication information to the target server, so that the target server downloads files in the first file set from the source server according to the download indication information, and synchronizes the files in the first file set to the target terminal, where the download indication information includes: the network address of the file in the first file set and the identification of the source server side.
In summary, when the source terminal and the target terminal are respectively synchronized with different server files, in the embodiment of the present invention, the management end in the file synchronization system can manage the network addresses of the files in the source server, so that each module in the management end can indicate the relevant information of file sharing between the source server and the target server, so as to achieve the purpose of sharing the files, which need to be shared by the source terminal to the target terminal, to the target terminal through the target server.
Optionally, the sharing indication information is further configured to indicate that the sharing object of the first file set is the target terminal, and the management end is further configured to manage: the fingerprint information of each file in the source terminal and the fingerprint information of each file in the target terminal, wherein the first file set comprises n first files, and n is more than or equal to 1; the management end is also used for managing: the attribute information of each file in the source terminal, sharing the indication information, includes: target attribute information; the format of the target attribute information belongs to a preset format set, and the sharing indication information is also used for indicating the validity period of the sharing first file set. Fig. 5 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention, as shown in fig. 5, based on fig. 4, the file sharing device 40 may further include:
a second sending module 404, configured to send an authorization code obtaining request to the source server according to the sharing indication information, where the authorization code obtaining request is used to obtain an authorization code for sharing the first file set with the target terminal;
a second receiving module 405, configured to receive an authorization code sent by a source server;
a generating module 406, configured to generate download indication information, where the download indication information includes the authorization code.
A first comparing module 407, configured to compare the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether a target first file exists in the n first files, where the fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal;
the obtaining module 402 is configured to: and when the target first file exists in the n first files, acquiring the network address of the target first file.
And a second comparing module 408, configured to compare the target attribute information with the attribute information of each file in the source terminal to determine n first files in the source terminal, where each first file has an attribute indicated by the target attribute information.
A third receiving module 409, configured to receive attribute information and fingerprint information of each file in the source terminal, where the attribute information and the fingerprint information are sent by the source terminal;
the fourth receiving module 410 is configured to receive the fingerprint information of each file in the target terminal sent by the target terminal.
The converting module 411 is configured to convert the format of the attribute information of each file in the source terminal into a format in a preset format set.
The repeating module 412 is configured to repeat the steps of acquiring the network address and sending the download indication information during the validity period.
Optionally, the attribute information of the file includes: at least one information of a creation time, a creation place, a file type, a storage address, and a last modification time of the file.
In summary, when the source terminal and the target terminal are respectively synchronized with different server files, in the embodiment of the present invention, the management end in the file synchronization system can manage the network addresses of the files in the source server, so that each module in the management end can indicate the relevant information of file sharing between the source server and the target server, so as to achieve the purpose of sharing the files, which need to be shared by the source terminal to the target terminal, to the target terminal through the target server.
Fig. 6 is a schematic structural diagram of another file sharing device according to an embodiment of the present invention, where the file sharing device 60 may be used in a target terminal in the file synchronization system shown in fig. 1, and a management end in the file synchronization system is used to manage: as shown in fig. 6, the file sharing apparatus 60 may include:
a sending module 601, configured to send sharing indication information to the management end, so that the management end sends to the target server: sharing the network address of the file in the first file set indicated by the indication information in the source server, and downloading the file in the first file set by the target server according to the downloading indication information; wherein, sharing instruction information is used for indicating: acquiring a first file set to be shared by a source terminal; the downloading indication information includes: the network address of the file in the first file set and the identification of the source server side;
the synchronization module 602 is configured to synchronize files in a first file set in a target server.
Fig. 7 is a schematic structural diagram of a file sharing apparatus according to another embodiment of the present invention, where the file sharing apparatus 70 can be used in a target server in the file synchronization system shown in fig. 1, and a management end in the file synchronization system is used to manage: as shown in fig. 7, the network address of the file in the source server, the file sharing apparatus 70 may include:
a receiving module 701, configured to receive download indication information sent by a management end, where the download indication information includes: the network address of the file in the first file set and the identification of the source server side;
a downloading module 702, configured to download files in the first file set from the source server according to the downloading indication information;
a synchronization module 703, configured to synchronize files in the first file set to the target terminal.
Fig. 8 is a schematic structural diagram of another file sharing apparatus according to another embodiment of the present invention, where the file sharing apparatus 80 may be used in a source terminal in the file synchronization system shown in fig. 1, and a management end in the file synchronization system is used to manage: as shown in fig. 8, the network address of the file in the source server, the file sharing apparatus 80 may include:
a receiving module 801, configured to receive a verification request sent by a source server and used for sharing a first file set to a target terminal;
a feedback module 802, configured to feed back a verification success response to the source server according to the verification request, so that the source server sends, to the management end, an authorization code for sharing the first file set to the target terminal according to the verification success response, and the management end sends, to the target server, download indication information, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server side, and the identification of the source server side.
Fig. 9 is a schematic structural diagram of another file sharing apparatus according to another embodiment of the present invention, where the file sharing apparatus 90 may be used in a source server of the file synchronization system shown in fig. 1, and a management end of the file synchronization system is used to manage: as shown in fig. 9, the file sharing apparatus 90 may include:
a first receiving module 901, configured to receive an authorization code obtaining request sent by a management end, where the authorization code obtaining request is used to obtain an authorization code for sharing a first file set in a source terminal with a target terminal;
a first sending module 902, configured to send, to the source terminal, a verification request for sharing the first file set to the target terminal according to the authorization code acquisition request;
a second receiving module 903, configured to receive a verification success response fed back by the source terminal according to the verification request;
a generating module 904, configured to generate an authorization code according to the verification success response;
a second sending module 905, configured to send an authorization code to the management end, so that the management end sends download indication information to the target server, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server side, and the identification of the source server side.
The above-described embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product comprising one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., solid state disk), among others.
It should be noted that, the method embodiment provided in the embodiment of the present invention can be mutually referred to a corresponding apparatus embodiment, and the embodiment of the present invention does not limit this. The sequence of the steps of the method embodiments provided in the embodiments of the present invention can be appropriately adjusted, and the steps can be correspondingly increased or decreased according to the circumstances, and any method that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention is covered by the protection scope of the present application, and therefore, the details are not described again.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (25)

1. A file sharing method, which is used at a management side in a file synchronization system, wherein the file synchronization system further includes: the system comprises a source terminal and a source server for file synchronization, and a target terminal and a target server for file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the method comprises the following steps:
the management terminal receives sharing indication information sent by the target terminal, wherein the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal;
acquiring the network address of the file in the first file set from the network address of the file in the source server;
sending download instruction information to the target server, so that the target server can download the files in the first file set from the source server according to the download instruction information, and synchronize the files in the first file set to the target terminal, where the download instruction information includes: the network address of the file in the first file set and the identifier of the source server.
2. The method according to claim 1, wherein the sharing indication information is further used to indicate that the sharing object of the first file set is the target terminal, and before the sending of the downloading indication information to the target server, the method further includes:
the management terminal sends an authorization code acquisition request to the source server terminal according to the sharing indication information, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing the first file set with the target terminal;
receiving the authorization code sent by the source server;
and generating the download indication information, wherein the download indication information comprises the authorization code.
3. The method according to claim 1 or 2, wherein the management side is further configured to manage: the fingerprint information of each file in the source terminal and the fingerprint information of each file in the target terminal, the first file set comprises n first files, n is more than or equal to 1,
before obtaining the network address of the file in the first set of files, the method further comprises: comparing the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether a target first file exists in the n first files, wherein the fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal;
acquiring the network address of the file in the first file set, including: and when a target first file exists in the n first files, acquiring the network address of the target first file.
4. The method of claim 3, wherein the management side is further configured to manage: the attribute information of each file in the source terminal, and the sharing indication information includes: target attribute information, before comparing the fingerprint information of each first file with the fingerprint information of each file in the target terminal, the method further comprising:
and comparing the target attribute information with the attribute information of each file in the source terminal to determine the n first files in the source terminal, wherein each first file has the attribute indicated by the target attribute information.
5. The method of claim 4, wherein prior to said determining the n first files in the source terminal, the method further comprises:
receiving attribute information and fingerprint information of each file in the source terminal, which are sent by the source terminal;
and receiving the fingerprint information of each file in the target terminal, which is sent by the target terminal.
6. The method according to claim 5, wherein the format of the target attribute information belongs to a preset format set, and after the receiving of the attribute information and the fingerprint information of each file in the source terminal sent by the source terminal, the method further comprises:
and converting the format of the attribute information of each file in the source terminal into the format in the preset format set.
7. The method of claim 1, wherein the sharing indication information is further used for indicating a validity period for sharing the first set of files, and the method further comprises:
and repeating the steps of acquiring the network address and sending the downloading indication information within the validity period.
8. The method of claim 4, wherein the attribute information of the file comprises: at least one information of a creation time, a creation place, a file type, a storage address, and a last modification time of the file.
9. A file sharing method, used in a file synchronization system, the file synchronization system comprising: the system comprises a management end, a source terminal and a source server end for carrying out file synchronization, and a target terminal and a target server end for carrying out file synchronization, wherein the management end is used for managing: the network address of the file in the source server side, the method comprises the following steps:
the target terminal sends sharing indication information to the management terminal, wherein the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal;
the management terminal acquires the network address of the file in the first file set from the network address of the file in the source server terminal;
the management terminal sends downloading indication information to the target server terminal, wherein the downloading indication information comprises: the network address of the file in the first file set and the identifier of the source server side;
the target server downloads the files in the first file set from the source server according to the downloading indication information;
and the target server side synchronizes the files in the first file set to the target terminal.
10. The method according to claim 9, wherein the sharing indication information is further used to indicate that the sharing object of the first file set is the target terminal, and before the management end sends downloading indication information to the target server, the method further includes:
the management terminal sends an authorization code acquisition request to the source server terminal according to the sharing indication information, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing the first file set with the target terminal;
the source server side sends a verification request for sharing the first file set to the target terminal to the source terminal according to the authorization code acquisition request;
the source terminal feeds back a verification success response to the source server according to the verification request;
the source server side generates the authorization code according to the verification success response;
the source server side sends the authorization code to the management side;
and the management terminal generates the download indication information, wherein the download indication information comprises the authorization code.
11. A file sharing method is used for a source terminal in a file synchronization system, and the file synchronization system further comprises: a source server for performing file synchronization with the source terminal, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the method comprises the following steps:
the source terminal receives a verification request sent by the source server terminal and used for sharing a first file set in the source terminal to the target terminal;
feeding back a verification success response to the source server according to the verification request, so that the source server sends an authorization code for sharing the first file set to the target terminal to the management terminal according to the verification success response, and the management terminal sends download indication information to the target server, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
12. A file sharing method is used for a source server in a file synchronization system, and the file synchronization system further comprises: a source terminal for performing file synchronization with the source server, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the method comprises the following steps:
the source server receives an authorization code acquisition request sent by the management terminal, wherein the authorization code acquisition request is used for acquiring an authorization code for sharing a first file set in the source terminal with the target terminal;
according to the authorization code obtaining request, sending a verification request for sharing the first file set to the target terminal to the source terminal;
receiving a verification success response fed back by the source terminal according to the verification request;
generating the authorization code according to the verification success response;
sending the authorization code to the management terminal so as to facilitate the management terminal to send download indication information to the target server terminal, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
13. A file sharing apparatus, configured to be used at a management side in a file synchronization system, the file synchronization system further comprising: the system comprises a source terminal and a source server for file synchronization, and a target terminal and a target server for file synchronization, wherein the management terminal is used for managing: the network address of the file in the source server side, the file sharing device includes:
the first receiving module is used for receiving sharing indication information sent by the target terminal, wherein the sharing indication information is used for indicating to acquire a first file set to be shared by the source terminal;
an obtaining module, configured to obtain, from network addresses of files in the source server, a network address of a file in the first file set;
a first sending module, configured to send download indication information to the target server, so that the target server downloads files in the first file set from the source server according to the download indication information, and synchronizes the files in the first file set to the target terminal, where the download indication information includes: the network address of the file in the first file set and the identifier of the source server.
14. The file sharing apparatus according to claim 13, wherein the sharing indication information is further configured to indicate that the sharing object of the first file set is the target terminal, and the file sharing apparatus further includes:
a second sending module, configured to send an authorization code obtaining request to the source server according to the sharing indication information, where the authorization code obtaining request is used to obtain an authorization code for sharing the first file set with the target terminal;
a second receiving module, configured to receive the authorization code sent by the source server;
a generating module, configured to generate the download indication information, where the download indication information includes the authorization code.
15. The file sharing apparatus according to claim 13 or 14, wherein the management terminal is further configured to manage: the fingerprint information of each file in the source terminal and the fingerprint information of each file in the target terminal, the first file set comprises n first files, n is more than or equal to 1,
the file sharing apparatus further includes:
a first comparing module, configured to compare the fingerprint information of each first file with the fingerprint information of each file in the target terminal to determine whether a target first file exists in the n first files, where the fingerprint information of the target first file is different from the fingerprint information of each file in the target terminal;
the acquisition module is configured to: and when a target first file exists in the n first files, acquiring the network address of the target first file.
16. The file sharing apparatus according to claim 15, wherein the management terminal is further configured to manage: the attribute information of each file in the source terminal, and the sharing indication information includes: the file sharing device further includes:
a second comparing module, configured to compare the target attribute information with attribute information of each file in the source terminal to determine the n first files in the source terminal, where each first file has an attribute indicated by the target attribute information.
17. The file sharing apparatus according to claim 16, further comprising:
a third receiving module, configured to receive attribute information and fingerprint information of each file in the source terminal, where the attribute information and the fingerprint information are sent by the source terminal;
and the fourth receiving module is used for receiving the fingerprint information of each file in the target terminal, which is sent by the target terminal.
18. The file sharing apparatus according to claim 17, wherein a format of the target attribute information belongs to a preset format set, the file sharing apparatus further comprising:
and the conversion module is used for converting the format of the attribute information of each file in the source terminal into the format in the preset format set.
19. The file sharing apparatus according to claim 13, wherein the sharing indication information is further used for indicating a validity period of sharing the first file set, and the file sharing apparatus further includes:
and the repeating module is used for repeating the steps of acquiring the network address and sending the downloading indication information in the validity period.
20. The file sharing apparatus according to claim 16, wherein the attribute information of the file includes: at least one information of a creation time, a creation place, a file type, a storage address, and a last modification time of the file.
21. A file sharing apparatus is used for a source terminal in a file synchronization system, and the file synchronization system further includes: a source server for performing file synchronization with the source terminal, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the file sharing device includes:
a receiving module, configured to receive a verification request sent by the source server and used for sharing a first file set in the source terminal with the target terminal;
a feedback module, configured to feed back a verification success response to the source server according to the verification request, so that the source server sends, to the management end, an authorization code for sharing the first file set with the target terminal according to the verification success response, and the management end sends, to the target server, download indication information, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
22. A file sharing apparatus, configured to be used in a source server in a file synchronization system, where the file synchronization system further includes: a source terminal for performing file synchronization with the source server, a target terminal and a target server for performing file synchronization, and a management terminal for managing: the network address of the file in the source server side, the file sharing device includes:
a first receiving module, configured to receive an authorization code acquisition request sent by the management end, where the authorization code acquisition request is used to acquire an authorization code for sharing a first file set in the source terminal with the target terminal;
a first sending module, configured to send, to the source terminal, a verification request for sharing the first file set with the target terminal according to the authorization code acquisition request;
a second receiving module, configured to receive a verification success response fed back by the source terminal according to the verification request;
a generation module, configured to generate the authorization code according to the verification success response;
a second sending module, configured to send the authorization code to the management end, so that the management end sends download indication information to the target server, where the download indication information includes: the authorization code, the network address of the file in the first file set in the source server, and the identifier of the source server.
23. A file synchronization system, comprising: a management terminal, a source terminal and a source server terminal for file synchronization, and a target terminal and a target server terminal for file synchronization,
the target terminal is used for sending sharing indication information to the management terminal, and the sharing indication information is used for indicating to obtain a first file set to be shared by the source terminal;
the management terminal is used for acquiring the network address of the file in the first file set from the network address of the file in the source server terminal;
the management terminal is further configured to send download indication information to the target server terminal, where the download indication information includes: the network address of the file in the first file set and the identifier of the source server side;
the target server is used for downloading the files in the first file set from the source server according to the downloading indication information;
the target server is further configured to synchronize files in the first file set to the target terminal.
24. The system according to claim 23, wherein the sharing indication information is further used to indicate that the sharing object of the first file set is the target terminal,
the management terminal is further configured to send an authorization code acquisition request to the source server according to the sharing indication information, where the authorization code acquisition request is used to acquire an authorization code for sharing the first file set with the target terminal;
the source server is used for sending a verification request for sharing the first file set to the target terminal to the source terminal according to the authorization code acquisition request;
the source terminal is used for feeding back a verification success response to the source server according to the verification request;
the source server is further configured to generate the authorization code according to the verification success response;
the source server is further configured to send the authorization code to the management end;
the management terminal is further configured to generate the download indication information, where the download indication information includes the authorization code.
25. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the file sharing method according to any one of claims 1 to 12.
CN201810273331.0A 2018-03-29 2018-03-29 File sharing method and device and file synchronization system Active CN110324373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810273331.0A CN110324373B (en) 2018-03-29 2018-03-29 File sharing method and device and file synchronization system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810273331.0A CN110324373B (en) 2018-03-29 2018-03-29 File sharing method and device and file synchronization system

Publications (2)

Publication Number Publication Date
CN110324373A CN110324373A (en) 2019-10-11
CN110324373B true CN110324373B (en) 2020-11-17

Family

ID=68110998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810273331.0A Active CN110324373B (en) 2018-03-29 2018-03-29 File sharing method and device and file synchronization system

Country Status (1)

Country Link
CN (1) CN110324373B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669386B (en) * 2020-05-29 2021-06-04 武汉理工大学 Access control method and device based on token and supporting object attribute

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9215280B2 (en) * 2013-03-13 2015-12-15 Unisys Corporation Systems and methods for downloading multiple files
CN103327120A (en) * 2013-07-09 2013-09-25 百度在线网络技术(北京)有限公司 Method, system and cloud server for file sharing
CN103905552A (en) * 2014-04-04 2014-07-02 深圳市金立通信设备有限公司 File sharing method, terminal and server
CN105100223B (en) * 2015-07-01 2019-10-15 北京奇虎科技有限公司 Sharing files method, apparatus and system based on cloud storage
CN106487768A (en) * 2015-08-31 2017-03-08 北京国双科技有限公司 A kind of file sharing method and device
CN106254467A (en) * 2016-08-05 2016-12-21 北京小米移动软件有限公司 Sharing files method and device
CN106101289A (en) * 2016-08-24 2016-11-09 珠海市魅族科技有限公司 A kind of document down loading method, terminal, server and system
US9749412B1 (en) * 2016-09-21 2017-08-29 International Business Machines Corporation Predictive file synchronization
CN107566515A (en) * 2017-09-22 2018-01-09 郑州云海信息技术有限公司 A kind of document down loading method and relevant apparatus

Also Published As

Publication number Publication date
CN110324373A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN105765944B (en) Method and system for third party to batch process request for authorizing repeated access to resource
EP3082353A1 (en) Method and terminal device for sending and receiving user data
EP2706719A1 (en) File synchronization method and device
CN105472045A (en) Database migration method and database migration device
CN110895603B (en) Multi-system account information integration method and device
CN113271296B (en) Login authority management method and device
CN110209842B (en) Multimedia file processing method, device, medium and electronic equipment
CN112765648B (en) Document processing method, device, equipment and storage medium
US7792928B2 (en) Method for establishing secure remote access over a network
CN110753315B (en) Video short message issuing processing method and device
CN110324373B (en) File sharing method and device and file synchronization system
US9436769B2 (en) Automatic device upload configuration
CN107241422B (en) Method for synchronizing external user and user group information into Apache Range in real time
KR20200081892A (en) System for managing electric business card and method therefor
JP6385100B2 (en) Information processing apparatus, information processing system, information processing apparatus control method, and computer program
US20160004850A1 (en) Secure download from internet marketplace
US11283611B2 (en) Token management apparatus and non-transitory computer readable medium storing token management program
CN101489097B (en) Digital television management system and method
CN111327680A (en) Authentication data synchronization method, device, system, computer equipment and storage medium
US11818112B2 (en) Directory service user synchronization
KR20120073799A (en) Data synchronizing and servicing apparatus and method based on cloud storage
CN117010889A (en) Data processing method, device, equipment, medium and product
CN114338130A (en) Information processing method, device, server and storage medium
CN114417318A (en) Third-party page jumping method and device and electronic equipment
CN105471818B (en) Method and system for information transmission between application software

Legal Events

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