CN107578504A - A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work - Google Patents
A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work Download PDFInfo
- Publication number
- CN107578504A CN107578504A CN201710752677.4A CN201710752677A CN107578504A CN 107578504 A CN107578504 A CN 107578504A CN 201710752677 A CN201710752677 A CN 201710752677A CN 107578504 A CN107578504 A CN 107578504A
- Authority
- CN
- China
- Prior art keywords
- code
- variable
- quick response
- lockset
- password
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Landscapes
- Lock And Its Accessories (AREA)
- Storage Device Security (AREA)
Abstract
The present invention relates to a kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work, belong to electronic information and shared lock technology field.Two-dimentional code switch be pressed after to single-chip microcomputer send switching signal, single-chip microcomputer often receive once two-dimentional code switch caused by signal regenerate a Quick Response Code, subscription client scans Quick Response Code and Quick Response Code is sent into server, password is obtained after server parsing Quick Response Code and sends password to client, password is inputted after user's reading client password and realizes unlocking, lockset with server direct communication, need not reduce the data processing pressure of server, save the manufacturing cost of lockset.
Description
Technical field
The present invention relates to a kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work, belong to electronics
Information and shared lock technology field.
Background technology
Bicycle lock is not directly entered Internet of Things used by OFO shares bicycle, but by using the people of shared car
Realized when scanning with the interaction of network, adopt the R & D Cost that can substantially reduce early stage in such a way and voluntarily
The production cost of lock, for just entering the enterprise of shared platform, this pattern is very valuable business mould for this
Formula, R&D costs can be substantially reduced, be easy to promote.But this this pattern exist one it is serious the problem of be exactly OFO locks
Password can not change, for bicycle, because bicycle parking position is not fixed, this is just greatly alleviated
Disadvantage existing for OFO locks.Nonetheless, the people for much wanting to gain extra advantage by unfair means still always enjoys it to deciphering lock.Little Huang bicycles
Lock and password are all fixed, somebody unlocks know password after, it is close with regard to that can continue to input as long as ensureing that vehicle is not ridden away
Code freely uses bicycle;Someone establishes little Huang bicycle passwords with this and shares group, a considerable number of.It is existing nationwide close among these
The shared group of code, the password for also having each specific place share group, and many people directly represent in QQ group chats, by password can in order to avoid
Take and use little Huang bicycles.For this, OFO companies have put into substantial amounts of energy, and OFO third generations lock is it may be said that reached specialty
The horizontal people of unlocking can guess out its password.It may be said that substantially increase the normal function rate of little Huang cars, prevented 90% with
On the strip wool masses.Forth generation intelligence little Huang car locks are more characteristic be this lock only had four numerals by
Key, still unlocked using four pin modes.Look that only four buttons, the position of password are lacked, and the password that four bit combinations go out
Quantity is also seldom, still, it is desirable to cracks hardly possible.After continuously password is inputed by mistake several times, lock can send alarm, and forbid
User inputs password, could recover after waiting for a period of time.Although only four passwords, the maximum characteristic of bicycle is shared
It is exactly that mobility is high, even if you remember the password of this car, also differing surely rides up to tomorrow.From the point of view of such situation, OFO
Lock is no all the time to solve the problems, such as that password is variable.From the point of view of present case, the problem of awkward is faced with, if password is not
Become, the shared equipment provided will gratuitously be taken;If without using password, and use internet management, it is meant that preceding
Phase development cost is too high.Therefore, exploitation variable cipher lockset can solve above-mentioned double-barreled question.
The content of the invention
In view of the above-mentioned problems, it is an object of the invention to provide a kind of variable two-dimension code lock, variable two-dimension code and variable two
Tie up code lock method of work.
A kind of variable two-dimension code lock, it is based in minimum SCM system, including variable two-dimension code display module, Quick Response Code
Portion's processing module, keyboard password input submodule, power supply circuit, reset oscillating circuit, unlocking circuit, two-dimentional code switch, lockset
State detection module, internal clocking module, and the server being used cooperatively with variable two-dimension code lock;In variable two-dimension code lock
Portion is provided with primary control program, and server control program is also equipped with server;Keyboard password input submodule, unlocking circuit,
Two-dimentional code switch connects single-chip microcomputer by single-chip processor i/o mouth;Power supply circuit, reset oscillating circuit use minimum SCM system phase
Supporting power supply circuit and reset oscillating circuit;Unlocking circuit is used for the opening and closing for controlling variable two-dimension code to lock;Lockset shape
State detection module belongs to a subprogram in primary control program inside single-chip microcomputer, by detect single-chip microcomputer to unlocking circuit module
The high level or low level signal that the I/O mouths of submodule connection are sent are opening or closing judge variable two-dimension code lock
State, two-dimentional code switch are often received once caused by two-dimentional code switch after being pressed to single-chip microcomputer transmission switching signal, single-chip microcomputer
Signal regenerates a Quick Response Code;Subscription client scans Quick Response Code and Quick Response Code is sent into server, server parsing
Password is obtained after Quick Response Code and sends password to client, password is inputted after user's reading client password realizes and unlock.
Variable two-dimension code display module is connected with single-chip microcomputer, and it shows variable two-dimension code, and variable two-dimension code includes Quick Response Code
The automatic link information part of calibration point, lockset status information portion, variable function message part, server site;Quick Response Code school
It is arranged on schedule on any three angles in four angles of Quick Response Code, the direction of Quick Response Code is confirmed to system;Lockset status information
Part is by the permutation and combination of black-white point on Quick Response Code to show that lockset is opening or the state of closing;Variable function information portion
Divide by the permutation and combination of black-white point on Quick Response Code to show at least one numerical value or one function code of display or display extremely
Few numerical value and a function code;The arrangement group that the automatic link information part of server site passes through black-white point on Quick Response Code
Close with the website of display server, it is ensured that the APP or server site of control lockset are automatically opened up after Quick Response Code is scanned, most
The automated communications with server are realized by mobile phone eventually.
Variable two-dimension code described if necessary also includes lockset identification division, passes through the permutation and combination of black-white point on Quick Response Code
To show a numerical value that is fixed but being different from other locksets, to ensure that each two-dimensional code lock being capable of being serviced
Device is identified and differentiated by Quick Response Code.
Further, described variable two-dimension code also includes unlocking identification variables code, passes through the row of black-white point on Quick Response Code
Row combination is to show number that lockset is opened, same lockset, and unlocking identification variables code caused by it is first is 0, and lockset is every
It is opened once, unlocking identification variables code on its caused Quick Response Code increase by 1, for example, the lockset originally closed, it is being closed
No matter how many times Quick Response Code is generated under state, and the unlocking identification variables code in its Quick Response Code generated represents 0, when lockset is beaten
After opening 1 time, it generates Quick Response Code after first switching on, no matter generate how many times, and the unlocking in its Quick Response Code generated becomes
Amount identification code represents 1, and before it is not opened again after lockset closing, the unlocking variable in its Quick Response Code generated is known
Other code also represents 1.
Further, described variable two-dimension code also includes time showing part, passes through the arrangement of black-white point on Quick Response Code
To show time value, the time value is reset and opened when lockset is opened by the timer record inside single-chip microcomputer, the value for combination
Begin record, is off in lockset closing and is recorded as definite value;It is that APP on user or server can be directly from two that it, which is acted on,
The time of lockset opening is parsed on dimension code, to judge charge amount, reduces the load of server storage record.
Quick Response Code internal processing modules, following 3 kinds of at least one is included, and the control program of internal module is master control journey
A part in sequence:
1)Each variable two-dimension code lock is provided with the numbering n of oneself, Quick Response Code inter-process mould corresponding to n-th of two-dimensional code lock
It is provided with the cryptographic libraries of block and changes function subprogram containing an independent function Fn and password;Identical function Fn
And password changes function subprogram and existed in simultaneously in management server function library, as long as there is identical variate-value, just has
Identical operation result;Open after two-dimentional code switch or SCM system automatically generate Quick Response Code switching signal, variable two-dimensional
Variable two-dimension code is shown on code display module, Quick Response Code internal processing modules automatically generate described variable two-dimension code, therein
Variable function message part display content in variable two-dimension code includes two-dimensional code lock numbering, variate-value, described variate-value with
Machine generates;
2)Identical function Fn and password are provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock
Change function subprogram;Identical function Fn is also equipped with management server function library and password changes function subprogram only;
As long as there is identical variate-value, function Fn just has identical operation result;Open two-dimentional code switch or SCM system certainly
After dynamic generation Quick Response Code switching signal, variable two-dimension code, Quick Response Code internal processing modules are shown on variable two-dimension code display module
Automatically generate described variable two-dimension code, the variable function message part display content comprising variable in variable two-dimension code therein
Value, described variate-value generate at random;
3)Be provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock multiple function Fn and and
Corresponding password changes function subprogram, each function Fn and and corresponding password change function subprogram and be provided with
Numbering m;In management server function library, multiple function Fn and and the corresponding password change sub- journey of function are also equipped with
Sequence, each function Fn and and corresponding password change function subprogram be provided with numbering m;Function Fn is identical, and has phase
Same variate-value, just has identical operation result, described variate-value generates at random;Open two-dimentional code switch or single-chip microcomputer
After system automatically generates Quick Response Code switching signal, show variable two-dimension code on variable two-dimension code display module, inside Quick Response Code at
The variable two-dimension code described in Module Generation is managed, the variable function message part display content bag in variable two-dimension code therein
Function Fn, coding m, function variable value are included, described variate-value generates at random.
Further, keyboard password input submodule is using a kind of following or combination of the two:
A, Password Input hardware components are mechanical cipher input unit, by 4 combination disks, 4 cipher rotary knobs, 16 digital marks
Knowledge, cipher rotary knob, button pallet, cross recess, force turn round nail, elastic force pressing key, keyboard conductive rubber, cipher lock panel, reset
Spring is formed;Back-moving spring is provided between cipher rotary knob and cipher lock panel, the axle of cipher rotary knob is sleeve structure, nesting rotation
Button generating gear upper shaft, the axle are provided with cross recess, and force is provided with the inside of the quill of cipher rotary knob and turns round nail, embedded knob hair
In the cross recess of electric gear upper shaft, such structure causes user at this time, to exert a force in rotational password knob and turn round nail in ten
In the horizontal clearance of word groove, it will not produce and push maloperation;Weld elastic pressing key, bullet in the bottom of the quill of cipher rotary knob
The lower section of power pressing key is button pallet, and the button pallet is fixed by the cipher lock panel of connection sheet and top, the button support
Disk is pasted with keyboard conductive rubber, turns to after set password position, presses down on cipher rotary knob, elastic force pressing key and button
The contact conducting of pallet upper keyboard conductive rubber, inputs a password value;When hand decontrols cipher rotary knob, in back-moving spring
Under effect, set back;
4 keys of Password Input are designed for interference key board using determinant, and 16 buttons line up 4 × 4 matrixes;Using single in design
8 I/O lines of piece machine do the keyboard scan of 16 buttons, send out scanning signal by P2.0~P2.3, P2.4~P2.7 reads and pressed
Key data return code;
Which button password scan module detects in a manner of program scanning is pressed, single pass one row, 4 buttons, scanning
Order is as follows:
(a) scanning signal 1110 is sent out to scan 4 buttons of C1 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(b) scanning signal 1101 is sent out to scan 4 buttons of C2 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(c) scanning signal 1011 is sent out to scan 4 buttons of C3 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(d) scanning signal 0111 is sent out to scan 4 buttons of C4 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(e) return to that step (a) is continuous to do key scan;
The step of above, continuously repeats, if a button is pressed, the button is decoded out, when a certain button is pressed,
Its keypad numerals is to count numbering;
Password determining program is placed in main program, is read when having button, is judged when determination key is pressed;Set in a program
The password of the space storage setting of 4 bytes and the data of 4 bytes storage input through keyboard;According to the keyboard data and single-chip microcomputer of reading
Local password successive appraximation that inside automatically generates, if password is correct, is unlocked it may determine that the correctness of input password, if
Incorrect, then Password Input counting how many times element count, does not reach such as 3 times, returns to keyboard scan module to ensure that user obtains
There is the chance of 3 this input password after one password, if Password Input number reaches 3 passwords still not right, SCM system
Quick Response Code switching signal is automatically generated, regenerates new Quick Response Code;
B, Password Input hardware components use panel type keyboard, and 0 to 9 totally 10 keys are provided with keyboard, monolithic is used in design
The I/O connection keyboards of machine, password is directly inputted by keyboard, password scan module is by reading the password and piece machine of input through keyboard
The local password that inside automatically generates is compared, if password is correct, unlocks, if incorrect, Password Input counting how many times
Element count, do not reach such as 3 times, return to keyboard scan module to ensure that user there are 3 this input password after obtaining a password
Chance, if to reach 3 passwords still not right for Password Input number, SCM system automatically generates Quick Response Code switching signal, weight
Newly-generated new Quick Response Code.Because using the technology of panel type input through keyboard password as prior art, therefore repeat no more.
Described primary control program is programmed using assembler language, including the initialization module of system, password scan module,
Call password multilevel iudge module.
A, initialization module is run in start, when two-dimentional code switch opening or system automatically generate two-dimentional code switch letter
After number, system is initialized automatically, the lockset then inquired about in the open and-shut mode generation variable two-dimension code of variable two-dimension code lock
Status information portion;The cryptographic libraries in single-chip microcomputer internal memory are called, gathering information produces the variable function information in variable two-dimension code
Part;Transfer the automatic link information generating portion of server site;Transfer other necessary informations of Quick Response Code Quick Response Code life generation
Part generates overall variable two-dimension code, wherein transferring the method for work of function information part is:
a)When each variable two-dimension code lock is provided with the numbering n of oneself, Quick Response Code inter-process corresponding to n-th of two-dimensional code lock
It is provided with the cryptographic libraries of module and changes function subprogram, identical function containing an independent function Fn and password
Fn and password change function subprogram and existed in simultaneously in management server function library, will as long as there is identical variate-value
When having identical operation result, the internal number n of variable two-dimension code lock is transferred, and generates variate-value c at random, variable the two of production
Tie up internal number n and the random generation variate-value c that the variable function message part in code includes variable two-dimension code lock;Single-chip microcomputer root
Single-chip microcomputer internal memory is stored according to the internal number n transferred, random generation variate-value c and independent function Fn, generation local password y
It is interior;
b)When being provided with identical function Fn and close in the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock
Code changes function subprogram, and identical function Fn is also equipped with management server function library and password changes function subprogram,
As long as there is identical variate-value, when function Fn just has identical operation result, stochastic production variate-value c, variable the two of production
The variable function message part in code is tieed up only comprising random generation variate-value c, single-chip microcomputer is according to random generation variate-value c and independence
Function Fn, generation local password y are stored in single-chip microcomputer internal memory;
c)Be provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock multiple function Fn and and
Corresponding password changes function subprogram, each function Fn and and corresponding password change function subprogram and be provided with
Numbering m, in management server function library, be also equipped with multiple function Fn and and corresponding password change the sub- journey of function
Sequence, each function Fn and and corresponding password change function subprogram be provided with numbering m, function Fn is identical, and has phase
Same variate-value, when just having identical operation result, stochastic production variate-value c, while random call function Fn numbering m,
Variable function message part in the variable two-dimension code of production includes stochastic production variate-value c, random call function Fn numbering
M, single-chip microcomputer are stored in single-chip microcomputer according to random generation variate-value c and the independent function Fn of random call, generation local password y
In depositing;
D) when each variable two-dimensional lock Quick Response Code internal processing modules cryptographic libraries comprise at least have it is above-mentioned a), b), c) three kinds
The information of password place storage in situation in the case of two kinds, and when corresponding parsing information is also stored on server, at random
Transfer the information that stores in the cryptographic libraries of the Quick Response Code internal processing modules of variable two-dimensional lock correspond to situation any one, and produce
Raw corresponding Quick Response Code and the corresponding local value y of production.
B, password scan module is mainly the password for reading input through keyboard, and is entered with the local password of generation inside single-chip microcomputer
Row compares, and the module has illustrated above-mentioned, therefore repeats no more.
The method of work of variable two-dimension code lock is as follows:
1)Press two-dimentional code switch or system automatically generates Quick Response Code switching signal, system auto-initiation, inquiry variable two
Tie up the lockset status information portion in the open and-shut mode generation variable two-dimension code of code lock;The cryptographic libraries in single-chip microcomputer internal memory are called,
Variable function message part in gathering information production variable two-dimension code;Transfer the automatic link information generating unit of server site
Point;The number data for calling lockset to open, generate unlocking identification variables code;Transfer other necessity of Quick Response Code Quick Response Code life generation
Message part generates overall variable two-dimension code, and is shown on variable two-dimension code display module, while single-chip microcomputer itself basis should
Variable function message part parsing local password in the Quick Response Code of generation, and by the information storage of the Quick Response Code in case calling;
When described variable two-dimension code includes lockset identification division, server parses lockset identification division to ensure each two-dimensional code lock
Can being serviced device differentiate, while the information of whole Quick Response Code is carried out classified and stored according to different locksets, in case inquiry is adjusted
With;When described variable two-dimension code includes time showing part, when lockset status information portion shows that lockset is open mode
When, its show lockset open when time point value or not now show between be worth;When lockset status information portion shows that lockset is closed
During state, it shows that last lockset is opened to the time value of shut-in time section;
2)Handheld client end is scanned, and the variable two-dimension code of scanning is given to the APP parsings in handheld client end, and APP passes through solution
Analyse the automatic automatic connection server in link information part of server site;APP or server are by parsing lockset status information
Part judges that lockset is opening or the state of closing;Server is by parsing the variable function information portion on variable two-dimension code
Point, corresponding function is searched in the server, and calculates generation and single-chip microcomputer using information is provided in variable function message part
The consistent password Y of the local password of production;When described variable two-dimension code includes time showing part, lockset identification division shows
Show time value, the time value is by the timer record inside single-chip microcomputer, and the value is reset when lockset is opened and start recording,
Lockset is closed and is off and is recorded as definite value, and server determines the last time by parsing the time showing part on variable two-dimension code
Lockset is opened to the time value of shut-in time section, and to determine time that user uses, being determined according to the time and expenses standard should
To client's fee charged;When described variable two-dimension code does not include time showing part, server is according to lockset identification part
Point targetedly inquire about and transfer server internal data-base recording, to determine time that user uses, according to the time and
Expenses standard determines should be to client's fee charged;
Further, the method for server counter service charge is:Server is able to record each client corresponding account to service
Device transmitting Quick Response Code, and can be judged by the lockset identification division identified on Quick Response Code client transmission Quick Response Code whether come
From same lockset;For same lockset, server detects two different two dimensions with identical lockset identification division
Code, and two Quick Response Codes show that lockset is closed, and the latter show the Quick Response Code of lockset closed mode with it is previous
The Quick Response Code of individual display lockset closed mode has the unlocking identification variables code that difference is 1, then server judges that the lock is beaten
Opened, and the client user opening given tacit consent to;If account corresponding to client is being sent with the unlocking change that difference is 1
Measure identification code and show that the period between two Quick Response Codes of lockset closed mode did not pay the service of corresponding lockset
Take, then judge two should with difference be 1 unlocking identification variables code and show lockset closed mode two Quick Response Codes it
Between period be period that the lockset is user service;When described variable two-dimension code includes time showing part, clothes
Business device directly reads the time showing part in the Quick Response Code of last display lockset closed mode, can just parse and determine user
The time used, and should be to client's fee charged according to the time and expenses standard determination;When described variable two-dimension code not
During comprising time showing part, server internal database is targetedly inquired about and transferred to server according to lockset identification division
Record, the time of the two clients is sent by inquiring about subscription client to server, the time difference obtained is that user makes
Time, and should be to client's fee charged according to the time and expenses standard determination;
3)Server detection sends the IP or account information of the client of Quick Response Code, whether to judge the client corresponding account
There is unpaid situation, information sent if then according to the corresponding expense of status inquiry in step 2, and to client end AP P,
Remind client to pay outstanding charge and the specific amount of money, enter if the expense that account corresponding to the client does not need to pay
Enter next step;
4)Server detects lockset status information portion, when lockset status information portion shows that variable two-dimension code lock is in open shape
During state, APP reminds client to report or close lockset for repairment;When lockset status information portion shows that variable two-dimension code lock is closed
When, and the password Y passwords parsed in above-mentioned steps 2 are sent on the APP on user's handheld client end;
5)Reported for repairment, paid the bill according to the information of server push and with reference to actual conditions, closing lockset, or according to from service
The password that device obtains passes through input through keyboard password;
6)Single-chip microcomputer is transferred the password that local password and server obtain and is compared, if single-chip microcomputer detects Password Input 3
Still incorrect after secondary, then SCM system automatically generates Quick Response Code switching signal, regenerates new Quick Response Code, variable two-dimension code
New Quick Response Code is shown on display module, system returns to above-mentioned steps 1;If the correct MCU driving unlocking circuit of password will
Variable two-dimension code lock is opened;
7)After user's use, lockset is closed, two-dimentional code switch is pressed and obtains new Quick Response Code, and by handheld client end
APP the Quick Response Code of acquisition is sent to server, system returns to above-mentioned 1st step.
Further, described power supply circuit also includes external power supply module, and external power supply module has automatic generation work(
Can, when Password Input hardware components are mechanical cipher input unit, external power supply module is including at least for mechanical charge and too
Sun can charge a portion in two parts;When Password Input hardware components use panel type keyboard, external power supply module
Not comprising mechanical charge part.
a)Mechanical charge:Sent out by 4 combination disks, 4 cipher rotary knobs, 16 numeral identifications, microgenerator and knob
Electric gear is formed;Cipher rotary knob and knob generating gear are coaxially connected, are combination disk below cipher rotary knob, and combination disk is pasted onto face
Plate surface, there is panel isolation between cipher rotary knob and knob generating gear, 4 knob generating gears are nibbled with motor gear simultaneously
Close, 4 knob generating gears do not engage each other, and motor gear is coaxial with microgenerator;Microgenerator output circuit concatenates
Rectifier bridge stack simultaneously connects rechargeable battery, and rechargeable battery provides electric energy for shaped variable trick lock.Such structure causes user rotating it
In a cipher rotary knob when, knob generating gear also rotates, and drives the motor gear that is meshed therewith to rotate, and drives
Microgenerator is generated electricity, and output current after rectifier bridge stack rectification to rechargeable battery by charging.
b)Solar recharging:It is made up of solar panel, voltage-regulator diode, anti-return diode;Solar panel
Output reversely concatenates positive concatenation anti-return diode after voltage-regulator diode.This structure causes when sunlight strong, too
Positive energy cell panel(14)Export a high voltage, voltage breakdown voltage-regulator diode(15)To rechargeable battery(7)Charged, if
When light is weak, such as at night, rechargeable battery(7)It is higher than solar panel in voltage(14)Output voltage, it is positive
Concatenate anti-return diode(16)Current reflux can be prevented.
Further, AT89C51 single-chip microcomputers are used in the present invention, has a high-gain anti-phase in AT89C51 chip internals
Amplifier, its input are chip pin XTAL1, and its output end is pin XTAL2;And in chip internal, XTAL1 and XTAL2
Between bridge crystal oscillator and trimmer, so as to form a stable self-excited oscillator, here it is the clock of single-chip microcomputer
Circuit.
Further, the operation principle of unlocking circuit module submodule is:When user inputs correct password, single-chip microcomputer
High level signal is exported to the I/O mouths being connected with unlocking circuit module submodule, transistor saturation conduction, relay adhesive, is driven
Dynamic electronic fractional motor running, electronic lock are opened;Conversely, when the password of input error, single-chip microcomputer to unlocking circuit module
The I/O mouths output low level of module connection, transistor cutoff, relay are unable to adhesive, and motor is inoperative.
Further, the application also includes sound light alarming circuit submodule and shock sensor module;Wherein sound and light alarm
Circuit submodule forms sound light alarming circuit by 555 timer U2, loudspeaker LS1, common red light emitting diodes LED2 etc.;Shake
Dynamic sensor assembly connects single-chip microcomputer by single-chip processor i/o mouth, when coded lock is closed and shock sensor module is examined
Signal, the alarm of MCU driving sound light alarming circuit submodule can be sent to single-chip microcomputer after measuring sharp pounding.
Further, the application also includes bluetooth communication, and bluetooth communication connects monolithic by single-chip processor i/o mouth
Machine, bluetooth communication can be communicated with handheld client end by bluetooth, and server and monolithic are realized by handheld client end
Machine is exchanged information, and the password obtained from server is sent into single-chip microcomputer by handheld client end, carried out by single-chip microcomputer close
Code compares and realizes unlocking function.
The present invention has obvious beneficial effect equivalent to prior art.
First, a kind of variable two-dimension code is locked, and two-dimentional code switch is every to single-chip microcomputer transmission switching signal, single-chip microcomputer after being pressed
Signal caused by receiving once two-dimentional code switch regenerates a Quick Response Code, subscription client scanning Quick Response Code and by Quick Response Code
Server is sent to, password is obtained after server parsing Quick Response Code and sends password close to client, user's reading client
Password is inputted after code and realizes unlocking, lockset with server direct communication, need not reduce the data processing pressure of server, save
The about manufacturing cost of lockset.
Second, variable two-dimension code includes Quick Response Code calibration point, lockset status information portion, variable function message part, clothes
It is engaged in that the automatic link information part in device website, the automatic connection server of client can be allowed, server can pass through 2 D code information
Directly judge lockset state, accurately and reliably parse lockset password.
3rd, variable two-dimension code also includes lockset identification division, by the permutation and combination of black-white point on Quick Response Code to show
One numerical value that is fixed but being different from other locksets, with ensure each two-dimensional code lock being serviced device pass through
Quick Response Code is identified and differentiated, and makes Quick Response Code more intelligent.
4th, variable two-dimension code also includes unlocking identification variables code, by the permutation and combination of black-white point on Quick Response Code to show
Showing the number that lockset is opened, same lockset, its first caused unlocking identification variables code 0, lockset is often opened once, its
Unlocking identification variables code increase by 1 on caused Quick Response Code, for example, the lockset originally closed, its in off position under no matter give birth to
Into how many times Quick Response Code, the unlocking identification variables code in its Quick Response Code generated represents 0, after lockset is previously opened 1 time, its
Quick Response Code is generated after first switching on, no matter generates how many times, the equal table of unlocking identification variables code in its Quick Response Code generated
Show 1, before it is not opened again after lockset closing, the unlocking identification variables code in its Quick Response Code generated also represents
1, make Quick Response Code more intelligent, judging whether user pays for server provides reference.
5th, described variable two-dimension code also includes time showing part, passes through the permutation and combination of black-white point on Quick Response Code
To show time value, the time value is reset when lockset is opened by the timer record inside single-chip microcomputer, the value and starts to remember
Record, it is off in lockset closing and is recorded as definite value;It is that APP on user or server can be directly from Quick Response Codes that it, which is acted on,
On parse time of lockset opening, to judge charge amount, reduce the load of server storage record.
6th, Quick Response Code internal processing modules, including at least a kind of variable cipher production method in 3 kinds, allow lockset more
Securely and reliably, the production of more variable cipher provides tool method.
7th, keyboard password input submodule can use existing panel and keypad to input, moreover it is possible to using creative
New mechanical input through keyboard, design are more flexible.
8th, the method for work of variable two-dimension code lock is rigorous, flexible, reliable, it is ensured that two-dimensional code lock two-dimensional code lock is normal
Effective work.
9th, described power supply circuit also includes external power supply module, and external power supply module has automatic generation function, when
When Password Input hardware components are mechanical cipher input unit, it is mechanical charge and solar charging that external power supply module, which comprises at least,
A portion in electric two parts;When Password Input hardware components use panel type keyboard, external power supply module does not include
Mechanical charge part;Mechanical charge part is ingenious in design, and input password can just generate electricity.
Tenth, the application also includes sound light alarming circuit submodule and shock sensor module and closes shape when coded lock is in
State and shock sensor module can send signal, MCU driving sound light alarming circuit after detecting sharp pounding to single-chip microcomputer
Module is alarmed.
11st, the application also includes bluetooth communication, and bluetooth communication connects monolithic by single-chip processor i/o mouth
Machine, bluetooth communication can be communicated with handheld client end by bluetooth, and server and monolithic are realized by handheld client end
Machine is exchanged information, and the password obtained from server is sent into single-chip microcomputer by handheld client end, carried out by single-chip microcomputer close
Code compares and realizes unlocking function.
Brief description of the drawings
Fig. 1 is present system fundamental diagram.
Fig. 2 forms one of framework illustrated example for variable two-dimension code in the present invention.
Fig. 3 is unlocking circuit of the present invention.
Fig. 4 is invention keyboard scan control circuit.
Fig. 5 is shaped variable trick lock automatic generating structure schematic diagram of the present invention.
Fig. 6 is coded lock matrix keyboard cross-sectional view of the present invention.
In figure respectively marked as:1:Combination disk, 2:Numeral identification, 3:Cipher rotary knob, 4:Microgenerator, 5:Knob generating tooth
Wheel, 6:Rectifier bridge stack, 7:Rechargeable battery, 8:Shaped variable trick lock, 9:Quick Response Code calibration point, 10:Lockset status information portion, 11:
Variable function message part, 12:The automatic link information part of server site, 13:Lockset identification division, 14:Solar cell
Plate, 15:Voltage-regulator diode, 16:Anti-return diode, 17:Button pallet, 18:Cross recess, 19:Force, which is turned round, follows closely, and 20:Elastic force is pressed
Pressure key, 21 keyboard conductive rubbers, 22:Cipher lock panel, 23:Back-moving spring, 24:Unlocking identification variables code, 25:Time showing portion
Point, 26:Other necessary information parts.
Embodiment
Below in conjunction with the accompanying drawings 1 to 6 and embodiment, the invention will be further described, but present disclosure is not limited to
The scope.
A kind of variable two-dimension code lock, it is based in minimum SCM system, including variable two-dimension code display module, Quick Response Code
Portion's processing module, keyboard password input submodule, power supply circuit, reset oscillating circuit, unlocking circuit, two-dimentional code switch, lockset
State detection module, internal clocking module, and the server being used cooperatively with variable two-dimension code lock;In variable two-dimension code lock
Portion is provided with primary control program, and server control program is also equipped with server;Keyboard password input submodule, unlocking circuit,
Two-dimentional code switch connects single-chip microcomputer by single-chip processor i/o mouth;Power supply circuit, reset oscillating circuit use minimum SCM system phase
Supporting power supply circuit and reset oscillating circuit;Unlocking circuit is used for the opening and closing for controlling variable two-dimension code to lock;Lockset shape
State detection module belongs to a subprogram in primary control program inside single-chip microcomputer, by detect single-chip microcomputer to unlocking circuit module
The high level or low level signal that the I/O mouths of submodule connection are sent are opening or closing judge variable two-dimension code lock
State, two-dimentional code switch are often received once caused by two-dimentional code switch after being pressed to single-chip microcomputer transmission switching signal, single-chip microcomputer
Signal regenerates a Quick Response Code;Subscription client scans Quick Response Code and Quick Response Code is sent into server, server parsing
Password is obtained after Quick Response Code and sends password to client, password is inputted after user's reading client password realizes and unlock.
Variable two-dimension code display module is connected with single-chip microcomputer, and it shows variable two-dimension code, and variable two-dimension code includes Quick Response Code
Calibration point (9), lockset status information portion (10), variable function message part (11), the automatic link information portion of server site
Divide (12);Quick Response Code calibration point (9) is arranged on any three angles in four angles of Quick Response Code, confirms Quick Response Code to system
Direction;Lockset status information portion (10) is by the permutation and combination of black-white point on Quick Response Code to show that lockset is opening or closing
State;Variable function message part (11) by the permutation and combination of black-white point on Quick Response Code with show at least one numerical value or
Show a function code or show at least one numerical value and a function code;The automatic link information part of server site
(12) by the permutation and combination of black-white point on Quick Response Code with the website of display server, it is ensured that automatically opened up after Quick Response Code is scanned
The APP or server site of lockset are controlled, the automated communications with server are realized eventually through mobile phone.
Variable two-dimension code described if necessary also includes lockset identification division (13), passes through the arrangement of black-white point on Quick Response Code
Combination is to show a numerical value that is fixed but being different from other locksets, to ensure that each two-dimensional code lock can be by
Server is identified and differentiated by Quick Response Code.
Further, described variable two-dimension code also includes unlocking identification variables code (24), passes through black-white point on Quick Response Code
Permutation and combination to show number that lockset is opened, same lockset, unlocking identification variables code (24) 0 caused by it is first,
Lockset is often opened once, unlocking identification variables code (24) increase by 1 on its caused Quick Response Code, for example, the lock originally closed
Tool, its in off position under no matter generate how many times Quick Response Code, the unlocking identification variables code (24) in its Quick Response Code generated is equal
0 is represented, after lockset is previously opened 1 time, it generates Quick Response Code after first switching on, no matter generate how many times, what it was generated
Unlocking identification variables code (24) in Quick Response Code represents 1, before it is not opened again after lockset closing, what it was generated
Unlocking identification variables code (24) in Quick Response Code also represents 1.
Further, described variable two-dimension code also includes time showing part (25), passes through black-white point on Quick Response Code
To show time value, the time value is reset permutation and combination by the timer record inside single-chip microcomputer, the value when lockset is opened
And start recording, it is off in lockset closing and is recorded as definite value;It is that APP on user or server can be direct that it, which is acted on,
The time of lockset opening is parsed from Quick Response Code, to judge charge amount, reduces the load of server storage record.
Quick Response Code internal processing modules, following 3 kinds of at least one is included, and the control program of internal module is master control journey
A part in sequence:
1)Each variable two-dimension code lock is provided with the numbering n of oneself, Quick Response Code inter-process mould corresponding to n-th of two-dimensional code lock
It is provided with the cryptographic libraries of block and changes function subprogram containing an independent function Fn and password;Identical function Fn
And password changes function subprogram and existed in simultaneously in management server function library, as long as there is identical variate-value, just has
Identical operation result;Open after two-dimentional code switch or SCM system automatically generate Quick Response Code switching signal, variable two-dimensional
Variable two-dimension code is shown on code display module, Quick Response Code internal processing modules automatically generate described variable two-dimension code, therein
Variable function message part (11) display content in variable two-dimension code includes two-dimensional code lock numbering, variate-value, described variable
The random generation of value;
2)Identical function Fn and password are provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock
Change function subprogram;Identical function Fn is also equipped with management server function library and password changes function subprogram only;
As long as there is identical variate-value, function Fn just has identical operation result;Open two-dimentional code switch or SCM system certainly
After dynamic generation Quick Response Code switching signal, variable two-dimension code, Quick Response Code internal processing modules are shown on variable two-dimension code display module
Automatically generate described variable two-dimension code, variable function message part (11) display content in variable two-dimension code therein includes
Variate-value, described variate-value generate at random;
3)Be provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock multiple function Fn and and
Corresponding password changes function subprogram, each function Fn and and corresponding password change function subprogram and be provided with
Numbering m;In management server function library, multiple function Fn and and the corresponding password change sub- journey of function are also equipped with
Sequence, each function Fn and and corresponding password change function subprogram be provided with numbering m;Function Fn is identical, and has phase
Same variate-value, just has identical operation result, described variate-value generates at random.
Open after two-dimentional code switch or SCM system automatically generate Quick Response Code switching signal, variable two-dimension code shows mould
Variable two-dimension code is shown on block, Quick Response Code internal processing modules automatically generate described variable two-dimension code, variable two-dimensional therein
Code in variable function message part (11) display content include function Fn, coding m, function variable value, described variate-value with
Machine generates.
Further, keyboard password input submodule is using a kind of following or combination of the two:
A, Password Input hardware components are mechanical cipher input unit, by 4 combination disks(1), 4 cipher rotary knobs(3), 16 numbers
Code mark(2), cipher rotary knob(3), button pallet(17), cross recess(18), force turn round nail(19), elastic force pressing key(20), key
Disk conductive rubber(21), cipher lock panel(22), back-moving spring(23)Form;Cipher rotary knob(3)With cipher lock panel(22)It
Between be provided with back-moving spring(23), cipher rotary knob(3)Axle be sleeve structure, nested knob generating gear(5)Upper shaft, the axle
It is provided with cross recess(18), cipher rotary knob(3)Quill on the inside of be provided with force turn round nail(19), embedded knob generating gear(5)
The cross recess of upper shaft(18)Interior, such structure causes user in rotational password knob(3)At this time, force turns round nail(19)Place
In cross recess(18)Horizontal clearance in, will not produce and push maloperation;Cipher rotary knob(3)The bottom of quill be welded with bullet
Power presses key(20), elastic force pressing key(20)Lower section be button pallet(17), the button pallet(17)By connection sheet with it is upper
The cipher lock panel of side(22)It is fixed, the button pallet(17)It is pasted with keyboard conductive rubber(21), turn to set password position
After putting, cipher rotary knob is pressed down on(3), elastic force pressing key(20)With button pallet(17)Upper keyboard conductive rubber(21)Contact
Conducting, input a password value;When hand decontrols cipher rotary knob(3)When, in the presence of back-moving spring, set back;
4 keys of Password Input are designed for interference key board using determinant, and 16 buttons line up 4 × 4 matrixes;Using single in design
8 I/O lines of piece machine do the keyboard scan of 16 buttons, send out scanning signal by P2.0~P2.3, P2.4~P2.7 reads and pressed
Key data return code;
Which button password scan module detects in a manner of program scanning is pressed, single pass one row, 4 buttons, scanning
Order is as follows:
(a) scanning signal 1110 is sent out to scan 4 buttons of C1 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(b) scanning signal 1101 is sent out to scan 4 buttons of C2 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(c) scanning signal 1011 is sent out to scan 4 buttons of C3 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(d) scanning signal 0111 is sent out to scan 4 buttons of C4 row, is read button data, is judged whether the row have key to press,
If there is key to be pressed, the key being pressed is connected to, line of return state is 0;
(e) return to that step (a) is continuous to do key scan;
The step of above, continuously repeats, if a button is pressed, the button is decoded out, when a certain button is pressed,
Its keypad numerals is to count numbering;
Password determining program is placed in main program, is read when having button, is judged when determination key is pressed;Set in a program
The password of the space storage setting of 4 bytes and the data of 4 bytes storage input through keyboard;According to the keyboard data and single-chip microcomputer of reading
Local password successive appraximation that inside automatically generates, if password is correct, is unlocked it may determine that the correctness of input password, if
Incorrect, then Password Input counting how many times element count, does not reach such as 3 times, returns to keyboard scan module to ensure that user obtains
There is the chance of 3 this input password after one password, if Password Input number reaches 3 passwords still not right, SCM system
Quick Response Code switching signal is automatically generated, regenerates new Quick Response Code.
B, Password Input hardware components use panel type keyboard, and 0 to 9 totally 10 keys are provided with keyboard, are used in design
The I/O connection keyboards of single-chip microcomputer, password is directly inputted by keyboard, password scan module by read the password of input through keyboard with
The local password automatically generated inside piece machine is compared, if password is correct, unlocks, if incorrect, Password Input number
Counting unit counts, do not reach such as 3 times, return to keyboard scan module to ensure that user there are 3 this input close after obtaining a password
The chance of code, if to reach 3 passwords still not right for Password Input number, SCM system automatically generates two-dimentional code switch letter
Number, regenerate new Quick Response Code.Because using the technology of panel type input through keyboard password as prior art, therefore repeat no more.
Described primary control program is programmed using assembler language, including the initialization module of system, password scan module,
Call password multilevel iudge module.
A, initialization module is run in start, when two-dimentional code switch opening or system automatically generate two-dimentional code switch letter
After number, system is initialized automatically, the lockset then inquired about in the open and-shut mode generation variable two-dimension code of variable two-dimension code lock
Status information portion (10);The cryptographic libraries in single-chip microcomputer internal memory are called, gathering information produces the variable function in variable two-dimension code
Message part (11);Transfer the automatic link information generating portion of server site;Transfer the other of Quick Response Code Quick Response Code life generation
Necessary information part (26) generates overall variable two-dimension code, wherein transferring the method for work of function information part is:
a)When each variable two-dimension code lock is provided with the numbering n of oneself, Quick Response Code inter-process corresponding to n-th of two-dimensional code lock
It is provided with the cryptographic libraries of module and changes function subprogram, identical function containing an independent function Fn and password
Fn and password change function subprogram and existed in simultaneously in management server function library, will as long as there is identical variate-value
When having identical operation result, the internal number n of variable two-dimension code lock is transferred, and generates variate-value c at random, variable the two of production
Tie up internal number n and the random generation variate-value c that the variable function message part in code includes variable two-dimension code lock;Single-chip microcomputer root
Single-chip microcomputer internal memory is stored according to the internal number n transferred, random generation variate-value c and independent function Fn, generation local password y
It is interior;
b)When being provided with identical function Fn and close in the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock
Code changes function subprogram, and identical function Fn is also equipped with management server function library and password changes function subprogram,
As long as there is identical variate-value, when function Fn just has identical operation result, stochastic production variate-value c, variable the two of production
The variable function message part in code is tieed up only comprising random generation variate-value c, single-chip microcomputer is according to random generation variate-value c and independence
Function Fn, generation local password y are stored in single-chip microcomputer internal memory;
c)Be provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock multiple function Fn and and
Corresponding password changes function subprogram, each function Fn and and corresponding password change function subprogram and be provided with
Numbering m, in management server function library, be also equipped with multiple function Fn and and corresponding password change the sub- journey of function
Sequence, each function Fn and and corresponding password change function subprogram be provided with numbering m, function Fn is identical, and has phase
Same variate-value, when just having identical operation result, stochastic production variate-value c, while random call function Fn numbering m,
Variable function message part in the variable two-dimension code of production includes stochastic production variate-value c, random call function Fn numbering
M, single-chip microcomputer are stored in single-chip microcomputer according to random generation variate-value c and the independent function Fn of random call, generation local password y
In depositing;
D) when each variable two-dimensional lock Quick Response Code internal processing modules cryptographic libraries comprise at least have it is above-mentioned a), b), c) three kinds
The information of password place storage in situation in the case of two kinds, and when corresponding parsing information is also stored on server, at random
Transfer the information that stores in the cryptographic libraries of the Quick Response Code internal processing modules of variable two-dimensional lock correspond to situation any one, and produce
Raw corresponding Quick Response Code and the corresponding local value y of production.
B, password scan module is mainly the password for reading input through keyboard, and is entered with the local password of generation inside single-chip microcomputer
Row compares, and the module has illustrated above-mentioned, therefore repeats no more.
The method of work of variable two-dimension code lock is as follows:
1)Press two-dimentional code switch or system automatically generates Quick Response Code switching signal, system auto-initiation, inquiry variable two
Tie up the lockset status information portion (10) in the open and-shut mode generation variable two-dimension code of code lock;Call the password in single-chip microcomputer internal memory
Storehouse, gathering information produce the variable function message part (11) in variable two-dimension code;Transfer the automatic link information of server site
Generating portion;The number data for calling lockset to open, generation unlocking identification variables code (24);Transfer the life generation of Quick Response Code Quick Response Code
Other necessary information parts (26) generate overall variable two-dimension code, and be shown on variable two-dimension code display module, while single
Piece machine itself parses local password according to the variable function message part (11) in the Quick Response Code of the generation, and by the Quick Response Code
Information storage is in case call;When described variable two-dimension code includes lockset identification division (13), server parsing lockset identification
Partly (13) with ensure each two-dimensional code lock being serviced device differentiate, while the information of whole Quick Response Code according to different locks
Tool carries out classified and stored, in case query calls;When described variable two-dimension code includes time showing part (25), when lockset shape
State message part (10) shows lockset when be open mode, and it shows time point value when lockset is opened or not between now display
Value;When lockset status information portion (10) shows lockset closed mode, it shows that last lockset is opened to shut-in time section
Time value;
2)Handheld client end is scanned, and the variable two-dimension code of scanning is given to the APP parsings in handheld client end, and APP passes through solution
Analyse the automatic connection server of the automatic link information part (12) of server site;APP or server are by parsing lockset state
Message part (10) judges that lockset is opening or the state of closing;Server is by parsing the variable function on variable two-dimension code
Message part (11), corresponding function is searched in the server, and use in variable function message part (11) and provide information meter
Calculate the generation password Y consistent with the local password of single-chip microcomputer production;When described variable two-dimension code includes time showing part
(25) when, lockset identification division (13) shows time value, and the time value is being locked by the timer record inside single-chip microcomputer, the value
Simultaneously start recording is reset when tool is opened, is off in lockset closing and is recorded as definite value, server is by parsing variable two-dimension code
On time showing part (25) determine that last lockset is opened to the time value of shut-in time section, with determine that user uses when
Between, being determined according to the time and expenses standard should be to client's fee charged;When described variable two-dimension code shows not comprising the time
When showing part (25), server is targetedly inquired about and transferred server internal database according to lockset identification division (13) and remembers
Record, to determine time that user uses, being determined according to the time and expenses standard should be to client's fee charged;
Further, the method for server counter service charge is:Server is able to record each client corresponding account to service
The Quick Response Code of device transmitting, and can judge that the Quick Response Code that client is sent is by the lockset identification division (13) identified on Quick Response Code
It is no to come from same lockset;For same lockset, server detects two with identical lockset identification division (13) not
Same Quick Response Code, and two Quick Response Codes show that lockset is closed, and the latter shows the two dimension of lockset closed mode
The unlocking identification variables code (24) that there is difference to be 1 for code and the Quick Response Code of previous display lockset closed mode, then server
Judge that the lock is previously opened, and the client user opening given tacit consent to;If account corresponding to client is being sent with poor
It is worth the unlocking identification variables code (24) for 1 and shows that the period between two Quick Response Codes of lockset closed mode does not pay
The service charge of corresponding lockset is crossed, then judges that two are somebody's turn to do with the unlocking identification variables code (24) that difference is 1 and show that lockset closes
Period between two Quick Response Codes of closed state is the period that the lockset is user service;When described variable two-dimension code bag
During part containing time showing (25), the time that server is directly read in the Quick Response Code of last display lockset closed mode shows
Show part (25), can just parse the time for determining that user uses, and determine to collect to client according to the time and expenses standard
Expense;When described variable two-dimension code does not include time showing part (25), server is according to lockset identification division (13)
Server internal data-base recording is targetedly inquired about and transferred, the two are sent to server by inquiring about subscription client
The time of client, the time difference obtained are the time that user uses, and should be to visitor according to the time and expenses standard determination
Family fee charged;
3)Server detection sends the IP or account information of the client of Quick Response Code, whether to judge the client corresponding account
There is unpaid situation, information sent if then according to the corresponding expense of status inquiry in step 2, and to client end AP P,
Remind client to pay outstanding charge and the specific amount of money, enter if the expense that account corresponding to the client does not need to pay
Enter next step;
4)Server detection lockset status information portion (10), when lockset status information portion (10) is shown at variable two-dimension code lock
When open mode, APP reminds client to report or close lockset for repairment;When lockset status information portion (10) shows variable two-dimension code lock
When being closed, and the password Y passwords parsed in above-mentioned steps 2 are sent on the APP on user's handheld client end;
5)Reported for repairment, paid the bill according to the information of server push and with reference to actual conditions, closing lockset, or according to from service
The password that device obtains passes through input through keyboard password;
6)Single-chip microcomputer is transferred the password that local password and server obtain and is compared, if single-chip microcomputer detects Password Input 3
Still incorrect after secondary, then SCM system automatically generates Quick Response Code switching signal, regenerates new Quick Response Code, variable two-dimension code
New Quick Response Code is shown on display module, system returns to above-mentioned steps 1;If the correct MCU driving unlocking circuit of password will
Variable two-dimension code lock is opened;
7)After user's use, lockset is closed, two-dimentional code switch is pressed and obtains new Quick Response Code, and by handheld client end
APP the Quick Response Code of acquisition is sent to server, system returns to above-mentioned 1st step.
Further, described power supply circuit also includes external power supply module, and external power supply module has automatic generation work(
Can, when Password Input hardware components are mechanical cipher input unit, external power supply module is including at least for mechanical charge and too
Sun can charge a portion in two parts;When Password Input hardware components use panel type keyboard, external power supply module
Not comprising mechanical charge part.
a)Mechanical charge:By 4 combination disks(1), 4 cipher rotary knobs(3), 16 numeral identifications(2), microgenerator
(4)And knob generating gear(5)Form;Cipher rotary knob(3)With knob generating gear(5)It is coaxially connected, cipher rotary knob(3)Under
Face is combination disk(1), combination disk(1)It is pasted onto panel surface, cipher rotary knob(3)With knob generating gear(5)Between have panel
Isolation, 4 knob generating gears(5)While and motor gear(24)Engagement, 4 knob generating gears(5)Do not engage each other, electricity
Machine gear(24)With microgenerator(4)Coaxially;Microgenerator(4)Output circuit concatenates rectifier bridge stack(6)And connect charging electricity
Pond(7), rechargeable battery(7)For shaped variable trick lock(8)Electric energy is provided.Such structure causes user rotating one of password
Knob(3)When, knob generating gear(5)Also rotate, drive the motor gear being meshed therewith(24)Rotate, drive
Microgenerator(4)Generated electricity, output current passes through rectifier bridge stack(6)To rechargeable battery after rectification(7)Charged.
b)Solar recharging:By solar panel(14), voltage-regulator diode(15), anti-return diode(16)Form;
Solar panel(14)Output reversely concatenates voltage-regulator diode(15)Positive concatenation anti-return diode afterwards(16).This structure
So that when sunlight strong, solar panel(14)Export a high voltage, voltage breakdown voltage-regulator diode(15)It is right
Rechargeable battery(7)Charged, if light is weak, such as at night, rechargeable battery(7)It is higher than solar-electricity in voltage
Pond plate(14)Output voltage, forward direction concatenation anti-return diode(16)Current reflux can be prevented.
Further, AT89C51 single-chip microcomputers are used in the present invention, has a high-gain anti-phase in AT89C51 chip internals
Amplifier, its input are chip pin XTAL1, and its output end is pin XTAL2;And in chip internal, XTAL1 and XTAL2
Between bridge crystal oscillator and trimmer, so as to form a stable self-excited oscillator, here it is the clock of single-chip microcomputer
Circuit.
Further, the operation principle of unlocking circuit module submodule is:When user inputs correct password, single-chip microcomputer
High level signal is exported to the I/O mouths being connected with unlocking circuit module submodule, transistor saturation conduction, relay adhesive, is driven
Dynamic electronic fractional motor running, electronic lock are opened;Conversely, when the password of input error, single-chip microcomputer to unlocking circuit module
The I/O mouths output low level of module connection, transistor cutoff, relay are unable to adhesive, and motor is inoperative;Described
Further, the application also includes sound light alarming circuit submodule and shock sensor module;Wherein sound light alarming circuit
Submodule forms sound light alarming circuit by 555 timer U2, loudspeaker LS1, common red light emitting diodes LED2 etc.;Vibrations pass
Sensor module connects single-chip microcomputer by single-chip processor i/o mouth, when coded lock is closed and shock sensor module detects
Signal, the alarm of MCU driving sound light alarming circuit submodule can be sent after sharp pounding to single-chip microcomputer.
Further, the application also includes bluetooth communication, and bluetooth communication connects monolithic by single-chip processor i/o mouth
Machine, bluetooth communication can be communicated with handheld client end by bluetooth, and server and monolithic are realized by handheld client end
Machine is exchanged information, and the password obtained from server is sent into single-chip microcomputer by handheld client end, carried out by single-chip microcomputer close
Code compares and realizes unlocking function.
Claims (1)
- A kind of 1. variable two-dimension code lock, it is characterised in that:A, it is based on minimum SCM system, including variable two-dimension code display module, Quick Response Code internal processing modules, keyboard password Input submodule, power supply circuit, reset oscillating circuit, unlocking circuit, two-dimentional code switch, lockset state detection module, internal meter When module, and with the server that is used cooperatively of variable two-dimension code lock;Variable two-dimension code lock is internally provided with primary control program, takes Server control program is also equipped with business device;Keyboard password input submodule, unlocking circuit, two-dimentional code switch pass through single-chip microcomputer I/O mouths connect single-chip microcomputer;Power supply circuit, reset power supply circuit and reset that oscillating circuit is matched using minimum SCM system Oscillating circuit;Unlocking circuit is used for the opening and closing for controlling variable two-dimension code to lock;Lockset state detection module belongs to single-chip microcomputer A subprogram in internal primary control program, sent out by detecting single-chip microcomputer to the I/O mouths being connected with unlocking circuit module submodule The high level or low level signal gone out is opening or the state of closing judge variable two-dimension code lock, two-dimentional code switch by by After pressure to single-chip microcomputer send switching signal, single-chip microcomputer often receive once two-dimentional code switch caused by signal regenerate a two dimension Code;Subscription client scans Quick Response Code and Quick Response Code is sent into server, and server obtains password after parsing Quick Response Code and will Password is sent to client, password is inputted after user's reading client password realizes and unlock;B, variable two-dimension code display module is connected with single-chip microcomputer, and it shows variable two-dimension code, and variable two-dimension code includes Quick Response Code school (9), lockset status information portion (10), variable function message part (11), the automatic link information part of server site on schedule (12);Quick Response Code calibration point (9) is arranged on any three angles in four angles of Quick Response Code, and the side of Quick Response Code is confirmed to system To;Lockset status information portion (10) is by the permutation and combination of black-white point on Quick Response Code to show that lockset is opening or closing State;Variable function message part (11) is by the permutation and combination of black-white point on Quick Response Code to show at least one numerical value or aobvious Show a function code or show at least one numerical value and a function code;The automatic link information part of server site (12) by the permutation and combination of black-white point on Quick Response Code with the website of display server, it is ensured that automatically opened up after Quick Response Code is scanned The APP or server site of lockset are controlled, the automated communications with server are realized eventually through mobile phone;Variable two-dimension code also includes lockset identification division (13), by the permutation and combination of black-white point on Quick Response Code with show one it is solid A numerical value that is fixed but being different from other locksets, with ensure each two-dimensional code lock being serviced device pass through Quick Response Code Identify and differentiate;Described variable two-dimension code also includes unlocking identification variables code (24), by the permutation and combination of black-white point on Quick Response Code to show Show the number that lockset is opened, same lockset, its first caused unlocking identification variables code (24) is 0, and lockset is per opened Once, unlocking identification variables code (24) increase by 1 on its caused Quick Response Code, for example, the lockset originally closed, it is closing shape No matter how many times Quick Response Code is generated under state, and the unlocking identification variables code (24) in its Quick Response Code generated represents 0, when lockset quilt After opened 1 time, it generates Quick Response Code after first switching on, no matter generate how many times, the unlocking in its Quick Response Code generated Identification variables code (24) represents 1, before it is not opened again after lockset closing, the unlocking in its Quick Response Code generated Identification variables code (24) also represents 1;Described variable two-dimension code also includes time showing part (25), by the permutation and combination of black-white point on Quick Response Code to show Time value, for the time value by the timer record inside single-chip microcomputer, the value is reset when lockset is opened and start recording, is locking Tool closing is off and is recorded as definite value;It is that APP on user or server can be parsed directly from Quick Response Code that it, which is acted on, Go out the time of lockset opening, to judge charge amount, reduce the load of server storage record;C, described primary control program is programmed using assembler language, including the initialization module of system, password scan module, tune With password multilevel iudge module:(a)Initialization module is run in start, when two-dimentional code switch opening or system automatically generate Quick Response Code switching signal Afterwards, system is initialized automatically, the lockset shape then inquired about in the open and-shut mode generation variable two-dimension code of variable two-dimension code lock State message part;The cryptographic libraries in single-chip microcomputer internal memory are called, gathering information produces the variable function information portion in variable two-dimension code Point;Transfer the automatic link information generating portion of server site;Transfer other necessary information portions of Quick Response Code Quick Response Code life generation Mitogenetic integral variable two-dimension code, wherein transferring the method for work of function information part is:1)When each variable two-dimension code lock is provided with the numbering n of oneself, Quick Response Code inter-process corresponding to n-th of two-dimensional code lock It is provided with the cryptographic libraries of module and changes function subprogram, identical function containing an independent function Fn and password Fn and password change function subprogram and existed in simultaneously in management server function library, will as long as there is identical variate-value When having identical operation result, the internal number n of variable two-dimension code lock is transferred, and generates variate-value c at random, variable the two of production Tie up internal number n and the random generation variate-value c that the variable function message part in code includes variable two-dimension code lock;Single-chip microcomputer root Single-chip microcomputer internal memory is stored according to the internal number n transferred, random generation variate-value c and independent function Fn, generation local password y It is interior;2)When being provided with identical function Fn and close in the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock Code changes function subprogram, and identical function Fn is also equipped with management server function library and password changes function subprogram, As long as there is identical variate-value, when function Fn just has identical operation result, stochastic production variate-value c, variable the two of production The variable function message part in code is tieed up only comprising random generation variate-value c, single-chip microcomputer is according to random generation variate-value c and independence Function Fn, generation local password y are stored in single-chip microcomputer internal memory;3)Be provided with the cryptographic libraries of the Quick Response Code internal processing modules of each variable two-dimensional lock multiple function Fn and and Corresponding password changes function subprogram, each function Fn and and corresponding password change function subprogram and be provided with Numbering m, in management server function library, be also equipped with multiple function Fn and and corresponding password change the sub- journey of function Sequence, each function Fn and and corresponding password change function subprogram be provided with numbering m, function Fn is identical, and has phase Same variate-value, when just having identical operation result, stochastic production variate-value c, while random call function Fn numbering m, Variable function message part in the variable two-dimension code of production includes stochastic production variate-value c, random call function Fn numbering M, single-chip microcomputer are stored in single-chip microcomputer according to random generation variate-value c and the independent function Fn of random call, generation local password y In depositing;4) when each variable two-dimensional lock Quick Response Code internal processing modules cryptographic libraries comprise at least have it is above-mentioned a), b), c) three kinds The information of password place storage in situation in the case of two kinds, and when corresponding parsing information is also stored on server, at random Transfer the information that stores in the cryptographic libraries of the Quick Response Code internal processing modules of variable two-dimensional lock correspond to situation any one, and produce Raw corresponding Quick Response Code and the corresponding local value y of production;(b), password scan module is mainly the password for reading input through keyboard, and is carried out with the local password of generation inside single-chip microcomputer Compare;D, the method for work of variable two-dimension code lock is as follows:1)Press two-dimentional code switch or system automatically generates Quick Response Code switching signal, system auto-initiation, inquiry variable two Tie up the lockset status information portion in the open and-shut mode generation variable two-dimension code of code lock;The cryptographic libraries in single-chip microcomputer internal memory are called, Variable function message part in gathering information production variable two-dimension code;Transfer the automatic link information generating unit of server site Point;The number data for calling lockset to open, generate unlocking identification variables code;Transfer other necessity of Quick Response Code Quick Response Code life generation Message part generates overall variable two-dimension code, and is shown on variable two-dimension code display module, while single-chip microcomputer itself basis should Variable function message part parsing local password in the Quick Response Code of generation, and by the information storage of the Quick Response Code in case calling; When described variable two-dimension code includes lockset identification division, server parses lockset identification division to ensure each two-dimensional code lock Can being serviced device differentiate, while the information of whole Quick Response Code is carried out classified and stored according to different locksets, in case inquiry is adjusted With;When described variable two-dimension code includes time showing part, when lockset status information portion shows that lockset is open mode When, its show lockset open when time point value or not now show between be worth;When lockset status information portion shows that lockset is closed During state, it shows that last lockset is opened to the time value of shut-in time section;2)Handheld client end is scanned, and the variable two-dimension code of scanning is given to the APP parsings in handheld client end, and APP passes through solution Analyse the automatic automatic connection server in link information part of server site;APP or server are by parsing lockset status information Part judges that lockset is opening or the state of closing;Server is by parsing the variable function information portion on variable two-dimension code Point, corresponding function is searched in the server, and calculates generation and single-chip microcomputer using information is provided in variable function message part The consistent password Y of the local password of production;When described variable two-dimension code includes time showing part, lockset identification division shows Show time value, the time value is by the timer record inside single-chip microcomputer, and the value is reset when lockset is opened and start recording, Lockset is closed and is off and is recorded as definite value, and server determines the last time by parsing the time showing part on variable two-dimension code Lockset is opened to the time value of shut-in time section, and to determine time that user uses, being determined according to the time and expenses standard should To client's fee charged;When described variable two-dimension code does not include time showing part, server is according to lockset identification part Point targetedly inquire about and transfer server internal data-base recording, to determine time that user uses, according to the time and Expenses standard determines should be to client's fee charged;Further, the method for server counter service charge is:Server is able to record each client corresponding account to service Device transmitting Quick Response Code, and can be judged by the lockset identification division identified on Quick Response Code client transmission Quick Response Code whether come From same lockset;For same lockset, server detects two different two dimensions with identical lockset identification division Code, and two Quick Response Codes show that lockset is closed, and the latter show the Quick Response Code of lockset closed mode with it is previous The Quick Response Code of individual display lockset closed mode has the unlocking identification variables code that difference is 1, then server judges that the lock is beaten Opened, and the client user opening given tacit consent to;If account corresponding to client is being sent with the unlocking change that difference is 1 Measure identification code and show that the period between two Quick Response Codes of lockset closed mode did not pay the service of corresponding lockset Take, then judge two should with difference be 1 unlocking identification variables code and show lockset closed mode two Quick Response Codes it Between period be period that the lockset is user service;When described variable two-dimension code includes time showing part, clothes Business device directly reads the time showing part in the Quick Response Code of last display lockset closed mode, can just parse and determine user The time used, and should be to client's fee charged according to the time and expenses standard determination;When described variable two-dimension code not During comprising time showing part, server internal database is targetedly inquired about and transferred to server according to lockset identification division Record, the time of the two clients is sent by inquiring about subscription client to server, the time difference obtained is that user makes Time, and should be to client's fee charged according to the time and expenses standard determination;3)Server detection sends the IP or account information of the client of Quick Response Code, whether to judge the client corresponding account There is unpaid situation, information sent if then according to the corresponding expense of status inquiry in step 2, and to client end AP P, Remind client to pay outstanding charge and the specific amount of money, enter if the expense that account corresponding to the client does not need to pay Enter next step;4)Server detects lockset status information portion, when lockset status information portion shows that variable two-dimension code lock is in open shape During state, APP reminds client to report or close lockset for repairment;When lockset status information portion shows that variable two-dimension code lock is closed When, and the password Y passwords parsed in above-mentioned steps 2 are sent on the APP on user's handheld client end;5)Reported for repairment, paid the bill according to the information of server push and with reference to actual conditions, closing lockset, or according to from service The password that device obtains passes through input through keyboard password;6)Single-chip microcomputer is transferred the password that local password and server obtain and is compared, if single-chip microcomputer detects Password Input 3 Still incorrect after secondary, then SCM system automatically generates Quick Response Code switching signal, regenerates new Quick Response Code, variable two-dimension code New Quick Response Code is shown on display module, system returns to above-mentioned steps 1;If the correct MCU driving unlocking circuit of password will Variable two-dimension code lock is opened;7)After user's use, lockset is closed, two-dimentional code switch is pressed and obtains new Quick Response Code, and by handheld client end APP the Quick Response Code of acquisition is sent to server, system returns to above-mentioned 1st step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710752677.4A CN107578504A (en) | 2017-08-29 | 2017-08-29 | A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710752677.4A CN107578504A (en) | 2017-08-29 | 2017-08-29 | A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107578504A true CN107578504A (en) | 2018-01-12 |
Family
ID=61029672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710752677.4A Withdrawn CN107578504A (en) | 2017-08-29 | 2017-08-29 | A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107578504A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110751247A (en) * | 2019-10-28 | 2020-02-04 | 深圳市深华方科技有限公司 | Method, device and system for generating two-dimensional code on validity period reminding device |
CN113497702A (en) * | 2020-03-20 | 2021-10-12 | 周通 | Novel data encryption and transmission method |
-
2017
- 2017-08-29 CN CN201710752677.4A patent/CN107578504A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110751247A (en) * | 2019-10-28 | 2020-02-04 | 深圳市深华方科技有限公司 | Method, device and system for generating two-dimensional code on validity period reminding device |
CN113497702A (en) * | 2020-03-20 | 2021-10-12 | 周通 | Novel data encryption and transmission method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107293027A (en) | A kind of variable two-dimension code lock | |
CN201554280U (en) | Photoelectric cipher lock system | |
CN103824365B (en) | RFID technology based intelligent padlock and its unlocking method | |
CN106447944A (en) | Intelligent handover cabinet system and intelligent handover method based on internet of things | |
CN104853050A (en) | System and method for bicycle management | |
CN103419517A (en) | Control method and control device for seal management machine | |
CN204102221U (en) | A kind of electrical lock apparatus of energy-conservation intelligent security guard | |
US20190355195A1 (en) | Use method of smart bluetooth lock | |
CN101481078A (en) | Anti-cheat module of fueller and anti-cheat method therefor | |
CN203490747U (en) | Multidirectional intelligent access control system | |
CN107578504A (en) | A kind of variable two-dimension code lock, variable two-dimension code and variable two-dimension code lock method of work | |
CN206299234U (en) | Mobile terminal controlled electron is locked | |
CN105608779A (en) | Electronic code lock system | |
CN107798761A (en) | The intelligence system that a kind of barcode scanning is opened the door | |
CN203285181U (en) | Mobile phone verification code intelligent lock based on GSM | |
CN107316367A (en) | A kind of lock, Quick Response Code mark, coded lock power supply module that Quick Response Code respective function acquisition variable cipher is scanned with mobile phone | |
CN206162780U (en) | Bicycle intelligence trick lock | |
CN107358706A (en) | A kind of variable two-dimension code lock, variable two-dimension code | |
CN103914895B (en) | A kind of wireless sensing Internet of Things lock and method for unlocking thereof | |
CN105730563B (en) | Based on the self-locking bicycle lock of cipher control and its method | |
CN1790438A (en) | Method and system for meter transmitting information | |
CN107450399A (en) | A kind of intelligent umbrella stand for being used to store shared en-toutcas | |
CN101748934A (en) | Networking electronic lock based on power remote meter reading system | |
CN100526584C (en) | Cipher input and recognition device for rotating disc type cipher lock | |
CN202249269U (en) | Solar coded lock circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180112 |
|
WW01 | Invention patent application withdrawn after publication |