Disclosure of Invention
The invention aims to solve the technical problem that the defects of the prior art are overcome, and an unlocking method and an unlocking system are provided to achieve the purpose of realizing unlocking by scanning an identification code through a camera, so that remote maintenance of equipment is facilitated.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of unlocking a lock, comprising:
the method comprises the steps that a mobile terminal receives maintenance information input by a user and sends the maintenance information to a management terminal, wherein the maintenance information comprises equipment identification and user identification;
the management terminal verifies the maintenance information, generates an identification code according to the maintenance information when the verification is successful, and respectively sends the identification code to the cloud server and the mobile terminal;
and the mobile terminal unlocks the equipment corresponding to the equipment identifier through the identification code.
The unlocking method includes the steps that the management terminal verifies the maintenance information, generates an identification code according to the maintenance information when the verification is successful, and respectively sends the identification code to the cloud server and the mobile terminal, and specifically includes:
the management end receives the maintenance information and searches the equipment identification in a preset database;
when the equipment identification is found, acquiring a user identification group corresponding to the equipment identification, and comparing the user identification with the user identification group;
and when the comparison is successful, generating an identification code according to the maintenance information, and respectively sending the identification code to a cloud server and the mobile terminal.
In the unlocking method, when the comparison is successful, generating an identification code according to the maintenance information, and sending the identification code to the cloud server and the mobile terminal respectively specifically includes:
if the comparison is successful, acquiring a preset time period corresponding to the maintenance information;
and generating an identification code according to the maintenance information, sending the identification code to the mobile terminal, and sending the identification code and a preset time period to a cloud server.
The unlocking method comprises the steps of generating an identification code according to the maintenance information, sending the identification code to the mobile terminal, and sending the identification code and a preset time period to a cloud server, and then:
the cloud server stores the identification code and a preset time period in a correlated manner, and detects whether the current time is in the preset time period in real time;
and deleting the identification code and the preset time period when the current time is not in the preset time period.
The unlocking method, wherein the unlocking of the device corresponding to the device identifier by the mobile terminal through the identification code specifically includes:
when a camera scans a first identification code on a mobile terminal, the first identification code is sent to a cloud server;
the cloud server compares the first identification code with the stored identification code, and if the comparison is successful, an unlocking instruction is sent to the camera to control the door lock of the equipment to be unlocked.
The unlocking method includes the steps that the cloud server compares the first identification code with the identification code stored in the cloud server, and if the comparison is successful, an unlocking instruction is sent to the camera to control the door lock of the equipment to be unlocked, and then the method further includes:
and the cloud server deletes the identification code.
The unlocking method comprises the steps that the maintenance information further comprises position information of the equipment corresponding to the equipment identification,
when the camera scans the first identification code on the mobile terminal, sending the first identification code to the cloud server specifically includes:
when the camera scans a first identification code on the mobile terminal, the camera acquires the current position information of the camera through a GPS module configured by the camera;
and sending the current position information and the first identification code to a cloud server.
The unlocking method includes the steps that the cloud server compares the first identification code with the identification code stored in the cloud server, and if the comparison is successful, an unlocking instruction is sent to the camera to control the door lock of the equipment to be unlocked:
the cloud server receives the first identification code and the current position information, and compares the first identification code with the stored identification code;
if the comparison is successful, comparing the current position information with the position information corresponding to the identification code;
and if the comparison is successful, an unlocking instruction is sent to the camera to control the door lock of the equipment to be unlocked.
The unlocking method includes that the mobile terminal receives maintenance information input by a user and sends the maintenance information to a management terminal, wherein the maintenance information includes equipment identification and user identification, and the method specifically includes the following steps:
the mobile terminal receives a device identifier and a user identifier input by a user;
and generating maintenance information according to the equipment identification and the user identification, and sending the maintenance information to a management end.
An unlocking system, comprising:
the mobile terminal is used for receiving maintenance information input by a user and sending the maintenance information to the management terminal, wherein the maintenance information comprises equipment identification and user identification;
the management terminal is used for verifying the maintenance information, generating an identification code according to the maintenance information when the verification is successful, and respectively sending the identification code to the cloud server and the mobile terminal;
the mobile terminal is further used for unlocking the equipment corresponding to the equipment identification through the identification code. Has the advantages that: compared with the prior art, the invention provides an unlocking method and system, wherein the method comprises the following steps: the method comprises the steps that a mobile terminal receives maintenance information input by a user and sends the maintenance information to a management terminal, wherein the maintenance information comprises equipment identification and user identification; the management terminal verifies the maintenance information, generates an identification code according to the maintenance information when the verification is successful, and respectively sends the identification code to the cloud server and the mobile terminal; and the mobile terminal unlocks the equipment corresponding to the equipment identifier through the identification code. According to the invention, the identification code scanned by the intelligent lock is sent to the cloud server for verification, and the intelligent lock is controlled to be automatically opened after verification, so that a maintainer can open the intelligent lock without using a key, thereby maintaining equipment and bringing convenience to after-sale maintenance.
Detailed Description
The invention provides an unlocking method and system, and in order to make the purpose, technical scheme and effect of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the present invention, suffixes such as "module", "part", or "unit" used to indicate elements are used only for facilitating the description of the present invention, and have no specific meaning in themselves. Thus, modules, components, or units may be used mixedly.
The terminal device may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
The invention will be further explained by the description of the embodiments with reference to the drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating an unlocking method according to a preferred embodiment of the present invention. The method comprises the following steps:
s100, a mobile terminal receives maintenance information input by a user and sends the maintenance information to a management terminal, wherein the maintenance information comprises equipment identification and user identification;
s200, the management terminal verifies the maintenance information, generates an identification code according to the maintenance information when the verification is successful, and respectively sends the identification code to a cloud server and the mobile terminal;
s300, the mobile terminal unlocks the equipment corresponding to the equipment identification through the identification code.
In the embodiment, the maintenance information input by the mobile terminal is verified, and the identification codes are respectively sent to the mobile terminal and the cloud server after the verification is successful, so that when the code scanning device scans the identification codes in the mobile terminal, the identification codes are compared with the identification codes stored on the cloud server, and the door lock of the device corresponding to the maintenance information is controlled to be opened. Therefore, the door lock of the equipment to be maintained is opened remotely, so that the remote maintenance of the equipment is realized, and the maintenance personnel are brought.
In particular, the maintenance information is used to identify a maintenance task, which includes a user identification and a device identification. The user identifier refers to identification information of a user who is to perform the maintenance task, that is, identification information of a maintenance worker, which may be a job number, a name, and the like of the maintenance worker. The device identification refers to identification information of a device that needs to be maintained. A device corresponds to a unique device identifier, which may be the number, name, etc. of the device. The equipment can be multifunctional liquid crystal advertising machines, vending machines, multifunctional inquiry machines and other equipment which need to be maintained regularly. In this embodiment, the maintenance information is automatically input by a maintenance person, and may be an editing input or a selection input. The order of inputting the device identifier and the user identifier is not limited. For example, the mobile terminal may be preconfigured with an APP for controlling the smart lock, and when a user, i.e., a maintenance person, starts the APP, the mobile terminal displays an interface for selecting/inputting the device identifier and the user identifier, so that the user selects/inputs the device identifier corresponding to the device to be maintained and the user identifier of the maintenance person. And then generating maintenance information according to the equipment identifier and the user identifier input by the user, and sending the maintenance information to a management terminal for verification.
Illustratively, the mobile terminal receives maintenance information input by a user, and sends the maintenance information to a management terminal, where the maintenance information includes an equipment identifier and a user identifier, and the method specifically includes:
s101, a mobile terminal receives an equipment identifier and a user identifier input by a user;
and S102, generating maintenance information according to the equipment identification and the user identification, and sending the maintenance information to a management terminal.
In step S200, the identification code refers to encoded information generated from the maintenance information, and may be a barcode or a two-dimensional code. And when the management terminal receives the maintenance information, verifying the maintenance information, and generating an identification code after verification for verification in a subsequent unlocking process.
For example, the verifying the maintenance information by the management terminal, generating an identification code according to the maintenance information when the verification is successful, and sending the identification code to the cloud server and the mobile terminal respectively may specifically include:
s201, the management end receives the maintenance information and searches the equipment identification in a preset database;
s202, when the equipment identification is found, acquiring a user identification group corresponding to the equipment identification, and comparing the user identification with the user identification group;
and S203, when the comparison is successful, generating an identification code according to the maintenance information, and respectively sending the identification code to a cloud server and the mobile terminal.
Specifically, in step S201, the preset database is used to store maintenance task information that is imported/stored in advance, and includes at least information such as equipment information that needs to be maintained, corresponding maintenance staff information, and a predetermined maintenance time period. And when the management end receives the maintenance information, finding the equipment identifier in the task list, and if the equipment identifier is found, judging that the equipment corresponding to the equipment identifier exists in the equipment to be maintained.
In step S202, in order to ensure that the user corresponding to the user identifier is a maintenance person corresponding to the device, it is further required to verify whether the received user identifier is correct. The group of user identities refers to a set of user identities. The user identifier group corresponding to the device identifier refers to a group of preset user identifiers corresponding to the device, namely user identifiers of designated personnel for maintaining the device. Therefore, when the device identifier is found, a user identifier group corresponding to the device identifier is obtained in the preset database, and the user identifier is found in the user identifier group, and when the user identifier is found, it is determined that the user identifier is successfully compared with the user identifier group, step S203 is executed. When the user identifier is not found, judging that the user identifier and the user identifier group are failed to be compared, and indicating that the user identifier input by the user is wrong, namely the maintainer corresponding to the user identifier is not the designated maintainer, and discarding the maintenance information by the management terminal at the moment.
In step S203, the cloud server user stores the identification code, and verifies whether the received identification code is consistent with the stored identification code in a subsequent unlocking process, so as to control the door lock to be unlocked. When the comparison is successful, the verification of the maintenance information input by the user is passed, the management terminal generates an identification code according to the maintenance information, and then the identification code is respectively sent to the cloud server and the mobile terminal for later unlocking verification, so that the safety of remote unlocking is ensured.
In one embodiment of the invention, in order to improve the security of the identification code during verification, a service life is configured for the identification code. Therefore, when the comparison is successful, generating an identification code according to the maintenance information, and sending the identification code to the cloud server and the mobile terminal respectively may specifically include:
s2031, if the comparison is successful, acquiring a preset time period corresponding to the maintenance information;
s2032, generating an identification code according to the maintenance information, sending the identification code to the mobile terminal, and sending the identification code and a preset time period to a cloud server.
Specifically, in step S2031, the preset time period refers to a preset validity time period of the identification code. I.e. the identification code is validated for the preset time period. For example, the preset time period is 2017-06-23, and 19:00-23:00 means that the maintenance personnel must maintain the equipment between 19:00 and 23:00 of 23 days of 6 months in 2017.
Further, in order to ensure that the identification code is time-efficient, after receiving the identification code and a preset time period, the cloud server further includes:
s2033, the cloud server stores the identification code and a preset time period in a related manner, and detects whether the current time is in the preset time period in real time;
and S2034, deleting the identification code and the preset time period when the current time is not in the preset time period.
Specifically, the current time refers to a current time monitored by the cloud server. And the cloud server receives the preset time period and the identification code sent by the management terminal, and stores the preset time period and the identification code in a correlation manner, so that the preset time period and the identification code are in one-to-one correspondence. And then detecting the current time in real time, judging whether the current time is in the preset time period, if so, not executing operation and continuously monitoring whether the current time is in the preset time period. And if the current time is not in the preset time period, deleting the identification code and the preset time period, so that when the current time is not in the preset time period and the cloud server receives the identification code, the stored identification code is deleted, namely the identification code cannot be verified successfully, thereby ensuring the timeliness of the identification code and being beneficial to more effectively managing and maintaining the execution of tasks.
In said step S300, the apparatus is provided with scanning means, such as a camera, a scanning head, etc., for scanning said identification code. Therefore, after the mobile terminal receives the identification code, the mobile terminal can scan the received identification code in a scanning device on the equipment and send the scanned identification code to the cloud server so as to verify whether the scanned identification code is valid or not, and when the verification is successful, the door lock of the equipment is unlocked.
For example, the unlocking, by the mobile terminal, the device corresponding to the device identifier through the identification code may specifically include:
s301, when a camera scans a first identification code on the mobile terminal, the first identification code is sent to a cloud server;
s302, the cloud server compares the first identification code with the stored identification code, and if the comparison is successful, an unlocking instruction is sent to the camera to control the door lock of the equipment to be unlocked.
Specifically, the camera is configured on the device to be maintained. The first identification code refers to an identification code scanned by the camera. When the camera scans the first identification code, the first identification code is sent to the cloud server. Certainly, because the device is provided with the camera, the maintenance information, namely the identity information of the maintenance personnel and the identification information of the device, can be verified by triggering the camera to perform real-time video communication with the management terminal. On the other hand, when the camera does not scan the identification code, the camera can also acquire an environmental image around the equipment and send image information to the management end, so that the management end can know the condition of the equipment.
In an embodiment of the present invention, in order to ensure that the device corresponding to the camera that scans the identification code is a device that needs maintenance, the current location information of the device may also be acquired through a GPS module configured in the camera, and then the location of the device is verified. Therefore, in this embodiment, the maintenance information further includes location information of a device corresponding to the device identifier. That is, the mobile terminal receives the location information input by the user in addition to the device identifier and the user identifier input by the user, and then generates the maintenance information according to the three. Correspondingly, the identification code generated according to the maintenance information also comprises the position information. Therefore, when the cloud server receives the identification code sent by the camera, whether the position where the camera (i.e. the device) is located is correct can be verified according to the position information contained in the identification code stored by the cloud server.
For example, when the camera scans the first identification code on the mobile terminal, sending the first identification code to the cloud server may specifically include:
s3011, when the camera scans the first identification code on the mobile terminal, the camera acquires the current position information of the camera through a GPS module configured on the camera;
s3012, sending the current position information and the first identification code to a cloud server.
Specifically, the current location information refers to the camera, that is, the location information where the device is located, and may be longitude and latitude information, a place name, or the like. And the camera sends the scanned first identification code and the current position information to a cloud server.
In this embodiment, the comparing, by the cloud server, the first identification code with the identification code stored therein, and if the comparing is successful, sending an unlocking instruction to the camera to control the door lock of the device to be unlocked specifically may include:
s3021, the cloud server receives the first identification code and the current position information, and compares the first identification code with the stored identification code;
s3022, if the comparison is successful, comparing the current position information with the position information corresponding to the identification code;
and S3023, if the comparison is successful, sending an unlocking instruction to the camera to control the door lock of the equipment to be unlocked.
Specifically, in step S3021, the cloud server first performs a first-layer comparison on the received first identification code, that is, compares the received first identification code with a stored identification code (that is, an identification code sent by the management end), and if the received first identification code and the stored identification code are identical, it indicates that the comparison is successful, that is, the camera scans a correct identification code.
Further, in step S3022, after the identification code comparison is successful, a second-layer comparison is performed, that is, the received current location is verified. And the cloud server compares the current position information with the position information contained in the identification code stored in the cloud server, and if the comparison is successful, the camera scanning the first identification code is the camera configured on the equipment to be maintained. For example, if camera a is located at point a, camera B is located at point B, and the location information stored in the cloud server is point a. When the camera B scans the first identification code, the corresponding location B does not match the location a stored by the cloud server, which indicates that the camera scanned the first identification code is incorrect. Therefore, the security of unlocking verification is improved by comparing the positions of the second layer, and the condition that the equipment which does not need to be maintained scans the identification code to open other equipment is avoided.
In the step S3023, when the current position information is successfully compared, the cloud server controls the device start relay to unlock the door lock, so that a maintainer maintains the device, thereby solving the unlocking problem of the conventional mechanical lock and improving the unlocking rapidity and convenience.
In this embodiment, the cloud server compares the first identification code with the identification code, and if the comparison is successful, the method further includes, after sending an unlocking instruction to the camera to control the unlocking of the door lock of the device:
and S03, the cloud server deletes the identification code.
Therefore, after the identification code is successfully verified and the door lock is unlocked, the identification code is used, the identification code stored in the identification code is deleted, the identification code is guaranteed to be valid only when the identification code is valid, and the safety of remote identification unlocking of equipment is improved.
The present invention also provides an unlocking system, as shown in fig. 2, which includes:
the mobile terminal 100 is configured to receive maintenance information input by a user, and send the maintenance information to a management end, where the maintenance information includes an equipment identifier and a user identifier;
the management terminal 200 is configured to verify the maintenance information, generate an identification code according to the maintenance information when the verification is successful, and send the identification code to the cloud server and the mobile terminal respectively;
the mobile terminal 100 is further configured to unlock the device corresponding to the device identifier through the identification code.
In the embodiments provided by the present invention, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.