Unlocking method and device of intelligent door lock, computer equipment and storage medium
Through the dynamic tracking function of smart door locks and video information processing, users’ intention to go out is accurately judged, which solves the problem of large errors in existing smart door locks, and improves the accuracy and user experience of door opening judgments.
Patent Information
- Application Number
- CN202411870488.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-18
AI Technical Summary
The existing smart door lock technology uses the detection module to determine the user's return situation when going out, which is prone to mistaken opening and cannot accurately identify the user's real action intention, and the tracking accuracy is single.
By acquiring the working status of the dynamic tracking function in the smart door lock, obtaining video information of the outside door environment, determining the moving trajectory of the target object in the outside door environment, and determining whether the target object has a return intention based on this trajectory. If it exists, control the smart door lock to perform the unlocking operation.
It improves the accuracy of door opening judgment, reduces the phenomenon of misopening, and improves the safety and convenience of users using smart door locks.
Smart Images

Figure CN119649500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart locks, and in particular to an unlocking method, device, computer equipment and storage medium for a smart door lock. Background Art
[0002] As a smart home product, smart door locks integrate electronic technology, integrated circuit design, and a variety of innovative identification technologies (covering computer network technology, built-in software cards, network alarms, lock body mechanical design, etc.), and use non-mechanical keys as user identification IDs. They show significant intelligent advantages in user identification, security, and manageability. It has become an inevitable trend for them to replace traditional mechanical locks, which has strongly promoted the development of the lock industry.
[0003] Some existing smart door lock technologies have defects. Although the smart door lock is equipped with a detection module, a communication module and a drive module, and activates the communication module by detecting whether there is a signal within a preset range, this method cannot accurately determine whether the user actually walks out of the door and returns. Relying only on the detection module to set two ranges inside and outside the door, the error is large. For example, when the user opens the door inside and passes through the first range and does not want to go out and closes the door, if someone at the door triggers the second range to detect the second signal, the door will open; or if the user does not walk back but steps back, the door will be opened by mistake, and the user may not know this, which is easy to cause inconvenience and trouble. Summary of the invention
[0004] In view of this, the embodiments of the present invention provide a method, device, computer equipment and storage medium for unlocking a smart door lock to solve the problem that the existing smart door lock technology only uses a detection module to judge the user's going out and returning, with large errors, prone to mistaken door opening, and unable to accurately identify the user's true action intention and single tracking accuracy.
[0005] In a first aspect, an embodiment of the present invention provides a method for unlocking a smart door lock, the method comprising:
[0006] Get the working status of the dynamic tracking function in the smart door lock;
[0007] When the working state of the dynamic tracking function is a trigger state, video information of the environment outside the door is obtained;
[0008] Determine the moving trajectory of the target object in the environment outside the door according to the video information;
[0009] Based on the movement trajectory, it is determined whether the target object has the intention to return. If there is the intention to return, the smart door lock is controlled to perform an unlocking operation.
[0010] Furthermore, the obtaining of the working status of the dynamic tracking function in the smart door lock includes:
[0011] Obtaining the attribute value of the dynamic tracking function in the smart door lock;
[0012] When the attribute value is a preset value, detecting whether a door opening event occurs in the current smart door lock;
[0013] It is detected whether the triggering mode of the door opening event is the inner door unlocking triggering, and if the triggering mode is the inner door unlocking triggering, the working state of the dynamic tracking function is adjusted to the triggering state.
[0014] Further, determining the moving track of the target object in the environment outside the door according to the video information includes:
[0015] Extracting image frames from the video information in time order to obtain an image frame sequence;
[0016] Identifying at least one moving object in each image frame in the image frame sequence, and determining a target object among the moving objects;
[0017] Marking the target object in each of the image frames to obtain a plurality of marking positions;
[0018] A moving trajectory of the target object is generated according to the marked positions in the image frame sequence.
[0019] Further, determining the target object in the moving object includes:
[0020] Extracting a morphological feature set of the moving object;
[0021] Comparing the morphological feature set with a preset feature set to obtain a similarity;
[0022] If the similarity is greater than a preset similarity, the moving object is determined to be a target object, or, if the similarity is less than a preset similarity, the moving object is determined not to be a target object.
[0023] Further, determining whether the target object has a return intention based on the movement trajectory includes:
[0024] Calculating an initial direction vector formed by a first position point and a second position point in the moving trajectory;
[0025] Monitoring the current motion direction vector of the target object, and calculating the vector angle between the initial direction vector and the motion direction vector;
[0026] Determine whether the vector angle is greater than a preset angle threshold;
[0027] When the vector angle is greater than a preset angle threshold, it is determined whether the target object has a return intention based on a trajectory verification mechanism.
[0028] Furthermore, judging whether the target object has a return intention based on the trajectory verification mechanism includes:
[0029] Identifying a change trend of a position point in the movement trajectory;
[0030] Analyze whether the change trend conforms to the preset return trend;
[0031] If it meets the preset return trend, it is determined that the target object has the intention to return, or, if it does not meet the preset return trend, the motion direction vector of the next frame is monitored.
[0032] Further, the analyzing whether the change trend conforms to the preset return trend includes:
[0033] Extracting speed features, direction features and distance features in the changing trend;
[0034] Obtaining a preset speed feature, a preset direction feature, and a preset distance feature corresponding to the preset return trend;
[0035] Respectively comparing the speed feature, direction feature, and distance feature with the preset speed feature, preset direction feature, and preset distance feature to obtain a comparison result;
[0036] Determine whether the change trend of the position point conforms to a preset return trend according to the comparison result.
[0037] In a second aspect, an embodiment of the present invention provides an unlocking device for a smart door lock, the device comprising:
[0038] The first acquisition module is used to obtain the working status of the dynamic tracking function in the smart door lock;
[0039] A second acquisition module is used to acquire video information of the environment outside the door when the working state of the dynamic tracking function is a trigger state;
[0040] A determination module, used to determine the moving track of the target object in the environment outside the door according to the video information;
[0041] The control module is used to determine whether the target object has a return intention based on the movement trajectory, and if there is a return intention, control the smart door lock to perform an unlocking operation.
[0042] In a third aspect, an embodiment of the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0044] The method provided in the embodiment of the present application has the following beneficial effects:
[0045] The method provided in the embodiment of the present application obtains the working status of the dynamic tracking function in the smart door lock and accurately locates whether the dynamic tracking function is turned on, thereby providing a basis for a series of subsequent operations based on this function, avoiding unnecessary waste of resources and misjudgment. When the working status is the trigger state, the video information of the environment outside the door is obtained, and the situation outside the door can be grasped in real time, providing a data source for determining the movement trajectory of the target object. The movement trajectory of the target object in the environment outside the door is determined based on the video information, and the action path of the target object can be clearly understood, providing a key basis for judging whether it has the intention to return. Based on the movement trajectory, it is determined whether the target object has the intention to return. If so, the smart door lock is controlled to perform the unlocking operation, which effectively solves the problem that the existing smart door lock only relies on the detection module to judge the user's return situation. The error is large, the accuracy of the door opening judgment is improved, the phenomenon of mistaken door opening is reduced, and the safety and convenience of users using smart door locks are improved.
[0046] The method provided in the embodiment of the present application determines whether the dynamic tracking function should be triggered by obtaining attribute values, detecting door opening events and triggering methods, thereby further improving the accuracy and reliability of the system judgment. By generating a moving trajectory through operations such as extracting image frames, identifying moving objects, and marking target objects, key targets can be effectively screened out and their routes of action can be accurately depicted, thereby improving the accuracy of subsequent intention judgments. By comparing the morphological feature set with the preset feature set to determine the target object, the target can be accurately identified to avoid incorrect tracking of non-user objects. By calculating the vector angle and combining the trajectory verification mechanism, it can effectively eliminate false detections caused by instantaneous actions or misjudgments, thereby improving the accuracy of return intention judgment. In the trajectory verification mechanism, by analyzing the speed, direction, and distance features in the location point change trend in detail and comparing them with the preset features, it is possible to comprehensively and accurately determine whether the target object actually has the intention to return, further optimize the unlocking judgment logic of the smart door lock, and improve the overall performance and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 is a flowchart of an unlocking method of a smart door lock according to an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of a process of automatically unlocking a smart door lock according to a dynamic tracking function of an embodiment of the present invention;
[0050] Figure 3 is a structural block diagram of an unlocking device of a smart door lock according to an embodiment of the present invention;
[0051] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0053] According to an embodiment of the present invention, a method, apparatus, computer device and storage medium for unlocking a smart door lock are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0054] In this embodiment, a method for unlocking a smart door lock is provided. Figure 1 : is a flow chart of an unlocking method of a smart door lock according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0055] Step S11, obtaining the working status of the dynamic tracking function in the smart door lock.
[0056] It should be noted that the dynamic tracking function is an optional convenient unlocking function of the smart door lock, which can automatically unlock the door when the user detects the return intention within a certain range. Figure 2 As shown, it includes but is not limited to the following steps: first, it is determined that the dynamic tracking function is pre-activated by the user and is in a triggered state, and the door opening event is detected by the sensor inside the door (such as the door axis angle or the lock tongue micro switch). If it does not occur, wait; if it occurs, start the cat's eye camera to collect video, and then analyze the video to determine whether the target user has the intention to return. If not, the lock remains locked, and if so, it is automatically unlocked, so as to serve the user's travel and return and improve the user experience.
[0057] In the embodiment of the present application, step S11 includes the following steps A1-A3:
[0058] Step A1, obtaining the attribute value of the dynamic tracking function in the smart door lock.
[0059] Specifically, the smart door lock has set corresponding attribute parameters for the dynamic tracking function. These parameters exist in the form of attribute values and are used to characterize the various states and configurations of the function. Usually, these attribute values are stored in a specific storage area or configuration file of the smart door lock and can be presented in the form of numbers, character codes, etc. For example, "0" indicates that the dynamic tracking function is in the off state, and "1" indicates that it is on; or a more complex encoding method is used, where different digital segments correspond to different functional subdivision states (such as a certain value when the function is on and in high-sensitivity mode, and another value when it is on but in low-sensitivity mode, etc.). This attribute value is obtained from the corresponding storage location through a dedicated reading interface or data access mechanism to understand the basic situation of the current dynamic tracking function at the setting level, and to provide a basic basis for subsequent judgment on whether to start the actual tracking operation.
[0060] Step A2: When the attribute value is a preset value, detect whether a door opening event occurs in the current smart door lock.
[0061] Specifically, after obtaining the attribute value of the dynamic tracking function, it is compared with the preset value. The preset value is set by the developer or the user according to actual needs, representing the specific state of starting the function. For example, the preset value "1" means that the function is turned on. If the obtained value is equal to it, the function can work in theory. Then detect the smart door lock opening event. There are multiple sensors inside to monitor the door status, such as the door axis angle sensor. If the door opening angle exceeds the threshold, it can be determined to be open; or the micro switch at the lock tongue. When the door is opened, the lock tongue retracts and triggers the signal change. The system determines whether the door is open based on the sensor feedback signal to determine whether the necessary conditions for triggering the subsequent process are met.
[0062] Step A3, detecting whether the triggering mode of the door opening event is the inner door unlocking trigger, if the triggering mode is the inner door unlocking trigger, adjusting the working state of the dynamic tracking function to the triggering state.
[0063] Specifically, the dynamic tracking function is enabled only when the door is opened by unlocking from inside the door. The smart door lock will record unlocking information, such as the unlocking signal source (fingerprint inside the door, password module, or remote control outside the door, etc.). Through analysis and judgment, if the unlocking operation originates from inside the door (such as successful unlocking by fingerprint recognition inside the door), the startup conditions are met. Then the dynamic tracking function status indicator is changed from untriggered or standby to triggered, and the function is officially activated. Subsequently, according to the established program logic, the video information outside the door can be obtained to track and judge the behavior of the people who go out.
[0064] Step S12: when the working state of the dynamic tracking function is a trigger state, video information of the environment outside the door is obtained.
[0065] In the embodiment of the present application, when the dynamic tracking function of the smart door lock is triggered, it establishes communication with the image acquisition device outside the door and instructs it to start video acquisition. Taking the cat's eye camera as an example, the cat's eye camera works in a specific parameter mode, such as a preset frame rate (25 frames / second or 30 frames / second, etc.) to ensure smooth and clear recording, taking into account storage and processing efficiency according to the set resolution (1080P, 2K, etc.), and having a light adaptive adjustment function. When the light is dark (such as the corridor at night), the infrared fill light is automatically turned on to ensure that the image is clear and discernible, and the image is continuously captured according to the setting and integrated into a video information stream, providing a video information basis for subsequent analysis of the movement trajectory of the target object outside the door and other operations.
[0066] Step S13, determining the moving track of the target object in the environment outside the door according to the video information.
[0067] In the embodiment of the present application, step S13 includes the following steps B1-B4:
[0068] Step B1, extracting image frames from video information in time sequence to obtain an image frame sequence.
[0069] Specifically, after obtaining the video information of the environment outside the door (i.e., the continuous image stream collected and integrated by the cat's eye outside the door according to the established parameters), the images are extracted frame by frame in the order of their appearance to form an image frame sequence. This process is implemented by relying on relevant video processing algorithms and program modules, which can accurately locate and completely extract the images corresponding to each time node, avoid frame loss and misordering, and lay the foundation for the subsequent recognition of image frame content. For example, when the video frame rate is 30 frames per second, there are 30 image frames available for extraction per second. After a certain period of extraction operation, an image frame sequence reflecting the instantaneous picture conditions of the corresponding time period outside the door can be obtained.
[0070] Step B2: identifying at least one moving object in each image frame in the image frame sequence, and determining a target object among the moving objects.
[0071] Specifically, after obtaining the sequence of image frames, each image frame needs to be analyzed to identify the moving objects therein. This process can use, for example, target detection algorithms (such as YOLO, Faster R-CNN and other deep learning algorithms) to scan and analyze each image frame, that is, to distinguish different objects based on the shape contours, texture features and other information of the objects in the image, and mark those objects whose positions change between different image frames, that is, moving objects. For example, walking people and running pets in the picture may be identified as moving objects, and multiple such moving objects may be detected simultaneously in one image frame.
[0072] In the embodiment of the present application, determining the target object in the moving object includes the following steps B21-B23:
[0073] Step B21, extracting a set of morphological features of the moving object.
[0074] Specifically, for each object identified as a moving object, its various morphological features are extracted, which may include the object's outline shape (regular rectangle, circle, or irregular shape, etc.), size (measured by the number of pixels or relative proportion), color distribution (the type of overall color, the proportion of different color areas, etc.), and texture features (whether the surface of the object is smooth, rough, or has a specific pattern, etc.). Through the image feature extraction algorithm, the morphological features are summarized and integrated to form a morphological feature set for the moving object for subsequent comparison and judgment.
[0075] Step B22, comparing the morphological feature set with the preset feature set to obtain similarity.
[0076] Specifically, the smart door lock stores preset feature sets, which can be set according to the typical features of the target object to be tracked. For example, if the target object of focus is a family member, the preset feature set will include the approximate range of the contour shape, facial features, body structure characteristics (such as height, arm length, etc.) and corresponding texture features of the family member in a normal posture. The morphological feature set extracted from each mobile object is compared and analyzed with these preset feature sets, and the similarity between them is calculated through a specific similarity calculation formula (such as the cosine similarity algorithm based on the feature vector, the Euclidean distance algorithm, etc.), and a specific similarity value is obtained. This value can intuitively reflect the closeness of the mobile object to the preset target object features.
[0077] Step B23: if the similarity is greater than a preset similarity, then the moving object is determined to be the target object; or, if the similarity is less than the preset similarity, then the moving object is determined not to be the target object.
[0078] Specifically, if the similarity value obtained after the comparison calculation is greater than the preset similarity threshold, it means that the morphological features of the moving object are close enough to the preset target object features, and it can be basically determined that the moving object is the target object that needs to be tracked, such as determining that it is a user who goes out. On the contrary, if the similarity value is less than the preset similarity threshold, it means that the moving object does not meet the characteristic requirements of the target object and is not an object that needs to be paid attention to and tracked. For example, interfering objects such as pets passing through the picture can be excluded, so as to accurately lock the real target object among many moving objects, and prepare for subsequent operations such as tracking its movement trajectory.
[0079] Step B3: Mark the target object in each image frame to obtain multiple marking positions.
[0080] Specifically, the marking can be implemented based on the image coordinate system. Each image has a two-dimensional coordinate system with the upper left corner as the coordinate origin (0,0), the horizontal right as the positive direction of the x-axis, and the vertical downward as the positive direction of the y-axis. The image pixel can be represented by the coordinates (x, y). After determining the target object in the image frame, a rectangular frame is often used to select the target object, and the coordinates of its upper left corner vertex and lower right corner vertex are recorded to mark the position. A sophisticated method such as marking the coordinates of key feature points such as human joints can also be used to reflect its specific state and position. The image frame sequence is marked in chronological order, and the marking position information at different times can be obtained. From the time dimension, the position of the target object at each moment in the video time period is reflected, providing a data basis for generating a movement trajectory. Moreover, this information will be stored in a data structure such as a list or matrix, which is convenient for accurate and efficient call and analysis.
[0081] Step B4: generating a moving trajectory of the target object according to the marked positions in the image frame sequence.
[0082] Specifically, firstly, the marked position information of the target object in each image frame (such as the coordinates of the vertices of the rectangular frame, the coordinates of the feature points, etc.) is extracted in chronological order, and a two-dimensional coordinate sequence is constructed with time as the horizontal coordinate and the representative position coordinates of the target object in the image (such as the coordinates of the center point of the rectangular frame) as the vertical coordinate. The sequence reflects the position change of the target object at different times, such as connecting the coordinate points corresponding to each frame in sequence, such as: (x1, y1), (x2, y2), (x3, y3)..., to form an initial moving trajectory. In order to more accurately describe and analyze the moving trajectory, data processing and feature extraction operations can be performed, such as calculating the distance between adjacent position points to reflect the moving speed, analyzing the characteristics of the trajectory bending, direction change, etc. to understand the characteristics of the motion behavior. At the same time, when generating the moving trajectory, the image acquisition noise and the temporary occlusion of the target object are removed. The data smoothing algorithm (such as the sliding average method) can be used to pre-process the marked position data, remove the wrong position points, make the moving trajectory smoother and more accurate, and provide reliable data support for subsequent analysis and judgment.
[0083] Step S14, determining whether the target object has a return intention based on the movement trajectory, and if so, controlling the smart door lock to perform an unlocking operation.
[0084] In the embodiment of the present application, determining whether the target object has a return intention based on the movement trajectory includes the following steps C1-C4:
[0085] Step C1, calculating an initial direction vector formed by a first position point and a second position point in the moving trajectory.
[0086] Specifically, first select two adjacent representative coordinate points at the beginning of the moving trajectory (such as the coordinates of the center point of the rectangular frame marking the target object) to determine the initial movement direction of the target object, and construct a vector through these two points to calculate its direction information. Suppose the coordinates of the first position point are (x1, y1), the coordinates of the second position point are (x2, y2), and the initial direction vector is a vector pointing from (x1, y1) to (x2, y2), which is expressed in a two-dimensional plane as The modulus of the vector can measure its size and reflect the direction trend of the initial movement of the target object.
[0087] Step C2, monitoring the current motion direction vector of the target object, and calculating the vector angle between the initial direction vector and the motion direction vector.
[0088] Specifically, as the target object continues to move, its current motion direction vector needs to be monitored in real time. At the judgment moment, the coordinate points corresponding to the current and next positions of the target object are selected to construct the current motion direction vector. Assume that at a certain subsequent moment, the coordinates of the position point of the target object are (x n ,y n ), the coordinates of the next adjacent point in time are (xn+1 ,y n+1 ), the current motion direction vector can be expressed as Using the vector dot product formula, let the angle between the initial direction vector and the current motion direction vector be θ. The specific value of θ can be obtained by the following calculation formula:
[0089]
[0090] Among them, θ is the vector angle; is the initial direction vector; is the moving direction vector. This allows us to intuitively understand the degree of deviation of the target object’s current moving direction from the initial direction.
[0091] Step C3, determining whether the vector angle is greater than a preset angle threshold.
[0092] Specifically, after obtaining the angle between the initial direction vector and the current motion direction vector, it is necessary to compare it with a predetermined angle threshold. The angle threshold can be used as a standard for judging whether the change in the target object's motion direction has reached a level that may indicate an intention to return. For example, the preset angle threshold is set to 135°. If the vector angle is greater than this threshold, it means that the target object's motion direction has changed significantly compared to the initial direction, and there is a trend of going back. In-depth analysis is required to confirm whether there is an intention to return. If the vector angle is less than or equal to the threshold, it means that the change in motion direction is within a normal fluctuation range or is still moving near the initial direction, and it can be tracked and monitored according to the normal process.
[0093] Step C4, when the vector angle is greater than a preset angle threshold, it is determined whether the target object has a return intention based on the trajectory verification mechanism.
[0094] Specifically, when the vector angle is greater than the preset angle threshold, it is determined that the target object has the intention to return, but the direction may change significantly due to an instantaneous action or other interference factors. Therefore, further comprehensive judgment based on the trajectory verification mechanism is required to determine whether the smart door lock needs to perform the corresponding unlocking operation at present, so as to avoid misjudgment due to changes in the angle in a single direction, and provide a reliable basis for controlling the smart door lock to perform the unlocking operation.
[0095] In the embodiment of the present application, judging whether the target object has the intention to return based on the trajectory verification mechanism includes the following steps D1-D3:
[0096] Step D1, identifying the change trend of the position points in the moving trajectory.
[0097] Specifically, when the vector angle is greater than the preset angle threshold, it is necessary to analyze the changes in the position points in its moving trajectory. First, based on the moving trajectory composed of position points arranged in chronological order, the overall trend is determined by observing the changes in the relative position relationship between adjacent position points. For example, detect whether the subsequent position points are moving in the direction away from the door (reflected by a stable increase or decrease in the horizontal or vertical coordinate values), or tend to move back to the door (reflected by the reverse change in the coordinate values), and pay attention to the changes in the intervals between the position points to determine whether the target object is moving at a constant speed, accelerating or decelerating. In addition, curve fitting technology can be used to fit the position points into a curve, and the changing trend of the position points can be determined by the shape of the curve and the change in the slope, thereby providing a basis for determining whether it meets the preset return trend.
[0098] Step D2, analyzing whether the change trend conforms to the preset return trend.
[0099] In the embodiment of the present application, step D2 includes the following steps D21-D24:
[0100] Step D21, extracting speed features, direction features and distance features in the change trend.
[0101] Specifically, first, key feature information is extracted from the change trend of the identified position points. In terms of speed feature extraction, the distance between adjacent position points is calculated using the coordinate distance formula between two points, and then divided by the corresponding time interval determined by the image frame acquisition time interval and the corresponding frame number of the position point, thereby obtaining the instantaneous speed. Then, the magnitude and direction changes of the instantaneous speed are analyzed to form the speed feature; in terms of direction feature extraction, the change trend of the trajectory direction is obtained by calculating the slope of each segment of the trajectory or using vector direction representation to determine whether it gradually changes from the direction away from the door to the direction toward the door, thereby reflecting the direction feature; and distance feature extraction can be achieved by statistically analyzing the distance change between the current position point of the target object and the starting position point such as the initial reference point corresponding to the door, and its characteristics of changing over time form distance features.
[0102] Step D22, obtaining a preset speed feature, a preset direction feature, and a preset distance feature corresponding to the preset return trend.
[0103] Specifically, the smart door lock has preset return trend-related features corresponding to the return behavior based on a large number of actual observations, simulation experiments, and the summary of the movement characteristics of the target object in the normal return scenario. The preset speed feature is based on the speed change mode of first decelerating and then approaching the door at a relatively stable and lower speed during normal return. The corresponding speed range and a reasonable range of speed change rate are set to measure whether the actual speed feature is consistent; the preset direction feature clearly stipulates that the direction under the return trend must gradually change from away from the door to towards the door, and the angle change is within a certain range, and finally stably points to the direction of the door, so as to compare the actual direction feature; the preset distance feature takes into account the situation that the distance from the starting position (door) gradually decreases during return, and sets a reasonable rate of distance reduction and an approximate range of distances at different stages to determine whether the actual distance feature is consistent with the return situation.
[0104] Step D23, respectively comparing the speed feature, direction feature and distance feature with a preset speed feature, a preset direction feature and a preset distance feature to obtain a comparison result.
[0105] Specifically, the speed, direction, and distance features extracted from the actual change trend are compared with the corresponding preset features one by one, such as comparing whether the actual speed size and change are within the reasonable range of the preset speed feature, checking whether the actual direction change meets the angle change and final pointing conditions specified by the preset direction feature, and judging whether the actual distance and the door change trend match the distance reduction mode set by the preset distance feature, etc. Utilizing specific numerical comparison, range judgment and other means, the detailed results of each feature comparison are obtained to determine whether it fully meets, partially meets, or does not meet the requirements of the preset return trend related features, thereby providing accurate data support for determining whether the location point change trend meets the preset return trend.
[0106] Step D24, determining whether the position point change trend conforms to the preset return trend according to the comparison result.
[0107] Specifically, by comparing the key features such as speed, direction, and distance extracted from the actual change trend with the features corresponding to the preset return trend, the comparison result is used to determine whether the position point change trend is consistent with the preset return trend. If the key features are relatively consistent with the preset features, such as being within their respective preset reasonable ranges, or overall meeting the set return mode requirements, the position point change trend is determined to be consistent with the preset return trend, indicating that the target object has the intention to return and is walking back; if some or all of the key features are inconsistent with the preset return trend, such as unreasonable speed changes, the direction does not change steadily toward the door, the distance does not decrease as expected, etc., the position point change trend is determined to be inconsistent with the preset return trend, indicating that the target object is not really returning, but only has a short-term abnormal movement.
[0108] Step D3, if it meets the preset return trend, it is determined that the target object has the intention to return, or, if it does not meet the preset return trend, the motion direction vector of the next frame is monitored.
[0109] Specifically, after obtaining the result of whether the change trend of the position point meets the preset return trend, different operations can be taken according to this result. If it meets the preset return trend, it can be determined that the target object has the intention to return, and the smart door lock is controlled to perform the unlocking operation; if it does not meet the preset return trend, it means that the target object is affected by other factors and does not really want to return. It is necessary to continue to monitor the motion direction vector of the next frame and further observe the subsequent motion situation in order to accurately determine the true intention of the target object.
[0110] In this embodiment, an unlocking device for a smart door lock is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] This embodiment provides an unlocking device for a smart door lock, such as Figure 3 As shown, including:
[0112] A first acquisition module 31 is used to obtain the working status of the dynamic tracking function in the smart door lock;
[0113] The second acquisition module 32 is used to acquire video information of the environment outside the door when the working state of the dynamic tracking function is the trigger state;
[0114] A determination module 33, used to determine the moving track of the target object in the environment outside the door according to the video information;
[0115] The control module 34 is used to determine whether the target object has a return intention based on the movement trajectory, and if there is a return intention, control the smart door lock to perform an unlocking operation.
[0116] In an optional embodiment of the present application, the first acquisition module 31 is used to obtain the attribute value of the dynamic tracking function in the smart door lock; when the attribute value is a preset value, it detects whether a door opening event occurs in the current smart door lock; it detects whether the triggering method of the door opening event is an internal door unlocking trigger, and if the triggering method is an internal door unlocking trigger, the working state of the dynamic tracking function is adjusted to a triggered state.
[0117] In an optional embodiment of the present application, a determination module 33 is used to extract image frames in the video information in chronological order to obtain an image frame sequence; identify at least one moving object in each image frame in the image frame sequence, and determine the target object among the moving objects; mark the target object in each image frame to obtain multiple marking positions; and generate a moving trajectory of the target object according to the marking positions in the image frame sequence.
[0118] In an optional embodiment of the present application, a determination module 33 is used to extract a morphological feature set of a moving object; compare the morphological feature set with a preset feature set to obtain a similarity; if the similarity is greater than the preset similarity, the moving object is determined to be a target object, or, if the similarity is less than the preset similarity, the moving object is determined not to be a target object.
[0119] In an optional embodiment of the present application, the control module 34 is used to calculate the initial direction vector formed by the first position point and the second position point in the moving trajectory; monitor the current movement direction vector of the target object, and calculate the vector angle between the initial direction vector and the movement direction vector; determine whether the vector angle is greater than a preset angle threshold; when the vector angle is greater than the preset angle threshold, determine whether the target object has a return intention based on the trajectory verification mechanism.
[0120] In an optional embodiment of the present application, the control module 34 is used to identify the changing trend of the position point in the moving trajectory; analyze whether the changing trend conforms to the preset return trend; if it conforms to the preset return trend, determine that the target object has the intention to return, or, if it does not conform to the preset return trend, monitor the motion direction vector of the next frame.
[0121] In an optional embodiment of the present application, the control module 34 is used to extract the speed characteristics, direction characteristics and distance characteristics in the change trend; obtain the preset speed characteristics, preset direction characteristics and preset distance characteristics corresponding to the preset return trend; compare the speed characteristics, direction characteristics and distance characteristics with the preset speed characteristics, preset direction characteristics and preset distance characteristics, respectively, to obtain a comparison result; determine whether the change trend of the position point conforms to the preset return trend based on the comparison result.
[0122] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0123] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0124] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0125] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0126] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0127] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0128] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0129] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for unlocking a smart door lock, characterized in that: The method comprises: Get the working status of the dynamic tracking function in the smart door lock; When the working state of the dynamic tracking function is a trigger state, video information of the environment outside the door is obtained; Determine the moving trajectory of the target object in the environment outside the door according to the video information; Based on the movement trajectory, it is determined whether the target object has the intention to return. If there is the intention to return, the smart door lock is controlled to perform an unlocking operation.
2. The method according to claim 1, characterized in that: The obtaining of the working status of the dynamic tracking function in the smart door lock includes: Obtaining the attribute value of the dynamic tracking function in the smart door lock; When the attribute value is a preset value, detecting whether a door opening event occurs in the current smart door lock; It is detected whether the triggering mode of the door opening event is the inner door unlocking triggering, and if the triggering mode is the inner door unlocking triggering, the working state of the dynamic tracking function is adjusted to the triggering state.
3. The method according to claim 1, characterized in that Determining the moving track of the target object in the environment outside the door according to the video information includes: Extracting image frames from the video information in time order to obtain an image frame sequence; Identifying at least one moving object in each image frame in the image frame sequence, and determining a target object among the moving objects; Marking the target object in each of the image frames to obtain a plurality of marking positions; A moving trajectory of the target object is generated according to the marked positions in the image frame sequence.
4. The method according to claim 3, characterized in that The determining of the target object in the moving object comprises: Extracting a morphological feature set of the moving object; Comparing the morphological feature set with a preset feature set to obtain a similarity; If the similarity is greater than a preset similarity, the moving object is determined to be a target object, or, if the similarity is less than a preset similarity, the moving object is determined not to be a target object.
5. The method according to claim 1, characterized in that The determining whether the target object has a return intention based on the movement trajectory includes: Calculating an initial direction vector formed by a first position point and a second position point in the moving trajectory; Monitoring the current motion direction vector of the target object, and calculating the vector angle between the initial direction vector and the motion direction vector; Determine whether the vector angle is greater than a preset angle threshold; When the vector angle is greater than a preset angle threshold, it is determined whether the target object has a return intention based on a trajectory verification mechanism.
6. The method according to claim 5, characterized in that The determining whether the target object has a return intention based on the trajectory verification mechanism includes: Identifying a change trend of a position point in the movement trajectory; Analyze whether the change trend conforms to the preset return trend; If it meets the preset return trend, it is determined that the target object has the intention to return, or, if it does not meet the preset return trend, the motion direction vector of the next frame is monitored.
7. The method according to claim 6, characterized in that The analyzing whether the change trend conforms to the preset return trend includes: Extracting speed features, direction features and distance features in the changing trend; Obtaining a preset speed feature, a preset direction feature, and a preset distance feature corresponding to the preset return trend; Respectively comparing the speed feature, direction feature, and distance feature with the preset speed feature, preset direction feature, and preset distance feature to obtain a comparison result; Determine whether the change trend of the position point conforms to a preset return trend according to the comparison result.
8. An unlocking device for a smart door lock, characterized in that: The device comprises: The first acquisition module is used to obtain the working status of the dynamic tracking function in the smart door lock; A second acquisition module is used to acquire video information of the environment outside the door when the working state of the dynamic tracking function is a trigger state; A determination module, used to determine the moving track of the target object in the environment outside the door according to the video information; The control module is used to determine whether the target object has a return intention based on the movement trajectory, and if there is a return intention, control the smart door lock to perform an unlocking operation.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Adjusting method and device for motor driving, equipment and storage medium
CN120601805A
Pedestrian following recognition method and device, computer equipment and storage medium
CN120976260A