CN105634639A - Clock synchronization method and device - Google Patents

Clock synchronization method and device Download PDF

Info

Publication number
CN105634639A
CN105634639A CN201510994319.5A CN201510994319A CN105634639A CN 105634639 A CN105634639 A CN 105634639A CN 201510994319 A CN201510994319 A CN 201510994319A CN 105634639 A CN105634639 A CN 105634639A
Authority
CN
China
Prior art keywords
broadcast
broadcast frame
sequence number
signal source
clock synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510994319.5A
Other languages
Chinese (zh)
Other versions
CN105634639B (en
Inventor
梁鑫
马戈
茹忆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510994319.5A priority Critical patent/CN105634639B/en
Publication of CN105634639A publication Critical patent/CN105634639A/en
Application granted granted Critical
Publication of CN105634639B publication Critical patent/CN105634639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention relates to a clock synchronization method and device. The method comprises the steps that a first broadcast frame broadcasted by a designated signal source is received, and the first broadcast frame carries a designated signal source identifier and the serial number of the first broadcast frame; a reference serial number is set based on the serial number of the first broadcast frame, reference time is set, and the reference serial number is greater than the serial number of the first broadcast frame; and clock synchronization information is transmitted to at least one set of equipment to be synchronized, the clock synchronization information carries the designated signal source identifier, the reference serial number and reference time, and the clock synchronization information is used for indicating at least one set of equipment to be synchronized to perform clock synchronization. Efficiency and accuracy of clock synchronization of multiple sets of electronic equipment can be enhanced by the clock synchronization method and device.

Description

Clock synchronizing method and device
Technical field
It relates to field, internet, particularly relate to a kind of clock synchronizing method and device.
Background technology
Along with the development of science and technology, the range of application of electronics is more and more wider. In the process using electronics, multiple electronics is often needed synchronously to work, multiple audio amplifiers in such as a set of sound system, only when the plurality of audio amplifier synchronously works, this sound system just can reach best output effect, when the asynchronous work of the plurality of audio amplifier, the output effect of this sound system will be very poor. And the plurality of electronics only just can synchronous work when clock synchronization, therefore, a kind of clock synchronizing method is needed badly.
In correlation technique, it is possible to random from the plurality of electronics in advance select an electronics, the electronics of selection is defined as benchmark clockwork, and electronics except benchmark clockwork in the plurality of electronics is defined as equipment to be synchronized. When carrying out clock synchronization, equipment to be synchronized can send clock synchronization request to benchmark clockwork, when this benchmark clockwork receives this clock synchronization request, obtain current system time, this system time is defined as the reference time, to this equipment sending data bag to be synchronized, this data packet carries this reference time, when this equipment to be synchronized receives this data packet, it it is this reference time by system time setting, thus with the clock synchronization of this benchmark clockwork, also namely, the clock of the plurality of electronics reaches synchronous.
Summary of the invention
For overcoming Problems existing in correlation technique, the disclosure provides a kind of clock synchronizing method and device.
First aspect according to disclosure embodiment, it is provided that a kind of clock synchronizing method, described method comprises:
Receive the first broadcast frame of specification signal source broadcast, described first broadcast frame carries specification signal source mark and the sequence number of described first broadcast frame;
Sequence number based on described first broadcast frame arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Clock synchronization information is sent at least one equipment to be synchronized, carrying described specification signal source mark, described reference sequences number and described reference time in described clock synchronization information, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
In conjunction with first aspect, in the first possible implementation of above-mentioned first aspect, before the first broadcast frame of described reception specification signal source broadcast, also comprise:
Determine to cover the strength of signal of multiple signal sources of current position;
Based on the strength of signal of described multiple signal source, from the signal source that described multiple signal source selecting strength of signal is maximum;
The signal source of selection is defined as described specification signal source.
In conjunction with the first possible implementation of first aspect or first aspect, in the 2nd kind of possible implementation of above-mentioned first aspect, in described first broadcast frame long when also carrying broadcast, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
In conjunction with the 2nd kind of possible implementation of first aspect, in the third possible implementation of above-mentioned first aspect, described it is set the reference time, comprising:
Obtain the reception time receiving described first broadcast frame;
Described reference sequences number is subtracted the sequence number of described first broadcast frame, obtains First ray difference;
Length during described broadcast is multiplied with described First ray difference, long when obtaining reference;
Appearance when described reception time and described reference is added, obtains the described reference time.
In conjunction with first aspect to any one the possible implementation in the 2nd kind of possible implementation of first aspect, in the 4th kind of possible implementation of above-mentioned first aspect, described it is set the reference time, comprising:
The described reference time is set at random.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of above-mentioned first aspect, described after equipment to be synchronized transmission clock synchronization information, also comprise:
Receive the 2nd broadcast frame of described specification signal source broadcast, described 2nd broadcast frame carries the sequence number of described 2nd broadcast frame;
When the sequence number of described 2nd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting.
In conjunction with the 5th kind of possible implementation of first aspect, in the 6th kind of possible implementation of above-mentioned first aspect, after the 2nd broadcast frame of described reception described specification signal source broadcast, also comprise:
When the sequence number of described 2nd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 2nd broadcast frame is subtracted described reference sequences number, obtains the 2nd sequence number difference;
Length during broadcast is multiplied with described 2nd sequence number difference, long when obtaining the first correction;
When revising described first, length was added with the described reference time, obtained for the first corrected time;
It it is described first corrected time by described system time setting.
Second aspect according to disclosure embodiment, it is provided that a kind of clock synchronizing method, described method comprises:
Receive the clock synchronization information that benchmark clockwork sends, described clock synchronization information is carried specification signal source mark, reference sequences number and reference time;
Based on described specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, described 3rd broadcast frame carries the sequence number of described 3rd broadcast frame;
When the sequence number of described 3rd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting, to realize clock synchronization.
In conjunction with second aspect, in the first possible implementation of above-mentioned second aspect, described method also comprises:
When the sequence number of described 3rd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, send synchronization failure information to described benchmark clockwork.
In conjunction with second aspect, in the 2nd kind of possible implementation of above-mentioned second aspect, long when also carrying broadcast in described 3rd broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
In conjunction with the 2nd kind of possible implementation of second aspect, in the third possible implementation of above-mentioned second aspect, described method also comprises:
When the sequence number of described 3rd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 3rd broadcast frame is subtracted described reference sequences number, obtains the 3rd sequence number difference;
Length during described broadcast is multiplied with described 3rd sequence number difference, long when obtaining the 2nd correction;
When revising the described 2nd, length was added with the described reference time, obtained for the 2nd corrected time;
It it is described 2nd corrected time by described system time setting.
The third aspect according to disclosure embodiment, it is provided that a kind of clock synchronization apparatus, described device comprises:
First receiver module, for receiving the first broadcast frame of specification signal source broadcast, carries specification signal source mark and the sequence number of described first broadcast frame in described first broadcast frame;
First arranges module, and the sequence number for the first broadcast frame received based on described first receiver module arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Sending module, for sending clock synchronization information at least one equipment to be synchronized, carrying described first in described clock synchronization information and arrange the specification signal source mark of module installation, described reference sequences number and described reference time, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
In conjunction with the third aspect, in the first possible implementation of the above-mentioned third aspect, described device also comprises:
First determination module, for determining to cover the strength of signal of multiple signal sources of current position;
Select module, for the strength of signal of multiple signal sources determined based on described first determination module, from the signal source that described multiple signal source selecting strength of signal is maximum;
2nd determination module, for being defined as described specification signal source by the signal source of described selection model choice.
In conjunction with the first possible implementation of the third aspect or the third aspect, in the 2nd kind of possible implementation of the above-mentioned third aspect, in described first broadcast frame long when also carrying broadcast, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
In conjunction with the 2nd kind of possible implementation of the third aspect, in the third possible implementation of the above-mentioned third aspect, described first arranges module comprises:
Acquiring unit, for obtaining the reception time receiving described first broadcast frame;
First calculating unit, for described reference sequences number subtracts the sequence number of the first broadcast frame that described acquiring unit obtains, obtains First ray difference;
2nd calculating unit, for the First ray difference that length during described broadcast and described first calculating unit calculate is multiplied, long when obtaining reference;
3rd calculating unit, for appearance during the reference of described reception time and described 2nd calculating unit calculating being added, obtains the described reference time.
In conjunction with the third aspect to any one the possible implementation in the 2nd kind of possible implementation of the third aspect, in the 4th kind of possible implementation of the above-mentioned third aspect, described first arranges module comprises:
Setting unit, for arranging the described reference time at random.
In conjunction with the 4th kind of possible implementation of the third aspect, in the 5th kind of possible implementation of the above-mentioned third aspect, described device also comprises:
2nd receiver module, for receiving the 2nd broadcast frame of described specification signal source broadcast, carries the sequence number of described 2nd broadcast frame in described 2nd broadcast frame;
2nd arranges module, for when described 2nd receiver module receive the 2nd broadcast frame sequence number identical with described reference sequences number time, be the described reference time by system time setting.
In conjunction with the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation of the above-mentioned third aspect, described device also comprises:
First calculating module, sequence number for the 2nd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 2nd broadcast frame is subtracted described reference sequences number, obtains the 2nd sequence number difference;
2nd calculating module is for the 2nd sequence number difference that length during broadcast and described first calculating module calculate being multiplied, long when obtaining the first correction;
3rd calculating module, during for revising the first of described 2nd calculating module calculating, length was added with the described reference time, obtained for the first corrected time;
3rd arranges module, for by described system time setting being the first corrected time of described 3rd calculating module calculating.
Fourth aspect according to disclosure embodiment, it is provided that a kind of clock synchronization apparatus, described device comprises:
First receiver module, for receiving the clock synchronization information that benchmark clockwork sends, carries specification signal source mark, reference sequences number and reference time in described clock synchronization information;
2nd receiver module, for the specification signal source mark received based on described first receiver module, receives the 3rd broadcast frame of specification signal source broadcast, carries the sequence number of described 3rd broadcast frame in described 3rd broadcast frame;
First arranges module, for when described 2nd receiver module receive the 3rd broadcast frame sequence number identical with described reference sequences number time, be the described reference time by system time setting, to realize clock synchronization.
In conjunction with fourth aspect, in the first possible implementation of above-mentioned fourth aspect, described device also comprises:
Sending module, sequence number for the 3rd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, send synchronization failure information to described benchmark clockwork.
In conjunction with fourth aspect, in the 2nd kind of possible implementation of above-mentioned fourth aspect, long when also carrying broadcast in described 3rd broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
In conjunction with the 2nd kind of possible implementation of fourth aspect, in the third possible implementation of above-mentioned fourth aspect, described device also comprises:
First calculating module, sequence number for the 3rd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 3rd broadcast frame is subtracted described reference sequences number, obtains the 3rd sequence number difference;
2nd calculating module is for the 3rd sequence number difference that length during described broadcast and described first calculating module calculate being multiplied, long when obtaining the 2nd correction;
3rd calculating module, during for revising the 2nd of described 2nd calculating module calculating the, length was added with the described reference time, obtained for the 2nd corrected time;
2nd arranges module, for by described system time setting being the 2nd corrected time of described 3rd calculating module calculating.
The 5th aspect according to disclosure embodiment, it is provided that a kind of clock synchronization apparatus, described device comprises:
Treater;
The storer of instruction can be performed for storage of processor;
Wherein, described treater is configured to:
Receive the first broadcast frame of specification signal source broadcast, described first broadcast frame carries specification signal source mark and the sequence number of described first broadcast frame;
Sequence number based on described first broadcast frame arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Clock synchronization information is sent at least one equipment to be synchronized, carrying described specification signal source mark, described reference sequences number and described reference time in described clock synchronization information, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
The 6th aspect according to disclosure embodiment, it is provided that a kind of clock synchronization apparatus, described device comprises:
Treater;
The storer of instruction can be performed for storage of processor;
Wherein, described treater is configured to:
Receive the clock synchronization information that benchmark clockwork sends, described clock synchronization information is carried specification signal source mark, reference sequences number and reference time;
Based on described specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, described 3rd broadcast frame carries the sequence number of described 3rd broadcast frame;
When the sequence number of described 3rd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting, to realize clock synchronization.
The technical scheme that embodiment of the present disclosure provides can comprise following useful effect: in the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when multiple electronics needs to carry out clock, this benchmark clockwork receives the first broadcast frame of the broadcast in specification signal source, and determine reference sequences number and reference time according to this first broadcast frame, to this, at least one equipment to be synchronized sends clock synchronization information, this clock synchronization information can indicate this at least one equipment to be synchronized after receiving this clock synchronization information, carry out clock synchronization according to this clock synchronization information simultaneously, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing herein is by being incorporated in specification sheets and forms the part of this specification sheets, shows embodiment according to the invention, and is used from the principle explaining the present invention with specification sheets one.
Fig. 1 is a kind of clock synchronization system tray composition according to an exemplary embodiment.
Fig. 2 is the schema of a kind of clock synchronizing method according to an exemplary embodiment.
Fig. 3 is the schema of another kind of clock synchronizing method according to an exemplary embodiment.
Fig. 4 is the schema of another clock synchronizing method according to an exemplary embodiment.
Fig. 5 is the block diagram of a kind of clock synchronization apparatus according to an exemplary embodiment.
Fig. 6 is the block diagram of another kind of clock synchronization apparatus according to an exemplary embodiment.
Fig. 7 is the schematic diagram of another clock synchronization apparatus according to an exemplary embodiment.
Fig. 8 is the schematic diagram of another clock synchronization apparatus according to an exemplary embodiment.
Embodiment
Here exemplary embodiment being described in detail, its example representation is in the accompanying drawings. When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or similar key element. Enforcement mode described in exemplary embodiment does not represent all enforcement modes consistent with the present invention below. On the contrary, they only with as in appended claims describe in detail, the example of device that some aspects of the present invention are consistent and method.
Fig. 1 is a kind of clock synchronization system tray composition according to an exemplary embodiment, and with reference to Fig. 1, this system comprises benchmark clockwork, at least one equipment to be synchronized and specification signal source. Connected by network between this benchmark clockwork and this at least one equipment to be synchronized, this specification signal source can be determined to obtain for this benchmark clockwork, and this specification signal source can broadcast frame, this benchmark clockwork and this at least one equipment to be synchronized can receive the broadcast frame of this specification signal source broadcast, and this benchmark clockwork can also arrange reference sequences number and reference time based on the broadcast frame received, thus this reference sequences number and this reference time are indicated to this at least one equipment to be synchronized. Each equipment to be synchronized at least one equipment to be synchronized for this, when this equipment to be synchronized is when the broadcast frame that the sequence number receiving the broadcast of this specification signal source is reference sequences number, system time can be set to this reference time, thus complete clock synchronization.
Fig. 2 is the schema of a kind of clock synchronizing method according to an exemplary embodiment, and with reference to Fig. 2, this clock synchronizing method is used in benchmark clockwork, comprises the following steps.
In step 201, receive the first broadcast frame of specification signal source broadcast, this first broadcast frame carries specification signal source mark and the sequence number of this first broadcast frame.
In step 202., the sequence number based on this first broadcast frame arranges reference sequences number, arranges the reference time, and this reference sequences number is greater than the sequence number of this first broadcast frame.
In step 203, clock synchronization information is sent at least one equipment to be synchronized, carrying this specification signal source mark, this reference sequences number and this reference time in this clock synchronization information, this clock synchronization information is used to indicate this at least one equipment to be synchronized and carries out clock synchronization.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when multiple electronics needs to carry out clock, this benchmark clockwork receives the first broadcast frame of the broadcast in specification signal source, and determine reference sequences number and reference time according to this first broadcast frame, to this, at least one equipment to be synchronized sends clock synchronization information, this clock synchronization information can indicate this at least one equipment to be synchronized after receiving this clock synchronization information, carry out clock synchronization according to this clock synchronization information simultaneously, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
In another embodiment of the present disclosure, before receiving the first broadcast frame of specification signal source broadcast, also comprise:
Determine to cover the strength of signal of multiple signal sources of current position;
Based on the strength of signal of the plurality of signal source, from the signal source that the plurality of signal source selecting strength of signal is maximum;
The signal source of selection is defined as this specification signal source.
In another embodiment of the present disclosure, long when also carrying broadcast in this first broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, the reference time is set, comprising:
Obtain the reception time receiving this first broadcast frame;
This reference sequences number is subtracted the sequence number of this first broadcast frame, obtains First ray difference;
Length during this broadcast is multiplied with this First ray difference, long when obtaining reference;
Appearance when this reception time and this reference is added, obtains this reference time.
In another embodiment of the present disclosure, the reference time is set, comprising:
This reference time is set at random.
In another embodiment of the present disclosure, after equipment to be synchronized sends clock synchronization information, also comprise:
Receive the 2nd broadcast frame of this specification signal source broadcast, the 2nd broadcast frame carries the sequence number of the 2nd broadcast frame;
When the sequence number of the 2nd broadcast frame is identical with this reference sequences number, it it is this reference time by system time setting.
In another embodiment of the present disclosure, after receiving the 2nd broadcast frame of this specification signal source broadcast, also comprise:
When the sequence number of the 2nd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 2nd broadcast frame is subtracted this reference sequences number, obtains the 2nd sequence number difference;
Length during broadcast is multiplied with the 2nd sequence number difference, long when obtaining the first correction;
Length during this first correction was added with this reference time, obtained for the first corrected time;
It it is this first corrected time by this system time setting.
Above-mentioned all optional technical schemes, all can form optional embodiment of the present disclosure according to combining arbitrarily, and this is repeated by disclosure embodiment no longer one by one.
Fig. 3 is the schema of a kind of clock synchronizing method according to an exemplary embodiment, and with reference to Fig. 3, this clock synchronizing method is used in this at least one equipment to be synchronized, comprises the following steps.
In step 301, receive the clock synchronization information that benchmark clockwork sends, this clock synchronization information is carried specification signal source mark, reference sequences number and reference time.
In step 302, based on this specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, the 3rd broadcast frame carries the sequence number of the 3rd broadcast frame.
In step 303, when the sequence number of the 3rd broadcast frame is identical with this reference sequences number, it it is this reference time by system time setting, to realize clock synchronization.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when the plurality of electronics carries out clock synchronization, this at least one equipment to be synchronized is after receiving this clock synchronization information, can when the 3rd broadcast frame that the sequence number receiving the broadcast of this specification signal source is reference sequences number simultaneously, it it is this reference time by system time setting, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
In another embodiment of the present disclosure, when the sequence number of the 3rd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, send synchronization failure information to this benchmark clockwork.
In another embodiment of the present disclosure, long when also carrying broadcast in the 3rd broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, when the sequence number of the 3rd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 3rd broadcast frame is subtracted this reference sequences number, obtains the 3rd sequence number difference;
Length during this broadcast is multiplied with the 3rd sequence number difference, long when obtaining the 2nd correction;
When revising the 2nd, length was added with this reference time, obtained for the 2nd corrected time;
It it was the 2nd corrected time by this system time setting.
Above-mentioned all optional technical schemes, all can form optional embodiment of the present disclosure according to combining arbitrarily, and this is repeated by disclosure embodiment no longer one by one.
Fig. 4 is the schema of a kind of clock synchronizing method according to an exemplary embodiment, and with reference to Fig. 4, this clock synchronizing method comprises the following steps.
In step 401, benchmark clockwork determines to cover the strength of signal of multiple signal sources of current position, based on the strength of signal of the plurality of signal source, from the signal source that the plurality of signal source selecting strength of signal is maximum, the signal source of selection is defined as specification signal source.
For each signal source in the plurality of signal source, this signal source can broadcast frame, and the broadcast frame of this signal source broadcast has certain coverage, when electronics is in this coverage, this electronics can receive the broadcast frame of this signal source broadcast. Compared with data packet, broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, therefore this broadcast frame is not subject to network fluctuation impact, real-time, so, for being in this coverage and need multiple electronicss of clock synchronization, the plurality of electronics can carry out clock synchronization according to the broadcast frame that this signal source is broadcasted. And when the strength of signal of this signal source is more big, the coverage of this signal source is also more wide, and the number of multiple electronicss that this coverage can be held is also more big, is also namely, when the strength of signal of this signal source is more big, it is possible to the number of the multiple electronicss carrying out clock synchronization is also more big simultaneously. And when the strength of signal of this signal source is more big, the broadcast frame of this signal source broadcast also can be more little by the impact of network fluctuation, the success ratio of the broadcast frame that the plurality of electronics receives the broadcast of this signal source also can be more big, and then, the plurality of electronics carries out the success ratio of clock synchronization according to the broadcast frame that this signal source is broadcasted also can be more high, therefore, this benchmark clockwork can determine to cover the strength of signal of multiple signal sources of current position, the signal source selecting strength of signal maximum, and the signal source of selection is defined as specification signal source.
Wherein, the success ratio of clock synchronization is carried out in order to improve the plurality of electronics, this benchmark clockwork determines can determine to cover the strength of signal of multiple signal sources of current position, the signal source selecting strength of signal maximum, and the signal source of selection is defined as specification signal source, certainly, this benchmark clockwork can also at random in the multiple signal source selecting signal source covering current position, and the signal source of selection is defined as specification signal source, save the process that this benchmark clockwork determines specification signal source, and then improve the efficiency that the plurality of electronics carries out clock synchronization.
It should be noted that, for the plurality of electronics, can in the plurality of electronics, a random selection electronics, the electronics of selection is defined as benchmark clockwork, and the electronics of the plurality of electronics except this benchmark clockwork is defined as equipment to be synchronized, also namely, the plurality of electronics can comprise a benchmark clockwork and at least one equipment to be synchronized. Certainly, disclosure embodiment can also determine this benchmark clockwork and at least one equipment to be synchronized by additive method, and this is not done concrete restriction by disclosure embodiment.
Also it should be noted that, owing to the clock requency of the plurality of electronics may be different, therefore, in order to ensure the clock synchronization of the plurality of electronics, the method that can periodically provide based on disclosure embodiment carries out clock synchronization, so this benchmark clockwork can be determined before the plurality of electronics carries out clock synchronization every time, certainly, can also being determined once before the plurality of electronics first time carries out clock synchronization, the opportunity determining this benchmark clockwork not be done concrete restriction by disclosure embodiment.
In addition, this signal source can be wireless access point (AccessPoint, AP), can be virtual access point (softAccessPoint, softAP), certainly, can also be other can the equipment of broadcast frame, this is not specifically limited by disclosure embodiment.
Wherein, this signal source can be contained in the plurality of electronics, can also independent of outside the plurality of electronics, such as, when the plurality of electronics is the multiple audio amplifier in a set of sound system, this signal source can be independent of the plurality of audio amplifier and Wireless Fidelity (Wireless-Fidelity, the WIFI) focus that all can receive for the plurality of audio amplifier, it is also possible to is the audio amplifier that any one in the plurality of audio amplifier has broadcast frame function.
It should be noted that, this broadcast frame can be the beacon in 802.11 agreements (beacon) frame, can also be that 802.11 agreements are sought (ProbeReques) frame, certainly this broadcast frame can also be the frame that in 802.11 agreements, other have broadcast nature, and this is not done concrete restriction by disclosure embodiment.
Also it should be noted that, 802.11 agreements are the standards that Electrical and Electronic slip-stick artist association (InstituteofElectricalandElectronicsEngineers, IEEE) is formulated for WLAN.
In addition, when this benchmark clockwork determines to cover the strength of signal of multiple signal sources of current position, for each signal source in the plurality of signal source, this benchmark clockwork receives multiple broadcast frames of this signal source broadcast continuously, when the sequence number of the plurality of broadcast frame is uninterrupted continuously, illustrate that the strength of signal of this signal source is higher; Certainly, this benchmark clockwork can also determine to cover the strength of signal of multiple signal sources of current position by additive method, and this is not done concrete restriction by disclosure embodiment.
Wherein, the sequence number of broadcast frame is for illustration of the order of broadcast frame, in order to determine whether there is the situation of frame losing, when this benchmark clockwork receives the discontinuous broadcast frame of two sequence numbers, this benchmark clockwork can determine not receive the broadcast frame of certain sequence number, such as, the sequence number of three broadcast frames that this benchmark clockwork receives is respectively 2,3,5, then can determine not receive the broadcast frame that sequence number is 4.
After this benchmark clockwork determines specification signal source based on above-mentioned steps 401, this benchmark clockwork can realize the clock synchronization of the plurality of electronics by following method.
In step 402, benchmark clockwork receives the first broadcast frame of specification signal source broadcast, carries specification signal source mark and the sequence number of this first broadcast frame in this first broadcast frame.
After this benchmark clockwork determines this specification signal source, in order to the broadcast frame indicating at least one equipment to be synchronized can broadcast based on this specification signal source, carrying out clock synchronization accurately, this benchmark clockwork can obtain the sequence number of specification signal source mark and this first broadcast frame from the first broadcast frame.
Wherein, this first broadcast frame can be any one broadcast frame of this specification signal source broadcast, and carries the sequence number of specification signal source mark and this broadcast frame in this broadcast frame.
It should be noted that, this specification signal source mark is used for unique this specification signal source of mark, and this specification signal source mark can be the service set (ServiceSetIdentifier in this specification signal source, SSID), can also be the media interviews control (MediaAccessControl in this specification signal source, MAC) address, can also be the basic service device identification (BasicServiceSetIdentifier in this specification signal source, BSSID), this is not specifically limited by disclosure embodiment.
In step 403, benchmark clockwork arranges reference sequences number based on the sequence number of this first broadcast frame, arranges the reference time, and this reference sequences number is greater than the sequence number of this first broadcast frame.
Owing to reference sequences number and reference time are used for carrying out clock synchronization, this reference sequences number and reference time are sent at least one equipment to be synchronized by this benchmark clockwork needs certain time, and also there is certain time interval between adjacent two the broadcast frames of this specification signal source broadcast, therefore, this benchmark clockwork arranges the sequence number that reference sequences number is greater than this first broadcast frame, such that it is able to ensure that this at least one equipment to be synchronized is after receiving this reference time, the sequence number receiving the broadcast of this specification signal source again is the broadcast frame of reference sequences number, improve the success ratio of clock synchronization.
Further, also may not fix owing to the timed interval between adjacent two the broadcast frames of this specification signal source broadcast may be fixed, therefore, when this timed interval is fixing, in the broadcast frame of this specification signal source broadcast long when can carry broadcast, also namely, long when can also carry broadcast in this first broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of specification signal source broadcast.
In addition, this benchmark clockwork arranges the operation of reference time: obtain the reception time receiving this first broadcast frame, this reference sequences number is subtracted the sequence number of this first broadcast frame, obtain First ray difference, length during this broadcast is multiplied with this First ray difference, when obtaining reference long, appearance when this reception time and this reference is added, obtains this reference time; Or, this benchmark clockwork arranges this reference time at random.
It should be noted that, when this benchmark clockwork arranges the reference time by calculating, the reference time that this benchmark clockwork is arranged is that this benchmark clockwork receives system time when sequence number is the broadcast frame of reference sequences number. and due to each the broadcast frame broadcasted for this specification signal source, when this benchmark clockwork and this at least one equipment to be synchronized be in this specification signal source coverage and all working properly time, this benchmark clockwork and this at least one equipment to be synchronized can receive the broadcast frame of this specification signal source broadcast simultaneously, therefore, when this, at least one equipment to be synchronized receives the broadcast frame that sequence number is reference sequences number, it it is the reference time by system time setting, such that it is able to ensure that this at least one equipment to be synchronized is identical with the system clock of this benchmark clockwork, also namely it is, the plurality of electronics reaches clock synchronization, save the operation that benchmark clockwork carries out clock synchronization, simplify the process that the plurality of electronics carries out clock synchronization. and when this benchmark clockwork arranges this reference time at random, eliminate the time that this benchmark clockwork calculates this reference time and consumes, improve the working efficiency of this benchmark clockwork.
Such as, 30 points 27 seconds when the reception time of the first broadcast frame of benchmark clockwork reception specification signal source broadcast is 20 days 3 December in 2015, and this benchmark clockwork obtains this specification signal source and is designated 20-7C-8F-77-5D-31 from this first broadcast frame, when obtaining broadcast, length is 100ms (millisecond), the sequence number of the first broadcast frame is 20, if it is 50 that this benchmark clockwork arranges reference sequences number, this reference sequences number 50 is subtracted the sequence number 20 of this first broadcast frame by this benchmark clockwork, obtaining First ray difference is 30, long 100ms during this broadcast is multiplied with this First ray difference 30, when obtaining reference, length is 3000ms, during 20 days 3 December of 2015 this reception time 30 points are added for 27 seconds with long 3000ms during this reference, 30 points 30 seconds when to obtain this reference time be 20 days 3 December in 2015.
In step 404, to this, at least one equipment to be synchronized sends clock synchronization information to benchmark clockwork, carries this specification signal source mark, this reference sequences number and this reference time in this clock synchronization information.
This benchmark clockwork is arranging reference sequences number according to the sequence number of this first broadcast frame, and after the reference time is set, clock synchronization information can be sent by least one equipment to be synchronized to this, and in this clock synchronization information, carry this specification signal source mark, this reference sequences number and this reference time, after when this, at least one equipment to be synchronized receives this clock synchronization information, it is possible to carry out clock synchronization based on this clock synchronization information.
Wherein, this benchmark clockwork to this at least one equipment to be synchronized send clock synchronization information time, can successively to this at least one equipment to be synchronized send clock synchronization information, can also being that to this, at least one equipment to be synchronized sends clock synchronization information simultaneously, this not be done concrete restriction by disclosure embodiment.
Such as, to this, at least one equipment to be synchronized sends clock synchronization information to this benchmark clockwork simultaneously, 30 points 30 seconds when carrying this specification signal source mark 20-7C-8F-77-5D-31, this reference sequences number 50 and 20 days 3 December of 2015 this reference time in this clock synchronization information.
In step 405, equipment arbitrary to be synchronized at least one equipment to be synchronized for this, when this equipment to be synchronized receives this clock synchronization information that this benchmark clockwork sends, identify based on this specification signal source, receive the 3rd broadcast frame of specification signal source broadcast, the 3rd broadcast frame carries the sequence number of the 3rd broadcast frame.
Needing to carry out clock synchronization based on this clock synchronization information due to this at least one equipment to be synchronized, therefore, this at least one equipment to be synchronized all can receive this clock synchronization information that this benchmark clockwork sends.
It should be noted that, 3rd broadcast frame is except can carrying the sequence number of the 3rd broadcast frame, can also carry when specification signal source identifies maybe this broadcast long, or long when carrying specification signal source mark and this broadcast simultaneously, and this is not specifically limited by disclosure embodiment.
In a step 406, when the sequence number of the 3rd broadcast frame is identical with this reference sequences number, system time setting is this reference time by this equipment to be synchronized, to realize clock synchronization.
For each broadcast frame of this specification signal source broadcast, when this at least one equipment to be synchronized be all in this specification signal source coverage and working properly time, this at least one equipment to be synchronized can receive this broadcast frame simultaneously, therefore, equipment arbitrary to be synchronized at least one equipment to be synchronized for this, this equipment to be synchronized can receive the 3rd broadcast frame of specification signal source broadcast, when the sequence number of the 3rd broadcast frame is identical with this reference sequences number, system time setting is this reference time by this equipment to be synchronized, to realize clock synchronization, improve the accuracy rate that the plurality of electronics carries out clock synchronization.
Further, when this equipment to be synchronized is when receiving the 3rd broadcast frame of this specification signal source broadcast, may due to network fluctuation or other reason, this equipment to be synchronized does not receive the sequence number broadcast frame identical with reference sequences number, cause this equipment clock synchronization to be synchronized failure, therefore, when the sequence number of the 3rd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, this equipment to be synchronized can send synchronization failure information to this benchmark clockwork.
In addition, from aforementioned, in 3rd broadcast frame long when can carry this broadcast, therefore, the 3rd sequence number broadcasting frame received when this equipment to be synchronized is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, this equipment to be synchronized can not also send synchronization failure information to this benchmark clockwork, but according to long during this broadcast, the sequence number of the 3rd broadcast frame and this reference sequences number, calculated for the 2nd corrected time, it it was the 2nd corrected time by system time setting, specifically it is operating as: the sequence number of the 3rd broadcast frame is subtracted this reference sequences number by this equipment to be synchronized, obtain the 3rd sequence number difference, length during this broadcast is multiplied with the 3rd sequence number difference, obtain the 2nd correction time long, when revising the 2nd, length was added with this reference time, obtained for the 2nd corrected time, it it was the 2nd corrected time by system time setting. even if thus this equipment to be synchronized does not receive the broadcast frame that sequence number is reference sequences number, also clock synchronization can be carried out, do not need to send synchronization failure information to this benchmark clockwork, simplify the step that the plurality of electronics carries out clock synchronization, it is to increase the plurality of electronics carries out efficiency and the reliability of clock synchronization.
Further, from aforementioned, this benchmark clockwork is when arranging this reference time, can be that a reference time is set at random, therefore, when when this, system time setting is this reference time by least one equipment to be synchronized, the system time of this at least one equipment to be synchronized and this benchmark clockwork is possible and asynchronous, so, if this benchmark clockwork arranges this reference time at random, then this treats that benchmark clockwork can receive the 2nd broadcast frame of this specification signal source broadcast, 2nd broadcast frame carries the sequence number of the 2nd broadcast frame, when the sequence number of the 2nd broadcast frame is identical with this reference sequences number, it it is this reference time by system time setting.
Wherein, the 2nd broadcast frame is except can carrying the sequence number of the 2nd broadcast frame, it is also possible to carry when specification signal source identifies maybe this broadcast long, or long when carrying specification signal source mark and this broadcast simultaneously, and this is not specifically limited by disclosure embodiment.
It should be noted that, when the sequence number of the 2nd broadcast frame is identical with the sequence number of the 3rd broadcast frame, 2nd broadcast frame and the 3rd broadcast frame are same broadcast frames, when the sequence number of the 2nd broadcast frame is different with the sequence number of the 3rd broadcast frame, the 2nd broadcast frame and the 3rd broadcast frame are different broadcast frames.
In addition, from aforementioned, if this benchmark clockwork is by this reference time of calculating and setting, and there is not network fluctuation, when when this, system time setting is this reference time by least one equipment to be synchronized, this at least one equipment to be synchronized is identical with the system time of this benchmark clockwork, and also namely, the clock of the plurality of electronics reaches synchronous. If but there is network fluctuation, 3rd time broadcasting frame required in the process of transmission also there will be fluctuation, also namely it is, it is not identical with the reference time that this benchmark clockwork calculates that this equipment to be synchronized receives the 3rd broadcast time of frame that sequence number is reference sequences number, therefore, when when this, system time setting is this reference time by least one equipment to be synchronized, this at least one equipment to be synchronized also may be different from the system time of this benchmark clockwork. The accuracy rate of clock synchronization is carried out in order to improve the plurality of electronics further, if this benchmark clockwork is by this reference time of calculating and setting, this benchmark clockwork can also receive the 2nd broadcast frame of this specification signal source broadcast, and when the sequence number of the 2nd broadcast frame is identical with this reference sequences number, be this reference time by system time setting.
Further, from aforementioned, this benchmark clockwork can also receive the 2nd broadcast frame, and when the sequence number of the 2nd broadcast frame is identical with reference sequences number, it it is the reference time by system time setting, if and the sequence number of the 2nd broadcast frame is greater than reference sequences number, and this benchmark clockwork did not receive the broadcast frame that sequence number is greater than reference sequences number before receiving the 2nd broadcast frame, when then also carrying this broadcast in the 2nd broadcast frame when length, the sequence number of the 2nd broadcast frame can also be subtracted this reference sequences number by this benchmark clockwork, obtain the 2nd sequence number difference, length during broadcast is multiplied with the 2nd sequence number difference, when obtaining the first correction long, during this first correction, length was added with this reference time, obtained for the first corrected time, it it is this first corrected time by this system time setting.
In addition, when this specification signal source broadcast broadcast frame in do not carry broadcast time long time, also namely it is, first broadcast frame and the 2nd is broadcasted when all not carrying this broadcast in frame long, this benchmark clockwork can also receive sequence number and be greater than the broadcast frame of this reference sequences number, and when not receiving the 2nd broadcast frame that sequence number is more than or equal to this reference sequences number before current time, return and perform step 402 or perform step 401.
It should be noted that, when this benchmark clockwork is when receiving the synchronization failure information that this equipment to be synchronized sends, the failure of the plurality of electronics clock synchronization can be determined, need at least one equipment to be synchronized transmission clock synchronization information to this again, thus indicate the plurality of electronics to re-start clock synchronization, therefore, when this benchmark clockwork is when receiving the synchronization failure information that this equipment to be synchronized sends, returns and perform step 402; Or, when this benchmark clockwork receives the synchronization failure information that this equipment to be synchronized sends, return and perform step 401.
Wherein, when this benchmark clockwork is when receiving the synchronization failure information that this equipment to be synchronized sends, return and perform step 402, this benchmark clockwork can redefine this specification signal source and this reference time, only need to redefine reference sequences number, save the time, it is to increase the plurality of electronics carries out the efficiency of clock synchronization. When this benchmark clockwork receives the synchronization failure information that equipment to be synchronized sends, also may be owing to the strength of signal in this specification signal source is too low, cause this specification signal source can not stablize ground broadcast frame, therefore, this benchmark clockwork can return and perform step 401, redefine this specification signal source, it is to increase the plurality of electronics carries out the accuracy rate of clock synchronization next time.
Such as, when equipment to be synchronized receives this clock synchronization information, and this clock synchronization information is carried this specification signal source mark 20-7C-8F-77-5D-31, this reference sequences number 50 and during 20 days 3 December of 2015 this reference time 30 points after 30 seconds, this equipment to be synchronized receives the 3rd broadcast frame of this specification signal source broadcast, when the sequence number of the 3rd broadcast frame is 50, the sequence number of the 3rd broadcast frame is identical with this reference sequences number, now, 30 points 30 seconds when system time setting is 20 days 3 December of 2015 this reference time by this equipment to be synchronized; When the sequence number of the 3rd broadcast frame is 52, and when not receiving, before receiving the 3rd broadcast frame, the broadcast frame that sequence number is more than or equal to 50, this equipment to be synchronized can send synchronization failure information to this benchmark clockwork.
In the disclosed embodiments, this benchmark clockwork receives the first broadcast frame of specification signal source broadcast, specification signal source mark and the sequence number of this first broadcast frame is obtained from this first broadcast frame, sequence number based on this first broadcast frame arranges reference sequences number, reference time is set, and at least one equipment to be synchronized sends clock synchronization information to this, after at least one equipment to be synchronized receives this clock synchronization information that this benchmark clockwork sends, equipment arbitrary to be synchronized at least one equipment to be synchronized for this, the 3rd broadcast frame of this specification signal source broadcast is received at this equipment to be synchronized, and the 3rd broadcast sequence number identical with this reference sequences number time, it it is this reference time by system time setting, to realize clock synchronization. in addition, owing to broadcast frame is without the need to replying, without the need to resending and forward, without the need to carrying out alternately with this signal source when this at least one equipment to be synchronized receives broadcast frame, therefore this broadcast frame is not subject to network fluctuation impact, real-time, so, this at least one equipment to be synchronized can receive the sequence number three broadcast frame identical with this reference sequences number simultaneously, and then system time setting can be this reference time by this at least one equipment to be synchronized simultaneously, it is to increase the plurality of electronics carries out the accuracy rate of clock synchronization.
Fig. 5 is a kind of clock synchronization apparatus block diagram according to an exemplary embodiment. With reference to Fig. 5, this device comprises the first receiver module 501, the first and arranges module 502 and sending module 503.
First receiver module 501, for receiving the first broadcast frame of specification signal source broadcast, carries specification signal source mark and the sequence number of this first broadcast frame in this first broadcast frame;
First arranges module 502, and the sequence number for the first broadcast frame received based on this first receiver module arranges reference sequences number, arranges the reference time, and this reference sequences number is greater than the sequence number of this first broadcast frame;
Sending module 503, for sending clock synchronization information at least one equipment to be synchronized, carrying this first specification signal source mark, this reference sequences number and this reference time arranging module installation in this clock synchronization information, this clock synchronization information is used to indicate this at least one equipment to be synchronized and carries out clock synchronization.
In another embodiment of the present disclosure, this device also comprises:
First determination module, for determining to cover the strength of signal of multiple signal sources of current position;
Select module, for the strength of signal of multiple signal sources determined based on this first determination module, from the signal source that the plurality of signal source selecting strength of signal is maximum;
2nd determination module, for being defined as this specification signal source by the signal source of this selection model choice.
In another embodiment of the present disclosure, long when also carrying broadcast in this first broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, first arranges module 502 comprises:
Acquiring unit, for obtaining the reception time receiving this first broadcast frame;
First calculating unit, for this reference sequences number subtracts the sequence number of the first broadcast frame that this acquiring unit obtains, obtains First ray difference;
2nd calculating unit, for the First ray difference that length during this broadcast and this first calculating unit calculate is multiplied, long when obtaining reference;
3rd calculating unit, for appearance during the reference of this reception time and the 2nd calculating unit calculating being added, obtains this reference time.
In another embodiment of the present disclosure, first arranges module 502 comprises:
Setting unit, for arranging this reference time at random.
In another embodiment of the present disclosure, this device also comprises:
2nd receiver module, for receiving the 2nd broadcast frame of this specification signal source broadcast, carries the sequence number of the 2nd broadcast frame in the 2nd broadcast frame;
2nd arranges module, for when the 2nd receiver module receive the 2nd broadcast frame sequence number identical with this reference sequences number time, be this reference time by system time setting.
In another embodiment of the present disclosure, this device also comprises:
First calculating module, sequence number for the 2nd broadcast frame received when the 2nd receiver module is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 2nd broadcast frame is subtracted this reference sequences number, obtains the 2nd sequence number difference;
2nd calculating module is for the 2nd sequence number difference that length during broadcast and this first calculating module calculate being multiplied, long when obtaining the first correction;
3rd calculating module, during for revising the first of the 2nd calculating module calculating, length was added with this reference time, obtained for the first corrected time;
3rd arranges module, for by this system time setting being the first corrected time of the 3rd calculating module calculating.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when multiple electronics needs to carry out clock, this benchmark clockwork receives the first broadcast frame of the broadcast in specification signal source, and determine reference sequences number and reference time according to this first broadcast frame, to this, at least one equipment to be synchronized sends clock synchronization information, this clock synchronization information can indicate this at least one equipment to be synchronized after receiving this clock synchronization information, carry out clock synchronization according to this clock synchronization information simultaneously, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
About the device in above-described embodiment, wherein the concrete mode of each module executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 6 is a kind of clock synchronization apparatus block diagram according to an exemplary embodiment. With reference to Fig. 6, this device comprises the first receiver module the 601, two receiver module 602 and first and arranges module 603.
First receiver module 601, for receiving the clock synchronization information that benchmark clockwork sends, carries specification signal source mark, reference sequences number and reference time in this clock synchronization information;
2nd receiver module 602, for the specification signal source mark received based on this first receiver module, receives the 3rd broadcast frame of specification signal source broadcast, carries the sequence number of the 3rd broadcast frame in the 3rd broadcast frame;
First arranges module 603, for when the 2nd receiver module receive the 3rd broadcast frame sequence number identical with this reference sequences number time, be this reference time by system time setting, to realize clock synchronization.
In another embodiment of the present disclosure, this device also comprises:
Sending module, sequence number for the 3rd broadcast frame received when the 2nd receiver module is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, send synchronization failure information to this benchmark clockwork.
In another embodiment of the present disclosure, long when also carrying broadcast in the 3rd broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, this device also comprises:
First calculating module, sequence number for the 3rd broadcast frame received when the 2nd receiver module is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 3rd broadcast frame is subtracted this reference sequences number, obtains the 3rd sequence number difference;
2nd calculating module is for the 3rd sequence number difference that length during this broadcast and this first calculating module calculate being multiplied, long when obtaining the 2nd correction;
3rd calculating module, during for revising the 2nd of the 2nd calculating module calculating the, length was added with this reference time, obtained for the 2nd corrected time;
2nd arranges module, for by this system time setting being the 2nd corrected time of the 3rd calculating module calculating.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when the plurality of electronics carries out clock synchronization, this at least one equipment to be synchronized is after receiving this clock synchronization information, can when the 3rd broadcast frame that the sequence number receiving the broadcast of this specification signal source is reference sequences number simultaneously, it it is this reference time by system time setting, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
About the device in above-described embodiment, wherein the concrete mode of each module executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 7 is the block diagram of a kind of device 700 for clock synchronization according to an exemplary embodiment. Such as, device 700 can be mobile telephone, computer, digital broadcast terminal, messaging devices, game console, tablet device, medical facilities, body-building equipment, personal digital assistant etc.
With reference to Fig. 7, device 700 can comprise following one or more assembly: processing components 702, storer 704, power supply module 706, multimedia groupware 708, audio-frequency assembly 710, the interface 712 of I/O (I/O), sensor module 714, and communications component 716.
The overall operation of the usual control device 700 of processing components 702, such as with display, the operation that telephone call, data corresponding, camera operation and recording operation are associated. Processing components 702 can comprise one or more treater 720 to perform instruction, to complete all or part of step of above-mentioned method. In addition, processing components 702 can comprise one or more module, and what be convenient between processing components 702 and other assemblies is mutual. Such as, processing components 702 can comprise multi-media module, mutual with what facilitate between multimedia groupware 708 and processing components 702.
Storer 704 is configured to store various types of data to be supported in the operation of device 700. The example of these data comprises for any application program of operation on device 700 or the instruction of method, contact data, telephone book data, message, picture, video etc. Storer 704 can be realized by the volatibility of any type or non-volatile memory device or their combination, such as static RAM (SRAM), electrically erasable read-only storage (EEPROM), erasable programmable read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magneticstorage, flash device, disk or CD.
The various assembly that power supply module 706 is device 700 provides power supply. Power supply module 706 can comprise power-supply management system, one or more power supply, and other with generating for device 700, manage and assembly that power distribution is associated.
The screen that an output interface is provided that multimedia groupware 708 is included between described device 700 and user. In certain embodiments, screen can comprise liquid-crystal display (LCD) and touch panel (TP). If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user. Touch panel comprises one or more touch sensing device with the gesture on sensing touch, slip and touch panel. Described touch sensing device can the border of not only sensing touch or sliding action, but also the detection time length relevant to described touch or slide and pressure. In certain embodiments, multimedia groupware 708 comprises a front-facing camera and/or rearmounted camera. When device 700 is in operator scheme, during such as screening-mode or video pattern, front-facing camera and/or rearmounted camera can receive outside multi-medium data. Each front-facing camera and rearmounted camera can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 710 is configured to export and/or input audio signal. Such as, audio-frequency assembly 710 comprises a microphone (MIC), and when device 700 is in operator scheme, during such as calling pattern, record pattern and speech recognition pattern, microphone is configured to receive external audio signal. The sound signal received can be stored in storer 704 further or be sent via communications component 716. In certain embodiments, audio-frequency assembly 710 also comprises a loud speaker, for output audio signal.
I/O interface 712 is for providing interface between processing components 702 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc. These buttons can include but not limited to: home button, volume button, startup button and locking button.
Sensor module 714 comprises one or more sensor, for providing the state estimation of all respects for device 700. Such as, sensor module 714 can detect the opening/closing state of device 700, the relative location of assembly, such as described assembly is indicating meter and the keypad of device 700, the position that sensor module 714 can also detect device 700 or device 700 1 assemblies changes, the presence or absence that user contacts with device 700, the temperature variation of device 700 orientation or acceleration/deceleration and device 700. Sensor module 714 can comprise close to sensor, be configured to without any physical contact time detection near the existence of object. Sensor module 714 can also comprise optical sensor, such as CMOS or ccd image sensor, for using in imaging applications. In certain embodiments, this sensor module 714 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transmitter or temperature sensor.
Communications component 716 is configured to be convenient to the communication of wired or wireless mode between device 700 and other equipment. Device 700 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or their combination. In an exemplary embodiment, communication component 716 receives the broadcast signal from outside broadcasting management systems or broadcast related information via broadcast channel. In an exemplary embodiment, described communications component 716 also comprises near-field communication (NFC) module, to promote short distance communication. Such as, can based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 700 can be realized by one or more application specific unicircuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device part (PLD), field-programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, for performing aforesaid method.
In the exemplary embodiment, additionally providing a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 704 of instruction, above-mentioned instruction can perform aforesaid method by the treater 720 of device 700. Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage equipment etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage media is performed by the treater of mobile terminal so that mobile terminal can perform a kind of clock synchronizing method, and described method comprises:
Receive the first broadcast frame of specification signal source broadcast, this first broadcast frame carries specification signal source mark and the sequence number of this first broadcast frame;
Sequence number based on this first broadcast frame arranges reference sequences number, arranges the reference time, and this reference sequences number is greater than the sequence number of this first broadcast frame;
Sending clock synchronization information at least one equipment to be synchronized, carry this specification signal source mark, this reference sequences number and this reference time in this clock synchronization information, this clock synchronization information is used to indicate this at least one equipment to be synchronized and carries out clock synchronization.
In another embodiment of the present disclosure, before receiving the first broadcast frame of specification signal source broadcast, also comprise:
Determine to cover the strength of signal of multiple signal sources of current position;
Based on the strength of signal of the plurality of signal source, from the signal source that the plurality of signal source selecting strength of signal is maximum;
The signal source of selection is defined as this specification signal source.
In another embodiment of the present disclosure, long when also carrying broadcast in the first broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, the reference time is set, comprising:
Obtain the reception time receiving this first broadcast frame;
This reference sequences number is subtracted the sequence number of this first broadcast frame, obtains First ray difference;
Length during this broadcast is multiplied with this First ray difference, long when obtaining reference;
Appearance when this reception time and this reference is added, obtains this reference time.
In another embodiment of the present disclosure, the reference time is set, comprising:
This reference time is set at random.
In another embodiment of the present disclosure, after equipment to be synchronized sends clock synchronization information, also comprise:
Receive the 2nd broadcast frame of this specification signal source broadcast, the 2nd broadcast frame carries the sequence number of the 2nd broadcast frame;
When the sequence number of the 2nd broadcast frame is identical with this reference sequences number, it it is this reference time by system time setting.
In another embodiment of the present disclosure, after receiving the 2nd broadcast frame of this specification signal source broadcast, also comprise:
When the sequence number of the 2nd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 2nd broadcast frame is subtracted this reference sequences number, obtains the 2nd sequence number difference;
Length during broadcast is multiplied with the 2nd sequence number difference, long when obtaining the first correction;
Length during this first correction was added with this reference time, obtained for the first corrected time;
It it is this first corrected time by this system time setting.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when multiple electronics needs to carry out clock, this benchmark clockwork receives the first broadcast frame of the broadcast in specification signal source, and determine reference sequences number and reference time according to this first broadcast frame, to this, at least one equipment to be synchronized sends clock synchronization information, this clock synchronization information can indicate this at least one equipment to be synchronized after receiving this clock synchronization information, carry out clock synchronization according to this clock synchronization information simultaneously, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
Fig. 8 is the block diagram of a kind of device 800 for clock synchronization according to an exemplary embodiment. Such as, device 800 can be mobile telephone, computer, digital broadcast terminal, messaging devices, game console, tablet device, medical facilities, body-building equipment, personal digital assistant etc.
With reference to Fig. 8, device 800 can comprise following one or more assembly: processing components 802, storer 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of I/O (I/O), sensor module 814, and communications component 816.
The overall operation of the usual control device 800 of processing components 802, such as with display, the operation that telephone call, data corresponding, camera operation and recording operation are associated. Processing components 802 can comprise one or more treater 820 to perform instruction, to complete all or part of step of above-mentioned method. In addition, processing components 802 can comprise one or more module, and what be convenient between processing components 802 and other assemblies is mutual. Such as, processing components 802 can comprise multi-media module, mutual with what facilitate between multimedia groupware 808 and processing components 802.
Storer 804 is configured to store various types of data to be supported in the operation of device 800. The example of these data comprises for any application program of operation on device 800 or the instruction of method, contact data, telephone book data, message, picture, video etc. Storer 804 can be realized by the volatibility of any type or non-volatile memory device or their combination, such as static RAM (SRAM), electrically erasable read-only storage (EEPROM), erasable programmable read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magneticstorage, flash device, disk or CD.
The various assembly that power supply module 806 is device 800 provides power supply. Power supply module 806 can comprise power-supply management system, one or more power supply, and other with generating for device 800, manage and assembly that power distribution is associated.
The screen that an output interface is provided that multimedia groupware 808 is included between described device 800 and user. In certain embodiments, screen can comprise liquid-crystal display (LCD) and touch panel (TP). If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user. Touch panel comprises one or more touch sensing device with the gesture on sensing touch, slip and touch panel. Described touch sensing device can the border of not only sensing touch or sliding action, but also the detection time length relevant to described touch or slide and pressure. In certain embodiments, multimedia groupware 808 comprises a front-facing camera and/or rearmounted camera. When device 800 is in operator scheme, during such as screening-mode or video pattern, front-facing camera and/or rearmounted camera can receive outside multi-medium data. Each front-facing camera and rearmounted camera can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 810 is configured to export and/or input audio signal. Such as, audio-frequency assembly 810 comprises a microphone (MIC), and when device 800 is in operator scheme, during such as calling pattern, record pattern and speech recognition pattern, microphone is configured to receive external audio signal. The sound signal received can be stored in storer 804 further or be sent via communications component 816. In certain embodiments, audio-frequency assembly 810 also comprises a loud speaker, for output audio signal.
I/O interface 812 is for providing interface between processing components 802 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc. These buttons can include but not limited to: home button, volume button, startup button and locking button.
Sensor module 814 comprises one or more sensor, for providing the state estimation of all respects for device 800. Such as, sensor module 814 can detect the opening/closing state of device 800, the relative location of assembly, such as described assembly is indicating meter and the keypad of device 800, the position that sensor module 814 can also detect device 800 or device 800 1 assemblies changes, the presence or absence that user contacts with device 800, the temperature variation of device 800 orientation or acceleration/deceleration and device 800. Sensor module 814 can comprise close to sensor, be configured to without any physical contact time detection near the existence of object. Sensor module 814 can also comprise optical sensor, such as CMOS or ccd image sensor, for using in imaging applications. In certain embodiments, this sensor module 814 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transmitter or temperature sensor.
Communications component 816 is configured to be convenient to the communication of wired or wireless mode between device 800 and other equipment. Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or their combination. In an exemplary embodiment, communication component 816 receives the broadcast signal from outside broadcasting management systems or broadcast related information via broadcast channel. In an exemplary embodiment, described communications component 816 also comprises near-field communication (NFC) module, to promote short distance communication. Such as, can based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 800 can be realized by one or more application specific unicircuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device part (PLD), field-programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, for performing aforesaid method.
In the exemplary embodiment, additionally providing a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 804 of instruction, above-mentioned instruction can perform aforesaid method by the treater 820 of device 800. Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage equipment etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage media is performed by the treater of mobile terminal so that mobile terminal can perform a kind of clock synchronizing method, and described method comprises:
Receive the clock synchronization information that benchmark clockwork sends, this clock synchronization information is carried specification signal source mark, reference sequences number and reference time;
Based on this specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, the 3rd broadcast frame carries the sequence number of the 3rd broadcast frame;
When the sequence number of the 3rd broadcast frame is identical with this reference sequences number, it it is this reference time by system time setting, to realize clock synchronization.
In another embodiment of the present disclosure, the method also comprises:
When the sequence number of the 3rd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, send synchronization failure information to this benchmark clockwork.
In another embodiment of the present disclosure, long when also carrying broadcast in the 3rd broadcast frame, during this broadcast, length is the timed interval between adjacent two the broadcast frames of this specification signal source broadcast.
In another embodiment of the present disclosure, the method also comprises:
When the sequence number of the 3rd broadcast frame is greater than this reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to this reference sequences number before current time, the sequence number of the 3rd broadcast frame is subtracted this reference sequences number, obtains the 3rd sequence number difference;
Length during this broadcast is multiplied with the 3rd sequence number difference, long when obtaining the 2nd correction;
When revising the 2nd, length was added with this reference time, obtained for the 2nd corrected time;
It it was the 2nd corrected time by this system time setting.
In the disclosed embodiments, owing to broadcast frame is without the need to replying, without the need to resending and forward, this electronics receive broadcast frame time without the need to carrying out alternately with this signal source, this broadcast frame is not subject to network fluctuation impact, real-time, therefore, when the plurality of electronics carries out clock synchronization, this at least one equipment to be synchronized is after receiving this clock synchronization information, can when the 3rd broadcast frame that the sequence number receiving the broadcast of this specification signal source is reference sequences number simultaneously, it it is this reference time by system time setting, improve efficiency and accuracy rate that the plurality of electronics carries out clock synchronization.
Those skilled in the art, after considering specification sheets and putting into practice invention disclosed herein, will easily expect other embodiment of the present invention. The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed the general principle of the present invention and comprised the unexposed common practise in the art of the disclosure or conventional techniques means. Specification sheets and embodiment are only regarded as exemplary, and the true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the present invention is not limited to accurate structure described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope. The scope of the present invention is only limited by appended claim.

Claims (24)

1. a clock synchronizing method, it is characterised in that, described method comprises:
Receive the first broadcast frame of specification signal source broadcast, described first broadcast frame carries specification signal source mark and the sequence number of described first broadcast frame;
Sequence number based on described first broadcast frame arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Clock synchronization information is sent at least one equipment to be synchronized, carrying described specification signal source mark, described reference sequences number and described reference time in described clock synchronization information, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
2. the method for claim 1, it is characterised in that, before the first broadcast frame of described reception specification signal source broadcast, also comprise:
Determine to cover the strength of signal of multiple signal sources of current position;
Based on the strength of signal of described multiple signal source, from the signal source that described multiple signal source selecting strength of signal is maximum;
The signal source of selection is defined as described specification signal source.
3. method as claimed in claim 1 or 2, it is characterised in that, long when also carrying broadcast in described first broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
4. method as claimed in claim 3, it is characterised in that, described the reference time is set, comprising:
Obtain the reception time receiving described first broadcast frame;
Described reference sequences number is subtracted the sequence number of described first broadcast frame, obtains First ray difference;
Length during described broadcast is multiplied with described First ray difference, long when obtaining reference;
Appearance when described reception time and described reference is added, obtains the described reference time.
5. method as described in claim 1-3 any claim, it is characterised in that, described the reference time is set, comprising:
The described reference time is set at random.
6. method as claimed in claim 5, it is characterised in that, described after equipment to be synchronized transmission clock synchronization information, also comprise:
Receive the 2nd broadcast frame of described specification signal source broadcast, described 2nd broadcast frame carries the sequence number of described 2nd broadcast frame;
When the sequence number of described 2nd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting.
7. method as claimed in claim 6, it is characterised in that, after the 2nd broadcast frame of described reception described specification signal source broadcast, also comprise:
When the sequence number of described 2nd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 2nd broadcast frame is subtracted described reference sequences number, obtains the 2nd sequence number difference;
Length during broadcast is multiplied with described 2nd sequence number difference, long when obtaining the first correction;
When revising described first, length was added with the described reference time, obtained for the first corrected time;
It it is described first corrected time by described system time setting.
8. a clock synchronizing method, it is characterised in that, described method comprises:
Receive the clock synchronization information that benchmark clockwork sends, described clock synchronization information is carried specification signal source mark, reference sequences number and reference time;
Based on described specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, described 3rd broadcast frame carries the sequence number of described 3rd broadcast frame;
When the sequence number of described 3rd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting, to realize clock synchronization.
9. method as claimed in claim 8, it is characterised in that, described method also comprises:
When the sequence number of described 3rd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, send synchronization failure information to described benchmark clockwork.
10. method as claimed in claim 8, it is characterised in that, long when also carrying broadcast in described 3rd broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
11. methods as claimed in claim 10, it is characterised in that, described method also comprises:
When the sequence number of described 3rd broadcast frame is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 3rd broadcast frame is subtracted described reference sequences number, obtains the 3rd sequence number difference;
Length during described broadcast is multiplied with described 3rd sequence number difference, long when obtaining the 2nd correction;
When revising the described 2nd, length was added with the described reference time, obtained for the 2nd corrected time;
It it is described 2nd corrected time by described system time setting.
12. 1 kinds of clock synchronization apparatus, it is characterised in that, described device comprises:
First receiver module, for receiving the first broadcast frame of specification signal source broadcast, carries specification signal source mark and the sequence number of described first broadcast frame in described first broadcast frame;
First arranges module, and the sequence number for the first broadcast frame received based on described first receiver module arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Sending module, for sending clock synchronization information at least one equipment to be synchronized, carrying described first in described clock synchronization information and arrange the specification signal source mark of module installation, described reference sequences number and described reference time, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
13. devices as claimed in claim 12, it is characterised in that, described device also comprises:
First determination module, for determining to cover the strength of signal of multiple signal sources of current position;
Select module, for the strength of signal of multiple signal sources determined based on described first determination module, from the signal source that described multiple signal source selecting strength of signal is maximum;
2nd determination module, for being defined as described specification signal source by the signal source of described selection model choice.
14. devices as described in claim 12 or 13, it is characterised in that, long when also carrying broadcast in described first broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
15. devices as claimed in claim 14, it is characterised in that, described first arranges module comprises:
Acquiring unit, for obtaining the reception time receiving described first broadcast frame;
First calculating unit, for described reference sequences number subtracts the sequence number of the first broadcast frame that described acquiring unit obtains, obtains First ray difference;
2nd calculating unit, for the First ray difference that length during described broadcast and described first calculating unit calculate is multiplied, long when obtaining reference;
3rd calculating unit, for appearance during the reference of described reception time and described 2nd calculating unit calculating being added, obtains the described reference time.
16. devices as described in claim 12-14 any claim, it is characterised in that, described first arranges module comprises:
Setting unit, for arranging the described reference time at random.
17. devices as claimed in claim 16, it is characterised in that, described device also comprises:
2nd receiver module, for receiving the 2nd broadcast frame of described specification signal source broadcast, carries the sequence number of described 2nd broadcast frame in described 2nd broadcast frame;
2nd arranges module, for when described 2nd receiver module receive the 2nd broadcast frame sequence number identical with described reference sequences number time, be the described reference time by system time setting.
18. devices as claimed in claim 17, it is characterised in that, described device also comprises:
First calculating module, sequence number for the 2nd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 2nd broadcast frame is subtracted described reference sequences number, obtains the 2nd sequence number difference;
2nd calculating module is for the 2nd sequence number difference that length during broadcast and described first calculating module calculate being multiplied, long when obtaining the first correction;
3rd calculating module, during for revising the first of described 2nd calculating module calculating, length was added with the described reference time, obtained for the first corrected time;
3rd arranges module, for by described system time setting being the first corrected time of described 3rd calculating module calculating.
19. 1 kinds of clock synchronization apparatus, it is characterised in that, described device comprises:
First receiver module, for receiving the clock synchronization information that benchmark clockwork sends, carries specification signal source mark, reference sequences number and reference time in described clock synchronization information;
2nd receiver module, for the specification signal source mark received based on described first receiver module, receives the 3rd broadcast frame of specification signal source broadcast, carries the sequence number of described 3rd broadcast frame in described 3rd broadcast frame;
First arranges module, for when described 2nd receiver module receive the 3rd broadcast frame sequence number identical with described reference sequences number time, be the described reference time by system time setting, to realize clock synchronization.
20. devices as claimed in claim 19, it is characterised in that, described device also comprises:
Sending module, sequence number for the 3rd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, send synchronization failure information to described benchmark clockwork.
21. devices as claimed in claim 19, it is characterised in that, long when also carrying broadcast in described 3rd broadcast frame, during described broadcast, length is the timed interval between adjacent two the broadcast frames of described specification signal source broadcast.
22. devices as claimed in claim 21, it is characterised in that, described device also comprises:
First calculating module, sequence number for the 3rd broadcast frame received when described 2nd receiver module is greater than described reference sequences number, and when not receiving broadcast frame that sequence number is more than or equal to described reference sequences number before current time, the sequence number of described 3rd broadcast frame is subtracted described reference sequences number, obtains the 3rd sequence number difference;
2nd calculating module is for the 3rd sequence number difference that length during described broadcast and described first calculating module calculate being multiplied, long when obtaining the 2nd correction;
3rd calculating module, during for revising the 2nd of described 2nd calculating module calculating the, length was added with the described reference time, obtained for the 2nd corrected time;
2nd arranges module, for by described system time setting being the 2nd corrected time of described 3rd calculating module calculating.
23. 1 kinds of clock synchronization apparatus, it is characterised in that, described device comprises:
Treater;
The storer of instruction can be performed for storage of processor;
Wherein, described treater is configured to:
Receive the first broadcast frame of specification signal source broadcast, described first broadcast frame carries specification signal source mark and the sequence number of described first broadcast frame;
Sequence number based on described first broadcast frame arranges reference sequences number, arranges the reference time, and described reference sequences number is greater than the sequence number of described first broadcast frame;
Clock synchronization information is sent at least one equipment to be synchronized, carrying described specification signal source mark, described reference sequences number and described reference time in described clock synchronization information, described clock synchronization information is used to indicate at least one equipment to be synchronized described and carries out clock synchronization.
24. 1 kinds of clock synchronization apparatus, it is characterised in that, described device comprises:
Treater;
The storer of instruction can be performed for storage of processor;
Wherein, described treater is configured to:
Receive the clock synchronization information that benchmark clockwork sends, described clock synchronization information is carried specification signal source mark, reference sequences number and reference time;
Based on described specification signal source mark, receive the 3rd broadcast frame of specification signal source broadcast, described 3rd broadcast frame carries the sequence number of described 3rd broadcast frame;
When the sequence number of described 3rd broadcast frame is identical with described reference sequences number, it it is the described reference time by system time setting, to realize clock synchronization.
CN201510994319.5A 2015-12-25 2015-12-25 Clock synchronizing method and device Active CN105634639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510994319.5A CN105634639B (en) 2015-12-25 2015-12-25 Clock synchronizing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510994319.5A CN105634639B (en) 2015-12-25 2015-12-25 Clock synchronizing method and device

Publications (2)

Publication Number Publication Date
CN105634639A true CN105634639A (en) 2016-06-01
CN105634639B CN105634639B (en) 2018-05-08

Family

ID=56049228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510994319.5A Active CN105634639B (en) 2015-12-25 2015-12-25 Clock synchronizing method and device

Country Status (1)

Country Link
CN (1) CN105634639B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020083370A1 (en) * 2018-10-25 2020-04-30 华为技术有限公司 Clock synchronization method and apparatus
CN112910592A (en) * 2021-02-22 2021-06-04 北京小米松果电子有限公司 Clock synchronization method and device, terminal and storage medium
CN114584245A (en) * 2022-02-11 2022-06-03 江中药业股份有限公司 Multi-equipment synchronization method and system for traditional Chinese medicine
CN116236205A (en) * 2022-12-19 2023-06-09 天津大学 Multichannel miniature brain electricity acquisition system
CN117295148A (en) * 2023-11-22 2023-12-26 泉州艾奇科技有限公司 Time synchronization method, central control host and wireless device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1946002A (en) * 2006-09-30 2007-04-11 华为技术有限公司 Clock synchronizing method between base stations
CN101931884A (en) * 2009-06-23 2010-12-29 北京三星通信技术研究有限公司 Method and system for data synchronization
CN102118206A (en) * 2011-02-23 2011-07-06 尚雪峰 Broadcast principle-based lighting equipment wireless network deployment method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1946002A (en) * 2006-09-30 2007-04-11 华为技术有限公司 Clock synchronizing method between base stations
CN101931884A (en) * 2009-06-23 2010-12-29 北京三星通信技术研究有限公司 Method and system for data synchronization
CN102118206A (en) * 2011-02-23 2011-07-06 尚雪峰 Broadcast principle-based lighting equipment wireless network deployment method and system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020083370A1 (en) * 2018-10-25 2020-04-30 华为技术有限公司 Clock synchronization method and apparatus
US11451316B2 (en) 2018-10-25 2022-09-20 Huawei Technologies Co., Ltd. Clock synchronization method and apparatus
CN112910592A (en) * 2021-02-22 2021-06-04 北京小米松果电子有限公司 Clock synchronization method and device, terminal and storage medium
CN112910592B (en) * 2021-02-22 2023-08-04 北京小米松果电子有限公司 Clock synchronization method and device, terminal and storage medium
CN114584245A (en) * 2022-02-11 2022-06-03 江中药业股份有限公司 Multi-equipment synchronization method and system for traditional Chinese medicine
CN114584245B (en) * 2022-02-11 2024-05-10 江中药业股份有限公司 Multi-equipment synchronization method and system for traditional Chinese medicine
CN116236205A (en) * 2022-12-19 2023-06-09 天津大学 Multichannel miniature brain electricity acquisition system
CN117295148A (en) * 2023-11-22 2023-12-26 泉州艾奇科技有限公司 Time synchronization method, central control host and wireless device
CN117295148B (en) * 2023-11-22 2024-02-23 泉州艾奇科技有限公司 Time synchronization method, central control host and wireless device

Also Published As

Publication number Publication date
CN105634639B (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US11057853B2 (en) Methods and apparatus for indicating and determining synchronization block, and base station and user equipment
CN104318741B (en) Bluetooth equipment control method and device
US9769667B2 (en) Methods for controlling smart device
CN108064466B (en) Period information indication method of public control resource set of residual key system information
CN107018496B (en) Paging method and device
CN104460365A (en) Equipment control method and device
CN105634639A (en) Clock synchronization method and device
CN104980820A (en) Multimedia file playing method and multimedia file playing device
CN104853336A (en) Method for discovering intelligent equipment, method for accessing to internet and devices thereof
CN104333429B (en) Realize the synchronous method and device of clock
WO2019047143A1 (en) Paging message receiving method and device, and paging configuration method and device
CN110992920B (en) Live broadcasting chorus method and device, electronic equipment and storage medium
CN104159283A (en) Method and device for controlling message transmission
CN104320707A (en) Playback method and device of network video
JP7137705B2 (en) Synchronization signal block configuration information broadcast, receiving method and apparatus
CN105163391A (en) Data transmission method, terminal and wireless access point
CN105554087A (en) Information setting method and device
US11917562B2 (en) Vehicle-to-everything synchronization method and device
CN105261209A (en) Passenger flow volume determining method and device
CN104811904A (en) Contact setting method and device
CN111866720A (en) Positioning method and device
CN104599691B (en) Audio frequency playing method and device
CN109451799B (en) Time domain information indication method of public control resource set of residual key system information
CN109792674A (en) Accidental access method, device, electronic equipment and computer readable storage medium
CN104484046A (en) Duration monitoring method and duration monitoring device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant