The content of the invention
The brief overview of one or more aspects given below is to provide to the basic comprehension in terms of these.This general introduction is not
The extensive overview of all aspects contemplated, and it is also non-to be both not intended to identify the key or decisive key element of all aspects
Attempt to define the scope in terms of any or all.Its unique purpose is to provide the one of one or more aspects in simplified form
A little concepts think the sequence of more detailed description given later.
There is provided a kind of side for the clock being used in adjust automatically visible light communication system according to an aspect of the present invention
Method, the visible light communication system includes receiving terminal and at least one transmitting terminal.This method includes:Receive from least one hair
The visible light signal for the first transmitting terminal penetrated in end;The visible light signal according to first transmitting terminal is received from determine this first
The clock running parameter of transmitting terminal and the clock running parameter of the receiving terminal;According to the clock running parameter of first transmitting terminal
The clock speed factor of first transmitting terminal is determined with the clock running parameter of the receiving terminal;And according to first transmitting terminal
The clock speed factor update the clock information of first transmitting terminal that receiving terminal is locally stored at predetermined time intervals.
In one example, the clock running parameter of first transmitting terminal refers to the system time corresponding to first transmitting terminal
Unit interval actual experience standard time, and the receiving terminal clock running parameter refer to be corresponding to the receiving terminal
The standard time of the unit interval actual experience of system time, wherein the standard time actually undergone all is with the receiving terminal
What the system cycle of crystal oscillator was unit to measure.
In one example, the clock speed factor of first transmitting terminal is the list of the system time corresponding to the receiving terminal
The standard time of position time actual experience and the mark of the unit interval actual experience of the system time corresponding to the first transmitting terminal
The ratio between punctual.
In one example, the scheduled time is the scheduled time of the system time of the receiving terminal, every the scheduled time, should
The error of the clock information of first transmitting terminal that receiving terminal is locally stored is the scheduled time to subtract first transmitting terminal
The clock speed factor and the product of the scheduled time, wherein updating the clock for first transmitting terminal that the receiving terminal is locally stored
Information includes subtracting the error with the clock information for first transmitting terminal being locally stored.
In one example, the unit interval is a light pulse of the visible light signal for being received from first transmitting terminal
Nominal duration, the nominal duration is equal to the inverse of the nominal baud rate of the visible light signal.
In one example, corresponding to the system time of first transmitting terminal the unit interval actual experience standard time
It is to obtain duration of a light pulse of the visible light signal that measurement is received from first transmitting terminal at the receiving terminal
And be designated as MT in units of the system cycle of crystal oscillator by the receiving terminal2 systems, and corresponding to the system time of the receiving terminal
Standard time of the unit interval actual experience be calculated as (T0 is nominal·f2 is nominal)·T2 systems, wherein T0 is nominalBelieve for the visible ray
Number a light pulse nominal duration, f2 is nominalFor the nominal frequency of the crystal oscillator of the receiving terminal, and T2 systemsFor the receiving terminal
Crystal oscillator the system cycle.
In one example, measurement is received from a light arteries and veins of the visible light signal of first transmitting terminal at the receiving terminal
The duration of punching includes:The visible light signal for being received from first transmitting terminal is converted into data signal;And from the number
The high level or low level of one pulse of word signal start to carry out timing with the system cycle of the crystal oscillator of the receiving terminal until should
High level or low level terminate.
In one example, the visible light signal for being received from the first transmitting terminal is converted into data signal includes:Pass through photoelectricity
The visible light signal is converted into electric impulse signal by diode, defeated when the current value that the photodiode passes through is higher than threshold value
Go out high-voltage level, and low voltage level is exported when the current value that the photodiode passes through is less than the threshold value.The door
Limit value is at least determined according to predetermined mathematical model by the distance between receiving terminal and first transmitting terminal.
In one example, this method also includes:The letter of the visible ray from first transmitting terminal is subsequently being received each time
Number when, repeat the clock running parameter of the determination first transmitting terminal and the clock running parameter of the receiving terminal and stored to updating
First transmitting terminal the clock information the step of.
In one example, when subsequently receiving the visible light signal from first transmitting terminal each time, according to being deposited
The clock information of first transmitting terminal of storage selects the corresponding pseudo-code signal to decode the visible light signal received.
In one example, the clock information for first transmitting terminal that the receiving terminal is locally stored is initially in the receiving terminal
It is being stored during the visible light signal for receiving first transmitting terminal first and be set equal to the receiving terminal at that time clock letter
Breath.
There is provided a kind of the logical of clock being used in adjust automatically visible light communication system according to another aspect of the present invention
T unit, the visible light communication system includes at least one transmitting equipment and the communicator, and the communicator includes:Receive
Device, it receives the visible light signal of the first transmitting equipment at least one transmitting equipment from this;Clock running parameter is determined
Module, it determines the clock running parameter of the first transmitting equipment according to the visible light signal for being received from the first transmitting equipment
With the clock running parameter of the communicator;Clock speed factor determining module, becomes according to the clock of the first transmitting equipment
Change parameter and the clock running parameter of the communicator determine the clock speed factor of the first transmitting equipment;And clock letter
Adjusting module is ceased, it is local that it updates the communicator at predetermined time intervals according to the clock speed factor of the first transmitting equipment
The clock information of the first transmitting equipment of storage.
According to another aspect of the invention there is provided a kind of communicator, including:Processor, the processor is configured to
The visible light signal of the first transmitting equipment from this at least one transmitting equipment is received, is set according to first transmitting is received from
The standby visible light signal determines the clock running parameter of the first transmitting equipment and the clock running parameter of the communicator, root
Determine that first transmitting is set according to the clock running parameter of the first transmitting equipment and the clock running parameter of the communicator
The standby clock speed factor, and the communication is updated according to the clock speed factor of the first transmitting equipment at predetermined time intervals
The clock information for the first transmitting equipment that device is locally stored;And coupled to the memory of the processor.
In accordance with a further aspect of the present invention there is provided a kind of equipment, including:For receiving from least one transmitting equipment
In first transmitting equipment visible light signal device;For according to the visible light signal for being received from the first transmitting equipment
Determine the device of the clock running parameter of the first transmitting equipment and the clock running parameter of receiving device;For according to this first
Launch the clock running parameter of equipment and the clock running parameter of the receiving device determines the clock of the first transmitting equipment
The device of the speed factor;And connect for updating this at predetermined time intervals according to the clock speed factor of the first transmitting equipment
The device of the clock information for the first transmitting equipment that receiving unit is locally stored.
According to another aspect of the present invention there is provided a kind of computer program product, it includes computer-readable medium, should
Computer-readable medium includes:For receiving the at least one transmitting equipment first visible light signal for launching equipment
Code;For determining that the clock of the first transmitting equipment changes ginseng according to the visible light signal for being received from the first transmitting equipment
The code of the clock running parameter of number and receiving device;For being connect according to the clock running parameter of the first transmitting equipment with this
The clock running parameter of receiving unit determines the code of the clock speed factor of the first transmitting equipment;And for according to this
The clock speed factor of one transmitting equipment updates the first transmitting equipment that the receiving device is locally stored at predetermined time intervals
Clock information code.
The method according to the invention and device, the clock information for the transmitting terminal that receiving terminal is locally preserved can in time more
Newly, so that basically identical with the real clock information of transmitting terminal.This is significant for the communication of transmitting-receiving two-end.
In the case that visible light signal is encrypted with the pseudo-code signal changed according to the clock information of transmitting terminal, receiving terminal can basis
The clock information of the transmitting terminal locally stored come select corresponding pseudo-code signal with to the visible light signal received carry out
Decoding.Thus the inevitable pseudo-code sequence with being used for encryption at transmitting terminal of pseudo-code sequence selected is corresponding, so as to ensure that just
Really decrypt.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.Note, it is below in conjunction with accompanying drawing and specifically real
It is only exemplary to apply the aspects of example description, and is understood not to carry out any limitation to protection scope of the present invention.
Fig. 1 show it is a kind of can realize wherein the present invention visible light communication system 100.Visible light communication system 100
Including transmitting terminal 110 and receiving terminal 120.The pseudo-code that transmitting terminal 110 includes encoder 111 and is coupled with encoder 111 is believed
Number generator 112.Encoder 111 receives original communication data, and the pseudo-code signal pair produced using pseudo-code signal generator 112
Original communication data are encoded to produce scrambler signal.Because the scrambler signal of generation is different from original communication data, therefore
Serve the effect of encryption.As it is used in the present context, term " encryption " and " coding ", and " decryption " and " decoding " can be mutual
Use with changing.Original communication data can be the id information associated with transmitting terminal 110.Encoder 111 is by scrambler signal output
To luminescence unit 113, the latter sends the scrambler signal received in the form of visible ray.Luminescence unit 113 can be
LED or other there is the element of lighting function.Transmitting terminal 110 can be the hand-held client in photon Internet of Things.
Receiving terminal 120 includes the visible light signal for receiving the transmitting of transmitting terminal 110 and will be seen that optical signal is converted to number
The receiving unit 123 of word signal.Decoder 121 is received the data signal exported by receiving unit 123 and sent out using pseudo-code signal
The pseudo-code signal that raw device 122 is produced is decoded to it, to recover original communication data.In the visible light communication shown in Fig. 1
A transmitting terminal 110 is illustrate only in system 100, but those skilled in the art are comprehensible, corresponding to a receiving terminal 120
Often there are multiple transmitting terminals 110.
In order that the communication between transmitting terminal 110 and receiving terminal 120 has higher security, prevent high-speed camera from clapping
Duplication optical signal is taken the photograph, so all employ the pseudo-code sequence changed over time in transmitting terminal 110 and receiving terminal 120 to original logical
Letter data is encrypted and decrypted.Therefore, as shown in figure 1, the clock that pseudo-code signal generator 112 is provided with crystal oscillator 114 is believed
The pseudo-code signal changed over time on the basis of number according to the state output of the state machine of transmitting terminal 110.Correspondingly, receiving terminal 120
In the clock signal that is also provided by crystal oscillator 124 of pseudo-code signal transmitter 122 on the basis of according to the shape of the state machine of receiving terminal 120
The pseudo-code signal that state output is changed over time.
Fig. 2 shows a kind of flow chart of the encipher-decipher method used in visible light communication system 100.In step 201,
Transmitting terminal 110 carries out logical operation to obtain scrambler signal to original communication data and the first pseudo-code signal changed over time.
Original communication data can be the information to be sent, such as user identity(ID)Information etc., and can be a kind of Serial No.
Signal.Pseudo-code signal can be the Serial No. changed with the unit interval, and the wherein unit interval can be arranged as required to, example
Such as, daily, per hour, it is per minute, per second etc..The logical operation of original communication data and the first pseudo-code signal can be logic
With, logic or, in logic XOR etc. or above-mentioned computing it is any both or more person combination.
For example original communication data are the ID of transmitting terminal, and are always 00001101.By 5 unit interval
After T under corresponding transmitting terminal state N+5, the first pseudo-code signal can be that 10101010, then original communication data and first are pseudo-
The logical operation of code signal, the process of such as distance is as shown in the table:
Original communication data |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
First pseudo-code signal |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
Scrambler signal |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
In step 202, transmitting terminal 110 sends the scrambler signal in the form of visible light signal.For example, transmitting terminal
110 are sent modulated signal in the form of glistening by LED.For above-mentioned scrambler signal 10100111, LED can be produced
High-frequency flashes, and has light to represent 1, unglazed to represent 0, or vice versa, so as to have effectively achieved visible light communication.
In step 203, receiving terminal 120 receives the visible light signal that transmitting terminal 110 is sent, and the visible light signal is changed
For data signal.For example, being flashed for the high-frequency that LED is produced, there is light to represent 1, it is unglazed to represent 0, or vice versa, so that
The visible light signal of reception can be converted to data signal.The process that optical signal is converted to data signal is as follows:It is photoelectricity first
Conversion, using the electric signal and the characteristic of optical signal of photodiode, forms electric impulse signal.But it is due to transmitting terminal and reception
The position at end is different, i.e., the light signal strength that each transmitting terminal is transmitted into receiving terminal is different, so its electric signal is strong
Weak is also different, thus need the electric current that is formed to photodiode carry out commutating ratio compared with.As when diode is by
When current value is higher than certain certain threshold value, the voltage level values of output are adjusted to high level by photoelectric switching circuit;When passing through light
When the current value of electric diode is less than a certain threshold value, the voltage level values of output are adjusted to low level by photoelectric switching circuit.
The setting of the threshold value is to be set by a mathematical modeling according to different environment, and when such as distant, threshold value can
It is able to can reduce;Apart from it is near when threshold value may relative rise, i.e., the variation relation between threshold value and threshold value is by mathematical modulo
Type is determined, can be linear relationship or non-linear relation.By above procedure, level can be adjusted to certain model
In enclosing, correct pulse shape is ensured with this, to ensure the correct of sampling, so as to ensure the correctness of clock calculation.
In step 204,120 pairs of data signals of receiving terminal are decoded such as logical operation with the second pseudo-code signal, with
Obtain original communication data.Specifically, under corresponding receiving-end state N+5 after 5 unit interval T, the second pseudo-code
Signal is also 10101010, identical with the first pseudo-code signal pattern, start-stop phase.The signal and that 120 pairs of receiving terminal is received
The logical operation of two pseudo-code signals, such as distance process is as shown in the table:
The signal received |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
Second pseudo-code signal |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
Decoded output signal |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
It can be seen that, decoded output signal is 00001101, identical with original communication data, that is, has decoded original communication number
According to.
As described above, in order that receiving terminal can be correctly decoded, the pseudo-code that the pseudo-code signal generator of receiving terminal is produced is believed
Number need change synchronous with the pseudo-code signal that the pseudo-code signal generator of transmitting terminal is produced.Specifically, the change of pseudo-code signal is
By the Determines of the state machine of transmitting-receiving two-end, passing through certain unit interval(For example, 1 second, 1 minute or miscellaneous stipulations
Period)Afterwards, the state of the state machine of transmitting-receiving two-end will be jumped to next state by Last status, while and state
Pseudo-code signal used in the corresponding encryption of machine state and decryption can also make identical change.
In visible light communication system, it is seen that the precision of the clock system of light transmitting terminal 110 and receiving terminal 120 is by respective
Crystal oscillator 114,124 determined.Due to each side such as manufacturing process, working environment, crystal oscillator 114,124 can all have one
Fixed error, this allows for transmitting terminal 110 and the time change of receiving terminal 120 can be different.Assuming that transmitting-receiving two-end was all opened from 0 second
Beginning timing, but the clock system of receiving terminal 120 is relative as soon as possible,, may by the time of 1 second such as using the time of standard as reference
Clock system in transmitting terminal 110 is just reached 0.999999 second, but at this moment the clock system of receiving terminal 120 has arrived at
1.000001 seconds, both errors were 1.000001-0.999999=0.000002 second, at 500000 seconds of the process standard time
Afterwards, the clock system of transmitting-receiving two-end, which is shown, will differ 1 second.
In system in the specific implementation, when the time change of transmitting-receiving two-end clock system is with respective system least unit
Between --- i.e. the cycle of crystal oscillator --- number measure, it is noted that the cycle of crystal oscillator refers to the actual cycle of crystal oscillator herein(Hereafter
Referred to as system cycle of crystal oscillator).For example, it is assumed that the nominal frequency of the crystal oscillator 114 of transmitting terminal 110 is f1 is nominal=1MHz, the mark of crystal oscillator
Claim cycle T1 is nominal=10-6s.If it is desirable that the definitely accurate actual frequency without error, i.e. crystal oscillator 114 of crystal oscillator 114(Hereinafter referred to as
The system frequency of crystal oscillator)f1 system=f1 is nominal=1MHz, then crystal oscillator 114 actual cycle T1 system=T1 is nominal=10-6It is every at s, transmitting terminal 110
f1 is nominal(=106)Individual T1 systemBe designated as the system time of transmitting terminal clock system 1 second, it is this ideally, transmitting end system when
Between 1 second be equal to 1 second standard time.Likewise, it is assumed that the nominal frequency of the crystal oscillator 124 of receiving terminal 120 is f2 is nominal=1MHz,
The nominal period T of crystal oscillator2 is nominal=10-6s.If it is desirable that the definitely accurate system frequency without error, i.e. crystal oscillator 124 of crystal oscillator 124
f2 systems=f2 is nominal=1MHz, then crystal oscillator 124 actual cycle T2 systems=T2 is nominal=10-6Per f at s, receiving terminal 1202 is nominal(=106)Individual T2 systems
Be designated as the system time of receiving terminal clock system 1 second, it is this ideally, 1 second receiving terminal system time be equal to standard
1 second time.
However, due to the factor of each side such as manufacturing process or working environment, the actual frequency and nominal frequency of crystal oscillator it
Between there is certain error, it is and unequal.If for example, f1 system<f1 is nominal=1MHz, then T1 system>T1 is nominal=10-6Second, but transmitting terminal 110
It is still by f1 is nominal(I.e. 106)Individual T1 systemIt is designated as 1 second of the clock system time, during system of this point for understanding transmitting terminal
Between speed reason it is extremely important.Now, 1 second of the clock system at transmitting terminal 110, actually experienced i.e. f1 is nominal·T1 system
Standard time, standard time of the actual experience is more than the standard time of 1 second, i.e. system time at transmitting terminal 110 and relatively marks
It is slow between punctual.If f2 systems>f2 is nominal=1MHz, then T2 systems<T2 is nominal=10-6Second, but receiving terminal 120 is still by f2 is nominal(I.e. 106)It is individual
T2 systemsIt is designated as 1 second of the clock system time.Now, 1 second of the clock system at receiving terminal 120, actually experienced f2 is nominal·
T2 systemsStandard time, standard time of the actual experience is less than the standard time of 1 second, i.e. system time at receiving terminal 120
It is fast compared with the standard time.Thus it may be clearly seen that, the system time of the clock system of transmitting-receiving two-end is why to be faster or slower than mark
Between punctual.
The state change of transmitting terminal 110 and receiving terminal 120 is all on the basis of the clock system of itself, due to above-mentioned receipts
The error between the clock system at two ends is sent out, causes transmitting terminal 110 may be different with the state change of the state machine of receiving terminal 120
Step.By the state machine of transmitting-receiving two-end by taking the unit interval T changes of standard as an example, it is assumed that the clock system of transmitting terminal 110 compares standard
Time is slow, and the clock system of receiving terminal 120 is faster than standard time.After a certain standard time, transmitting terminal 110 and receive
The system time at end 120 differs a unit interval T.Now, transmitting terminal 110 is in state N, and receiving terminal 120 is in state N
The pseudo-code signal that+1, i.e. receiving terminal 120 are used for the pseudo-code signal decrypted with transmitting terminal 110 is used for encrypting is different, therefore reception
End 120 can not correctly be decrypted.
Fig. 3 is the schematic diagram that changes over time of state for the state machine for showing transmitting terminal and receiving terminal.As shown in figure 3,
At moment standard time t0, it is assumed that what the clock system of transmitting terminal and receiving terminal was in alignment with, transmitting terminal is with receiving terminal all in shape
State N, after a period of time has passed, reaches moment standard time t1.Now, transmitting terminal due to clock system it is slower, also in shape
State N+5, and receiving terminal is very fast due to clock system, in state N+6.Therefore the pseudo-code of the decryption selected by receiving terminal is believed
Number with transmitting terminal select encryption pseudo-code signal it is inconsistent, cause decryption malfunction.
As described above, the system time of clock system may be faster or slower than the standard time, in order to weigh the He of transmitting terminal 110
The concept of " clock running parameter " is introduced in the speed degree of the system time of receiving terminal 120, the present invention.Clock running parameter
The standard time of the unit interval actual experience of system time can be corresponded to.It is assumed that with 1 second for the unit time.As above institute
State, corresponding to the seconds of unit 1 of the system time of transmitting terminal 110, the standard time of actual experience is f1 is nominal·T1 system.Take
Certainly in the speed of system clock, the standard time f of the actual experience1 is nominal·T1 systemIt is likely less than or more than 1 second standard time.
Corresponding to the seconds of unit 1 of the system time of receiving terminal 120, the standard time of actual experience is f2 is nominal·T2 systems, the reality
The speed that the time of experience depends on system clock may also be less than or greater than 1 second standard time.
Corresponding to an equal amount of system time of transmitting-receiving two-end, the fact that the actual experience various criterion time it is reflected
Speed relation between system time.Herein, by corresponding to the unit interval of the system time of receiving terminal 120 actual warp
The ratio between the standard time of actual experience of same unit interval of system time of the standard time gone through with corresponding to transmitting terminal 110 claims
For the clock speed factor of transmitting terminal 110.So that the unit interval is 1 second as an example, the clock speed factor Q of transmitting terminal 110=
(f2 is nominal·T2 systems)/(f1 is nominal·T1 system).Obviously, the clock speed factor is equal to the system time by same time transmitting terminal
Amplitude of variation and receiving terminal the ratio between the amplitude of variation of system time.It therefore, it can at receiving terminal 120 according to receiving terminal
The change of 120 system time determines the change of the system time of transmitting terminal 110.
In order to determine the clock speed factor at receiving terminal 120, the system that the local crystal oscillator of receiving terminal 120 can be used
Cycle T2 systemsNumber measure the standard time of the unit interval actual experience corresponding to the system time of transmitting-receiving two-end.Order should
Unit interval is the nominal duration T of a light pulse of the visible light signal that transmitting terminal 110 is launched0 is nominal。T0 is nominalIt is by signal
Nominal baud rate determine, the in particular inverse of baud rate.For example, in the case where nominal baud rate is 4800bps, one
The nominal duration T of individual light pulse0 is nominal=1/4800 second.In visible light communication system, the baud for the visible ray of communication
Rate is usually what is reached an agreement on by transmitting-receiving two-end, therefore has been known by receiving terminal 120.Corresponding to the system time of receiving terminal 120
T0 is nominalThe standard time of actual experience, which can calculate, to be obtained, and is specially (T0 is nominal·f2 is nominal)·T2 systems, i.e. (T0 is nominal·f2 is nominal) individual system
The system cycle.Corresponding to the T of the system time of transmitting terminal 1100 is nominalThe standard time of actual experience can be actual at receiving terminal 120
The duration for measuring a light pulse of the visible light signal from transmitting terminal 110 obtains and with the crystal oscillator of receiving terminal 120
The system cycle is that unit is designated as MT2 systems.Correspondingly, clock speed factor Q=(T of transmitting terminal 1100 is nominal·f2 is nominal)/M.Thus,
The system time passed through according to receiving terminal 120, can calculate the change of the system time of transmitting terminal 110.
Usually, early stage visible light communication system is set up, the error of transmitting-receiving two-end clock system is not also with the time
It is exaggerated, it can be considered that be in alignment with.Therefore, at the beginning of receiving terminal 120 and transmitting terminal 110 during early stage such as equipment debugging
During secondary communication, the clock information of transmitting terminal 110 is locally stored in receiving terminal 120, the clock of transmitting terminal 110 can specifically be believed
Breath is set to consistent with the clock information of now receiving terminal 120.Clock information can refer to the system time value of clock system.Assuming that this
When transmitting terminal 110 and receiving terminal 120 the system time value of clock system when being 0.Because transmitting-receiving two-end clock system is in alignment with
, so the now real clock information of the clock information for the transmitting terminal 110 that receiving terminal 120 is locally stored and transmitting terminal 110
It is consistent.
Note, the change of the clock information of the transmitting terminal 110 preserved at receiving terminal 120 is to be with receiving terminal 120 itself
The change of system time is consistent, therefore, after system foundation as time goes by, the transmitting terminal preserved at receiving terminal 120
Error is produced between real clock information at 110 clock information and transmitting terminal 110.Specifically, by receiving terminal 120
The scheduled time of system time, the amplitude of variation of the clock information for the transmitting terminal 110 that receiving terminal 120 is locally stored is also predetermined for this
Time, but in fact, the amplitude of variation of the real clock information of transmitting terminal 110, which should be the scheduled time, is multiplied by transmitting terminal 110
The time speed factor.Therefore, every the scheduled time, the error of generation subtracts transmitting terminal 110 equal to the scheduled time
The clock speed factor and the product of the scheduled time.Correspondingly, the mistake can be subtracted with the clock information of the transmitting terminal 110 stored
Difference to it to be updated.Every prescribed time period, receiving terminal 120 just disappears on the clock information of the transmitting terminal 110 stored
Except the margin of error, to cause the clock information and the real clock information phase one at transmitting terminal 110 of the transmitting terminal 110 after updating
Cause.
It is used as illustrated examples, it is assumed that the scheduled time is 5 minutes, and assumes Q=4/5.When 0, work as receiving terminal
When at 120 by system time 5 minutes, 5 points when the clock information for the transmitting terminal 110 that receiving terminal 120 is locally preserved is 0.However,
The change of the real clock system of transmitting terminal 110 is that 5 × 4/5=4 minutes, i.e. error are 5-4=1 minute.Correspondingly, will locally it protect
5 points subtract 1 minute error during the clock information 0 for the transmitting terminal 110 deposited, and are updated to when 04 points.Similarly, at receiving terminal 120
When passing through 5 minutes system times again, 9 points when the clock information of the transmitting terminal 110 locally preserved is 0, wherein again comprising produced
Error 1 minute, therefore, 8 points when the clock information of the transmitting terminal 110 after renewal is 0.
Because the error of transmitting-receiving two-end crystal oscillator is possible to the changes in environmental conditions such as temperature, therefore the clock of transmitting terminal 110
The speed factor may also change.So, can be according to newly connecing when subsequently receiving the visible light signal of the transmitting terminal 110 every time
The visible ray received recalculates the clock speed factor.Correspondingly, receiving terminal 120 is according to the transmitting terminal 110 locally stored
Clock information select the pseudo-code signal for decryption.Due to the clock information of, the transmitting terminal 110 locally stored be every
Predetermined amount of time adjust automatically, so will not amplify with the error of the real clock information at transmitting terminal 110.And then, protect
Demonstrate,proved according to the clock information of the transmitting terminal 110 stored at receiving terminal 120 select pseudo-code signal can with transmitting terminal 110
Can be synchronous according to the pseudo-code signal that the real clock information of transmitting terminal 110 is selected.
Fig. 4 is the side for showing the clock being used in adjust automatically visible light communication system according to an aspect of the present invention
The flow chart of method.Although for make explanation simplify this method is illustrated and is described as a series of actions, it should be understood that and understand,
The order that these methods are not acted is limited, because according to one or more embodiments, some actions can occur in different order
And/or with concomitantly occurring from other actions depicted and described herein.
In step 401, receiving terminal receives the visible light signal of the first transmitting terminal at least one transmitting terminal.This connects
Receiving end can be the receiving terminal 120 in Fig. 1, and the first transmitting terminal can be the transmitting terminal 110 in Fig. 1.The visible light signal is light
Pulse signal, for example, have light to represent 1, unglazed to represent 0, or vice versa.The visible light signal generally comprises the use of first transmitting terminal
Family identity(ID)Information, the id information is that the pseudo-code signal for using the system time with the first transmitting terminal to change is encrypted.
In addition, the visible light signal also includes being used to identify the device number of the identifier, such as the first transmitting terminal of first transmitting terminal.Hair
The device number for penetrating end is uniqueness in systems, therefore a certain transmitting terminal can be uniquely identified by device number.The mark
Symbol is unencryption, can directly be understood and obtained with receiving end.
In step 402, determine that the clock of the first transmitting terminal changes according to the visible light signal for being received from the first transmitting terminal and join
The clock running parameter of number and receiving terminal.As mentioned above, the clock running parameter of the first transmitting terminal corresponds to the first hair
Penetrate the unit interval actual standard time undergone of the system time at end, the wherein standard time of the actual experience can be with connecing
The system cycle of the crystal oscillator of receiving end is unit to measure.In one example, the unit interval is from the visible of the first transmitting terminal
The nominal duration of one light pulse of optical signal, the latter is equal to the inverse of the nominal baud rate of visible light signal.Correspond to
The unit interval actual standard time undergone of the system time of first transmitting terminal can be surveyed by actual at receiving terminal
The duration for measuring a light pulse of the visible light signal is obtained and is designated as in units of the system cycle of the crystal oscillator of receiving terminal
M·T2 systems.In one example, the visible light signal can be converted into data signal by receiving terminal, and from the data signal
The high level or low level of one pulse start until the high level or low level terminate to experienced how many T2 systemsCounted
Number, obtained number as M.
The clock running parameter of receiving terminal can refer to the unit interval actual warp of the system time corresponding to receiving terminal
The standard time gone through, the wherein standard time of the actual experience can be counted with units of the system cycle of the crystal oscillator of receiving terminal
Amount.In nominal duration T of the unit interval for a light pulse of the visible light signal from the first transmitting terminal0 is nominalReality
In example, (T is calculated as corresponding to the standard time of the unit interval actual experience of the system time of receiving terminal0 is nominal·
f2 is nominal)·T2 systems。
In step 403, determined according to the clock running parameter of the first transmitting terminal and the clock running parameter of receiving terminal
The clock speed factor of first transmitting terminal.The clock speed factor of first transmitting terminal should for the system time corresponding to receiving terminal
The standard time of unit interval actual experience and the unit interval actual experience of the system time corresponding to the first transmitting terminal
The ratio between standard time.In the light pulse that the unit interval is the visible light signal from the first transmitting terminal when nominally continuing
Between T0 is nominalExample in, clock speed factor Q=(T of first transmitting terminal0 is nominal·f2 is nominal)/M.Due to T0 is nominal、f2 is nominalAll it is to receive
End is known, and to be actual measurement obtain M, therefore, the clock speed factor of the first transmitting terminal can be obtained in receiving terminal
Size.
In step 404, the receiving terminal is updated according to the clock speed factor of the first transmitting terminal at predetermined time intervals local
The clock information of first transmitting terminal of storage.As described above, the clock speed factor, which is equal to, passes through same time, the first transmitting terminal
The ratio between the amplitude of variation of system time and the amplitude of variation of system time of receiving terminal.Therefore, often being passed at receiving terminal, this makes a reservation for
The system time of time, the real change amplitude of the system time of the first transmitting terminal should be the clock speed factor and the pre- timing
Between product, but the amplitude of variation of the system time of the first transmitting terminal that receiving terminal is locally stored is the scheduled time, thus this
The error of the clock information of first transmitting terminal of ground storage subtracts the product for the scheduled time.And then, be locally stored
The clock information of one transmitting terminal subtracts the error can eliminate the error to be updated.In this way, often by the pre- timing
Between, just update the clock information for the first transmitting terminal being once locally stored.
The clock information of local first transmitting terminal of receiving terminal can be initially
Initial stage is stood in construction in a systematic way(For example, first)It is being stored during communication and the clock information of receiving terminal at that time can be set equal to.This is
Because the communication first of the transmitting-receiving two-end in visible light communication system is usually to be set up initial stage in system, for example, sets up and adjust in system
During examination, the clock information of the first transmitting terminal is not stored at receiving terminal also now.Due to thinking transmitting-receiving the initial stage of setting up in system
The clock information at two ends is substantially coincident, so, directly it can regard the current clock information of receiving terminal as the first transmitting terminal
Clock information to be stored in receiving terminal local.Clock information can refer to the system time of clock system.For example, receiving terminal is first
When receiving the visible light signal of the first transmitting terminal, the mark of the first transmitting terminal can be directly interpreted from visible light signal
Symbol, such as device number, and the clock information of the first transmitting terminal is stored in association in the identifier locally with first transmitting terminal.
Although being not explicitly depicted in Fig. 4, this method be additionally may included in it is follow-up receive each time from this first
During the visible light signal of transmitting terminal, the clock speed factor can be recalculated according to the visible ray newly received, so that according to
The clock speed factor newly calculated updates the clock information for the first transmitting terminal being locally stored every the scheduled time.Pass through
This mode, the clock information for the transmitting terminal that receiving terminal is locally preserved can update in time, thus with transmitting terminal it is real when
Clock information is basically identical.Receiving terminal can locally be stored in the visible ray of subsequently received first transmitting terminal with basis
The clock information of first transmitting terminal selects the corresponding pseudo-code signal to decode the visible light signal received.Thus select
The inevitable pseudo-code sequence with being used for encryption at the first transmitting terminal of pseudo-code sequence be corresponding, correctly decrypted so as to ensure that.
Fig. 5 is the block diagram for showing communicator 500 according to an aspect of the present invention.Receiver 502 can be received and come from
The visible light signal of the first transmitting equipment at least one transmitting equipment.Clock running parameter determining module 504 can be according to connecing
The visible light signal received from the first transmitting equipment determines the clock running parameter and communicator 500 itself of the first transmitting equipment
Clock running parameter.As previously described, clock running parameter can correspond to the unit interval actual experience of system time
Standard time.It is when nominally the continuing of a light pulse of the visible light signal from the first transmitting equipment in the unit interval
Between in the case of, changed corresponding to standard time of unit interval actual experience of the system time of the first transmitting equipment by clock
Parameter determination module 504 measures a light arteries and veins of the visible light signal for being received from the first transmitting equipment at the communicator 500
The duration of punching obtains and is designated as MT in units of the system cycle of the crystal oscillator of communicator 5002 systems, and corresponding to this
The standard time of the unit interval actual experience of the system time of communicator 500 is by clock running parameter determining module 504
It is calculated as (T0 is nominal·f2 is nominal)·T2 systems, wherein T0 is nominalFor the nominal duration of a light pulse of the visible light signal, f2 is nominal
For the nominal frequency of the crystal oscillator of the communicator 500, and T2 systemsFor the system cycle of the crystal oscillator of the communicator 500.Clock
Speed factor module 506 can change according to the clock running parameter of the first transmitting equipment and the clock of communicator 500 itself and join
Number determines the first clock speed factor for launching equipment.According to an aspect of the present invention, clock speed factor determining module is by
The unit interval actual warp for the system time that the clock speed factor of one transmitting equipment is determined as corresponding to the communicator 500
The ratio between the standard time of the unit interval actual experience of system time of the standard time gone through with launching equipment corresponding to first.
Clock information modulation module 508 updates communicator 500 at predetermined time intervals according to the clock speed factor of the first transmitting equipment
The clock information for the first transmitting equipment being locally stored.According to an aspect of the present invention, the scheduled time is communicator 500
The scheduled time of system time, every the scheduled time, the clock information for the first transmitting equipment that communicator 500 is locally stored
Error subtract the clock speed factor of the first transmitting equipment and the product of the scheduled time, thus, clock for the scheduled time
Information adjusting module 508 subtracts the error to be updated with the clock information for the first transmitting equipment being locally stored.Follow-up
When receiving the visible light signal from the first transmitting equipment each time, decoder 510 can be set according to the first transmitting stored
Standby clock information selects the corresponding pseudo-code signal to decode the visible light signal received.
Communicator 500 may also include memory 514.Memory 514 can store clock information 516, the such as first transmitting
The clock information of equipment.Communicator 500 also includes processor 512.The processor 512 can be exclusively used in analyzing receiver
The processors of 502 information received, control communicator 500 one or more assemblies processor, and/or both analyze reception
The information that device 502 is received controls the processor of the one or more assemblies of communicator 500 again.
Fig. 6 is the block diagram for showing communicator 600 according to an aspect of the present invention.It is to be appreciated that communicator
600 are represented as including functional block, and these functional blocks can be represented by processor, software or its combination(Such as firmware)Realize
Functional block.Communicator 600 includes the logic groups 602 for the electronic building brick that can be cooperated.For example, logic groups 602 may include to use
In the electronic building brick 604 for the visible light signal for receiving the first transmitting equipment at least one transmitting equipment.Logic groups
602 may include for determining that the clock of the first transmitting equipment becomes according to the visible light signal for being received from the first transmitting equipment
Change the electronic building brick 606 of parameter and the clock running parameter of receiving device.Logic groups 602 may also include for according to this first
Launch the clock running parameter of equipment and the clock running parameter of the receiving device determines the clock of the first transmitting equipment
The electrical component 608 of the speed factor.In addition, logic groups 602 may also include for according to this first transmitting equipment the clock it is fast
The slow factor updates the electronic building brick of the clock information for the first transmitting equipment that receiving device is locally stored at predetermined time intervals
610.It is used to perform and the function associated with 610 of electronic building brick 604,606,608 in addition, communicator 600 may include to preserve
Instruction memory 612.Although illustrated as the outside in memory 612 it should be appreciated that electronic building brick 604,606,
One or more of 608 and 610 may be present in memory 612.
It will be understood by those skilled in the art that any technology in various different technologies and skill can be used in information and signal
Represented with skill.For example, above description quote from the whole text data, instruction, order, information, signal, position(Bit), code element and
Chip can be represented by voltage, electric current, electromagnetic wave, magnetic field or magnetic particle, light field or optical particle or its any combinations.
Those skilled in the art will further appreciate that, the various illustratives described with reference to the embodiments described herein
Logic plate, module, circuit and algorithm steps can be realized as electronic hardware, computer software or combination of the two.To be clear
Explain to Chu this interchangeability of hardware and software, various illustrative components, frame, module, circuit and step be above with
Its functional form makees vague generalization description.Such feature be implemented as hardware or software depend on concrete application and
Put on the design constraint of total system.Technical staff can be realized described for every kind of application-specific with different modes
Feature, but such realize that decision-making should not be interpreted to cause departing from the scope of the present invention.
General place can be used with reference to various illustrative logic plates, module and the circuit that presently disclosed embodiment is described
Manage device, digital signal processor(DSP), application specific integrated circuit(ASIC), field programmable gate array(FPGA)Or other compile
Journey logical device, discrete door or transistor logic, discrete nextport hardware component NextPort or its be designed to carry out function described herein
Any combinations are realized or performed.General processor can be microprocessor, but in alternative, the processor can be appointed
What conventional processor, controller, microcontroller or state machine.Processor is also implemented as the combination of computing device, example
The one or more microprocessors that are cooperated with the combination of microprocessor, multi-microprocessor, with DSP core such as DSP or it is any its
His such configuration.
It can be embodied directly in hardware, in by processor with reference to the step of the method or algorithm that embodiment disclosed herein is described
Embodied in the software module of execution or in combination of the two.Software module can reside in RAM memory, flash memory, ROM and deposit
Reservoir, eprom memory, eeprom memory, register, hard disk, removable disk, CD-ROM or known in the art appoint
In the storage medium of what other forms.Exemplary storage medium is coupled to processor to enable the processor from/to the storage
Medium is read and write-in information.In alternative, storage medium can be integrated into processor.Processor and storage medium can
Reside in ASIC.ASIC can reside in user terminal.In alternative, processor and storage medium can be used as discrete sets
Part is resident in the user terminal.
In one or more exemplary embodiments, described function can be in hardware, software, firmware or its any combinations
It is middle to realize.If being embodied as computer program product in software, each function can be used as the instruction of one or more bars or generation
Code storage is transmitted on a computer-readable medium or by it.Computer-readable medium includes computer-readable storage medium and communication
Both media, it includes any medium for facilitating computer program to shift from one place to another.Storage medium can be can quilt
Any usable medium that computer is accessed.It is non-limiting as example, such computer-readable medium may include RAM, ROM,
EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage apparatus can be used to carry or store instruction
Or the desirable program code and any other medium that can be accessed by a computer of data structure form.Any connection is also by by rights
Referred to as computer-readable medium.If for example, software is to use coaxial cable, fiber optic cables, twisted-pair feeder, digital subscriber line
(DSL)Or the wireless technology of such as infrared, radio and microwave etc is passed from web site, server or other remote sources
Send, then the coaxial cable, fiber optic cables, twisted-pair feeder, DSL or such as infrared, radio and microwave etc is wireless
Technology is just included among the definition of medium.Disk as used herein(disk)And dish(disc)Including compact disc
(CD), laser disc, laser disc, digital versatile disc(DVD), floppy disk and blu-ray disc, which disk(disk)Often reproduced in the way of magnetic
Data, and dish(disc)With laser reproduce data optically.Combinations of the above should also be included in computer-readable medium
In the range of.
It is for so that any person skilled in the art all can make or use this public affairs to provide of this disclosure be previously described
Open.Various modifications of this disclosure all will be apparent for a person skilled in the art, and as defined herein general
Suitable principle can be applied to spirit or scope of other variants without departing from the disclosure.Thus, the disclosure is not intended to be limited
Due to example described herein and design, but it should be awarded and principle disclosed herein and novel features phase one
The widest scope of cause.