CN107332679B - Centerless information synchronization method and device - Google Patents

Centerless information synchronization method and device Download PDF

Info

Publication number
CN107332679B
CN107332679B CN201710419239.6A CN201710419239A CN107332679B CN 107332679 B CN107332679 B CN 107332679B CN 201710419239 A CN201710419239 A CN 201710419239A CN 107332679 B CN107332679 B CN 107332679B
Authority
CN
China
Prior art keywords
information
response
network
broadcasting
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.)
Active
Application number
CN201710419239.6A
Other languages
Chinese (zh)
Other versions
CN107332679A (en
Inventor
灏瑰浆
尹彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yuanxin Junsheng Technology Co.,Ltd.
Original Assignee
Beijing Yuanxin Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yuanxin Science and Technology Co Ltd filed Critical Beijing Yuanxin Science and Technology Co Ltd
Priority to CN201710419239.6A priority Critical patent/CN107332679B/en
Publication of CN107332679A publication Critical patent/CN107332679A/en
Application granted granted Critical
Publication of CN107332679B publication Critical patent/CN107332679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1863Arrangements for providing special services to substations for broadcast or conference, e.g. multicast comprising mechanisms for improved reliability, e.g. status reports

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multi Processors (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a centerless information synchronization method and a centerless information synchronization device, wherein the method comprises the following steps: in response to a computing device accessing a network, broadcasting a request for a unique version number of query information within the network; each of all other computing devices within the network, in response to receiving the request, determines whether it has the information recorded thereon; each of all other computing devices within the network, in response to being recorded with the information, broadcasts within the network its recording with the information in response; the computing device broadcasting the request selects one from the responding computing devices as a synchronization object; the information is synchronized between the selected synchronization object and the computing device broadcasting the request. The invention can realize the centerless information synchronization and furthest ensure that the system operation cannot be influenced by the failure of any node.

Description

Centerless information synchronization method and device
Technical Field
The present invention relates to the field of digital information transmission, and in particular, to a centerless information synchronization method and an apparatus for implementing the method.
Background
The current information synchronization is mainly based on a server environment, has large synchronous data volume and is not suitable for ad hoc networks or similar micro networks.
Under a low-bandwidth and unstable network environment, any one node may be unsafe and may fail. How to achieve low-load data synchronization in such a network is an urgent problem to be solved.
Disclosure of Invention
The invention provides a centerless information synchronization method and a centerless information synchronization device, which can realize information synchronization under the condition of centerless servers, so that the system operation cannot be influenced by any node realization.
In order to solve the above technical problem, the present invention provides a centerless information synchronization method, which includes:
in response to a computing device accessing a network, broadcasting a request for a unique version number of query information within the network;
each of all other computing devices within the network, in response to receiving the request, determines whether it has the information recorded thereon;
each of all other computing devices within the network, in response to being recorded with the information, broadcasts within the network its recording with the information in response;
the computing device broadcasting the request selects one from the responding computing devices as a synchronization object;
the information is synchronized between the selected synchronization object and the computing device broadcasting the request.
As an improvement of the method of the present invention, the method further comprises: a computing device within the network generating and broadcasting a new unique version number within the network in response to generating or modifying a message; each of all other computing devices within the network records the new unique version number in response to receiving the broadcast of the new unique version number.
As another refinement of the method of the present invention, each of all other computing devices within the network, in response to being recorded with the information, broadcasting within the network its recorded information in response comprises: randomly waiting a first period of time before broadcasting it with the information recorded as a response.
As a further refinement of the method of the present invention, each of all other computing devices within the network, in response to being recorded with the information, broadcasting within the network its recorded information in response further comprises: determining whether it has previously completed synchronization of the information before broadcasting it with the information recorded as a response; in response to its previous incomplete synchronization of the information, it is not broadcast within the network that it recorded the information.
As a further improvement of the method of the present invention, the selecting, by the computing device broadcasting the request, one of the responding computing devices as a synchronization object to synchronize the information comprises: waiting for a second period of time before selecting one as the synchronization object.
In order to solve the above technical problem, the present invention provides a device for implementing a centerless information synchronization method, wherein the device comprises:
a request broadcasting module for broadcasting a request for a unique version number of query information within a network in response to a computing device accessing the network;
a determination module for each of all other computing devices within the network, in response to receiving the request, determining whether it has the information recorded thereon;
a response broadcast module for each of all other computing devices within the network, in response to being recorded with the information, broadcasting within the network its recorded information as a response;
a selection module for selecting one of the computing devices broadcasting the request as a synchronization object from the responding computing devices;
a synchronization module to synchronize the information between the selected synchronization object and the computing device broadcasting the request.
As an improvement of the apparatus of the present invention, the apparatus further comprises: a version number generation and broadcast module for a computing device within the network to generate and broadcast a new unique version number in response to generating or modifying a message; a recording module for each of all other computing devices within the network to record a new unique version number in response to receiving a broadcast of the new unique version number.
As another improvement of the apparatus of the present invention, the response broadcasting module includes: a wait submodule for randomly waiting a first period of time before a computing device broadcasts a record of the information as a response.
As a further improvement of the apparatus of the present invention, the response broadcasting module further includes: a status determination submodule for determining whether synchronization of the information has been previously completed before a computing device broadcasts the information recorded with the information as a response; a broadcast inhibit sub-module for not broadcasting its recorded information within the network in response to a computing device previously not completing synchronization of the information.
To solve the above technical problem, the present invention provides a tangible computer-readable medium including a computer program for executing the above centerless information synchronization method.
To solve the above technical problem, the present invention provides an apparatus, comprising at least one processor; and at least one memory including a computer program, the at least one memory and the computer program configured to, with the at least one processor, cause the apparatus to perform at least some of the steps of the centerless information synchronization method of the present invention.
According to the invention, under an unstable network environment, a synchronization strategy is negotiated among the nodes based on the unique version number of the information, a central server is not needed, and the condition that the system operation cannot be influenced by the failure of any node is ensured to the maximum extent. In addition, any node randomly waits before making a synchronous response, so that simultaneous response of all nodes is avoided, and network congestion is caused.
Other features and advantages of the present invention will become more apparent from the detailed description of the embodiments of the present invention when taken in conjunction with the accompanying drawings.
Drawings
FIG. 1 is a flow chart of an embodiment of a method according to the present invention.
FIG. 2 is a schematic structural diagram of an embodiment of the apparatus according to the present invention.
For the sake of clarity, the figures are schematic and simplified drawings, which only show details which are necessary for understanding the invention and other details are omitted.
Detailed Description
Embodiments and examples of the present invention will be described in detail below with reference to the accompanying drawings.
The scope of applicability of the present invention will become apparent from the detailed description given hereinafter. It should be understood, however, that the detailed description and the specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only.
In a network environment, the addresses of all nodes are known, as are the number of nodes. The network environment may be a TCP/IP or other customized ad hoc network. Under an unstable network, any one node may be unsafe and fail. For example, in a conventional server environment, a network between a terminal and a server may be disconnected, and thus synchronization between the terminal and the server may not be performed, so that the system may not operate normally.
Fig. 1 shows a flow chart of an embodiment of a centerless information synchronization method according to the present invention. An embodiment of the method of the present invention is described in detail below with reference to the flow chart shown in fig. 1.
To apply the method of the present invention, a unique version number, such as a globally unique version number, is generated, published, and recorded for each piece of information within the network, such as group total information, group details, and the like. When a new message is generated for the first time, a globally unique version number is generated for the message and is issued, the issued content comprises the version number and the message, and each computing device in the network records the version numbers of all messages. Each time a modification is made to information at a computing device, a new unique version number is generated and broadcast within the network, a new version number is generated each time a modification is made, and each of all other computing devices within the network records the new unique version number in response to receiving the broadcast of the new unique version number. Similarly, deleting some kind of information also needs to be released. A Globally Unique version number (GUID) is, for example, a 128-bit (16-byte) binary value generated from the identification number on the network card (each network card has a Unique identification number) and the Unique number of the CPU clock, which ensures that it is Unique to all machines in the same air, and that no duplicate GUID value is generated by any two computers in the world. The globally unique version number may be used to determine the information and its version. Furthermore, the set of all globally unique version numbers may be recorded in a table, for example.
In S102, when each computing device accesses the network, after security verification, a request broadcast for querying a global information version number is issued in the network.
At S104, each of all other computing devices within the network determines whether it has the information recorded in response to receiving the request. If it is determined that the information is recorded, the process proceeds to step S106; otherwise, the process proceeds to step S120, and the corresponding computing device does not perform any action.
At S106, each of all other computing devices within the network randomly waits for S milliseconds in response to recording the information, where S may be, for example, a multiple of 10, such as 50, 60, 70, 80, etc., and other sequences, such as fibonacci, etc., may also be used to avoid network congestion caused by multiple computing devices responding simultaneously.
At S108, each of all other computing devices within the network broadcasts its recorded information as a response within the network after randomly waiting S milliseconds in response to being recorded with the information.
At S110, the computing device broadcasting the request selects one of the computing devices responding within a preset wait time, which may be, for example, 100 milliseconds or another time length, for example, the earliest responder may be selected as the data synchronization source object.
At S112, the information is synchronized between the selected synchronization object and the computing device broadcasting the request. Two data synchronization modes are available, one mode is consistency synchronization, and after synchronization, the information and the version number of the two parties are consistent. This type of synchronization is suitable for scenes with small amounts of information. For a large amount of data such as a chat message, a synchronization range can be specified, and segment synchronization can be performed. From version 1 to version n, which can be viewed as a chain of versions, the initiator can specify a range of versions to synchronize [ a, b ] data. In other words, for scenarios where the message class only cares about the most recent recording, segment synchronization is more suitable.
The method solves the problem of centerless information acquisition and avoids the influence on the overall use of the system after the cluster head node is busy in task or fails.
According to one embodiment of the method of the present invention, there may be cases where the version numbers of the information of the responding computing devices are not consistent for various reasons, for which it is determined whether a computing device has previously completed synchronization of the information before broadcasting it with the information recorded as a response within the network in response to recording the information; in response to its previous incomplete synchronization of the information, indicating that its information is not up-to-date, it is not broadcast within the network with which it is recorded. For example, a flag bit indicating whether synchronization is completed or not may be added, and the flag bit is set to "no" each time the network is disconnected, and then the version is synchronized first and synchronization is completed, and the flag bit is set to "yes" when the network is accessed. Computing devices that do not themselves complete synchronization do not respond to synchronization requests, thereby ensuring that all responding devices are synchronized and have consistent version numbers.
Fig. 2 is a schematic structural diagram of an embodiment of an apparatus for implementing a centerless information synchronization method according to the present invention, where the apparatus of the embodiment includes: a version number generation and broadcast module 202 for a computing device within the network to generate and broadcast a new unique version number in response to generating or modifying a message; a recording module 204 for each of all other computing devices within the network to record a new unique version number in response to receiving a broadcast of the new unique version number; a request broadcast module 206 for broadcasting a request for a unique version number of query information within a network in response to a computing device accessing the network; a determination module 208 for each of all other computing devices within the network, in response to receiving the request, determining whether it has the information recorded thereon; a response broadcasting module 210 for each of all other computing devices within the network broadcasting its recorded information within the network in response to being recorded with the information; a selection module 212, configured to broadcast the requested computing device to select one of the responding computing devices as a synchronization object; a synchronization module 214 to synchronize the information between the selected synchronization object and the computing device broadcasting the request.
According to one embodiment of the apparatus, the response broadcasting module includes a waiting sub-module for randomly waiting a first period of time before a computing device broadcasts the recorded information as a response.
According to another embodiment of the apparatus of the present invention, the response broadcasting module further comprises: a status determination submodule for determining whether synchronization of the information has been previously completed before a computing device broadcasts the information recorded with the information as a response; a broadcast inhibit sub-module for not broadcasting its recorded information within the network in response to a computing device previously not completing synchronization of the information.
The particular features, structures, or characteristics of the various embodiments described herein may be combined as suitable in one or more embodiments of the invention. Additionally, in some cases, the order of steps depicted in the flowcharts and/or in the pipelined process may be modified, as appropriate, and need not be performed exactly in the order depicted. In addition, various aspects of the invention may be implemented using software, hardware, firmware, or a combination thereof, and/or other computer implemented modules or devices that perform the described functions. Software implementations of the present invention may include executable code stored in a computer readable medium and executed by one or more processors. The computer readable medium may include a computer hard drive, ROM, RAM, flash memory, portable computer storage media such as CD-ROM, DVD-ROM, flash drives, and/or other devices, for example, having a Universal Serial Bus (USB) interface, and/or any other suitable tangible or non-transitory computer readable medium or computer memory on which executable code may be stored and executed by a processor. The present invention may be used in conjunction with any suitable operating system.
As used herein, the singular forms "a", "an" and "the" include plural references (i.e., have the meaning "at least one"), unless the context clearly dictates otherwise. It will be further understood that the terms "has," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
The foregoing describes some preferred embodiments of the present invention, but it should be emphasized that the invention is not limited to these embodiments, but can be implemented in other ways within the scope of the inventive subject matter. Various changes and modifications of the present invention can be made by those skilled in the art without departing from the spirit and scope of the present invention, and these changes and modifications still fall within the scope of the present invention.

Claims (8)

1. A method for centerless information synchronization, the method comprising:
in response to a computing device accessing a network, broadcasting a request for a unique version number of query information within the network;
each of all other computing devices within the network, in response to receiving the request, determines whether it has the information recorded thereon;
each of all other computing devices within the network, in response to being recorded with the information, determines whether it has previously completed synchronization of the information before broadcasting it with the information recorded as a response; in response to its previous incomplete synchronization of the information, not broadcasting its recorded information within the network, otherwise broadcasting its recorded information within the network as a response;
the computing device broadcasting the request selects one from the responding computing devices as a synchronization object;
the information is synchronized between the selected synchronization object and the computing device broadcasting the request.
2. The method of claim 1, further comprising:
a computing device within the network generating and broadcasting a new unique version number within the network in response to generating or modifying a message;
each of all other computing devices within the network records the new unique version number in response to receiving the broadcast of the new unique version number.
3. The method of claim 1, wherein a first period of time is randomly waited before broadcasting the information that it records as a response.
4. The method of claim 1, wherein the computing device broadcasting the request selecting one of the responding computing devices as a synchronization object to synchronize the information comprises:
waiting for a second period of time before selecting one as the synchronization object.
5. The method of claim 1, wherein synchronizing the information between the selected synchronization object and the computing device broadcasting the request comprises fully synchronizing and synchronizing by a specified synchronization range between the two.
6. An apparatus for implementing a method for synchronizing centerless information, the apparatus comprising:
a request broadcasting module for broadcasting a request for a unique version number of query information within a network in response to a computing device accessing the network;
a determination module for each of all other computing devices within the network, in response to receiving the request, determining whether it has the information recorded thereon;
a response broadcast module for each of all other computing devices within the network, in response to being recorded with the information, determining whether it has previously completed synchronization of the information before broadcasting it with the information recorded as a response; in response to its previous incomplete synchronization of the information, not broadcasting its recorded information within the network, otherwise broadcasting its recorded information within the network as a response;
a selection module for selecting one of the computing devices broadcasting the request as a synchronization object from the responding computing devices;
a synchronization module to synchronize the information between the selected synchronization object and the computing device broadcasting the request.
7. The apparatus of claim 6, further comprising:
a version number generation and broadcast module for a computing device within the network to generate and broadcast a new unique version number in response to generating or modifying a message;
a recording module for each of all other computing devices within the network to record a new unique version number in response to receiving a broadcast of the new unique version number.
8. The apparatus of claim 6, wherein the response broadcasting module comprises:
a wait submodule for randomly waiting a first period of time before a computing device broadcasts a record of the information as a response.
CN201710419239.6A 2017-06-06 2017-06-06 Centerless information synchronization method and device Active CN107332679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710419239.6A CN107332679B (en) 2017-06-06 2017-06-06 Centerless information synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710419239.6A CN107332679B (en) 2017-06-06 2017-06-06 Centerless information synchronization method and device

Publications (2)

Publication Number Publication Date
CN107332679A CN107332679A (en) 2017-11-07
CN107332679B true CN107332679B (en) 2021-01-15

Family

ID=60193924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710419239.6A Active CN107332679B (en) 2017-06-06 2017-06-06 Centerless information synchronization method and device

Country Status (1)

Country Link
CN (1) CN107332679B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118322B (en) * 2020-09-24 2022-08-30 杭州海康威视数字技术股份有限公司 Data synchronization method of network equipment, network equipment and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7564809B1 (en) * 2004-05-06 2009-07-21 Cornell Research Foundation, Inc. Event-synchronization protocol for parallel simulation of large-scale wireless networks
CN103457999B (en) * 2013-08-06 2016-05-04 北京大学深圳研究生院 A kind of P2P document transmission method based on the NDN network architecture
CN103780682B (en) * 2014-01-07 2017-03-08 中国船舶重工集团公司第七0九研究所 A kind of information sharing system towards Ad Hoc network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618498A (en) * 2015-02-13 2015-05-13 深圳市创梦天地科技有限公司 Data resource synchronizing method and server

Also Published As

Publication number Publication date
CN107332679A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN109542865B (en) Method, device, system and medium for synchronizing configuration files of distributed cluster system
CN107483627B (en) File distribution method, file download method, distribution server, client and system
US9560165B2 (en) BT offline data download system and method, and computer storage medium
CN109379448B (en) File distributed deployment method and device, electronic equipment and storage medium
JP2016040724A (en) Data synchronization
CN107666493B (en) Database configuration method and equipment thereof
JP2014523568A (en) Efficient conditioning
KR20120018178A (en) Swarm-based synchronization over a network of object stores
EP3125501A1 (en) File synchronization method, server, and terminal
WO2008150725A1 (en) Method, equipment and system for resource acquisition
CN107665141B (en) Database configuration method and equipment thereof
CN103095687A (en) Method and device of metadata processing
EP3786802A1 (en) Method and device for failover in hbase system
CN111770350A (en) Method and device for pulling message in live broadcast room, computer equipment and storage medium
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN110196843B (en) File distribution method based on container cluster and container cluster
US20170339252A1 (en) Generating a response to a client device in an internet of things domain
CN107657027B (en) Data storage method and device
US10795747B2 (en) File synchronizing service status monitoring and error handling
US20170359400A1 (en) Extending Representational State Transfer Application Program Interface (REST API) Functionality
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN107332679B (en) Centerless information synchronization method and device
US10853892B2 (en) Social networking relationships processing method, system, and storage medium
CN111586438B (en) Method, device and system for processing service data
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210716

Address after: 100080 room 401-3, 4th floor, building 1, yard 1, Danling street, Haidian District, Beijing

Patentee after: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Address before: 100176 room 2222, building D, building 33, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee before: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20171107

Assignee: Yuanxin Information Technology Group Co.,Ltd.

Assignor: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Contract record no.: X2021110000024

Denomination of invention: A centerless information synchronization method and device

Granted publication date: 20210115

License type: Common License

Record date: 20210804