CN111723062A - File synchronization method, device and storage medium - Google Patents

File synchronization method, device and storage medium Download PDF

Info

Publication number
CN111723062A
CN111723062A CN202010596053.XA CN202010596053A CN111723062A CN 111723062 A CN111723062 A CN 111723062A CN 202010596053 A CN202010596053 A CN 202010596053A CN 111723062 A CN111723062 A CN 111723062A
Authority
CN
China
Prior art keywords
file
client
update
content
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010596053.XA
Other languages
Chinese (zh)
Inventor
齐淑娴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Lenovo Collaboration Technology Inc
Original Assignee
Tianjin Lenovo Collaboration Technology Inc
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 Tianjin Lenovo Collaboration Technology Inc filed Critical Tianjin Lenovo Collaboration Technology Inc
Priority to CN202010596053.XA priority Critical patent/CN111723062A/en
Publication of CN111723062A publication Critical patent/CN111723062A/en
Pending legal-status Critical Current

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/178Techniques for file synchronisation in file systems

Abstract

The invention discloses a file synchronization method, a device and a readable storage medium, wherein the method is applied to a central server and comprises the following steps: when any client updates the file, receiving an update request of the file from the client, wherein the update request carries an update time stamp of the file; generating a unique identifier of the file corresponding to the update timestamp according to the update timestamp and a preset file identifier generation rule; and respectively sending the unique identifiers to a storage server so as to synchronize the files. The embodiment of the invention can directly acquire the file corresponding to the unique identifier from the storage server according to the unique identifier when synchronizing the file, thereby effectively avoiding frequent conversation between the client and the central server and further avoiding excessive resource consumption of the central server. Meanwhile, the unique identifier acquired by the client can acquire the file data corresponding to the unique identifier, so that the file synchronization and the file acquisition convenience are ensured.

Description

