[embodiment]
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making all other embodiment that obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment one,
Referring to Fig. 1, be a kind of recovery that the embodiment of the invention one provides synchronous method flow diagram of shaking hands, this recovery synchronous method of shaking hands comprises:
S101: re-power after the transmitting terminal that state machine changed with the unit interval cuts off the power supply.
S102: transmitting terminal sends to receiving the state reset signal that the emission of control system changed with the unit interval with the flash of light form.
Wherein, the state reset signal is made up of three parts: state replacement sign indicating number, state indication code and primary signal (like ID).The sign indicating number of resetting has unique value, has identical length with the leaded light signal; The state indication code is a random number, is used to indicate the photon receiving terminal to use the pseudo-code sequence of which state.The state reset signal is launched by LED after modulating through modulator again.
S103: receive the control system and receive transmitting terminal visible light emitted signal.
S104: receive the control system and judge when the visible light signal that receives is the state reset signal, the state of state machine is adjusted into the state of said state reset signal indication.
S105: transmitting terminal is adjusted into the state of state machine the state of state reset signal indication.
Wherein, S104 and S105 take place simultaneously.
Concrete, receive the control system and judge whether it is the state reset signal by state replacement decision device, if, then state indication code and ID are separated, and to resetting to the state of indicating in the state indication code with the state of ID number corresponding register in the pseudo-code decision device.
So far, transmitting terminal is shaken hands synchronously with receiving the control system restoration, and both pseudo-code generators are with the identical variation of intercropping on time then.Because the state indication code is a random number; Have randomness, it has just been indicated transmitting terminal and received the state that the control system uses when state is reset, and obtains this conditional code so promptly use high-speed camera to take; Also can't learn the pseudo-code sequence that is using; When carrying out Reset Status, the state indication code becomes another value again next time, and employed pseudo-code sequence also can change therefrom; Can become invalid so take the signal that is duplicated, thereby can improve the fail safe of photon Internet of Things with high-speed camera.
Embodiment two,
Referring to Fig. 2, be a kind of recovery that the embodiment of the invention two provides synchronous method flow diagram of shaking hands, this recovery synchronous method of shaking hands comprises:
S201: the transmitting terminal that state machine changed with the unit interval is connected with receipts control system.
Realize shaking hands with receipts control system through this step transmitting terminal.
Wherein, receive the control system and comprise system's controlling platform and each receiving terminal that is connected with this system's controlling platform.
Concrete, the state machine of transmitting terminal constantly changed with the unit interval, and when in certain time period, its state machine also just is positioned at N state; Transmitting terminal is connected with the system controlling platform.
S202: receive the state of control system each receiving-end state machine of adjustment and the state synchronized of transmitting terminal state machine.
Concrete, the state of system's controlling platform Adjustment System controlling platform state machine and the state of each receiving-end state machine and the state synchronized of transmitting terminal state machine for example are positioned at N state.
S203: transmitting terminal carries out logical operation with the pseudo-code signal of current period respectively with primary signal and leaded light signal, the primary signal that obtains to encrypt and the leaded light signal of encryption.
Wherein, the frequency between primary signal, leaded light signal and the pseudo-code signal is identical or have the integral multiple relation, and the start-stop phase place is identical.
Primary signal is a kind of numerical sequence signal, also is referred to as base band data, can form by ID number.Referring to the unique identifier of each transmitting terminal the ID here number, can be 8,16, and the binary digits of 24 or 32 bit such as grade.Supposing has M transmitting terminal in certain photon Internet of Things, the baseband signal of each transmitting terminal all is self ID number.Simultaneously, the state of the pseudo-code generator of each transmitting terminal all is to be determined jointly by current time and ID.Suppose that pseudo-code generator also has N kind state, and the corresponding unique pseudo-code signal of each state, so in the T1 period, photon emitters 1 corresponding states 1, photon emitters 2 corresponding statess 2 ... Photon emitters M corresponding states N; And in the T2 period, photon emitters 1 corresponding states 2, photon emitters 2 corresponding statess 2 ... Photon emitters M corresponding states 1, so circulation change.Can guarantee like this: the same period, the pseudo-code signal that each transmitting terminal produced is different, and for same transmitting terminal, the pseudo-code signal that the different periods are produced also is different.The leaded light signal then is to be produced by the leaded light signal generator, is one group of complete " 1 " binary digit, and as 8,16,24 or 32 are waited Bit.
For example; In the T1 time, the baseband signal of supposing transmitting terminal 1 is 00,000,000,000,000,000,000,000,000,000,110,111,111,111,111,111,111,111,111 11111111, totally 64; Its preceding 32 is its ID number, promptly 00000000000000000000000000000110; The leaded light signal that the back is 32 complete 1.State at T1 pseudo-code generator in the unit interval is a state 1, is assumed to be 11101001110100111010001001001101, then its logical operation, and promptly the process of XOR is as shown in table 1:
Primary signal |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
Pseudo-code signal |
?1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
The output signal |
?1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
Table 1 transmitting terminal 1 primary signal is at T1 logical operation process table in the unit interval
Can know from table 1, the output signal after the convolution, the primary signal of promptly encrypting is 11101001110100111010001001001011.
The logical operation of leaded light signal section and pseudo-code signal, promptly the process of XOR is as shown in table 2:
The leaded light signal |
?1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
Pseudo-code signal |
?1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
The output signal |
?0 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
Table 2 transmitting terminal 1 leaded light signal is at T1 logical operation process table in the unit interval
Can know from table 2, the output signal after the logical operation, the leaded light signal of promptly encrypting is 00010110001011000101110110110010.
S204: transmitting terminal merges acquisition scrambler signal with the leaded light signal of primary signal of encrypting and encryption.
For example; With the primary signal 11101001110100111010001001001011 of encrypting; Merge with the leaded light signal of encrypting 00010110001011000101110110110010, obtain scrambler signal 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010.Here 32 for encrypting primary signal, back 32 for the leaded light signals of encrypting merge, in concrete process, also 32 leaded light signals in the past for encrypting, back 32 merge for encrypting primary signal, enumerate no longer one by one here.
S205: transmitting terminal sends said scrambler signal with the form of visible light signal.
Suppose to represent with ID the ID signal of transmitting terminal, PW represents the leaded light signal of transmitting terminal, and PN represents pseudo-code signal, and then the scrambler signal S of output can represent with S=ID*PN+PW*PN.If the signal of transmitting terminal emission this moment is taken by high-speed camera and duplicated, the signal that then duplicates also is 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010.
S206: receive the control system and receive S205 visible light emitted signal, and convert this visible light signal into digital signal.
Concrete, certain receiving terminal of receiving in the control system receives transmitting terminal visible light emitted signal, converts light signal into current signal, converts current signal into voltage signal, and voltage signal is exported as digital signal.
S207: receive the control system this digital signal is decomposed, obtain the primary signal of encryption and the leaded light signal of encryption.
S208: receive the control system leaded light signal of encrypting is carried out logical operation with all users that prestore at the corresponding pseudo-code signal of current period state machine, judge the pseudo-code signal that current state is corresponding according to relevant peaks.
Wherein S208 can bring in completion by the reception that receives visible light signal, also can accomplish in system's controlling platform.
For example, each receiving terminal of receiving the control system is the same with transmitting terminal, also exists identical state machine, and the state of state machine also is constantly to change in time.Different is that the only corresponding in a period of time state of each transmitting terminal just can convert other state into through after this time period, that is to say to produce one group of pseudo-code signal, and this pseudo-code changes along with change of time.And, suppose to exist M transmitting terminal at receiving terminal, promptly there be M user; Receive the control end and exist N kind state simultaneously; Just exist N group pseudo-code signal simultaneously, each organizes pseudo-code signal is inequality, and this N pseudo-code is kept in N the register; And each register corresponding unique transmitting terminal; Be each register holds ID number of fixing transmitting terminal with time dependent pseudo-code signal, like ID number of the in store all the time transmitting terminal 1 of register 1, ID number of the in store all the time transmitting terminal 2 of register 2.The pseudo-code signal of preserving in each register then with transmitting terminal in pseudo-code signal corresponding one by one, by time decision and constantly change in time.As in the T1 period, register 1 corresponding states 1, register 2 corresponding statess 2 ... Register N corresponding states N; And in the T2 period, register 1 corresponding states 2, register 2 corresponding statess 2 ... Register N corresponding states 1, so circulation change.
Wherein, The peak value of the set of number sequence of gained after leaded light signal that relevant peaks refers to encrypt and the pseudo-code signal logical operation; For example; The leaded light signal of encrypting is the Serial No. of complete " 1 " and the result of pseudo-code signal XOR, if the leaded light signal of encrypting is attempted XOR with all users that prestore in the corresponding pseudo-code signal traversal of current period state machine, if the peak value as a result of computing is complete 1 Serial No.; Prove that then the corresponding pseudo-code signal of corresponding pseudo-code signal of state machine of current period of certain receiving terminal and the current period state machine of transmitting terminal is identical, thereby obtain the corresponding pseudo-code signal of receiving terminal current state.
Suppose the period at T1; The pseudo-code signal of being preserved in the leaded light signal of encrypting 00010110001011000101110110110010 and N the register carries out logical operation one by one; Discern through relevant peaks; Can obtain the sequence of 32 complete " 1 ", thereby obtain encrypting used pseudo-code signal, the pseudo-code signal of promptly preserving in the register 1 is 11101001110100111010001001001101.
S209: receive the control system and adopt the corresponding pseudo-code signal of current state that the primary signal of encrypting is deciphered, obtain primary signal.
For example; Pseudo-code signal 11101001110100111010001001001101 and the ID data 11101001110100111010001001001011 of encrypting are carried out logical operation; ID data after obtaining deciphering are 00000000000000000000000000000110, thereby obtain primary signal.
Supposed the T2 period, at this moment the baseband signal of transmitting terminal 1 still is 00,000,000,000,000,000,000,000,000,000,110,111,111,111,111,111,111,111,111 11111111.But at this moment its shape machine is a state 2, supposes that its corresponding pseudo-code signal is 10101101010100101011001101011010, then its logical operation, and promptly the process of XOR is as shown in table 3:
Primary signal |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
Pseudo-code signal |
?1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
The output signal |
?1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
The primary signal of table 3 transmitting terminal 1 is at T2 logical operation process table in the unit interval
Can know from table 3, the output signal after logic basis is calculated, the primary signal of promptly encrypting is 10101101010100101011001101011100.
Leaded light signal and pseudo-code signal carry out logical operation, promptly shown in the process table 4 of XOR:
The leaded light signal |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
Pseudo-code signal |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
The output signal |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
The leaded light signal of table 4 transmitting terminal 1 is at T2 logical operation process table in the unit interval
Can know from table 4, the output signal after the logical operation, the leaded light signal of promptly encrypting is 01010010101011010100110010100101.
Consolidated statement 3 and table 4, the pseudo-code signal that can obtain the emission of transmitting terminal in the T2 unit interval is 10,101,101,010,100,101,011,001,101,011,100,010,100,101,010,110,101,001,100 10100101.
In the T2 period; Receiving terminal register 1 is still preserved ID number: 00000000000000000000000000000110; Because the state variation of receiving terminal is identical with transmitting terminal; So this moment, the state of register 1 also became state 2 synchronously, with the state 2 the same pseudo-code signals 10101101010100101011001101011010 of using of transmitting terminal.By the reception processing procedure method that the front is described, receiving terminal also can be discerned and encrypt used pseudo-code signal, and the ID data after the deciphering also can be consistent with the ID data of preserving, and is legal signal.
If the signal that duplicates with the T1 period in the T2 period promptly 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010 goes to let receiving terminal discern.In the pseudo-code decision device, can recognize used pseudo-code signal used pseudo-code signal when being state 1, promptly 11101001110100111010001001001101, and the register of preserving this pseudo-code signal is X, but can not be register 1.Because ID number of preserving of each register has uniqueness; So ID number of being preserved of register X can not be 00000000000000000000000000000110; But when removing the ID of the signal that deciphering duplicates with the pseudo-code signal that the pseudo-code decision device is discerned; The ID that obtains number is 00000000000000000000000000000110 but, has obtained wrong ID.Therefore, the information that in the process of optical signal transmission, is replicated just can not be received end in the next time period and discern, and has become expired information, thereby has improved the fail safe of photon Internet of Things.
S210: re-power after the transmitting terminal outage, send to receiving the state reset signal that the emission of control system changed with the unit interval with the flash of light form.
Wherein, the state reset signal is made up of three parts: state replacement sign indicating number, state indication code and primary signal (like ID).The sign indicating number of resetting has unique value, has identical length with the leaded light signal; The state indication code is a random number, is used to indicate the photon receiving terminal to use the pseudo-code sequence of which state.The state reset signal is launched by LED after modulating through modulator again.
S211: when the said visible light signal that the judgement of receipts control system receives is the state reset signal, the state of state machine is adjusted into the state of state reset signal indication; Simultaneously, transmitting terminal is adjusted into the state of state reset signal indication with the state of state machine, and returns S203.
Among this embodiment, transmitting terminal carries out logical operation respectively with primary signal and leaded light signal with the pseudo-code signal of current period step is that example is described with the XOR; In concrete implementation process; Can also comprise other logical operation, for example logical AND repeats no more here.
Embodiment three,
Referring to Fig. 3, be a kind of method for synchronous flow chart of shaking hands that the embodiment of the invention three provides based on visible light communication, this method comprises:
S301: the transmitting terminal that state machine changed with the unit interval is connected with the system controlling platform.
Concrete, the state machine of transmitting terminal constantly changed with the unit interval, and when in certain time period, its state machine also just is positioned at N state; Transmitting terminal is connected with the system controlling platform.
Through this step, transmitting terminal and system's controlling platform realize shaking hands.
S302: the state of the state of system controlling platform adjustment oneself state machine and each receiving-end state machine of being connected with the system controlling platform and the state synchronized of transmitting terminal state machine.
S303: transmitting terminal carries out logical operation with the pseudo-code signal of current period respectively with primary signal and leaded light signal, the primary signal that obtains to encrypt and the leaded light signal of encryption.
Wherein, pseudo-code signal changed with the unit interval, and the pseudo-code signal of current period was dropped in next time period, adopted new pseudo-code signal.Wherein, the frequency between primary signal, leaded light signal and the pseudo-code signal is identical or have the integral multiple relation, and the start-stop phase place is identical.
S304: transmitting terminal merges acquisition scrambler signal with the leaded light signal of primary signal of encrypting and encryption.
For example; With the primary signal 11101001110100111010001001001011 of promptly encrypting; Merge with the leaded light signal of encrypting 00010110001011000101110110110010, obtain scrambler signal 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010.
S305: transmitting terminal is modulated the scrambler signal, obtains modulation signal.For example, can adopt modes such as PCM, PWM, PPM, BPSK, QPSK, QAM, QNAM and keying modulation, the scrambler signal is modulated.
S306: transmitting terminal sends the form of said modulation signal with visible light signal.For example, transmitting terminal sends modulation signal with the flash of light form through the LED lamp.
S307: receiving terminal receives the visible light signal that transmitting terminal sends, and converts this visible light signal into digital signal.
S308: receiving terminal carries out demodulation to digital signal, obtains restituted signal.For example, can adopt the corresponding demodulation modes of mode such as PCM, PWM, PPM, BPSK, QPSK, QAM, QNAM and keying modulation, said digital signal is carried out demodulation.
S309: receiving terminal decomposes restituted signal, obtains the primary signal of encryption and the leaded light signal of encryption.
S310: receiving terminal carries out convolution algorithm with all users that prestore at the corresponding pseudo-code signal of current period state machine with the leaded light signal of encrypting, and judges the pseudo-code signal that current state is corresponding according to relevant peaks.
For example, receiving terminal register 1 is in the T1 period, and its state is a state 1, and promptly pseudo-code signal is 11101001110100111010001001001101.At this moment, the leaded light signal of encryption is 00010110001011000101110110110010, carries out convolution algorithm with this random code, through relevant peaks identification, can obtain the sequence of 32 complete " 1 ", explains that this pseudo-code signal encrypts used pseudo-code signal just.Leaded light signal and the pseudo-code signal encrypted carry out logical operation, and promptly the process of XOR is as shown in table 5:
The leaded light signal of 1 pair of encryption of table 5 receiving terminal is at T1 logical operation process table in the unit interval
S311: receiving terminal adopts the corresponding pseudo-code signal of current state that the primary signal of encrypting is deciphered, and obtains primary signal.
For example, the primary signal of encryption is 11101001110100111010001001001011, carries out logical operation with pseudo-code signal 11101001110100111010001001001101, and promptly the process of XOR is as shown in table 6:
The leaded light signal of 1 pair of encryption of table 6 receiving terminal is at T1 logical operation process table in the unit interval
Can know from table 6, the primary signal after the deciphering, promptly the ID signal is 00000000000000000000000000000110.
S312: system's controlling platform is compared the primary signal of deciphering with all users' that prestore primary signal, judge the legitimacy of the primary signal that receives.If legal, then get into S314; Otherwise, get into S313.
In concrete implementation process, S312 also can substitute with following steps: receiving terminal is compared the primary signal of deciphering with the primary signal that prestores, judge the legitimacy of the primary signal that receives.For example, the primary signal after the deciphering is 00000000000000000000000000000110, and the primary signal that prestores also is 00000000000000000000000000000110, and the primary signal that then is judged to be reception is legal.
If the signal that duplicates with the T1 period in the T2 period promptly 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010 goes to let receiving terminal discern.In the pseudo-code decision device, can recognize used pseudo-code signal used pseudo-code signal when being state 1, promptly 11101001110100111010001001001101, and the register of preserving this pseudo-code signal is X, but can not be register 1.Because ID number of preserving of each register has uniqueness; So ID number of being preserved of register X can not be 00000000000000000000000000000110; But when removing the ID of the signal that deciphering duplicates with the pseudo-code signal that the pseudo-code decision device is discerned; The ID that obtains number is 00000000000000000000000000000110 but, has obtained wrong ID.So when in the ID decision device, carrying out the ID contrast, both are inequality, can be judged as illegal signals.
S313: receiving terminal is carried out the prompting action.For example, send text prompt or voice suggestion.
S314: receiving terminal is controlled connected functional unit action.For example, receiving terminal control gate access control system is carried out unlocking action.Perhaps control the household electrical appliance opening power, get into operating state.
S315: re-power after the transmitting terminal outage, send to receiving the state reset signal that the emission of control system changed with the unit interval with the flash of light form.
Wherein, the state reset signal is made up of three parts: state replacement sign indicating number, state indication code and primary signal (as ID number).The sign indicating number of resetting has unique value, has identical length with the leaded light signal; The state indication code is a random number, is used to indicate the photon receiving terminal to use the pseudo-code sequence of which state.The state reset signal is launched by LED after modulating through modulator again.
S316: when the said visible light signal that the judgement of receipts control system receives is the state reset signal, the state of state machine is adjusted into the state of state reset signal indication; Simultaneously, transmitting terminal is adjusted into the state of state reset signal indication with the state of state machine, and returns S303.
Through above method for synchronous,, has randomness because the state indication code is a random number; It has just been indicated transmitting terminal and received the state that the control system uses when state is reset; Obtain this conditional code so promptly use high-speed camera to take, also can't learn the pseudo-code sequence that is using, next time when carrying out Reset Status; The state indication code becomes another value again; And employed pseudo-code sequence also can change therefrom, can become invalid so take the signal that is duplicated with high-speed camera, thereby can improve the fail safe of photon Internet of Things.
Above-mentioned method embodiment of the present invention is described, enumerates embodiment in the face of the hardware system of operation said method embodiment down and be described in detail.
Embodiment four,
Referring to Fig. 4; It is the system configuration sketch map that a kind of recovery that the embodiment of the invention four provides is shaken hands synchronous; This system 400 comprises transmitting terminal 401 and receives control system 402 that this receipts control system 402 comprises system's controlling platform 403 and at least one receiving terminal 404 that is connected with this system's controlling platform.
The state machine of transmitting terminal 401 changed with the unit interval; In the Preset Time section; With receive control system 402 and be connected with realization and shake hands, comprise pseudo-code generator 401a, leaded light signal generator 401b, encoder 401c, luminescence unit 401d and state reset cell 401e.
Pseudo-code generator 401a is used to produce and export the pseudo-code signal that changes with the unit interval.The operating state of this pseudo-code generator 401a changed with the unit interval; The pseudo-code signal of output also changes with the unit interval; For example, be state 1 at the state of T1 pseudo-code generator 401a in the unit interval, the pseudo-code signal of output is 11101001110100111010001001001101; State at T2 pseudo-code generator 301a in the time period is a state 2, and the pseudo-code signal of output is 10101101010100101011001101011010.
Leaded light signal generator 401b is used to export the leaded light signal.The frequency of this leaded light signal generator 401b is identical with the operating frequency of pseudo-code generator or have a relation of integral multiple.
The encoder 401c that is connected with pseudo-code generator 401a with leaded light signal generator 401b; Be used for leaded light signal to primary signal and leaded light signal generator 401b output; Pseudo-code signal with the current period output of pseudo-code generator 401a carries out logical operation respectively; Obtain the primary signal of encryption and the leaded light signal of encryption, with the leaded light signal merging acquisition scrambler signal of primary signal of encrypting and encryption.For example; With the primary signal 11101001110100111010001001001011 of encrypting; Merge with the leaded light signal of encrypting 00010110001011000101110110110010, obtain scrambler signal 11,101,001,110,100,111,010,001,001,001,011,000,101,100,010,110,001,011,101 10110010.Here 32 for encrypting primary signal, back 32 for the leaded light signals of encrypting merge, in concrete process, also 32 leaded light signals in the past for encrypting, back 32 merge for encrypting primary signal.
The luminescence unit 401d that is connected with encoder 401c is used for the scrambler signal of the encoder 401c output form with visible light signal is sent.Wherein, transmitting element 401c can be light-emitting diode, also can be other element with lighting function.
The state reset cell 401e that is connected with luminescence unit 401d with pseudo-code generator 401a; After being used for transmitting terminal 401 outage and re-powering; Launch the state reset signal that changes with the unit interval through luminescence unit 401d to receiving the control system; To sending pseudo-code generator 401a transmit status index signal, the indication current slot uses the corresponding pseudo-code sequence of which state simultaneously.Wherein, the state reset signal comprises state replacement sign indicating number, state indication code and primary signal (as ID number), and the sign indicating number of resetting has unique value, has identical length with the leaded light signal; Condition indicative signal is a random number; With the state indication code in the state reset signal that sends to receiving terminal be corresponding to; Therefore after the transmitting terminal outage re-powered, its residing state possibly be state X, and encrypting employed pseudo-code sequence also is the corresponding pseudo-code sequence of state X.
Wherein, transmitting terminal 401 can be the sub-client of dedicated optical, mobile phone and the hand-hold electronic equipments with visible emitting semiotic function.
The state synchronized of receiving terminal 404 and the current period state machine of transmitting terminal.The state machine of the state machine of transmitting terminal 401 and receiving terminal 404 synchronously after, doing identical variation with the state of the state machine of transmitting terminal 401 with the unit interval.
Receiving terminal 404 comprises receiving element 402a, state replacement decision device 402b, pseudo-code decision device 402c and decoder 402d.
Receiving element 402a receives transmitting terminal 301a visible light emitted signal, and converts this visible light signal into digital signal.
The state replacement decision device 402b that is connected with receiving element 402a; Be used for the digital signal of receiving element 402a conversion gained is decomposed; Be decomposed into reset sign indicating number part, state indication code part and ID part, and will reset and yard compare, when condition is mated with the particular value that sets; Confirm that the visible light signal that receives is the state reset signal; Output is adjusted into the state of state machine the instruction of state of said state reset signal indication to pseudo-code decision device 402c, and wherein, this instruction comprises state indication code part and ID part; When condition does not match, the leaded light signal that output is encrypted and the primary signal of encryption.
With the pseudo-code decision device 402c that state replacement decision device 402b is connected, when being used to receive the instruction of state replacement decision device 402b transmission, state machine state is adjusted into the indicated state of instruction.When receiving the leaded light signal of encryption; This pseudo-code criterion device carries out logical operation with all users in the leaded light signal of encrypting and the photon Internet of things system that prestores at the corresponding pseudo-code signal of current period state machine; For example; Behind the convolution algorithm, judge the pseudo-code signal that current state is corresponding according to relevant peaks.
With state replacement decision device 402b and the decoder 402d that pseudo-code decision device 402c is connected, be used to adopt the pseudo-code signal of pseudo-code decision device 402c output that the primary signal of the encryption of state replacement decision device 402b output is deciphered, obtain primary signal.In concrete implementation process; Decoder 402d has caching function; The primary signal that is used for the encryption of buffer memory resolving cell 402b output; Perhaps between resolving cell 402b and decoder 402d, be connected with buffer unit, be used for the primary signal of the encryption of state replacement decision device 402b output is carried out buffer memory.
In the practical implementation process, can also comprise the ID decision device that is connected with decoder 402d and be connected concrete equipment, like door lock, household electrical appliance etc. with this decision device.
Embodiment five,
Referring to Fig. 5, be the system configuration sketch map that a kind of recovery that the embodiment of the invention five provides is shaken hands synchronous, with respect to embodiment four, transmitting terminal 401 also comprises:
Be connected between said encoder 401c and the transmitting element 401d, be used for modulator 401f that the scrambler signal is modulated.
Accordingly, receiving terminal 402 also comprises:
Be connected between receiving element 402a and the state replacement decision device 402b, be used for demodulator 402e that the digital signal of receiving element 402a output is carried out demodulation.
Further, receiving terminal 402 also comprises:
The primary signal decision device 402f that is connected with pseudo-code decision device 402c with decoder 402d, be used for the primary signal of deciphering is compared with the primary signal that the pseudo-code decision device prestores, judge the legitimacy of the primary signal of reception.In concrete implementation process; Primary signal decision device 402f has caching function; Be used for the primary signal of pseudo-code criterion device 402c output is carried out buffer memory; Also can between pseudo-code criterion device 402c and primary signal decision device 402f, be connected a buffer, the primary signal of pseudo-code criterion device 402c output carried out buffer memory through this buffer.
In concrete implementation process, synchro system 300 also comprises the functional unit that is connected with receiving element 402, for example electric lock etc.
More than the embodiment of the invention has been carried out detailed introduction, used concrete example among this paper principle of the present invention and execution mode set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.