Summary of the invention
The object of the present invention is to provide a kind of electronic lock system, high for the special read-write equipment cost solving electronic lock, carry the not strong problem of inconvenience, versatility and extendability.
Another object of the present invention is to provide a kind of control method for electronic lock, for above-mentioned electronic lock system, to realize the various control operations of intelligent terminal to electronic lock.
In order to achieve the above object, the technical solution adopted in the present invention is:
A kind of electronic lock system of the present invention, comprising:
Intelligent terminal, described intelligent terminal comprises electronic lock control module, corresponding to the first band signal;
Electronic lock, described electronic lock comprises electronic lock application module, corresponding to the second band signal; And
Conversion equipment, comprising: first communication module, second communication module and the control module coupled with described first communication module and described second communication module respectively; Wherein, described first communication module for transmitting described first band signal, and carries out the mutual conversion of described first band signal and intermediary interface signal; Described second communication module for transmitting described second band signal, and carries out the mutual conversion of described second band signal and described intermediary interface signal; Described control module can transmit described intermediary interface signal, to realize the communication of described first communication module and described second communication module.
In one embodiment of this invention, described control module specifically comprises: interface processing module, the first correction verification module and the second correction verification module; Wherein, described interface processing module comprises first interface and the second interface, described first interface is coupled to described first communication module, and described second interface is coupled to described second communication module, and described interface processing module is used for transmission and processes described intermediary interface signal; Described first correction verification module is coupled to described first communication module, for the legitimacy of the first band signal according to legitimacy parameter testing; Described second correction verification module is coupled to described second communication module, for the legitimacy of the second band signal according to described legitimacy parameter testing.
In one embodiment of this invention, described conversion equipment also comprises:
Initialization module, carries out initialization to described legitimacy parameter; And
Power management module, for powering for described conversion equipment.
In one embodiment of this invention, described first band signal meets short distance standard communication protocol.
In one embodiment of this invention, described first band signal meets bluetooth standard communication protocol, Wireless Fidelity (WIFI) standard communication protocol or USB (universal serial bus) (USB) standard communication protocol.
In one embodiment of this invention, the working frequency range of described second band signal is radio frequency identification (RFID) frequency range.
In one embodiment of this invention, the working frequency range of described second band signal is industry, science, medical treatment (ISM) frequency range.
In one embodiment of this invention, the working frequency range of described second band signal is 433MHz or 2.4GHz.
In one embodiment of this invention, described first interface and described second interface meet serial communication protocol.
In one embodiment of this invention, described first interface is UART Universal Asynchronous Receiver Transmitter (UART), and described second interface is Serial Peripheral Interface (SPI) (SPI).
In one embodiment of this invention, described second communication module is nRF905 chip, CC1120 chip, the SOC of built-in described nRF905 chip or the SOC of built-in described CC1120 chip.
In one embodiment of this invention, described intelligent terminal is smart mobile phone, hand-held read-write, portable digital terminal or panel computer.
In one embodiment of this invention, described electronic lock is electronic lock element or the electronic lock controlled control equipment comprising described electronic lock element.
A kind of control method for electronic lock of the present invention, comprises the following steps:
Receive the first band signal, and described first band signal is converted to intermediary interface signal;
Send after described intermediary interface signal is converted to the second band signal; And
Resolve and perform described second band signal received.
In one embodiment of this invention, described parsing and perform receive described second band signal after further comprising the steps of:
Described the second band signal comprising execution result containing the second band signal of execution result, and is converted to the intermediary interface signal comprising execution result by receiving package;
Send after the described intermediary interface signal comprising execution result is converted to the first band signal comprising execution result; And
Resolve and show the first band signal comprising execution result described in reception.
In one embodiment of this invention, further comprising the steps of before second band signal of described receiving package containing execution result: wait to be returned described in comprise the second band signal of execution result.
In one embodiment of this invention, described reception first band signal, and described first band signal is converted to intermediary interface signal specifically comprises the following steps:
Whether monitoring receives described first band signal;
After receiving described first band signal, according to legitimacy parameter, validity checking is carried out to described first band signal; And
When be checked through described first band signal legal after, described first band signal is converted to described intermediary interface signal.
In one embodiment of this invention, described the second band signal comprising execution result containing the second band signal of execution result, and is converted to the intermediary interface signal comprising execution result and specifically comprises the following steps by described receiving package:
The second band signal of execution result is comprised described in whether monitoring receives;
When after the second band signal comprising execution result described in receiving, according to legitimacy parameter, validity checking is carried out to described the second band signal comprising execution result; And
After the second band signal comprising execution result described in being checked through is legal, described in being converted to by described the second band signal comprising execution result, comprise the intermediary interface signal of execution result.
In one embodiment of this invention, described reception first band signal, and further comprising the steps of before described first band signal is converted to intermediary interface signal: power on and initialization is carried out to described legitimacy parameter.
Compared with prior art, a kind of electronic lock system of the present invention and control method for electronic lock have the following advantages: this electronic lock system generates the first band signal by the electronic lock control module on intelligent terminal, transfer to on the conversion equipment of electronic lock wireless connections again, carry out the mutual conversion met between the first band signal of standard communication protocol and the second band signal meeting nonstandard communication protocols, resolve finally by the electronic lock application module on electronic lock and perform the second band signal received, thus realize the various control operations of intelligent terminal to electronic lock.Electronic lock system of the present invention coordinates widely used intelligent terminal by this conversion equipment, carry out alternative existing special read-write equipment, not only cost is low, easy to carry, and this control method for electronic lock achieves the various control operations of intelligent terminal to electronic lock easily, it is a kind of brand-new electronic lock control mode.
Embodiment
Below with reference to accompanying drawing 1 ~ 3, elaboration is further given to a kind of electronic lock system of the present invention and control method for electronic lock.
As shown in Figure 1, be the electronic lock system structural representation of one embodiment of the invention, this electronic lock system 1 comprises: intelligent terminal 10, conversion equipment 20 and electronic lock 30; Wherein,
Intelligent terminal 10 comprises electronic lock control module 101, wherein, this intelligent terminal 10 is smart mobile phone, hand-held read-write, portable digital terminal or panel computer, this electronic lock control module 101 corresponds to the first band signal, this first band signal meets short distance standard communication protocol, preferably, this first band signal meets bluetooth standard communication protocol, WIFI(Wireless Fidelity, Wireless Fidelity) standard communication protocol or USB(Universal Serial Bus, USB (universal serial bus)) standard communication protocol.
Control module 203, initialization module 204 and power management module 205 that conversion equipment 20 comprises first communication module 201, second communication module 202 and couples with first communication module 201 and second communication module 202 respectively.Wherein, first communication module 201 for transmitting the first band signal, and carries out the mutual conversion of the first band signal and intermediary interface signal.Second communication module 202 for transmitting the second band signal, and carries out the mutual conversion of the second band signal and intermediary interface signal.Control module 203 can transmit intermediary interface signal, to realize the communication of first communication module 201 and second communication module 202, wherein, control module 203 specifically comprises interface processing module 2031 again, first correction verification module 2032 and the second correction verification module 2033, this interface processing module 2031 comprises first interface A1 and the second interface A2, first interface A1 is coupled to first communication module 201, second interface A2 is coupled to second communication module 202, this interface processing module 2031 is for transmission and process intermediary interface signal, this first interface A1 and the second interface A2 meets serial communication protocol, preferably, this first interface A1 is UART(Universal Asynchronous Receiver/Transmitter, UART Universal Asynchronous Receiver Transmitter) interface, this second interface A2 is SPI(Serial Peripheral Interface, Serial Peripheral Interface (SPI)) bus interface, first correction verification module 2032 is coupled to first communication module 201, for the legitimacy according to legitimacy parameter testing first band signal, second correction verification module 2033 is coupled to second communication module 202, for the legitimacy according to legitimacy parameter testing second band signal.The legitimacy parameter of initialization module 204 to the first correction verification module 2032 and the second correction verification module 2033 carries out initialization.Power management module 205 is powered for conversion equipment 20.
Electronic lock 30 comprises electronic lock application module 301, wherein, this electronic lock 30 can be independently electronic lock element, also can be the electronic lock controlled control equipment comprising electronic lock element, this electronic lock application module 301 corresponds to the second band signal, and this second band signal meets nonstandard communication protocols and works in RFID frequency range, be particularly useful for the common frequency band that need not permit, such as ISM band, preferably, this second band signal works in 433MHz or 2.4GHz.
As shown in Figure 2, be the method flow diagram of the control method for electronic lock of one embodiment of the invention, existing composition graphs 1 is described in detail:
Step 401, first communication module 201 receives the first band signal that intelligent terminal 10 sends, and the first band signal is converted to the intermediary interface signal that control module 203 can transmit;
Step 402, second communication module 202 receives intermediary interface signal, and intermediary interface signal is converted to analysable second band signal of electronic lock 30;
Step 403, electronic lock 30 is resolved and is performed the second band signal sent by second communication module 202 received.
In order to realize the control of the execution result of intelligent terminal 10 pairs of electronic locks 30 better, electronic lock 30 comprises the second band signal of execution result by returning intelligent terminal 10 1, therefore, further comprising the steps of after step 403:
Step 404, second communication module 202 receives the second band signal comprising execution result that electronic lock 30 sends, and the second band signal comprising execution result is converted to the intermediary interface signal comprising execution result that control module 203 can transmit;
Step 405, the intermediary interface signal comprising execution result containing the intermediary interface signal of execution result, and is converted to analysable the first band signal comprising execution result of intelligent terminal 10 by first communication module 201 receiving package;
Step 406, intelligent terminal 10 is resolved and is shown the first band signal comprising execution result sent by first communication module 201 received, and returns the control operation that step 401 continues intelligent terminal 10 pairs of electronic locks 30 next time simultaneously.
As shown in Figure 3, be the method flow diagram of the control method for electronic lock of another embodiment of the present invention, existing composition graphs 1, Fig. 2 are described in detail:
Step 501, powers on to conversion equipment 20, and the intelligent terminal 10 that electronic lock control system 1 is comprised, conversion equipment 20 and electronic lock 30 are all in running order;
Step 502, the legitimacy parameter of the initialization module 204 on conversion equipment 20 to the first correction verification module 2032 and the second correction verification module 2033 carries out initialization, and the validity checking for subsequent step IF band signals uses;
Step 503, the first communication module 201 of conversion equipment 20 monitors the first band signal of electronic lock control module 101 generation whether receiving intelligent terminal 10; If first communication module 201 does not receive this first band signal, be then held in step 503 and continue monitoring;
Wherein, this first band signal is the control data to electronic lock 30 that the electronic lock control module 101 of intelligent terminal 10 generates, meet a short distance standard communication protocol, preferably, this first band signal meets bluetooth standard communication protocol, WIFI standard communication protocol or USB standard communication protocol.
According to the short distance standard communication protocol that this first band signal meets, preferably, this first communication module 201 also can adopt the SOC of embedded with bluetooth standard communication protocol, WIFI standard communication protocol or USB standard communication protocol to realize, reduced the volume of conversion equipment 20 by built-in SOC further, thus reduce the cost of conversion equipment 20 further.
Step 504, receive the first band signal of electronic lock control module 101 generation at first communication module 201 after, first band signal is sent to the first correction verification module 2032 of control module 203, notify that this first correction verification module 2032 carries out validity checking according to legitimacy parameter to this first band signal; First correction verification module 2032 receive the first band signal and notice after, first validity checking is carried out to the first band signal, check terminate after again by validity checking result feedback to first communication module 201; Receive the validity checking result of the first correction verification module 2032 feedback at first communication module 201 after, if the first band signal is illegal, then returns step 503 and continue monitoring;
Wherein, the interference of other signal of same frequency range when the object of validity checking is to prevent radio communication, if missed other signals after the first band signal reception, first communication module 201 not only can be caused to carry out unnecessary conversion, and will the control operation of intelligent terminal 10 pairs of electronic lock 30 mistakes be caused.
Step 505, receive the validity checking result of the first correction verification module 2032 feedback at first communication module 201 after, if the first band signal is legal, then the first band signal is converted to intermediary interface signal, and transfers to the first interface A1 place of the interface processing module 2031 of control module 203;
Step 506, after interface processing module 2031 to receive the intermediary interface signal that first communication module 201 changes from first interface A1, signal transacting is carried out to this intermediary interface signal and transfers to the second interface A2 place of interface processing module 2031, after second communication module 202 receives this intermediary interface signal from the second interface A2, send after this intermediary interface signal is converted to the second band signal;
Wherein, the transmission of this intermediary interface signal meets serial communication protocol, this serial communication protocol can be serial communication protocol or bus communication protocol, also can be synchronous communications protocol or asynchronous communications protocol, such as RS-232C standard, RS-422 standard or RS-485 standard; First interface A1 and the second interface A2 can adopt the interface meeting this serial communication protocol identical or differently, such as UART interface, spi bus interface, I2C bus interface, com interface or CAN interface; For this reason, when first interface A1 meets identical serial communication protocol with the second interface A2, this intermediary interface signal of interface processing module 2031 transparent transmission, when first interface A1 meets different serial communication protocols from the second interface A2, interface processing module 2031 carries out signal transacting to realize the communication of first interface A1 and the second interface A2 to this intermediary interface signal.
In the present embodiment, preferably, first interface A1 is UART interface, and the second interface A2 is spi bus interface.
In the present embodiment, preferably, this second communication module 202 also can adopt nRF905 chip, CC1120 chip, the SOC of built-in nRF905 chip or CC1120 chip or other SOC with similar functions to realize, reduced the volume of conversion equipment 20 by built-in SOC further, thus reduce the cost of conversion equipment 20 further.
The transmission mode of this second band signal between electronic lock 30 and the second communication module 202 of conversion equipment 20 meets a nonstandard communication protocols, namely electronic lock producer is belonged to self-defined incompatible, and working frequency range is generally RFID frequency range, be particularly useful for the common frequency band that need not permit, such as ISM band, in the present embodiment, preferably, this working frequency range is 433MHz or 2.4GHz.
In another embodiment of the invention, at electronic lock 30, the second band signal sent by second communication module 202 received is resolved, and perform corresponding control operation according to analysis result, after completing, in order to realize the control of the execution result of intelligent terminal 10 pairs of electronic locks 30 better, electronic lock 30 will return second band signal comprising execution result to intelligent terminal 10 to achieve the above object.As shown in Figure 3, the conversion method of this conversion equipment is further comprising the steps of:
Step 507, waits for second band signal comprising execution result that electronic lock 30 returns;
Step 508, the second communication module 202 of conversion equipment 20 monitors the second band signal that the electronic lock application module 301 that whether receives electronic lock 30 returns; If second communication module 202 does not receive this second band signal, be then held in step 508 and continue monitoring;
Wherein, this second band signal is the second band signal comprising execution result that the electronic lock application module 301 of electronic lock 30 returns to intelligent terminal 10, the transmission mode of this second band signal between electronic lock 30 and the second communication module 202 of conversion equipment 20 meets a nonstandard communication protocols, namely electronic lock producer is belonged to self-defined incompatible, and working frequency range is generally RFID frequency range, be particularly useful for the common frequency band that need not permit, such as ISM band, preferably, this working frequency range is 433MHz or 2.4GHz.
Step 509, after second communication module 202 receives the second band signal that electronic lock application module 301 returns, second band signal is sent to the second correction verification module 2033, notify that this second correction verification module 2033 carries out validity checking according to legitimacy parameter to this second band signal; Second correction verification module 2033 receive the second band signal and notice after, first validity checking is carried out to the second band signal, check terminate after again by validity checking result feedback to second communication module 202; Receive the validity checking result of the second correction verification module 2033 feedback at second communication module 202 after, if the second band signal is illegal, then returns step 508 and continue monitoring;
Wherein, the interference of other signal of same frequency range when the object of validity checking is to prevent radio communication, if missed other signals after the second band signal reception, second communication module 202 not only can be caused to carry out unnecessary conversion, and the execution result that will intelligent terminal 10 caused to obtain the electronic lock 30 of mistake.
Step 510, receive the validity checking result of the second correction verification module 2033 feedback at second communication module 202 after, if the second band signal is legal, the second band signal is converted to intermediary interface signal, and transfers to the second interface A2 place of the interface processing module 2031 of control module 203;
In the present embodiment, preferably, this second communication module 202 also can adopt nRF905 chip, CC1120 chip, the SOC of built-in nRF905 chip or CC1120 chip or other SOC with similar functions to realize, reduced the volume of conversion equipment 20 by built-in SOC further, thus reduce the cost of conversion equipment 20 further.
Step 511, after interface processing module 2031 to receive the intermediary interface signal that second communication module 202 changes from the second interface A2, signal transacting is carried out to this intermediary interface signal and transfers to the first interface A1 place of interface processing module 2031, after first communication module 201 receives this intermediary interface signal from first interface A1, send after this intermediary interface signal is converted to the first band signal;
Wherein, the transmission of this intermediary interface signal meets serial communication protocol, this serial communication protocol can be serial communication protocol or bus communication protocol, also can be synchronous communications protocol or asynchronous communications protocol, such as RS-232C standard, RS-422 standard or RS-485 standard; First interface A1 and the second interface A2 can adopt the interface meeting this serial communication protocol identical or differently, such as UART interface, spi bus interface, I2C bus interface, com interface or CAN interface; For this reason, when first interface A1 meets identical serial communication protocol with the second interface A2, this intermediary interface signal of interface processing module 2031 transparent transmission, when first interface A1 meets different serial communication protocols from the second interface A2, interface processing module 2031 carries out signal transacting to realize the communication of first interface A1 and the second interface A2 to this intermediary interface signal.
In the present embodiment, preferably, first interface A1 is UART interface, and the second interface A2 is spi bus interface.
The second band signal comprising the execution result of electronic lock 30 that the electronic lock application module 301 that this first band signal corresponds to electronic lock 30 returns, meet a short distance standard communication protocol, preferably, this first band signal meets bluetooth standard communication protocol, WIFI standard communication protocol or USB standard communication protocol.
According to the short distance standard communication protocol that this first band signal meets, preferably, first communication module 201 also can adopt the SOC of embedded with bluetooth standard communication protocol, WIFI standard communication protocol or USB standard communication protocol to realize, reduced the volume of conversion equipment 20 by built-in SOC further, thus reduce the cost of conversion equipment 20 further.
After above-mentioned steps completes, return the control operation that step 503 continues intelligent terminal 10 pairs of electronic locks 30 next time, the electronic lock control module 101 of intelligent terminal 10 is also resolved the first band signal sent by first communication module 201 received simultaneously, and show the execution result of electronic lock 30 according to analysis result, to control the execution result of electronic lock better.
In sum, a kind of electronic lock system of the present invention comprises: intelligent terminal, electronic lock and conversion equipment; This electronic lock system generates the first band signal by the electronic lock control module on intelligent terminal, transfer to on the conversion equipment of electronic lock wireless connections again, carry out the mutual conversion met between the first band signal of standard communication protocol and the second band signal meeting nonstandard communication protocols, resolve the second band signal received finally by the electronic lock application module on electronic lock, thus realize the various control operations of intelligent terminal to electronic lock.Electronic lock system of the present invention coordinates widely used intelligent terminal by this conversion equipment, carry out alternative existing special read-write equipment, not only cost is low, easy to carry, and this control method for electronic lock achieves the various control operations of intelligent terminal to electronic lock easily, it is a kind of brand-new electronic lock control mode.
Foregoing; be only preferred embodiment of the present invention; not for limiting embodiment of the present invention; those of ordinary skill in the art are according to central scope of the present invention and spirit; can carry out corresponding flexible or amendment very easily, therefore protection scope of the present invention should be as the criterion with the protection domain required by claims.