File synchronization method, device and storage medium
Technical Field
The present invention relates to the field of file processing technologies, and in particular, to a file synchronization method, device and storage medium.
Background
At present, aiming at the problem that a plurality of clients synchronize the same folder, each client needs to acquire a directory structure from a manager server of a central server and acquire the folder from a storage server for downloading. Therefore, if a new client is added for each time of the plurality of clients, the directory structure needs to be obtained from the central server again and then downloaded to the storage server, which causes a large data processing pressure on the central server and causes resource waste of the central server.
Disclosure of Invention
Embodiments of the present invention provide a file synchronization method, a file synchronization device, and a computer-readable storage medium to solve the above problems in the file synchronization process.
According to a first aspect of the present invention, there is provided a file synchronization method applied to a central server, the method including: when any client updates a file, receiving an update request of the file from the client, wherein the update request carries an update time stamp of the file; generating a unique identifier of the file corresponding to the update timestamp according to the update timestamp and a preset file identifier generation rule; and respectively sending the unique identification to a storage server so as to synchronize the files.
According to an embodiment of the invention, the method further comprises: receiving a unique identification acquisition request of the file sent by any client, wherein the acquisition request carries an update timestamp of the file; and searching and sending the unique identifier to the client.
According to an embodiment of the present invention, the preset file identifier generation rule employs at least one of the following algorithms: the hash algorithm hash, message digest algorithm md 5.
According to the second aspect of the present invention, there is also provided a file synchronization method applied to a storage server, the method including: when any client updates a file, receiving file content corresponding to an update time stamp of the file from the client; and receiving the unique identification of the file generated according to the updating time stamp from the central server so as to synchronize the file.
According to an embodiment of the invention, the method further comprises: receiving the unique identification sent by any client; and searching and sending the file content of the file corresponding to the unique identifier.
According to a third aspect of the present invention, a file synchronization method is applied to a client, and the method includes: sending an update request of a file to a central server, wherein the update request carries an update timestamp of the file, so that the central server generates a unique identifier of the file corresponding to the update timestamp and sends the unique identifier to a storage server; and sending the file content corresponding to the update time stamp to a storage server so as to synchronize the file.
According to an embodiment of the invention, the method further comprises: sending a unique identification acquisition request of a file to a central server, wherein the acquisition request carries an update timestamp of the file; receiving the unique identification of the file which is searched and issued by the central server and corresponds to the update timestamp; sending the unique identifier to a storage server; and receiving the file content of the file corresponding to the unique identifier and issued by the storage server.
According to an embodiment of the invention, the method further comprises: the second client acquires a first identification of the file corresponding to a first updating time stamp and a second identification of the file corresponding to a second updating time stamp from the first client; sending the first identifier and the second identifier to the storage server; receiving first content of the file determined by the storage server according to the first identifier and second content of the file determined by the storage server according to the second identifier; and comparing the first file content and the second file content and showing a difference between the first content and the second content.
According to a fourth aspect of the present invention, there is also provided a file synchronization apparatus, applied to a central server, the apparatus including: the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an updating request of a file from a client when any client updates the file, and the updating request carries an updating time stamp of the file; the identification generation module is used for generating a unique identification of the file corresponding to the update timestamp according to the update timestamp and a preset file identification generation rule; and the first sending module is used for respectively sending the unique identifiers to a storage server so as to synchronize the files.
According to an embodiment of the invention, the apparatus further comprises: the second receiving module is used for receiving a unique identification acquisition request of the file sent by any client, wherein the acquisition request carries an update timestamp of the file; and the second sending module is used for searching and sending the unique identifier to the client.
According to an embodiment of the present invention, the preset file identifier generation rule employs at least one of the following algorithms: the hash algorithm hash, message digest algorithm md 5.
According to the fifth aspect of the present invention, there is also provided a file synchronization apparatus applied to a storage server, the apparatus including: the content receiving module is used for receiving the file content corresponding to the update time stamp of the file from the client when any client updates the file; and the first identification receiving module is used for receiving the unique identification of the file generated according to the update timestamp from the central server so as to synchronize the file.
According to an embodiment of the invention, the apparatus further comprises: the second identification receiving module is used for receiving the unique identification sent by any client; and the content determining module is used for searching and sending the file content of the file corresponding to the unique identifier to the client.
According to the sixth aspect of the present invention, there is also provided a file synchronization apparatus applied to a client, the apparatus including: the updating request module is used for sending an updating request of a file to a central server, wherein the updating request carries an updating time stamp of the file, so that the central server generates a unique identifier of the file corresponding to the updating time stamp and sends the unique identifier to a storage server; and the content sending module is used for sending the file content corresponding to the update timestamp to a storage server so as to synchronize the file.
According to an embodiment of the invention, the apparatus further comprises: the identification acquisition module is used for sending a unique identification acquisition request of a file to a central server, wherein the acquisition request carries an update timestamp of the file; the file identification receiving module is used for receiving the unique identification of the file which is searched and issued by the central server and corresponds to the updating timestamp; the file identifier sending module is used for sending the unique identifier to a storage server; and the file content receiving module is used for receiving the file content of the file corresponding to the unique identifier and sent by the storage server.
According to an embodiment of the invention, the apparatus further comprises: a second identifier obtaining module, configured to obtain, by a second client, a first identifier of the file corresponding to a first update timestamp and a second identifier of the file corresponding to a second update timestamp from a first client; a second identifier sending module, configured to send, by a second client, the first identifier and the second identifier to the storage server; a second content receiving module, configured to receive, by a second client, first content of the file determined by the storage server according to the first identifier and second content of the file determined according to the second identifier; and the comparison module is used for comparing the first file content with the second file content by the second client and showing the difference between the first content and the second content.
According to a seventh aspect of the present invention, there is also provided a computer-readable storage medium comprising a set of computer-executable instructions which, when executed, are adapted to perform the above-described file synchronization method.
According to the file synchronization method, the file synchronization device and the computer readable storage medium, when any client updates the file, the unique identifier of the file corresponding to the update timestamp is generated according to the update timestamp carried by the update request, and the generated unique identifier is respectively sent to the storage server. Therefore, when the files are synchronized, the files corresponding to the unique identification can be directly obtained from the storage server according to the unique identification, frequent conversation between the client and the central server is effectively avoided, and excessive resource consumption of the central server is avoided. Meanwhile, the content of each time point of the file cannot be changed, and the file data corresponding to the unique identifier can be obtained through the unique identifier obtained by the client, so that the file synchronization and the file obtaining convenience are guaranteed.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram illustrating an application scenario of a file synchronization method according to an embodiment of the present invention;
FIG. 2 is a first flowchart illustrating an implementation of a file synchronization method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a second implementation flow of the file synchronization method according to the embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a third implementation flow of the file synchronization method according to the embodiment of the present invention;
FIG. 5 is a first schematic diagram illustrating a first exemplary component of a file synchronization apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram showing a second exemplary embodiment of a file synchronization apparatus;
fig. 7 is a schematic diagram showing a third component structure of the file synchronization device according to the embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
It should be noted that, the invention may adopt a block chain technology, after a client updates a file, a unique identifier is generated according to the update time of the file and uploaded to a central server, and the file content is uploaded to a storage server, and when a file is uploaded in the block chain technology, a block is generated, and the content of the block cannot be changed, so that the security of the file can be well ensured, and the content of the file at the update time point corresponding to the unique identifier can be downloaded from the storage server according to the unique identifier of the file. However, the present invention may be implemented by other suitable methods, and the present invention is not limited thereto.
In addition, in the embodiment of the present invention, a file synchronization method is described in a file synchronization process, and in practical applications, for a file, each update time corresponding to the file has a unique identifier. Then at each update time, for a plurality of files included in a folder, the corresponding unique identifiers of the plurality of files may be taken as a unique identifier set. Therefore, similar operations such as updating, synchronizing and the like are carried out on the folder according to the unique identification set corresponding to the folder. For the sake of saving space, the document only uses the file as an example to perform file updating and synchronization operations, and the updating and synchronization of the folders are not described again.
Fig. 1 shows a schematic diagram of an interaction process of a file synchronization method according to an embodiment of the present invention, and referring to fig. 1, there may be one or more storage servers and one or more clients in the file synchronization process according to the present invention, and fig. 1 shows only one storage server and two clients by way of example. Steps S11 to S14 show the file synchronization operation flow of the client updating and uploading the file to the server. Steps S21-S24 illustrate the operational flow of the client obtaining the unique identification of the file from the central server and downloading the file from the storage server. Steps S31-S33 show the operation flow of the file downloading process by the client according to the unique identification of the file. Steps S41-S44 show the operational flow of the client obtaining files from the server and performing file comparison.
Specifically, in step S11, the first client sends a file update request to the central server, where the file update request carries a file update timestamp.
In step S12, the first client sends the file content corresponding to the update time stamp to the storage server.
In step S13, the central server generates a unique identifier of the file according to the file update timestamp.
In step S14, the central server sends the unique identifiers to a plurality of storage servers, respectively.
In step S21, the first client sends a file download request to the central server, where the download request carries a file update timestamp.
In step S22, the central server returns a file unique identifier corresponding to the update timestamp.
In step S23, the first client sends the unique identifier to the storage server.
In step S24, the first client receives the file content corresponding to the unique identifier returned by the storage server.
In step S31, the second client receives the unique identifier sent by the first client.
In step S32, the second client sends the unique identifier to the storage server.
In step S33, the second client receives the file content corresponding to the unique identifier returned by the storage server.
In step S41, the second client acquires a first identifier of the file corresponding to the first update timestamp and a second identifier corresponding to the second update timestamp.
In step S42, the second client sends the first identifier and the second identifier to the storage server.
In step S43, the second client receives the first file content corresponding to the first identifier and the second file content corresponding to the second identifier, which are returned by the storage server.
In step S44, the second client compares the first file content and the second file content, showing the difference between the first content and the second content.
Fig. 2 shows a first implementation flow diagram of the file synchronization method according to the embodiment of the present invention.
Referring to fig. 2, a file synchronization method according to an embodiment of the present invention is applied to a central server, and at least includes the following operation flows: operation 201, when any client updates a file, receiving an update request of the file from the client, where the update request carries an update timestamp of the file; in operation 202, according to the update timestamp and according to a preset file identifier generation rule, generating a unique identifier of the file corresponding to the update timestamp; in operation 203, the unique identifiers are respectively sent to the storage servers to synchronize the files.
In operation 201, when any client updates a file, an update request of the file is received from the client, where the update request carries an update timestamp of the file.
Specifically, the purpose of receiving the update request carrying the update timestamp of the file by the central server is to ensure that any client performs unified management on the update of the file. The state of the file corresponding to each update timestamp is determined and unique, and then the file states corresponding to all the update timestamps are linked together, so that the change of the file along with the change of time in the whole life cycle can be reflected.
In operation 202, a unique identifier of the file corresponding to the update timestamp is generated according to the update timestamp and a preset file identifier generation rule.
In an embodiment of the present invention, the preset file identifier generation rule employs at least one of the following algorithms: the hash algorithm hash, message digest algorithm md 5.
Specifically, Hash refers to the meaning of Hash or Hash, also called Hash, which is the process of converting an input of arbitrary length (also called pre-map image) into an output of fixed length by a Hash algorithm, and the output is a Hash value. This transformation is a kind of compression mapping, i.e. the space of hash values is usually much smaller than the space of inputs, different inputs may hash to the same output, so it is not possible to determine a unique input value from a hash value. In short, it is a function of compressing a message of an arbitrary length to a message digest of a certain fixed length.
MD5(MD5 Message-Digest Algorithm), a widely used cryptographic hash function, can generate a 128-bit (16-byte) hash value (hash value) to ensure the integrity of the Message transmission.
In operation 203, the unique identifications are respectively transmitted to the storage servers to synchronize the files.
Specifically, the central server responds to the update request sent by the client, generates a unique identifier of the file corresponding to the update timestamp, and simultaneously, the client sends the file content corresponding to the update timestamp to the storage server. In this manner, the storage server may associate the update timestamp with the file content. So that the client can directly obtain the file content from the storage server according to the unique identifier.
In an embodiment of the present invention, based on the above operations 201 to 203, the file synchronization method further includes: receiving a unique identification acquisition request of a file sent by any client, wherein the acquisition request carries an update timestamp of the file; and searching and sending the unique identifier to the client.
Specifically, when the client does not know the unique identifier of the file, the client needs to acquire the unique identifier of the file from the central server. When the unique identifier is obtained, only an update request carrying an update time stamp of the file needs to be sent.
Fig. 3 shows a schematic flow chart of implementing the file synchronization method according to the embodiment of the present invention. Referring to fig. 3, a file synchronization method according to an embodiment of the present invention is applied to a storage server, and at least includes the following operation flows: operation 301, when any client updates a file, receiving file content corresponding to an update timestamp of the file from the client; in operation 302, a unique identification of the file generated from the update timestamp is received from the central server to synchronize the file.
In operations 301-302, the storage server is a decentralized server, and the storage server receives the file content corresponding to the timestamp from the client and the unique identifier of the update timestamp of the file corresponding to the central server. The central server does not store the file content and cannot change the file content. The storage server only stores the file content, but does not specifically describe the file content, and as long as the client sends the unique identifier of the file, the file content corresponding to the unique identifier of the file can be acquired from the storage server. Therefore, the real-time synchronization of the files is realized, and the safety of the files is ensured.
In an embodiment of the present invention, the method further comprises: the storage server receives a unique identifier sent by any client; and searching and sending the file content of the file corresponding to the unique identifier.
Fig. 4 shows a flowchart of a second implementation of the file synchronization method according to the embodiment of the present invention. Referring to fig. 4, the file synchronization method according to the embodiment of the present invention is applied to a client, and at least includes the following operation flows: operation 401, sending an update request of a file to a central server, where the update request carries an update timestamp of the file, so that the central server generates a unique identifier of the file corresponding to the update timestamp and sends the unique identifier to a storage server; in operation 402, the file content corresponding to the update timestamp is sent to the storage server to synchronize the file.
In an embodiment of the present invention, based on the operations 401 to 402, the file synchronization method further includes: sending a unique identification acquisition request of the file to a central server, and acquiring an update timestamp of the file carried by the request; receiving a unique identifier of a file which is searched and issued by a central server and corresponds to the update timestamp; sending the unique identifier to a storage server; and receiving the file content of the file corresponding to the unique identifier sent by the storage server.
Specifically, the storage server stores a unique identifier of the file corresponding to the file update time stamp, the client sends a unique identifier to the storage server, that is, the file content corresponding to the unique identifier can be acquired from the storage server, and the acquired file content corresponds to the update time corresponding to the unique identifier of the file. Therefore, when the client needs to acquire the file content of the file, the client needs to first acquire the unique identifier corresponding to the file update time from the central server, and then send the unique identifier to the storage server, so that the file content of the file corresponding to the unique identifier and issued by the storage server can be received.
In a more preferred embodiment of the present invention, the client may also obtain the unique identifier of the file from other clients, for example: and acquiring the unique identifier of the file through active transmission among a plurality of clients. For file loss caused by misoperation, the client acquires a unique identifier (such as a hash value) corresponding to an update timestamp of a file through the server or other clients, and then the file content corresponding to the update time can be acquired from the storage server.
In another embodiment of the present invention, based on the operations 401 to 402, the file synchronization method further includes: the second client acquires a first identification of the file corresponding to the first updating time stamp and a second identification of the file corresponding to the second updating time stamp from the first client; sending the first identifier and the second identifier to a storage server; receiving first content of a file determined by the storage server according to the first identifier and second content of the file determined according to the second identifier; and comparing the first file content and the second file content and showing the difference between the first content and the second content.
Specifically, if the client locally determines the unique identifiers (for example, hash values) of two time points of the same file, the client can directly acquire the contents of the two versions from the storage server, directly compare the contents of the file without sending a request to a central server (manager), and return a result after comparing the contents by the central server.
Therefore, according to the file synchronization method, the file synchronization device and the computer-readable storage medium in the embodiments of the present invention, when any client updates a file, a unique identifier of the file corresponding to an update timestamp is generated according to the update timestamp carried in an update request, and the generated unique identifiers are respectively sent to the storage servers. Therefore, when the files are synchronized, the files corresponding to the unique identification can be directly obtained from the storage server according to the unique identification, frequent conversation between the client and the central server is effectively avoided, and excessive resource consumption of the central server is avoided. Meanwhile, the content of each time point of the file cannot be changed, and the file data corresponding to the unique identifier can be obtained through the unique identifier obtained by the client, so that the file synchronization and the file obtaining convenience are guaranteed.
Similarly, based on the above file synchronization method, an embodiment of the present invention further provides a computer-readable storage medium, where a program is stored, and when the program is executed by a processor, the processor is caused to perform at least the following operation steps: operation 201, when any client updates a file, receiving an update request of the file from the client, where the update request carries an update timestamp of the file; in operation 202, according to the update timestamp and according to a preset file identifier generation rule, generating a unique identifier of the file corresponding to the update timestamp; in operation 203, the unique identifiers are respectively sent to the storage servers to synchronize the files.
Further, based on the above file synchronization method, an embodiment of the present invention further provides a file synchronization apparatus, which is applied to a central server, and as shown in fig. 5, the apparatus 50 includes: a first receiving module 501, configured to receive an update request for a file from a client when the file is updated by any client, where the update request carries an update timestamp of the file; an identifier generating module 502, configured to generate, according to the update timestamp and according to a preset file identifier generating rule, a unique identifier of the file corresponding to the update timestamp; a first sending module 503, configured to send the unique identifiers to the storage servers respectively, so as to synchronize the files.
According to an embodiment of the invention, the apparatus 50 further comprises: the second receiving module is used for receiving a unique identification obtaining request of the file sent by any client, and the obtaining request carries an updating time stamp of the file; and the second sending module is used for searching and sending the unique identifier to the client.
According to an embodiment of the present invention, the preset file identifier generation rule employs at least one of the following algorithms: the hash algorithm hash, message digest algorithm md 5.
According to the fifth aspect of the present invention, there is also provided a file synchronization apparatus applied to a storage server, as shown in fig. 6, the apparatus 60 includes: a content receiving module 601, configured to receive, from a client, file content corresponding to an update timestamp of a file when any client updates the file; the first identifier receiving module 602 receives a unique identifier of a file generated according to the update timestamp from the central server to synchronize the file.
According to an embodiment of the invention, the apparatus 60 further comprises: the second identification receiving module is used for receiving the unique identification sent by any client; and the content determining module is used for searching and sending the file content of the file corresponding to the unique identifier to the client.
According to the sixth aspect of the present invention, there is also provided a file synchronization apparatus 70 applied to a client, the apparatus 70 including: the update request module 701 is configured to send an update request of a file to the central server, where the update request carries an update timestamp of the file, so that the central server generates a unique identifier of the file corresponding to the update timestamp and sends the unique identifier to the storage server; a content sending module 702, configured to send file content corresponding to the update timestamp to the storage server, so as to synchronize the file.
According to an embodiment of the present invention, the apparatus 70 further comprises: the identification acquisition module is used for sending a unique identification acquisition request of the file to the central server, and the acquisition request carries an update timestamp of the file; the file identification receiving module is used for receiving the unique identification of the file which is searched and issued by the central server and corresponds to the update timestamp; the file identifier sending module is used for sending the unique identifier to the storage server; and the file content receiving module is used for receiving the file content of the file corresponding to the unique identifier and issued by the storage server.
According to an embodiment of the present invention, the apparatus 70 further comprises: a second identifier obtaining module, configured to obtain, by the second client, a first identifier of the file corresponding to the first update timestamp and a second identifier of the file corresponding to the second update timestamp from the first client; the second identification sending module is used for sending the first identification and the second identification to the storage server by the second client; the second content receiving module is used for the second client to receive the first content of the file determined by the storage server according to the first identifier and the second content of the file determined according to the second identifier; and the comparison module is used for comparing the first file content with the second file content by the second client and showing the difference between the first content and the second content.
Here, it should be noted that: the above description of the embodiment of the file synchronization apparatus is similar to the description of the embodiment of the method shown in fig. 1 to 4, and has similar beneficial effects to the embodiment of the method shown in fig. 1 to 4, and therefore, the description is omitted. For technical details that are not disclosed in the embodiment of the file synchronization apparatus of the present invention, please refer to the description of the method embodiment shown in fig. 1 to 4 of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A file synchronization method is applied to a central server, and comprises the following steps:
when any client updates a file, receiving an update request of the file from the client, wherein the update request carries an update time stamp of the file;
generating a unique identifier of the file corresponding to the update timestamp according to the update timestamp and a preset file identifier generation rule;
and respectively sending the unique identification to a storage server so as to synchronize the files.
2. The method of claim 1, further comprising:
receiving a unique identification acquisition request of the file sent by any client, wherein the acquisition request carries an update timestamp of the file;
and searching and sending the unique identifier to the client.
3. The method according to claim 1, wherein the preset file identifier generation rule employs at least one of the following algorithms: the hash algorithm hash, message digest algorithm md 5.
4. A file synchronization method is applied to a storage server, and comprises the following steps:
when any client updates a file, receiving file content corresponding to an update time stamp of the file from the client;
and receiving the unique identification of the file generated according to the updating time stamp from the central server so as to synchronize the file.
5. The method of claim 4, further comprising:
receiving the unique identification sent by any client;
and searching and sending the file content of the file corresponding to the unique identifier.
6. A file synchronization method is applied to a client, and comprises the following steps:
sending an update request of a file to a central server, wherein the update request carries an update timestamp of the file, so that the central server generates a unique identifier of the file corresponding to the update timestamp and sends the unique identifier to a storage server;
and sending the file content corresponding to the update time stamp to a storage server so as to synchronize the file.
7. The method of claim 6, further comprising:
sending a unique identification acquisition request of a file to a central server, wherein the acquisition request carries an update timestamp of the file;
receiving the unique identification of the file which is searched and issued by the central server and corresponds to the update timestamp;
sending the unique identifier to a storage server;
and receiving the file content of the file corresponding to the unique identifier and issued by the storage server.
8. The method of claim 6, further comprising:
the second client acquires a first identification of the file corresponding to a first updating time stamp and a second identification of the file corresponding to a second updating time stamp from the first client;
sending the first identifier and the second identifier to the storage server;
receiving first content of the file determined by the storage server according to the first identifier and second content of the file determined by the storage server according to the second identifier; and
comparing the first file content and the second file content and showing a difference between the first content and the second content.
9. A file synchronization device applied to a central server, the device comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an updating request of a file from a client when any client updates the file, and the updating request carries an updating time stamp of the file;
the identification generation module is used for generating a unique identification of the file corresponding to the update timestamp according to the update timestamp and a preset file identification generation rule;
and the first sending module is used for respectively sending the unique identifiers to a storage server so as to synchronize the files.
10. A file synchronization apparatus applied to a storage server, the apparatus comprising:
the content receiving module is used for receiving the file content corresponding to the update time stamp of the file from the client when any client updates the file;
and the first identification receiving module is used for receiving the unique identification of the file generated according to the update timestamp from the central server so as to synchronize the file.
11. A file synchronization apparatus applied to a client, the apparatus comprising:
the updating request module is used for sending an updating request of a file to a central server, wherein the updating request carries an updating time stamp of the file, so that the central server generates a unique identifier of the file corresponding to the updating time stamp and sends the unique identifier to a storage server;
and the content sending module is used for sending the file content corresponding to the update timestamp to a storage server so as to synchronize the file.
12. A computer-readable storage medium comprising a set of computer-executable instructions that, when executed, perform the file synchronization method of any of claims 1-8.
CN202010596053.XA 2020-06-28 2020-06-28 File synchronization method, device and storage medium Pending CN111723062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010596053.XA CN111723062A (en) 2020-06-28 2020-06-28 File synchronization method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010596053.XA CN111723062A (en) 2020-06-28 2020-06-28 File synchronization method, device and storage medium

