Intelligent lock management method and system
Patent Information
- Application Number
- CN202411213335.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-14
Smart Images

Figure CN119314241A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart locks, and in particular to a smart lock management method and system. Background Art
[0002] In the current power, petrochemical, metallurgical and other industrial fields, production plants and production equipment need to be managed safely and efficiently. At present, various types of locks with anti-mistaken touch and their auxiliary kits are usually sampled to avoid mis-starting and shutting down operations, or to achieve "intelligent" equipment management. The above method does improve the safety of production management to a certain extent, but there are still certain technical defects and potential safety hazards. For example: At present, most locks in the industrial field still use lock cylinders with unified structure, which causes the key to open unauthorized equipment in other plants except the factory, which poses a serious safety hazard. In addition, there is a risk of illegal duplication of mechanical keys. If outsiders obtain a copy of the key through illegal means, illegally enter the plant, illegally use or steal equipment, this will cause serious hidden dangers to safe and efficient production. In addition, there are solutions on the market that use anti-mistaken keys and auxiliary control keys, two sets of keys, but these two keys cannot open each other. When opening the lock, two keys need to be used at the same time, which causes great inconvenience to management and use. Summary of the invention
[0003] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a smart lock management method and system, which can solve the problems mentioned in the background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a smart lock management method, which includes collecting first data, performing data preprocessing and feature extraction on the first data to obtain a first data feature vector, wherein the first data includes lock status data;
[0008] Assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permission according to the trained dynamic permission management model;
[0009] Improved white-box block cipher information encryption is used to encrypt keys of different permissions in different situations;
[0010] An abnormality detection mechanism is established using lock status data. Real-time lock data is detected according to abnormality detection rules. An alarm mechanism is triggered based on the detection results and the processing process is recorded.
[0011] As a preferred solution of the smart lock management method of the present invention, wherein: the first data includes user behavior data, lock status data and historical event data;
[0012] The user behavior data includes the opening and closing time of the lock, the user's usage frequency and the user's identity information;
[0013] The lock status data includes the real-time status of the lock, abnormal status detection, sensor and camera data;
[0014] The historical event data includes past unlocking records and abnormal event records;
[0015] The data preprocessing includes data cleaning and data normalization.
[0016] As a preferred solution of the intelligent lock management method of the present invention, the allocation of different opening permissions to different keys includes:
[0017] Different opening permissions include high-level keys, mid-level keys, and low-level keys;
[0018] The high-level key is a key that can open all types of locks, the middle-level key is a key that can only open locks in a certain factory area, and the low-level key is a key that can only open locks in a specific area;
[0019] The training of the dynamic rights management model includes:
[0020] Initialize model parameters θ;
[0021] Using the training dataset (x i ,y i ) Calculate the predicted value, the calculation formula is as follows:
[0022]
[0023] Among them, x i is the feature vector of the ith operation, y i is the corresponding true label, Predict values for dynamic permissions;
[0024] Define the improved loss function L, the calculation formula of the loss function is as follows:
[0025]
[0026] Among them, α, β, γ are weight parameters, h i is the historical feature vector;
[0027] Use the gradient descent optimization algorithm to minimize the loss function L and update the model parameters θ. The update formula is as follows:
[0028]
[0029] Among them, η is the machine learning rate, is the gradient of the loss function L with respect to the model parameters θ.
[0030] As a preferred solution of the intelligent lock management method of the present invention, wherein: the adjustment of the user's opening authority includes:
[0031] The weighted loss function after training and the attenuation caused by the time factor during the operation are added together to obtain the permission level probability value. The calculation formula is as follows:
[0032]
[0033] Where P(u, t) is the probability value of the permission level of user u at time t, ranging from [0, 1], N is the total number of operations, and w i is the weight of the ith operation, L is the improved loss function, y i is the true label of the ith operation, f(x i , θ) is the predicted value of the machine learning model, x i is the feature vector of the ith operation, θ is the machine learning model parameter, α1 is the time attenuation coefficient, and T is the current time.
[0034] As a preferred solution of the intelligent lock management method of the present invention, wherein: the improved white box block cipher encryption adopts a multi-scale transformation matrix as the underlying structure;
[0035] The steps of the improved white box block cipher encryption include:
[0036] The data to be encrypted is divided into groups, each group is represented as a one-dimensional vector of length 256 bits, which contains 8 elements, and each element contains 32 bits, that is,
[0037] X={X0,...,X7}
[0038] Wherein, X0, ..., X7 are elements of encrypted data;
[0039] The initial state is iterated and transformed for 10 rounds. Each round of transformation includes a nonlinear layer, a linear layer, and an affine layer. Specifically:
[0040]
[0041] Among them, X 0 is the password to unlock the lock, i is the number of iterations, ○ represents a composite function, X 10 is the transmitted ciphertext, The three-layer transformation functions are combined and then iterated for 10 rounds.
[0042] As a preferred solution of the intelligent lock management method of the present invention, the nonlinear layer includes applying 10 S boxes related to the key to perform nonlinear transformation on the state, each S box contains an independent primitive, and a lookup table with a five-layer ASASA structure is used to construct the relevant S boxes, that is,
[0043]
[0044] Among them, γ1 is a nonlinear transformation function, including the S-box structure, S(X i ) is the nonlinear transformation result of S-box;
[0045] The linear layer includes applying an 8×8 multi-scale transformation matrix to the state after the nonlinear layer processing to perform a linear transformation, that is,
[0046] M8=had(1 x , 3 x , 4 x , 5 x , 6 x , 8 x , b x , 7 x )
[0047] Among them, M8 is an 8×8 multi-scale transformation matrix, and had is the Hadamard transform;
[0048] The affine layer consists in performing an XOR operation on the constant related to the current round and the state in each round, that is,
[0049]
[0050] Among them, σ i is the affine transformation function of the i-th round, C i is the round constant vector in round i, each element C0 i ,…,C 7 i It is a 32-bit round constant.
[0051] As a preferred solution of the intelligent lock management method of the present invention, the abnormality detection mechanism includes:
[0052] Define anomaly detection rules, including unlocking attempts during off-hours, multiple unlocking attempts on the same lock within a short period of time, and unauthorized key use attempts;
[0053] According to the defined rules, the lock status data is analyzed to detect whether there is any behavior that meets the abnormal conditions;
[0054] When abnormal behavior is detected, the system automatically triggers the alarm mechanism;
[0055] Record all alarm events and handling processes, and generate logs for subsequent audit and analysis;
[0056] Take corresponding measures based on the type and severity of abnormal behavior.
[0057] In a second aspect, the present invention provides a smart lock management system, which includes: a data acquisition preprocessing module, a permission management module, a key encryption module and an anomaly detection module;
[0058] The data acquisition and preprocessing module is used to acquire first data, perform data preprocessing and feature extraction on the first data, and obtain a first data feature vector, wherein the first data includes lock status data;
[0059] The permission management module is used to assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permissions according to the trained dynamic permission management model;
[0060] The key encryption module is used to encrypt keys of different permissions in different situations using improved white box block cipher information encryption;
[0061] The anomaly detection module is used to establish an anomaly detection mechanism using the lock status data, detect the real-time lock data according to the anomaly detection rules, trigger an alarm mechanism according to the detection results and record the processing process.
[0062] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: the processor implements the steps of the smart lock management method when executing the computer program.
[0063] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the steps of the smart lock management method are implemented.
[0064] Compared with the prior art, the beneficial effect of the present invention is that by collecting the first data and performing data preprocessing and feature extraction, the first data feature vector is obtained, so that the system can accurately capture and analyze user behavior data, lock status data and historical event data, improve the utilization rate and accuracy of the data, and thus realize the dynamic management of the smart lock. Different keys are assigned different opening permissions, and a dynamic permission management model is constructed. By training the dynamic permission management model and adjusting the user's opening permissions according to the model output results, the refined management of permissions for different users is realized, and the security and flexibility of the system are improved. The keys of different permissions are encrypted by using improved white box block cipher information encryption, and the anti-attack and security of the encryption algorithm are enhanced by using multi-scale transformation matrix and S-box structure, ensuring the confidentiality and reliability of keys of different permissions. An abnormal detection mechanism is established through the lock status data, the lock status is monitored in real time according to the abnormal detection rules, and the alarm mechanism is triggered when abnormal behavior is detected, and the processing process is recorded and analyzed, so as to realize the closed-loop management of the lock, effectively improve the security of the system, and prevent unauthorized unlocking and potential security threats. In summary, the present invention realizes efficient, safe and dynamic management of smart locks through the synergistic effect of multiple key steps, and improves the management level and safety of industrial equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0066] Figure 1 A method flow chart of a smart lock management method and system provided by one embodiment of the present invention;
[0067] Figure 2 An internal structure diagram of a computer device of a smart lock management method and system provided by one embodiment of the present invention;
[0068] Figure 3 A key level diagram of a smart lock management method and system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned purposes, features and advantages of the present invention more understandable, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0070] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0071] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0072] Example 1
[0073] Reference Figure 1-Figure 2 , which is the first embodiment of the present invention, and provides a smart lock management method, including:
[0074] This application provides a method that can effectively solve the above-mentioned problems. Next, we will explain in detail how to implement the smart lock management method in combination with multiple embodiments;
[0075] Figure 1 A method flow chart of a smart lock management method and system is shown, including:
[0076] S1: Collect first data, preprocess and extract features of the first data, and obtain a first data feature vector;
[0077] Further, the first data includes user behavior data, lock status data and historical event data;
[0078] User behavior data includes the time the lock is opened and closed, the frequency of user use, and user identity information;
[0079] Lock status data includes real-time lock status, abnormal status detection, sensor and camera data;
[0080] Historical event data includes past unlocking records and abnormal event records;
[0081] Furthermore, data preprocessing includes data cleaning and data normalization;
[0082] Data cleaning includes:
[0083] Use interpolation methods to fill in missing data and filter outliers to ensure the authenticity and consistency of the data;
[0084] Data normalization includes,
[0085] All numerical features are normalized to a distribution with a mean of 0 and a standard deviation of 1, that is,
[0086]
[0087] Among them, x is the original eigenvalue, μ is the mean of the feature, and σ is the standard deviation of the feature;
[0088] Furthermore, feature extraction includes,
[0089] The preprocessed data is subjected to numerical feature extraction, and the extracted features are classified using one-hot encoding, and the classified features are combined into a behavioral data feature vector, that is,
[0090] X=φ(B,S,H)=[B features , S features , H features ]
[0091] Among them, X is the comprehensive feature vector, φ is the feature extraction function, B features is the feature extracted from the behavioral data, S features is the feature extracted from the lock state, H features Features extracted from historical data.
[0092] S2: assigning different opening permissions to different keys, constructing a dynamic permission management model, using the first data feature vector to train the dynamic permission management model, and adjusting the user's opening permission according to the trained dynamic permission management model;
[0093] Furthermore, different keys are assigned different opening permissions, including:
[0094] Different opening permissions include high-level keys, mid-level keys, and low-level keys;
[0095] High-level keys can open all types of locks, mid-level keys can only open locks in a certain factory area, and low-level keys can only open locks in a specific area.
[0096] Further, training the dynamic rights management model includes:
[0097] Initialize model parameters θ;
[0098] Using the training dataset (x i ,y i ) Calculate the predicted value, the calculation formula is as follows:
[0099]
[0100] Among them, x i is the feature vector of the ith operation, y iis the corresponding true label, Predict values for dynamic permissions;
[0101] Select a suitable loss function to evaluate the difference between the model prediction value and the true label, define the improved loss function L, and the calculation formula of the loss function is as follows:
[0102]
[0103] Among them, α, β, γ are weight parameters, h i is the historical feature vector;
[0104] Use the gradient descent optimization algorithm to minimize the loss function L and update the model parameters θ. The update formula is as follows:
[0105]
[0106] Among them, η is the machine learning rate, is the gradient of the loss function L with respect to the model parameter θ;
[0107] Further, adjust the user's opening permissions to include:
[0108] The trained weighted loss function and the output of the machine learning model are summed, and the attenuation caused by the time factor during the operation is considered to obtain the permission level probability value. The calculation formula is as follows:
[0109]
[0110] Where P(u, t) is the probability value of the permission level of user u at time t, ranging from [0, 1], N is the total number of operations, and w i is the weight of the ith operation, L is the improved loss function, y i is the true label of the ith operation, f(x i , θ) is the predicted value of the machine learning model, x i is the feature vector of the ith operation, θ is the machine learning model parameter, α1 is the time decay coefficient, and T is the current time;
[0111] It should be noted that the value range of P(u,t) is [0,1], which represents the probability value of the user's permission level, 0 represents no permission, and 1 represents the highest permission. This value is used to dynamically adjust the user's unlocking permission to ensure the security and flexibility of the system;
[0112] Among them, when P(u,t) takes the value in [0,0.5), it means that the user has low-level permissions and can use low-level keys;
[0113] When P(u,t) is in the range of [0.5,0.85), it means that the user has intermediate permissions and can use low-level keys and intermediate-level keys.
[0114] When P(u,t) takes the value of [0.85,1], it means that the user has high-level permissions and can use low-level keys, medium-level keys, and high-level keys.
[0115] Furthermore, a hierarchical permission management system is constructed with different opening permissions, including high-level, medium-level and low-level keys, so that the system can manage users with different permissions in a refined manner and prevent unauthorized operations, thereby improving the overall security of the system; by using feature vectors and real labels to train the dynamic permission management model, the user's usage behavior pattern can be accurately captured; the improved loss function, by introducing historical feature vectors and weight parameters, can more accurately evaluate the difference between the model prediction value and the real label, ensuring the high accuracy and robustness of the model; the use of the gradient descent optimization algorithm not only minimizes the loss function, but also improves the model's adaptability and prediction ability to dynamic environments by continuously updating the model parameters; when adjusting the user's opening permissions, the comprehensive The time attenuation coefficient is taken into consideration to ensure the relevance of dynamic adjustment of user permissions to current operations; by calculating the probability value of the user's permission level at the current time, the system can flexibly adjust the user's permission level, making user permission management more scientific and efficient; in addition, the value range of the permission level probability value is between [0,1], and the corresponding permission levels within different value ranges ensure that different users have appropriate permissions in different time periods. This refined permission management not only improves the security of the system, but also increases the convenience of user operation; in short, the present invention achieves the high security and flexibility of the intelligent lock system through an innovative dynamic permission management model and optimization algorithm, can effectively respond to complex industrial management needs, and significantly improves the practical value of the overall system.
[0116] S3: Use improved white-box block cipher information encryption to encrypt keys of different permissions in different situations;
[0117] Furthermore, the improved white-box block cipher encryption uses a multi-scale transformation matrix as the underlying structure;
[0118] The improved white-box block cipher encryption steps include:
[0119] The data to be encrypted is divided into groups, each group is represented as a one-dimensional vector of length 256 bits, which contains 8 elements, and each element contains 32 bits, that is,
[0120] X={X0,...,X7}
[0121] Wherein, X0, ..., X7 are elements of encrypted data;
[0122] The initial state is iterated and transformed for 10 rounds. Each round of transformation includes a nonlinear layer, a linear layer, and an affine layer. Specifically:
[0123]
[0124] Among them, X 0 is the password to unlock the lock, i is the number of iterations, ○ represents a composite function, X 10 is the transmitted ciphertext, To compound the three-layer transformation function, 10 rounds of iterations were performed;
[0125] The nonlinear layer includes applying 10 key-related S-boxes to perform nonlinear transformations on the state. Each S-box contains an independent primitive. The five-layer ASASA structure lookup table is used to construct the related S-boxes to ensure that even if a single primitive is stolen, the transmitted information is still secure, that is,
[0126]
[0127] Among them, γ1 is a nonlinear transformation function, including the S-box structure, S(X i ) is the nonlinear transformation result of S-box;
[0128] The linear layer involves applying an 8×8 multi-scale transformation matrix to the state after the nonlinear layer to perform a linear transformation, enhancing the diffusion and confusion of the data, that is,
[0129] M8=had(1 x , 3 x , 4 x , 5 x , 6 x , 8 x , b x , 7 x )
[0130] Among them, M8 is an 8×8 multi-scale transformation matrix, and had is the Hadamard transform;
[0131] The affine layer is included in each round, which XORs the constant related to the current round with the state, further increasing the complexity and security of the ciphertext, that is,
[0132]
[0133] Among them, σ i is the affine transformation function of the i-th round, C i is the round constant vector in round i, each element C0 i ,…,C 7 i It is a 32-bit round constant.
[0134] It should be noted that the present invention ensures the standardization of data processing and the universality of encryption operations by grouping the data to be encrypted and defining it as a one-dimensional vector of 256 bits; the S-box structure in the nonlinear layer uses 10 S-boxes related to the key and a five-layer ASASA structure lookup table, which enhances the complexity and security of the nonlinear transformation and prevents side channel attacks and differential attacks; the linear layer adopts an 8×8 multi-scale transformation matrix and Hadamard transform (Had) to increase data diffusion and confusion and prevent linear attacks; the affine layer increases the complexity and randomness of the ciphertext through an XOR operation in each round of iteration to prevent simple attacks and analysis; these designs improve the security, complexity and anti-attack capability of the encryption algorithm, solve various technical problems in the prior art from the aspects of data standardization, nonlinear transformation, linear diffusion and randomness increase, and significantly improve the practical application value of the encryption algorithm.
[0135] S4: Use the lock status data to establish an abnormality detection mechanism, detect the real-time lock data according to the abnormality detection rules, trigger the alarm mechanism according to the detection results and record the processing process.
[0136] Furthermore, the anomaly detection mechanism includes,
[0137] Define anomaly detection rules, including unlocking attempts during off-hours, multiple unlocking attempts on the same lock within a short period of time, and unauthorized key use attempts;
[0138] According to the defined rules, the lock status data is analyzed to detect whether there is any behavior that meets the abnormal conditions;
[0139] When abnormal behavior is detected, the system automatically triggers an alarm mechanism, including SMS notification, email alarm or direct alarm to security management personnel;
[0140] Record all alarm events and handling processes, and generate logs for subsequent audit and analysis;
[0141] Take appropriate measures based on the type and severity of abnormal behavior, such as automatic locking and permission adjustment.
[0142] Furthermore, the present embodiment also provides a smart lock management system, including: a data acquisition preprocessing module, a permission management module, a key encryption module and an abnormality detection module;
[0143] The data collection and preprocessing module is used to collect first data, perform data preprocessing and feature extraction on the first data, and obtain a first data feature vector;
[0144] The permission management module is used to assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permissions according to the trained dynamic permission management model;
[0145] The key encryption module is used to encrypt keys of different permissions in different situations using improved white box block cipher information encryption;
[0146] The anomaly detection module is used to establish an anomaly detection mechanism using lock status data, detect real-time lock data according to anomaly detection rules, trigger an alarm mechanism based on the detection results and record the processing process.
[0147] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 2 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a comprehensive evaluation method suitable for orderly access of large-scale distributed power sources is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse.
[0148] This embodiment further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented: collecting first data, performing data preprocessing and feature extraction on the first data to obtain a first data feature vector, wherein the first data includes lock status data;
[0149] Assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permission according to the trained dynamic permission management model;
[0150] Improved white-box block cipher information encryption is used to encrypt keys of different permissions in different situations;
[0151] The lock status data is used to establish an abnormality detection mechanism, the real-time lock data is detected according to the abnormality detection rules, and the alarm mechanism is triggered according to the detection results and the processing process is recorded.
[0152] Example 2
[0153] Reference Figure 1 - Figure 2 , which is the second embodiment of the present invention, and this embodiment provides a smart lock management method. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0154] This example aims to verify the effectiveness and innovation of a smart lock management method based on an improved white box block cipher encryption method. The experiment uses usage data of multiple users to evaluate the effectiveness of the system's dynamic permission management model, encryption method, and anomaly detection mechanism.
[0155] First, collect user behavior data, lock status data, and historical event data. User behavior data includes the user's unlocking and locking time, usage frequency, and user identity information; lock status data includes real-time status (normal or abnormal), sensor data, and camera data; historical event data includes past unlocking records and abnormal event records. After the data is cleaned and normalized, feature extraction is performed to obtain the first data feature vector for training the dynamic permission management model.
[0156] Different keys are assigned different opening permissions to build a dynamic permission management model. The model is trained using the first data feature vector, and the prediction value is calculated using the training data set. The user's opening permissions are finally adjusted by defining an improved loss function and minimizing the loss function using a gradient descent optimization algorithm.
[0157] The improved white box block cipher information encryption is used to encrypt the keys of different permissions. The encryption process includes grouping the data and performing 10 rounds of iterative transformations. Each round of transformation includes a nonlinear layer, a linear layer, and an affine layer to ensure data security.
[0158] By collecting real-time lock status data, an abnormality detection mechanism is established. According to the defined abnormality detection rules, the lock data is detected in real time, the alarm mechanism is triggered and the processing process is recorded.
[0159] Table 1 Experimental data of intelligent lock management method
[0160]
[0161] From the experimental data table, we can see that different users show different behavioral characteristics when using the smart lock system. The following is a detailed analysis of the experimental data:
[0162] The difference between the opening and closing time of users is obvious. For example, the opening time of user C is 7 minutes and the closing time is 4 minutes, while the opening and closing time of user D are both 1 minute. Through these data, the user's usage habits can be analyzed and their permission levels can be adjusted. For example, user C is assigned to the intermediate permission due to the longer opening time and medium usage frequency, while user D is assigned to the advanced permission due to the shorter opening and closing time and higher usage frequency.
[0163] The frequency of use of users directly affects their permission level. Users A and D are assigned high-level permissions due to their high usage frequency (5 times / day and 7 times / day); user E is assigned low-level permissions due to its low usage frequency (4 times / day). This shows that the system can effectively adjust the permission level of users according to their usage habits and improve management efficiency.
[0164] User B and User E experienced abnormal conditions during use, 2 and 3 times respectively. Through the abnormality detection mechanism, the system can promptly detect and record these abnormal events, trigger the alarm mechanism, and ensure the safety of the lock. For example, due to the large number of abnormal conditions, the authority level of User B was downgraded to intermediate; the authority level of User E was even lower, indicating that the system has a high sensitivity and responsiveness to abnormal behavior.
[0165] From the perspective of the allocation of permission levels, the system can reasonably allocate permission levels for different users to ensure security and flexibility. User A and User D are assigned high-level permissions because their behavior data meets the requirements of high-level permissions; User B and User C are assigned medium-level permissions because their behavior data meets the requirements of medium-level permissions; User E is assigned low-level permissions due to his behavior data and the number of abnormalities.
[0166] In summary, the experimental data proves that the intelligent lock management method based on the improved white-box block cipher encryption method has significant innovation and advantages in practical applications. Through the dynamic permission management model, improved encryption method and anomaly detection mechanism, the system can effectively adjust user permissions, ensure data security, and detect abnormal behaviors in a timely manner, ultimately improving the security and efficiency of lock management.
[0167] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0168] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0173] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A smart lock management method, characterized in that: The method comprises collecting first data, performing data preprocessing and feature extraction on the first data to obtain a first data feature vector, wherein the first data comprises lock status data; Assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permission according to the trained dynamic permission management model; Improved white-box block cipher information encryption is used to encrypt keys of different permissions in different situations; The lock status data is used to establish an abnormality detection mechanism, and the real-time lock data is detected according to the abnormality detection rules. The alarm mechanism is triggered according to the detection results and the processing process is recorded.
2. The smart lock management method according to claim 1, characterized in that: The first data includes user behavior data, lock status data and historical event data; The user behavior data includes the opening and closing time of the lock, the user's usage frequency and the user's identity information; The lock status data includes the real-time status of the lock, abnormal status detection, sensor and camera data; The historical event data includes past unlocking records and abnormal event records; The data preprocessing includes data cleaning and data normalization.
3. The smart lock management method according to claim 2, characterized in that: The allocation of different opening permissions to different keys includes: Different opening permissions include high-level keys, mid-level keys, and low-level keys; The high-level key is a key that can open all types of locks, the middle-level key is a key that can only open locks in a certain factory area, and the low-level key is a key that can only open locks in a specific area; The training of the dynamic rights management model includes: Initialize model parameters θ; Using the training dataset (x i ,y i ) Calculate the predicted value, the calculation formula is as follows: Among them, x i is the feature vector of the ith operation, y i is the corresponding true label, Predict values for dynamic permissions; Define the improved loss function L, the calculation formula of the loss function is as follows: Among them, α, β, γ are weight parameters, h i is the historical feature vector; Use the gradient descent optimization algorithm to minimize the loss function L and update the model parameters θ. The update formula is as follows: Among them, η is the machine learning rate, is the gradient of the loss function L with respect to the model parameters θ.
4. The smart lock management method according to claim 3, characterized in that: The adjustment of the user's opening permissions includes: The weighted loss function after training and the attenuation caused by the time factor during the operation are added together to obtain the permission level probability value. The calculation formula is as follows: Where P(u, t) is the probability value of the permission level of user u at time t, ranging from [0, 1], N is the total number of operations, and w i is the weight of the ith operation, L is the improved loss function, y i is the true label of the ith operation, f(x i , θ) is the predicted value of the machine learning model, x i is the feature vector of the ith operation, θ is the machine learning model parameter, α1 is the time attenuation coefficient, and T is the current time.
5. The smart lock management method according to claim 4, characterized in that: The improved white-box block cipher encryption uses a multi-scale transformation matrix as the underlying structure; The steps of the improved white box block cipher encryption include: The data to be encrypted is divided into groups, each group is represented as a one-dimensional vector of length 256 bits, which contains 8 elements, and each element contains 32 bits, that is, X={X0,...,X7} Wherein, X0, ..., X7 are elements of encrypted data; The initial state is iterated and transformed for 10 rounds. Each round of transformation includes a nonlinear layer, a linear layer, and an affine layer. Specifically: Among them, X 0 is the password to unlock the lock, i is the number of iterations, ○ represents a composite function, X 10 is the transmitted ciphertext, The three-layer transformation functions are combined and then iterated for 10 rounds.
6. The smart lock management method according to claim 5, characterized in that: The nonlinear layer includes applying 10 key-related S-boxes to perform nonlinear transformation on the state, each S-box contains an independent primitive, and the related S-boxes are constructed using a lookup table of a five-layer ASASA structure, that is, Among them, γ1 is a nonlinear transformation function, including the S-box structure, S(X i ) is the nonlinear transformation result of S-box; The linear layer includes applying an 8×8 multi-scale transformation matrix to the state after the nonlinear layer processing to perform a linear transformation, that is, M8=had(1 x ,3 x ,4 x ,5 x ,6 x ,8 x ,b x ,7 x ) Among them, M8 is an 8×8 multi-scale transformation matrix, and had is the Hadamard transform; The affine layer consists in performing an XOR operation on the constant related to the current round and the state in each round, that is, Among them, σ i is the affine transformation function of the i-th round, C i is the round constant vector in round i, each element C0 i ,…,C 7 i It is a 32-bit round constant.
7. The smart lock management method according to claim 6, characterized in that: The anomaly detection mechanism includes: Define anomaly detection rules, including unlocking attempts during off-hours, multiple unlocking attempts on the same lock within a short period of time, and unauthorized key use attempts; According to the defined rules, the lock status data is analyzed to detect whether there is any behavior that meets the abnormal conditions; When abnormal behavior is detected, the system automatically triggers the alarm mechanism; Record all alarm events and handling processes, and generate logs for subsequent audit and analysis; Take corresponding measures based on the type and severity of abnormal behavior.
8. A smart lock management system, based on the smart lock management method according to any one of claims 1 to 7, characterized in that: Including data collection preprocessing module, authority management module, key encryption module and anomaly detection module; The data acquisition and preprocessing module is used to acquire first data, perform data preprocessing and feature extraction on the first data, and obtain a first data feature vector, wherein the first data includes lock status data; The permission management module is used to assign different opening permissions to different keys, build a dynamic permission management model, use the first data feature vector to train the dynamic permission management model, and adjust the user's opening permissions according to the trained dynamic permission management model; The key encryption module is used to encrypt keys of different permissions in different situations using improved white box block cipher information encryption; The anomaly detection module is used to establish an anomaly detection mechanism using the lock status data, detect the real-time lock data according to the anomaly detection rules, trigger an alarm mechanism according to the detection results and record the processing process.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the smart lock management method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the smart lock management method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Smelting control method, device and equipment based on TinyML and medium
CN120469320A
TinyML-based smelting control method, device, equipment and medium
CN120469320B
Data analysis communication security monitoring system and method based on big data
CN120582875A