Guard method and system and mobile phone
Technical field
The present invention relates to gate inhibition's technology, relate in particular to a kind of guard method and system and mobile phone.
Background technology
At present, gate inhibition's technology based on coded lock is extensively adopted by institute of enterprise, in the gate inhibition's technology based on coded lock, the password of coded lock is write RFID (Radio Frequency Identification, radio-frequency (RF) identification) in the card, with rfid card during near the induction zone of coded lock, rfid card will send to coded lock with code data on one's own initiative, thereby coded lock is carried out release as the user.In above-mentioned gate inhibition's scheme, need the special-purpose rfid card can the unlocking pin lock, so the user need to carry rfid card (also referred to as " badge ") specially, and badge be easily lost or is left behind, and makes troubles to the user.。
Summary of the invention
Embodiment of the present invention technical matters to be solved is, a kind of guard method and system and mobile phone are provided, and can make the user needn't carry special badge, is user-friendly to.
In order to solve the problems of the technologies described above, the embodiment of the present invention provides a kind of gate control system, comprising: as mobile phone and the light-operated coded lock of LED of door key;
When described mobile phone, the indication of the code data that prestores for detection of the transmission to the user, the described code data that prestores is converted to the LED visible light signal, sends to the light-operated coded lock of described LED.
The light-operated coded lock of described LED is used for receiving the LED visible light signal that described mobile phone sends, and described LED visible light signal is reduced to described code data;
The light-operated coded lock of described LED also is used for according to described code data, carries out and unblanks or keep current state.
Wherein, described mobile phone comprises: central processor CPU, driver and LED, and described CPU, driver and LED are linked in sequence;
Described CPU during the indication of the code data that prestores for detection of the transmission to the user, is encoded to the up and down along trigger pip with the described code data that prestores according to the Manchester's cde mode, and described up and down is loaded on driver along trigger pip;
Described driver is used for controlling supplying electric-opening or closing of described LED according to described up and down along trigger pip.
Wherein, the light-operated coded lock of described LED comprises: detecting device, processor, demoder, adaptation and execution unit, and described detecting device, processor, demoder, adaptation and execution unit are linked in sequence;
Described detecting device for detection of described LED visible light signal, generates current signal;
Described processor is used for amplifying described current signal, and the current signal that amplifies is converted to voltage signal, exports as digital signal;
Described demoder is used for adopting the manchester decoder mode with the binary data of described digital signal decoding for the sign code data;
Described adaptation for the binary data of the sign code data that obtains according to described decoding, is controlled execution unit and is unblanked or keep current state.
Wherein, described adaptation, binary data for the sign code data that described decoding is obtained mates with the code data that presets, and in the time can matching identical password from the described code data that presets, exports to described execution unit the indicator signal of unblanking; In the time can not matching identical password from the described code data that presets, keep the indicator signal of current state to described execution unit output.
Correspondingly, the embodiment of the present invention also provides a kind of mobile phone, comprising: central processor CPU, driver and LED, and described CPU, driver and LED are linked in sequence;
Described CPU during the indication of the code data that prestores for detection of the transmission to the user, is encoded to the up and down along trigger pip with the described code data that prestores according to the Manchester's cde mode, and described up and down is loaded on driver along trigger pip;
Described driver is used for controlling supplying electric-opening or closing of described LED according to described up and down along trigger pip.
Wherein, described CPU comprises:
When reading unit, the indication of the code data that prestores for detection of the transmission to the user, read the code data that prestores;
The first converting unit is used for the described code data that reads is converted to binary data;
The second converting unit is used for described binary data is converted to the up and down along trigger pip according to the Manchester's cde mode.
Wherein, described the second converting unit is used for binary data " 1 " is converted to the negative edge trigger pip, and " 0 " is converted to the rising edge trigger pip.
Correspondingly, the embodiment of the present invention also provides a kind of guard method, comprising:
Mobile phone receives user's Indication message, carries the indication that sends the code data that prestores with the form of LED visible light signal in described Indication message;
Described mobile phone is converted to the LED visible light signal with the code data that prestores, and sends to the light-operated coded lock of LED;
The light-operated coded lock of described LED receives the LED visible light signal of described mobile phone, and it is reduced to described code data;
The light-operated coded lock of described LED is carried out and is unblanked or keep current state according to described code data.
Wherein, described the code data that prestores is converted to the LED visible light signal, and sends to the light-operated coded lock of LED, comprising:
Read the code data that prestores;
The described code data that reads is converted to binary data;
Described binary data is converted to the up and down along trigger pip according to the Manchester's cde mode;
Control along trigger pip with described up and down the LED that is used for sending code data in described mobile phone power supply unlatching or close.
Wherein, the LED visible light signal of described reception mobile phone, and it is reduced to described code data, comprising:
Receive the LED visible light signal, generate corresponding current signal;
Amplify described current signal, and be converted into voltage signal, export as digital signal;
Described digital signal is converted to the binary data that characterizes code data according to the manchester decoder mode;
Described according to code data, carry out and unblank or keep current state, comprising:
The binary data of described sign code data is mated with the code data that presets;
If can match identical code data from the described code data that presets, carry out and unblank; If can not match identical code data from the described password that presets, keep current state.
Implement the embodiment of the present invention, have following beneficial effect:
The embodiment of the present invention is carried the key of the light-operated coded lock of LED by mobile phone, when needs during to the light-operated coded lock release of LED, only need to code data be converted to the LED visible light signal by mobile phone, send to the light-operated coded lock of LED, thereby realize the release to the light-operated coded lock of LED.Owing to not needing to carry special " badge " in the embodiment of the present invention, badge is realized by user's mobile phone, therefore can alleviate user's burden, avoids the user to carry special " badge ", and is user-friendly.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or description of the Prior Art, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the structural representation of the embodiment of the gate control system that provides of the embodiment of the present invention;
Fig. 2 is the structural representation of the embodiment of the mobile phone in Fig. 1;
Fig. 3 is the structural representation of embodiment of the CPU of Fig. 2;
Fig. 4 is the structural representation of the embodiment of the light-operated coded lock of LED in Fig. 1;
Fig. 5 is the structural representation of the embodiment of the guard method that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Please refer to Fig. 1, is the structural representation of the embodiment of gate control system of the present invention, and this gate control system 1 comprises: the light-operated coded lock 3 of mobile phone 2 and LED.
Wherein be integrated with LED in mobile phone 2, be used for sending the LED visible light signal; Also prestore code data in this mobile phone 2, this code data is the unlocking pin of light-operated coded lock 2; When mobile phone 11 detects user's the indication of this code data of transmission, this code data is sent to the light-operated coded lock 3 of LED by LED with the form of LED visible light signal, with the release of request to the light-operated coded lock 3 of LED.
Be understandable that, LED integrated in mobile phone 2 can specially for sending the set LED of code data, perhaps, be formed by existing part reusing in mobile phone, for example: the LED that realizes flash function in mobile phone can be multiplexed with the transmission code data.
Be built-in with the parts of LED visible light signal induction in the light-operated coded lock 3 of LED, the LED visible light signal that sends in order to receive mobile phone; The light-operated coded lock of LED also is reduced to code data with the LED visible light signal that receives, and carries out release or keep current state according to this code data.
The embodiment of the present invention is carried the key of the light-operated coded lock of LED by mobile phone, when needs during to the light-operated coded lock release of LED, only need to code data be converted to the LED visible light signal by mobile phone, send to the light-operated coded lock of LED, thereby realize the release to the light-operated coded lock of LED.Owing to not needing to carry special " badge " in the embodiment of the present invention, can be realized by user's mobile phone, therefore can alleviate user's burden, avoid the user to carry special " badge ".
Please refer to Fig. 2, is the structural representation of the embodiment of mobile phone in Fig. 1, and this mobile phone comprises: CPU(Central Processing Unit, central processing unit) 21, driver 22 and LED23, and CPU21, driver 22 and LED23 are linked in sequence.
Wherein, CPU21 during the indication of the code data that prestores for detection of the transmission to the user, is encoded to the up and down along trigger pip with the described code data that prestores according to the Manchester's cde mode, and described up and down is loaded on driver along trigger pip.
Particularly, as shown in Figure 3, CPU21 comprises: reading unit 211, the first converting unit 212 and the second converting unit 213.
Wherein, reading unit 211 during the indication of the code data that prestores for detection of the transmission to the user, reads the code data that prestores.
The first converting unit 212, the code data that is used for reading unit is read is converted to the code data that is comprised of " 0 " and " 1 ".
The second converting unit 213 is used for the code data that the first converting unit 212 is converted to is converted to the up and down along trigger pip; Particularly, in one-period, the second converting unit 213 is converted to the rising edge trigger pip with " 0 ", is converted to the negative edge trigger pip in " 1 ".
The second converting unit 213 obtains the up and down after trigger pip, should send to driver 22 along trigger pip in the up and down.
Driver 22 is used for controlling supplying electric-opening or closing of LED23 according to the up and down along trigger pip.Particularly, driver 22 pairs of up and down are along trigger pip scanning, when scanning the rising edge trigger pip, with LED23 for electric-opening, when scanning the negative edge trigger pip, the power supply of LED23 is closed.
LED23 is under the control of driver 22, with the outside LED visible light signal that has carried code data that sends of the mode of flicker.
The embodiment of the present invention by mobile phone 2 code data that prestores, thereby realizes storing simultaneously the code data of the light-operated coded lock of a plurality of LED, the defective that can only store the password of a coded lock when avoiding adopting rfid card; In addition, realized that by mobile phone 2 code data that will prestore sends in the mode of LED visible light signal, thereby can with the key of mobile phone as the light-operated coded lock of LED, avoid the user to carry separately " badge ".
Please refer to Fig. 4, it is the structural representation of the embodiment of the light-operated coded lock of LED in Fig. 1, the light-operated coded lock of this LED comprises: receiver 31, processor 32, demoder 33, adaptation 34 and execution unit 35, and receiver 31, processor 32, demoder 33, adaptation 34 and execution unit 35 are linked in sequence.
Wherein, receiver 31 receives the LED visible light signal that mobile phone sends, and generates corresponding current signal.Particularly, receiver 31 can be realized by light activated element, for example photodiode or phototriode, and when the LED visible light signal shone receiver 31, receiver 31 generated corresponding current signals.Need to prove, because the LED visible light signal that mobile phone sends glimmers, therefore the current signal of receiver 31 generations is also discontinuous, cause the discontinuous of current signal that receiver 31 generates just because of the flicker of LED visible light signal, successfully code data has been delivered to coded lock 3 by mobile phone.
Processor 32 is used for amplifying the current signal that receiver 31 generates, and after the current signal that amplifies is converted to voltage signal, exports as digital signal.
Demoder 33 is used for the digital signal according to 32 outputs of manchester decoder mode decoding processor, obtains characterizing the binary data of code data.
Adaptation 34 mates for the binary data of the sign code data that demoder 33 is obtained and the code data that coded lock 3 presets; In the time matching identical password from the code data that presets, represent that the active user is validated user, to execution unit 35 output release indicator signals, such as exporting high level to execution unit 35; In the time can not matching identical password from the code data that presets, represent that the active user is the disabled user, keep the indicator signal of current state to execution unit 35 output, such as to execution unit 35 output low levels.
Execution unit 35, the indicator signal come defeated according to adaptation 34 carried out operation accordingly, such as unlock operation or keep the operation of current state.
Please refer to Fig. 5, it is the schematic flow sheet of the embodiment of guard method provided by the invention, relate in the method flow of Fig. 5 the light-operated coded lock of executive agent mobile phone and LED can with Fig. 1 in mobile phone 2 and the light-operated coded lock 3 of LED have identical 26S Proteasome Structure and Function, described method flow comprises:
S51, mobile phone receives user's Indication message, and this Indication message carries the indication that sends the code data that prestores with the form of LED visible light signal.
Particularly, the user can be by pressing the predetermined function key that arranges in mobile phone or the mode by touch-control sends Indication message to mobile phone; For example, the user launches the LED visible light signal in mobile phone position sends Indication message to mobile phone after aiming at the position of reception LED visible light signal of the light-operated coded lock of LED.
S52, mobile phone is converted to the LED visible light signal with the code data that prestores, and sends to the light-operated coded lock of LED.
Particularly, S52 comprises: read code data from storer; The code data that reads is converted to binary data; Binary coded data are converted to the up and down along trigger pip; Control along trigger pip with this up and down the LED that is used for sending code data in mobile phone power supply unlatching or close.
S53, the light-operated coded lock of LED receives the LED visible light signal of mobile phone, and it is reduced to code data.
Particularly, S53 comprises: receive the LED visible light signal, generate corresponding current signal; Amplify described current signal, and be converted into voltage signal, export as digital signal; Described digital signal is converted to the binary data that characterizes code data.
S54, the light-operated coded lock of LED carry out and unblank or keep current state according to the code data that obtains in S53.
Particularly, S54 comprises: the binary data of the sign code data that S53 is obtained mates with the code data that presets; If can match identical code data from the described code data that presets, carry out and unblank; If can not match identical code data from the described password that presets, keep current state.
The embodiment of the present invention is carried the key of the light-operated coded lock of LED by mobile phone, during to the light-operated coded lock release of LED, only need to code data be converted to light signal by mobile phone when needs, sends to the light-operated coded lock of LED, thereby realizes the release to the light-operated coded lock of LED.Owing to not needing to carry special " badge " in the embodiment of the present invention, can be realized by user's mobile phone, therefore can alleviate user's burden, avoid the user to carry special " badge ".
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, one of ordinary skill in the art will appreciate that all or part of flow process that realizes above-described embodiment, and according to the equivalent variations that claim of the present invention is done, still belong to the scope that invention is contained.