CN107749789A - Time synchronization method and related device - Google Patents
Time synchronization method and related device Download PDFInfo
- Publication number
- CN107749789A CN107749789A CN201710941380.2A CN201710941380A CN107749789A CN 107749789 A CN107749789 A CN 107749789A CN 201710941380 A CN201710941380 A CN 201710941380A CN 107749789 A CN107749789 A CN 107749789A
- Authority
- CN
- China
- Prior art keywords
- server
- wireless device
- identification code
- time zone
- message
- 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 102
- 230000005540 biological transmission Effects 0.000 claims description 39
- 230000001360 synchronised effect Effects 0.000 claims description 38
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 claims description 22
- 238000009826 distribution Methods 0.000 claims description 17
- 238000003860 storage Methods 0.000 claims description 16
- 238000004891 communication Methods 0.000 claims description 12
- 230000000737 periodic effect Effects 0.000 claims description 12
- 238000004519 manufacturing process Methods 0.000 claims description 3
- 230000003071 parasitic effect Effects 0.000 claims 1
- 230000006870 function Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 17
- 238000004590 computer program Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- WQZGKKKJIJFFOK-GASJEMHNSA-N Glucose Natural products OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O WQZGKKKJIJFFOK-GASJEMHNSA-N 0.000 description 2
- 239000008280 blood Substances 0.000 description 2
- 210000004369 blood Anatomy 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 239000008103 glucose Substances 0.000 description 2
- 230000036541 health Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- TVEXGJYMHHTVKP-UHFFFAOYSA-N 6-oxabicyclo[3.2.1]oct-3-en-7-one Chemical compound C1C2C(=O)OC1C=CC2 TVEXGJYMHHTVKP-UHFFFAOYSA-N 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000006467 substitution reaction Methods 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
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/02—Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
- H04W56/002—Mutual synchronization
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the application discloses a time synchronization method and a related device, which are used for enabling target wireless equipment in different time zones to synchronize local time of the time zone in which the target wireless equipment is located to the same server. The method in the embodiment of the application comprises the following steps: the server determines a target time zone where the target wireless equipment is located according to a first preset method, then calculates the determined target time zone and the Unix timestamp to obtain local time, and sends the local time to the target wireless equipment, so that the target wireless equipment updates the initial time on the target wireless equipment to the local time.
Description
Technical field
The application is related to communication technical field, more particularly to the synchronous method and relevant apparatus of a kind of time.
Background technology
Wireless device refers to employing wireless access technology and the equipment that can access network as needed, such as bracelet, strong
The equipment such as health scale, sphygmomanometer, blood glucose meter.
, it is necessary to server sync time corresponding with the wireless device, the service after the network of wireless device access at present
The time that device is synchronized to the wireless device is the time that the server disposes area.
However, if wireless device has more, and is deployed in the country with different time zone respectively, if this more
Wireless device only corresponds to same server, then and these wireless devices are consistent to time all generals of the server sync, so,
It is just inaccurate that the time that the wireless device in same time zone is synchronized to from server is not belonging to the server.
The content of the invention
The embodiment of the present application provides the synchronous method and relevant apparatus of a kind of time, when making to be in different for realizing
The local zone time in time zone residing for targeted wireless device described in the targeted wireless device in area to same server sync.
Concrete technical scheme includes:
The embodiment of the present application first aspect provides a kind of synchronous method of time, and this method includes:
Target time zone of the server according to residing for the first presetting method determines targeted wireless device;
The target time zone and Unix timestamps are carried out computing by the server, obtain local zone time;
The server sends the local zone time to the targeted wireless device, to cause the targeted wireless device
It is the local zone time to update the initial time in the targeted wireless device.
Preferably, time zone of the server according to residing for the first presetting method determines wireless device includes:
The server obtains the first message that transmitting terminal is sent, and the first message includes exclusive identification code with timely
Area, the exclusive identification code are generated by the transmitting terminal according to preset rules, and the time zone is the current time zone of the transmitting terminal;
The server obtains the second message that the targeted wireless device is sent, and second message includes described unique
Identification code and target device identification code, the exclusive identification code is by the packet comprising the exclusive identification code through the target
Obtained after wireless device decoding, the packet is by the omnidirectional transmission of the transmitting terminal and by the targeted wireless device by opening
Open promiscuous mode to grab, the target device identification code is the targeted wireless device uniquely corresponding identification code;
The server determines that the time zone is the target time zone according to the exclusive identification code.
Preferably, after the second message that the server obtains that the targeted wireless device is sent, the server
Determine the time zone for before the target time zone, methods described also includes according to the exclusive identification code:
Whether the duration that the server judges to get the first message and second message interval is first
In preset duration;
If so, then the server execution determines behaviour of the time zone for the target time zone according to the exclusive identification code
Make.
Preferably, the server determines that the time zone is institute after the target time zone according to the exclusive identification code
Server is stated by before the target time zone and the progress computing of Unix timestamps, methods described also includes:
The server preserves the target time zone and the target device identification code, and identify the target time zone with
The target device identification code possesses incidence relation;
When the server get wireless device transmission with the wireless device uniquely corresponding equipment mark code when,
The server judges whether the equipment mark code is the target device identification code;
If the server determines that the equipment mark code is the target device identification code, the server determines institute
It is the targeted wireless device to state wireless device, and finds the target time zone according to the incidence relation.
Preferably, after the first message that the server obtains that transmitting terminal is sent, the server obtains the mesh
Before marking the second message that wireless device is sent, methods described also includes:
The server generates record identification;
The server sends the record identification to the transmitting terminal, to cause the transmitting terminal when second is default
Whether the server according to the record identification to the server periodic queries has got second message in long.
Preferably, target time zone of the server according to residing for the first presetting method determines targeted wireless device includes:
The server obtains the location of the targeted wireless device that the targeted wireless device is sent information;
Target time zone of the server according to residing for the positional information determines the targeted wireless device.
The embodiment of the present application second aspect provides a kind of synchronous method of time, and this method includes:
The local zone time that server corresponding to targeted wireless device acquisition is sent, the local zone time will by the server
Target time zone and Unix timestamps residing for the targeted wireless device carry out computing and obtained, and the target time zone is by the clothes
Business device determines according to the first presetting method;
The initial time that the targeted wireless device is updated in the targeted wireless device is the local zone time.
Preferably, first presetting method includes:
The targeted wireless device opens promiscuous mode crawl packet, the packet by the omnidirectional transmission of transmitting terminal,
The packet includes exclusive identification code, and the exclusive identification code is generated by the transmitting terminal according to preset rules;
The targeted wireless device is established according to the second presetting method and the server and communicated to connect;
The targeted wireless device sends the second message to the server, and second message includes the unique mark
Code and target device identification code, using cause the server according to the exclusive identification code determine time zone in first message as
The target time zone, the first message are sent by the transmitting terminal, the first message include the exclusive identification code and
The time zone, the time zone are the current time zone of the transmitting terminal, and the target device identification code is the targeted wireless device
Identification code corresponding to unique.
Preferably, the packet also includes:
Distribution WiFi SSID and password corresponding with the SSID;
The targeted wireless device establishes communication connection according to the second presetting method with the server to be included:
The targeted wireless device accesses the distribution WiFi by the SSID got and the password;
The targeted wireless device is established by the distribution WiFi and the server and communicated to connect.
Preferably, first presetting method includes:
The targeted wireless device sends the location of targeted wireless device information to the server, to cause
The server determines the target time zone according to the positional information.
The application third aspect provides a kind of synchronous method of time, and this method includes:
Transmitting terminal sends first message to corresponding server, to cause the server to judge that getting described first disappears
Whether in the first preset duration, the first message includes exclusive identification code with timely to the duration of breath and the second message interval
Area, second message include the exclusive identification code and target device identification code, and second message is set by Target Wireless
Preparation is sent, and the exclusive identification code is generated by transmitting terminal according to preset rules, and the time zone is the current time zone of the transmitting terminal,
The target device identification code is the targeted wireless device uniquely corresponding identification code;
The omnidirectional transmission packet of transmitting terminal, the packet includes the exclusive identification code, to cause the mesh
Mark wireless device grabs the packet when opening promiscuous mode and according to the packet to server transmission the
Two message.
Preferably, after the transmitting terminal sends first message to corresponding server, methods described also includes:
The transmitting terminal obtains the record identification that the server is sent;
The transmitting terminal is in the second preset duration according to the record identification to the server periodic queries
Whether server has got second message.
The embodiment of the present application fourth aspect provides a kind of server, and server specific implementation is same corresponding to the above-mentioned time
The function of being realized in one step process by server, the function can be realized by hardware, can also be performed by hardware corresponding soft
Part program is realized.Hardware and software includes one or more units corresponding with above-mentioned function phase and/or module, the unit and/
Or module can be software and/or hardware.
The aspect of the embodiment of the present application the 5th provides a kind of wireless device, and the wireless device is as targeted wireless device, tool
Body realizes the function of being realized in the synchronous method corresponding to the above-mentioned time by the wireless device, and the function can be real by hardware
It is existing, corresponding software program can also be performed by hardware and is realized.Hardware and software includes one or more and above-mentioned function phase
Corresponding unit and/or module, the unit and/or module can be software and/or hardware.
The aspect of the embodiment of the present application the 6th provides a kind of transmitting terminal, and transmitting terminal specific implementation is same corresponding to the above-mentioned time
The function of being realized in one step process by transmitting terminal, the function can be realized by hardware, can also be performed by hardware corresponding soft
Part program is realized.Hardware and software includes one or more units corresponding with above-mentioned function phase and/or module, the unit and/
Or module can be software and/or hardware.
The aspect of the embodiment of the present application the 7th provides a kind of server, and the server includes:
Processor, memory, bus and input/output interface, the processor, memory and input/output interface pass through this
Bus connects;Have program stored therein code in the memory, and the program code is used to store operational order;The processor is used to call
The server in the synchronous method of any one of the embodiment of the present application time is performed during program code in the memory to be needed to hold
Capable step.
The embodiment of the present application eighth aspect provides a kind of wireless device, the wireless device as targeted wireless device, including:
Processor, memory, bus and input/output interface, the processor, memory and input/output interface pass through this
Bus connects;Have program stored therein code in the memory, and the program code is used to store operational order;The processor is used to call
The wireless device needs in the synchronous method of any one of the embodiment of the present application time are performed during program code in the memory
The step of execution.
The aspect of the embodiment of the present application the 9th provides a kind of transmitting terminal, and the transmitting terminal includes:
Processor, memory, bus and input/output interface, the processor, memory and input/output interface pass through this
Bus connects;Have program stored therein code in the memory, and the program code is used to store operational order;The processor is used to call
The transmitting terminal in the synchronous method of any one of the embodiment of the present application time is performed during program code in the memory to be needed to hold
Capable step.
The embodiment of the present application provides a kind of computer program product for including instruction, when run on a computer, makes
Obtain the step of computer performs the synchronous method of any one of the embodiment of the present application time.
The embodiment of the present application also provides a kind of computer-readable recording medium, it is necessary to explanation, the technical side of the application
The part or all or part of the technical scheme that case substantially contributes to prior art in other words can be produced with software
The form of product is embodied, and the computer software product is stored in a storage medium, for saving as above-mentioned relevant apparatus
Computer software instructions used, when the instruction is run on computers so that computer, which is performed in the embodiment of the present application, appoints
The step of synchronous method of one time.
The storage medium can be USB flash disk, mobile hard disk, read-only storage (english abbreviation:ROM, English full name:Read-
Only Memory), random access memory (english abbreviation:RAM, English full name:Random Access Memory), magnetic disc
Or CD etc. is various not to be limited specifically with the medium of store program codes herein.
As can be seen from the above technical solutions, the embodiment of the present application has advantages below:Server is according to the first default side
Method determines the target time zone residing for targeted wireless device, and the target time zone of determination and Unix timestamps are carried out into computing afterwards,
Local zone time is obtained, and the local zone time is sent to targeted wireless device, to cause targeted wireless device to update Target Wireless
Initial time in equipment is the local zone time.In the embodiment of the present application, server determines mesh by the first presetting method
After marking the target time zone residing for wireless device, the target time zone and Unix timestamps are subjected to computing, you can obtain the mesh
The local zone time of wireless device their location is marked, targeted wireless device gets the local zone time, will update targeted wireless device
On initial time be the local zone time, finally realizing makes the targeted wireless device in different time zone same to same server
Walk the local zone time in time zone residing for the targeted wireless device.
Brief description of the drawings
Fig. 1 is one embodiment schematic diagram of the synchronous method of time in the embodiment of the present application;
Fig. 2 is another embodiment schematic diagram of the synchronous method of time in the embodiment of the present application;
Fig. 3 is another embodiment schematic diagram of the synchronous method of time in the embodiment of the present application;
Fig. 4 is another embodiment schematic diagram of the synchronous method of time in the embodiment of the present application;
Fig. 5 is another embodiment schematic diagram of the synchronous method of time in the embodiment of the present application;
Fig. 6 is one embodiment schematic diagram of server in the embodiment of the present application;
Fig. 7 is another embodiment schematic diagram of server in the embodiment of the present application;
Fig. 8 is another embodiment schematic diagram of server in the embodiment of the present application;
Fig. 9 is one embodiment schematic diagram of wireless device in the embodiment of the present application;
Figure 10 is one embodiment schematic diagram of transmitting terminal in the embodiment of the present application;
Figure 11 is one embodiment schematic diagram of server in the embodiment of the present application;
Figure 12 is one embodiment schematic diagram of wireless device in the embodiment of the present application;
Figure 13 is one embodiment schematic diagram of transmitting terminal in the embodiment of the present application.
Embodiment
The embodiment of the present application provides the synchronous method and relevant apparatus of a kind of time, when making to be in different for realizing
The local zone time in time zone residing for targeted wireless device described in the targeted wireless device in area to same server sync.
Wireless device, can be by connecting the server address built in wireless device come lock in time, together after network is accessed
The time of step is the time on server disposition ground corresponding with wireless device, if the wireless device and corresponding server deployment ground
Time zone is different, then occurs that the local zone time residing for time and the actual wireless device that wireless device show is inconsistent.This
Application embodiment be exactly in order to solve wireless device and server do not cause in same time zone wireless device be synchronized to mistake when
Between this problem.
It should be noted that wireless device and targeted wireless device described herein each means that employing wireless accesses
Technology and the equipment that network can be accessed as needed, can be WiFi equipment with WiFi module or with
The WAPI equipment of WAPI wireless modules, such as the bracelet with wireless communication module (such as WiFi module, WAPI wireless modules),
The equipment such as health scale, sphygmomanometer, blood glucose meter, specific the application do not limit.
For ease of understanding, the idiographic flow in the embodiment of the present application is described below, referring to Fig. 1, the application is real
Applying one embodiment of the synchronous method of time in example includes:
101st, server determines the target time zone residing for targeted wireless device;
Target time zone of the server according to residing for the first presetting method determines targeted wireless device, first presetting method
Can be that server obtains the location of the targeted wireless device that targeted wireless device is sent information, server is according to the position
Information determines the target time zone residing for the targeted wireless device;Can also be the clothes after targeted wireless device is even connected to the Net
Business device gets the IP address of the targeted wireless device, and the target time zone residing for the wireless device is determined further according to the IP address,
How server determines that the target time zone residing for targeted wireless device is determined by the first presetting method, does not limit herein specifically.
102nd, target time zone and Unix timestamps are carried out computing by server, obtain local zone time;
After server gets the target time zone of targeted wireless device, the target time zone is transported with Unix timestamps
Calculate, that is, obtain the local zone time in time zone residing for the targeted wireless device, computing mode is:Local zone time=target time zone+Unix
Timestamp.
103rd, server sends local zone time to targeted wireless device.
Server will be calculated local zone time and send to targeted wireless device, to cause targeted wireless device to update the mesh
The initial time marked on wireless device is the local zone time.
In the embodiment of the present application, when server determines the target residing for targeted wireless device by the first presetting method
After area, the target time zone and Unix timestamps are subjected to computing, you can obtain the sheet of the targeted wireless device their location
Ground time, targeted wireless device get the local zone time, by update targeted wireless device on initial time for this it is local when
Between, finally realizing makes residing for targeted wireless device described in the targeted wireless device to same server sync in different time zone
The local zone time in time zone.
The synchronous method of time is illustrated from server side for embodiment corresponding to Fig. 1, is set below from Target Wireless
Standby side illustrates to the synchronous method of time, referring to Fig. 2, in the embodiment of the present application the synchronous method of time another implementation
Example includes:
201st, targeted wireless device obtains the local zone time that server is sent;
Targeted wireless device obtain corresponding to server send local zone time, the local zone time by server by target without
Target time zone and Unix timestamps residing for line equipment carry out computing and obtained, and target time zone is by server according to the first default side
Method determines that there are various ways in target time zone of the server according to residing for the first presetting method determines targeted wireless device, for example, the
One presetting method can be that targeted wireless device sends the location of targeted wireless device information to server, to service
Target time zone of the device according to residing for the positional information determines the targeted wireless device;Can also be server get the target without
The IP address of line equipment, the target time zone residing for the wireless device is determined further according to the IP address, it is specifically default to first herein
Method does not limit.
202nd, targeted wireless device renewal initial time is local zone time.
It is initial in the targeted wireless device by updating after targeted wireless device gets the local zone time of server transmission
Time is the local zone time.
It should be noted that targeted wireless device renewal initial time is after local zone time, targeted wireless device can root
According to need by local zone time in the form of date Hour Minute Second on the display interface of targeted wireless device (if the Target Wireless is set
It is standby to possess display function) show, or reported by the voice system of targeted wireless device so that user is learnt (if should
Targeted wireless device possesses audio-frequency function), do not limit herein specifically.
In the embodiment of the present application, targeted wireless device obtains the local residing for the targeted wireless device that server is sent
Time, the initial time in the targeted wireless device is then updated to the local zone time, it is achieved thereby that when making to be in different
The local zone time in time zone residing for targeted wireless device described in the targeted wireless device in area to same server sync.
The synchronous method of time is illustrated from transmission side below, referring to Fig. 3, the time in the embodiment of the present application
Another embodiment of synchronous method includes:
301st, transmitting terminal sends first message to server;
Transmitting terminal in the embodiment of the present application can be Intelligent mobile equipment, such as mobile phone, PC, intelligent watch
Deng or other smart machines, do not limit herein specifically.
Transmitting terminal sends first message to server, to cause server to judge to get the first message and second disappear
The duration at interval is ceased whether in the first preset duration, and finally server is obtained according to first message and the second message
Local zone time residing for targeted wireless device, and send to targeted wireless device.First message includes exclusive identification code with timely
Area, the second message include the exclusive identification code and target device identification code, and the second message is sent by targeted wireless device, only
One identification code is generated by transmitting terminal according to preset rules, the time zone be the transmitting terminal current time zone, the target device identification code
For the unique corresponding identification code of targeted wireless device.
It should be noted that direct communication is had no in the embodiment of the present application, between targeted wireless device and transmitting terminal
Ability, the exclusive identification code that targeted wireless device is got are that the number of the omnidirectional transmission of transmitting terminal is captured by opening promiscuous mode
Obtained according to the packet is decoded after bag.
It should also be noted that, the effect of the exclusive identification code is to enable server to match transmitting terminal to set with Target Wireless
Standby, the create-rule of the exclusive identification code can be transmitting terminal by distribution WiFi SSID, password corresponding with SSID, transmitting terminal
Residing current time zone and Uinx timestamps and the general unique identifier of targeted wireless device generation carry out computing and drawn;Also may be used
To be the generation of other generating modes, do not limit herein specifically.
302nd, the omnidirectional transmission packet of transmitting terminal.
Transmitting terminal omnidirectional transmission packet into air, the packet include the unique mark generated according to preset rules
Code, to cause targeted wireless device to grab packet when opening promiscuous mode and be sent out according to the packet to the server
Send the second message.
It should be noted that the packet in addition to including exclusive identification code, can also include the distribution of transmitting terminal
WiFi SSID and password corresponding with SSID, can be according to distribution WiFi after targeted wireless device gets the packet
SSID and password corresponding with SSID even connect to the Net, so as to the communication link established by the network between server
Connect;The packet can also only include exclusive identification code, and targeted wireless device connection network can also by other means, example
Such as, targeted wireless device is connected by password corresponding to the SSID and SSID of the distribution WiFi around obtaining in addition to transmitting terminal
Upper network, is not limited specifically herein.
It should also be noted that, when there is no the priority of fixation in the embodiment of the present application, between step 301 and step 302
Sequence, step 301 can be first carried out, step 302 can also be first carried out, step step 301 and step 302 can also be performed simultaneously,
Do not limit herein specifically.
In the embodiment of the present application, transmitting terminal sends first message, and the omnidirectional hair into air to corresponding server
Packet is sent, to cause targeted wireless device to send the second message to server, and further such that server judges to get
Whether the duration of the first message and the second message interval finally causes server according to the in the first preset duration
One message and the second message obtain the local zone time residing for targeted wireless device, and send to targeted wireless device, then should
Initial time in the targeted wireless device is updated to the local zone time by targeted wireless device, it is achieved thereby that making in difference
The local zone time in time zone residing for targeted wireless device described in the targeted wireless device in time zone to same server sync.
Embodiment corresponding to Fig. 1 to Fig. 3 is from server side, targeted wireless device side respectively, sends side to the time
Synchronous method be illustrated, be further illustrated from the interaction angle of data below, referring specifically to Fig. 4, the application
Another embodiment of the synchronous method of time includes in embodiment:
401st, transmitting terminal sends first message to server;
Transmitting terminal sends first message to server, and the first message includes exclusive identification code and time zone, described unique
Identification code is generated by transmitting terminal according to preset rules, and the time zone is the current time zone of transmitting terminal.
It should be noted that the SSID of distribution WiFi corresponding to transmitting terminal can also be included in the first message;May be used yet
Including other information, not limit specifically herein.
402nd, the omnidirectional transmission packet of transmitting terminal;
Transmitting terminal is omnidirectional transmission packet, the packet include exclusive identification code.It should be noted that the packet
The distribution WiFi of transmitting terminal SSID and password corresponding with SSID can also be included, other information can also be included, specifically
Do not limit herein.
403rd, targeted wireless device opens promiscuous mode crawl packet;
Targeted wireless device opens the packet around promiscuous mode crawl, if the targeted wireless device grabs transmitting terminal
During the above-mentioned packet of omnidirectional transmission, by being decoded to obtain exclusive identification code to the packet, Target Wireless is set afterwards
Standby can is established according to the second presetting method and server and communicated to connect.
If it should be noted that except bag in the packet for the omnidirectional transmission of transmitting terminal that targeted wireless device grabs
Include outside exclusive identification code, in addition to the distribution WiFi of transmitting terminal SSID and password corresponding with the SSID, then the target
Wireless device can access distribution WiFi by the SSID and password got, and targeted wireless device passes through the distribution afterwards
WiFi is established with server and communicated to connect;If in the packet for the omnidirectional transmission of transmitting terminal that targeted wireless device grabs only
Including exclusive identification code, targeted wireless device connection network can also by other means, for example, targeted wireless device is by obtaining
Password is even connected to the Net corresponding to the SSID and SSID of distribution WiFi around taking in addition to transmitting terminal, passes through the net again afterwards
Network is established with server and communicated to connect, and targeted wireless device establishes communication connection by which kind of mode with server to be preset by second
Method determines, does not limit herein specifically.
It should also be noted that, the transmitting terminal in the embodiment of the present application sends first message, transmitting terminal without fixed to server
There is no a fixed priority sequential to sending packet and targeted wireless device and opening promiscuous mode crawl packet, step 401,
The sequencing performed between step 402, step 403 can in any combination, can also perform simultaneously step 401, step 402 with
And step 403, do not limit herein specifically.
404th, server generates record identification and sent to transmitting terminal;
After server gets the first message of transmitting terminal transmission, a record identification will be generated, and the record is marked
Know and send to transmitting terminal.It should be noted that the record identification can be a Record ID or identifying code, it is specific this
Place does not limit.
405th, transmitting terminal according to record identification to server periodic queries;
, will be in the second preset duration according to the record identification after transmitting terminal gets the record identification of server transmission
The second message that targeted wireless device sends to server whether has been got to server periodic queries server.
It should be noted that whether transmitting terminal inquiry server has got targeted wireless device is sent to server the
Two message are in order to verify whether targeted wireless device establishes communication connection with server, when targeted wireless device and service
Device, which establishes communication connection targeted wireless device, to send message to server.
It should also be noted that, second preset duration can voluntarily be set as needed, such as in view of Target Wireless
The type of equipment, the power of distribution WiFi signal, the ability of server process data, Consumer's Experience etc., the second preset duration can
To be 2.5 minutes or 3 minutes, the cycle of periodic queries can be 30 seconds or 40 seconds, specifically herein not
Limit.
It should also be noted that, in some embodiments of the embodiment of the present application, when server gets Target Wireless
Equipment send the second message after, can also actively to transmitting terminal again return recording identify, so as to allow transmitting terminal to judge
The duration between first record mark and second of record identification is got whether in the second preset duration, specifically herein not
Limit.
It should also be noted that, in some embodiments of the embodiment of the present application, step 404 and step 405 also may be used
Not need, do not limit herein specifically.
406th, targeted wireless device sends the second message to server;
After establishing communication connection between targeted wireless device and server, it will the second message is sent to server,
Second message includes exclusive identification code and target device identification code, the target device identification code be the targeted wireless device only
Identification code corresponding to one.
It should be noted that in the embodiment of the present application transmitting terminal according to record identification to the server cycle newly inquiry and
Targeted wireless device sends priority sequential of second message without fixation to server, can first carry out step 405, can also be first
Step 406 is performed, step 405 and step 406 can also be performed simultaneously, do not limited herein specifically.
407th, server determines target time zone;
Server is according to the exclusive identification code from transmitting terminal and targeted wireless device, so that it is determined that the transmitting terminal and the mesh
Mark wireless device is in same time zone, has also determined that target of the current time zone residing for targeted wireless device residing for transmitting terminal
Time zone.
It should be noted that in some embodiments of the embodiment of the present application, server can also be by judging to obtain
Whether in the first preset duration decide whether to perform follow-up step to the duration of first message and the second message interval.
I.e.:When server gets the first message of transmitting terminal transmission, the server can start timer and start timing, work as service
When device gets the second message of targeted wireless device transmission, the server makes timer stop timing, and judges that server obtains
The duration (i.e. the timing duration of timer) of first message and the second message interval is got whether in the first preset duration, if
The timing duration is determined in the first preset duration, server performs current according to residing for exclusive identification code determines transmitting terminal again
Time zone is the operation in the target time zone residing for targeted wireless device.This mode is in order to avoid server and transmitting terminal and mesh
Consumer's Experience caused by long interaction time is bad between mark wireless device.It should also be noted that, if timing duration is no longer
In first preset duration, then server can delete the first message got and the second message, can not also delete, specifically
Do not limit herein.
It should also be noted that, first preset duration can voluntarily be set as needed, do not limit herein specifically.
408th, target time zone and Unix timestamps are carried out computing by server, are obtained local zone time and are sent to Target Wireless
Equipment;
Server determines the time zone residing for transmitting terminal as after the target time zone, the target time zone is entered with Unix timestamps
Row computing, the local zone time residing for the targeted wireless device is obtained, and sent to the targeted wireless device.
409th, targeted wireless device renewal initial time is local zone time.
It is this by the initial time updated in the targeted wireless device after targeted wireless device gets the local zone time
The ground time.
In the embodiment of the present application, server obtains the first message of transmitting terminal transmission respectively and targeted wireless device is sent
The second message, according to the exclusive identification code all having in first message and the second message, it is possible to determine transmitting terminal and target
Possess certain incidence relation between wireless device, and because the unique designation code of targeted wireless device acquisition is by grabbing
What decoded packet data obtained, the data can determine transmitting terminal and targeted wireless device accordingly again by the omnidirectional transmission of transmitting terminal
Between certain incidence relation for possessing refer to that the transmitting terminal is in same time zone with targeted wireless device.Therefore server by this
Time zone and Unix timestamps in one message carry out computing, you can when obtaining the local of the targeted wireless device their location
Between, targeted wireless device gets the local zone time, is the local zone time by the initial time updated in targeted wireless device, most
Realizing eventually makes time zone residing for targeted wireless device described in the targeted wireless device to same server sync in different time zone
Local zone time.
After server determines the target time zone residing for targeted wireless device, the target time zone and mesh can also be preserved
The target device identification code of wireless device is marked, so as to when carrying out time synchronized to targeted wireless device afterwards, it is not necessary to send
End repeats to server and sends time zone, referring specifically to Fig. 5, another reality of the synchronous method of time in the embodiment of the present application
Applying example includes:
501st, transmitting terminal sends first message to server;
502nd, the omnidirectional transmission packet of transmitting terminal;
503rd, targeted wireless device opens promiscuous mode crawl packet;
504th, server generates record identification and sent to transmitting terminal;
505th, transmitting terminal according to record identification to server periodic queries;
506th, targeted wireless device sends the second message to server;
507th, server determines target time zone;
In the embodiment of the present application, the step 401 in step 501 to step 507 and foregoing embodiment illustrated in fig. 4 is to step
407 is similar, and specific here is omitted.
508th, server preserves target time zone and target device identification code, and identifies incidence relation;
After server determines the target time zone residing for targeted wireless device, the target time zone and target device will be preserved
Identification code, and identify between target time zone and the target device identification code and possess incidence relation.
509th, server obtains the equipment mark code that wireless device is sent;
Server obtains the equipment mark code that wireless device is sent, and the equipment mark code is uniquely corresponding with the wireless device.
510th, server judges whether equipment mark code is target device identification code;
Whether the equipment mark code that server judges to obtain is stored in the target device identification code on the server.
511st, server searches target time zone according to incidence relation;
If server determines that the equipment mark code is target device identification code, server determines that the wireless device is mesh
Wireless device is marked, and target time zone corresponding with target device identification code is found according to the incidence relation of mark.
512nd, target time zone and Unix timestamps are carried out computing by server, are obtained local zone time and are sent to Target Wireless
Equipment;
513rd, targeted wireless device renewal initial time is local zone time.
In the embodiment of the present application, the step 408 in step 512 to step 513 and foregoing embodiment illustrated in fig. 4 is to step
409 is similar, and specific here is omitted.
In the embodiment of the present application, after server determines the target time zone residing for targeted wireless device, further preserve
The target time zone and target device identification code, and identify incidence relation;When the equipment that server gets wireless device again
After identification code, by judge the equipment mark code whether be target device identification code determine the wireless device whether be target without
Line equipment, if so, then server finds target time zone according to incidence relation, and the target time zone and Unix timestamps are entered
Row computing, you can the local zone time of the targeted wireless device their location is obtained, targeted wireless device gets the local zone time,
It is the local zone time by the initial time updated in targeted wireless device, finally realizing makes the Target Wireless in different time zone
The local zone time in time zone residing for targeted wireless device described in equipment to same server sync.
The synchronous method of the above-mentioned time in the embodiment of the present application is illustrated, below to the embodiment of the present application
In relevant apparatus be specifically described, referring to Fig. 6, one embodiment of the server in the embodiment of the present application includes:
First determining unit 601, for the target time zone residing for determining targeted wireless device according to the first presetting method;
Arithmetic element 602, for the target time zone and Unix timestamps to be carried out into computing, obtain local zone time;
Transmitting element 603, for the local zone time to be sent to the targeted wireless device, to cause the targeted wireless device
It is the local zone time to update the initial time in the targeted wireless device.
Preferably, in some embodiments of the present application, the first determining unit 601 can also possess more extra work(
Energy:
First determining unit 601, it is additionally operable to obtain the position residing for the targeted wireless device of targeted wireless device transmission
Confidence ceases;
First determining unit 601, it is additionally operable to the target time zone according to residing for the positional information determines the targeted wireless device.
The first determining unit 601 in embodiment corresponding to Fig. 6 can also specifically include more modules, to realize more
Specific function, referring specifically to Fig. 7, another embodiment of server includes in the embodiment of the present application:
First determining unit 701, arithmetic element 702, transmitting element 703, the first determining unit in the embodiment of the present application
701st, the first determining unit 601 in arithmetic element 702, transmitting element 703 embodiment corresponding with Fig. 6, arithmetic element 602,
The function of transmitting element 603 is similar, and here is omitted;
Wherein, the first determining unit 701 can specifically include:
First acquisition module 7011, for obtaining the first message of transmitting terminal transmission, the first message includes unique mark
Code and time zone, the exclusive identification code are generated by the transmitting terminal according to preset rules, and the time zone is the current time zone of the transmitting terminal;
Second acquisition module 7012, for obtaining the second message of targeted wireless device transmission, second message includes
The exclusive identification code and target device identification code, the exclusive identification code is by the packet comprising the exclusive identification code through the target
Obtained after wireless device decoding, the packet by open is mixed by the omnidirectional transmission of the transmitting terminal and by the targeted wireless device
Pattern grabs, and the target device identification code is the targeted wireless device uniquely corresponding identification code;
Determining module 7013, it is additionally operable to determine that the time zone is the target time zone according to the exclusive identification code.
Preferably, in some embodiments of the present application, second acquisition module 7012 can also possess more extra
Function:
Second acquisition module 7012, it is additionally operable to judge that getting the first message and the duration of second message interval is
It is no in the first preset duration;
Second acquisition module 7012, it is additionally operable to when second module determines the duration at the interval in first preset duration
When, then trigger the determining module and perform corresponding operating.
Preferably, in some embodiments of the present application, first acquisition module 7011 can also possess more extra
Function:
First acquisition module 7011, it is additionally operable to record of production mark;
First acquisition module 7011, it is additionally operable to send the record identification to the transmitting terminal, to cause the transmitting terminal
According to the record identification, to the server periodic queries, whether the server has got second message in two preset durations.
Server can also have in addition to the unit described in embodiment corresponding to Fig. 6 and Fig. 7 or module
There is more multiple-unit to realize extra function, referring specifically to Fig. 8, another embodiment bag of server in the embodiment of the present application
Include:
First acquisition module 8011, the second acquisition module 8012, determining module 8013, storage unit 804, judging unit
805th, the second determining unit 806, arithmetic element 802, transmitting element 803, the first acquisition module 8011 in the embodiment of the present application,
In second acquisition module 8012, determining module 8013, arithmetic element 802, transmitting element 803 embodiment corresponding with Fig. 7
One acquisition module 7011, the second acquisition module 7012, determining module 7013, arithmetic element 702, the function of transmitting element 703 are similar,
Here is omitted;
Storage unit 804, for preserving the target time zone and the target device identification code, and identify the target time zone with
The target device identification code possesses incidence relation;
Judging unit 805, for getting the uniquely corresponding with the wireless device of wireless device transmission when the server
During equipment mark code, judge whether the equipment mark code is the target device identification code;
Second determining unit 806, for determining that the equipment mark code is the target device identification code when the judging unit 805
When, it is the targeted wireless device to determine the wireless device, and finds the target time zone according to the incidence relation.
The specific function of server and structure in embodiment corresponding to Fig. 6 and Fig. 8 are used to realize earlier figures 1 to figure
The step of being handled in 5 illustrated embodiments by server, specific here is omitted.
Referring to Fig. 9, one embodiment schematic diagram of the wireless device in the embodiment of the present application, the wireless device is as mesh
Wireless device is marked, including:
Acquiring unit 901, the local zone time sent for obtaining corresponding server, the local zone time will by the server
Target time zone and Unix timestamps residing for the targeted wireless device carry out computing and obtained, and the target time zone is by the server root
Determined according to the first presetting method;
Updating block 902, it is the local zone time for updating the initial time in the targeted wireless device.
Preferably, in some embodiments of the present application, the wireless device can include:
Placement unit 903, for opening promiscuous mode crawl packet, the packet, should by the omnidirectional transmission of transmitting terminal
Packet includes exclusive identification code, and the exclusive identification code is generated by the transmitting terminal according to preset rules;
Connection unit 904 is established, is established and communicated with the server according to the second presetting method for the targeted wireless device
Connection;
First transmitting element 905, for sending the second message to the server, second message includes the exclusive identification code
And target device identification code, to cause the server to determine time zone in first message as the target according to the exclusive identification code
Time zone, the first message are sent by the transmitting terminal, and the first message includes the exclusive identification code and the time zone, and the time zone is should
The current time zone of transmitting terminal, the target device identification code are the targeted wireless device uniquely corresponding identification code.
Preferably, in some embodiments of the present application, the wireless device can also include:
Second transmitting element 906, for sending the location of targeted wireless device information to the server, to cause
The server determines the target time zone according to the positional information.
The specific function of wireless device and structure in embodiment corresponding to Fig. 9 are used to realize earlier figures 1 to shown in Fig. 5
The step of being handled in embodiment by wireless device, specific here is omitted.
Referring to Fig. 10, one embodiment of the transmitting terminal in the embodiment of the present application includes:
First transmitting element 1001, for sending first message to corresponding server, to cause the server to judge to obtain
The duration of the first message and the second message interval is got whether in the first preset duration, the first message includes unique mark
Know code and time zone, second message includes the exclusive identification code and target device identification code, second message by target without
Line equipment is sent, and the exclusive identification code is generated by transmitting terminal according to preset rules, and the time zone is the current time zone of the transmitting terminal, should
Target device identification code is the targeted wireless device uniquely corresponding identification code;
Second transmitting element 1002, for omnidirectional transmission packet, the packet includes the exclusive identification code, to cause
The targeted wireless device grabs the packet when opening promiscuous mode and sends second to the server according to the packet
Message.
Preferably, in some embodiments of the present application, the transmitting terminal can also include:
Acquiring unit 1003, for obtaining the record identification of server transmission;
Query unit 1004, for being somebody's turn to do in the second preset duration according to the record identification to the server periodic queries
Whether server has got second message.
It should be noted that in the embodiment of the present application, transmitting terminal can be sent according to the first transmitting element 1001, second
Unit 1002, acquiring unit 1003, query unit 1004 are linked in sequence, can also be single according to the first transmitting element 1001, acquisition
Member 1003, query unit 1004, the second transmitting element 1002 are linked in sequence, and do not limit herein specifically.
The specific function of transmitting terminal and structure in embodiment corresponding to Figure 10 are used to realize earlier figures 1 to shown in Fig. 5
The step of being handled in embodiment by transmitting terminal, specific here is omitted.
The angle of Fig. 6 to Figure 10 slave module functional entitys is retouched to the relevant apparatus in the embodiment of the present application respectively
State, the relevant apparatus in the embodiment of the present application is described in detail from the angle of hardware handles below, as shown in figure 11, for this
Apply for one embodiment schematic diagram of server in embodiment, specifically include:
The server can produce bigger difference because configuration or performance are different, can include in one or more
Central processor (english abbreviation:CPU, English full name:Central Processing Units) 1122 (for example, one or one
Above processor) and memory 1132, one or more store the storage medium of application programs 1142 or data 1144
1130 (such as one or more mass memory units).Wherein, memory 1132 and storage medium 1130 can be of short duration
Storage or persistently storage.Being stored in the program of storage medium 1130 (can illustrate and not mark including one or more modules
Go out), each module can include operating the series of instructions in server.Further, central processing unit 1122 can be with
It is arranged to communicate with storage medium 1130, performs the series of instructions operation in storage medium 1130 on the server.
The server can also include one or more power supplys 1126, one or more wired or wireless networks
Interface 1150, one or more input/output interfaces 1158, and/or, one or more operating systems 1141, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Knot of the step as shown in server based on the Figure 11 in above-mentioned Fig. 1 to the synchronous method of the time described by Fig. 5
Structure is realized.
As shown in figure 12, it is one embodiment schematic diagram of wireless device in the embodiment of the present application, the wireless device conduct
Targeted wireless device, including:
The wireless device 1200 of the embodiment includes:Processor 1201, memory 1202 and it is stored in the memory
In and the computer program 1203 that can be run on processor 1201.Processor 1201 is realized when performing computer program 1203
State the step in the embodiment of the synchronous method of each time, such as the step 201 shown in Fig. 2.Or processor 1201 performs
The function of wireless device each unit in above-described embodiment, such as the acquiring unit 901 shown in Fig. 9 are realized during computer program 1203
Function.
Exemplary, computer program 1203 can be divided into one or more units, one or more unit
It is stored in memory 1202, and is performed by processor 1201, completes the same of the time described by the application Fig. 1 to Fig. 5
As the step performed by wireless device in one step process.One or more of units can be the system that can complete specific function
Column count machine programmed instruction section, the instruction segment are used to describe the implementation procedure of computer program 1203 in a wireless device.
As shown in figure 13, it is one embodiment schematic diagram of transmitting terminal in the embodiment of the present application, specifically includes:
Input unit 1301, output device 1302, processor 1303 and (the wherein quantity of processor 1303 of memory 1304
Can be one or more, in Figure 13 by taking a processor 1303 as an example).In some embodiments of the present application, input unit
1301st, output device 1302, processor 1303 and memory 1304 can be connected by bus or other means, wherein, in Fig. 4 with
Exemplified by being connected by bus.
Wherein, by the operational order for calling memory 1304 to store, for performing in the application described by Fig. 1 to Fig. 5
Time synchronous method in the step of being performed by transmitting terminal, it is specific that here is omitted.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the application is substantially
The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the application Fig. 1 to Fig. 5 embodiment methods describeds
All or part of step.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (english abbreviation:ROM, English
Literary full name:Read-Only Memory), random access memory (english abbreviation:RAM, English full name:Random Access
Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
Described above, above example is only to illustrate the technical scheme of the application, rather than its limitations;Although with reference to before
Embodiment is stated the application is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of each embodiment technical scheme of the application.
Claims (23)
- A kind of 1. synchronous method of time, it is characterised in that including:Target time zone of the server according to residing for the first presetting method determines targeted wireless device;The target time zone and Unix timestamps are carried out computing by the server, obtain local zone time;The server sends the local zone time to the targeted wireless device, to cause the targeted wireless device to update Initial time in the targeted wireless device is the local zone time.
- 2. according to the method for claim 1, it is characterised in that the server determines wirelessly to set according to the first presetting method Standby residing time zone includes:The server obtains the first message that transmitting terminal is sent, and the first message includes exclusive identification code and time zone, institute State exclusive identification code to be generated according to preset rules by the transmitting terminal, the time zone is the current time zone of the transmitting terminal;The server obtains the second message that the targeted wireless device is sent, and second message includes the unique mark Code and target device identification code, the exclusive identification code is by the packet comprising the exclusive identification code through the Target Wireless Obtained after equipment decoding, the packet is by the omnidirectional transmission of the transmitting terminal and mixed by opening by the targeted wireless device Parasitic mode formula grabs, and the target device identification code is the targeted wireless device uniquely corresponding identification code;The server determines that the time zone is the target time zone according to the exclusive identification code.
- 3. according to the method for claim 2, it is characterised in that obtain the targeted wireless device in the server and send The second message after, the server according to the exclusive identification code determine the time zone be the target time zone before, institute Stating method also includes:The server judges to get the first message and whether the duration of second message interval is default first In duration;If so, then the server execution determines operation of the time zone for the target time zone according to the exclusive identification code.
- 4. according to the method for claim 2, it is characterised in that the server is according to determining the exclusive identification code After time zone is the target time zone, before the target time zone and Unix timestamps are carried out computing by the server, institute Stating method also includes:The server preserves the target time zone and the target device identification code, and identify the target time zone with it is described Target device identification code possesses incidence relation;When the server get wireless device transmission with the wireless device uniquely corresponding equipment mark code when, it is described Server judges whether the equipment mark code is the target device identification code;If the server determines that the equipment mark code is the target device identification code, the server determines the nothing Line equipment is the targeted wireless device, and finds the target time zone according to the incidence relation.
- 5. the method according to any one of claim 2 to 4, it is characterised in that obtain transmitting terminal hair in the server After the first message sent, before the server obtains the second message that the targeted wireless device is sent, methods described is also Including:The server generates record identification;The server sends the record identification to the transmitting terminal, to cause the transmitting terminal in the second preset duration Whether second message has been got according to server described in the record identification to the server periodic queries.
- 6. according to the method for claim 1, it is characterised in that the server according to the first presetting method determine target without Target time zone residing for line equipment includes:The server obtains the location of the targeted wireless device that the targeted wireless device is sent information;Target time zone of the server according to residing for the positional information determines the targeted wireless device.
- A kind of 7. synchronous method of time, it is characterised in that including:The local zone time that server corresponding to targeted wireless device acquisition is sent, the local zone time is as the server by described in Target time zone and Unix timestamps residing for targeted wireless device carry out computing and obtained, and the target time zone is by the server Determined according to the first presetting method;The initial time that the targeted wireless device is updated in the targeted wireless device is the local zone time.
- 8. according to the method for claim 7, it is characterised in that first presetting method includes:The targeted wireless device opens promiscuous mode crawl packet, and the packet is described by the omnidirectional transmission of transmitting terminal Packet includes exclusive identification code, and the exclusive identification code is generated by the transmitting terminal according to preset rules;The targeted wireless device is established according to the second presetting method and the server and communicated to connect;The targeted wireless device to the server send the second message, second message include the exclusive identification code with And target device identification code, to cause the server to determine that the time zone in first message is described according to the exclusive identification code Target time zone, the first message are sent by the transmitting terminal, and the first message includes the exclusive identification code and described Time zone, the time zone are the current time zone of the transmitting terminal, and the target device identification code is that the targeted wireless device is unique Corresponding identification code.
- 9. according to the method for claim 8, it is characterised in that the packet also includes:Distribution WiFi SSID and password corresponding with the SSID;The targeted wireless device establishes communication connection according to the second presetting method with the server to be included:The targeted wireless device accesses the distribution WiFi by the SSID got and the password;The targeted wireless device is established by the distribution WiFi and the server and communicated to connect.
- 10. according to the method for claim 7, it is characterised in that first presetting method includes:The targeted wireless device sends the location of targeted wireless device information to the server, described to cause Server determines the target time zone according to the positional information.
- A kind of 11. synchronous method of time, it is characterised in that including:Transmitting terminal sends first message to corresponding server, with the server is judged get the first message with And second message interval duration whether in the first preset duration, the first message includes exclusive identification code and time zone, Second message includes the exclusive identification code and target device identification code, and second message is sent out by targeted wireless device Send, the exclusive identification code is generated by transmitting terminal according to preset rules, and the time zone is the current time zone of the transmitting terminal, described Target device identification code is the targeted wireless device uniquely corresponding identification code;The omnidirectional transmission packet of transmitting terminal, the packet include the exclusive identification code, with cause the target without Line equipment, which grabs the packet when opening promiscuous mode and sends second to the server according to the packet, to disappear Breath.
- 12. according to the method for claim 11, it is characterised in that send first to corresponding server in the transmitting terminal After message, methods described also includes:The transmitting terminal obtains the record identification that the server is sent;Transmitting terminal service according to the record identification to the server periodic queries in the second preset duration Whether device has got second message.
- A kind of 13. server, it is characterised in that including:First determining unit, for the target time zone residing for determining targeted wireless device according to the first presetting method;Arithmetic element, for the target time zone and Unix timestamps to be carried out into computing, obtain local zone time;Transmitting element, for the local zone time to be sent to the targeted wireless device, to cause the targeted wireless device It is the local zone time to update the initial time in the targeted wireless device.
- 14. server according to claim 13, it is characterised in that first determining unit includes:First acquisition module, for obtain transmitting terminal transmission first message, the first message include exclusive identification code and Time zone, the exclusive identification code are generated by the transmitting terminal according to preset rules, the time zone for the transmitting terminal it is current when Area;Second acquisition module, the second message sent for obtaining the targeted wireless device, second message includes described Exclusive identification code and target device identification code, the exclusive identification code is as described in the packet warp comprising the exclusive identification code Obtained after targeted wireless device decoding, the packet is led to by the omnidirectional transmission of the transmitting terminal and by the targeted wireless device Cross unlatching promiscuous mode to grab, the target device identification code is the targeted wireless device uniquely corresponding identification code;Determining module, it is additionally operable to determine that the time zone is the target time zone according to the exclusive identification code.
- 15. server according to claim 14, it is characterised in thatSecond acquisition module, it is additionally operable to judge that getting the first message and the duration of second message interval is It is no in the first preset duration;Second acquisition module, it is additionally operable to when second module determines the duration at the interval in first preset duration When interior, then trigger the determining module and perform corresponding operating.
- 16. server according to claim 14, it is characterised in that the server also includes:Storage unit, for preserving the target time zone and the target device identification code, and identify the target time zone with The target device identification code possesses incidence relation;Judging unit, for when the server get wireless device transmission with the unique corresponding equipment of the wireless device During identification code, judge whether the equipment mark code is the target device identification code;Second determining unit, for when it is the target device identification code that the judging unit, which determines the equipment mark code, It is the targeted wireless device to determine the wireless device, and finds the target time zone according to the incidence relation.
- 17. the server according to any one of claim 14 to 16, it is characterised in thatFirst acquisition module, it is additionally operable to record of production mark;First acquisition module, it is additionally operable to send the record identification to the transmitting terminal, to cause the transmitting terminal to exist Whether the server according to the record identification to the server periodic queries has got institute in second preset duration State the second message.
- 18. server according to claim 13, it is characterised in thatFirst determining unit, it is additionally operable to obtain the position residing for the targeted wireless device that the targeted wireless device is sent Confidence ceases;First determining unit, during the target being additionally operable to according to residing for the positional information determines the targeted wireless device Area.
- A kind of 19. wireless device, it is characterised in that the wireless device as targeted wireless device, including:Acquiring unit, the local zone time sent for server corresponding to obtaining, the local zone time is by the server by institute State the target time zone residing for targeted wireless device and Unix timestamps carry out computing and obtained, the target time zone is by the service Device determines according to the first presetting method;Updating block, it is the local zone time for updating the initial time in the targeted wireless device.
- 20. wireless device according to claim 19, it is characterised in that the wireless device includes:Placement unit, for opening promiscuous mode crawl packet, the packet is by the omnidirectional transmission of transmitting terminal, the data Include exclusive identification code, the exclusive identification code is generated by the transmitting terminal according to preset rules;Connection unit is established, communication link is established according to the second presetting method and the server for the targeted wireless device Connect;First transmitting element, for sending the second message to the server, second message includes the exclusive identification code And target device identification code, to cause the server to determine time zone in first message as institute according to the exclusive identification code Target time zone is stated, the first message is sent by the transmitting terminal, and the first message includes the exclusive identification code and institute State time zone, the time zone is the current time zone of the transmitting terminal, the target device identification code be the targeted wireless device only Identification code corresponding to one.
- 21. wireless device according to claim 19, it is characterised in that the wireless device includes:Second transmitting element, for sending the location of targeted wireless device information to the server, to cause State server and the target time zone is determined according to the positional information.
- A kind of 22. transmitting terminal, it is characterised in that including:First transmitting element, for sending first message to corresponding server, to cause the server to judge to get institute The duration of first message and the second message interval is stated whether in the first preset duration, the first message includes unique mark Code and time zone, second message include the exclusive identification code and target device identification code, and second message is by mesh Mark wireless device to send, the exclusive identification code is generated by transmitting terminal according to preset rules, and the time zone is the transmitting terminal Current time zone, the target device identification code are the targeted wireless device uniquely corresponding identification code;Second transmitting element, for omnidirectional transmission packet, the packet includes the exclusive identification code, described to cause Targeted wireless device grabs the packet when opening promiscuous mode and sent according to the packet to the server Second message.
- 23. transmitting terminal according to claim 22, it is characterised in that the transmitting terminal also includes:Acquiring unit, the record identification sent for obtaining the server;Query unit, for being taken in the second preset duration according to the record identification to the server periodic queries Whether business device has got second message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710941380.2A CN107749789B (en) | 2017-10-10 | 2017-10-10 | Time synchronization method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710941380.2A CN107749789B (en) | 2017-10-10 | 2017-10-10 | Time synchronization method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107749789A true CN107749789A (en) | 2018-03-02 |
CN107749789B CN107749789B (en) | 2019-05-17 |
Family
ID=61256054
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710941380.2A Active CN107749789B (en) | 2017-10-10 | 2017-10-10 | Time synchronization method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107749789B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519002A (en) * | 2019-09-27 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of method for synchronizing time and relevant apparatus |
WO2019242131A1 (en) * | 2018-06-19 | 2019-12-26 | 佛山市顺德区美的电热电器制造有限公司 | Clock synchronization method and device, and computer storage medium |
CN113543300A (en) * | 2021-06-18 | 2021-10-22 | 宇龙计算机通信科技(深圳)有限公司 | Time zone synchronization method, time zone server, time zone synchronization system, electronic device, and storage medium |
CN114093489A (en) * | 2021-09-29 | 2022-02-25 | 北京华益精点生物技术有限公司 | Method for confirming blood glucose detection time of non-intelligent blood glucose meter and related equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005069521A1 (en) * | 2004-01-09 | 2005-07-28 | Thomson Licensing | Time synchronizing device and process and associated products |
CN101364892A (en) * | 2007-08-08 | 2009-02-11 | 中兴通讯股份有限公司 | Time conversion method based on network element of different time zones |
CN103580768A (en) * | 2012-08-09 | 2014-02-12 | 华为终端有限公司 | Time synchronizing method and device |
CN104426644A (en) * | 2013-08-21 | 2015-03-18 | 华为技术有限公司 | Equipment time synchronization method and device |
-
2017
- 2017-10-10 CN CN201710941380.2A patent/CN107749789B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005069521A1 (en) * | 2004-01-09 | 2005-07-28 | Thomson Licensing | Time synchronizing device and process and associated products |
CN101364892A (en) * | 2007-08-08 | 2009-02-11 | 中兴通讯股份有限公司 | Time conversion method based on network element of different time zones |
CN103580768A (en) * | 2012-08-09 | 2014-02-12 | 华为终端有限公司 | Time synchronizing method and device |
CN104426644A (en) * | 2013-08-21 | 2015-03-18 | 华为技术有限公司 | Equipment time synchronization method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019242131A1 (en) * | 2018-06-19 | 2019-12-26 | 佛山市顺德区美的电热电器制造有限公司 | Clock synchronization method and device, and computer storage medium |
CN110519002A (en) * | 2019-09-27 | 2019-11-29 | 苏州浪潮智能科技有限公司 | A kind of method for synchronizing time and relevant apparatus |
CN113543300A (en) * | 2021-06-18 | 2021-10-22 | 宇龙计算机通信科技(深圳)有限公司 | Time zone synchronization method, time zone server, time zone synchronization system, electronic device, and storage medium |
CN114093489A (en) * | 2021-09-29 | 2022-02-25 | 北京华益精点生物技术有限公司 | Method for confirming blood glucose detection time of non-intelligent blood glucose meter and related equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107749789B (en) | 2019-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107749789A (en) | Time synchronization method and related device | |
CN104716993B (en) | It is used for method, equipment and the computer program product of service discovery in junction service environment | |
CN107308644B (en) | The acquisition methods and device of configuration information | |
CN109479073A (en) | The adjustment of IOT solution size | |
FI125484B (en) | Method and technical apparatus for short - distance communication | |
CN108092861A (en) | Realize collocation method, the equipment linkage control method and device of equipment linkage | |
CN102223609B (en) | System for triggering information sending through actions | |
US10772057B1 (en) | Systems and methods for wireless device synchronization | |
CN107508702A (en) | Lora modules based on bluetooth are set and firmware upgrade system and method | |
CN103957580A (en) | Rapid WIFI networking matching method and module for smart hardware | |
CN105246029A (en) | Bluetooth communication method and system and electronic device | |
CN106557333A (en) | information collecting method and device | |
CN107770786A (en) | A kind of method of testing of network performance, equipment and system | |
CN112030465A (en) | Method and device for cleaning first object, storage medium and electronic device | |
CN108108173A (en) | A kind of information processing method and device | |
Tyagi et al. | Architecture of an IoT-based women safety system | |
CN106413130B (en) | A kind of Bluetooth connecting method and device | |
CN107231275A (en) | The method of configuration is connected with home equipment for user equipment | |
CN109218142A (en) | One kind being based on OneM2M agreement platform of internet of things terminal access method and device | |
CN110050473A (en) | The synchronous system and method for wireless device | |
CN108616853A (en) | The operating method of Bluetooth pairing system and Bluetooth pairing system | |
CN109089325A (en) | A kind of method and system of wearable device data transmission | |
CN101197741B (en) | Correlation method among nodes in individual field network, device and method for acquiring correlation mode | |
CN108650217A (en) | Synchronous method, device, storage medium and the electronic device of action state | |
CN109271454A (en) | A kind of method and the network equipment that data are synchronous |
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 |