Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.Note, the aspects described below in conjunction with the drawings and specific embodiments is only exemplary, and should not be understood to carry out any restriction to protection scope of the present invention.
Fig. 1 shows the simplified block diagram can putting into practice visible light communication system of the present invention wherein.Visible light communication system 100 comprises photo emissions end 110 and photon acceptor end 120.Photo emissions end 110 comprises encoder 111.Encoder 111 receives original communication data.Original communication data can be any information datas that will convey to photon acceptor end with photo emissions end 110, such as, and user identity (ID) information, operational order etc.
Encoder 111 can adopt any coded system to original communication data of encoding.Common coding can comprise nrz encoding, nrzi encoding, NRZI reversion counting coding etc.Nrz encoding represents 1 with high level, and low level represents 0.Nrzi encoding is for representing a logic such as 1(0 with the saltus step of the upset of signal and low and high level), and signal low and high level remain unchanged represent another logic such as 0(1).RZ step-by-step counting coding is one group by raw information with n bit, is provided with between group the time interval, often the interior information representing n bit in this group signal with the number of pulse of group between two adjacent groups signal.As shown in table 1 below, work as n=2, when being namely one group with two bits, represent 00,01,10 and 11 with 1,2,3 and 4 pulse respectively.As shown in Figure 2, between group, the time interval is set as 25ms, the representative information position 00,10 respectively of two group numbers in figure.According to RZ coding, represent information bit 00 with a pulse, represent information 10 with 3 pulses.Note, RZ in table 1 coding 10,101010 in 1 and 0 be with representing high level and low level, and noninformation bit.
NRZI reversion counting coding is also be one group by raw information with n bit, is provided with between group the time interval between two adjacent groups signal.Be different from RZ step-by-step counting coding, NRZI is the information representing n bit in this group signal in often organizing with high level to the reversion number of times of low level (or low level is to high level) respectively.As shown in table 2 below, work as n=2, when being namely one group with two bits, represent 00,01,10 and 11 with 1,2,3 and 4 reversion number of times respectively.As shown in Figure 2, between group, the time interval is set as 25ms, the representative information 00,10 respectively of two group numbers in figure.According to nrzi encoding, represent information bit 00 with 1 signal level reversion such as 1 to 0 or 0 to 1, represent information bit 10 with three signal level reversions.
Encoder 111 exports coded signal to luminescence unit 113.With not luminous, luminescence unit 113 such as can represent that the coded signal received sends with the form of visible ray by low level by representing high level signal with luminescence.Luminescence unit 113 can be LED or other there is the element of lighting function.Photo emissions end 110 can be photon Internet of Things, such as, portable set in photon entrance guard system, such as mobile phone, panel computer, PDA and optical key etc.Optical key realizes namely based on visible light communication the key opening door lock, also can be called photon key.Now, luminescence unit 113 can be the photoflash lamp on mobile phone.Processor 112 can controlled encoder 111, luminescence unit 113 operation.Processor 112 can be general processor, digital signal processor (DSP) etc.General processor can be microprocessor, but in alternative, and this processor 112 also can be the processor of any routine, controller, microcontroller or state machine.Processor 112 can also be implemented as the combination of computing equipment, the combination of such as DSP and microprocessor, multi-microprocessor, with one or more microprocessor of DSP central cooperation or any other this type of configure.
Receiving terminal 120 comprises the visible light signal for receiving transmitting terminal 110 transmitting and visible light signal is converted to the receiving element 123 of digital signal.Such as, for the high-frequency flicker that LED produces, there is light to represent high level, unglazedly represent low level, otherwise or, thus the visible light signal of reception can be converted to digital signal.Receiving element 123 can be light-sensitive device, such as photodiode.Utilize the signal of telecommunication of photodiode and the characteristic of light signal, will electric impulse signal be formed by opto-electronic conversion.Because photo emissions end 110 is different with the relative position of photon acceptor end 120 in practice, namely the light signal strength that each photo emissions end 110 is transmitted into photon acceptor end 120 is different, so its signal of telecommunication power is also different, so need the electric current to photodiode is formed to carry out commutating ratio comparatively.As the current value that passes through when diode higher than certain certain threshold value time, the voltage level values of output is adjusted to high level by photoelectric switching circuit; When the current value by photodiode is lower than a certain threshold value, the voltage level values of output is adjusted to low level by photoelectric switching circuit.The setting of this threshold value is set according to different environment by a Mathematical Modeling, and as time distant, threshold value may reduce; May relatively raise apart from threshold value time near.By above process, can level be adjusted in certain limit, ensure correct pulse shape with this, to ensure the accuracy of sampling as far as possible.
Decoder 121 receives the digital signal that exported by receiving element 123 and decodes to it, to recover original communication data.Processor 122 can control the operation of decoder 121, receiving element 123.Processor 122 can be general processor, digital signal processor (DSP) etc.General processor can be microprocessor, but in alternative, and this processor 122 also can be the processor of any routine, controller, microcontroller or state machine.Processor 122 can also be implemented as the combination of computing equipment, the combination of such as DSP and microprocessor, multi-microprocessor, with one or more microprocessor of DSP central cooperation or any other this type of configure.
Fig. 3 shows the schematic diagram can putting into practice communication environment 300 of the present invention wherein.Communication environment 300 can be photon entrance guard system.In this photon entrance guard system, photon acceptor end 320 can be mounted in the photon lock on door, is identified, and take correspondingly to operate by the visible light signal of receiving package containing subscriber identity information to user identity.Photon acceptor end 320 can comprise receiving element 321, the light-sensitive device of such as photodiode and so on.Photon acceptor end 320 also can comprise process chip 322, such as, decode for the digital signal after opto-electronic conversion, and to control of the various operations of photon acceptor end 320 etc.
Corresponding with photon acceptor end 320 is photo emissions end 310, herein also referred to as photon client-side 310.User can use photon client-side 310 to launch visible light signal to reach the object of unblock to photon acceptor end 320.Photon acceptor end 320 can communicate with central server 330, such as can by data upload to server 330.Such as when finding disabled user, the systems such as warning, monitoring can be given by event message transmission, to be processed by such as property management personnel.For the purpose of safety, photon acceptor end 320 is unidirectional often with the communication of server 330.
The feature of visible light communication communication is launched with visible ray form at information, and receiving terminal by opto-electronic conversion and by sampling judgement to obtain digital signal, and finally decodes original communication data.In order to reduce the error rate of photon acceptor end receiving optical signals, often grouping being carried out to data and sending and receive.Such as, send the data of 50, so can divide into groups to it, as 2 is one group, 25 groups altogether.Group signal and group signal between be provided with the time interval, be referred to as interblock space; Simultaneously in the middle of each group light signal, between signal and signal, be also provided with the time interval.For nrz encoding, send one group of data 01, wherein 0 can represent with low level is namely not luminous, and 1 can represent with high level and luminescence.When sending these group data with visible light signal, suppose to represent that the luminescence of low and high level and non-luminous time are all 1ms, the time interval (i.e. interval in group) in group between each signal is 2ms.Now, the luminescence process sending this information with visible light signal is: not luminous (1ms)+not luminous (in group 2ms)+luminous (1ms)+luminous (in group 2ms).Similarly, suppose transmission two groups of data 00,01, and be spaced apart 2ms in group, interblock space is 30ms, and the luminescence process sending this information with visible light signal is: not luminous (1ms)+not luminous (in group 2ms)+not luminous (1ms)+not luminous (in group 2ms)+not luminous (between group 30ms)+not luminous (1ms)+not luminous (in group 2ms)+luminous (1ms)+luminous (in group 2ms).In visible light communication system, in group, interval group intrinsic parameter represents, and Parametric Representation between interblock space group.
Photon client-side 310 can control luminescence when launching visible light signal by arranging parameter between group intrinsic parameter and group.Obviously, can ensure photon acceptor end 320 decode the visible light signal received success rate prerequisite under, group intrinsic parameter and group between parameter be the smaller the better.Between the smallest group intrinsic parameter that photon client-side 310 can use and smallest group, parameter is called as the optimum luminous parameters of this photon client-side 310.Can be about 2ms to about 10ms for the receptible common group of intrinsic parameter scope of photon acceptor end 320, between receptible group of institute, parameter area can be about 30ms to 60ms.
Day by day universal along with portable sets such as mobile phones, utilizes the photoflash lamp on these portable sets that portable set itself is had great convenience as photon client-side.This does away with conventional door access control system for the demand making special smart card, reduce cost, a mobile phone can be used to unlock different gate inhibition simultaneously, greatly improve convenience.But the performance parameter of the photoflash lamp of the mobile phone of often kind of model is different, such as, the time delay of the switching between the intensity of the luminescence of different mobile phone is different, luminous and not luminous is different etc., causes optimized parameter to be also different.Replace special smart card no doubt to reduce cost and improve service efficiency with the mobile phone of each user oneself, but the mobile phone used due to each user is not quite similar, correspondingly, optimum luminous parameters is also not quite similar.
According to an aspect of the present invention, improve the scheme that a kind of luminous parameters to photon client-side carries out tuning.According to the program, making the minimum parameter of photon client-side in parameter region, select luminous parameters, then launch visible light signal with selected luminous parameters, correspondingly receive the decode this visible light signal by photon acceptor end.Repeat this transmitting and receiving operation pre-determined number, if photon acceptor end to the discrimination of the visible light signal launched with this selected luminous parameters lower than predetermined threshold, then in this parameter region, select next higher luminous parameters and again repeat this to launch and decode operation pre-determined number, until be decoded into power higher than this predetermined threshold.Now, current selected luminous parameters is designated optimum luminous parameters and preserves explicitly in the server with the model of this photon client-side.When the photon client-side of other same models communicates with photon acceptor end first, this server can be accessed to obtain the optimum luminous parameters be associated with self model, after this carry out visible light communication with this optimum luminous parameters and photon acceptor end.The program is described in detail below in conjunction with Fig. 3.
First photon client-side 310 can encode to test data, to obtain encoded test data.Photon client-side 310 can adopt any suitable encoding scheme such as nrz encoding, RZ step-by-step counting coding, NRZI reversion counting coding to encode to test data.This test data can be that photon client-side 310 is optional, or also can be standard testing data.Test data can be uploaded onto the server 330 by photon client-side 310, particularly, test data can be uploaded in the database 340 be associated with server 330.This database 340 can be any suitable databases such as myql database, sql server database, oracle database.
After this or meanwhile, photon client-side can choose luminous parameters, such as luminous parameters can be selected in parameter region.In one example, luminous parameters comprises parameter between group intrinsic parameter and group.Group intrinsic parameter parameter region between such as can be about 2ms to 10ms, and between group parameter parameter region between can be about 30ms to 60ms.The luminous parameters chosen first can be between parameter region in minimum luminous parameters.Such as, the luminous parameters chosen first can be group intrinsic parameter is 2ms, and between group, parameter is 30ms.Photon client-side 320 launches visible light signal according to selected luminous parameters subsequently.Particularly, photon client-side 320 encoded test data is launched with the form of this visible light signal.Correspondingly, photon acceptor end 320 receives and this visible light signal of decoding.Particularly, the receiving element 321 of photon acceptor end 320 receives this visible light signal and converts thereof into digital signal by opto-electronic conversion, and this digital signal is imported into process chip 322 and carries out decoding to obtain the test data through decoding.Then, photo emissions end 310 can launch this visible light signal again, and is again received the decode by photon acceptor end 320.This send-receive decode operation pre-determined number can be repeated, such as 100 times.Meanwhile, each test data through decoding can be uploaded onto the server 330 by photon acceptor end 320, such as, be uploaded to the database 340 be associated with server 330.Photon acceptor end 320 can after this repeats for 100 times, uploads onto the server 330, the test data of upper transmission from one channel to another decoding immediately after also can at every turn decoding by disposable for 100 that obtain test datas through decoding.
Whether photon client-side 310 accessible services device 330 is consistent with the test data that it is uploaded at first to compare the test data through decoding that photon acceptor end 310 uploads, if consistent, then the decoding of photon acceptor end 320 pairs of visible light signals is successful, otherwise decodes unsuccessfully.If in this 100 send-receive decode operations circulation, the success rate of photon acceptor end 320 lower than predetermined threshold, such as 96%, then photon client-side 310 chooses another luminous parameters, such as, can select next higher luminous parameters in parameter region.To organize, the step-length of intrinsic parameter is 0.4ms, the step-length of parameter is for 1.5ms between group, and next higher luminous parameters that photon client-side 310 is selected is respectively parameter 31.5ms between group intrinsic parameter 2.4ms, group.According to the luminous parameters that this is chosen, send-receive decode operation 100 times again can be repeated.Then, again judge this 100 times whether be decoded into power still lower than this predetermined threshold.
If be decoded into power still lower than this predetermined threshold, then photon client-side 310 chooses another luminous parameters again with above-mentioned step-length, such as, organize parameter 33ms between intrinsic parameter 2.8ms, group.According to the luminous parameters that this is chosen, send-receive decode operation 100 times again can be repeated.And then judge to be decoded into power.Repeat aforesaid operations, until judge that being decoded into power is not less than this predetermined threshold.Now, between selected group intrinsic parameter and group, parameter is all photon acceptor end 320 receptible minimum parameter under guarantee is decoded into the prerequisite of power, is therefore the optimum luminous parameters of this photon client-side 310.Now, the luminous parameters of current selection is used as optimum luminous parameters by photon client-side 310.Such as, this optimum luminous parameters can be uploaded onto the server 330 and store explicitly with the unit type of photon client-side 310 by photon client-side 310.Photon client-side 310 also can preserve this optimum luminous parameters.
So far, the optimum luminous parameters of this photon client-side 310 has been stored in server 330.Performance parameter due to photon client-side 310 luminescence of such as mobile phone and so on is substantially same in same model, and therefore the optimum luminous parameters of the mobile phone of same model is basically identical.By which, the optimum luminous parameters of main flow mobile phone model on market all can be kept in server 330.Thus, certain user when using mobile phone to communicate with photon acceptor end 320 first, can first access services device 330 to obtain the optimum luminous parameters that is associated with this mobile phone model, and carry out visible light communication according to this optimum luminous parameters and photon acceptor end 320.Thereby, it is possible to obtain the fastest, be decoded into the highest visible light communication effect of power.
Fig. 4 shows the flow chart 400 of the tuning method of the luminous parameters for photon client-side.In step 412, photon client-side can choose luminous parameters.In one example, can select luminous parameters in parameter region, luminous parameters comprises parameter between group intrinsic parameter and group.Group intrinsic parameter parameter region between such as can be about 2ms to 10ms, and between group parameter parameter region between can be about 30ms to 60ms.
In step 414, photon client-side launches visible light signal according to selected luminous parameters.Particularly, this visible light signal passes on encoded test data.In one example, photon client-side can be encoded to test data, to obtain this encoded test data.Photon client-side can adopt any suitable encoding scheme such as nrz encoding, RZ step-by-step counting coding, NRZI reversion counting coding to encode to test data.Test data can upload onto the server by photon client-side, such as, in the database be associated with server.As understood by those skilled in the art, this coding and upload procedure can be carried out before step 412, afterwards or simultaneously, and do not affect scope of the present invention.
In step 416, photon acceptor termination is received and this visible light signal of decoding.In one example, photon acceptor end converts the visible light signal received to digital signal by opto-electronic conversion, and this digital signal of decoding is to obtain the test data through decoding.
At decision box 418, judge whether to have repeated this send-receive decode operation 414,416 pre-determined number.If do not reach this pre-determined number, such as 100 times, then flow process is back to step 414.Until at decision box 418, judge to have repeated pre-determined number, then flow process marches to decision box 420, to judge whether to be decoded into power lower than predetermined threshold.When above-mentioned execution send-receive decode operation 414,416, each test data through decoding can upload onto the server, such as, in the database be associated with server by photon acceptor end.Optionally, photon acceptor end after the repeating of this pre-determined number, can upload onto the server disposable for the multiple test datas through decoding obtained, the test data of upper transmission from one channel to another decoding immediately after also can at every turn decoding.
At decision box 420, whether what photon client-side judged the decode operation of this pre-determined number is decoded into power lower than predetermined threshold.In one example, whether photon client-side may have access to this server consistent with the test data that it is uploaded at first to compare the test data through decoding that photon acceptor end uploads, if consistent, then the decoding of photon acceptor end to visible light signal is successful, otherwise decodes unsuccessfully.If this pre-determined number send-receive decode operation circulation in, photon acceptor end be decoded into power lower than predetermined threshold, such as 96%, flow process marches to step 412.
In step 412, photon client-side chooses another luminous parameters, such as, can select next higher luminous parameters in parameter region.In one example, choose toward increasing progressively greatly from childhood with particular step size photon client-side Selecting All Parameters is minimum luminous parameters between parameter region.Such as, first pass pre-determined number repeat its transmission, decode operation circulation be decoded into power less than sufficient predetermined threshold time, parameter 31.5ms between group intrinsic parameter 2.4ms, group can be respectively for the luminous parameters of the repetitive operation of second time pre-determined number, suppose that the step-length of group intrinsic parameter be the step-length of parameter between 0.4ms, group is 1.5ms.Then, flow process marches to step 414.
Repeat above-mentioned flow process, until march to decision box 420, and judge that being decoded into power is not less than this predetermined threshold.Now, flow process enters step 422.In step 422, the current luminous parameters chosen is used as optimum luminous parameters by photon client-side.In one example, photon client-side can just upload onto the server and store explicitly with the unit type of photon client-side self by this optimum luminous parameters.Flow process terminates subsequently.
Although simplify for making explanation, above-mentioned loose detection method is illustrated and is described as a series of actions, it should be understood that and understand, these methods not limit by the order of action, because according to one or more embodiment, some actions can occur by different order and/or with from illustrating herein and describe or not shown and to describe but other actions that it will be appreciated by those skilled in the art that occur concomitantly herein.
According to the solution of the present invention, can make to use the user of the mobile phone of different brands model can carry out visible light communication with the illumination mode of optimum and receiving terminal, thus substantially increase recognition speed and the recognition success rate of photon lock in photon entrance guard system.
Thering is provided previous description of the present disclosure is for making any person skilled in the art all can make or use the disclosure.To be all apparent for a person skilled in the art to various amendment of the present disclosure, and generic principles as defined herein can be applied to other variants and can not depart from spirit or scope of the present disclosure.Thus, the disclosure not intended to be is defined to example described herein and design, but the widest scope consistent with principle disclosed herein and novel features should be awarded.