CN116760505A - Time synchronization method based on open source hong Monte distributed data object - Google Patents
Time synchronization method based on open source hong Monte distributed data object Download PDFInfo
- Publication number
- CN116760505A CN116760505A CN202311030059.0A CN202311030059A CN116760505A CN 116760505 A CN116760505 A CN 116760505A CN 202311030059 A CN202311030059 A CN 202311030059A CN 116760505 A CN116760505 A CN 116760505A
- Authority
- CN
- China
- Prior art keywords
- data
- combat
- hong
- fight
- time
- 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 36
- 238000012544 monitoring process Methods 0.000 claims abstract description 12
- 238000004590 computer program Methods 0.000 claims description 11
- 230000006855 networking Effects 0.000 abstract 1
- 238000004891 communication Methods 0.000 description 6
- 230000009897 systematic effect Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 206010033799 Paralysis Diseases 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a time synchronization method based on open source hong Monte distributed data objects, which comprises the following steps: selecting a plurality of fight devices according to the team fight task, and networking the plurality of fight devices through a local area network to form a fight system; wherein each combat equipment operates in a distributed buddha system; when the method is started, creating data comprising a self equipment name field and a timestamp field, and storing the data in a shared data object of a distributed hong Monte system to form a data set; storing a device name field and a time stamp field of a combat device in each data; each piece of combat equipment after starting carries out subscription monitoring of data change on the data set, traverses the data set and calculates the average value of all the time stamps; and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time. And under the condition of a local area network, the fight time synchronization is realized rapidly, and the fight efficiency of teams is improved.
Description
Technical Field
The application belongs to the technical field of network communication, and particularly relates to a time synchronization method based on open source hong Monte distributed data objects.
Background
With the development of equipment technology, weapons are expanded from traditional firearms and ammunitions to systematic integrated equipment for individual soldiers and teams and unmanned equipment. Under the background of systematic collaborative combat, high-precision clock synchronization among different platforms and among devices in the platforms is an important foundation for improving the collaborative capability of the system.
However, the system is limited by factors such as environment in team combat actions, and a distributed system is often adopted, so that the support of a central server is often lacked, and therefore, a common central system time server cannot be utilized to unify the calibration time.
Disclosure of Invention
In order to solve the technical problems, the application provides a time synchronization method based on open source hong Monte distributed data objects.
The first aspect of the application discloses a time synchronization method based on open source hong Monte distributed data objects;
the method comprises the following steps:
s1, selecting a plurality of fight devices according to a team fight task, wherein the fight devices are networked through a local area network to form a fight system;
wherein each combat equipment operates in a distributed buddha system;
s2, when each combat equipment is started, creating data comprising an equipment name field and a time stamp field of the combat equipment, and storing the data in a shared data object of the distributed hong and Monte system to form a data set;
s3, each battle device after starting performs subscription monitoring of data variation on the data set;
each battle device after starting up carries out the following operations when subscribing monitoring:
traversing the data set, and calculating the average value of all the time stamps;
and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time.
According to the method of the first aspect of the present application,
the step S2 comprises the following steps:
each combat equipment traverses the data set, creates new data when the corresponding data of the combat equipment is not found by comparing the equipment name field, and places the new data into the data set.
According to the method of the first aspect of the present application,
the step S3 includes:
each battle device after starting carries out timer polling;
each battle device after starting performs the following operations in the timer poll:
traversing the data set, and updating the time stamp field based on the current combat time when the data corresponding to the data set is found by comparing the name field of the equipment.
According to the method of the first aspect of the application, the refresh frequency of the timer is 1s.
According to the method of the first aspect of the application, the device name field includes a mac address code field.
According to the method of the first aspect of the application, the combat equipment is unmanned equipment or systematic integration equipment.
The second aspect of the application discloses an electronic device. The electronic device comprises a memory and a processor, the memory storing a computer program, the processor implementing the steps in a method of open source based distributed data object time synchronization of any of the first aspects of the present disclosure when executing the computer program.
A third aspect of the application discloses a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in a method of open source hong-Monte-based time synchronization of distributed data objects according to any one of the first aspects of the present disclosure.
In summary, the scheme provided by the application has the following technical effects: selecting a plurality of fight devices according to a team fight task, wherein the fight devices are networked through a local area network to form a fight system; wherein each combat equipment operates in a distributed buddha system; when each combat equipment is started, creating data comprising an equipment name field and a timestamp field of the combat equipment, and storing the data in a shared data object of the distributed hong system to form a data set; storing a device name field and a time stamp field of a combat device in each data; each battle device after starting carries out subscription monitoring of data variation on the data set; each combat equipment after starting traverses the data set, and calculates the average value of all time stamps; and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time. In this manner, each combat device within the local area network implements data sharing using a distributed buddha system. In addition, each fight device monitors through subscription to ensure that the traversed array is the same array, so that each fight device obtains the same fight time through calculation, further, fight time synchronization is realized rapidly under the condition of a local area network, and fight efficiency of teams is improved. The method avoids the problems that the synchronous clock service is not available or the receiving delay of each device is delayed and the like caused by the server problem.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for time synchronization based on open source hong Meng distributed data objects according to an embodiment of the application;
fig. 2 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In team combat actions, systematic integrated equipment or unmanned equipment is required to achieve systematic collaborative combat. Therefore, in order to realize the cooperative operation, high-precision clock synchronization is required between the devices. However, since the combat environment is generally severe, when the central processing system is adopted, the whole combat system is easily paralyzed due to the damage of the central processing unit, so that in the action of team combat, each combat equipment generally works in a distributed system, and therefore, a common central system time server cannot be adopted to unify the calibration time. In order to solve the problem, the application provides a time synchronization method based on open source hong Monte distributed data objects.
Referring to fig. 1, a first aspect of the present application discloses a time synchronization method based on open source hong Meng distributed data objects; the distributed data object is shared data of all network equipment in a system, and comprises a data set, wherein the data set comprises a plurality of data, and each data stores an equipment name field and a time stamp field of the network equipment, and the method comprises the following steps:
s1, selecting a plurality of fight devices according to a team fight task, wherein the fight devices are networked through a local area network to form a fight system; wherein each combat device operates in a distributed hong and Monte system. The combat equipment is unmanned equipment or systematic integrated equipment.
S2, when each combat equipment is started, creating data comprising an equipment name field and a time stamp field of the combat equipment, and storing the data in a shared data object of the distributed hong and Monte system to form a data set;
the step S2 comprises the following steps:
each combat equipment traverses the data set, creates new data when the corresponding data of the combat equipment is not found by comparing the equipment name field, and places the new data into the data set.
Storing a device name field and a time stamp field of a combat device in each data;
s3, each battle device after starting performs subscription monitoring of data variation on the data set;
each battle device after starting up carries out the following operations when subscribing monitoring:
traversing the data set, and calculating the average value of all the time stamps;
and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time. Each device performs a task according to the new time.
The step S3 includes:
each battle device after starting carries out timer polling;
each battle device after starting performs the following operations in the timer poll:
traversing the data set, and updating the time stamp field based on the current combat time when the data corresponding to the data set is found by comparing the name field of the equipment. The refresh frequency of the timer is 1s.
The device name field includes a mac address code field. The timestamp field contains year, month, day, time, minute, second, millisecond, microsecond, nanosecond, etc. information. In the method, all devices in the system are networked through a local area network. When each device starts running, data comprising a device name field and a timestamp field of the device is created, and further, a distributed data object containing a data set is formed by utilizing the open source hong Mongolian distributed capability, so that data sharing of each device is realized, namely when any device updates data or has newly added devices, other online devices can acquire updated information by utilizing the open source hong Mongolian distributed capability, and subscription monitoring is triggered in time. When each device subscribes and monitors, the data group in the same distributed data object is traversed, so that the same system time can be obtained through calculation, and the uniform fight time of the network devices is realized. The method further utilizes JavaScript (script) to realize timer polling of each device so as to update the distributed object time stamp continuously, trigger subscription monitoring, calculate the latest time and realize the unification of the fight time of the on-line device.
In summary, the scheme provided by the application has the following technical effects: selecting a plurality of fight devices according to a team fight task, wherein the fight devices are networked through a local area network to form a fight system; wherein each combat equipment operates in a distributed buddha system; when each combat equipment is started, creating data comprising an equipment name field and a timestamp field of the combat equipment, and storing the data in a shared data object of the distributed hong system to form a data set; storing a device name field and a time stamp field of a combat device in each data; each battle device after starting carries out subscription monitoring of data variation on the data set; each combat equipment after starting traverses the data set, and calculates the average value of all time stamps; and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time. In this manner, each combat device within the local area network implements data sharing using a distributed buddha system. In addition, each fight device monitors through subscription to ensure that the traversed array is the same array, so that each fight device obtains the same fight time through calculation, further, fight time synchronization is realized rapidly under the condition of a local area network, and fight efficiency of teams is improved. The method avoids the problems that the synchronous clock service is not available or the receiving delay of each device is delayed and the like caused by the server problem.
As an example, the method may be applied to a drone cluster having N drones. N unmanned aerial vehicles need to work cooperatively to execute the striking task. Each unmanned aerial vehicle operates in a distributed hong and Monte system. Each having a device identification and a clock, time synchronization needs to be established in order to establish work coordination among the N drones. Therefore, each unmanned aerial vehicle establishes a data comprising a device identifier and a timestamp in the shared data object of the hong and Monte system to form an array comprising N data. Each unmanned aerial vehicle can actively access the shared data object to acquire the array data, thereby realizing the sharing of the array data. Each unmanned aerial vehicle traverses the data set at a refresh rate of 1s, and calculates an average value of all the timestamps; and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time. Clock synchronization is realized, so that work coordination is realized.
The second aspect of the application discloses an electronic device. The electronic device comprises a memory and a processor, the memory storing a computer program, the processor implementing the steps in a method of open source based distributed data object time synchronization of any of the first aspects of the present disclosure when executing the computer program.
Fig. 2 is a block diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 2, the electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the electronic device is used for conducting wired or wireless communication with an external terminal, and the wireless communication can be achieved through WIFI, an operator network, near Field Communication (NFC) or other technologies. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the electronic equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 2 is merely a block diagram of a portion related to the technical solution of the present disclosure, and does not constitute a limitation of the electronic device to which the technical solution of the present disclosure is applied, and that a specific electronic device may include more or less components than those shown in the drawings, or may combine some components, or have different component arrangements.
A third aspect of the application discloses a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method for open source hong-and-Monte-cover distributed data object based time synchronization of any one of the first aspects of the present disclosure.
In summary, the scheme provided by the application has the following technical effects: constructing a distributed data object by utilizing open source hong Mongolian distributed capability, and performing subscription monitoring of data variation on the distributed data object; the subscription monitor performs the following operations: traversing the distributed data object, and calculating the average value of all time stamps; and setting the calculated average value of all the time stamps as the current system time. And under the condition of a local area network, the fight time synchronization is realized rapidly, and the fight efficiency of teams is improved. The method avoids the problems that the synchronous clock service is not available or the receiving delay of each device is delayed and the like caused by the server problem.
Note that the technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be regarded as the scope of the description. The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (8)
1. A method for time synchronization based on open source hong-mong distributed data objects, the method comprising:
s1, selecting a plurality of fight devices according to a team fight task, wherein the fight devices are networked through a local area network to form a fight system;
wherein each combat equipment operates in a distributed buddha system;
s2, when each combat equipment is started, creating data comprising an equipment name field and a time stamp field of the combat equipment, and storing the data in a shared data object of the distributed hong and Monte system to form a data set;
s3, each battle device after starting performs subscription monitoring of data variation on the data set;
each battle device after starting up carries out the following operations when subscribing monitoring:
traversing the data set, and calculating the average value of all the time stamps;
and setting the calculated average value of all the timestamps as the current combat time, and updating the timestamp field based on the current combat time.
2. The open source hong-Monte-based distributed data object time synchronization method according to claim 1, wherein the step S2 comprises:
each combat equipment traverses the data set, creates new data when the corresponding data of the combat equipment is not found by comparing the equipment name field, and places the new data into the data set.
3. The open source hong-Monte-based distributed data object time synchronization method according to claim 1, wherein the step S3 comprises:
each battle device after starting carries out timer polling;
each battle device after starting performs the following operations in the timer poll:
traversing the data set, and updating the time stamp field based on the current combat time when the data corresponding to the data set is found by comparing the name field of the equipment.
4. A method for time synchronization based on open source hong-mo distributed data objects according to claim 3, wherein the refresh frequency of the timer is 1s.
5. The open source hong-Monte-based distributed data object time synchronization method of claim 1, wherein the device name field comprises a mac address code field.
6. The open source hong-Monte-based distributed data object time synchronization method of claim 1, wherein the combat device is an unmanned device or a systematically integrated device.
7. An electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps in a method of open source hong-mo distributed data object based time synchronization according to any one of claims 1 to 6 when the computer program is executed.
8. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of a method for time synchronization based on open source hong-mo distributed data objects according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311030059.0A CN116760505B (en) | 2023-08-16 | 2023-08-16 | Time synchronization method based on open source hong Monte distributed data object |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311030059.0A CN116760505B (en) | 2023-08-16 | 2023-08-16 | Time synchronization method based on open source hong Monte distributed data object |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116760505A true CN116760505A (en) | 2023-09-15 |
CN116760505B CN116760505B (en) | 2023-11-03 |
Family
ID=87951790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311030059.0A Active CN116760505B (en) | 2023-08-16 | 2023-08-16 | Time synchronization method based on open source hong Monte distributed data object |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116760505B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239611A (en) * | 2014-08-27 | 2014-12-24 | 中国航天科工运载技术研究院 | Man-in-loop-based distributed simulation system |
CN107066697A (en) * | 2017-03-17 | 2017-08-18 | 中国人民解放军海军工程大学 | Service-oriented large ship battle model integrated approach |
CN109685384A (en) * | 2018-12-29 | 2019-04-26 | 杭州当虹科技股份有限公司 | A method of operation marshalling being carried out by account in police service practical application platform |
CN112784445A (en) * | 2021-03-11 | 2021-05-11 | 四川大学 | Parallel distributed computing system and method for flight control agent |
CN115617534A (en) * | 2022-12-20 | 2023-01-17 | 中国电子科技集团公司信息科学研究院 | Distributed autonomous countermeasure system architecture based on cognitive coordination and implementation method |
KR20230045395A (en) * | 2021-09-28 | 2023-04-04 | (주)위니텍 | Method and system for sharing disaster information using web socket |
-
2023
- 2023-08-16 CN CN202311030059.0A patent/CN116760505B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239611A (en) * | 2014-08-27 | 2014-12-24 | 中国航天科工运载技术研究院 | Man-in-loop-based distributed simulation system |
CN107066697A (en) * | 2017-03-17 | 2017-08-18 | 中国人民解放军海军工程大学 | Service-oriented large ship battle model integrated approach |
CN109685384A (en) * | 2018-12-29 | 2019-04-26 | 杭州当虹科技股份有限公司 | A method of operation marshalling being carried out by account in police service practical application platform |
CN112784445A (en) * | 2021-03-11 | 2021-05-11 | 四川大学 | Parallel distributed computing system and method for flight control agent |
KR20230045395A (en) * | 2021-09-28 | 2023-04-04 | (주)위니텍 | Method and system for sharing disaster information using web socket |
CN115617534A (en) * | 2022-12-20 | 2023-01-17 | 中国电子科技集团公司信息科学研究院 | Distributed autonomous countermeasure system architecture based on cognitive coordination and implementation method |
Also Published As
Publication number | Publication date |
---|---|
CN116760505B (en) | 2023-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2946290B1 (en) | Peer-to-peer software updates | |
CN107733708B (en) | Equipment parameter configuration method and device, computer equipment and storage medium | |
JP6106344B2 (en) | Location-based software update | |
US8589515B2 (en) | Aggregated widget request processing | |
CN108390933B (en) | Message distribution method, device, server and storage medium | |
CN103477325A (en) | Management computer and method for analysing root cause | |
CN104601702B (en) | Cluster remote procedure calling (PRC) method and system | |
CN111159612B (en) | Countdown method, system, device, computer equipment and storage medium | |
CN103118100A (en) | Guarantee method and guarantee system for improving usability of virtual machine application | |
EP2214372A1 (en) | Method and apparatus for tracking device management data changes | |
CN106888245A (en) | A kind of data processing method, apparatus and system | |
CN107086937B (en) | Monitoring method and device | |
Tang et al. | Optimizing inter-server communication for online social networks | |
CN110866011B (en) | Data table synchronization method and device, computer equipment and storage medium | |
CN111064776B (en) | Block generation method in block chain, accounting node and storage medium | |
CN105210039A (en) | Terminal and method for synchronizing application thereof | |
CN107203437B (en) | Method, device and system for preventing memory data from being lost | |
CN116760505B (en) | Time synchronization method based on open source hong Monte distributed data object | |
AU2019232905A1 (en) | Offline briefcase synchronization | |
US10511486B2 (en) | System and method for automating the discovery process | |
CN113342767A (en) | Log generation method, device, equipment and storage medium | |
CN104579753A (en) | User data statistical method, access layer server and statistical server | |
Prikopa et al. | Fault-tolerant least squares solvers for wireless sensor networks based on gossiping | |
CN114328458A (en) | Data migration method and device and computer storage medium | |
CN109039907B (en) | Method, device, equipment and storage medium for determining optimal path of network data traffic |
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 |