Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a method for controlling a door lock according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
and S11, acquiring user information in the preset area, wherein the user information comprises information of a target user and/or information of a non-target user.
The control method of the door lock provided by the embodiment of the invention is applied to intelligent household equipment, and the intelligent household equipment can be as follows: the door lock specifically judges the type of the user information by acquiring the user information, the type of the user information can comprise information of a target user and information of a non-target user, and the door lock is controlled by the type of the user information.
In this embodiment, the user image is acquired by the acquiring device, where the acquiring device may be a camera, or the like, the user information is extracted from the user image, and a preset region is pre-divided, where the preset region may be understood as a region for acquiring the user image, and a position, a size, and the like of the region may be defined according to actual requirements, which is not specifically limited in this embodiment.
User information of at least one user may be stored in advance, the user information may be face information and sign information of the user, etc., the target user may be a safe user authenticated by the user, corresponding to the stored at least one user information (for example, the target user may be a householder and a person permitted by the householder to enter the area), and the non-target user may be a person other than the target user.
Specifically, the user image in the preset area is acquired through the acquisition device, and the user information is extracted from the user image.
Further, the acquired user information is compared with the pre-stored user information, and whether the acquired user information is the information of the target user or the information of the non-target user is determined.
For example, a user inputs user information of a person at home into a storage device of a door lock, the user information of the person in a preset area is acquired through a camera each time the door is opened, the detected user information is compared with face information already stored in the storage device, if the similarity is greater than or equal to the preset similarity, the user information is information of a target user, and if not, the user information is information of a non-target user.
And S12, determining the control strategy of the door lock according to the user information.
In this embodiment, a correspondence relationship is preset, and the correspondence relationship is used to indicate a correspondence relationship between the type of the user information and the control policy, and the control policy of the door lock corresponding to the user information can be determined by the correspondence relationship. The control strategy is a control method of the door lock.
Specifically, the control strategy of the corresponding door lock is selected from the corresponding relation according to the user information.
And S13, controlling the door lock according to the control strategy.
In this embodiment, a corresponding control instruction is determined according to a control strategy, and the control instruction is sent to the door lock, so that the door lock executes a corresponding operation in response to the control instruction, so as to control the door lock.
For example, user information of a preset area is acquired, when the user information is information of a non-target user, the control strategy of the door lock is determined to be a first control strategy from the corresponding relationship, when the user information is information of a target user, the control strategy of the door lock is determined to be a second control strategy from the corresponding relationship, and when the user information is information of the target user and information of the non-target user, the control strategy of the door lock is determined to be a third control strategy from the corresponding relationship. And controlling the door lock according to the control strategy corresponding to the user information.
According to the control method of the door lock provided by the embodiment of the invention, the user information in the preset area is obtained through the obtaining device, and the corresponding control strategy of the door lock is determined according to the type of the user information; and controlling the door lock according to the control strategy. Different unlocking modes can be determined through the information of the unlocking user, and compared with the traditional door lock, the door lock is more convenient and safer.
Fig. 2 is a schematic flow chart of another door lock control method according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
and S21, acquiring the user information in the preset area.
In this embodiment, the same contents as those in step S11 of fig. 1 are specifically described with reference to step S11, which is not repeated herein for brevity.
And S22, when the user information comprises the information of the target user and the information of the non-target user, determining the control strategy as a first control strategy.
In this embodiment, a corresponding relationship is preset, where the corresponding relationship is used to indicate a corresponding relationship between user information and a door lock control policy, and the control policy of the door lock corresponding to the user information may be determined through the corresponding relationship, where the corresponding control policy is a first control policy when the user information includes information of a target user and information of a non-target object, and may be used to control opening and closing of the door lock.
Specifically, it is determined from the correspondence that the control policy is the first control policy when the user information includes information of the target user and information of the non-target user.
And S23, controlling the door lock to be unlocked and keeping the unlocked state when the control strategy is the first control strategy.
In this embodiment, the non-locking state means that the door lock is kept in an open state and cannot be locked again, and the first control strategy controls the door lock to keep the open state all the time and cannot be locked.
For example, when a resident and a stranger enter a preset area, the acquired user information is information of a target user and information of a non-target user, a corresponding control strategy is determined to control the door lock to be opened and keep a non-locking state, and the door lock is kept in the opening state after being opened.
According to the control method of the door lock provided by the embodiment of the invention, the user information in the preset area is obtained through the obtaining device, and the corresponding control strategy of the door lock is determined according to the user information; when a user opens the door, the user is followed by a stranger, the first control strategy can be determined to control the door lock to keep an opening state, escape and rescue are facilitated, and the door lock is more convenient and safer compared with a traditional door lock.
Fig. 3 is a schematic flowchart of a further method for controlling a door lock according to an embodiment of the present invention, and as shown in fig. 3, the method specifically includes:
and S31, acquiring the user information in the preset area.
In this embodiment, the same contents as those in step S11 of fig. 1 are specifically described with reference to step S11, which is not repeated herein for brevity.
And S32, when the user information comprises the information of the target user, determining the control strategy as a second control strategy.
In this embodiment, a corresponding relationship is preset, where the corresponding relationship is used to indicate a corresponding relationship between user information and a door lock control policy, and the corresponding control policy of the door lock corresponding to the user information may be determined through the corresponding relationship.
Specifically, the control policy is determined to be the second control policy when the user information is the information of the target user from the correspondence relationship.
And S33, controlling the door lock to be unlocked when the control strategy is the second control strategy.
In this embodiment, the second control strategy is to control the door lock to change from the locked state to the unlocked state, and the door lock is controlled to be unlocked through the second control strategy.
For example, when a resident enters a preset area, the acquired user information is information of a target user, and the corresponding control strategy is determined to be controlling the door lock to be unlocked, so that the door lock is changed from a locking state to an unlocking state.
According to the control method of the door lock provided by the embodiment of the invention, the user information in the preset area is obtained through the obtaining device, and the corresponding control strategy of the door lock is determined to be the door lock opening according to the user information as the information of the target user; when only user oneself opened the door, the control lock is normally opened, compares in traditional lock convenient safety more.
Fig. 4 is a schematic flowchart of a further method for controlling a door lock according to an embodiment of the present invention, and as shown in fig. 4, the method specifically includes:
and S41, acquiring the user information in the preset area.
In this embodiment, the same contents as those in step S11 of fig. 1 are specifically described with reference to step S11, which is not repeated herein for brevity.
And S42, receiving a first operation when the door lock is confirmed to be awakened, wherein the first operation is used for indicating the change of the control strategy.
In this embodiment, a user may wake up a door lock by touching the door lock, and after the door lock is woken up, user information may be obtained, the first operation may be that the user clicks one or more keys of the door lock, and the key may change the control policy, where the first operation is to trigger the key to change the control policy, for example, the user presses the key to release the anti-tailing mode, and the control policy of the door lock is changed from the first control policy to the second control policy.
After the door lock is awakened by a user, a first operation triggered by the user and used for changing the control strategy is received.
S43, when the first operation is received, setting the effective duration corresponding to the first operation.
In this embodiment, the effective duration may be a duration set by a user, and the control policy is changed from the start of triggering the first operation to the end of triggering the first operation within the effective duration, and the control policy may not be changed after the effective duration is exceeded.
And S44, when the user information comprises the information of the target user and the information of the non-target user and a first operation is received, changing the first control strategy corresponding to the user information into a second control strategy.
In this embodiment, the first operation may be that the user clicks one or more keys of the door lock, the first operation may change the first control policy into the second control policy, the first control policy may be that the door lock is opened and remains in an unlocked state, and the second control policy may be that the door lock is opened.
Specifically, when the acquired user information is information of a target user and information of a non-target user, and the user performs a first operation, the first control policy is changed into a second control policy.
And S45, when the first control strategy is changed into the second control strategy, controlling the door lock to be unlocked based on the second control strategy.
In this embodiment, the second control strategy is to control the door lock to change from the locked state to the unlocked state, and send an unlocking control command to the door lock through the second control strategy to control the door lock to be unlocked.
And S46, controlling the door lock to be restored to the initial state when the effective time length is invalid.
In this embodiment, the valid duration invalidation means that the first operation is invalidated when the time counted from the first operation is over the time set by the user, and the door lock is controlled to recover the initial state without performing the first operation.
For example, the first control strategy is that the door lock is always kept in an unlocked state, the second control strategy is that the door lock is opened, the first operation is that the user triggers the anti-follow key, the effective time is one minute, when the householder takes friends to go home, after the fire-fighting follow key is triggered, the acquired user information comprises householder information and stranger information, the door lock control strategy is changed from the unlocked state to the door lock opening control, and after one minute, the door lock control strategy is restored to the state before the first operation is executed. Therefore, the door lock can not give an alarm when the child relative enters the door. After one kind of seeds are separated, the anti-trailing function is automatically started.
According to the control method of the door lock provided by the embodiment of the invention, the change of the control strategy of the door lock is controlled through the set first operation, and when the user information is the information of a target user and the information of a non-target user, the first control strategy is controlled to be changed into the second control strategy; realized taking friend to go home when the user can be with the lock change for normal unlocking mode through first operation, control the lock and normally open, compare in traditional lock convenient safety more.
Fig. 5 is a schematic flowchart of a further method for controlling a door lock according to an embodiment of the present invention, and as shown in fig. 5, the method specifically includes:
and S51, acquiring the user information in the preset area.
In this embodiment, the same contents as those in step S11 of fig. 1 are specifically described with reference to step S11, which is not repeated herein for brevity.
And S52, when the user information comprises the information of the non-target user, determining the control strategy as a third control strategy.
In this embodiment, a corresponding relationship is preset, where the corresponding relationship is used to indicate a corresponding relationship between user information and a door lock control policy, and the corresponding control policy of the door lock corresponding to the user information may be determined through the corresponding relationship, and when the user information is information of a non-target user, the corresponding control policy is a third control policy, which may be to control the door lock to open or close.
Specifically, it is determined from the correspondence that the control policy is the third control policy when the user information is information of a non-target user.
And S53, controlling the door lock to be in a locking state when the control strategy is a third control strategy.
In this embodiment, the third control strategy is to control the door lock to keep locked, and the third control strategy is to control the door lock to be in a locked state.
For example, when a stranger enters a preset area, the acquired user information is information of a non-target user, the corresponding control strategy is determined to be to control the door lock to be locked, and the door lock keeps a locked state.
In an alternative of the embodiment of the present invention, when the door lock is controlled according to the control policy, an alarm process may be performed.
Specifically, when the control strategy is a first control strategy, the door lock is controlled to trigger an alarm.
The alarm mode of the first control strategy control door lock can adopt sound and light alarm, sound alarm is carried out through a buzzer or voice alarm, and light flicker alarm is carried out through a bulb or a light emitting diode.
Specifically, when the control strategy is a first control strategy, alarm information is generated and sent to the terminal device.
The alarm information can be a piece of prestored alarm information or voice and is used for prompting the door lock state of the user and sending the alarm information to terminal equipment such as a mobile phone computer and the like which are associated in advance through a communication module for alarm prompting.
According to the control method of the door lock provided by the embodiment of the invention, the user information in the preset area is obtained through the obtaining device, the corresponding control strategy of the door lock is determined to be that the door lock is opened and the non-locking state is kept according to the information of the target user and the information of the non-target user, and the alarm is given out.
Fig. 6 is a schematic structural diagram of a control device of a door lock according to an embodiment of the present invention, and as shown in fig. 6, the control device specifically includes:
the acquiring module 61 is configured to acquire user information in a preset area, where the user information includes information of a target user and/or information of a non-target user;
the determining module 62 is used for determining a control strategy of the door lock according to the user information;
and the control module 63 is used for controlling the door lock according to the control strategy.
In a possible embodiment, the determining module 62 is specifically configured to determine the control policy as a first control policy when the user information includes information of the target user and information of the non-target user;
the control module 63 is specifically configured to control the door lock to be unlocked and to maintain an unlocked state when the control policy is a first control policy.
In a possible embodiment, the obtaining module 61 is further configured to receive a first operation when it is determined that the door lock is woken up, where the first operation is used to indicate a change of the control policy;
the control module 63 is further configured to change a first control policy corresponding to the user information into a second control policy when the user information includes the information of the target user and the information of the non-target user and a first operation is received.
In a possible implementation manner, the obtaining module 61 is further configured to set an effective duration corresponding to the first operation when the first operation is received;
the control module 63 is further configured to control the door lock to recover to an initial state when the valid duration is invalid.
In a possible embodiment, the determining module 62 is specifically configured to determine that the control policy is a second control policy when the user information includes information of the target user;
the control module 63 is specifically configured to control the door lock to open when the control policy is the second control policy.
In a possible embodiment, the determining module 62 is specifically configured to determine that the control policy is a third control policy when the user information includes information of the non-target user;
the control module 63 is specifically configured to control the door lock to be in a locking state when the control policy is a third control policy.
In a possible embodiment, the control module 63 is further configured to control the door lock to trigger an alarm when the control strategy is the first control strategy.
In one possible embodiment, the control module 63 generates alarm information when the control policy is a first control policy; and sending the alarm information to terminal equipment.
The control device of the door lock provided in this embodiment may be the device shown in fig. 6, and may execute all the steps of the control method of the door lock shown in fig. 1 to 5, so as to achieve the technical effects of the control method of the door lock shown in fig. 1 to 5, which please refer to the related descriptions of fig. 1 to 5 for brevity, which is not described herein again.
Fig. 7 is a schematic structural diagram of a door lock according to an embodiment of the present invention, where thedoor lock 700 shown in fig. 7 includes: at least oneprocessor 701,memory 702, at least onenetwork interface 704, andother user interfaces 703. The various components in thedoor lock 700 are coupled together by abus system 705. It is understood that thebus system 705 is used to enable communications among the components. Thebus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as thebus system 705.
Theuser interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that thememory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). Thememory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments,memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: anoperating system 7021 andapplication programs 7022.
Theoperating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. Theapplication 7022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included withinapplication program 7022.
In the embodiment of the present invention, theprocessor 701 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in thememory 702, specifically, a program or an instruction stored in theapplication 7022, for example, and includes:
acquiring user information in a preset area, wherein the user information comprises information of a target user and/or information of a non-target user;
determining a control strategy of the door lock according to the user information;
and controlling the door lock according to the control strategy.
In one possible embodiment, when the user information includes information of the target user and information of the non-target user, determining the control policy as a first control policy;
and when the control strategy is a first control strategy, controlling the door lock to be opened and keeping the unlocking state.
In one possible embodiment, upon determining that the door lock is awakened, receiving a first operation, the first operation being used to indicate a change in the control strategy;
and when the user information comprises the information of the target user and the information of the non-target user and a first operation is received, changing a first control strategy corresponding to the user information into a second control strategy.
In a possible implementation manner, when the first operation is received, setting an effective duration corresponding to the first operation; and when the effective time length is invalid, controlling the door lock to recover to an initial state.
In one possible embodiment, when the user information includes information of the target user, determining the control policy as a second control policy;
and when the control strategy is a second control strategy, controlling the door lock to be unlocked.
In one possible embodiment, when the user information includes information of the non-target user, determining the control policy as a third control policy;
and when the control strategy is a third control strategy, controlling the door lock to be in a locking state.
In one possible embodiment, the door lock is controlled to trigger an alarm when the control strategy is a first control strategy.
In one possible implementation, when the control strategy is a first control strategy, alarm information is generated; and sending the alarm information to terminal equipment.
The method disclosed in the above embodiments of the present invention may be applied to theprocessor 701, or implemented by theprocessor 701. Theprocessor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in theprocessor 701. TheProcessor 701 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in thememory 702, and theprocessor 701 reads the information in thememory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The door lock provided in this embodiment may be the door lock shown in fig. 7, and all steps of the control method of the door lock shown in fig. 1 to 5 may be executed, so as to achieve the technical effects of the control method of the door lock shown in fig. 1 to 5, which are described with reference to fig. 1 to 5 for brevity and will not be described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the method for controlling the door lock executed on the control device side as described above is realized.
The processor is used for executing the control program stored in the memory to realize the following steps of the control method of the door lock executed on the control equipment side:
acquiring user information in a preset area, wherein the user information comprises information of a target user and/or information of a non-target user;
determining a control strategy of the door lock according to the user information;
and controlling the door lock according to the control strategy.
In one possible embodiment, when the user information includes information of the target user and information of the non-target user, determining the control policy as a first control policy;
and when the control strategy is a first control strategy, controlling the door lock to be opened and keeping the unlocking state.
In one possible embodiment, upon determining that the door lock is awakened, receiving a first operation, the first operation being used to indicate a change in the control strategy;
and when the user information comprises the information of the target user and the information of the non-target user and a first operation is received, changing a first control strategy corresponding to the user information into a second control strategy.
In a possible implementation manner, when the first operation is received, setting an effective duration corresponding to the first operation; and when the effective time length is invalid, controlling the door lock to recover to an initial state.
In one possible embodiment, when the user information includes information of the target user, determining the control policy as a second control policy;
and when the control strategy is a second control strategy, controlling the door lock to be unlocked.
In one possible embodiment, when the user information includes information of the non-target user, determining the control policy as a third control policy;
and when the control strategy is a third control strategy, controlling the door lock to be in a locking state.
In one possible embodiment, the door lock is controlled to trigger an alarm when the control strategy is a first control strategy.
In one possible implementation, when the control strategy is a first control strategy, alarm information is generated; and sending the alarm information to terminal equipment.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.