A method and system for preventing prying of intelligent door lock
By analyzing the volume, time and value differences of door lock interaction data, calculating abnormality evaluation indicators and adjusting abnormal scores, the problem of inaccurate abnormality detection in the existing technology is solved, and the accuracy and safety of smart door lock anti-pry monitoring are improved. .
Patent Information
- Application Number
- CN202410570661.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-05-09
AI Technical Summary
When the existing anomaly detection algorithm of smart door locks attempts multiple high-frequency remote access attempts in a short period of time, the local density of data is high, resulting in inaccurate anomaly detection results, which in turn affects the accuracy of door lock anti-tamper monitoring.
Collect door lock interaction data within each set time period every day. By analyzing the data volume, time distribution and data value differences, calculate the data intensity and anomaly evaluation indicators, and use these indicators to adjust the anomaly score of outlier detection to obtain more accurate anomaly detection results.
It improves the accuracy of door lock anti-pry monitoring, reduces the possibility of high-density abnormal data being misjudged as normal data, and enhances the security of the system.
Smart Images

Figure CN118314647B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to an anti-pry method and system for a smart door lock. Background Art
[0002] During the unlocking process of the door lock, the personnel are identified by identity authentication to prevent illegal personnel from digitally picking the lock. Among them, identity authentication forms include identity verification (fingerprint recognition and face recognition), password verification, etc. The door lock network communication data mainly involves the communication log between the door lock device and the control center or user device. This data is crucial to ensure the security of the unlocking process. The door lock control center can monitor the door lock network communication data in real time, and promptly detect abnormal situations, such as password errors, illegal fingerprint attempts, etc., and can take corresponding measures such as triggering early warning devices, thereby enhancing the security of the smart door lock system.
[0003] Normally, when the door lock control center monitors the door lock network communication data, it often uses anomaly retrieval algorithms to detect anomalies in the door lock network communication data, which can effectively identify and warn of abnormal digital lock picking behaviors. However, in the process of using this method for anomaly detection, if there are multiple high-frequency remote access attempts in a short period of time, the door lock network communication data at the corresponding time will form a single high-density cluster in the performance of anomaly detection, which will make the local density of the data high and close, without considering whether there are frequent access operations in the historical data of the same time period, resulting in less accurate anomaly detection results and less accurate door lock anti-pry monitoring results. Summary of the invention
[0004] In order to solve the technical problem that the detection results of the existing anomaly detection algorithm are relatively inaccurate, resulting in relatively inaccurate anti-theft monitoring results of door locks, the purpose of the present invention is to provide an anti-theft method and system for smart door locks, and the technical solutions adopted are as follows:
[0005] In a first aspect, the present invention provides an anti-pry method for a smart door lock, comprising:
[0006] Collect door lock interaction data of each dimension when there is interactive operation of the smart door lock in each set time period every day;
[0007] The data density of each door lock interaction data in each dimension in each set time period of each day is obtained based on the difference in data volume distribution between the door lock interaction data in each dimension in the same set time period of each day and the door lock interaction data in the same dimension in the same set time period of adjacent days, the time distribution difference between the door lock interaction data, and the data value difference;
[0008] According to the time distribution difference between the door lock interaction data of each dimension and other dimensions in each set time period of each day, and the difference between the data density of each door lock interaction data in each dimension and the overall dense distribution of data in each dimension, the abnormal evaluation index of each door lock interaction data in each dimension in each set time period of each day is obtained;
[0009] The anomaly evaluation index is used to adjust the anomaly score of outlier detection for each door lock interaction data in each dimension in each set time period of each day, and the anomaly detection result of the door lock is obtained according to the adjusted anomaly score.
[0010] Preferably, the data density of each door lock interaction data in each dimension in each set time period of each day is obtained based on the difference between the data volume distribution of the door lock interaction data in each dimension in each set time period of each day and the door lock interaction data in the same dimension in the same set time period of adjacent days, the time distribution difference between the door lock interaction data, and the data value difference, specifically including:
[0011] Record any door lock interaction data of any dimension in any set time period in any day as selected door lock interaction data, and record the same set time period of each day in the day number neighborhood of the any day as the reference set time period in the reference day;
[0012] Obtaining a first coefficient of the selected door lock interaction data according to the difference between the total number of door lock interaction data within the set time period where the selected door lock interaction data is located and the total number of door lock interaction data of the same dimension as the selected door lock interaction data within the reference set time period in each reference day;
[0013] Obtaining a second coefficient of the selected door lock interaction data according to a time distribution difference and a data value difference between the selected door lock interaction data and other door lock interaction data of the same dimension within a set time period where the selected door lock interaction data is located;
[0014] The data density of the selected door lock interaction data is obtained according to the first coefficient and the second coefficient, and the first coefficient and the second coefficient are both positively correlated with the data density.
[0015] Preferably, the method for obtaining the first coefficient of the selected door lock interaction data is specifically:
[0016] The x-th door lock interaction data in the k-th dimension in the t-th set time period on the i-th day is used as the selected door lock interaction data, and the calculation formula of the first coefficient of the selected door lock interaction data is:
[0017]
[0018] Among them, W i,t(k,x) represents the data density of the x-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, α1 represents the first coefficient of the selected door lock interaction data, N represents the number of days included in the neighborhood of the i-th day, Q k (i, t) represents the number of all door lock interaction data in the kth dimension within the tth set time period on the i-th day, Q k (in,t) represents the number of all door lock interaction data in the kth dimension within the tth set time period on the inth day.
[0019] Preferably, the method for obtaining the second coefficient of the selected door lock interaction data is specifically:
[0020]
[0021] Among them, α2 represents the second coefficient of the selected door lock interaction data, represents the mean of the difference between the selected door lock interaction data and each other door lock interaction data in the kth dimension within the tth set time period on the i-th day, N0 represents the total number of door lock interaction data in the kth dimension within the tth set time period on the i-th day, M0 represents the set of all data except the selected door lock interaction data in the kth dimension within the tth set time period on the i-th day, represents the time interval between the x-th door lock interaction data and the u-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, It represents the time interval between the x-th door lock interaction data and the v-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, u≠v, and u,v∈M0, ε is the preset hyperparameter.
[0022] Preferably, the abnormal evaluation index of each door lock interaction data in each dimension in each set time period of each day is obtained according to the time distribution difference between the door lock interaction data of each dimension and other dimensions in each set time period of each day, and the difference between the data density of each door lock interaction data in each dimension and the overall dense distribution of data in each dimension, specifically including:
[0023] Record any door lock interaction data of any dimension in any set time period in any day as target door lock interaction data of the target dimension in the target set time period in any day;
[0024] According to the difference between the time series value of the target door lock interaction data and the time series value of the door lock interaction data of each dimension within the target set time period, the weight coefficient of each dimension within the target set time period is obtained;
[0025] According to the weight coefficient, the data density of the door lock interaction data in each dimension within the target setting time period and the average of the data density of all door lock interaction data in the same dimension, an abnormal evaluation index of the target door lock interaction data is obtained.
[0026] Preferably, the method for obtaining the abnormal evaluation index is specifically:
[0027] The yth door lock interaction data of the kth dimension in the rth set time period in the i-th day is used as the target door lock interaction data of the target dimension in the target set time period. The calculation formula of the abnormal evaluation index of the target door lock interaction data is:
[0028]
[0029] Among them, G i,r (k,y) represents the abnormal evaluation index of the target door lock interaction data, i represents the i-th day, r represents the r-th set time period, k represents the k-th dimension, y represents the y-th door lock interaction data, N1 represents the total number of all dimensions, T i,r (k,y) represents the time series value of the yth door lock interaction data in the kth dimension in the rth set time period in the i-th day, T i,r (m,y) represents the time series value of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day, W i,r (m,y) represents the data density of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day. represents the data density of all door lock interaction data in the mth dimension in the rth set time period on the i-th day, It represents the weight coefficient of the mth dimension within the target setting time period, and exp() represents an exponential function with the natural constant e as the base.
[0030] Preferably, the use of the abnormal evaluation index to adjust the abnormal score of outlier detection for each door lock interaction data in each dimension in each set time period of each day specifically includes:
[0031] The LOF outlier detection algorithm is used to obtain the local outlier factor of each door lock interaction data in each dimension in each set time period of each day, and recorded as the anomaly score of the door lock interaction data;
[0032] The anomaly evaluation index of each door lock interaction data is normalized, and the product of the sum of the normalized anomaly evaluation index and the constant 1 and the corresponding anomaly score is used as the adjusted anomaly score of each door lock interaction data in each dimension in each set time period of each day.
[0033] Preferably, obtaining the abnormality detection result of the door lock according to the adjusted abnormality score specifically includes:
[0034] The average of the adjusted anomaly scores corresponding to all dimensions at each moment in each set time period of each day is calculated and recorded as the characteristic anomaly score at each moment. When the characteristic anomaly score at each moment is greater than the preset anomaly threshold, there is a door lock anomaly at the corresponding moment.
[0035] Preferably, each dimension corresponds to a type of door lock interaction data, and the door lock interaction data of each dimension includes communication frequency, response time, communication data packet size and command type.
[0036] In a second aspect, the present invention provides an anti-theft system for a smart door lock, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, steps of an anti-theft method for a smart door lock are implemented.
[0037] The embodiments of the present invention have at least the following beneficial effects:
[0038] The present invention first collects the door lock interaction data of each dimension when there is an operation, and the data is collected in the same set time period in different days, providing a data basis for the subsequent data synchronization analysis. Then, by analyzing the data volume, time distribution and data value differences of the door lock interaction data in the same set time period in different days under the same dimension, the data density of each door lock interaction data in each dimension is quantified. Considering that the data at the same time node on different days should be relatively close under normal circumstances, the greater the data density, the greater the data concentration or density of the abnormal door lock interaction data. Further, combined with the time distribution difference between the door lock interaction data in different dimensions in the same set time period, the difference between the data density and the overall, the abnormal evaluation index of each door lock interaction data in each dimension is obtained. The abnormal evaluation index reflects the possibility of abnormal door lock interaction data from the differences in time synchronization and density distribution of door lock interaction data in different dimensions at the same time node. Finally, the original anomaly score of each door lock interaction data is adjusted in combination with the anomaly evaluation index, so that the original relatively concentrated anomaly data features become more discrete. The result of anomaly evaluation using the adjusted anomaly score is more accurate, reducing the possibility of highly concentrated anomaly data being misdetected as normal data, and obtaining more accurate door lock anti-theft monitoring results. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is a flowchart of the steps of an anti-theft method for a smart door lock provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the anti-theft method and system of a smart door lock proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0043] The specific scheme of the anti-theft method and system of an intelligent door lock provided by the present invention is described in detail below with reference to the accompanying drawings.
[0044] An anti-pry method embodiment of a smart door lock:
[0045] See also Figure 1 , which shows a flowchart of a method for preventing prying of a smart door lock provided by an embodiment of the present invention, the method comprising the following steps:
[0046] Step 1: Collect door lock interaction data of each dimension when the smart door lock has interactive operations during each set time period every day.
[0047] It should be noted that when using common anomaly detection algorithms to detect anomalies in the data of smart door locks, the local density of the data will be large due to the concentration of the data, making it impossible to identify the data with anomalies itself. To address this problem, this embodiment takes into account the distribution of different types of data each time there is an interactive operation with the smart door lock, and whether the same nature or form of interactive operations occurs in the same time period in history, which is reflected in the distribution of different types of data.
[0048] Based on this, we first need to collect the network communication data of the smart door lock, where the network communication data mainly refers to the communication log between the door lock device and the control center or user device, that is, the network communication data when the smart door lock has interactive operations. The door lock interaction data of each dimension when the smart door lock has interactive operations is collected in each set time period every day. Each dimension corresponds to a type of door lock interaction data, and each dimension of door lock interaction data includes communication frequency, response time, communication data packet size, and command type.
[0049] Specifically, the door lock operation log data presents a relatively regular distribution under normal circumstances. When there is an abnormal lock picking behavior, the door lock operation log data is distributed relatively randomly as a whole and is concentrated in a local time period. Considering this distribution feature, the 24 hours of a day are divided into multiple set time periods. In this embodiment, the length of each set time period is set to one hour. For example, under normal circumstances, there is usually log data of opening and closing the door lock in the set time period from 8 to 9 o'clock every day.
[0050] In this embodiment, the communication frequency data refers to the number of communications between the door lock device and the control center or user device within a sub-time period from the moment of door lock operation, where the time length of the sub-time period can be set to 5 minutes. The response time refers to the time length from the door lock device sending a command to receiving a response from the moment of door lock operation. The communication data packet size refers to the amount of data sent in the communication corresponding to the moment of door lock operation. The command type refers to different command types such as unlocking or locking, and different numerical tags can be assigned to each command type. For example, the numerical tag of the unlock command can be set to 0, and the numerical tag of the locking command can be set to 1.
[0051] It can be understood that through data collection, historical data of each door lock operation record can be obtained, that is, the time corresponding to the door lock interaction data each time an operation occurs, where the time corresponding to the door lock interaction data is also the timestamp of the door lock interaction data in each dimension.
[0052] It should be noted that since door lock interaction data has multiple dimensions corresponding to multiple different types, in order to avoid the impact of dimensions between different types of data, the door lock interaction data of each dimension can be standardized, or the door lock interaction data of each dimension can be converted into binary data variables using an encoding algorithm, and each data is represented by an independent variable.
[0053] Step 2: According to the difference in data volume distribution between the door lock interaction data of each dimension in each set time period of each day and the door lock interaction data of the same dimension in the same set time period of adjacent days, the time distribution difference between the door lock interaction data, and the data value difference, the data density of each door lock interaction data in each dimension in each set time period of each day is obtained.
[0054] Under normal circumstances, door lock interaction data usually shows a regular periodicity. For example, there are usually log data corresponding to the lock opening and closing operations in the morning and evening, and the time of the lock opening and closing operations on different days is relatively close. The interaction information between the door lock device and the control center or user device, that is, the door lock interaction data in each dimension, usually shows a high degree of invariance and periodicity, which is caused by the user's daily behavior habits. However, when there is abnormal lock picking behavior, the corresponding operation time is irregular and the data range is relatively concentrated.
[0055] In order to avoid the situation where abnormal data is dense in time series and the data range is concentrated, which makes it impossible to accurately identify abnormal data, we can first reflect the abnormal situation of the data by analyzing the data clustering distribution characteristics when there are door lock operations at the same time nodes on different days. That is, when quantifying the density around each door lock interaction data in each dimension, we consider the differences in data volume, time, and data value in the same set time period on different days for each dimension.
[0056] Specifically, any door lock interaction data of any dimension within any set time period in any day is recorded as selected door lock interaction data, and the same set time period of each day within the day number neighborhood of the any day is recorded as the reference set time period in the reference day.
[0057] The first coefficient of the selected door lock interaction data is obtained according to the difference between the total number of door lock interaction data in the set time period where the selected door lock interaction data is located and the total number of door lock interaction data of the same dimension as the selected door lock interaction data in the reference set time period in each reference day; the second coefficient of the selected door lock interaction data is obtained according to the time distribution difference and data value difference between the selected door lock interaction data and other door lock interaction data of the same dimension in the set time period where the selected door lock interaction data is located; the data density of the selected door lock interaction data is obtained according to the first coefficient and the second coefficient, and the first coefficient and the second coefficient are both positively correlated with the data density. Among them, the positive correlation can be a product relationship, an addition relationship, etc.
[0058] As a specific implementation, the xth door lock interaction data in the tth set time period of the i-th day under the kth dimension is taken as the selected door lock interaction data. In this embodiment, the first N days adjacent to the i-th day are taken as the day number neighborhood of the i-th day, and the value of N is 5, that is, the in-th day to the i-1-th day are all reference days, and the tth set time period from the in-th day to the i-1-th day are all reference time periods. The calculation formula for the data density of the door lock interaction data can be expressed as:
[0059] W i,t (k,x)=α1+α2
[0060]
[0061]
[0062] Among them, W i,t (k,x) represents the data density of the x-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, α1 represents the first coefficient of the selected door lock interaction data, N represents the number of days included in the neighborhood of the i-th day, Q k (i, t) represents the number of all door lock interaction data in the kth dimension within the tth set time period on the i-th day, Q k (in,t) represents the number of all door lock interaction data in the kth dimension within the tth set time period on the inth day.
[0063] α2 represents the second coefficient of the selected door lock interaction data, represents the mean of the difference between the selected door lock interaction data and each other door lock interaction data in the kth dimension within the tth set time period on the i-th day, N0 represents the total number of door lock interaction data in the kth dimension within the tth set time period on the i-th day, M0 represents the set of all data except the selected door lock interaction data in the kth dimension within the tth set time period on the i-th day, represents the time interval between the x-th door lock interaction data and the u-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, It represents the time interval between the x-th door lock interaction data and the v-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, u≠v, and u,v∈M0, ε is a preset hyperparameter, and its value can be a very small positive number, such as 0.01, to prevent the denominator from being 0.
[0064] Indicates the difference between the amount of data in the same dimension in the set time period of the selected door lock interaction data and the same time period on different days. The closer the ratio is to 1, The smaller the value of is, the smaller the difference in the amount of data in the same dimension in the same time period on different days is, which means that the possibility of data anomalies in the set time period of the selected door lock interaction data is smaller, and the corresponding data density value is smaller.
[0065] Indicates the data difference between the selected door lock interaction data and other door lock interaction data. The larger the difference, The smaller the value of is, the smaller the concentration of the distribution range of data values in the local set time period is, and the smaller the value of the corresponding second coefficient is.
[0066] In this embodiment, the difference between the two door lock interaction data can be the absolute value of the difference between the two door lock interaction data, for example, the absolute value of the difference between the selected door lock interaction data and the v-th door lock interaction data of the k-th dimension in the t-th set time period on the i-th day. The absolute value of the difference between the selected door lock interaction data and each data in the set M0 can be calculated, and the average of all the absolute values of the difference is
[0067] It indicates the difference in the time interval between the selected door lock interaction data and other data in the same set time period. The larger the difference, the larger the time interval between the data in the set time period where the selected door lock interaction data is located, and the more discrete the data distribution is. That is, the smaller the centrality of the data set, the larger the value of the corresponding second coefficient.
[0068] The first coefficient reflects the possibility of data anomaly from the difference in data volume distribution in the same dimension of the selected door lock interaction data belonging to different days but the same set time period, and indirectly reflects the local density of data. The second coefficient characterizes the data concentration of the selected door lock interaction data within the local time range from the discreteness of the data difference distribution within the set time period where the selected door lock interaction data is located, as well as the difference in the time interval corresponding to the data.
[0069] The larger the value of the first coefficient, the greater the possibility that the selected door lock interaction data contains anomalies. The larger the value of the second coefficient, the greater the concentration of the data within the local time range of the selected door lock interaction data. Therefore, the larger the value of the data density of the selected door lock interaction data, the greater the concentration of the door lock interaction data within the local time range, which in turn reflects a greater possibility that the door lock interaction data contains anomalies.
[0070] Step three, based on the time distribution difference between the door lock interaction data of each dimension and other dimensions in each set time period of each day, and the difference between the data density of each door lock interaction data in each dimension and the overall dense distribution of data in each dimension, obtain the abnormal evaluation index of each door lock interaction data in each dimension in each set time period of each day.
[0071] In normal unlocking and locking operations, the concentration of door lock interaction data in different dimensions is consistent, because the data generated by an unlocking or locking interaction operation appears uniformly at the same time node. Based on this, the lower the time synchronization of door lock interaction data in different dimensions, the lower the synchronization of the concentration, and the higher the possibility of corresponding data anomalies. At the same time, when the time synchronization of door lock interaction data in different dimensions is high, the greater the difference in data density in the same set time period in different dimensions, the higher the possibility of corresponding data anomalies, which means that the corresponding moment does not follow the normal data synchronization change, or the difference in synchronization change is large, and this data performance is closer to remote access in a short period of time. A large number of digital lock picking behaviors.
[0072] Based on this, by analyzing the time synchronization of each door lock interaction data in different dimensions and the synchronization and difference of data density, the abnormal situation of door lock interaction data is quantified. Specifically, any door lock interaction data in any dimension in any set time period in any day is recorded as the target door lock interaction data in the target dimension in the target set time period in any day.
[0073] According to the difference between the timing value of the target door lock interaction data and the timing value of the door lock interaction data of each dimension within the target setting time period, the weight coefficient under each dimension within the target setting time period is obtained; according to the weight coefficient, the data density of the door lock interaction data of each dimension within the target setting time period and the average of the data density of all door lock interaction data under the same dimension, the abnormal evaluation index of the target door lock interaction data is obtained.
[0074] As a specific implementation, the yth door lock interaction data of the kth dimension in the rth set time period in the i-th day is used as the target door lock interaction data of the target dimension in the target set time period, and the calculation formula of the abnormal evaluation index of the target door lock interaction data can be expressed as:
[0075]
[0076] Among them, G i,r(k,y) represents the abnormal evaluation index of the target door lock interaction data, i represents the i-th day, r represents the r-th set time period, k represents the k-th dimension, y represents the y-th door lock interaction data, N1 represents the total number of all dimensions, T i,r (k,y) represents the time series value of the yth door lock interaction data in the kth dimension in the rth set time period in the i-th day, T i,r (m,y) represents the time series value of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day, W i,r (m,y) represents the data density of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day. represents the data density of all door lock interaction data in the mth dimension in the rth set time period on the i-th day, It represents the weight coefficient of the mth dimension within the target setting time period, and exp() represents an exponential function with the natural constant e as the base.
[0077] Indicates the time difference between the target door lock interaction data and the door lock interactions with the same sequence number in other dimensions within the same set time period. The closer the ratio is to 1, the The smaller the value of is, the higher the time synchronization between the target door lock interaction data and the door lock interaction data of other dimensions is. The larger the value of the weight coefficient under the corresponding dimension is, the greater the reference value of the centralized distribution of data under this dimension is. The greater the difference between this ratio and 1, that is, The larger the value is, the lower the time synchronization between the target door lock interaction data and the door lock interaction data of other dimensions is, and the smaller the value of the weight coefficient under the corresponding dimension is, which means that the reference value of the centralized distribution of data under this dimension is smaller.
[0078] It should be noted that each door lock interaction data in each dimension only exists in one dimension, that is, all door lock interaction data in each dimension within a day are arranged in chronological order, and the sorting sequence number can be used as the timing value of each door lock interaction data in each dimension. In other embodiments, the time value of each door lock interaction data in each dimension can also be obtained as the timing value of each door lock interaction data.
[0079] It indicates the difference between the density of door lock interaction data in other dimensions and the overall distribution of the same dimension. The greater the difference, the greater the discreteness of the door lock interaction data in the corresponding dimension, reflecting that the data synchronization of the target door lock interaction data in this dimension is small, and the greater the possibility of data anomalies, that is, the larger the value of the corresponding anomaly evaluation index.
[0080] The abnormal evaluation index of each door lock interaction data characterizes the possibility of abnormality in each door lock interaction data by analyzing the discrete situation of density in different dimensions and the time synchronization situation. The larger the value of the abnormal evaluation index, the lower the time synchronization of the door lock interaction data, which does not meet the data distribution of normal door lock operation, and the greater the possibility of abnormality in the door lock interaction data.
[0081] Step 4: Use the anomaly evaluation index to adjust the anomaly score of outlier detection for each door lock interaction data in each dimension in each set time period of each day, and obtain the anomaly detection result of the door lock according to the adjusted anomaly score.
[0082] An anomaly evaluation index can be calculated for the door lock interaction data of each dimension in each set time period of each day. The anomaly evaluation index reflects the possibility of anomalies in the corresponding door lock interaction data. That is, the larger the anomaly evaluation index of the door lock interaction data, the greater the possibility of anomalies in the corresponding door lock interaction data. When the anomaly detection algorithm is used to perform anomaly detection on the daily door lock interaction data, the greater the possibility of anomalies, the greater the anomaly score corresponding to the door lock interaction data. Therefore, the anomaly detection result obtained using the anomaly score will be more accurate. Based on this, the anomaly evaluation index of each door lock interaction data can be used to adjust the anomaly detection evaluation value of each door lock interaction data.
[0083] Specifically, the LOF outlier detection algorithm is used to obtain the abnormal score of each door lock interaction data in each dimension in each set time period every day. In this embodiment, the LOF outlier detection algorithm is used to analyze all door lock interaction data in each dimension every day, and the local outlier factor of each door lock interaction data can be obtained. The local outlier factor is used as the abnormal score of each door lock interaction data, and then the smaller the abnormal score value, the greater the local density of the data, the smaller the outlier, and the smaller the abnormal situation.
[0084] It should be noted that, in other embodiments, the implementer may select other suitable anomaly detection algorithms according to the specific implementation scenario to obtain the anomaly score of each door lock interaction data, for example, the COF anomaly detection algorithm, which obtains the anomaly score of each door lock interaction data by calculating the COF value of each door lock interaction data under each dimension.
[0085] The anomaly evaluation index of each door lock interaction data is normalized, and the product of the sum of the normalized anomaly evaluation index and the constant 1 and the corresponding anomaly score is used as the adjusted anomaly score of each door lock interaction data in each dimension in each set time period of each day.
[0086] As a specific implementation, taking the yth door lock interaction data of the kth dimension in the rth set time period in the i-th day as an example, the calculation formula of the adjusted anomaly score can be expressed as:
[0087] l i ′ ,r (k,y)={1+Norm[G i,r (k,y)]}×l i,r (k,y)
[0088] Among them, l i ′ ,r (k,y) represents the adjusted anomaly score of the yth door lock interaction data in the kth dimension in the rth set time period on the i-th day, G i,r (k,y) represents the abnormal evaluation index of the yth door lock interaction data in the kth dimension in the rth set time period in the i-th day, l i,r (k,y) represents the abnormal score of the yth door lock interaction data in the kth dimension in the rth set time period in the i-th day, and Norm() represents the linear normalization function.
[0089] The larger the value of the abnormal evaluation index of the door lock interaction data, the greater the possibility that the door lock interaction data is abnormal, and the larger the weight for adjustment, the larger the abnormal score after adjustment. The smaller the value of the abnormal evaluation index of the door lock interaction data, the smaller the possibility that the door lock interaction data is abnormal, and the smaller the weight for adjustment, the smaller the abnormal score after adjustment. By adaptively setting weights of different sizes for each abnormal evaluation index, the possibility of highly clustered abnormal data being misdetected as normal data is reduced.
[0090] The higher the adjusted anomaly score of each door lock interaction data in each dimension, the greater the possibility that the door lock interaction data is abnormal in the corresponding dimension. Considering that the time node corresponding to the same moment may have anomaly detection results corresponding to the door lock interaction data in multiple dimensions or in each dimension, it is necessary to comprehensively evaluate the abnormal situation of the door lock operation at the same moment based on the anomaly detection results of each door lock interaction data in each dimension.
[0091] In this embodiment, the average of the adjusted anomaly scores corresponding to all dimensions at each moment in each set time period of each day is calculated and recorded as the characteristic anomaly score at each moment. In other embodiments, the implementer can also use the median or mode of the adjusted anomaly scores of the door lock interaction data in all dimensions at the same moment as the characteristic anomaly score at each moment to evaluate whether there is an abnormal door lock operation at the corresponding moment.
[0092] When the feature anomaly score at each moment is greater than the preset anomaly threshold, there is a door lock anomaly at the corresponding moment. In this embodiment, the value of the anomaly threshold is set to 2. Since the value of the local outlier factor of the data in the LOF anomaly detection algorithm is greater than 1, it means that the density of the data is less than the density of other data in its neighborhood, and the data is more likely to be an anomaly point. Therefore, this embodiment sets a threshold greater than 1 for anomaly evaluation. The greater the value of the anomaly threshold is greater than 1, the stricter the judgment standard for whether there is an abnormal door lock operation at each moment using the anomaly threshold. When there is a door lock anomaly at a certain moment, an early warning method can be used to remind the user to pay attention to the abnormal situation of the door lock device in time, so that corresponding measures can be taken in time.
[0093] In summary, the LOF anomaly detection algorithm is used to perform anomaly detection on door lock interaction data to achieve the purpose of digital anti-theft. However, since the door lock interaction data in different dimensions may have a certain concentration at different time nodes due to frequent unlocking attempts, the local density of the data is relatively large, making the anomaly detection result less accurate. Therefore, the embodiment of the present invention determines the density distribution of each data by analyzing the differences in data volume, data value, and time interval at the same time node in each dimension, and obtains an anomaly evaluation index for adaptive adjustment of the data in combination with the differences in time synchronization and dense distribution of each data in different dimensions. The anomaly evaluation index is used to adaptively adjust the anomaly score of the anomaly detection result, so that the original relatively concentrated abnormal data features become more discrete, and then the local density is smaller, thereby reducing the possibility of highly concentrated abnormal data being misdetected as normal data.
[0094] An embodiment of an anti-theft system for a smart door lock:
[0095] This embodiment provides an anti-pry system for a smart door lock, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of an anti-pry method for a smart door lock are implemented. Since an anti-pry method embodiment for a smart door lock has been described in detail, it will not be described in detail here.
[0096] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for preventing prying of a smart door lock, characterized in that: The method comprises the following steps: Collect door lock interaction data of each dimension when there is interactive operation of the smart door lock in each set time period every day; The data density of each door lock interaction data in each dimension in each set time period of each day is obtained based on the difference in data volume distribution between the door lock interaction data in each dimension in the same set time period of each day and the door lock interaction data in the same dimension in the same set time period of adjacent days, the time distribution difference between the door lock interaction data, and the data value difference; According to the time distribution difference between the door lock interaction data of each dimension and other dimensions in each set time period of each day, and the difference between the data density of each door lock interaction data in each dimension and the overall dense distribution of data in each dimension, the abnormal evaluation index of each door lock interaction data in each dimension in each set time period of each day is obtained; The anomaly evaluation index is used to adjust the anomaly score of outlier detection for each door lock interaction data in each dimension in each set time period of each day, and the anomaly detection result of the door lock is obtained according to the adjusted anomaly score; The data density of each door lock interaction data in each dimension in each set time period of each day is obtained based on the difference between the data volume distribution of the door lock interaction data in each dimension in each set time period of each day and the door lock interaction data in the same dimension in the same set time period of adjacent days, the time distribution difference and the data value difference between the door lock interaction data, specifically including: Record any door lock interaction data of any dimension in any set time period in any day as selected door lock interaction data, and record the same set time period of each day in the day number neighborhood of the any day as the reference set time period in the reference day; Obtaining a first coefficient of the selected door lock interaction data according to the difference between the total number of door lock interaction data within the set time period where the selected door lock interaction data is located and the total number of door lock interaction data of the same dimension as the selected door lock interaction data within the reference set time period in each reference day; Obtaining a second coefficient of the selected door lock interaction data according to a time distribution difference and a data value difference between the selected door lock interaction data and other door lock interaction data of the same dimension within a set time period where the selected door lock interaction data is located; Obtaining the data density of the selected door lock interaction data according to the first coefficient and the second coefficient, wherein the first coefficient and the second coefficient are both positively correlated with the data density; The method for obtaining the first coefficient of the selected door lock interaction data is specifically as follows: The x-th door lock interaction data in the k-th dimension in the t-th set time period on the i-th day is used as the selected door lock interaction data, and the calculation formula of the first coefficient of the selected door lock interaction data is: Among them, α1 represents the first coefficient of the selected door lock interaction data, N represents the number of days in the neighborhood of the i-th day, Q k (i, t) represents the number of all door lock interaction data in the kth dimension within the tth set time period on the i-th day, Q k (in,t) represents the number of all door lock interaction data in the kth dimension in the tth set time period on the inth day; The method for obtaining the second coefficient of the selected door lock interaction data is specifically as follows: Among them, α2 represents the second coefficient of the selected door lock interaction data, represents the mean of the difference between the selected door lock interaction data and each other door lock interaction data in the kth dimension within the tth set time period on the i-th day, N0 represents the total number of door lock interaction data in the kth dimension within the tth set time period on the i-th day, M0 represents the set of all data except the selected door lock interaction data in the kth dimension within the tth set time period on the i-th day, represents the time interval between the x-th door lock interaction data and the u-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, It represents the time interval between the x-th door lock interaction data and the v-th door lock interaction data in the k-th dimension within the t-th set time period on the i-th day, u≠v, and u,v∈M0, ε is the preset hyperparameter.
2. The anti-theft method of a smart door lock according to claim 1, characterized in that: According to the time distribution difference between the door lock interaction data of each dimension and other dimensions in each set time period of each day, and the difference between the data density of each door lock interaction data of each dimension and the overall dense distribution of data in each dimension, the abnormal evaluation index of each door lock interaction data of each dimension in each set time period of each day is obtained, which specifically includes: Record any door lock interaction data of any dimension in any set time period in any day as target door lock interaction data of the target dimension in the target set time period in any day; According to the difference between the time series value of the target door lock interaction data and the time series value of the door lock interaction data of each dimension within the target set time period, the weight coefficient of each dimension within the target set time period is obtained; According to the weight coefficient, the data density of the door lock interaction data in each dimension within the target setting time period and the average of the data density of all door lock interaction data in the same dimension, an abnormal evaluation index of the target door lock interaction data is obtained.
3. The anti-theft method of a smart door lock according to claim 2, characterized in that: The method for obtaining the abnormal evaluation index is specifically as follows: The yth door lock interaction data of the kth dimension in the rth set time period in the i-th day is used as the target door lock interaction data of the target dimension in the target set time period. The calculation formula of the abnormal evaluation index of the target door lock interaction data is: Among them, G i,r (k,y) represents the abnormal evaluation index of the target door lock interaction data, i represents the i-th day, r represents the r-th set time period, k represents the k-th dimension, y represents the y-th door lock interaction data, N1 represents the total number of all dimensions, T i,r (k,y) represents the time series value of the yth door lock interaction data in the kth dimension in the rth set time period in the i-th day, T i,r (m,y) represents the time series value of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day, W i,r (m,y) represents the data density of the yth door lock interaction data in the mth dimension in the rth set time period in the i-th day, Indicates the data density of all door lock interaction data in the mth dimension in the rth set time period on the i-th day, It represents the weight coefficient of the mth dimension within the target setting time period, and exp() represents an exponential function with the natural constant e as the base.
4. The anti-theft method of a smart door lock according to claim 1, characterized in that: The method of using the abnormal evaluation index to adjust the abnormal score of outlier detection for each door lock interaction data in each dimension in each set time period of each day specifically includes: The LOF outlier detection algorithm is used to obtain the local outlier factor of each door lock interaction data in each dimension in each set time period of each day, and recorded as the anomaly score of the door lock interaction data; The abnormal evaluation index of each door lock interaction data is normalized, and the product of the sum of the normalized abnormal evaluation index and the constant 1 and the corresponding abnormal score is used as the adjusted abnormal score of each door lock interaction data in each dimension in each set time period of each day.
5. The anti-theft method of a smart door lock according to claim 4, characterized in that: The obtaining of the abnormality detection result of the door lock according to the adjusted abnormality score specifically includes: The average of the adjusted anomaly scores corresponding to all dimensions at each moment in each set time period of each day is calculated and recorded as the characteristic anomaly score at each moment. When the characteristic anomaly score at each moment is greater than the preset anomaly threshold, there is a door lock anomaly at the corresponding moment.
6. The anti-theft method of a smart door lock according to claim 1, characterized in that: Each dimension corresponds to a type of door lock interaction data, and the door lock interaction data of each dimension includes communication frequency, response time, communication data packet size and command type.
7. An anti-theft system for a smart door lock, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the computer program is executed by the processor, the steps of the anti-theft method of the smart door lock as described in any one of claims 1 to 6 are implemented.