Publications (1)

Publication Number Publication Date
CN111723062A true CN111723062A (en) 2020-09-29

Family

ID=72569291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010596053.XA Pending CN111723062A (en) 2020-06-28 2020-06-28 File synchronization method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111723062A (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572845A (en) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 File distribution method and device, equipment and system
WO2015154682A1 (en) * 2014-04-08 2015-10-15 北京奇虎科技有限公司 Network request processing method, network server, and network system
CN105260202A (en) * 2015-09-15 2016-01-20 中国联合网络通信集团有限公司 Client file updating method and system
US20160217282A1 (en) * 2015-01-23 2016-07-28 Red Hat, Inc. Operating system consistency and malware protection
CN106487852A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 Realize the synchronous method of client file, device, terminal unit and system
CN107172169A (en) * 2017-05-27 2017-09-15 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN107463657A (en) * 2017-07-28 2017-12-12 腾讯科技(深圳)有限公司 File operation method and terminal
CN107800819A (en) * 2017-11-17 2018-03-13 深圳市泉眼网络科技有限公司 A kind of generation method of file identification, device and server
CN108200220A (en) * 2018-04-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method of data synchronization, server and storage medium
CN109558458A (en) * 2018-12-30 2019-04-02 贝壳技术有限公司 Method of data synchronization, configuration platform, transaction platform and data synchronous system
CN110012055A (en) * 2018-12-29 2019-07-12 北京乐我无限科技有限责任公司 File uploading method, apparatus and system
CN110703980A (en) * 2018-07-09 2020-01-17 网宿科技股份有限公司 File transmission method and device
CN111026416A (en) * 2019-09-17 2020-04-17 拉扎斯网络科技(上海)有限公司 Data updating method, system, device, electronic equipment and computer storage medium
CN111026724A (en) * 2019-11-24 2020-04-17 山东中创软件商用中间件股份有限公司 File synchronization method, device, equipment and medium based on distributed system
CN111045985A (en) * 2019-11-25 2020-04-21 北京百度网讯科技有限公司 File storage processing method, server, electronic device and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015154682A1 (en) * 2014-04-08 2015-10-15 北京奇虎科技有限公司 Network request processing method, network server, and network system
CN104572845A (en) * 2014-12-12 2015-04-29 百度在线网络技术(北京)有限公司 File distribution method and device, equipment and system
US20160217282A1 (en) * 2015-01-23 2016-07-28 Red Hat, Inc. Operating system consistency and malware protection
CN106487852A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 Realize the synchronous method of client file, device, terminal unit and system
CN105260202A (en) * 2015-09-15 2016-01-20 中国联合网络通信集团有限公司 Client file updating method and system
CN107172169A (en) * 2017-05-27 2017-09-15 广东欧珀移动通信有限公司 Method of data synchronization, device, server and storage medium
CN107463657A (en) * 2017-07-28 2017-12-12 腾讯科技(深圳)有限公司 File operation method and terminal
CN107800819A (en) * 2017-11-17 2018-03-13 深圳市泉眼网络科技有限公司 A kind of generation method of file identification, device and server
CN108200220A (en) * 2018-04-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method of data synchronization, server and storage medium
CN110703980A (en) * 2018-07-09 2020-01-17 网宿科技股份有限公司 File transmission method and device
CN110012055A (en) * 2018-12-29 2019-07-12 北京乐我无限科技有限责任公司 File uploading method, apparatus and system
CN109558458A (en) * 2018-12-30 2019-04-02 贝壳技术有限公司 Method of data synchronization, configuration platform, transaction platform and data synchronous system
CN111026416A (en) * 2019-09-17 2020-04-17 拉扎斯网络科技(上海)有限公司 Data updating method, system, device, electronic equipment and computer storage medium
CN111026724A (en) * 2019-11-24 2020-04-17 山东中创软件商用中间件股份有限公司 File synchronization method, device, equipment and medium based on distributed system
CN111045985A (en) * 2019-11-25 2020-04-21 北京百度网讯科技有限公司 File storage processing method, server, electronic device and storage medium

Similar Documents

Publication Publication Date Title
WO2018219178A1 (en) Data synchronization method and apparatus, server, and storage medium
US7860825B2 (en) Method for synchronizing software application and user data for asynchronous client-server and peer to peer computer networks
CN107426309B (en) A kind of information synchronization method, apparatus and system
US20080195739A1 (en) Resolving Synchronization Duplication
US20140268245A1 (en) Client device state collection and network-based processing solution
CN110263001B (en) File management method, device, system, equipment and computer readable storage medium
CN101610276A (en) Data soft delete, recovery and method for synchronous and terminal and system
CN108076081B (en) Method, device and system for synchronizing service data
CN112882738A (en) Configuration information updating method and device under micro-service architecture and electronic equipment
CN112307504A (en) Secure multi-party computing method and device, electronic equipment and storage medium
US20240015135A1 (en) Domain management and synchronization system
US11847219B2 (en) Determining a state of a network
CN112865927B (en) Message delivery verification method, device, computer equipment and storage medium
CN111723062A (en) File synchronization method, device and storage medium
CN107613016B (en) File batch downloading method, client, distribution server and system
CN110909048A (en) Data query method, device, server, client and storage medium
WO2005101209A1 (en) Backup method and backup system
CN115189931A (en) Distributed key management method, device, equipment and storage medium
CN110099117B (en) Method and device for issuing full amount of multi-version DNS zone files
KR101298852B1 (en) Method of restoring file and system for the same
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
CN112905550A (en) Data export method and device
CN112965740B (en) Asset information export method and device
CN116070284A (en) Data verification method, storage medium and related equipment
CN116756108A (en) File synchronization method, system, device and readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200929

RJ01 Rejection of invention patent application after publication