CN112686071A - Working method for realizing opening and closing of cabinet door through single chip microcomputer - Google Patents
Working method for realizing opening and closing of cabinet door through single chip microcomputer Download PDFInfo
- Publication number
- CN112686071A CN112686071A CN202011583666.6A CN202011583666A CN112686071A CN 112686071 A CN112686071 A CN 112686071A CN 202011583666 A CN202011583666 A CN 202011583666A CN 112686071 A CN112686071 A CN 112686071A
- Authority
- CN
- China
- Prior art keywords
- string
- authentication
- relay
- character string
- cabinet door
- 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
Images
Landscapes
- Lock And Its Accessories (AREA)
Abstract
The invention provides a working method for realizing the opening and closing of a cabinet door through a single chip microcomputer, which comprises a cabinet body and a cabinet door hinged with the cabinet body, wherein a strip-shaped magnetic body is arranged at the edge of the back face of the cabinet door, and a magnetic lock adaptive to the magnetic body is arranged on the frame of the cabinet door; a display screen display area is arranged on the front surface of the cabinet surface, and a display screen is arranged in the display screen display area; and after the management cabinet receives the cabinet door opening information, the cabinet door is opened. According to the invention, the mobile intelligent terminal carried by the mobile phone and the like can be used for opening the cabinet door, a key is not needed to open the cabinet door, and the user experience is enhanced.
Description
Technical Field
The invention relates to the technical field of management cabinets, in particular to a working method for opening and closing a cabinet door through a single chip microcomputer.
Background
The intelligent file management cabinet is a cabinet body for storing paper data, and is named as a fingerprint storage cabinet by the patent application number 2018101710468, and comprises a cabinet body, a key cap and a circuit board, wherein the cabinet body is provided with a storage cabinet, the storage cabinet is provided with a cabinet door and a cabinet lock, the cabinet door and the cabinet lock are used for forming a containing space for locking and unlocking the storage cabinet, the key cap is arranged on the surface of the cabinet body, the circuit board is arranged in the cabinet body and comprises keys, a fingerprint sensor, a cabinet lock driving circuit and a fingerprint safety chip, the keys, the fingerprint sensor and the cabinet lock driving circuit are all connected with the fingerprint safety chip, the key cap and the keys are used for sending cabinet opening request signals to the fingerprint safety chip, the fingerprint sensor is used for collecting fingerprint information of an operator and sending the fingerprint information to the fingerprint safety chip, the cabinet lock driving circuit is used for driving the cabinet lock, the fingerprint security chip is used for receiving the unpacking request signal, receiving, storing, comparing, deleting fingerprint information and driving the cabinet lock driving circuit. This patent application utilizes its fingerprint sensor to gather its user's fingerprint to realize opening of cabinet door, but if it is unclear to cause its collection because operator's fingerprint portion perspires, this can cause user's bad experience.
Disclosure of Invention
The invention aims to at least solve the technical problems in the prior art, and particularly innovatively provides a working method for opening and closing a cabinet door through a single chip microcomputer.
In order to achieve the purpose, the invention provides a working method for opening and closing a cabinet door through a single chip microcomputer, which comprises the following steps:
s1, displaying the acquired two-dimensional code image on a display screen by the single chip microcomputer;
s2, the mobile handheld intelligent terminal decodes the two-dimensional code and sends the two-dimensional code to the cloud server for verification, and after the verification is passed, the cloud server sends the cabinet opening code to the single chip microcomputer;
and S3, after the single chip microcomputer receives the cabinet opening code, the cabinet door is opened.
In a preferred embodiment of the invention, the method for opening the cabinet door comprises the following steps: the single chip microcomputer sends a conduction level to a grid electrode of a field effect transistor Q1 and sends a conduction level to a grid electrode of a field effect transistor Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a conducting state, the input loop of the relay KM2 is conducted, the first normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, the first normally open contact of the relay KM2 is changed into a closed state from a normally open state, the second normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, and the second normally open contact of the relay KM2 is changed into; the current direction of the magnetic lock is in the opposite direction; the cabinet door is opened.
In a preferred embodiment of the invention, the method for closing the cabinet door comprises the following steps: when the single chip microcomputer receives an approach signal sent by the cabinet door approach switch, the single chip microcomputer sends a turn-on level to a grid electrode of a field-effect tube Q1 and sends a turn-off level to a grid electrode of a field-effect tube Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a cut-off state, the input loop of the relay KM2 is disconnected, the first normally closed contact of the relay KM2 is changed into a normally closed state, the first normally open contact of the relay KM2 is in a normally open state, the second normally closed contact of the relay KM2 is in a normally closed state, and the second normally open contact of the relay KM2 is in a normally; the current direction of the magnetic lock is a positive direction; closing the cabinet door;
after waiting for Ts, s represents time second, and the singlechip sends cut-off level to the grid of the field effect transistor Q1; at the moment, the field effect transistor Q1 is in a cut-off state, the input loop of the relay KM1 is disconnected, the normally open contact of the relay KM1 is in a normally open state, and the magnetic force is locked and de-energized.
In a preferred embodiment of the present invention, step S1 is preceded by the following steps:
s01, after the cloud server receives a cabinet door opening request command, the cloud server generates a random black and white two-dimensional code; transforming the random black-white two-dimensional code into a two-dimensional matrix:
wherein m isxyRepresentation matrix MWHThe value of the element at the x-th row and y-th column;
when it is m xy1 represents a random black-white two-dimensional code in mxyM is black, mxy0 represents the random black-white two-dimensional code in mxyIs white;
h represents the height of the two-dimensional code, and w represents the width of the two-dimensional code;
x is a positive integer less than or equal to h, and y is a positive integer less than or equal to w;
arranging the two-dimensional matrix of the character string from left to right from top to bottom in sequence to form a binary character string:
m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhw(ii) a Obtaining the length of the binary string as PWH;
S02, carrying out primary operation on the random two-dimensional code generated in the step S01 to obtain an authentication character string;
s03, the certification character string obtained in step S02 is operated once to obtain the 1 st certification character string O1Obtaining the 1 st authentication character string O1Is of binary length QWH(ii) a Judging the operation frequency K:
K=INT(PWH/QWH)+1,
wherein, PWHRepresents m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhwLength of (d);
QWHindicating the 1 st authentication string O1Length of (d);
s04, for the 1 st authentication character string O1Performing the same operation as the step S03 to obtain the 1 st authentication string to obtain the 2 nd authentication string O2;
For 2 nd authentication string O2Performing the same operation as the 1 st authentication string obtained in step S03 to obtain the 3 rd authentication string O3;
For the 3 rd authentication string O3Performing the same operation as the 1 st authentication string obtained in step S03 to obtain a 4 th authentication string O4;
……;
Authentication string O for K-1K-1Is carried out once withThe same operation method as the first authentication string is obtained in step S03, and the kth authentication string O is obtainedK;
Sequentially arranging the 1 st authentication character string O 12 nd authentication string O2And 3 rd authentication string O3… …, K authentication string OKAre connected to obtain a connection character string O1O2O3…OK(ii) a Connect it with character string O1O2O3…OKConverting into binary concatenated string, and intercepting binary concatenated string from head with length PWHObtaining an intercepted character string;
s05, carrying out parity XOR processing on the intercepted character string obtained in the step S04 and the binary character string obtained in the step S01 to obtain a verification character string; transforming validation strings into a validation matrix MWH′:
Wherein m isxy' representation verification matrix MWH' element value at x row y column in;
when it is mxy' 1 indicates that the two-dimensional code to be transmitted is in mxy' in place is black, mxy' 0 indicates that the two-dimensional code to be transmitted is in mxy' white at point;
m11′m12′m13′…m1w′m21′m22′m23′…m2w′m31′m32′m33′…m3w′…mh1′mh2′mh3′…mhw' denotes an authentication string;
then converting the verification matrix into a two-dimensional code to be sent;
and S06, sending the two-dimensional code to be sent in the step S05 to a single chip microcomputer, and sending the authentication character string in the step S02 to the mobile handheld intelligent terminal.
In conclusion, due to the adoption of the technical scheme, the mobile intelligent terminal carried by a mobile phone and the like can be used for opening the cabinet door, a key is not needed for opening the cabinet door, and the user experience is enhanced.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow diagram of the present invention.
Fig. 2 is a schematic structural diagram of the present invention.
Fig. 3 is a schematic circuit connection diagram of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
The invention also discloses a working method for realizing the opening and closing of the cabinet door through the single chip microcomputer, which comprises the following steps:
s1, displaying the acquired two-dimensional code image on a display screen by the single chip microcomputer;
s2, the mobile handheld intelligent terminal decodes the two-dimensional code and sends the two-dimensional code to the cloud server for verification, and after the verification is passed, the cloud server sends the cabinet opening code to the single chip microcomputer; in this embodiment, the cloud server verification method includes: after the cloud server receives the decoded two-dimensional code sent by the single chip microcomputer, the cloud server performs one operation on the received decoded two-dimensional code, wherein the operations in the patent of the invention all adopt an SHA-1 algorithm to obtain a comparison character string, and whether the comparison character string is consistent with the authentication character string is judged:
if the comparison character string is consistent with the authentication character string, the verification is passed; generating a cabinet opening code, wherein the generation method of the cabinet opening code comprises the following steps:
A=[a-MAC],
wherein, a represents a comparison character string, MAC represents the physical address of the management cabinet, represents that the comparison character string a is connected with the physical address MAC of the management cabinet, [ ] represents that one operation is carried out, A represents the open cabinet code;
and if the comparison character string is inconsistent with the authentication character string, the verification fails, reminding information is sent to the mobile handheld intelligent terminal, and the two-dimensional code displayed on the display screen is updated.
And S3, after the single chip microcomputer receives the cabinet opening code, the cabinet door is opened. In this embodiment, a '═ a' -MAC,
wherein, a ' represents the character string of opening cabinet, MAC represents the physical address of the management cabinet, -represents to connect the character string a ' of opening cabinet with the physical address MAC of the management cabinet, [ ] represents to carry on a operation, A ' represents the verification code of opening cabinet;
the method for obtaining the open cabinet character string a' comprises the following steps: the mobile handheld intelligent terminal acquired by the management cabinet sends the decoded two-dimensional code to the management cabinet, and the acquired decoded two-dimensional code is subjected to primary operation to obtain an open cabinet character string a'.
In a preferred embodiment of the invention, the method for opening the cabinet door comprises the following steps: the single chip microcomputer sends a conduction level to a grid electrode of a field effect transistor Q1 and sends a conduction level to a grid electrode of a field effect transistor Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a conducting state, the input loop of the relay KM2 is conducted, the first normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, the first normally open contact of the relay KM2 is changed into a closed state from a normally open state, the second normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, and the second normally open contact of the relay KM2 is changed into; the current direction of the magnetic lock is in the opposite direction; the cabinet door is opened. The magnetic lock comprises an excitation coil and a permanent magnet, the connection relation of the excitation coil and the permanent magnet is set according to actual conditions, the connection relation can be that in fig. 3, the excitation coil is located below the permanent magnet, a magnetic pole S of the permanent magnet is located above the magnetic pole S, a magnetic pole N is located below the magnetic pole N, the magnetic field intensity generated by current flowing through the excitation coil is equal to or close to the magnetic field intensity generated by the permanent magnet, the directions of the magnetic field intensity and the magnetic field intensity are opposite, the magnetic lock generates a magnetic field, and the cabinet door is convenient to open.
In a preferred embodiment of the invention, the method for closing the cabinet door comprises the following steps: when the single chip microcomputer receives an approach signal sent by the cabinet door approach switch 7, the single chip microcomputer sends a turn-on level to the grid of the field-effect tube Q1 and sends a turn-off level to the grid of the field-effect tube Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a cut-off state, the input loop of the relay KM2 is disconnected, the first normally closed contact of the relay KM2 is changed into a normally closed state, the first normally open contact of the relay KM2 is in a normally open state, the second normally closed contact of the relay KM2 is in a normally closed state, and the second normally open contact of the relay KM2 is in a normally; the current direction of the magnetic lock is a positive direction (the arrow direction in fig. 3 is a positive direction); closing the cabinet door;
after Ts is waited, s represents time second, and T is 0.1-0.5; the singlechip sends cut-off level to the grid of the field effect transistor Q1; at the moment, the field effect transistor Q1 is in a cut-off state, the input loop of the relay KM1 is disconnected, the normally open contact of the relay KM1 is in a normally open state, and the magnetic force is locked and de-energized. Reducing the electric energy loss.
In a preferred embodiment of the present invention, step S1 is preceded by the following steps:
s01, after the cloud server receives a cabinet door opening request command, the cloud server generates a random black and white two-dimensional code; transforming the random black-white two-dimensional code into a two-dimensional matrix:
wherein m isxyRepresentation matrix MWHThe value of the element at the x-th row and y-th column;
when it is m xy1 represents a random black-white two-dimensional code in mxyM is black, mxy0 represents the random black-white two-dimensional code in mxyIs white;
h represents the height of the two-dimensional code, and w represents the width of the two-dimensional code;
x is a positive integer less than or equal to h, and y is a positive integer less than or equal to w;
arranging the two-dimensional matrix of the character string from left to right from top to bottom in sequence to form a binary character string:
m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhw(ii) a Obtaining the length of the binary string as PWH;
S02, carrying out primary operation on the random two-dimensional code generated in the step S01 to obtain an authentication character string;
s03, the certification character string obtained in step S02 is operated once to obtain the 1 st certification character string O1Obtaining the 1 st authentication character string O1Is of binary length QWH(ii) a Judging the operation frequency K:
K=INT(PWH/QWH)+1,
wherein, PWHRepresents m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhwLength of (d);
QWHindicating the 1 st authentication string O1Length of (d);
s04, for the 1 st authentication character string O1Performing the same operation as the step S03 to obtain the 1 st authentication string to obtain the 2 nd authentication string O2;
For 2 nd authentication string O2Performing the same operation method as that of the 1 st authentication string obtained in step S03 to obtainTo its 3 rd authentication string O3;
For the 3 rd authentication string O3Performing the same operation as the 1 st authentication string obtained in step S03 to obtain a 4 th authentication string O4;
……;
Authentication string O for K-1K-1Performing the same operation as the first authentication string obtained in step S03 to obtain the Kth authentication string OK;
Sequentially arranging the 1 st authentication character string O 12 nd authentication string O2And 3 rd authentication string O3… …, K authentication string OKAre connected to obtain a connection character string O1O2O3…OK(ii) a Connect it with character string O1O2O3…OKConverting into binary concatenated string, and intercepting binary concatenated string from head with length PWHObtaining an intercepted character string;
s05, carrying out parity XOR processing on the intercepted character string obtained in the step S04 and the binary character string obtained in the step S01 to obtain a verification character string; transforming validation strings into a validation matrix MWH′:
Wherein m isxy' representation verification matrix MWH' element value at x row y column in;
when it is mxy' 1 indicates that the two-dimensional code to be transmitted is in mxy' in place is black, mxy' 0 indicates that the two-dimensional code to be transmitted is in mxy' white at point;
m11′m12′m13′…m1w′m21′m22′m23′…m2w′m31′m32′m33′…m3w′…mh1′mh2′mh3′…mhw' denotes an authentication string;
then converting the verification matrix into a two-dimensional code to be sent;
and S06, sending the two-dimensional code to be sent in the step S05 to a single chip microcomputer, and sending the authentication character string in the step S02 to the mobile handheld intelligent terminal. Realize the safe transmission of the data and enhance the storage of important data.
In a preferred embodiment of the present invention, step S2 includes the following steps:
s21, the mobile handheld intelligent terminal scans the two-dimension code on the display screen to obtain a received two-dimension code, and the received two-dimension code is converted into a two-dimension receiving matrix MWH″:
Wherein m isxy"represents the receiving matrix MWH"the value of the element at the x row and y column;
when it is m xy1 indicates that the received two-dimensional code is mxy"in black, mxyAnd 0 indicates that the received two-dimensional code is mxy"in white;
two-dimensional receiving matrix MWH"binary received strings are arranged from left to right and from top to bottom:
m11″m12″m13″…m1w″m21″m22″m23″…m2w″m31″m32″m33″…m3w″…mh1″mh2″mh3″…mhw"; obtaining the length of the binary receiving character string as PWH′;
S22, the mobile hand-held intelligent terminal carries out one operation on the received authentication character string to obtain the 1 st character string O of the authentication character string1', obtaining the 1 st character string O of the certification1' binary length of QWH'; judging the operation frequency K':
K′=INT(PWH′/QWH′)+1,
PWHis' m11″m12″m13″…m1w″m21″m22″m23″…m2w″m31″m32″m33″…m3w″…mh1″mh2″mh3″…mhw"length of;
QWH' indicating authentication 1 st character string O1' length;
s23, for the 1 st character string O1' the same operation as that for obtaining the authentication 1 st character string in step S22 is performed once to obtain the authentication 2 nd character string O2′;
For authentication 2 nd character string O2' the same operation as that for the authentication No. 1 string obtained in step S22 is performed once to obtain the authentication No. 3 string O3′;
For authentication 3 rd character string O3' the same operation as that for the authentication No. 1 string obtained in step S22 is performed once to obtain the authentication No. 4 string O4′;
……;
For authentication K' -1 character string OK′-1'the same operation method as that for obtaining the first authentication string in step S22 is performed once to obtain the K' th authentication string OK′″;
Sequentially authenticating the 1 st character string O1', authentication 2 nd character string O2', authentication 3 rd character string O3', … …, authentication K' character string OK′"connect to get a connected first string O1′O2′O3′…OK′"; connect it with the first character string O1′O2′O3′…OK′"convert to binary concatenated first string," intercept binary concatenated first string from head with length PWH', obtaining a first intercepted character string;
s24, the first character string obtained in the step S23 is intercepted and the first character string obtained in the step S21 is processedCarrying out parity XOR processing on the binary received character string to obtain a first verification character string; transforming the validation first string into a validation first matrix MWH″′,
Wherein m isxy"' indicates that the first matrix M is verifiedWHThe value of the element at line x and column y in ";
when it is mxyAnd 1 indicates that the two-dimensional code is decoded at mxy"' position is black, mxy' 0 means that the two-dimensional code is decoded at mxyThe' position is white;
m11″′m12″′m13″′…m1w″′m21″′m22″′m23″′…m2w″′m31″′m32″′m33″′…m3w″′…mh1″′mh2″′mh3″′…mhw"' indicates that the first string is verified;
transforming the verification first matrix into a decoding two-dimensional code;
and S25, sending the decoded two-dimensional code in the step S24 to a cloud server.
The invention also provides a management cabinet for realizing the working method of opening and closing the cabinet door through the single chip microcomputer, as shown in fig. 2, the management cabinet comprises a cabinet body 1 and a cabinet door 8 hinged with the cabinet body 1, and a strip-shaped magnetic body 9 is arranged at the edge of the back face of the cabinet door 8, wherein the magnetic body can be a permanent magnet or an iron block; a magnetic lock 4 which is adaptive to the magnetic body 9 is arranged on the frame of the cabinet door 8; a display screen display area is arranged on the front surface of the cabinet surface, and a display screen is arranged in the display screen display area;
the left inner side wall and the right inner side wall of the cabinet body 1 are respectively provided with M pairs of supporting frames 3 for supporting and placing the supporting plates 2, wherein M is a positive integer larger than or equal to 1, the 1 st pair of supporting frames, the 2 nd pair of supporting frames, the 3 rd pair of supporting frames, … … and the M th pair of supporting frames are sequentially arranged from top to bottom, the M th pair of supporting frames comprises an M-th left supporting frame and an M-th right supporting frame, an M-th pressure sensor is arranged on the M-th left supporting frame or the M-th right supporting frame, M is a positive integer smaller than or equal to M, and the supporting plates 2 are placed on the M-th;
a cabinet door approach switch 7 for sensing a closing signal of a cabinet door 8 is arranged at the bottom of a frame of the cabinet body 1, a mounting box 5 is arranged at the bottom of the cabinet body 1, a PCB circuit board fixing mounting seat for fixedly mounting a PCB circuit board and a storage battery fixing mounting seat for fixedly mounting a storage battery are arranged in the mounting box 5, the PCB circuit board is fixedly mounted on the PCB circuit board fixing mounting seat, and the storage battery is fixedly mounted on the storage battery fixing mounting seat; a single chip microcomputer and a network data connection module are arranged on a PCB circuit board, the single chip microcomputer adopts an stm32f103 single chip microcomputer, a network data connection end of the network data connection module is connected with a network data connection end of the single chip microcomputer, a power-off control end of a magnetic lock 4 is connected with a power-off control end of the single chip microcomputer, a display end of a display screen is connected with a display end of the single chip microcomputer, a pressure data output end of an mth pressure sensor is connected with a pressure data mth input end of the single chip microcomputer, and a proximity signal output end of a cabinet door proximity switch 7 is connected with a proximity signal input end of the;
and after the management cabinet receives the cabinet door opening information, the cabinet door is opened.
In a preferred embodiment of the present invention, M is 5, and the 1 st pair of supporting frames, the 2 nd pair of supporting frames, the 3 rd pair of supporting frames, the 4 th pair of supporting frames, and the 5 th pair of supporting frames are sequentially arranged from top to bottom;
a 1 st pressure sensor is arranged on the 1 st left support frame or the 1 st right support frame, and the pressure data output end of the 1 st pressure sensor is connected with the 1 st input end of the pressure data of the singlechip; a 2 nd pressure sensor is arranged on the 2 nd left support frame or the 2 nd right support frame, and the pressure data output end of the 2 nd pressure sensor is connected with the 2 nd input end of the pressure data of the singlechip; a 3 rd pressure sensor is arranged on the 3 rd left support frame or the 3 rd right support frame, and the pressure data output end of the 3 rd pressure sensor is connected with the 3 rd input end of the pressure data of the single chip microcomputer; a 4 th pressure sensor is arranged on the 4 th left support frame or the 4 th right support frame, and the pressure data output end of the 4 th pressure sensor is connected with the 4 th input end of the pressure data of the single chip microcomputer; the 5 th left support frame or the 5 th right support frame is provided with a 5 th pressure sensor, and the pressure data output end of the 5 th pressure sensor is connected with the 5 th input end of the pressure data of the single chip microcomputer. When the weight in the management cabinet is increased or reduced, reminding information is sent to the mobile handheld intelligent terminal, and data information of the mobile handheld intelligent terminal is recorded.
In a preferred embodiment of the present invention, the network data connection module comprises a network wired data connection module or/and a network wireless data connection module;
the network data connecting end of the network wired data connecting module is connected with the network wired data connecting end of the single chip microcomputer, and the network data connecting end of the network wireless data connecting module is connected with the network wireless data connecting end of the single chip microcomputer.
In a preferred embodiment of the present invention, the network wired data connection module comprises a hundreds of megabytes network wired data connection module or/and a gigabytes network wired data connection module;
the network data connecting end of the gigabit network wired data connecting module is connected with the gigabit network wired data connecting end of the single chip microcomputer;
the network wireless data connection module comprises one or any combination of a WiFi network wireless data connection module, a 3G network wireless data connection module, a 4G network wireless data connection module and a 5G network wireless data connection module;
the network data link of wiFi network wireless data connection module links to each other with the wiFi network wireless data link of singlechip, 3G network wireless data connection module's network data link links to each other with the 3G network wireless data link of singlechip, 4G network wireless data connection module's network data link links to each other with the 4G network wireless data link of singlechip, 5G network wireless data connection module's network data link links to each other with the 5G network wireless data link of singlechip.
In a preferred embodiment of the present invention, cabinet support legs 6 are provided on the bottom surface of the cabinet 1.
In a preferred embodiment of the present invention, a three-hole socket is disposed on the back of the cabinet 1, as shown in fig. 3, a ground terminal G of the three-hole socket is connected to the cabinet 1, a commercial power terminal L of the three-hole socket is connected to an anode of the diode D6 and a cathode of the diode D5, a commercial power terminal N of the three-hole socket is connected to an anode of the diode D3 and a cathode of the diode D4, a cathode of the diode D3 and a cathode of the diode D6 are connected to a first end of the capacitor C2 and a first end of the 220V-to-24V module, and an anode of the diode D4 and an anode of the diode D5 are connected to a second end of the capacitor C2 and a second end of the 220V-to-24V module;
the positive power output end of the 220V-to-24V module is respectively connected with the positive power supply end of the storage battery and the first end of the normally open contact of the relay KM1, the negative power output end of the 220V-to-24V module is respectively connected with the negative power supply end of the storage battery, the negative power input end of the 24V-to-5V module and the first end of the adjustable resistor R7, the second end of the adjustable resistor R7 is connected with the first end of a first path of normally closed contact of the relay KM2 and the first end of a second path of normally open contact of the relay KM2, the second end of the normally open contact of the relay KM1 is respectively connected with the positive power input end of a 24V-to-5V module, the first end of the first path of normally open contact of the relay KM2 and the first end of a second path of normally closed contact of the relay KM2, the first path of common end of the relay KM2 is connected with the first end of the power input of the magnetic lock, and the second path of common end of the relay KM2 is connected with the second end of the power input of the;
the positive end of a power supply output of the 24V-to-5V module is connected with the first end of a resistor R3, the negative end of the power supply output of the 24V-to-5V module is connected with a power ground, the second end of a resistor R3 is respectively connected with the negative electrode of a diode D1 and the first end of an input loop of a relay KM1, the positive electrode of a diode D1 and the second end of the input loop of a relay KM1 are respectively connected with the drain electrode of a field-effect tube Q1, the gate electrode of the field-effect tube Q1 is connected with the first end of a resistor R2, the second end of the resistor R2 is respectively connected with the first end of the resistor R1 and the power-off control end of the single chip microcomputer, and the second end of the resistor R1 and the source;
the positive end of a power supply output of the 24V-to-5V module is further connected with a first end of a resistor R4, a second end of the resistor R4 is respectively connected with a cathode of a diode D2 and a first end of an input loop of a relay KM2, an anode of the diode D2 and a second end of the input loop of the relay KM2 are respectively connected with a drain electrode of a field-effect tube Q2, a grid electrode of the field-effect tube Q2 is connected with a first end of the resistor R5, a second end of the resistor R5 is respectively connected with a first end of the resistor R6 and a current direction control end of the single chip microcomputer, and a second end of the resistor R6 and a source electrode of the field-effect tube Q2 are respectively connected. The magnetic field intensity of the excitation coil can be adjusted by adjusting the resistance value of the adjustable resistor R7.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims (4)
1. A working method for realizing the opening and closing of a cabinet door through a single chip microcomputer is characterized by comprising the following steps:
s1, displaying the acquired two-dimensional code image on a display screen by the single chip microcomputer;
s2, the mobile handheld intelligent terminal decodes the two-dimensional code and sends the two-dimensional code to the cloud server for verification, and after the verification is passed, the cloud server sends the cabinet opening code to the single chip microcomputer;
and S3, after the single chip microcomputer receives the cabinet opening code, the cabinet door is opened.
2. The working method for realizing the opening and closing of the cabinet door through the single chip microcomputer according to claim 1, wherein the method for opening the cabinet door comprises the following steps: the single chip microcomputer sends a conduction level to a grid electrode of a field effect transistor Q1 and sends a conduction level to a grid electrode of a field effect transistor Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a conducting state, the input loop of the relay KM2 is conducted, the first normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, the first normally open contact of the relay KM2 is changed into a closed state from a normally open state, the second normally closed contact of the relay KM2 is changed into a disconnected state from a normally closed state, and the second normally open contact of the relay KM2 is changed into; the current direction of the magnetic lock is in the opposite direction; the cabinet door is opened.
3. The working method for realizing the opening and closing of the cabinet door through the single chip microcomputer according to claim 1, wherein the method for closing the cabinet door comprises the following steps: when the single chip microcomputer receives an approach signal sent by the cabinet door approach switch (7), the single chip microcomputer sends a turn-on level to the grid of the field-effect tube Q1 and sends a turn-off level to the grid of the field-effect tube Q2; at the moment, the field effect transistor Q1 is in a conducting state, the input loop of the relay KM1 is conducted, the normally open contact of the relay KM1 is changed into a closed state from a normally open state, the field effect transistor Q2 is in a cut-off state, the input loop of the relay KM2 is disconnected, the first normally closed contact of the relay KM2 is changed into a normally closed state, the first normally open contact of the relay KM2 is in a normally open state, the second normally closed contact of the relay KM2 is in a normally closed state, and the second normally open contact of the relay KM2 is in a normally; the current direction of the magnetic lock is a positive direction; closing the cabinet door;
after waiting for Ts, s represents time second, and the singlechip sends cut-off level to the grid of the field effect transistor Q1; at the moment, the field effect transistor Q1 is in a cut-off state, the input loop of the relay KM1 is disconnected, the normally open contact of the relay KM1 is in a normally open state, and the magnetic force is locked and de-energized.
4. The working method for realizing the opening and closing of the cabinet door through the single chip microcomputer according to claim 1, wherein the following steps are included before step S1:
s01, after the cloud server receives a cabinet door opening request command, the cloud server generates a random black and white two-dimensional code; transforming the random black-white two-dimensional code into a two-dimensional matrix:
wherein m isxyRepresentation matrix MWHThe value of the element at the x-th row and y-th column;
when it is mxy1 represents a random black-white two-dimensional code in mxyM is black, mxy0 represents the random black-white two-dimensional code in mxyIs white;
h represents the height of the two-dimensional code, and w represents the width of the two-dimensional code;
x is a positive integer less than or equal to h, and y is a positive integer less than or equal to w;
arranging the two-dimensional matrix of the character string from left to right from top to bottom in sequence to form a binary character string:
m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhw(ii) a Obtaining the length of the binary string as PWH;
S02, carrying out primary operation on the random two-dimensional code generated in the step S01 to obtain an authentication character string;
s03, the certification character string obtained in step S02 is operated once to obtain the 1 st certification character string O1Obtaining the 1 st authentication character string O1Is of binary length QWH(ii) a Judging the operation frequency K:
K=INT(PWH/QWH)+1,
wherein, PWHRepresents m11m12m13…m1wm21m22m23…m2wm31m32m33…m3w…mh1mh2mh3…mhwLength of (d);
QWHindicating the 1 st authentication string O1Length of (d);
s04, for the 1 st authentication character string O1Performing the same operation as the step S03 to obtain the 1 st authentication string to obtain the 2 nd authenticationCharacter string O2;
For 2 nd authentication string O2Performing the same operation as the 1 st authentication string obtained in step S03 to obtain the 3 rd authentication string O3;
For the 3 rd authentication string O3Performing the same operation as the 1 st authentication string obtained in step S03 to obtain a 4 th authentication string O4;
……;
Authentication string O for K-1K-1Performing the same operation as the first authentication string obtained in step S03 to obtain the Kth authentication string OK;
Sequentially arranging the 1 st authentication character string O12 nd authentication string O2And 3 rd authentication string O3… …, K authentication string OKAre connected to obtain a connection character string O1O2O3…OK(ii) a Connect it with character string O1O2O3…OKConverting into binary concatenated string, and intercepting binary concatenated string from head with length PWHObtaining an intercepted character string;
s05, carrying out parity XOR processing on the intercepted character string obtained in the step S04 and the binary character string obtained in the step S01 to obtain a verification character string; transforming validation strings into a validation matrix MWH′:
Wherein m isxy' representation verification matrix MWH' element value at x row y column in;
when it is mxy' 1 indicates that the two-dimensional code to be transmitted is in mxy' in place is black, mxy' 0 indicates that the two-dimensional code to be transmitted is in mxy' white at point;
m11′m12′m13′…m1w′m21′m22′m23′…m2w′m31′m32′m33′…m3w′…mh1′mh2′mh3′…mhw' denotes an authentication string;
then converting the verification matrix into a two-dimensional code to be sent;
and S06, sending the two-dimensional code to be sent in the step S05 to a single chip microcomputer, and sending the authentication character string in the step S02 to the mobile handheld intelligent terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583666.6A CN112686071A (en) | 2020-12-28 | 2020-12-28 | Working method for realizing opening and closing of cabinet door through single chip microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583666.6A CN112686071A (en) | 2020-12-28 | 2020-12-28 | Working method for realizing opening and closing of cabinet door through single chip microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112686071A true CN112686071A (en) | 2021-04-20 |
Family
ID=75454287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011583666.6A Withdrawn CN112686071A (en) | 2020-12-28 | 2020-12-28 | Working method for realizing opening and closing of cabinet door through single chip microcomputer |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112686071A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN207489166U (en) * | 2018-03-13 | 2018-06-12 | 魏元晖 | It is a kind of to scan the two-dimensional code the intelligent public bookcase for opening cabinet door |
CN109376824A (en) * | 2018-09-10 | 2019-02-22 | 平安科技(深圳)有限公司 | Dynamic Two-dimensional code generating method and system |
CN210199841U (en) * | 2019-09-18 | 2020-03-27 | 深圳市斯特纽科技有限公司 | Wired door control system for cabinet |
CN210983545U (en) * | 2020-03-05 | 2020-07-10 | 上海擎盾信息科技有限公司 | File storage cloud cabinet |
-
2020
- 2020-12-28 CN CN202011583666.6A patent/CN112686071A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN207489166U (en) * | 2018-03-13 | 2018-06-12 | 魏元晖 | It is a kind of to scan the two-dimensional code the intelligent public bookcase for opening cabinet door |
CN109376824A (en) * | 2018-09-10 | 2019-02-22 | 平安科技(深圳)有限公司 | Dynamic Two-dimensional code generating method and system |
CN210199841U (en) * | 2019-09-18 | 2020-03-27 | 深圳市斯特纽科技有限公司 | Wired door control system for cabinet |
CN210983545U (en) * | 2020-03-05 | 2020-07-10 | 上海擎盾信息科技有限公司 | File storage cloud cabinet |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103927806B (en) | Unlocking system and the method thereof of password authentification is performed based on wireless communication module pairing | |
CN106097487A (en) | A kind of off-line type gate control system based on smart mobile phone and control method thereof | |
CN205080626U (en) | Intelligence lock system based on thing networking | |
CN101854250A (en) | Electronic device management system and method | |
CN104916022A (en) | Intelligent lock control method, mobile terminal and intelligent lock system | |
CN105530258A (en) | Electronic signature apparatus and method | |
CN102611774B (en) | Based on the mobile phone information safety protection system and method that fingerprint overlaps with navigation key | |
CN106469471A (en) | Electric power enterprise movable type attendance checking system and method | |
CN106850664A (en) | Internet-of-things terminal method of controlling security and its system based on intelligent mobile terminal | |
CN101951320A (en) | Implementation method, device and system of dynamic password | |
CN112766010A (en) | Singlechip safety device | |
CN103259664A (en) | Nfc dynamic password chip and working method thereof | |
CN114915970B (en) | PUF-based lightweight intelligent meter batch authentication method and gateway | |
CN205845134U (en) | A kind of smart lock | |
CN112686071A (en) | Working method for realizing opening and closing of cabinet door through single chip microcomputer | |
CN106657166A (en) | Identity verification method, terminal device and server | |
CN106836990A (en) | Fingerprint lock with wireless charging function | |
CN112686072A (en) | Control method for human resource equipment device | |
CN112837446A (en) | Linkage human resource data cabinet by using mobile handheld intelligent terminal | |
CN106303022A (en) | A kind of electronics key by voice-grade channel transmission password | |
CN109979053A (en) | A kind of offline model Internet of Things lock device and cipher key transmission methods based on MULTIPLE DYNAMIC key | |
CN213276764U (en) | Passive automatic lock | |
CN114999045A (en) | Passing system and method based on two-dimensional code encryption | |
CN210264225U (en) | Durable intelligent lock | |
CN216974457U (en) | Can sweep novel intelligent lock of sign indicating number control |
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: 20210420 |
|
WW01 | Invention patent application withdrawn after publication |