The synchronous method and synchronization system of a kind of different zones gateway data acquisition timeTechnical field
The present invention relates to gateway data acquisition technique field, more particularly to a kind of different zones gateway data acquisition timeSynchronous method and synchronization system.
Background technology
The time point for the data that multiple gateways in same station are gathered in different zones may be different, so as to cause to be directed toThe data of upload will be unable to accurately carry out big data analysis.For example, in compressor operating system, same system exists multipleThe pressure value and temperature value of point need collection, for example, one of point is one-level pressure at expulsion, another point is that workman finally makesPressure at expulsion, general hundreds of meters of the actual physics distance of two collection points, so need to set multiple gateway gathered datas,What to need these gateways simultaneously when needing the time of gathered data consistent.And the method for time synchronized is had following several at presentKind:
(1) the GPS satellite clock method of synchronization, using GPS (the Global Positioning using the present U.S.System, global positioning system) the UTC time benchmark of global position system carries out that the whole network clock is synchronous, and clock accuracy is reachable100ns, equipment volume and power consumption are smaller, no usage charges.But satellite system may be interfered, led by U.S.'s control at any timeCause promptness and the accuracy reduction of data analysis.
(2) the Beidou satellite clock method of synchronization, " Big Dipper one " the satellite fix system manufactured using Chinese autonomous DesignSystem carries out the synchronization of the whole network clock, and clock accuracy is up to 50ns.But equipment volume is larger, power consumption is larger, is unfavorable for promoting the use of.
(3) CDMA cell phone networks clock synchronization mode, using CDMA ((Code Division Multiple Access,CDMA) cell phone network enters that row clock is synchronous, and precision is up to 300~400ns.But the phone number of networking is needed, haveCertain cost of use, CDMA cell phone networks are still using GPS the whole network clock synchronization modes in addition, when GPS can not normal workWhen, this network will also be affected, so as to influence the precision of lock in time.
(4) terminal built-in clock and timing correcting mode, terminal inner onboard clock system, regularly can be more thanGPS, the Big Dipper or CDMA cell phone networks enter row clock amendment, can be used as autonomous operation clock when clock synchronous network network failsSupplementary means, precision is up to 1us~0.1ms, and clock accuracy is higher.But, such a mode is to a certain extent by environmentTemperature influences, and time precision can decline, and can additionally increase the power consumption of certain equipment cost and equipment.
The content of the invention
It is an object of the invention to provide a kind of synchronous method of different zones gateway data acquisition time, when can improve synchronousBetween precision.
To achieve the above object, the invention provides following scheme:
A kind of synchronous method of different zones gateway data acquisition time, the synchronous method includes:
The equipment configured according to configuration parameter in same station indicates position;
Position is indicated according to the equipment, corresponding gateway in different zones is configured in same station, and is connected toCdma network;
The current time of the cdma network is obtained, the clock chip for each gateway being synchronized in the same stationIn.
Optionally, the synchronous method also includes:
Based on time check function, when the time check starting in the same station is calculated according to the configuration parameterBetween;
According to the time check initial time, the current time of cdma network described in timing acquisition is described same to updateLock in time in the clock chip of each gateway in one station.
Optionally, the configuration parameter includes:The numbering of computer room, the title of computer room, gateway numbering.
Optionally, obtain the current time of the cdma network, each gateway being synchronized in the same station whenClock chip includes:
Communication module AT is sent to CDMA communication modules by controller to instruct, with obtain the cdma network it is current whenBetween;
The CDMA communication modules instruct the current time for obtaining the cdma network according to the communication module AT, and togetherWalk in the clock chip.
Optionally, obtain the current time of the cdma network, each gateway being synchronized in the same station whenAlso include in clock chip:
The current time of the cdma network is confirmed by locating module, and is synchronized in the clock chip.
The specific embodiment provided according to the present invention, the invention discloses following technique effect:
The synchronous method of different zones gateway data acquisition time of the present invention is configured in same station according to configuration parameterEquipment indicates position;Position is indicated according to equipment, different gateways are configured in same station and cdma network is connected to;And then pass throughThe current time for obtaining cdma network is synchronized in the clock chip of each gateway, so that multiple gateways in same stationConsistent at the time point of different zones gathered data, time precision is higher, is easy to the analyzing and processing of data.
It is an object of the invention to provide a kind of synchronization system of different zones gateway data acquisition time, when can improve synchronousBetween precision.
To achieve the above object, the invention provides following scheme:
A kind of synchronization system of different zones gateway data acquisition time, the synchronization system includes:
Parameter configuration unit, the equipment for being configured according to configuration parameter in same station indicates position;
Gateway dispensing unit, for indicating position according to the equipment, corresponding gateway in different zones is configured to sameIn station, and it is connected to cdma network;
Synchronization unit, the current time for obtaining the cdma network is synchronized to each net in the same stationIn the clock chip of pass.
Optionally, the synchronization system also includes:
Computing unit, for based on time check function, according to the configuration parameter calculate in the same station whenBetween verify initial time;
Updating block, for according to the time check initial time, the current time of cdma network described in timing acquisition,Lock in time in clock chip to update each gateway in the same station.
Optionally, the synchronization unit includes controller, CDMA communication modules, wherein,
The controller is connected with the CDMA communication modules, for sending communication module AT to the CDMA communication modulesInstruction, to obtain the current time of the cdma network;
The CDMA communication modules are connected with the clock chip, described in referring to acquisition according to the communication module ATThe current time of cdma network, and be synchronized in the clock chip.
Optionally, the synchronization unit also includes locating module, and the locating module is connected with the clock chip, is used forConfirm the current time of the cdma network, and be synchronized in the clock chip.
Optionally, the controller, CDMA communication modules and locating module are provided with each gateway.
The specific embodiment provided according to the present invention, the invention discloses following technique effect:
The synchronization system of different zones gateway data acquisition time of the present invention is configured by arrange parameter dispensing unit, gatewayUnit and synchronization unit, the equipment that can be configured according to configuration parameter in same station indicate position;Position is indicated by difference according to equipmentGateway be configured in same station, and be connected to cdma network;And then be synchronized to by the current time for obtaining cdma networkIn the clock chip of each gateway, so that the time point one of multiple gateways in same station in different zones gathered dataCause, time precision is higher, is easy to the analyzing and processing of data.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodimentThe accompanying drawing needed to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the present inventionExample, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these accompanying drawingsObtain other accompanying drawings.
Fig. 1 is the flow chart of the synchronous method of different zones gateway data acquisition time of the present invention;
Fig. 2 is the modular structure schematic diagram of the synchronization system of different zones gateway data acquisition time of the present invention.
Symbol description:
1-parameter configuration unit, 2-gateway dispensing unit, 3-synchronization unit, 4-computing unit, 5-updating block.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeSite preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based onEmbodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not madeEmbodiment, belongs to the scope of protection of the invention.
It is an object of the invention to provide a kind of synchronous method of different zones gateway data acquisition time, according to configuration parameterConfigure the equipment sign position in same station;Position is indicated according to equipment, different gateways are configured in same station and are connected toCdma network;And then be synchronized to by the current time for obtaining cdma network in the clock chip of each gateway, so that togetherMultiple gateways in one station are consistent at the time point of different zones gathered data, and time precision is higher, is easy to the analysis of dataProcessing.
It is below in conjunction with the accompanying drawings and specific real to enable the above objects, features and advantages of the present invention more obvious understandableApplying mode, the present invention is further detailed explanation.
As shown in figure 1, the synchronous method of different zones gateway data acquisition time of the present invention includes:
Step 100:The equipment configured according to configuration parameter in same station indicates position.Wherein, the configuration parameter includesThe numbering of computer room, the title of computer room, gateway numbering.
Step 200:Position is indicated according to the equipment, corresponding gateway in different zones is configured in same station, andIt is connected to cdma network.
Specifically, each gateway in same station is connected to cdma network by CDMA communication modules.
Step 300:Obtain the current time of the cdma network, each gateway being synchronized in the same station whenIn clock chip.
Step 400:Based on time check function, the time check in the same station is calculated according to the configuration parameterInitial time.
Step 500:According to the time check initial time, the current time of cdma network described in timing acquisition, with moreLock in time in the clock chip of each gateway in the new same station.
For example, when being based on time check function, the time check in the same station is calculated according to the configuration parameter8 timesharing when initial time is 8, then 8 points of time points at the 8 of every day, each gateway obtain the cdma network it is current whenBetween, lock in time in the clock chip to update each gateway in the same station, so as to realize when regularly updating synchronousBetween, improve synchronization accuracy.
Further, in step 300, the current time of the cdma network is obtained, is synchronized in the same stationThe clock chip of each gateway include:
Step 301:Communication module AT is sent by controller to CDMA communication modules to instruct, to obtain the cdma networkCurrent time.
Step 302:The CDMA communication modules instruct according to the communication module AT and obtain the current of the cdma networkTime, and be synchronized in the clock chip.
In addition, the current time for obtaining the cdma network, each gateway being synchronized in the same stationAlso include in clock chip:
Step 303:The current time of the cdma network is confirmed by locating module, and is synchronized to the clock chipIn.Wherein, the locating module is d GPS locating module or the Big Dipper locating module.The clock chip is DS1302Z.
In order to ensure the data time of the multiple gateway collections of same computer room must be consistent, many intra-gateways are set on hardwareCDMA communication modules, d GPS locating module and clock chip are put, many gateways of configuration are configured to the net under same room systemClose, then by CDMA communication modules and d GPS locating module/the Big Dipper locating module by same computer room gateway time clock chipTime synchronized, gateway produces random upload data time according to configuration parameter, so both may insure the multiple gateways of same computer roomThe data time of collection is consistent, multiple computer rooms can be uploaded to the Timing randomization of data again, so as to reduce operation platform serviceThe pressure for receiving data of device.
The synchronization system of different zones gateway data acquisition time of the present invention forms cdma network by wireless networking mode,Data clock synchronization and the real-time Transmission problem of remote multiple data collection points are completely solved, CDMA communication moulds are employedBlock and d GPS locating module/the Big Dipper locating module dual-network backup mode and clock chip, improve the redundancy of system, fullyExisting Internet resources are make use of, and are following upgrading or conversion all using standard interface and modular design conceptNetwork transmitting unit and clock synchronization unit are laid a good foundation.
The present invention also provides a kind of synchronization system of different zones gateway data acquisition time, can improve the essence of lock in timeDegree.Specifically, as shown in Fig. 2 the synchronization system of different zones gateway data acquisition time of the present invention include parameter configuration unit,Gateway dispensing unit 2 and synchronization unit 3.
Wherein, the equipment that the parameter configuration unit 1 is used to be configured according to configuration parameter in same station indicates position, describedConfiguration parameter includes numbering, the title of computer room, the gateway numbering of computer room.The gateway dispensing unit 2 and the parameter configuration listMember 1 is connected, and for indicating position according to the equipment, corresponding gateway in different zones is configured in same station, and is connectedTo cdma network.Specifically, each gateway is connected to cdma network by CDMA communication modules.The synchronization unit 3 and instituteState gateway dispensing unit 2 to connect, the current time for obtaining the cdma network, be synchronized to each in the same stationIn the clock chip of gateway, so as to realize that the clock of each gateway same station Nei is synchronous.
Further, the synchronization system of different zones gateway data acquisition time of the present invention also includes computing unit 4 and moreNew unit 5.Wherein, the computing unit 4 is connected with parameter configuration unit 1 and gateway dispensing unit 2 respectively, for based on the timeFunction is verified, the time check initial time in the same station is calculated according to the configuration parameter;5 points of the updating blockIt is not connected with the computing unit 4 and synchronization unit 3, for according to the time check initial time, described in timing acquisitionLock in time in the current time of cdma network, the clock chip to update each gateway in the same station.
Wherein, the synchronization unit 3 includes controller and CDMA communication modules;The controller communicates mould with the CDMABlock is connected, and is instructed for sending communication module AT to the CDMA communication modules, to obtain the current time of the cdma network;The CDMA communication modules are connected with the clock chip, for obtaining the cdma network according to communication module AT instructionsCurrent time, and be synchronized in the clock chip.
Further, the synchronization unit 3 also includes locating module, and the locating module is connected with the clock chip,For confirming the current time of the cdma network, and it is synchronized in the clock chip.
It is preferred that, the controller, CDMA communication modules and locating module are provided with each gateway.FurtherGround, the locating module is d GPS locating module or the Big Dipper locating module.
Relative to prior art, synchronization system and the above-mentioned different zones of different zones gateway data acquisition time of the present inventionThe beneficial effect of the synchronous method of gateway data acquisition time is identical, will not be repeated here.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and otherBetween the difference of embodiment, each embodiment identical similar portion mutually referring to.
Specific case used herein is set forth to the principle and embodiment of the present invention, and above example is saidIt is bright to be only intended to help and understand the method for the present invention and its core concept;Simultaneously for those of ordinary skill in the art, foundationThe thought of the present invention, will change in specific embodiments and applications.In summary, this specification content is notIt is interpreted as limitation of the present invention.