CN110099439A - Method for synchronizing time and device - Google Patents

Method for synchronizing time and device Download PDF

Info

Publication number
CN110099439A
CN110099439A CN201910305845.4A CN201910305845A CN110099439A CN 110099439 A CN110099439 A CN 110099439A CN 201910305845 A CN201910305845 A CN 201910305845A CN 110099439 A CN110099439 A CN 110099439A
Authority
CN
China
Prior art keywords
time
network
sub
benchmark
target
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
Application number
CN201910305845.4A
Other languages
Chinese (zh)
Other versions
CN110099439B (en
Inventor
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910305845.4A priority Critical patent/CN110099439B/en
Publication of CN110099439A publication Critical patent/CN110099439A/en
Application granted granted Critical
Publication of CN110099439B publication Critical patent/CN110099439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others

Abstract

The application provides a kind of method for synchronizing time and device, is related to field of communication technology.The described method includes: sending first time synchronic command to each benchmark AP, first time synchronic command is used to indicate each member AP that benchmark AP includes to place sub-network and sends the instruction of the second time synchronization;Receive sending time stamp and the first receiving time stamp that each member AP in each sub-network returns to the instruction of the second time synchronization;According to the network home relationship of edge AP, sending time stamp and the first receiving time stamp, the time adjustment information of first kind AP is determined, first kind AP is the AP of time to be adjusted;According to time adjustment information, the instruction of third time synchronization is sent to first kind AP, instruction first kind AP executes time synchronization operation.In this method, under the premise of not increasing equipment overall cost, the time synchronization of fairly large network-wide basis is realized, solves the problems, such as that complexity is high and at high cost in existing method.

Description

Method for synchronizing time and device
Technical field
This application involves field of communication technology more particularly to a kind of method for synchronizing time and device.
Background technique
Precise synchronization between multiple equipment is of great significance, for example, in mobile communication field, different base station Between in order to keep the consistent of communication time slot, generally require to carry out precise synchronization operation.For another example, in wireless positioning field In, if multiple and different equipment retention times are synchronous, it may proceed to up to time difference (English: Time Difference Of Arrival, referred to as: TDOA) positioning.For another example, in MultiMedia Field, in order to restore the letter of different sound channels under original scene Accurate time synchronization is needed between breath, different loudspeakers.
In recent years, WLAN (English: Wireless Local Area Networks, abbreviation: WLAN) technology hair Rapidly, WLAN terminal and wireless access point (English: Access Point, abbreviation: AP) are quickly universal for exhibition;Therefore, it is based on WLAN The time synchronization of network implementations equipment room becomes more convenient.In order to meet the synchronous need of high-precision clock in WLAN It asks, proposes timestamp function, is i.e. wlan device can accurately record the time for receiving message.However, for slightly larger scale Wlan network, due to the limitation of wireless signal coverage area so that can not be by other in some AP and WLAN All AP direct communications, therefore for slightly large-scale network, it can not accomplish the AP of different location while carry out time synchronization.It is right This, proposes the time synchronization based on picture transfer protocol (English: Picture Transfer Protocol, abbreviation: PTP) Method, but its complexity and cost are higher, need to increase special physical layer clocks chip, therefore it is extensive to limit it Use.
Summary of the invention
In view of this, this application provides a kind of method for synchronizing time and devices, it is intended at least be solved in the first degree One of technical problem in above-mentioned technical problem.
To achieve the above object, the application first aspect provides a kind of method for synchronizing time, is applied to server, the clothes It is multiple sub-networks that business device, which divides WLAN, and each sub-network includes a benchmark AP and multiple member AP, different sons It is kept in communication connection between network by edge AP, which comprises
First time synchronic command is sent to each benchmark AP, the first time synchronic command is used to indicate the benchmark Each member AP that AP includes to place sub-network sends the instruction of the second time synchronization;
The temporal information that each member AP is returned in each sub-network is received, the temporal information includes second time The sending time stamp and the first receiving time stamp of synchronic command;
According to the network home relationship of the edge AP, sending time stamp and first receiving time stamp, determine The time adjustment information of first kind AP, the first kind AP are the AP of time to be adjusted;
According to the time adjustment information, Xiang Suoshu first kind AP sends the instruction of third time synchronization, the third time Synchronic command is used to indicate the first kind AP and executes time synchronization operation.
To achieve the above object, the application second aspect provides a kind of method for synchronizing time, is applied to access point AP, service It is multiple sub-networks that device, which divides WLAN, and each sub-network includes a benchmark AP and multiple member AP, different subnets It is kept in communication connection between network by edge AP, which comprises
When described access point AP is benchmark AP, the first time synchronic command that server is sent is received;
According to the first time synchronic command, each member AP for including to place sub-network sends the second time synchronization Instruction, the second time synchronization instruction are used to indicate the member AP and refer to server transmission second time synchronization The sending time stamp and the first receiving time stamp of order, so that the server is closed according to the corresponding network home of the edge AP System, sending time stamp and first receiving time stamp, determine the time adjustment information of first kind AP, the first kind AP For the AP of time to be adjusted.
To achieve the above object, the application third aspect provides a kind of time synchronism apparatus, is applied to server, the dress It sets and includes:
First transmission unit, for sending first time synchronic command to each benchmark AP, the first time, which synchronizes, to be referred to It enables and is used to indicate each member AP transmission the second time synchronization instruction that the benchmark AP includes to place sub-network;
Receiving unit, for receiving the temporal information that each member AP is returned in each sub-network, the temporal information packet Include the sending time stamp and the first receiving time stamp of the second time synchronization instruction;
Determination unit, for being connect according to the corresponding network home relationship of edge AP, sending time stamp and described first Timestamp is received, determines the time adjustment information of first kind AP, the first kind AP is the AP of time to be adjusted;
Second transmission unit, for according to the time adjustment information, Xiang Suoshu first kind AP to send third time synchronization Instruction, the third time synchronization instruction are used to indicate the first kind AP and execute time synchronization operation.
To achieve the above object, the application fourth aspect provides a kind of time synchronism apparatus, is applied to access point AP, described Device includes:
Receiving unit, the first time for being used to receive server transmission when described access point AP is benchmark AP, which synchronizes, to be referred to It enables;
Transmission unit, each member AP hair for including to place sub-network according to the first time synchronic command The second time synchronization is sent to instruct, the second time synchronization instruction is used to indicate the member AP to described in server transmission The sending time stamp and the first receiving time stamp of second time synchronization instruction, so that the server is corresponding according to the edge AP Network home relationship, the sending time stamp and first receiving time stamp, determine the time adjustment information of first kind AP, The first kind AP is the AP of time to be adjusted.
In the technical solution of the application, by the way that fairly large WLAN is divided into multiple sub-networks, and it is different Sub-network kept in communication connection by edge AP, to only be sent to the reference Access Points AP of each sub-network same at the first time Step instruction, can be obtained the temporal information that each member AP is returned in WLAN, so as to according to the temporal information, and The attaching relation of edge AP is realized same to the AP progress time of each time to be adjusted simultaneously in fairly large WLAN Step operation;In which, the device hardware resource of existing WLAN is relied on, the time for realizing network-wide basis is same Step solves the problems, such as that existing method for synchronizing time complexity is high and at high cost.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the application Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Attached drawing 1 is a kind of structural schematic diagram for clock synchronization system that some embodiments of the application provide;
Attached drawing 2 is the structural schematic diagram that the division WLAN that some embodiments of the application provide is multiple sub-networks;
Attached drawing 3 is a kind of process for method for synchronizing time applied to server that some embodiments of the application provide;
Attached drawing 4 is the refinement figure for the step 103 that some embodiments of the application provide;
Attached drawing 5 is a kind of process for method for synchronizing time applied to access point AP that some embodiments of the application provide;
Attached drawing 6 is a kind of structural representation for time synchronism apparatus applied to server that some embodiments of the application provide Figure;
Attached drawing 7 is that a kind of structure for time synchronism apparatus applied to access point AP that some embodiments of the application provide is shown It is intended to.
Specific embodiment
The illustrative embodiments of the application are more fully described below with reference to accompanying drawings.Although showing this Shen in attached drawing Illustrative embodiments please, it being understood, however, that may be realized in various forms the application without the reality that should be illustrated here The mode of applying is limited.It is to be able to thoroughly understand the application on the contrary, providing these embodiments, and can be by this Shen Range please is fully disclosed to those skilled in the art.
In addition, in term used in this application, merely for the sake of for the purpose of describing particular embodiments, rather than this Shen is limited Please.The "an" of singular used in the application and claims, " described " and "the" are also intended to including most shapes Formula, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to comprising one A or multiple associated any or all possible combinations for listing project.It will be appreciated that though may be used in the application Term first, second, third, etc. describes various information, but these information should not necessarily be limited by these terms.These terms are only used to Same type of information is distinguished from each other out.For example, the first information can also be claimed in the case where not departing from the application range For the second information, similarly, the second information can also be referred to as the first information.Depending on context, in addition, used word " if " can be construed to " ... when ", alternatively, " when ... when ", alternatively, " in response to determination ".
Attached drawing 1 is a kind of structural schematic diagram of clock synchronization system provided by the embodiments of the present application, as shown in Figure 1, the time Synchronization system includes: multiple access point AP in server and WLAN;It is multiple sons that server, which divides WLAN, Network, each sub-network include a benchmark AP and multiple member AP, are kept in communication between different sub-networks by edge AP Connection, and operated based on the time synchronization that the WLAN after the division carries out the whole network.Thereby, it is possible to using edge AP as not With the medium for carrying out time synchronization between sub-network, the limitation because of wireless signal coverage area is avoided, so that slightly large-scale The AP of different location can not carry out the problem of time synchronization simultaneously in network.
Specifically, server is first directed to the topology information of each AP in WLAN, topology information includes position Information, identification information etc., and according to the location information of importing and preset metric, it is multiple pre- for dividing WLAN If the sub-network of shape, and determine the side between each sub-network benchmark AP for including and member AP and different sub-networks Edge AP.Wherein, location information is, for example, coordinate, and identification information is, for example, MAC Address, device identification etc.;Preset metric Can in practical applications with preset shape, sets itself as needed;As an example, preset metric is half path length Degree, preset shape are circle, then select some position for the center of circle, are justified according to preset radius length work, are obtained multiple circular Sub-network;As another example, preset metric is length and width, and preset shape is rectangle, then respectively with default Length and width make rectangle, obtain the sub-network of multiple rectangles.In the embodiment of the present application, using preset metric as radius Length, preset shape be it is round for be illustrated, divide the schematic diagram that WLAN is multiple sub-networks as shown in Fig. 2, To be numbered to sub-network, obtaining sub-network 1, sub-network 2, sub-network 3, sub-network 4, sub-network 5 convenient for distinguishing.
Further, the side between each sub-network benchmark AP for including and member AP and different sub-networks is determined Edge AP include: using and meanwhile belong to edge AP of the AP as the different sub-network network of different sub-network network, successively in each sub-network The middle AP selected in addition to edge AP is as current AP;According to the location information of importing, current AP and the place current AP are calculated The total distance between other AP that sub-network includes obtains the corresponding total distance of each AP in sub-network in addition to edge AP;Than To the corresponding total distance of each AP in sub-network in addition to edge AP, smallest overall distance is obtained;By the corresponding AP of smallest overall distance As the benchmark AP of place sub-network, and using other AP in the sub-network as the member AP of the sub-network;That is, member's AP packet Edge AP is included, edge AP does not include benchmark AP.
For convenient for distinguishing, the APn that the AP in WLAN is denoted as AP1, AP2, AP3 ..., wherein n is in WLAN The sum of AP, for example, in schematic diagram shown in Fig. 2, AP13 be the benchmark AP, AP10, AP12 of sub-network 1, AP13, AP14, AP15 is the member AP of sub-network 1, and wherein AP14 is sub-network 1 and edge AP, AP14 and the AP15 of sub-network 4 are sub-network 1 It is the edge AP of sub-network 1 and sub-network 2 with the edge AP of sub-network 3, AP15.
Based on the WLAN after above system and division, it is same that the time provided by the present application is provided with reference to the accompanying drawing The embodiment of one step process.
Attached drawing 3 is a kind of flow diagram for method for synchronizing time that some embodiments of the application provide, and is applied to service Device, method for synchronizing time the following steps are included:
Step 101: sending first time synchronic command to each benchmark AP, wherein first time synchronic command is used to indicate Each member AP that benchmark AP includes to place sub-network sends the instruction of the second time synchronization;
Wherein, the identification information for each member AP that sub-network where first time synchronic command includes benchmark AP includes; Correspondingly, when benchmark AP receives first time synchronic command, according to the identification information contained in first time synchronic command, It sends the second time synchronization and instructs member AP corresponding to each identification information.
Further, it is same to send for the second time for identification information and benchmark AP of the second time synchronization instruction including benchmark AP The sending time stamp of step instruction;It is noted that sending time stamp measures for the wireless chip in benchmark AP, join without software With, thus ensured sending time stamp high accuracy, and then ensure it is subsequent carry out time synchronization high-precision.
Further, it when member AP receives the instruction of the second time synchronization, reads in the instruction of the second time synchronization and contains Sending time stamp, and by the sending time stamp received with itself the second time synchronization instruction the first receiving time stamp work For temporal information, the temporal information is sent to server.It is noted that the first receiving time stamp is in member AP without core Piece measures, and participates in without software, has thus ensured the high accuracy of the first receiving time stamp, and then ensures the subsequent progress time Synchronous high-precision.
Step 102: receiving the temporal information that each member AP is returned in each sub-network, wherein temporal information includes second The sending time stamp and the first receiving time stamp of time synchronization instruction;
Specifically, receiving the identification information of temporal information and member AP that each member AP is returned, believed according to the mark It ceases and determines member AP belonging to temporal information, and determine time adjustment letter in the subsequent temporal information returned according to each member AP Breath.
Step 103: being stabbed according to the network home relationship of edge AP, received sending time stamp and the first receiving time, really Determine the time adjustment information of first kind AP, wherein first kind AP is the AP of time to be adjusted;
Step 104: according to determining time adjustment information, the instruction of third time synchronization is sent to first kind AP, wherein the The instruction of three time synchronizations is used to indicate first kind AP and executes time synchronization operation.
As a result, by the way that fairly large WLAN is divided into multiple sub-networks, and different sub-networks passes through side Edge AP keeps in communication connection, to only send first time synchronic command to the benchmark AP of each sub-network, can be obtained wireless The temporal information that each member AP is returned in local area network, so as to according to the temporal information and the network home of edge AP pass System realizes in fairly large WLAN and carries out time synchronization operation to the AP of each time to be adjusted simultaneously;Which In, the device hardware resource of existing WLAN is relied on, the time synchronization of network-wide basis is realized, is solved existing Method for synchronizing time complexity height and problem at high cost.
Optionally, in some embodiments of the present application, as shown in figure 4, step 103 includes:
Step 103-1: according to the location information of importing, the propagation delay time in each sub-network is calculated;
Specifically, according to the location information imported, the benchmark AP of sub-network where calculating each member AP and member AP The distance between;According to the distance of calculating and the default light velocity, obtain between each member AP and the benchmark AP of place sub-network Propagation delay time;Wherein, propagation delay time=distance/default light velocity.
Step 103-2: the selection target AP from multiple benchmark AP of WLAN;
Specifically, in multiple benchmark AP that WLAN includes, a benchmark AP is randomly choosed as target AP, from And using the time of target AP as the fiducial time of WLAN, and determine the AP phase of time to be adjusted in WLAN For the time adjustment information of the fiducial time.
Step 103-3: according to the network home relationship of edge AP, the benchmark AP of each sub-network of edge AP ownership is determined Target communication path between target AP;
Optionally, in some embodiments of the present application, step 103-3 includes:
Step A1: using the benchmark AP of the edge AP one of sub-network belonged to as current base AP;
Step A2: using current base AP as starting point, using target AP as terminal, search current base AP and target AP it Between all communication paths;
Step A3: the first communication path being made of benchmark AP and target AP is screened in all communication paths of lookup;
Step A4: the quantity of the first communication path of statistics;
Step A5: according to the quantity for the AP that the quantity of the first communication path and each first communication path include, determination is worked as Target communication path between preceding benchmark AP and target AP.
Wherein, all communication paths between current base AP and target AP include by current base AP, other benchmark AP, Member AP and target AP composition communication path, be made of current base AP, member AP and target AP communication path, by current The communication path of benchmark AP, other benchmark AP and target AP composition;Filtered out in all communication paths only by benchmark AP and The communication path of target AP composition, and as the first communication path.It, may since the quantity of the first communication path may be one To be multiple, for the calculation amount for reducing subsequent determining time synchronization information, connected according to the quantity of the first communication path and each first The quantity for the AP that path includes, the selection target communication path in the first communication path.
Optionally, in some embodiments of the present application, step A5 includes:
Judge whether the quantity of the first communication path is unique, if the quantity of the first communication path is unique, by the first connection Path is as the target communication path between current base AP and target AP;If the quantity of the first communication path is not unique, really The quantity for the AP that fixed each first communication path includes, selects the minimum number for the AP for including from multiple first communication paths First communication path is as the target communication path between current base AP and target AP.
Wherein, including AP minimum number the first communication path be between current base AP and target AP it is shortest It is same to can reduce the subsequent determining time as the target communication path between current base AP and target AP for communication path Walk the calculation amount of information, raising efficiency.Further, when the first communication path of the minimum number for the AP for including has multiple, First communication path is then randomly choosed in the first communication path of the minimum number of multiple AP for including as target Communication path.
Step 103-4: the sending time stamp returned according to determining propagation delay time, edge AP and the first receiving time are stabbed, Determine first time difference between AP adjacent two-by-two in target communication path;
Optionally, in some embodiments of the present application, step 103-4 includes:
Step B1: the benchmark of the first receiving time stamp, each member AP and place sub-network that each member AP is returned Propagation delay time between AP is subtracted each other, and the second receiving time stamp of each member AP is obtained;
In view of for same subnet network, due to the benchmark of each member AP and the sub-network that the sub-network includes The distance between AP is often differed, and the propagation delay time apart from remote member AP can be bigger than normal;Caused by avoiding because of propagation delay time Time error in the present embodiment, is modified the first time stamp that member AP is returned using propagation delay time, i.e., by each member The first receiving time stamp that AP is returned subtracts the propagation delay time between each member AP and the benchmark AP of place sub-network, is repaired The second receiving time stamp after just, and time adjustment information is determined in subsequent stab according to the second receiving time, it is ensured that time tune The accuracy of whole information.
Step B2: respectively using AP adjacent two-by-two in target communication path as the first AP and the 2nd AP, will belong to simultaneously The edge AP of sub-network and the place the 2nd AP sub-network where the first AP, as current edge AP;
Step B3: by current edge AP the first AP in a sub-network the second receiving time stamp with sending time stamp phase Subtract, obtains second time difference between current edge AP and the first AP;
Step B4: by current edge AP the 2nd AP in a sub-network the second receiving time stamp with sending time stamp phase Subtract, obtains the third time difference between current edge AP and the 2nd AP;
Wherein the execution sequence of step B3 and step B4 can be interchanged, and may also be performed simultaneously.
Step B5: the first average value, the second average value of the third time difference of second time difference are calculated;
Step B6: the first average value and the second average value are subtracted each other, and obtain first time difference between the first AP and the 2nd AP.
Sub-network as where current edge AP belongs to the first AP, and the sub-network where the 2nd AP is belonged to, Therefore current edge AP can receive the second time synchronization instruction of the first AP transmission, additionally it is possible to receive the 2nd AP transmission Time synchronization instruction, and corresponding two temporal informations are sent to server.Returned according to current edge AP two of server Temporal information calculates separately between second time difference, current edge AP and the 2nd AP between current edge AP and the first AP Three time differences, and the first average value of second time difference and the second average value of the third time difference are subtracted each other, obtain the first AP and the 2nd AP Between first time difference;It is noted that first time difference can be zero, positive number, any one in negative, it is when first time difference When zero, indicate that the first AP is identical as the time of the 2nd AP;When first time difference was positive number, indicate the time of the first AP than the 2nd AP Fastly;When first time difference was negative, indicate that the time of the first AP is slower than the 2nd AP.
Further, it is illustrated so that the identification information of each AP is MAC Address as an example, by current edge AP and the first AP Between second time difference be denoted as Tdiff_net1_mac1、Tdiff_net1_mac2…Tdiff_net1_macm, by current edge AP The third time difference between the 2nd AP is denoted as Tdiff_net2_mac1、Tdiff_net2_mac2…Tdiff_net2_macm, wherein M is the quantity of current edge AP;First average value and the second average value can be expressed as form:
First average value indicates are as follows:
F1=(Tdiff_net1_mac1+Tdiff_net1_mac2+…+Tdiff_net1_macm)/m;
Second average value indicates are as follows:
F2=(Tdiff_net2_mac1+Tdiff_net2_mac2+…+Tdiff_net2_macm)/m。
Step 103-5: the sending time stamp returned according to first time difference, each member AP and the first receiving time are stabbed, really Determine time adjustment information of the first kind AP relative to target AP.
Optionally, in some embodiments of the present application, step 103-5 includes:
Step C1: the 4th time difference for each member AP that sub-network where obtaining target AP includes, the 4th will to be not zero Time adjustment information of the time difference as member AP relative to target AP, wherein the second receiving time that the 4th time difference was member AP is stabbed With the difference of sending time stamp;
In some embodiments of the present application, the 4th time difference for each member AP that sub-network where obtaining target AP includes Include: all member AP the second receiving time stamp and sending time stamp in, search target AP where sub-network include at The the second receiving time stamp and sending time stamp of member AP, and the second receiving time of the member AP of lookup stamp is stabbed with sending time Subtract each other, obtained for the 4th time difference.
In other embodiments of the application, when obtaining the 4th of each member AP that the place target AP sub-network includes Difference includes: to subtract each other the second receiving time stamp of each member AP with sending time stamp, obtains each member AP relative to place The 8th time difference between the benchmark AP of sub-network, each member AP that sub-network where screening target AP in the 8th time difference includes The 8th time difference, and using the 8th time difference of screening as the 4th time difference.
It should be pointed out that step C1 can also be executed after C6.
Step C2: accumulation process is carried out to first time difference between AP adjacent two-by-two in target communication path, obtains the Five time differences;
Wherein, the 5th time difference was the time difference of the benchmark AP relative to target AP in target communication path as starting point.
Step C3: it when being not zero the 5th time difference, obtains in target communication path as subnet where the benchmark AP of starting point The 6th time difference for each member AP that network includes, wherein the second receiving time stamp that the 6th time difference was member AP is stabbed with sending time Difference;
Specifically, when being not zero the 5th time difference, determine in target communication path as the benchmark AP of starting point relative to There are the time differences by target AP, then calculate each member AP for including as sub-network where the benchmark AP of starting point in target communication path Relative to the 6th time difference of the benchmark AP as starting point, to calculate member AP phase according to the 6th time difference and the 5th time difference For the time difference between target AP, i.e. time adjustment information of the member AP relative to target AP.
Further, the acquisition modes of the 6th time difference, reference can be made to the acquisition modes of aforementioned 4th time difference, no longer superfluous herein It states.
Step C4: carrying out for the 6th time difference to be added processing with the 5th time difference, obtained for the 7th time difference, and using the 7th time difference as Time adjustment information of the member AP relative to target AP;
Specifically, each member AP for including by the place the benchmark AP sub-network in target communication path as starting point is opposite The 5th time difference phase between the 6th time difference of the benchmark AP as starting point, with the benchmark AP and target AP as starting point Add, time adjustment letter of each member AP that sub-network where obtaining the benchmark AP as starting point includes relative to target AP Breath.
Step C5: the time using the 5th time difference as the benchmark AP in target communication path as starting point relative to target AP Adjustment information;
Step C6: it when the 5th time difference was zero, obtains in target communication path as sub-network where the benchmark AP of starting point Including each member AP the 6th time difference, using the 6th time difference being not zero as member AP relative to target AP time adjust Information.
Specifically, determining the benchmark AP in target communication path as starting point relative to mesh when the 5th time difference was zero It marks AP and the time difference is not present, then the 6th time difference for each member AP that sub-network where obtaining the benchmark AP as starting point includes, When the 6th time difference was zero, determining corresponding member AP, there is no the time differences relative to target AP, will when being not zero the 6th time difference Time adjustment information of 6th time difference as member AP relative to target AP.Wherein, the acquisition modes of the 6th time difference, reference can be made to before The acquisition modes of the 4th time difference are stated, details are not described herein.
It should be pointed out that due to edge AP simultaneously belong to multiple sub-networks, for the time to be adjusted edge AP only A time synchronization information is calculated, for example, AP27 shown in Fig. 2 is target AP, AP15 is sub-network 1 and sub-network 2 Edge AP calculates AP15 relative to AP27's in the 6th time difference according to the 5th time difference and AP15 between AP13 and AP17 After time adjustment information, then without the 6th time difference again according to the 5th time difference and AP15 between AP16 and AP27, calculate Time adjustment information of the AP15 relative to AP27.Thereby, it is possible to avoid it is excessive compute repeatedly, promoted computational efficiency.
Based on aforementioned any embodiment, in some embodiments of the present application, before step 101 further include: to each AP It sends a notification message, notification message includes type information, and type information is for making each AP determine identity attribute.
Specifically, being sent to each benchmark AP logical after server determines the benchmark AP and member AP of each sub-network Know message, which includes the type information that AP is benchmark AP, it sends a notification message to each member AP, the notification message Including AP be member AP type information so that benchmark AP according to type information determine itself identity attribute be benchmark AP, and When receiving the first time synchronic command of server transmission, when each member AP for including to place sub-network sends second Between synchronic command;So that member AP is determined the identity attribute member AP of itself according to type information, and receives benchmark AP hair When the second time synchronization instruction sent, the sending time stamp and the first receiving time that the second time synchronization instructs are sent to server Stamp.
Optionally, in some embodiments of the present application, before step 101 further include:
The identification information of the benchmark AP of sub-network where sending member AP to each member AP, so that member AP will be received To the instruction of identification information and the second time synchronization in identification information compare, determine the benchmark for sending the instruction of the second time synchronization AP。
Specifically, after server determines the benchmark AP and member AP of each sub-network, server is to each member The identification information of the benchmark AP of sub-network where AP sends member AP, member AP saves the identification information received, and is receiving To when the instruction of the second time synchronization, the identification information contained and the identification information of preservation in the instruction of the second time synchronization are compared, To verify benchmark AP of the second time synchronization received the instruction from sub-network where itself.
As a result, in the technical solution of the application, by the way that fairly large WLAN is divided into multiple sub-networks, and It is kept in communication connection between different sub-networks by edge AP, to only be sent at the first time to the benchmark AP of each sub-network Synchronic command can be obtained the temporal information that each member AP is returned in WLAN, so as to according to the temporal information, with And the attaching relation of edge AP, it realizes in fairly large WLAN and is simultaneously carried out to the AP of each time to be adjusted the time Simultaneously operating;In which, the device hardware resource of existing WLAN is relied on, the time for realizing network-wide basis is same Step solves the problems, such as that existing method for synchronizing time complexity is high and at high cost.
Attached drawing 5 is a kind of flow diagram for method for synchronizing time that some embodiments of the application provide, and is applied to access Point AP, as shown in figure 5, method for synchronizing time includes:
Step 201: when access point AP is benchmark AP, receiving the first time synchronic command that server is sent;
Step 202: according to first time synchronic command, each member AP for including to place sub-network sent for the second time Synchronic command, the instruction of the second time synchronization are used to indicate member AP and send the sending time that the second time synchronization instructs to server Stamp and the first receiving time stamp, so that server connects according to the corresponding network home relationship of edge AP, sending time stamp and first Timestamp is received, determines the time adjustment information of first kind AP, wherein first kind AP is the AP of time to be adjusted.
Wherein, the identification information for each member AP that sub-network where first time synchronic command carries benchmark AP includes, Benchmark AP sends the instruction of the second time synchronization to the corresponding member AP of the identification information;Benchmark is carried in the instruction of second time synchronization AP sends the sending time stamp of the second time synchronization instruction, so that member AP is same to server transmission member AP the second time of reception The the first receiving time stamp and benchmark AP of step instruction send the sending time stamp of the second time synchronization instruction.
Optionally, this method further include:
Step 301: when access point AP is member AP, receiving the second time that the benchmark AP in same subnet network is sent Synchronic command;
Step 302: being instructed according to the second time synchronization, obtain the sending time stamp for sending the instruction of the second time synchronization and connect Receive the first receiving time stamp of the second time synchronization instruction;
Specifically, parsing the second time synchronization instruction, obtains the sending time stamp that the instruction of the second time synchronization carries, and read It is derived from the first receiving time stamp that body wireless chip measures.
Step 303: the sending time stamp and the first receiving time stamp obtained is sent to server, so that server is according to side The corresponding network home relationship of edge AP, sending time stamp and the first receiving time stamp, determine the time adjustment information of first kind AP, Wherein, first kind AP is the AP of time to be adjusted.
Specifically, sending the sending time stamp obtained and the first receiving time stamp and the mark letter of itself to server Breath, so that server determines member AP belonging to sending time stamp and the first receiving time stamp.
Optionally, in some embodiments of the present application, before step 301 further include: receive server send at Member AP is in the identification information of the benchmark AP of same subnet network, saves identification information;
Correspondingly, before step 302 further include: believe the mark in the identification information of preservation and the instruction of the second time synchronization Breath compares, and determines the benchmark AP for sending the instruction of the second time synchronization.
Specifically, judge whether the identification information saved and the identification information in the instruction of the second time synchronization are identical, and Judging result is when being, the benchmark AP for determining to send the instruction of the second time synchronization is the benchmark AP of sub-network where member AP, is held Row step 302.
Optionally, in some embodiments of the present application, before step 201 further include:
Receive the notification message that server is sent, wherein notification message includes type information;
Type information determines identity attribute based on the received.
Specifically, AP receives the notification message that server is sent, it is benchmark AP in the type information that notification message includes When, it determines that the identity attribute of itself is benchmark AP, when the type information that notification message includes is member AP, determines the body of itself Part attribute is member AP.
Each AP executes corresponding operating in the instruction received, temporal information is sent out according to itself identity as a result, Server is given, the network for server based on division is realized larger according to the temporal information and the attaching relation of edge AP Time synchronization operation is carried out to the AP of each time to be adjusted simultaneously in the WLAN of scale;In which, rely on existing The device hardware resource of some WLANs, realizes the time synchronization of network-wide basis, solves existing time synchronization side Method complexity height and problem at high cost.
Below in conjunction with a specific embodiment, above-mentioned method for synchronizing time is described in detail;
Step 401: server imports the topology information of each AP equipment in WLAN, and wherein topology information includes position Confidence breath and identification information;
Step 402: for server according to the location information of importing, division WLAN is multiple sub-networks, different sons It is kept in communication connection between network by edge AP;
Step 403: server determines a benchmark AP that each sub-network includes and multiple according to the location information of importing Member AP;
Step 404: server is to each AP transmission types information, so that each AP determines identity according to type information;
Step 405: the identification information of the benchmark AP of sub-network, member where server sends member AP to each member AP AP saves received identification information;
Wherein, step 404 and step 405 may also be performed simultaneously, i.e., to each benchmark AP transmission types information, and to every The identification information of the benchmark AP of a member AP transmission types information and the place member AP sub-network.
Step 406: server sends first time synchronic command to each benchmark AP;
Step 407: when the corresponding member AP of the identification information that benchmark AP includes to first time synchronic command sends second Between synchronic command, the second time synchronization instruction including benchmark AP identification information and the second time synchronization instruction sending time Stamp;
Step 408: member AP receives the instruction of the second time synchronization, and the identification information of preservation and the second time synchronization are instructed In identification information compare, and determine send the second time synchronization instruction benchmark AP be sub-network where itself benchmark AP When, step 409 is executed, is otherwise terminated;
Step 409: the sending time stamp contained in the instruction of the second time synchronization was received for the second time with itself by member AP The first receiving time stamp of synchronic command is used as temporal information, to server transmission time information;
Step 410: server receives the temporal information that each member AP is returned;
Step 411: server calculates the propagation delay time in each sub-network according to the location information of importing;
Step 412: server accompanies selection target AP in multiple benchmark AP of WLAN;
Step 413: server is using the benchmark AP of the edge AP one of sub-network belonged to as current base AP;
Step 414: server is using current base AP as starting point, using target AP as terminal, search current base AP with All communication paths between target AP;
Step 415: server screens the first company being made of benchmark AP and target AP in all communication paths of lookup Path;
Step 416: the quantity of the first communication path of server statistics judges whether the quantity of the first communication path is unique, If the quantity of the first communication path is unique, 417 are thened follow the steps, if the quantity of the first communication path is not unique, is thened follow the steps 418;
Step 417: server is using first communication path as between the current base AP and the target AP Target communication path executes step 419;
Step 418: determining the quantity for the AP that each first communication path includes, packet is selected from multiple first communication paths First communication path of the minimum number of the AP included is held as the target communication path between current base AP and the target AP Row step 419;
Step 419: server is according to the propagation delay time of calculating, edge AP the sending time stamp returned and the first receiving time Stamp, determines first time difference between AP adjacent two-by-two in target communication path;
Step 420: the sending time stamp and first that server is returned according to the first determining time difference, each member AP receives Timestamp determines time adjustment information of the first kind AP relative to target AP;
Step 421: server sends the instruction of third time synchronization according to determining time adjustment information, to first kind AP;
Step 422: first kind AP is instructed according to third time synchronization, executes time synchronization operation.
Wherein, the concrete methods of realizing of each step can refer to the associated description in previous embodiment, no longer superfluous herein It states.Further, it is the technical solution for better understanding the application, provides the specific example of the application, with reference to Fig. 2, clothes WLAN is divided into sub-network 1, sub-network 2, sub-network 3, sub-network 4, sub-network 5 by business device.
Wherein, triangle indicates that benchmark AP, quadrangle indicate member AP, and member AP includes edge AP, for example, sub-network 1 Benchmark AP be AP13, member AP includes AP10, AP11, AP12, AP14, AP15, and wherein AP14 is sub-network 1 and sub-network 4 Edge AP, AP15 is that edge AP, AP14 and the AP15 of sub-network 1 and sub-network 2 are the edge AP of sub-network 1 Yu sub-network 3.
After server calculates the propagation delay time in each sub-network according to the temporal information that each member AP is fed back, selection AP27 is target AP, and using the benchmark AP13 of the edge AP14 sub-network 1 belonged to as current base AP.
Server searches the communication path between AP13 and AP27, including AP13-AP10-AP25-AP26-AP27, AP13- AP10-AP24-AP26-AP27、AP13-AP24-AP27、AP13-AP20-AP27、AP13-AP16-AP20-AP27、AP13- AP16-AP20-AP21-AP27 etc..It is AP13- that server, which is therefrom screened by the first communication path that benchmark AP and target AP are formed, AP24-AP27, AP13-AP20-AP27, AP13-AP16-AP20-AP27 amount to 3, then each first connection of server statistics The quantity for the AP that path includes, respectively 3,3,4.Wherein, including AP minimum number the first communication path be two, then Server arbitrarily select one for target communication path.For example, selecting AP13-AP24-AP27 for target communication path.
Server is returned the AP13 in target communication path as the first AP, AP24 as the 2nd AP according to AP14 Temporal information calculates first time difference between AP13 and AP24, for example, being+0.01 second.Server using AP24 as the first AP, First time difference between AP24 and AP27, example are calculated according to the temporal information that AP22 and AP26 is returned using AP27 as the 2nd AP Such as, it is+0.02 second.Member AP21, AP22, AP26, AP28, AP29 that sub-network 5 where server calculates target AP27 includes The 4th time difference, for example, be respectively+0.01 second, 0 second, -0.001 second, -0.02 second ,+0.03 second.Server will be made for+0.01 second Time adjustment information for AP21 relative to AP27, AP22 do not need adjustment time, and server will be used as AP26 phase in -0.001 second The time adjustment information of AP27 will be made -0.02 second time adjustment information as AP28 relative to AP27 for+0.03 second It is AP29 relative in the time adjustment information of AP27.
Further, server is by the first time difference phase between first time difference, AP24 and the AP27 between AP13 and AP24 Add, obtaining for the 5th time difference is+0.03 second, it is determined that AP13 is+0.03 second relative to the time adjustment information of AP27;And continue to count The 6th time difference of member AP10, AP11, AP12, AP10, AP14, AP15 that sub-network 1 where calculating AP13 includes.For example, respectively For+0.01, -0.04 second ,+0.002 second ,+0.004 second ,+0.2 second, 0 second, then server by the 6th time difference respectively with the 5th time difference It is added, the 7th obtained time difference is+0.04 second, -0.01 second, 0.032 second, 0.034 second, 0.23 second, 0.03 second.Server general+ 0.04 second time adjustment information as AP10 relative to AP27 adjusts -0.01 second as AP11 relative to the time of AP27 Information, by 0.032 second as AP12 relative to the time adjustment information of AP27, by 0.034 second as AP10 relative to AP27's Time adjustment information, by 0.23 second time adjustment information as AP14 relative to AP27, by 0.03 second as AP15 relative to The time adjustment information of AP27.
In the manner described above, server successively calculates time adjustment letter of the AP relative to target AP of each time to be adjusted After breath, the instruction of third time synchronization is sent to the AP of time to be adjusted.The AP of third time synchronization instruction is received according to third The time adjustment information that time synchronization instruction includes executes time adjustment operation, for example, AP11 is instructed according to third time synchronization Including -0.01 second, the clock of itself is tuned up 0.01 second, AP12, will according to third time synchronization instruction include 0.032 second The clock of itself slows down 0.032 second.
It is a kind of method for synchronizing time provided by the embodiments of the present application above, corresponds to the above method, the application is also A kind of time synchronism apparatus is provided, since the implementation that described device solves the problems, such as is similar to the above method, with method The content of partial response, the detailed description that reference can be made to the above method embodiment are subsequent not repeat them here.It is understood that this The device that application provides may include the unit or module for being able to carry out each step in above method example, these units or mould Block can realize that the application does not limit by way of hardware, software or soft or hard combination.With reference to the accompanying drawing 6 and attached drawing 7 It specifically describes.
Attached drawing 6 is a kind of schematic diagram for time synchronism apparatus that the application one embodiment provides, and is applied to server, such as Shown in Fig. 6, time synchronism apparatus 10 includes:
First transmission unit 11, for sending first time synchronic command to each benchmark AP, wherein synchronous at the first time Instruction is used to indicate each member AP that benchmark AP includes to place sub-network and sends the instruction of the second time synchronization;
Receiving unit 12, for receiving the temporal information that each member AP is returned in each sub-network, wherein temporal information Sending time stamp and the first receiving time stamp including the instruction of the second time synchronization;
Determination unit 13, for according to the corresponding network home relationship of edge AP, sending time stamp and the first receiving time Stamp, determines the time adjustment information of first kind AP, and first kind AP is the AP of time to be adjusted;
Second transmission unit 14, for sending the instruction of third time synchronization to first kind AP according to time adjustment information, the The instruction of three time synchronizations is used to indicate first kind AP and executes time synchronization operation.
Optionally, in some embodiments of the present application, time synchronism apparatus 10 further include:
Import unit, for importing the location information of each AP in WLAN;
Correspondingly, the first determination unit 13 includes:
Computation subunit calculates the propagation delay time in each sub-network for the location information according to importing;
Subelement is selected, for the selection target AP from multiple benchmark AP of WLAN;
First determines subelement, for the network home relationship according to edge AP, determines each subnet of edge AP ownership Target communication path between the benchmark AP and target AP of network;
Second determines subelement, for the sending time stamp and the first receiving time according to propagation delay time, edge AP return Stamp, determines first time difference between AP adjacent two-by-two in target communication path;
Third determines subelement, for being received according to the sending time stamp and first of first time difference, each member AP return Timestamp determines time adjustment information of the first kind AP relative to target AP.
Optionally, in some embodiments of the present application, computation subunit is specifically used for:
According to the location information of importing, where calculating each member AP and member AP between the benchmark AP of sub-network away from From;
According to the distance of calculating and the default light velocity, the transmission between each member AP and the benchmark AP of place sub-network is obtained Time delay.
Optionally, in some embodiments of the present application, first determines that subelement is specifically used for
Using the benchmark AP of the edge AP one of sub-network belonged to as current base AP;
The institute between current base AP and target AP is searched using target AP as terminal using current base AP as starting point There is communication path;
The first communication path being made of benchmark AP and target AP is screened in all communication paths;
Count the quantity of the first communication path;
According to the quantity for the AP that the quantity of the first communication path and each first communication path include, current base AP is determined Target communication path between target AP.
Optionally, in some embodiments of the present application, first determines that subelement is also used to:
Judge whether the quantity of the first communication path is unique;
If the quantity of the first communication path is unique, using the first communication path as between current base AP and target AP Target communication path;
If the quantity of the first communication path is not unique, it is determined that the quantity for the AP that each first communication path includes, from more Selected in a first communication path the first communication path of the minimum number for the AP for including as current base AP and target AP it Between target communication path.
Optionally, in some embodiments of the present application, second determines that subelement is specifically used for:
Between the first receiving time stamp, each member AP and the benchmark AP of place sub-network that each member AP is returned Propagation delay time is subtracted each other, and the second receiving time stamp of each member AP is obtained;
Respectively using AP adjacent two-by-two in target communication path as the first AP and the 2nd AP, the first AP will be belonged to simultaneously The edge AP of place sub-network and the place the 2nd AP sub-network, as current edge AP;
By current edge AP the first AP in a sub-network the second receiving time stamp with sending time stab subtract each other, obtain Second time difference between current edge AP and the first AP;
By current edge AP the 2nd AP in a sub-network the second receiving time stamp with sending time stab subtract each other, obtain The third time difference between current edge AP and the 2nd AP;
Calculate the first average value of second time difference, the second average value of the third time difference;
First average value and the second average value are subtracted each other, first time difference between the first AP and the 2nd AP is obtained.
Optionally, in some embodiments of the present application, third determines that subelement is specifically used for:
The 4th time difference of sub-network each member AP for including where obtaining target AP, using the 4th time difference being not zero as Time adjustment information of the member AP relative to target AP, the second receiving time stamp that the 4th time difference was member AP are stabbed with sending time Difference;
Accumulation process is carried out to first time difference between AP adjacent two-by-two in target communication path, obtained for the 5th time difference;
When being not zero the 5th time difference, obtaining the place the benchmark AP sub-network in target communication path as starting point includes The 6th time difference of each member AP, the difference of the second receiving time stamp and sending time stamp that the 6th time difference was member AP;
It carried out for the 6th time difference to be added processing with the 5th time difference, obtained for the 7th time difference, and using the 7th time difference as member AP Time adjustment information relative to target AP;
Letter is adjusted relative to the time of target AP as the benchmark AP of starting point using the 5th time difference as in target communication path Breath;
When the 5th time difference was zero, the place the benchmark AP sub-network in acquisition target communication path as starting point includes every The 6th time difference of a member AP, the time adjustment information using the 6th time difference being not zero as member AP relative to target AP.
Optionally, in some embodiments of the present application, the first transmission unit, for being sent to each reference Access Points AP It before first time synchronic command, sends a notification message to each AP, which includes type information, and type information is used for Each AP is set to determine identity attribute.
Optionally, in some embodiments of the present application, import unit is also used to import each AP in WLAN Identification information;
First transmission unit, before being also used to send first time synchronic command to each reference Access Points AP, to each The identification information of the benchmark AP of sub-network where member AP sends member AP, so that when member AP is by the identification information and second Between identification information in synchronic command compare, determine the benchmark AP for sending the instruction of the second time synchronization.
Attached drawing 7 is a kind of structural schematic diagram for time synchronism apparatus that some embodiments of the application provide, and is applied to access Point AP, as shown in fig. 7, time synchronism apparatus 20 includes:
First receiving unit 21, for it is synchronous to receive the first time that server is sent when access point AP is benchmark AP Instruction;
First transmission unit 22, each member AP for including to place sub-network according to first time synchronic command The instruction of the second time synchronization is sent, the instruction of the second time synchronization is used to indicate member AP and refers to the second time synchronization of server transmission The sending time stamp and the first receiving time stamp of order, when so that server is according to the corresponding network home relationship of edge AP, transmission Between stamp and the first receiving time stamp, determine the time adjustment information of first kind AP, first kind AP is the AP of time to be adjusted.
Optionally, in some embodiments of the present application, time synchronism apparatus 20 further include:
Second receiving unit 23, for receiving the benchmark AP in same subnet network and sending out when access point AP is member AP The the second time synchronization instruction sent;
Acquiring unit 24, for being instructed according to the second time synchronization, when obtaining the transmission for sending the instruction of the second time synchronization Between stab and receive the second time synchronization instruction receiving time stamp;
Second transmission unit 25, for sending the sending time stamp and receiving time that acquiring unit 24 obtains to server Stamp determines first kind AP so that server is stabbed according to the corresponding network home relationship of edge AP, sending time stamp and receiving time Time adjustment information, first kind AP be the time to be adjusted AP.
Optionally, in some embodiments of the present application, time synchronism apparatus 20 further include:
Third receiving unit, for the first receiving unit 21 receive server send first time synchronic command it Before, the identification information for the benchmark AP in same subnet network that server is sent is received, identification information is saved;
Comparing unit is determined for comparing the identification information of preservation and the identification information in the instruction of the second time synchronization Send the benchmark AP of the second time synchronization instruction;
Acquiring unit 24 is specifically used for determining that sending the benchmark AP of the second time synchronization instruction is itself institute in comparing unit It in the benchmark AP of sub-network, is instructed according to the second time synchronization, obtains the sending time stamp for sending the instruction of the second time synchronization With the receiving time stamp for receiving the instruction of the second time synchronization.
Optionally, in some embodiments of the present application, time synchronism apparatus 20 further include:
4th receiving unit, for the first receiving unit 21 receive server send first time synchronic command it Before, the notification message that server is sent is received, which includes type information;
Determination unit, for determining identity attribute according to type information.
Time synchronism apparatus provided by the embodiments of the present application, the method for synchronizing time provided with previous embodiment, for phase Same inventive concept, has the same effect.
To realize that the various embodiments described above, the embodiment of the present application also provide a kind of server, for hardware view, server 1000 include: memory 1001 and processor 1002;
Memory 1001, is stored with executable program;
Processor 1002 is communicated with memory 1001, reads and executees the executable program stored in memory 1001, real It is applied to the method for synchronizing time of server described in existing aforementioned any embodiment.
To realize that the various embodiments described above, the embodiment of the present application also provide a kind of access point AP, for hardware view, this is connect Access point AP2000 includes: memory 2001 and processor 2002;
Memory 2001, is stored with executable program;
Processor 2002 is communicated with memory 2001, reads and executees the executable program stored in memory 2001, real It is applied to the method for synchronizing time of access point AP described in existing aforementioned any embodiment.
To realize that the various embodiments described above, the embodiment of the present application also provide a kind of machine readable storage medium, the machine can It reads storage medium and is stored with computer program, the computer program is realized aforementioned any when being called and being executed by processor It is applied to the method for synchronizing time of server described in embodiment.
To realize that the various embodiments described above, the embodiment of the present application also provide a kind of machine readable storage medium, the machine can It reads storage medium and is stored with computer program, the computer program is realized aforementioned any when being called and being executed by processor It is applied to the method for synchronizing time of access point AP described in embodiment.
It should be understood that
Machine readable storage medium can be any electronics, magnetism, optics or other physical storage devices, may include or Information is stored, such as executable instruction, data, etc..For example, machine readable storage medium may is that RAM (RadomAccess Memory, random access memory), volatile memory, nonvolatile memory, flash memory, memory driver (such as hard drive Device), solid state hard disk, any kind of storage dish (such as CD, dvd) perhaps similar storage medium or their group It closes.
What above-described embodiment illustrated is device, module or unit, can specifically be realized by computer chip or entity, or It is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can be Appointing in personal computer, laptop computer, personal digital assistant, tablet computer, wearable device or these equipment The combination for several equipment of anticipating.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, equipment (system) or calculate Machine program product.Therefore, the application can be used complete hardware embodiment, complete software embodiment or combine software and hardware side The form of the embodiment in face.Moreover, it wherein includes computer available programs that the embodiment of the present application, which can be used in one or more, Implement in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of code The form of computer program product.
The application is referring to the flow chart according to the method, apparatus of the embodiment of the present application, system and computer program product And/or block diagram describes.It is generally understood that being realized by computer program instructions every one stream in flowchart and/or the block diagram The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
Moreover, these computer program instructions also can store be able to guide computer or other programmable datas processing set In standby computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates Manufacture including command device, the command device are realized in one process of flow chart or multiple processes and/or block diagram one The function of being specified in a box or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing devices, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer Or the instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram The step of function of being specified in one box or multiple boxes.
The preferable specific embodiment of the above, only the application, but the protection scope of the application is not limited thereto, Within the technical scope of the present application, any changes or substitutions that can be easily thought of by anyone skilled in the art, Should all it cover within the scope of protection of this application.Therefore, the protection scope of the application should be with scope of protection of the claims It is quasi-.

Claims (15)

1. a kind of method for synchronizing time, which is characterized in that be applied to server, it is multiple that the server, which divides WLAN, Sub-network, each sub-network include a benchmark AP and multiple member AP, keep leading to by edge AP between different sub-networks News connection, which comprises
To each benchmark AP send first time synchronic command, the first time synchronic command be used to indicate the benchmark AP to Each member AP that place sub-network includes sends the instruction of the second time synchronization;
The temporal information that each member AP is returned in each sub-network is received, the temporal information includes second time synchronization The sending time stamp and the first receiving time stamp of instruction;
According to the network home relationship of the edge AP, sending time stamp and first receiving time stamp, first is determined The time adjustment information of class AP, the first kind AP are the AP of time to be adjusted;
According to the time adjustment information, Xiang Suoshu first kind AP sends the instruction of third time synchronization, the third time synchronization Instruction is used to indicate the first kind AP and executes time synchronization operation.
2. the method according to claim 1, wherein the edge AP does not include the benchmark AP;The service Device divides WLAN as before multiple sub-networks further include:
Import the location information of each AP in the WLAN;
Network home relationship, the sending time according to the edge AP is stabbed and first receiving time is stabbed, and determines The time adjustment information of first kind AP, comprising:
According to the positional information, the propagation delay time in each sub-network is calculated;
The selection target AP from multiple benchmark AP of the WLAN;
According to the network home relationship of the edge AP, determine the benchmark AP of each sub-network of the edge AP ownership with it is described Target communication path between target AP;
According to the propagation delay time, the edge AP sending time stamp returned and the first receiving time stamp, the target is determined First time difference in communication path between AP adjacent two-by-two;
According to first time difference, each member AP the sending time stamp returned and the first receiving time stamp, first kind AP is determined Time adjustment information relative to the target AP.
3. according to the method described in claim 2, it is characterized in that, it is described according to the positional information, calculate each sub-network Interior propagation delay time, comprising:
According to the positional information, the distance between the benchmark AP of sub-network where calculating each member AP and member AP;
According to the distance and the default light velocity, the propagation delay time between each member AP and the benchmark AP of place sub-network is obtained.
4. according to the method described in claim 2, it is characterized in that, the network home relationship according to the edge AP, really Target communication path between the benchmark AP and the target AP of each sub-network of the fixed edge AP ownership, comprising:
Using the benchmark AP of one of sub-network of edge AP ownership as current base AP;
The current base AP and the mesh are searched using the target AP as terminal using the current base AP as starting point Mark all communication paths between AP;
The first communication path being made of benchmark AP and target AP is screened in all communication paths;
Count the quantity of first communication path;
According to the quantity for the AP that the quantity of first communication path and each first communication path include, the current base is determined Target communication path between quasi- AP and the target AP.
5. according to the method described in claim 4, it is characterized in that, the quantity according to first communication path and each The quantity for the AP that first communication path includes determines the target communication path between the current base AP and the target AP, Include:
Judge whether the quantity of first communication path is unique;
If the quantity of first communication path is unique, using first communication path as the current base AP with it is described Target communication path between target AP;
If the quantity of first communication path is not unique, it is determined that the quantity for the AP that each first communication path includes, from more Select the first communication path of the minimum number for the AP for including as current base AP and the target in a first communication path Target communication path between AP.
6. according to the method described in claim 3, it is characterized in that, described return according to the propagation delay time, the edge AP Sending time stamp and the first receiving time stamp, when determining first between AP adjacent two-by-two in the target communication path Difference, comprising:
The transmission between the first receiving time stamp, each member AP and the benchmark AP of place sub-network that each member AP is returned Time delay is subtracted each other, and the second receiving time stamp of each member AP is obtained;
Respectively using AP adjacent two-by-two in the target communication path as the first AP and the 2nd AP, described will be belonged to simultaneously The edge AP of sub-network where one AP and the place the 2nd AP sub-network, as current edge AP;
By the current edge AP the first AP in a sub-network the second receiving time stamp with sending time stab subtract each other, Obtain second time difference between the current edge AP and the first AP;
By the current edge AP the 2nd AP in a sub-network the second receiving time stamp with sending time stab subtract each other, Obtain the third time difference between the current edge AP and the 2nd AP;
Calculate the first average value, the second average value of the third time difference of second time difference;
First average value and second average value are subtracted each other, first between the first AP and the 2nd AP is obtained The time difference.
7. according to the method described in claim 6, it is characterized in that, described return according to first time difference, each member AP Sending time stamp and the first receiving time stamp, determine time adjustment information of the first kind AP relative to the target AP, comprising:
The 4th time difference for each member AP that sub-network where obtaining the target AP includes, using the 4th time difference being not zero as Time adjustment information of the member AP relative to the target AP, the second receiving time stamp and hair that the 4th time difference is member AP Send the difference of timestamp;
Accumulation process is carried out to first time difference between AP adjacent two-by-two in the target communication path, obtained for the 5th time difference;
When being not zero the 5th time difference, obtain in the target communication path as sub-network packet where the benchmark AP of starting point The 6th time difference of each member AP included, the difference of the second receiving time stamp and sending time stamp that the 6th time difference is member AP Value;
6th time difference is carried out being added processing with the 5th time difference, obtained for the 7th time difference, and the 7th time difference is made Time adjustment information for member AP relative to the target AP;
Using the 5th time difference as in the target communication path as the benchmark AP of starting point relative to the target AP when Between adjustment information;
When the 5th time difference is zero, obtaining the place the benchmark AP sub-network in the target communication path as starting point includes Each member AP the 6th time difference, using the 6th time difference being not zero as member AP relative to the target AP time adjust Information.
8. method according to claim 1-7, which is characterized in that described to send the to each reference Access Points AP Before one time synchronic command, further includes:
It sends a notification message to each AP, the notification message includes type information, and the type information is for keeping each AP true Determine identity attribute.
9. method according to claim 1-7, which is characterized in that described to send the to each reference Access Points AP Before one time synchronic command, further includes:
Import the identification information of each AP in the WLAN;
The identification information of the benchmark AP of sub-network where sending member AP to each member AP, so that member AP is by the mark Information is compared with the identification information in second time synchronization instruction, determines the benchmark for sending the second time synchronization instruction AP。
10. a kind of method for synchronizing time, which is characterized in that be applied to access point AP, it is multiple that server, which divides WLAN, Sub-network, each sub-network include a benchmark AP and multiple member AP, keep leading to by edge AP between different sub-networks News connection, which comprises
When described access point AP is benchmark AP, the first time synchronic command that server is sent is received;
According to the first time synchronic command, each member AP for including to place sub-network sends the second time synchronization and refers to It enables, the second time synchronization instruction is used to indicate the member AP and sends the second time synchronization instruction to the server Sending time stamp and the first receiving time stamp so that the server according to the corresponding network home relationship of the edge AP, The sending time stamp and first receiving time stamp, determine the time adjustment information of first kind AP, the first kind AP is The AP of time to be adjusted.
11. according to the method described in claim 10, it is characterized in that, the method also includes:
When described access point AP is member AP, second sent with the member AP benchmark AP for being in same subnet network is received Time synchronization instruction;
It is instructed according to second time synchronization, obtain the sending time stamp for sending the second time synchronization instruction and receives institute State the receiving time stamp of the second time synchronization instruction;
The sending time stamp and receiving time stamp are sent to the server, so that the server is according to the edge The corresponding network home relationship of AP, sending time stamp and receiving time stamp determine the time adjustment letter of first kind AP Breath, the first kind AP are the AP of time to be adjusted.
12. according to the method for claim 11, which is characterized in that the reception is in same subnet network with the member AP Benchmark AP send the second time synchronization instruction before, further includes:
The identification information for receiving the benchmark AP that same subnet network is in the member AP that server is sent, saves the mark Information;
It is described to be instructed according to second time synchronization, it obtains the sending time stamp for sending the second time synchronization instruction and connects Before the receiving time stamp for receiving the second time synchronization instruction, further includes:
Identification information in the identification information of preservation and second time synchronization instruction is compared, when determining transmission described second Between synchronic command benchmark AP.
13. the described in any item methods of 0-12 according to claim 1, which is characterized in that described on the basis of described access point AP When AP, before the first time synchronic command for receiving server transmission, further includes:
The notification message that server is sent is received, the notification message includes type information;
Identity attribute is determined according to the type information.
14. a kind of time synchronism apparatus, which is characterized in that be applied to server, described device includes:
First transmission unit, for sending first time synchronic command to each benchmark AP, the first time synchronic command is used In each member AP transmission the second time synchronization instruction for indicating that the benchmark AP includes to place sub-network;
Receiving unit, for receiving the temporal information that each member AP is returned in each sub-network, the temporal information includes institute State the sending time stamp and the first receiving time stamp of the instruction of the second time synchronization;
Determination unit, when for being received according to the corresponding network home relationship of edge AP, sending time stamp and described first Between stab, determine the time adjustment information of first kind AP, the first kind AP is the AP of time to be adjusted;
Second transmission unit is used for according to the time adjustment information, and Xiang Suoshu first kind AP sends the instruction of third time synchronization, The third time synchronization instruction is used to indicate the first kind AP and executes time synchronization operation.
15. a kind of time synchronism apparatus, which is characterized in that be applied to access point AP, described device includes:
Receiving unit, for receiving the first time synchronic command that server is sent when described access point AP is benchmark AP;
Transmission unit, for according to the first time synchronic command, each member AP for including to place sub-network sends the The instruction of two time synchronizations, the second time synchronization instruction are used to indicate the member AP and send described second to the server The sending time stamp and the first receiving time stamp of time synchronization instruction, so that the server is according to the corresponding net of the edge AP Network attaching relation, sending time stamp and first receiving time stamp, determine the time adjustment information of first kind AP, described First kind AP is the AP of time to be adjusted.
CN201910305845.4A 2019-04-16 2019-04-16 Time synchronization method and device Active CN110099439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910305845.4A CN110099439B (en) 2019-04-16 2019-04-16 Time synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910305845.4A CN110099439B (en) 2019-04-16 2019-04-16 Time synchronization method and device

Publications (2)

Publication Number Publication Date
CN110099439A true CN110099439A (en) 2019-08-06
CN110099439B CN110099439B (en) 2021-06-22

Family

ID=67444896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910305845.4A Active CN110099439B (en) 2019-04-16 2019-04-16 Time synchronization method and device

Country Status (1)

Country Link
CN (1) CN110099439B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636458A (en) * 2019-10-11 2019-12-31 长春理工大学 Wireless self-organizing network cooperation time synchronization optimization method
CN112415996A (en) * 2020-10-12 2021-02-26 星火科技技术(深圳)有限责任公司 Calibration system and method based on steering engine execution time
WO2022042697A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Time synchronization method and apparatus, device, and storage medium
EP4044700A1 (en) * 2021-02-15 2022-08-17 Sagemcom Broadband Sas Method for synchronising audio equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100091819A1 (en) * 2006-04-29 2010-04-15 Ghassemzadeh Saeed S Arrangement for synchronizing access points in wlan using direct-sequence spread spectrum signaling
CN102833685A (en) * 2005-03-25 2012-12-19 桥扬科技有限公司 Methods and apparatus for cellular broadcasting and communication system
CN108243396A (en) * 2016-12-27 2018-07-03 普天信息技术有限公司 A kind of time synchronizing method and device
CN108650050A (en) * 2018-05-09 2018-10-12 西安电子科技大学 A kind of distributed network clock synchronous method
CN109429325A (en) * 2017-08-24 2019-03-05 阿里巴巴集团控股有限公司 Data transmission method, device, base station and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833685A (en) * 2005-03-25 2012-12-19 桥扬科技有限公司 Methods and apparatus for cellular broadcasting and communication system
US20100091819A1 (en) * 2006-04-29 2010-04-15 Ghassemzadeh Saeed S Arrangement for synchronizing access points in wlan using direct-sequence spread spectrum signaling
CN108243396A (en) * 2016-12-27 2018-07-03 普天信息技术有限公司 A kind of time synchronizing method and device
CN109429325A (en) * 2017-08-24 2019-03-05 阿里巴巴集团控股有限公司 Data transmission method, device, base station and server
CN108650050A (en) * 2018-05-09 2018-10-12 西安电子科技大学 A kind of distributed network clock synchronous method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636458A (en) * 2019-10-11 2019-12-31 长春理工大学 Wireless self-organizing network cooperation time synchronization optimization method
CN110636458B (en) * 2019-10-11 2021-08-03 长春理工大学 Wireless self-organizing network cooperation time synchronization optimization method
WO2022042697A1 (en) * 2020-08-31 2022-03-03 中兴通讯股份有限公司 Time synchronization method and apparatus, device, and storage medium
CN112415996A (en) * 2020-10-12 2021-02-26 星火科技技术(深圳)有限责任公司 Calibration system and method based on steering engine execution time
CN112415996B (en) * 2020-10-12 2024-03-15 星火科技技术(深圳)有限责任公司 Calibration system and method based on steering engine execution time
EP4044700A1 (en) * 2021-02-15 2022-08-17 Sagemcom Broadband Sas Method for synchronising audio equipment
FR3119904A1 (en) * 2021-02-15 2022-08-19 Sagemcom Broadband Sas Method of synchronizing audio equipment
US11540053B2 (en) 2021-02-15 2022-12-27 Sagemcom Broadband Sas Method of synchronizing pieces of audio equipment

Also Published As

Publication number Publication date
CN110099439B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN110099439A (en) Method for synchronizing time and device
CN103065658B (en) Control method and device of multi-terminal synchronized playing
US20140162704A1 (en) Method of determining position of terminal in communication system using multiple beams
CN110958070B (en) Reference time determination method and device
US20210410097A1 (en) Methods, Apparatus and Machine-Readable Mediums Relating to Reference Signals for Positioning in a Wireless Network
CN109691193B (en) Method and system for matching identifiers
CN112449302B (en) Method and device for generating positioning and offline fingerprint database
CN105101387B (en) A kind of synchronization processing method and user equipment
US20130198264A1 (en) Method and device for synchronizing a clock between a server communication device and a client communication device
US11564198B2 (en) Controlling reference transmission point selection for RSTD measurements
US10582462B2 (en) Synchronization method and apparatus
US20220201531A1 (en) Measurement reporting method and apparatus
CN108260181A (en) A kind of transmission method, network side equipment and the user terminal of synchronous access block
US11860289B2 (en) Moving user equipment geolocation
CN103763773B (en) The localization method and device of a kind of mobile terminal
CN106717079A (en) Clock synchronization using WIFI beacons
CN104243133B (en) A kind of synchronous method and device
CN109922425A (en) Determine the method and device of localization region
CN106301745A (en) The method and device of time synchronized between main control board and slave control board
US20220319123A1 (en) Augmented reality channel sounding system
US11863968B2 (en) Static user equipment geolocation
CN104380833B (en) A kind of information method of sending and receiving, device and the information transmission system
WO2022141219A1 (en) Positioning method and related apparatus
CN106231561B (en) Positioning method and device
CN112039621A (en) Time synchronization method and system

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