CN109710584A - A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform - Google Patents
A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform Download PDFInfo
- Publication number
- CN109710584A CN109710584A CN201811562566.8A CN201811562566A CN109710584A CN 109710584 A CN109710584 A CN 109710584A CN 201811562566 A CN201811562566 A CN 201811562566A CN 109710584 A CN109710584 A CN 109710584A
- Authority
- CN
- China
- Prior art keywords
- file
- server system
- service platform
- messaging service
- synchronization
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000001360 synchronised effect Effects 0.000 claims abstract description 25
- 230000001419 dependent effect Effects 0.000 claims abstract description 15
- 238000007689 inspection Methods 0.000 claims abstract description 4
- 238000012986 modification Methods 0.000 claims description 52
- 230000004048 modification Effects 0.000 claims description 52
- 238000012217 deletion Methods 0.000 claims description 35
- 230000037430 deletion Effects 0.000 claims description 35
- 230000008859 change Effects 0.000 claims description 30
- 230000005540 biological transmission Effects 0.000 claims description 6
- 238000000465 moulding Methods 0.000 claims description 4
- 238000012546 transfer Methods 0.000 claims description 4
- 230000008439 repair process Effects 0.000 claims 2
- 230000008569 process Effects 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention discloses a kind of method for realizing file bi-directional synchronization using cloud messaging service platform, it is related to synchronous method technical field, module, file reception update module, file synchronization control module are checked based on the cloud messaging service platform for being deployed in two server systems and file synchronization;The specified directory file of file synchronization inspection its dependent server system of module check, and the data information of specified directory file is written to the file synchronization control module of the server system in real time, file synchronization checks module by the cloud messaging service platform of changed data information real-time delivery to its dependent server system, the file reception update module of another server system obtains the message of above-mentioned cloud messaging service platform, and catalogue is locally configured to file reception update module institute deployment services device system in synchronous vacations, it is achieved in file bi-directional synchronization between two server systems.Invention additionally discloses a kind of methods for realizing file bi-directional synchronization using cloud messaging service platform.
Description
Technical field
It is specifically a kind of to realize that file is double using cloud messaging service platform the present invention relates to synchronous method technical field
To synchronous method and device.
Background technique
Cloud messaging service platform (abbreviation CMSP) is a kind of message-oriented middleware product of tide, it (can reflect certain Topic
Penetrate as message queue) in message be reliably transmitted in other Topic.
Different server system includes that two server systems in strange land are frequently necessary to synchronous documents, the two server systems
System has file that may change, i.e. file in a server system catalogue, which changes, (increases new file, modification
Existing file deletes existing file) when, the file in another server system catalogue will also occur equally to change, and want
There is certain real-time.File bi-directional synchronization is related to the monitoring of one end file change and delta data transmission and informing mechanism, also wants
Prevent circulation synchronous (i.e. the file B that A is synchronized to B is synchronized to A again, and then A is re-synchronised to B ...) in wide area network or the net of complexity
In network, data transmission often goes wrong, and causes file synchronization highly difficult.File tool on the market is mostly unidirectional at present
Or have use environment limitation, such as be limited in local area network, the number of files of synchronization cannot be too much.
Summary of the invention
The present invention is directed to the demand and shortcoming of current technology development, provides a kind of utilization cloud messaging service platform realization
The method and device of file bi-directional synchronization.
Firstly, the present invention discloses a kind of method for realizing file bi-directional synchronization using cloud messaging service platform, solve above-mentioned
Technical problem the technical solution adopted is as follows:
A method of realizing that file bi-directional synchronization, this method are based on being deployed in two services using cloud messaging service platform
The cloud messaging service platform and file synchronization of device system check that module, file reception update module, file synchronization control mould
Block, be deployed in the cloud messaging service platform of same server system, file synchronization checks module, file synchronization control module and
The file reception update module for being deployed in another server system is one group, realizes that a server system is serviced to another
The file synchronization of device system;File synchronization checks the specified directory file of its dependent server system of module check, and will specify
The file synchronization control module of the server system is written in the data information of catalogue file in real time, and file synchronization control module is written
Data information include it is newly-increased, modification, delete, unchanged four kinds of states, file synchronization check module will in newly-increased, modification,
Delete cloud messaging service platform of the data information real-time delivery of any state to its dependent server system, another server
The file reception update module of system obtains the message of above-mentioned cloud messaging service platform, and synchronous vacations update mould to file reception
Catalogue is locally configured in block institute deployment services device system.
Further, involved file synchronization checks the specified directory file of its dependent server system of module check, when
When the server system that file synchronization checks that module is disposed is in starting state for the first time, the text of file synchronization control module is written
The all newly-increased states of part data information;The memory of the file synchronization control module creates MAP table, file synchronization control module
The data information of the data information of this write-in of documents conditional synchronization check module and last write-in shows this by MAP table
The data information of secondary and last write-in file, and according to the variation of data information twice labeled as newly-increased, modification, deletion, nothing
Change any state.
Further, involved cloud messaging service platform includes message queue, message sending node, message recipient node;
The message queue is for the number in storage file synchronization control module in newly-increased, modification, deletion any state
It is believed that breath, the message queue and the file synchronization control module are deployed in same server system;
The message sending node is used to obtain the storage information of the message queue, and the storage information transmission that will acquire
To the message recipient node, the message sending node and the message queue are deployed in same server system, described to disappear
Breath sending node and the message recipient node are deployed in different server system;
The storage information that the message recipient node is used to receive, which is sent to, is deployed in disappearing for same server system
Queue is ceased, which passes the information on again to file reception update module, and the message queue and the file reception are more
New module is deployed in same server system.
Further, the data information of involved file is gone back in addition to including newly-increased, modification, deletion, unchanged four kinds of states
Including filename, file size, file change time, file owner, document source.
Preferably, when the data information of file is in newly-increased state, the change information of this document includes newly-increased file
The content of complete trails, newly-increased mark and newly-increased file.
Preferably, when the data information of file is in modification state, the change information of this document includes being modified file
Complete trails, modified logo and by the content of modification file.
Preferably, when the data information of file is in deletion state, the change information of this document includes deleted file
Complete trails and delete mark.
Secondly, the present invention also provides a kind of device for realizing file bi-directional synchronization using cloud messaging service platform, the device
Including being respectively deployed in the cloud messaging service platform of two server systems, file synchronization checks module, file synchronization control mould
Block, file reception update module;Be deployed in the cloud messaging service platform of same server system, file synchronization checks module,
File synchronization control module and the file reception update module for being deployed in another server system are one group, realize a service
File synchronization of the device system to another server system.
File synchronization checks that module is used to check the specified directory file of its dependent server system, and specified directory is literary
The file synchronization control module of its dependent server system is written in the data information of part in real time.
File synchronization control module is used to read the data information that the file synchronization checks module write-in, compares this and writes
Enter information and last time write-in information, and then is newly-increased, modification, deletion, unchanged according to comparing result flag data information
One state, meanwhile, for that will be in newly-increased, modify, the data information real-time delivery of deletion any state to its deployment services device
The cloud messaging service platform of system.
File reception update module is used to obtain the cloud messaging service platform information for being deployed in different server system, and will
What the synchronizing information of acquisition was modified to file reception update module institute deployment services device system is locally configured catalogue.
Further, involved file synchronization control module includes:
Reading submodule checks the file data information of module write-in for reading file synchronization;
MAP table submodule, for displaying the details of the data information of each write-in file;
Submodule is compared, this reads information and last reading information for comparing reading submodule, and comparison is tied
Fruit is sent to label submodule;
Submodule is marked, reads text for receiving comparing result and marking in MAP table submodule according to comparing result
The state of part data information, the state include newly-increased, modification, deletion, server system that is four kinds unchanged, and being disposed at it
When system is in starting state for the first time, label submodule all marks the file data information that reading submodule is read for shape
State;
Synchronous transfer submodule, for that will be in newly-increased, modify, the data information real-time Transmission of deletion any state to portion
Affix one's name to the cloud messaging service platform in different server system.
Further, involved cloud messaging service platform includes message queue, message sending node, message recipient node.
Message queue is described to disappear for the data information in storage file synchronization control module in newly-increased, modification, deletion any state
Breath queue and the file synchronization control module are deployed in same server system.Message sending node is for obtaining the message
The storage information of queue, and the storage information that will acquire is sent to the message recipient node, the message sending node and institute
It states message queue and is deployed in same server system, the message sending node and the message recipient node are deployed in different clothes
Business device system.The storage information that message recipient node is used to receive is sent to the message team for being deployed in same server system
Column, the message queue are passed the information on again to file reception update module.
Further, the data information of involved file is gone back in addition to including newly-increased, modification, deletion, unchanged four kinds of states
Including filename, file size, file change time, file owner, document source.
Preferably, when the data information of file is in newly-increased state, the change information of this document includes newly-increased file
The content of complete trails, newly-increased mark and newly-increased file.
Preferably, when the data information of file is in modification state, the change information of this document includes being modified file
Complete trails, modified logo and by the content of modification file.
Preferably, when the data information of file is in deletion state, the change information of this document includes deleted file
Complete trails and delete mark.
In addition, based on a kind of above-mentioned method for realizing file bi-directional synchronization using cloud messaging service platform, the present invention may be used also
To disclose a kind of computer-readable medium, including computer executed instructions, when the processor of storage control executes the calculating
When machine executes instruction, the storage control executes a kind of above-mentioned side that file bi-directional synchronization is realized using cloud messaging service platform
Method.
Furthermore based on a kind of above-mentioned method for realizing file bi-directional synchronization using cloud messaging service platform, the present invention may be used also
With open storage control, comprising: processor, memory and bus.Memory is for storing computer executed instructions, the place
Reason device is connect with the memory by the bus, when storage control operation, is deposited described in the processor execution
The computer executed instructions of reservoir storage, so that the storage control executes a kind of above-mentioned utilization cloud messaging service platform
The method for realizing file bi-directional synchronization.
A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform of the invention, with the prior art
Compared to having the beneficial effect that
Method and device of the invention is same based on the cloud messaging service platform and file for being deployed in two server systems
Step checks module, file reception update module, file synchronization control module;File synchronization checks its dependent server of module check
The specified directory file of system, and the data information of specified directory file is written to the file synchronization control of the server system in real time
Molding block, the data information of write-in file synchronization control module include newly-increased, modification, deletion, unchanged four kinds of states, and file is same
Step checks that module will be in data information real-time delivery that is newly-increased, modifying, delete any state to its dependent server system
The file reception update module of cloud messaging service platform, another server system obtains disappearing for above-mentioned cloud messaging service platform
Breath, and catalogue is locally configured to file reception update module institute deployment services device system in synchronous vacations, is achieved in two clothes
File bi-directional synchronization between device system of being engaged in, whole process participate in without artificial, are automatically performed, are had by the module and platform of deployment
The advantages of wide adaptation range, high reliablity, strong real-time, can not only synchronize small documents, can also synchronize big file and be greater than
The super large file of 4GB.
Detailed description of the invention
Attached drawing 1 is flow diagram of the invention;
Attached drawing 2 is the structural block diagram of file synchronization control module in the present invention.
Each label information indicates in attached drawing:
A, first server system, B, second server system;
A10, the first cloud messaging service platform, A20, the first file synchronization check module,
A30, the first file reception update module, A40, the first file synchronization control module;
A11, first message queue, A12, first message sending node, A13, first message receiving node;
B10, the second cloud messaging service platform, B20, the second file synchronization check module,
B30, the second file reception update module, B40, the second file synchronization control module;
B11, second message queue, B12, second message sending node, B13, second message receiving node;
41, reading submodule, 42, MAP table submodule, 43, comparison submodule,
44, submodule, 45, synchronous transfer submodule are marked.
Specific embodiment
The technical issues of to make technical solution of the present invention, solving and technical effect are more clearly understood, below in conjunction with tool
Body embodiment is checked technical solution of the present invention, is completely described, it is clear that described embodiment is only this hair
Bright a part of the embodiment, instead of all the embodiments.Based on the embodiment of the present invention, those skilled in the art are not doing
All embodiments obtained under the premise of creative work out, all within protection scope of the present invention.
Embodiment one:
With reference to attached drawing 1, the present embodiment proposes a kind of method for realizing file bi-directional synchronization using cloud messaging service platform, should
Method checks module, file reception more based on the cloud messaging service platform for being deployed in two server systems and file synchronization
New module, file synchronization control module.
In order to facilitate distinguish two server systems, we by two server systems be known as first server system A and
Second server system B.
In order to facilitate above-mentioned platform and module is distinguished, it is referred to as the first cloud messaging service platform A10, the first file synchronization
Check modules A 20, the first file reception update module A30, the first file synchronization control module A40 and the second cloud message clothes
Platform B10, the second file synchronization of being engaged in check that module B20, the second file reception update module B30, the second file synchronization control mould
Block B40.
Be deployed in the first cloud messaging service platform A10 of first server system A, the first file synchronization checks modules A 20,
First file synchronization control module A40 and the first file reception for being deployed in second server system B server system update mould
Block A30 is one group.First file synchronization checks that modules A 20 checks the specified directory file of first server system A, and will specify
The first file synchronization control module A40 of first server system A, the first text of write-in is written in the data information of catalogue file in real time
The data information of part synchronization control module A40 includes newly-increased, modification, deletion, unchanged four kinds of states, compares this write-in information
Information is written with the last time, and then according to comparing result flag data information to increase newly, modifying, delete, unchanged any state,
Meanwhile first file synchronization check modules A 20 will in the first file synchronization control module A40 in increase newly, modify, delete it is any
First cloud messaging service platform A10 of the data information real-time delivery of state to first server system A, second server system
The first file reception update module A30 of B obtains the message of the first cloud messaging service platform A10, and synchronous vacations are literary to first
What part received the disposed second server system B of update module A30 is locally configured catalogue, and realization first server system A is to the
The file synchronization of two server system B.
Be deployed in the second cloud messaging service platform B10 of second server system B, the second file synchronization checks module B20,
Second file synchronization control module B40 and the second file reception for being deployed in first server system A server system update mould
Block B30 is one group.Second file synchronization checks that module B20 checks the specified directory file of second server system B, and will specify
The second file synchronization control module B40 of second server system B, the second text of write-in is written in the data information of catalogue file in real time
The data information of part synchronization control module B40 includes newly-increased, modification, deletion, unchanged four kinds of states, compares this write-in information
Information is written with the last time, and then according to comparing result flag data information to increase newly, modifying, delete, unchanged any state,
Meanwhile second file synchronization check module B20 will in the second file synchronization control module B40 in increase newly, modify, delete it is any
Second cloud messaging service platform B10 of the data information real-time delivery of state to second server system B, first server system
The second file reception update module B30 of A obtains the message of the second cloud messaging service platform B10, and synchronous vacations are literary to first
What part received the disposed first server system A of update module A30 is locally configured catalogue, and realization second server system B is to the
The file synchronization of one server system A.
In the present embodiment, for first server system A, involved first file synchronization checks that modules A 20 checks the
The specified directory file of one server system A, when the first file synchronization checks the first server system A that modules A 20 is disposed
When in starting state for the first time, all newly-increased states of file data information of the first file synchronization control module A40 are written;The
The memory of one file synchronization control module A40 creates MAP table, and the first file synchronization control module A40 compares the first file synchronization
Data information of this write-in of inspection modules A 20 and the data information of last write-in, show this and last time by MAP table
The data information of file is written, and according to the variation of data information twice labeled as newly-increased, modification, deletion, unchanged any shape
State.Likewise, the second file synchronization to second server system B checks module B20 and the second file synchronization control module B40
Also identical processing is carried out.
In the present embodiment, the first cloud messaging service platform A10 and the second cloud messaging service platform B10 can be all made of
CMSP。
Involved first cloud messaging service platform A10 includes first message queue A11, first message sending node A12,
One message recipient node A13.The first message queue A11 is for storing in the first file synchronization control module A40 in new
Increase, modification, the data information for deleting any state, the first message queue A11 and the first file synchronization control module
A40 is deployed in first server system A.The first message sending node A12 is for obtaining the first message queue A11's
Information is stored, and the storage information that will acquire is sent to the first message receiving node A13, the first message sending node
A12 and the first message queue A11 are deployed in first server system A.The first message receiving node A13 will be for that will connect
The storage information received is sent to the second message queue B11 for being deployed in second server system B, and second message queue B11 is again
It passes the information on to the first file reception update module A30, the second message queue B11 and first file reception update
Modules A 30 is deployed in second server system B.
Involved second cloud messaging service platform B10 includes second message queue B11, second message sending node B12,
Two message recipient node B13.The second message queue B11 is for storing in the second file synchronization control module B40 in new
Increase, modification, the data information for deleting any state, the second message queue B11 and the second file synchronization control module
B40 is deployed in second server system B.The second message sending node B12 is for obtaining the second message queue B11's
Information is stored, and the storage information that will acquire is sent to the second message receiving node B13, the second message sending node
B12 and the second message queue B11 are deployed in second server system B.The second message receiving node B13 will be for that will connect
The storage information received is sent to the first message queue A11 for being deployed in first server system A, first message queue A11
It is passed the information on again to the second file reception update module B30, the first message queue A11 and second file reception more
New module B30 is deployed in first server system A.
By affixing one's name to the first cloud messaging service platform A10 in the first server end system A, and in second server system
Affix one's name to the second cloud messaging service platform B10 in the end B, wherein the first cloud messaging service platform A10 includes first message queue A11, the
One message sending node A12, first message receiving node A13, the second cloud messaging service platform B10 includes second message queue
B11, second message sending node B12, second message receiving node B13, so that in increasing newly, modifying, deleting any shape
The data information of state can be sent to message recipient node by message sending node in real time, to realize two server systems
The real-time and reliability of file synchronization.
In the present embodiment, the data information of involved file is in addition to including newly-increased, modification, deletion, unchanged four kinds of shapes
State further includes filename, file size, file change time, file owner, document source.
In the present embodiment, when the data information of file is in newly-increased state, the change information of this document includes newly-increased
The content of the complete trails of file, newly-increased mark and newly-increased file.When the data information of file is in modification state, this document
Change information includes the complete trails for being modified file, modified logo and by the content of modification file.At the data information of file
When the state of deletion, the change information of this document includes the complete trails and deletion mark of deleted file.
In the present embodiment, by taking first server system A, second server system B as an example, it is assumed that first server system
Certain file of A is deleted, then being deleted text when the first file reception update module A30 of second server system B is got
After the information of part, can by preset first server system A catalogue and second server system B catalogue mapping relations, and
According to the complete trails of the deleted file got, so as to find the corresponding catalogue of second server system B at place, from
And next the corresponding document in corresponding catalogue can be deleted, first server system A and second service are realized with this
The file synchronization of device system B.
Synchronization for newly-increased, modification file is similar with by the synchronizing process of modification file, no longer excessively repeats herein.
In the present embodiment, small documents can be not only synchronized, big file and the super large file greater than 4GB can also be synchronized.
Embodiment two:
With reference to attached drawing 1, the present embodiment proposes a kind of device that file bi-directional synchronization is realized using cloud messaging service platform, should
Device includes the cloud messaging service platform for being respectively deployed in two server systems, file synchronization inspection module, file synchronization control
Molding block, file reception update module.
In order to facilitate distinguish two server systems, we by two server systems be known as first server system A and
Second server system B.
In order to facilitate above-mentioned platform and module is distinguished, it is referred to as the first cloud messaging service platform A10, the first file synchronization
Check modules A 20, the first file reception update module A30, the first file synchronization control module A40 and the second cloud message clothes
Platform B10, the second file synchronization of being engaged in check that module B20, the second file reception update module B30, the second file synchronization control mould
Block B40.
Be deployed in the first cloud messaging service platform A10 of first server system A, the first file synchronization checks modules A 20,
First file synchronization control module A40 and the first file reception for being deployed in second server system B server system update mould
Block A30 is one group.First file synchronization checks that modules A 20 is used to check the specified directory file of first server system A, and will
The first file synchronization control module A40 of first server system A is written in the data information of specified directory file in real time;First text
Part conditional synchronization check module A20 checks the specified directory file of first server system A, and by the data information of specified directory file
The first file synchronization control module A40 of write-in first server system A in real time, is written the first file synchronization control module A40
Data information include it is newly-increased, modification, delete, unchanged four kinds of states, compare this write-in information and last write-in information,
And then according to comparing result flag data information to increase newly, modifying, delete, unchanged any state, meanwhile, the first file synchronization
Check that modules A 20 is real by the data information in newly-increased, modification, deletion any state in the first file synchronization control module A40
When be transferred to the first file synchronization control module A40 of first server system A;First file reception update module A30 is used for
The message of the first cloud messaging service platform A10 is obtained, and synchronous vacations dispose second to the first file reception update module A30
Server system B's is locally configured catalogue, realizes file synchronization of the first server system A to second server system B.
Be deployed in the second cloud messaging service platform B10 of second server system B, the second file synchronization checks module B20,
Second file synchronization control module B40 and the second file reception for being deployed in first server system A server system update mould
Block B30 is one group.Second file synchronization checks that module B20 is used to check the specified directory file of second server system B, and will
The data information of specified directory file is written the second file synchronization control module B40 of second server system B in real time, write-in the
The data information of two file synchronization control module B40 includes newly-increased, modification, deletion, unchanged four kinds of states, compares this write-in
Information and last write-in information, so according to comparing result flag data information be it is newly-increased, modification, delete, unchanged any
State, meanwhile, the second file synchronization checks that module B20 will be in the second file synchronization control module B40 and increases newly, modifies, deleting
Except second cloud messaging service platform B10 of the data information real-time delivery to second server system B of any state, the second file
Receive update module B30 and be used to obtain the message of the second cloud messaging service platform B10, and synchronous vacations to the first file reception more
The disposed first server system A's of new module A30 is locally configured catalogue, realizes second server system B to first server
The file synchronization of system A.
With reference to attached drawing 2, the first file synchronization control module A40 and the second file synchronization control module B40 respectively include:
Reading submodule 41 checks the file data information of module write-in for reading file synchronization;
MAP table submodule 42, for displaying the details of the data information of each write-in file;
Submodule 43 is compared, this reads information and last reading information for comparing reading submodule 41, and will be right
Label submodule 44 is sent to than result;
Submodule 44 is marked, is read for receiving comparing result and being marked in MAP table submodule 42 according to comparing result
The state of file data information is taken, the state is including increasing newly, modifying, delete, four kinds unchanged, and the service disposed at it
When device system is in starting state for the first time, label submodule 44 all marks the file data information that reading submodule 41 is read
To increase state newly;
Synchronous transfer submodule 45, for that will be in newly-increased, modification, delete the data information real-time Transmission of any state extremely
It is deployed in the cloud messaging service platform of different server system.
In the present embodiment, the first cloud messaging service platform A10 and the second cloud messaging service platform B10 can be all made of
CMSP。
Involved first cloud messaging service platform A10 includes first message queue A11, first message sending node A12,
One message recipient node A13.The first message queue A11 in storage file synchronization control module in newly-increased, modification,
The data information of any state is deleted, the first message queue A11 and the first file synchronization control module A40 are deployed in
First server system A.The first message sending node A12 is used to obtain the storage information of the first message queue A11,
And the storage information that will acquire is sent to the first message receiving node A13, the first message sending node A12 and described
First message queue A11 is deployed in first server system A.What the first message receiving node A13 was used to receive deposits
Storage information is sent to the second message queue B11 for being deployed in second server system B, and second message queue B11 again passes information
It is handed to the first file reception update module A30, the second message queue B11 and the first file reception update module A30
It is deployed in second server system B.
Involved second cloud messaging service platform B10 includes second message queue B11, second message sending node B12,
Two message recipient node B13.The second message queue B11 is for storing in the second file synchronization control module B40 in new
Increase, modification, the data information for deleting any state, the second message queue B11 and the second file synchronization control module
B40 is deployed in second server system B.The second message sending node B12 is for obtaining the second message queue B11's
Information is stored, and the storage information that will acquire is sent to the second message receiving node B13, the second message sending node
B12 and the second message queue B11 are deployed in second server system B.The second message receiving node B13 will be for that will connect
The storage information received is sent to the first message queue A11 for being deployed in first server system A, first message queue A11
It is passed the information on again to the second file reception update module B30, the first message queue A11 and second file reception more
New module B30 is deployed in first server system A.
By affixing one's name to the first cloud messaging service platform A10 in the first server end system A, and in second server system
Affix one's name to the second cloud messaging service platform B10 in the end B, wherein the first cloud messaging service platform A10 includes first message queue A11, the
One message sending node A12, first message receiving node A13, the second cloud messaging service platform B10 includes second message queue
B11, second message sending node B12, second message receiving node B13, so that in increasing newly, modifying, deleting any shape
The data information of state can be sent to message recipient node by message sending node in real time, to realize two server systems
The real-time and reliability of file synchronization.
In the present embodiment, the data information of involved file is in addition to including newly-increased, modification, deletion, unchanged four kinds of shapes
State further includes filename, file size, file change time, file owner, document source.
In the present embodiment, when the data information of file is in newly-increased state, the change information of this document includes newly-increased
The content of the complete trails of file, newly-increased mark and newly-increased file.When the data information of file is in modification state, this document
Change information includes the complete trails for being modified file, modified logo and by the content of modification file.At the data information of file
When the state of deletion, the change information of this document includes the complete trails and deletion mark of deleted file.
In the present embodiment, by taking first server system A, second server system B as an example, it is assumed that first server system
Certain file of A is deleted, then being deleted text when the first file reception update module A30 of second server system B is got
After the information of part, can by preset first server system A catalogue and second server system B catalogue mapping relations, and
According to the complete trails of the deleted file got, so as to find the corresponding catalogue of second server system B at place, from
And next the corresponding document in corresponding catalogue can be deleted, first server system A and second service are realized with this
The file synchronization of device system B.
Synchronization for newly-increased, modification file is similar with by the synchronizing process of modification file, no longer excessively repeats herein.
In the present embodiment, small documents can be not only synchronized, big file and the super large file greater than 4GB can also be synchronized.
Embodiment three:
The present embodiment can also disclose a kind of computer-readable medium, including computer executed instructions, work as storage control
Processor when executing the computer executed instructions, the storage control, which executes, a kind of described in embodiment one utilizes cloud message
The method of service platform realization file bi-directional synchronization.
Example IV:
The present embodiment can also disclose a kind of storage control, comprising: processor, memory and bus.Memory is used for
Computer executed instructions are stored, the processor is connect with the memory by the bus, when the storage control is transported
When row, the processor executes the computer executed instructions of the memory storage, so that the storage control executes
A kind of above-mentioned method for realizing file bi-directional synchronization using cloud messaging service platform.
To sum up, each embodiment of the present invention at least has the following beneficial effects:
1, method and device of the invention is based on the cloud messaging service platform and file for being deployed in two server systems
Conditional synchronization check module, file reception update module, file synchronization control module;File synchronization checks its affiliated service of module check
The specified directory file of device system, and the data information of specified directory file is written to the file synchronization of the server system in real time
Control module, the data information of write-in file synchronization control module include newly-increased, modification, deletion, unchanged four kinds of states, file
Conditional synchronization check module will be in data information real-time delivery that is newly-increased, modifying, delete any state to its dependent server system
Cloud messaging service platform, the file reception update module of another server system obtains disappearing for above-mentioned cloud messaging service platform
Breath, and catalogue is locally configured to file reception update module institute deployment services device system in synchronous vacations, is achieved in two clothes
File bi-directional synchronization between device system of being engaged in, whole process participate in without artificial, are automatically performed, are had by the module and platform of deployment
The advantages of wide adaptation range, high reliablity, strong real-time, can not only synchronize small documents, can also synchronize big file and be greater than
The super large file of 4GB.
2, method and device of the invention by the first server end system A affix one's name to the first cloud messaging service platform A10,
And the second cloud messaging service platform B10 is affixed one's name in the second server end system B, wherein the first cloud messaging service platform A10 packet
Include first message queue A11, first message sending node A12, first message receiving node A13, the second cloud messaging service platform
B10 includes second message queue B11, second message sending node B12, second message receiving node B13, so that in new
Increasing, the data information modified, delete any state can be sent to message recipient node by message sending node in real time, thus
Realize the real-time and reliability of first server system A and second server system B file synchronization.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity
Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation
Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements,
It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment
Some elements.In the absence of more restrictions, the element limited by sentence " including a 〃 〃 ", it is not excluded that
There is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention,
Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.
Claims (10)
1. a kind of method for realizing file bi-directional synchronization using cloud messaging service platform, which is characterized in that this method is based on deployment
Check that module, file reception update module, file are same in the cloud messaging service platform and file synchronization of two server systems
Control module is walked, is deployed in the cloud messaging service platform of same server system, file synchronization checks module, file synchronization control
Molding block and the file reception update module for being deployed in another server system are one group, realize a server system to another
The file synchronization of one server system;File synchronization checks the specified directory file of its dependent server system of module check,
And the data information of specified directory file is written to the file synchronization control module of the server system in real time, file synchronization is written
The data information of control module includes newly-increased, modification, deletion, unchanged four kinds of states, and file synchronization checks that module will be in new
Increase, modify, the cloud messaging service platform of the data information real-time delivery of deletion any state to its dependent server system, it is another
The file reception update module of a server system obtains the message of above-mentioned cloud messaging service platform, and synchronous vacations connect to file
That receives update module institute deployment services device system is locally configured catalogue.
2. a kind of method for realizing file bi-directional synchronization using cloud messaging service platform according to claim 1, feature
It is, the file synchronization checks the specified directory file of its dependent server system of module check, when file synchronization checks mould
When the server system that block is disposed is in starting state for the first time, the file data information that file synchronization control module is written is whole
To increase state newly;The memory of the file synchronization control module creates MAP table, the synchronous inspection of file synchronization control module documents
The data information and the last data information being written for looking into this write-in of module show that this is written with last by MAP table
The data information of file, and according to the variation of data information twice labeled as newly-increased, modification, deletion, unchanged any state.
3. a kind of method for realizing file bi-directional synchronization using cloud messaging service platform according to claim 1, feature
It is, the cloud messaging service platform includes message queue, message sending node, message recipient node;
The message queue is for the data letter in storage file synchronization control module in newly-increased, modification, deletion any state
Breath, the message queue and the file synchronization control module are deployed in same server system;
The message sending node is used to obtain the storage information of the message queue, and the storage information that will acquire is sent to institute
Message recipient node is stated, the message sending node and the message queue are deployed in same server system, the message hair
Node and the message recipient node is sent to be deployed in different server system;
The storage information that the message recipient node is used to receive is sent to the message team for being deployed in same server system
Column, the message queue are passed the information on again to file reception update module, and the message queue and the file reception update mould
Block portion is deployed on same server system.
4. a kind of method for realizing file bi-directional synchronization using cloud messaging service platform according to claim 1 or 2 or 3,
It is characterized in that, the data information of the file is in addition to including newly-increased, modification, deletion, unchanged four kinds of states, it further include file
Name, file size, file change time, file owner, document source.
5. a kind of method for realizing file bi-directional synchronization using cloud messaging service platform according to claim 4, feature
It is, when the data information of file is in newly-increased state, the change information of this document includes the complete trails of newly-increased file, increases newly
The content of mark and newly-increased file;
And/or
When the data information of file is in modification state, the change information of this document includes the complete trails for being modified file, repairs
Change mark and by the content of modification file;
And/or
When the data information of file is in deletion state, the change information of this document includes the complete trails of deleted file and deletes
Except mark.
6. a kind of device for realizing file bi-directional synchronization using cloud messaging service platform, which is characterized in that the device includes difference
It is deployed in the cloud messaging service platform of two server systems, file synchronization checks that module, file synchronization control module, file connect
Receive update module;It is deployed in the cloud messaging service platform of same server system, file synchronization checks module, file synchronization control
Molding block and the file reception update module for being deployed in another server system are one group, realize a server system to another
The file synchronization of one server system;
The file synchronization checks that module is used to check the specified directory file of its dependent server system, and specified directory is literary
The file synchronization control module of its dependent server system is written in the data information of part in real time;
The file synchronization control module is used to read the data information that the file synchronization checks module write-in, compares this and writes
Enter information and last time write-in information, and then is newly-increased, modification, deletion, unchanged according to comparing result flag data information
One state, meanwhile, for that will be in newly-increased, modify, the data information real-time delivery of deletion any state to its deployment services device
The cloud messaging service platform of system;
The file reception update module is used to obtain the cloud messaging service platform information for being deployed in different server system, and will
What the synchronizing information of acquisition was modified to file reception update module institute deployment services device system is locally configured catalogue.
7. a kind of device for realizing file bi-directional synchronization using cloud messaging service platform according to claim 6, feature
It is, the file synchronization control module includes:
Reading submodule checks the file data information of module write-in for reading file synchronization;
MAP table submodule, for displaying the details of the data information of each write-in file;
Submodule is compared, this reads information and last reading information for comparing reading submodule, and comparing result is passed
It send to label submodule;
Submodule is marked, for receiving comparing result and marking read number of files in MAP table submodule according to comparing result
It is believed that the state of breath, the state include it is newly-increased, modification, delete, be four kinds unchanged, and at the server system that it is disposed
When starting state for the first time, label submodule all marks the file data information that reading submodule is read for state;
Synchronous transfer submodule, for that will be in newly-increased, modification, delete the data information real-time Transmission of any state to being deployed in
The cloud messaging service platform of different server system.
8. a kind of device for realizing file bi-directional synchronization using cloud messaging service platform according to claim 6, feature
It is, the cloud messaging service platform includes message queue, message sending node, message recipient node;
The message queue is for the data letter in storage file synchronization control module in newly-increased, modification, deletion any state
Breath, the message queue and the file synchronization control module are deployed in same server system;
The message sending node is used to obtain the storage information of the message queue, and the storage information that will acquire is sent to institute
Message recipient node is stated, the message sending node and the message queue are deployed in same server system, the message hair
Node and the message recipient node is sent to be deployed in different server system;
The storage information that the message recipient node is used to receive is sent to the message team for being deployed in same server system
Column, the message queue are passed the information on again to file reception update module.
9. a kind of device that file bi-directional synchronization is realized using cloud messaging service platform described according to claim 6 or 7 or 8,
It is characterized in that, the data information of the file is in addition to including newly-increased, modification, deletion, unchanged four kinds of states, it further include file
Name, file size, file change time, file owner, document source.
10. a kind of device for realizing file bi-directional synchronization using cloud messaging service platform according to claim 9, feature
It is, when the data information of file is in newly-increased state, the change information of this document includes the complete trails of newly-increased file, increases newly
The content of mark and newly-increased file;
And/or
When the data information of file is in modification state, the change information of this document includes the complete trails for being modified file, repairs
Change mark and by the content of modification file;
And/or
When the data information of file is in deletion state, the change information of this document includes the complete trails of deleted file and deletes
Except mark.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562566.8A CN109710584A (en) | 2018-12-20 | 2018-12-20 | A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562566.8A CN109710584A (en) | 2018-12-20 | 2018-12-20 | A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109710584A true CN109710584A (en) | 2019-05-03 |
Family
ID=66256957
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811562566.8A Pending CN109710584A (en) | 2018-12-20 | 2018-12-20 | A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109710584A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602226A (en) * | 2019-09-19 | 2019-12-20 | 浪潮软件集团有限公司 | Message forwarding and caching method based on CMSP |
CN110704389A (en) * | 2019-09-24 | 2020-01-17 | 武汉意畅智云科技有限公司 | Bidirectional file synchronization method based on drive and state |
CN111262883A (en) * | 2020-02-28 | 2020-06-09 | 浪潮软件股份有限公司 | CMSP-based file synchronization system, synchronization method and file system |
CN111490902A (en) * | 2020-04-12 | 2020-08-04 | 上海兰鹤航空科技有限公司 | 664 network message construction algorithm |
CN111526198A (en) * | 2020-04-24 | 2020-08-11 | 深圳融安网络科技有限公司 | Data synchronization method and device for server and computer readable storage medium |
CN111782619A (en) * | 2020-07-28 | 2020-10-16 | 上海爱数信息技术股份有限公司 | Document increment synchronization method and device between servers and storage medium |
CN112052229A (en) * | 2020-08-31 | 2020-12-08 | 许继集团有限公司 | Graphic synchronization method and graphic synchronization system of auxiliary equipment centralized monitoring system |
CN113254032A (en) * | 2021-05-07 | 2021-08-13 | 杭州广立微电子股份有限公司 | Probe card record file updating module, system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103595559A (en) * | 2013-11-05 | 2014-02-19 | 深圳市远行科技有限公司 | System and method for transmitting big data and service system thereof |
US20140237024A1 (en) * | 2013-02-19 | 2014-08-21 | Acer Incorporated | Network communication devices and file tracking methods thereof |
CN108228733A (en) * | 2017-12-12 | 2018-06-29 | 浪潮软件股份有限公司 | A kind of file syn chronizing system and method |
CN108897895A (en) * | 2018-07-12 | 2018-11-27 | 浪潮软件集团有限公司 | Device and method for realizing cross-gateway Mysql database synchronization based on cloud message service platform |
CN109005218A (en) * | 2018-07-12 | 2018-12-14 | 浪潮软件集团有限公司 | Method and device for cross-gatekeeper ordered data transmission of cloud message service platform |
-
2018
- 2018-12-20 CN CN201811562566.8A patent/CN109710584A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140237024A1 (en) * | 2013-02-19 | 2014-08-21 | Acer Incorporated | Network communication devices and file tracking methods thereof |
CN103595559A (en) * | 2013-11-05 | 2014-02-19 | 深圳市远行科技有限公司 | System and method for transmitting big data and service system thereof |
CN108228733A (en) * | 2017-12-12 | 2018-06-29 | 浪潮软件股份有限公司 | A kind of file syn chronizing system and method |
CN108897895A (en) * | 2018-07-12 | 2018-11-27 | 浪潮软件集团有限公司 | Device and method for realizing cross-gateway Mysql database synchronization based on cloud message service platform |
CN109005218A (en) * | 2018-07-12 | 2018-12-14 | 浪潮软件集团有限公司 | Method and device for cross-gatekeeper ordered data transmission of cloud message service platform |
Non-Patent Citations (1)
Title |
---|
李强等: "弱连接网络环境中的多主机文件同步", 《小型微型计算机系统》 * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602226A (en) * | 2019-09-19 | 2019-12-20 | 浪潮软件集团有限公司 | Message forwarding and caching method based on CMSP |
CN110704389A (en) * | 2019-09-24 | 2020-01-17 | 武汉意畅智云科技有限公司 | Bidirectional file synchronization method based on drive and state |
CN110704389B (en) * | 2019-09-24 | 2022-02-01 | 武汉意畅智云科技有限公司 | Bidirectional file synchronization method based on drive and state |
CN111262883A (en) * | 2020-02-28 | 2020-06-09 | 浪潮软件股份有限公司 | CMSP-based file synchronization system, synchronization method and file system |
CN111490902A (en) * | 2020-04-12 | 2020-08-04 | 上海兰鹤航空科技有限公司 | 664 network message construction algorithm |
CN111490902B (en) * | 2020-04-12 | 2024-05-14 | 上海兰鹤航空科技有限公司 | 664 Network message construction algorithm |
CN111526198A (en) * | 2020-04-24 | 2020-08-11 | 深圳融安网络科技有限公司 | Data synchronization method and device for server and computer readable storage medium |
CN111782619A (en) * | 2020-07-28 | 2020-10-16 | 上海爱数信息技术股份有限公司 | Document increment synchronization method and device between servers and storage medium |
CN112052229A (en) * | 2020-08-31 | 2020-12-08 | 许继集团有限公司 | Graphic synchronization method and graphic synchronization system of auxiliary equipment centralized monitoring system |
CN112052229B (en) * | 2020-08-31 | 2024-05-10 | 许继集团有限公司 | Graphic synchronization method and graphic synchronization system of auxiliary equipment centralized monitoring system |
CN113254032A (en) * | 2021-05-07 | 2021-08-13 | 杭州广立微电子股份有限公司 | Probe card record file updating module, system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109710584A (en) | A kind of method and device for realizing file bi-directional synchronization using cloud messaging service platform | |
US8620861B1 (en) | Preserving file metadata during atomic save operations | |
US8600948B2 (en) | Avoiding duplicative storage of managed content | |
CN106506587A (en) | A kind of Docker image download methods based on distributed storage | |
CN103473277B (en) | The Snapshot Method and device of file system | |
CN109543455B (en) | Data archiving method and device for block chain | |
CN109117425A (en) | Management is stored as the digital asset of component and packaging file | |
US20220286417A1 (en) | Content management system with integrated email service | |
CN105404679B (en) | Data processing method and device | |
CN104714859A (en) | Rapid backup and recovery method of mass files | |
CN108228733A (en) | A kind of file syn chronizing system and method | |
US7818293B2 (en) | Method and system to synchronize updated versions of a document edited on a collaborative site that are under document management control | |
CN104348859B (en) | File synchronisation method, device, server, terminal and system | |
US20160088077A1 (en) | Seamless binary object and metadata sync | |
CN104965835B (en) | A kind of file read/write method and device of distributed file system | |
CN106055723B (en) | A kind of database in phase device, system and method | |
CN106469152A (en) | A kind of document handling method based on ETL and system | |
CN109885299A (en) | Template processing method, device, computer equipment and storage medium in model development | |
US9111261B2 (en) | Method and system for management of electronic mail communication | |
CN107357920A (en) | The more copy data synchronous method and system of a kind of increment type | |
US10162720B2 (en) | Copy-on-read process in disaster recovery | |
CN105407044B (en) | A kind of implementation method of the cloud storage gateway system based on NFS | |
US9934240B2 (en) | On demand access to client cached files | |
CN101685461B (en) | Method for integrally transferring project file and related mapping file | |
CN101309231B (en) | Rope operation method and apparatus |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190503 |