CN109005203A - Method of data synchronization and device, storage medium, processor, terminal - Google Patents
Method of data synchronization and device, storage medium, processor, terminal Download PDFInfo
- Publication number
- CN109005203A CN109005203A CN201710419192.3A CN201710419192A CN109005203A CN 109005203 A CN109005203 A CN 109005203A CN 201710419192 A CN201710419192 A CN 201710419192A CN 109005203 A CN109005203 A CN 109005203A
- Authority
- CN
- China
- Prior art keywords
- terminal
- configuration information
- broadcast message
- data synchronization
- network link
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000001360 synchronised effect Effects 0.000 claims description 15
- 238000011084 recovery Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 6
- 230000005540 biological transmission Effects 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 5
- 230000008901 benefit Effects 0.000 claims description 3
- 230000004888 barrier function Effects 0.000 claims description 2
- 238000001514 detection method Methods 0.000 abstract description 13
- 238000005516 engineering process Methods 0.000 abstract description 8
- 230000007704 transition Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000004807 localization Effects 0.000 description 2
- 101001072091 Homo sapiens ProSAAS Proteins 0.000 description 1
- 102100036366 ProSAAS Human genes 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/12—Hotels or restaurants
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/084—Configuration by using pre-existing information, e.g. using templates or copying from other elements
- H04L41/0846—Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Telephonic Communication Services (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a kind of method of data synchronization and device, storage medium, processor, terminals.Wherein, this method comprises: whether the network link between first terminal detection first terminal and at least one second terminal breaks down, wherein first terminal and second terminal access same application platform;When first terminal detects failure, first terminal sends the first broadcast message at least one second terminal, wherein carrying synchronizing information in the first broadcast message;The present invention solves the technical issues of stability of the synchronization scheme transition dependence internet or local area network that store in the related technology.
Description
Technical field
The present invention relates to data field of synchronization, in particular to a kind of method of data synchronization and device, storage medium,
Processor, terminal.
Background technique
Currently, catering industry mainly has 2 kinds for business data processing based on the food and drink software management system of SAAS structure
Mode: the pure cloud storage of a.;B. cloud storage+shops is locally stored.Pure cloud storage mode is when shops internet is unstable
It will lead to shops's local system not being available, seriously affect food and drink trade company and normally produce business.Cloud storage+shops is locally stored
Mode can get rid of food and drink trade company and be completely dependent on to internet, guarantee data consistency by synchronization+asynchronous process logic, but
It is the stability of local area network still to be relied on, when the severe net such as broadcast storm, packet loss, signal interference occurs in local area network
It can not be synchronized in time when network environment.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of method of data synchronization and device, storage medium, processor, terminals, at least
The technical issues of stability for the synchronization scheme transition dependence internet or local area network that solution stores in the related technology.
According to an aspect of an embodiment of the present invention, a kind of method of data synchronization is provided, comprising: first terminal detection the
Whether the network link between one terminal and at least one second terminal breaks down, wherein first terminal connects with second terminal
Enter same application platform;When first terminal detects failure, first terminal sends the first broadcast at least one second terminal
Message, wherein carrying synchronizing information in the first broadcast message.
Optionally, the first broadcast message is the message obtained after being packaged to synchronizing information using udp protocol;Lattice chain
Road is the link using transmission control protocol TCP.
Optionally, before first terminal sends the first broadcast message at least one second terminal, method further include: first
Terminal receives the second broadcast message of at least one second terminal, wherein the second broadcast message is carried for request first eventually
The solicited message of the access address at end;First terminal sends access address at least one second terminal.
Optionally, first terminal is master terminal, and second terminal is from terminal;When first terminal failure, method further include:
Designated terminal at least one second terminal receives setting instruction;Designated terminal is set to according to setting instruction
Master terminal;Alternatively, holding consultation between at least one second terminal, determines and lead from least one second terminal according to preset rules
Terminal.
Optionally, whether the link between first terminal detection first terminal and at least one second terminal breaks down,
Include: whether first terminal detection first terminal breaks down;First terminal detects the network environment hair where network link
Raw failure.
Optionally, when the fault recovery of network link is normal, method further include: first terminal is requested to network side equipment
The first currently stored configuration information of network side equipment;First terminal receives the first configuration information;First terminal compares first and matches
Whether confidence breath is consistent with the second configuration information being locally stored;When comparison result instruction is inconsistent, first terminal is according to the
One the second configuration information of configuration information update.
Optionally, it is whether consistent with the second configuration information being locally stored to compare the first configuration information for first terminal, comprising:
First terminal extracts the first label and the second label and first terminal respectively from the first configuration information and the second configuration information
Compare the first label and second mark whether it is identical, wherein when identical, determine the first configuration information and the second configuration information one
It causes;When different, determine that the first configuration information and the second configuration information are inconsistent.
Other side according to an embodiment of the present invention provides a kind of method of data synchronization, comprising: in first terminal and
When network link between second terminal breaks down, second terminal receives first terminal is sent first and broadcasts the message, and first
Terminal and second terminal access same application platform, carry synchronizing information in the first broadcast message;Second terminal is according to synchronous
Information synchronizes.
Another aspect according to an embodiment of the present invention provides a kind of data synchronization unit, comprising: synchronization module is used
Whether the network link between detection first terminal and at least one second terminal breaks down, wherein first terminal and the
Two terminals access same application platform;Broadcast module, for when first terminal detects failure, at least one second terminal
The first broadcast message is sent, wherein carrying synchronizing information in the first broadcast message.
Another aspect according to an embodiment of the present invention, provides a kind of storage medium, and storage medium includes the journey of storage
Sequence, wherein program executes any of the above method of data synchronization.
Another aspect according to an embodiment of the present invention provides a kind of processor, and processor is used to run program,
In, any of the above method of data synchronization is executed when program is run.
Another aspect according to an embodiment of the present invention provides a kind of terminal, comprising: processor, for detecting first
Whether the network link between terminal and at least one second terminal breaks down, wherein first terminal and second terminal access
Same application platform;Communication device, for it is wide to send first at least one second terminal when first terminal detects failure
Broadcast message, wherein carry synchronizing information in the first broadcast message.
In embodiments of the present invention, the network between first terminal and at least one second terminal is detected using first terminal
The mode whether link breaks down, by when first terminal detects failure, first terminal is at least one second terminal
The first broadcast message is sent, has achieved the purpose that cloud storage and shops are locally stored, to realize guarantee data consistency
With the technical effect of accuracy, and then solves the synchronization scheme stored in the related technology and depend on internet or local area network unduly
The technical issues of stability.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow diagram for a kind of method that data are synchronous according to prior art;
Fig. 2 is a kind of synchronous method flow schematic diagram of optional data according to an embodiment of the present invention;
Fig. 3 is the structural schematic diagram according to a kind of optional data synchronous system of the embodiment of the present application;
Fig. 4 is the structural block diagram according to a kind of data synchronization unit of the embodiment of the present application;And
Fig. 5 is the structural block diagram according to another terminal of the embodiment of the present application.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to embodiments of the present invention, a kind of method of data synchronization embodiment is provided, it should be noted that in the stream of attached drawing
The step of journey illustrates can execute in a computer system such as a set of computer executable instructions, although also, flowing
Logical order is shown in journey figure, but in some cases, it can be to be different from shown or described by sequence execution herein
The step of.
Fig. 1 is a kind of method that data are synchronous according to embodiments of the present invention, as shown in Figure 1, this method comprises the following steps:
Whether step S102, the network link between first terminal detection first terminal and at least one second terminal occur
Failure, wherein first terminal and second terminal access same application platform;
In above-mentioned steps S102, when there are the nets between network link between first terminal and at least one second terminal
When the communication failure of network link, the network link being determined as between the two breaks down;Wherein, first terminal connects with second terminal
Enter same shops's system platform;When specifically, from shops's system login, according to the access address of first terminal to first terminal
It accesses between at least one second terminal, whether detection breaks down between the two;It can show as following implemented side
Formula:, can if Network status connection failure (such as network signal dies down or disappears) or terminal break down
To confirm that network link between the two breaks down.
In an alternative embodiment, the link between first terminal detection first terminal and at least one second terminal
Whether break down, comprising: whether first terminal detection first terminal breaks down;First terminal detects where network link
Network environment break down;
Through the above steps, the network between first terminal detection first terminal and at least one second terminal may be implemented
The purpose whether link breaks down.
Step S104, when first terminal detects failure, first terminal sends first extensively at least one second terminal
Broadcast message, wherein carry synchronizing information in the first broadcast message;
In above-mentioned steps S104, above-mentioned synchronizing information refer to first terminal configuration information and second terminal with confidence
Synchronizing information between breath, specifically, first terminal become when configuration information is changed at least one second terminal is synchronous
Configuration information after more;
In an alternative embodiment, before first terminal sends the first broadcast message at least one second terminal,
Method further include: first terminal receives the second broadcast message of at least one second terminal, wherein the second broadcast message carries
For requesting the solicited message of the access address of first terminal;First terminal sends access address at least one second terminal.
Through the above steps, first terminal may be implemented and send synchronization at least one second terminal by way of broadcast
The purpose of information, to get rid of the dependence to internet and local area network.
S102 and step S104 through the above steps, using first terminal detection first terminal and at least one second terminal
Between the mode that whether breaks down of network link, by when first terminal detects failure, first terminal is at least one
A second terminal sends the first broadcast message, since synchronizing information can be sent by way of broadcast, can get rid of pair
The dependence of internet and local area network to ensure that the stability of synchronizing process, and then is solved and is stored in the related technology
Synchronization scheme transition the technical issues of relying on the stability of internet or local area network.
Optionally, above-mentioned first broadcast message is the message obtained after being packaged to synchronizing information using udp protocol;Net
Network link is the link using transmission control protocol TCP.That is, above-mentioned synchronizing information can be carried out extensively using udp protocol
It broadcasts.
Optionally, above-mentioned first terminal is master terminal, and second terminal is from terminal;When first terminal failure, it can pass through
Following manner determines master terminal, but not limited to this: the designated terminal at least one second terminal receives setting instruction;Foundation is set
It sets instruction and sets master terminal for designated terminal;Alternatively, hold consultation between at least one second terminal, according to preset rules to
Master terminal is determined in a few second terminal;
In above-mentioned steps, the IP address of IP address and second terminal comprising setting master terminal in setting instruction;In advance
If rule can be pre-set priority, can also according to first terminal and second terminal application platform registion time, for
The latter can show as following implementations: the registion time of the A terminal in second terminal is 2015-1-1, in second terminal
B terminal registion time be 2015-5-1, due to A terminal registion time earlier than B terminal registion time, it is thus determined that A
Terminal is master terminal.
Specifically, at least one is set as master terminal according to setting instruction or preset rules from terminal;It is being provided with
Afterwards, master terminal sends modification information and informs at least one second terminal, at the same change master terminal in network side equipment with confidence
Breath.
Optionally, when the fault recovery of network link is normal, first terminal requests network side equipment to network side equipment
The first currently stored configuration information;First terminal receives the first configuration information;First terminal compares the first configuration information and this
Whether the second configuration information of ground storage is consistent;When comparison result instruction is inconsistent, first terminal is according to the first configuration information
Update the second configuration information;
Specifically, when the fault recovery of above-mentioned network link is normal, synchronous newest the matching for obtaining master terminal configuration of cloud terminal
Confidence breath, and compared with the configuration information being locally stored, the configuration information being locally stored is modified when inconsistent.
It is alternatively possible to compare in several ways the first configuration information and the second configuration information for being locally stored whether one
It causes, for example, can be through but not limited to this: first terminal extracts first from the first configuration information and the second configuration information respectively
Label and second label and first terminal compare the first label and second mark whether it is identical, wherein when identical, determine
First configuration information and the second accordant configuration information;When different, determine that the first configuration information and the second configuration information are inconsistent;
Specifically, the first label and the second label refer to the version number of configuration information, and in above-mentioned steps, all terminals are opened
When dynamic, the configuration information of synchronizing network side apparatus needed, and return to ownship information to network side equipment, following implemented can be shown as
Mode: if the version number of configuration information is 1.0 in the first label, the version number of configuration information is 1.0 in the second label, then the
One configuration information and the second accordant configuration information;If the version number of the configuration information in the first label is 2.0, in the second label
The version number of configuration information is 3.0, then the first configuration information and the second configuration information are inconsistent.
Below in conjunction with an application scenarios an of concrete application scene illustratively the embodiment of the present application, as shown in Figure 2:
Step S202 when logging in from shops's system, accesses master terminal according to the master terminal address of storage, wherein work as local
After not stored or access failure, master terminal address is inquired by udp broadcast in local area network;After master terminal receives inquiry message,
Feedback is informed that the information of master terminal and IP address is sent to from terminal;
Step S204, when master terminal failure, it is master terminal that other terminals, which are arranged, in trade company on terminating machine, wherein setting
After the completion, master terminal sends broadcast notice and informs that master terminal has changed in local area network, while cloud interface being called to modify cloud master
Terminal setting;
Step S206 modifies the configuration information of local master terminal, wherein right after being provided with after receiving information from terminal
Main terminal equipment carries out data update, and master terminal sends master terminal in broadcast notice local area network and changed after update;It is connect from terminal
It collects mail and modifies local master terminal configuration information after ceasing;
Step S208, after master terminal Network Abnormal is networked again, cloud is synchronous to obtain newest master terminal configuration information,
And compared with information is locally configured, wherein the configuration information of local master terminal is modified when the two is inconsistent;
Step S210 need to synchronize cloud master terminal configuration information and return to the machine to cloud when all terminal devices start
Information, wherein, need to be by change mark to determine whether synchronizing success when the master terminal setting change of cloud;
S202 to step S210 through the above steps, using first terminal detection first terminal and at least one second terminal
Between the mode that whether breaks down of network link, by when first terminal detects failure, first terminal is at least one
A second terminal sends the first broadcast message, since synchronizing information can be sent by way of broadcast, can get rid of pair
The dependence of internet and local area network to ensure that the stability of synchronizing process, and then is solved and is stored in the related technology
Synchronization scheme transition the technical issues of relying on the stability of internet or local area network.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, the technical solution of the application is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the application.
Embodiment 3
According to embodiments of the present invention, a kind of system that data are synchronous is additionally provided, as shown in Figure 3, comprising:
Terminal device 301, for logging in shops's system;The terminal device includes but is not limited to: tablet computer, mobile electricity
Words, computer etc..
Master terminal 303, for carrying out the synchronous of configuration information with terminal device 301;The terminal device includes but is not limited to:
POS machine etc..
From terminal 305, for carrying out the synchronous of configuration information with master terminal 303;The terminal device includes but is not limited to:
POS machine etc..
Printer 307, for printing the data of the output of master terminal 303;
Cloud server 309 in network side storing master terminal 303 and from the synchronizing information of terminal 307, and monitors master
Terminal 303 and response data is issued from 305 state of terminal, and to principal and subordinate's terminal, for example, in catering field, in principal and subordinate's terminal
When for POS machine, billing data can be issued.
Embodiment 4
According to embodiments of the present invention, a kind of data synchronization unit is additionally provided, as shown in Figure 4, comprising:
Whether detection module 401, the network link for detecting between first terminal and at least one second terminal occur
Failure, wherein first terminal and second terminal access same application platform;
Broadcast module 403, for sending the first broadcast at least one second terminal when first terminal detects failure
Message, wherein carrying synchronizing information in the first broadcast message.
Herein it should be noted that above-mentioned modules correspond to embodiment 1 in step S102 to step S104, it is each
Module is identical as example and application scenarios that corresponding step is realized, but is not limited to the above embodiments a disclosure of that.
It should be noted that above-mentioned module is may operate in as a part of device in the terminal of the offer of embodiment one.
In one alternate embodiment, above-mentioned modules can show as following hardware implementation mode: above-mentioned each mould
Block is located in same processor;Alternatively, the mode of above-mentioned modules in any combination is located in different processors.
Embodiment 5
Embodiments herein additionally provides a kind of storage medium.Optionally, in the present embodiment, above-mentioned storage medium
It can be used to save program code performed by method of data synchronization provided by above-described embodiment 1.
Above-mentioned storage medium, for storing the program for executing following functions: first terminal detects first terminal and at least one
Whether the network link between a second terminal breaks down, wherein first terminal and second terminal access same application platform;
When first terminal detects failure, first terminal sends the first broadcast message at least one second terminal, wherein first is wide
It broadcasts and carries synchronizing information in message.
Optionally, above-mentioned first broadcast message is the message obtained after being packaged to synchronizing information using udp protocol;Net
Network link is the link using transmission control protocol TCP.
Optionally, above-mentioned first terminal is master terminal, and second terminal is from terminal;When first terminal failure, method is also wrapped
Include: the designated terminal at least one second terminal receives setting instruction;According to setting instruction by designated terminal be arranged based on eventually
End;Alternatively, holding consultation between at least one second terminal, main end is determined from least one second terminal according to preset rules
End;
In above-mentioned steps, the IP address of IP address and second terminal comprising setting master terminal in setting instruction;In advance
If rule can be pre-set priority, can also according to first terminal and second terminal application platform registion time, for
The latter can show as following implementations: the registion time of the A terminal in second terminal is 2015-1-1, in second terminal
B terminal registion time be 2015-5-1, be arranged master terminal when then according to registion time sequence determine, then master terminal be A
Terminal.
Optionally, when the fault recovery of network link is normal, first terminal requests network side equipment to network side equipment
The first currently stored configuration information;First terminal receives the first configuration information;First terminal compares the first configuration information and this
Whether the second configuration information of ground storage is consistent;When comparison result instruction is inconsistent, first terminal is according to the first configuration information
Update the second configuration information;
Specifically, when the fault recovery of above-mentioned network link is normal, synchronous newest the matching for obtaining master terminal configuration of cloud terminal
Confidence breath, and compared with localization, local information is modified when inconsistent.
It is alternatively possible to compare in several ways the first configuration information and the second configuration information for being locally stored whether one
It causes, for example, can be through but not limited to this: first terminal extracts first from the first configuration information and the second configuration information respectively
Label and second label and first terminal compare the first label and second mark whether it is identical, wherein when identical, determine
First configuration information and the second accordant configuration information;When different, determine that the first configuration information and the second configuration information are inconsistent;
Specifically, the first label and the second label refer to the version number of configuration information, and in above-mentioned steps, all terminals are opened
When dynamic, the configuration information of synchronizing network side apparatus needed, and return to ownship information to network side equipment, following implemented can be shown as
Mode: if the version number of configuration information is 1.0 in the first label, the version number of configuration information is 1.0 in the second label, then the
One configuration information and the second accordant configuration information;If the version number of the configuration information in the first label is 2.0, in the second label
The version number of configuration information is 3.0, then the first configuration information and the second configuration information are inconsistent.
Embodiment 6
Embodiments herein additionally provides a kind of processor.Optionally, in the present embodiment, above-mentioned processor can be used
Program code performed by the method for data synchronization provided by preservation above-described embodiment 1.
Above-mentioned processor, for executing the program of following implemented following functions: first terminal detect first terminal at least
Whether the network link between one second terminal breaks down, wherein first terminal and second terminal access same application are flat
Platform;When first terminal detects failure, first terminal sends the first broadcast message at least one second terminal, wherein the
Synchronizing information is carried in one broadcast message.
Optionally, above-mentioned first broadcast message is the message obtained after being packaged to synchronizing information using udp protocol;Net
Network link is the link using transmission control protocol TCP.
Optionally, above-mentioned first terminal is master terminal, and second terminal is from terminal;It include: at least when first terminal failure
Designated terminal in one second terminal receives setting instruction;Master terminal is set by designated terminal according to setting instruction;Alternatively,
It holds consultation between at least one second terminal, determines master terminal from least one second terminal according to preset rules;
In above-mentioned steps, the IP address of IP address and second terminal comprising setting master terminal in setting instruction;In advance
If rule can be pre-set priority, can also according to first terminal and second terminal application platform registion time, for
The latter can show as following implementations: the registion time of the A terminal in second terminal is 2015-1-1, in second terminal
B terminal registion time be 2015-5-1, be arranged master terminal when then according to registion time sequence determine, then master terminal be A
Terminal.
Optionally, when the fault recovery of network link is normal, first terminal requests network side equipment to network side equipment
The first currently stored configuration information;First terminal receives the first configuration information;First terminal compares the first configuration information and this
Whether the second configuration information of ground storage is consistent;When comparison result instruction is inconsistent, first terminal is according to the first configuration information
Update the second configuration information;
Specifically, when the fault recovery of above-mentioned network link is normal, synchronous newest the matching for obtaining master terminal configuration of cloud terminal
Confidence breath, and compared with localization, local information is modified when inconsistent.
It is alternatively possible to compare in several ways the first configuration information and the second configuration information for being locally stored whether one
It causes, for example, can be through but not limited to this: first terminal extracts first from the first configuration information and the second configuration information respectively
Label and second label and first terminal compare the first label and second mark whether it is identical, wherein when identical, determine
First configuration information and the second accordant configuration information;When different, determine that the first configuration information and the second configuration information are inconsistent;
Specifically, the first label and the second label are the version numbers of configuration information, in above-mentioned steps, in above-mentioned steps
In, when all terminals start, need the configuration information of synchronizing network side apparatus, and return to ownship information to network side equipment, it can be with
Show as following implementations: if the version number of configuration information is 1.0 in the first label, the version of configuration information in the second label
This number is 1.0, then the first configuration information and the second accordant configuration information;If the version number of the configuration information in the first label is
2.0, second label in configuration information version number be 3.0, then the first configuration information and the second configuration information are inconsistent.
Embodiment 7
Another aspect according to an embodiment of the present invention provides a kind of terminal, as shown in Figure 5, comprising:
Whether processor 501, the network link for detecting between first terminal and at least one second terminal occur event
Barrier, wherein first terminal and second terminal access same application platform;
Communication device 503, for sending the first broadcast at least one second terminal when first terminal detects failure
Message, wherein carry synchronizing information in the first broadcast message.
Herein it should be noted that above-mentioned each device correspond to embodiment 1 in step S102 to step S104, it is each
Module is identical as example and application scenarios that corresponding step is realized, but is not limited to the above embodiments a disclosure of that.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (12)
1. a kind of method of data synchronization characterized by comprising
First terminal detects whether the network link between the first terminal and at least one second terminal breaks down,
In, the first terminal and the second terminal access same application platform;
When the first terminal detects failure, the first terminal sends the first broadcast at least one described second terminal
Message, wherein carrying synchronizing information in first broadcast message.
2. the method according to claim 1, wherein first broadcast message is to synchronizing information use
The message that udp protocol obtains after being packaged;The network link is the link using transmission control protocol TCP.
3. the method according to claim 1, wherein the first terminal is sent out at least one described second terminal
Before sending the first broadcast message, the method also includes:
The first terminal receives the second broadcast message of at least one second terminal, wherein second broadcast message
Carry the solicited message for requesting the access address of the first terminal;
The first terminal sends the access address at least one described second terminal.
4. the second terminal is the method according to claim 1, wherein the first terminal is master terminal
From terminal;When the first terminal failure, the method also includes:
Designated terminal at least one described second terminal receives setting instruction;It instructs according to the setting by the specified end
End is set as the master terminal;Alternatively,
It holds consultation between at least one described second terminal, determines and lead from least one described second terminal according to preset rules
Terminal.
5. the method according to claim 1, wherein first terminal detect the first terminal and at least one the
Whether the link between two terminals breaks down, comprising:
The first terminal detects whether the first terminal breaks down;The first terminal detects the network link institute
Network environment break down.
6. the method according to any one of claims 1 to 5, which is characterized in that in the fault recovery of the network link
When normal, the method also includes:
The first configuration information that the first terminal requests the network side equipment currently stored to network side equipment;
The first terminal receives first configuration information;
Whether first terminal first configuration information and the second configuration information being locally stored are consistent;
When comparison result instruction is inconsistent, the first terminal matches confidence according to described in first configuration information update second
Breath.
7. according to the method described in claim 6, it is characterized in that, the first terminal first configuration information and sheet
Whether the second configuration information of ground storage is consistent, comprising:
The first terminal extracts the first label and second from first configuration information and second configuration information respectively
Label, and
First terminal first label marks whether identical with described second, wherein when identical, described in determination
First configuration information and second accordant configuration information;When different, determine that first configuration information and described second is matched
Confidence breath is inconsistent.
8. a kind of method of data synchronization characterized by comprising
When network link between first terminal and second terminal breaks down, the second terminal receives first terminal and sends
The first broadcast message, the first terminal and the second terminal access same application platform, in first broadcast message
Carry synchronizing information;
The second terminal is synchronized according to the synchronizing information.
9. a kind of data synchronization unit characterized by comprising
Whether synchronization module, the network link for detecting between the first terminal and at least one second terminal occur event
Barrier, wherein the first terminal and the second terminal access same application platform;
Broadcast module, for it is wide to send first at least one described second terminal when the first terminal detects failure
Message is broadcast, wherein carrying synchronizing information in first broadcast message.
10. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein described program right of execution
Benefit require any one of 1 to 7 described in method of data synchronization described in method of data synchronization or claim 8.
11. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 7 described in method of data synchronization described in method of data synchronization or claim 8.
12. a kind of terminal characterized by comprising
Whether processor, the network link for detecting between the first terminal and at least one second terminal break down,
Wherein, the first terminal and the second terminal access same application platform;
Communication device, for it is wide to send first at least one described second terminal when the first terminal detects failure
Broadcast message, wherein carry synchronizing information in first broadcast message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710419192.3A CN109005203B (en) | 2017-06-06 | 2017-06-06 | Data synchronization method and device, storage medium, processor and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710419192.3A CN109005203B (en) | 2017-06-06 | 2017-06-06 | Data synchronization method and device, storage medium, processor and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109005203A true CN109005203A (en) | 2018-12-14 |
CN109005203B CN109005203B (en) | 2022-11-11 |
Family
ID=64572668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710419192.3A Active CN109005203B (en) | 2017-06-06 | 2017-06-06 | Data synchronization method and device, storage medium, processor and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109005203B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110188001A (en) * | 2019-05-27 | 2019-08-30 | 维沃移动通信有限公司 | Application program launching method, application prompts method and terminal |
CN111653052A (en) * | 2020-04-26 | 2020-09-11 | 北京三快在线科技有限公司 | Cash register system and cash register switching method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1882123A (en) * | 2005-06-13 | 2006-12-20 | 大唐移动通信设备有限公司 | Cluster communication method for mobile network terminal |
CN101248696A (en) * | 2005-03-24 | 2008-08-20 | 诺基亚西门子通信有限责任两合公司 | Fast synchronised transparent handover method and system |
CN103200016A (en) * | 2013-03-28 | 2013-07-10 | 天脉聚源(北京)传媒科技有限公司 | Method and system for information interaction |
US20150333952A1 (en) * | 2012-12-12 | 2015-11-19 | Zte Corporation | Method and system for link switching |
CN105791064A (en) * | 2016-03-31 | 2016-07-20 | 青岛海信宽带多媒体技术有限公司 | Cooperation processing method for messages in local area network, and device |
CN106341279A (en) * | 2016-10-31 | 2017-01-18 | 普联技术有限公司 | Configuration information synchronizing method and device |
-
2017
- 2017-06-06 CN CN201710419192.3A patent/CN109005203B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101248696A (en) * | 2005-03-24 | 2008-08-20 | 诺基亚西门子通信有限责任两合公司 | Fast synchronised transparent handover method and system |
CN1882123A (en) * | 2005-06-13 | 2006-12-20 | 大唐移动通信设备有限公司 | Cluster communication method for mobile network terminal |
US20150333952A1 (en) * | 2012-12-12 | 2015-11-19 | Zte Corporation | Method and system for link switching |
CN103200016A (en) * | 2013-03-28 | 2013-07-10 | 天脉聚源(北京)传媒科技有限公司 | Method and system for information interaction |
CN105791064A (en) * | 2016-03-31 | 2016-07-20 | 青岛海信宽带多媒体技术有限公司 | Cooperation processing method for messages in local area network, and device |
CN106341279A (en) * | 2016-10-31 | 2017-01-18 | 普联技术有限公司 | Configuration information synchronizing method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110188001A (en) * | 2019-05-27 | 2019-08-30 | 维沃移动通信有限公司 | Application program launching method, application prompts method and terminal |
CN110188001B (en) * | 2019-05-27 | 2022-06-03 | 维沃移动通信有限公司 | Application program starting method, application program prompting method and terminal |
CN111653052A (en) * | 2020-04-26 | 2020-09-11 | 北京三快在线科技有限公司 | Cash register system and cash register switching method |
CN111653052B (en) * | 2020-04-26 | 2022-06-21 | 北京三快在线科技有限公司 | Cash register system and cash register switching method |
Also Published As
Publication number | Publication date |
---|---|
CN109005203B (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106878166B (en) | Route notification method and device | |
CN104301142B (en) | A kind of backup method and equipment of configuration file | |
CN107241186A (en) | Application signature is generated and distributed | |
CN106713487A (en) | Data synchronization method and device | |
CN106603550B (en) | A kind of Network Isolation method and device | |
CN105677673B (en) | Method for processing business, apparatus and system | |
WO2015154525A1 (en) | Method and device for protecting hqos using multiple board cards | |
CN112291116A (en) | Link fault detection method and device and network equipment | |
CN110198229A (en) | Network collocating method and device, storage medium and electronic device | |
CN109005203A (en) | Method of data synchronization and device, storage medium, processor, terminal | |
CN105281987B (en) | Router and data uploading method, device, system | |
CN106941418B (en) | SSL VPN configuration information synchronization method and device | |
EP3096492A1 (en) | Page push method, device, server and system | |
CN114238262A (en) | Image distribution method, image distribution device, electronic device, and storage medium | |
JP6509344B2 (en) | Method and apparatus for detecting tag exchange path connectivity | |
CN106878202B (en) | Message processing method and device | |
CN104009961A (en) | PPPoE session ID distribution method and equipment thereof | |
CN108900603A (en) | A kind of server discovery methods, devices and systems | |
CN110505176B (en) | Method and device for determining and sending message priority, and routing system | |
CN109450810A (en) | Identify the method and device of redundancy message | |
CN105933352B (en) | Method of data synchronization, client and system between client-based server | |
CN105681892B (en) | The method, apparatus and system of differential data transmission | |
CN109733831A (en) | Control the method and device of feeder | |
CN113055195B (en) | Multi-domain controller cluster based on SDON and SDON system | |
CN114301763A (en) | Distributed cluster fault processing method and system, electronic device and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |