AI-based electronic lock dynamic risk self-adaptive lock control method
By analyzing power waveforms and vibration spectra using AI, differentiating between mechanical vibration and electromagnetic interference scenarios, constructing migration probability maps, and adjusting protection strategies in real time, the problem of lag in traditional electronic locks against mechanical vibration attacks is solved, thus improving the security and flexibility of electronic locks.
Patent Information
- Application Number
- CN202511511642.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-10-22
AI Technical Summary
Traditional electronic locks lack the ability to predict malicious attack paths associated with mechanical vibrations, resulting in a lag in security protection and difficulty in intercepting covert mechanical vibration-related attacks.
The AI-based dynamic risk adaptive locking method for electronic locks identifies power glitches associated with mechanical vibrations by collecting power supply voltage waveforms and analyzing vibration spectra, distinguishes register disturbance types, constructs a migration probability map, and adjusts protection strategies in real time to achieve adaptive locking.
It effectively distinguishes between mechanical vibration and electromagnetic interference scenarios, strengthens protection for high-risk registers, identifies potential attack paths in advance, flexibly adjusts protection strategies, and enhances the security and adaptability of electronic locks in complex mechanical coupling scenarios.
Smart Images

Figure CN120995316B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic lock security control, and particularly relates to an AI-based dynamic risk adaptive lock control method for electronic locks. BACKGROUND
[0002] Current electronic locks have been widely used in smart home, financial security, public facility management and other scenarios, but the cascading risk caused by mechanical vibration has become a key problem restricting the security performance thereof.
[0003] Traditional electronic locks lack the ability to predict malicious attack paths associated with mechanical vibration. In actual application, some malicious attackers will use the power disturbance and register bit flip vulnerability caused by the mechanical vibration of the electronic lock to induce abnormal migration of the core state node of the electronic lock through specific operations, and finally break through the lock control protection. The passive protection mode of the traditional electronic lock cannot intercept the concealed mechanical vibration associated attack, so that the electronic lock is easy to be broken through when facing such attack, and the security protection has obvious lag.
[0004] Therefore, the present application provides an AI-based dynamic risk adaptive lock control method for electronic locks. SUMMARY
[0005] The present application aims to provide an AI-based dynamic risk adaptive lock control method for electronic locks to solve the above background problems.
[0006] The object of the present application can be achieved by the following technical solutions:
[0007] The AI-based dynamic risk adaptive lock control method for electronic locks comprises the following steps:
[0008] Collecting the power voltage waveform of the electronic lock and extracting the power glitch feature, obtaining the vibration frequency spectrum for similarity analysis to obtain the similarity, determining whether it is a mechanical vibration associated power glitch based on the power glitch feature and the similarity, and classifying the power disturbance scene based on the determination result;
[0009] Obtaining the bit flip probability distribution of the electronic lock register under all power disturbance scenes, distinguishing the register disturbance type based on the bit flip probability distribution, and formulating the differential parity check and layered mirror storage strategy based on the register disturbance type;
[0010] Extracting the core state node from the register disturbance type, which is used to construct the migration probability graph of the core state node in combination with historical mechanical vibration associated attack cases, construct the path migration model in combination with the migration probability graph, and output the high-risk migration path;
[0011] Based on the high-risk migration path, the real-time path local matching analysis is carried out on the electronic lock, if the local matching is carried out, the phase-aware state machine freezing and vibration cycle monitoring are established, and the adaptive lock control protection strategy dynamic adjustment in the mechanical coupling scene is realized.
[0012] As a further scheme of the application: the way of determining whether it is a mechanical vibration related power glitch is:
[0013] Based on the similarity of the vibration spectrum, it is determined whether to trigger the mechanical vibration type glitch verification, if triggered, the drop depth, drop duration cycle of voltage drop and vibration spectrum similarity are obtained;
[0014] A three-dimensional criterion is established, if the drop depth, drop duration cycle of voltage drop and vibration spectrum similarity meet the three-dimensional criterion, it is a mechanical vibration related power glitch.
[0015] As a further scheme of the application: the similarity of the vibration spectrum is obtained in the following way:
[0016] In the drop duration cycle, the vibration signal is synchronously collected and the vibration acceleration sequence synchronized with the voltage sampling period is obtained;
[0017] The vibration acceleration sequence is preprocessed to obtain the vibration spectrum sequence;
[0018] A vibration spectrum reference library established by the electronic lock in different historical application scenarios is obtained, the similarity analysis of the vibration spectrum sequence and the vibration spectrum reference library in different scenarios is carried out to obtain the similarity.
[0019] As a further scheme of the application: the way of distinguishing the register disturbance type is:
[0020] The scene amplification coefficients of all registers are obtained, the scene amplification coefficients of all registers are classified by clustering algorithm to obtain high-risk registers and low-risk registers.
[0021] As a further scheme of the application: the way of obtaining the scene amplification coefficient of the register is:
[0022] The power disturbance scene is classified to obtain the mechanical vibration related power disturbance scene and the ordinary electromagnetic interference scene;
[0023] From the historical log data of the electronic lock, the total bit flip number, scene cycle number and bit number of the registers in different power disturbance scenes in the register group are extracted;
[0024] By constructing a bit flip probability equation, the total bit flip number, scene cycle number and bit number of the registers in different power disturbance scenes are input into the bit flip probability equation to obtain the bit flip probability of the registers corresponding to the power disturbance scene.
[0025] The ratio of bit flip probability of the mechanical vibration related power disturbance scene, the general electromagnetic interference scene and the normal working condition scene is calculated respectively to obtain a scene amplification coefficient.
[0026] As a further scheme of the present application, the output mode of the high-risk migration path is:
[0027] The migration probability graph of the mechanical vibration related scene is obtained through a Markov chain algorithm, a path migration model is constructed, and a high-risk migration path is output.
[0028] As a further scheme of the present application, the construction mode of the path migration model is:
[0029] Based on the characteristics of the mechanical coupling wave fluctuation moment, a fragile time window bound to the fluctuation moment is determined.
[0030] The migration probability graph and the fragile time window, and the node attack weight of the initial node set are obtained.
[0031] Based on the migration probability graph and the fragile time window, the node attack weight of the initial node set is combined to perform a forward scan of the Markov chain to obtain the node migration probability under different time lengths.
[0032] Based on the node migration probability under different time lengths, a high-risk migration path is screened.
[0033] As a further scheme of the present application, the mode of obtaining the migration probability graph is:
[0034] High-risk data blocks and low-risk data blocks in the differential parity check and hierarchical mirror storage strategy are obtained.
[0035] Core state nodes of the high-risk data blocks and the low-risk data blocks are extracted respectively, and the node attack weight of the core state nodes is extracted.
[0036] The node attack weight is associated with all the core state nodes to construct an initial node set.
[0037] The matching case number of the low-risk data blocks in the corresponding core state nodes and the matching case number of the high-risk data blocks in the corresponding core state nodes are obtained, and the migration probability of the low-risk and high-risk data blocks is obtained through a migration probability equation.
[0038] The initial node set is taken as a vertex, and the migration probability is taken as a directed edge weight to construct a migration probability graph of the mechanical vibration related scene.
[0039] As a further scheme of the present application, the mode of obtaining the node attack weight is:
[0040] Obtain the scene amplification coefficient of the low-risk data block and the high-risk data block, and perform normalization processing to obtain a node influence coefficient;
[0041] Obtain the tampering probability of each core state node in the historical attack case library, and combine the node influence coefficient corresponding to each core state node;
[0042] The tampering probability of each core state node is multiplied by the node influence coefficient to obtain the node attack weight of each node.
[0043] As a further scheme of the application, the real-time path local fitting analysis is performed in the following manner:
[0044] The complete migration path of the electronic lock is continuously monitored, and if the complete migration path of the current electronic lock locally fits the high-risk migration path, but does not reach the end point of the high-risk migration path, the vibration main frequency phase angle and the drop duration cycle of the current working condition of the electronic lock are extracted.
[0045] If the sampling points in the drop duration cycle of the electronic lock satisfy the mechanical coupling fluctuation time, and the vibration main frequency phase angle is in the sensitive interval, the state machine clock of the electronic lock is frozen, and the vibration cycle monitoring is started.
[0046] The beneficial effects of the application are as follows:
[0047] (1) In the power disturbance scene classification step, the power glitch features are extracted by collecting the electronic lock power voltage waveform, and the power glitch associated with mechanical vibration is determined by combining vibration frequency spectrum similarity analysis, and then the power disturbance scene is classified. Different scenes such as mechanical vibration associated type, ordinary electromagnetic interference type and normal working condition type can be effectively distinguished, the special disturbance caused by mechanical vibration and ordinary interference are reduced, accurate scene basis is provided for subsequent targeted lock control protection, protection deviation caused by scene misjudgment is reduced, and the effectiveness of electronic lock risk identification is improved from the source.
[0048] (2) In the register disturbance type distinction and storage strategy development step, the high-risk and low-risk registers are distinguished based on the bit flip probability distribution of the registers under each power disturbance scene, and the differential parity check and hierarchical mirror storage strategy is developed. Different risk levels of registers are protected by adaptive protection methods, which can not only strengthen the protection of high-risk registers to reduce the influence of bit flip, but also balance the storage efficiency and basic protection of low-risk registers, which can ensure the reliability of register data while reducing the resource waste caused by excessive protection, and is beneficial to improve the security and rationality of electronic lock core data storage;
[0049] (3) Extract the core state node from the register disturbance type, combine the historical mechanical vibration correlation attack case to construct the node migration probability graph, and then combine the fragile time window to construct the path migration model by algorithm and output the high-risk migration path. This step can identify the malicious attack path that the electronic lock may face in the mechanical vibration scene in advance, realize the proactive prediction of the potential risk path, provide a clear direction for the subsequent timely interception of malicious attack behavior, and enhance the forward-looking prevention and control ability of the electronic lock to the risk.
[0050] (4) In the adaptive lock control protection strategy adjustment step, based on the high-risk migration path, the local fitting analysis of the real-time path of the electronic lock is carried out, the phase-aware state machine freezing and vibration cycle monitoring are established when fitting, and the protection strategy is dynamically adjusted. This process can flexibly adjust the protection measures according to the real-time working condition and risk state of the electronic lock, timely start the protection action such as state machine freezing when there is risk, and reasonably restore normal operation after confirming safety, which not only effectively intercepts malicious risks, but also reduces the influence of fixed protection strategy on the normal use of the electronic lock, and improves the flexibility and adaptability of the protection of the electronic lock in the complex mechanical coupling scene. BRIEF DESCRIPTION OF DRAWINGS
[0051] The application will be further described below with reference to the drawings.
[0052] Figure 1 is the flow chart of the AI-based electronic lock dynamic risk adaptive lock control method of the application;
[0053] Figure 2 is the logic judgment diagram of whether the mechanical vibration type burr verification is triggered in the application;
[0054] Figure 3 is the module diagram of the AI-based electronic lock dynamic risk adaptive lock control system of the application. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0056] Embodiment 1
[0057] Please refer to Figure 1 The application is an AI-based electronic lock dynamic risk adaptive lock control method, which includes the following steps:
[0058] S1, collect the power voltage waveform of the electronic lock and extract the power glitch feature, obtain the vibration frequency spectrum for similarity analysis to obtain the similarity, determine whether it is a power glitch related to mechanical vibration based on the power glitch feature and the similarity, and classify the power disturbance scene based on the determination result;
[0059] The way of collecting the power voltage waveform of the electronic lock and extracting the power glitch feature is:
[0060] Preferably, in the sampling period, the voltage waveform output by the power supply of the electronic lock is collected by the analog-to-digital conversion unit of the electronic lock, the voltage waveform is preprocessed to obtain a purified voltage ;
[0061] The preprocessing includes time domain sliding average filtering and frequency domain low pass filtering.
[0062] Set the voltage identification range of the abnormal drop feature of the voltage, and cut the purified voltage based on the voltage identification range to obtain a voltage identification segment;
[0063] Calculate the start and end time of the voltage identification segment to obtain the drop duration period;
[0064] The drop depth equation is established as: The drop depth of the voltage drop is obtained , wherein is the minimum voltage in the drop duration period, is the rated voltage of the power supply of the electronic lock, and k represents the voltage sampling sequence number;
[0065] The drop depth and the drop duration period are taken as the power glitch feature;
[0066] Wherein, n is the sampling sequence number corresponding to the start time of the voltage identification segment, and m is the sampling sequence number corresponding to the end time of the voltage identification segment, and the sampling sequence number is determined by the sampling period of the analog-to-digital conversion unit;
[0067] The way of obtaining the vibration frequency spectrum of the electronic lock and performing similarity analysis with the vibration frequency spectrum of the historical scene to obtain the similarity is:
[0068] In the drop duration period, the vibration signal is synchronously collected by the built-in three-axis acceleration sensor in the electronic lock in the drop duration period, and the vibration acceleration sequence synchronized with the voltage sampling period is obtained;
[0069] The vibration acceleration sequence is preprocessed (fast Fourier transform) to obtain a vibration frequency spectrum sequence;
[0070] A vibration frequency spectrum reference library is established for the electronic lock under different historical application scenarios, and similarity analysis is performed on the vibration frequency spectrum sequence and the vibration frequency spectrum reference library in different scenarios to obtain the similarity;
[0071] It should be noted that the correlation coefficient of the spectrum envelope is used to calculate the similarity of the vibration spectrum sequence and the vibration spectrum sequence in different scenarios. The closer the correlation coefficient is to 1, the higher the similarity is.
[0072] The method for determining whether it is a power glitch associated with mechanical vibration based on the power glitch characteristics and the similarity is:
[0073] As shown in Figure 2 , if the similarity of the vibration spectrum is higher than or equal to the preset similarity value, the mechanical vibration type glitch verification is triggered to determine whether it is a power glitch associated with mechanical vibration;
[0074] If the similarity of the vibration spectrum is lower than the preset similarity value, the mechanical vibration type glitch verification is not triggered.
[0075] Preferably, the mechanical vibration type glitch verification is triggered in the following manner: the drop depth , the drop duration cycle , and the vibration spectrum similarity are combined to establish a three-dimensional criterion to determine whether it is a mechanical vibration associated glitch:
[0076] When , , and the similarity of the vibration spectrum and the similarity of the mechanical vibration scene reference spectrum is greater than the preset similarity value (such as 0.7), the three-dimensional criterion is established.
[0077] If the drop depth , the drop duration cycle , and the vibration spectrum similarity meet the three-dimensional criterion, it is determined to be a power glitch associated with mechanical vibration; otherwise, it is determined to be a voltage fluctuation caused by pure vibration interference.
[0078] wherein, , are the lower and upper limits of the effective recognition range of the drop depth, , are the lower and upper limits of the effective recognition range of the drop duration cycle, which are determined by the skilled person in the art through statistical analysis of measured data of mechanical vibration and pure vibration.
[0079] If it is a power glitch associated with mechanical vibration, the current scene is classified as a power disturbance scene associated with mechanical vibration.
[0080] It can be understood that the purpose of determining the power glitch associated with mechanical vibration is:
[0081] Objective I, to classify the power disturbance scenarios of electronic locks, prevent special power disturbances caused by mechanical vibration from being confused with ordinary electromagnetic interference and voltage fluctuations under normal working conditions. Based on the judgment result, the scenarios can be divided into mechanical vibration related type, ordinary electromagnetic interference type and normal working condition type. If the power glitch related to mechanical vibration cannot be identified, it will easily lead to misjudgment of the scenario, and the subsequent targeted protection scenario basis.
[0082] Objective II, to lay the foundation for subsequent analysis of register bit flip risk and development of differentiated protection strategies. Mechanical vibration related scenarios are one of the key scenarios that trigger register bit flips. Only by classifying power disturbance scenario types and then distinguishing high-risk and low-risk registers can we develop appropriate parity check and hierarchical mirror storage strategies. If this judgment is wrong, it will directly lead to deviation of subsequent register risk analysis and protection strategies from actual needs.
[0083] S2, obtain the bit flip probability distribution of the electronic lock register under all power disturbance scenarios, distinguish the register disturbance type based on the bit flip probability distribution, and develop differentiated parity check and hierarchical mirror storage strategies based on the register disturbance type;
[0084] Wherein, the way to obtain the bit flip probability distribution of the electronic lock register under all power disturbance scenarios and distinguish the register disturbance type based on the bit flip probability distribution is:
[0085] If it is a power glitch related to mechanical vibration, obtain the bit flip probability distribution of the register group of the electronic lock state machine under all power disturbance scenarios;
[0086] It should be noted that the register group includes: lock tongue drive, risk level, behavior mode register;
[0087] Wherein, the way to obtain the bit flip probability distribution of the register group of the electronic lock state machine under all power disturbance scenarios is:
[0088] Mark the power disturbance scenario as j, j=1 represents the mechanical vibration related power disturbance scenario (i.e. power glitch related to mechanical vibration), j=2 represents the ordinary electromagnetic interference scenario, and j=3 represents the normal working condition scenario;
[0089] It should be noted that the mechanical vibration related power disturbance scenario: the power bus voltage drop depth and duration period need to fall within the mechanical vibration related judgment range value, and the similarity of the synchronously collected vibration spectrum and the mechanical vibration scenario historical benchmark library is higher than the preset threshold;
[0090] Normal electromagnetic interference scene: the power bus has voltage abnormal drop, but the drop characteristics do not meet the judgment range value (i.e. the judgment range formed by the upper and lower limits of the effective recognition range of drop depth and drop duration); and the vibration spectrum matches the electromagnetic interference scene reference library, and the similarity with the mechanical vibration scene reference library is lower than the threshold value;
[0091] Normal working condition scene: the power bus voltage is stable, and does not meet the abnormal drop voltage fluctuation; at the same time, the vibration signal is in the vibration range of the normal working of the electronic lock;
[0092] From the historical log data of the electronic lock, the total bit flip number of the registers in the register group in different power disturbance scenes is extracted , scene cycle number , bit number of the register ;
[0093] Wherein, i is the number of the register;
[0094] By constructing a bit flip probability equation: the bit flip probability of different registers i corresponding to power disturbance scene j is obtained ;
[0095] The ratio of the bit flip probability of the mechanical vibration related power disturbance scene and the normal electromagnetic interference scene to the bit flip probability of the normal working condition scene is calculated respectively, to obtain the scene amplification coefficient;
[0096] It can be understood that the role of obtaining the scene amplification coefficient is:
[0097] Role one, support register disturbance type distinction, and clear risk level division basis; the scene amplification coefficient is the ratio of the bit flip probability of the mechanical vibration related power disturbance scene and the normal electromagnetic interference scene to the bit flip probability of the normal working condition scene, which can directly reflect the amplification degree of different disturbance scenes on the register bit flip risk. Through clustering algorithm for classification of the scene amplification coefficients of all registers, high-risk registers and low-risk registers are distinguished, and clear risk level division standard is provided for subsequent targeted development of protection strategy;
[0098] Role two, provide data for core state node attack weight calculation; node attack weight needs to normalize the scene amplification coefficients of low-risk and high-risk data blocks to obtain node influence coefficient, and then multiply the core state node tampering probability. The accuracy of the scene amplification coefficient directly determines the rationality of the node influence coefficient, and then affects the calculation result of the node attack weight. The node attack weight is an important parameter for constructing the initial node set and the migration probability graph, and provides data support for subsequent high-risk migration path prediction;
[0099] Action three, to ensure the adaptability of protection strategy and actual risk scenario; the scenario amplification coefficient reflects the risk difference of different disturbance scenarios on the register. Based on this, the high-risk and low-risk registers are differentiated, and the subsequent differentiated parity check and hierarchical mirror storage strategy can match the actual risk. If there is no scenario amplification coefficient, the low-risk register is over-protected, which wastes resources, and the high-risk register is not protected enough, which cannot cope with core risk scenarios such as mechanical vibration;
[0100] The scenario amplification coefficients of all registers are obtained, and the K-Means clustering algorithm in the artificial intelligence algorithm (AI) is used to classify the scenario amplification coefficients of all registers to obtain high-risk registers and low-risk registers;
[0101] Those skilled in the art can understand that the scenario amplification coefficient corresponding to each register i forms a coefficient data set to be clustered;
[0102] K-Means unsupervised clustering is performed on the coefficient data set of each register: the number of clusters is set to 2 (corresponding to high-risk and low-risk categories), and the K-Means algorithm automatically divides the coefficient data set of the register into two clusters through iterative optimization (randomly initializing cluster centers, calculating the distance from data points to cluster centers and assigning clusters, updating cluster centers until the center is stable). Due to the more significant amplification of the bit flip risk of high-risk registers by mechanical vibration, the cluster containing the coefficient data set with a larger value after clustering corresponds to high-risk registers, i.e., high-risk registers; the disturbance type of the other cluster is low-risk, corresponding to low-risk registers;
[0103] Among them, the way to develop differentiated parity check and hierarchical mirror storage strategies based on register disturbance types is:
[0104] Preferably, the parity check storage strategy for coupled scenarios is developed in the following way:
[0105] For high-risk registers (such as lock tongue drive registers, which are directly affected by mechanical vibration), a 4-bit data block + 2-bit cross-register group staggered check bit architecture is used:
[0106] The check bits of the 4-bit data block are stored in the idle bit segment of the adjacent low-risk register (such as the behavior pattern register), which takes advantage of the stability of the low-risk register in the mechanical correlation scenario to reduce the damage to the check bits caused by local faults of the high-risk register;
[0107] For low-risk registers, an 8-bit data block + 1-bit regular parity check bit balanced storage efficiency and basic error correction capability is used;
[0108] The power supply waveform of the mechanical vibration associated power disturbance scene is analyzed for mechanical coupling fluctuation timing. If it is at the mechanical coupling fluctuation moment, a vibration and abnormality associated mirror storage strategy is constructed in combination with the parity check storage strategy;
[0109] It should be noted that the mechanical coupling fluctuation timing analysis is as follows: after determining that it is a mechanical vibration associated power disturbance, the voltage waveform drop duration period (starting sampling point n to ending point m) is immediately locked, and the power bus voltage waveform and three-axis acceleration sensor vibration signal in this period are synchronously extracted; 50Hz power frequency filtering is performed on the voltage waveform to eliminate power grid interference, and sliding window FFT is used to extract the vibration main frequency component to establish time-aligned voltage-vibration bimodal data flow;
[0110] Based on the time-aligned data flow, the phase correlation between voltage instantaneous fluctuation and vibration acceleration is calculated: taking the voltage drop valley point as the reference, the time offset Δt of the nearest vibration peak is detected, and the normalized phase difference Δθ=360°×(Δt / T) is calculated in combination with the vibration main frequency period T. At the same time, the energy ratio of the voltage waveform in the 10-100Hz mechanical sensitive frequency band is calculated, and when the energy ratio is more than 40%, it is marked as strong mechanical coupling characteristic;
[0111] If the sampling points of the drop duration period simultaneously satisfy the phase difference Δθ<45° and the low-frequency energy ratio >40%, the sampling points are taken as the mechanical coupling fluctuation moment; otherwise, they are classified as ordinary electromagnetic disturbance events; the determination result is pushed to the S4 protection engine in real time to trigger the phase-aware protection strategy;
[0112] Among them, the way to construct the vibration and abnormality associated mirror storage strategy is:
[0113] If it is at the power supply abnormal moment, the risk level, behavior mode and sensor data of the electronic lock are split according to the register type, the data of high-risk registers (such as lock tongue driving registers) is packaged into high-risk data blocks, the data of low-risk registers (such as behavior mode registers) is packaged into low-risk data blocks, and the layered mirror data is formed by integration;
[0114] The high-risk data block adopts the enhanced check matching the register architecture: the 4bit data block+2bit cross-register group staggered check bit is used, and an additional 1bit global check bit (for the entire high-risk data block) is added to improve the multi-bit error repair capability;
[0115] The low-risk data block adopts 8bit data block+1bit regular parity check bit to maintain storage efficiency;
[0116] The mirror image data is copied to obtain main mirror image data (original before mirror image data replication) and redundant mirror image data (copy after mirror image data replication), the high-risk data block and the low-risk data block are stored in the MCU built-in Flash regular area according to the original check format, and the physical address of the high-risk data block is separated from the low-risk data block by >=2 storage pages (to reduce the influence of local faults on the two types of data at the same time);
[0117] For the storage of redundant mirror image data, the main vibration frequency of mechanical vibration is extracted, the Flash storage unit erasing timing frequency is adjusted to an integer multiple of the non-main vibration frequency, and the high-risk data block redundant image additionally uses 16-bit CRC check for every 128 bits, and the low-risk data block redundant image remains the basic check.
[0118] Embodiment 2
[0119] As Figure 1 shown, the application is an AI-based electronic lock dynamic risk adaptive lock control method, which further comprises the following steps:
[0120] S3, extracting core state nodes in the register disturbance type, constructing a migration probability graph of the core state nodes combined with historical mechanical vibration related attack cases, constructing a path migration model combined with the migration probability graph, and outputting a high-risk migration path;
[0121] Among them, the way of extracting core state nodes in the register disturbance type, combined with historical mechanical vibration related attack cases to construct a migration probability graph of the core state nodes is:
[0122] From the high-risk data block, the lock tongue extension state and the drive motor power threshold are extracted as core state nodes;
[0123] Preferably, the lock tongue extension state of the electronic lock from the high-risk data block And the power threshold of the drive motor of the electronic lock ;
[0124] Among them, the lock tongue extension state includes: 01 - locked state, 00 - half-locked state, 10 - unlocked state;
[0125] The normal value of the power threshold of the drive motor is 2A, and the abnormal value is 0.5A;
[0126] From the low-risk data block, the request verification state of unlocking and the user permission registration are extracted as core state nodes;
[0127] Preferably, the request verification state of unlocking is obtained : 001 - to be verified, 101 - verification passed, 010 - verification failed;
[0128] The user permission level 11-administrator, 01-common user, 00-visitor
[0129] Obtain the historical attack case library of electronic locks, extract matching cases related to mechanical vibration, and extract complete attack links from the matching cases;
[0130] It should be noted that the vibration spectrum reference library is obtained through the original data collected by a three-axis acceleration sensor in a typical mechanical vibration scene;
[0131] Obtain the scene amplification coefficient of low-risk data blocks and high-risk data blocks, and perform normalization processing to obtain the node influence coefficient;
[0132] Obtain the tampering probability of each core state node in the historical attack case library, and combine the node influence coefficient corresponding to each core state node;
[0133] The product of the tampering probability of each core state node and the node influence coefficient will be the node attack weight of each node ;
[0134] Associate the node attack weight with all core state nodes to construct an initial node set ;
[0135] Based on the extracted matching cases, extract the number of matching cases of low-risk data blocks in the corresponding core state nodes and the number of matching cases of high-risk data blocks in the corresponding core state nodes in the matching cases;
[0136] Based on the number of matching cases of low-risk data blocks in the corresponding core state nodes and the number of matching cases of high-risk data blocks in the corresponding core state nodes, through the migration probability equation: Obtain the migration probability of low-risk and high-risk data blocks;
[0137] wherein, represents the core state node where the migration starts, x is the node identifier, and the core state node corresponding to the low-risk or high-risk data block. For example:
[0138] , , which belongs to specific forms;
[0139] represents the core state node where the migration target is, y is the node identifier, and the core state node corresponding to the low-risk or high-risk data block. For example: , , which belong to specific forms;
[0140] It can be understood that the migration probability of obtaining the low-risk and high-risk data blocks is physically based on the historical mechanical vibration correlation attack case statistics, quantitatively reflects the actual possibility of state transition between the core state nodes of the low-risk data blocks and the high-risk data blocks, reflects the dynamic change rule of the core nodes of the data blocks of different risk levels in the risk scene, provides a concrete numerical basis for subsequent construction of the migration probability graph of the mechanical vibration correlation scene and prediction of the high-risk migration path of malicious attacks, embodies the tendency of the nodes of the two types of data blocks from one state to another state, and supports the development of subsequent targeted lock control protection strategies;
[0141] The migration probability graph of the mechanical vibration correlation scene is constructed with the initial node set N as the vertex and the migration probability as the directed edge weight.
[0142] The vulnerable time window bound to the fluctuation moment is obtained, and the path migration model is constructed by Markov chain algorithm based on the migration probability graph of the mechanical vibration correlation scene to output the high-risk migration path existing malicious exploitation.
[0143] The way of constructing the path migration model is:
[0144] S301, based on the characteristics of the mechanical coupling fluctuation moment, the vulnerable time window bound to the fluctuation moment is determined.
[0145] Preferably, the historical mechanical coupling fluctuation moment is taken as the starting point of the vulnerable time window, a plurality of fixed-length monitoring periods are set, and the probability of the high-risk data block node being tampered in all monitoring periods is obtained.
[0146] If the probability of the high-risk data block node being tampered is lower than the preset threshold, the length from the starting point to the end time of the current monitoring period is obtained, and the end point of the fluctuation time window is determined based on the starting point and the length.
[0147] Based on the starting point and the end point of the fluctuation time window, the vulnerable time window is constructed.
[0148] The sampling period of the analog-digital conversion unit is obtained, and the sampling period is calculated as the scanning step length of the Markov chain algorithm.
[0149] S302, based on the migration probability graph and the vulnerable time window, the forward scanning of the Markov chain is performed combined with the node attack weight of the initial node set, and the node migration probability under different step lengths is obtained.
[0150] Preferably, the migration probability graph of the mechanical vibration associated scene, the fragile time window are firstly used to determine the node probability vector (4-dimensional vector, the initial value is obtained by normalizing the node attack weight) and the migration probability matrix (4*4 square matrix, the matrix element is the direct migration probability of the core state node, which is taken from the migration probability graph); then the forward scanning is iteratively performed according to the scanning step: each step calculates the current time vector by the node probability vector of the previous time * the migration probability matrix, and at the same time, the matrix element corresponding to the high-risk node is modified by superimposing the mechanical vibration fragile coefficient (2.5 times); finally, the node probability vector under 30 steps, i.e., the node migration probability under different steps, is obtained.
[0151] It should be noted that the 2.5 times modification is obtained by the bit flip error rate experimental ratio of the scene without vibration and the scene with vibration by the person skilled in the art;
[0152] S303, based on the node migration probability under different steps, the high-risk migration path existing malicious exploitation is screened;
[0153] Preferably, based on the 30-step node probability vector, the complete migration path of all initial normal state, intermediate transition state and final malicious state is extracted;
[0154] For example: the complete migration path of the lock tongue locking (high-risk normal) - motor 0.5A (high-risk abnormal) - verification (low-risk) - lock tongue unlocking (high-risk malicious);
[0155] Three verifications are performed on each path:
[0156] Verification one: the total migration probability is obtained by multiplying the migration probability of each node in the path;
[0157] Verification two: whether the high-risk node abnormal state (such as motor 0.5A, lock tongue half lock or unlock) is included is checked;
[0158] Verification three: the attack weight of all nodes in the path is accumulated, and finally the path with the total migration probability ≥5%, the high-risk node abnormal state, and the node attack weight sum ≥0.8 is screened out, and the high-risk migration path existing malicious exploitation is formed by integration;
[0159] S4, based on the high-risk migration path, the real-time path local coincidence analysis of the electronic lock is performed, if the local coincidence is found, the phase-aware state machine freezing and vibration cycle monitoring are established, and the adaptive lock control protection strategy dynamic adjustment in the mechanical coupling scene is realized;
[0160] The way of performing the real-time path local coincidence analysis of the electronic lock based on the high-risk migration path is:
[0161] The complete migration path of the electronic lock is continuously monitored, if the complete migration path of the current electronic lock locally coincides with the high-risk migration path, but does not reach the end point of the high-risk migration path, the vibration main frequency phase angle and the drop duration cycle of the current working condition of the electronic lock are extracted;
[0162] The phase-aware state machine freezing and vibration cycle monitoring are established, and the adaptive lock control protection strategy dynamic adjustment in the mechanical coupling scene is realized in the following manner:
[0163] If the sampling point in the drop duration cycle of the electronic lock meets the mechanical coupling fluctuation moment, and the vibration main frequency phase angle is in the sensitive interval, the state machine clock of the electronic lock is frozen, and the vibration cycle monitoring is started;
[0164] It should be noted that the vibration main frequency phase angle calculated after the mechanical vibration signal is collected by the built-in three-axis acceleration sensor of the electronic lock, and the vibration main frequency component is extracted by the sliding window fast Fourier transform, falls into the specific phase range with the highest interference risk of the mechanical vibration to the core function (such as register data stability, state machine running) of the electronic lock, which is determined based on historical mechanical vibration correlation attack cases and measured data statistics. The definition of the specific phase range is directly related to the mechanical vibration energy transmission characteristics. When the phase angle is in this interval, the transmission efficiency of vibration energy to the power module, register group and other key components of the electronic lock is higher, and it is more likely to aggravate power glitch disturbance, cause register bit flip or abnormal migration of core state nodes, so the specific phase range is set as the sensitive interval;
[0165] Different adaptive control strategies of the electronic lock are formulated based on the monitoring results of the vibration cycle monitoring;
[0166] Preferably, the manner of formulating different adaptive control strategies of the electronic lock is as follows:
[0167] If the vibration cycle monitoring finds that the vibration main frequency phase is in the trough period of 180°-270°, and the end point of the high-risk migration path is not reached and the safety is confirmed by manual inspection, the clock freezing of the state machine is released, and the delayed key operation is executed;
[0168] The phase angle sensitive interval (180°-270°) is obtained by the correlation experiment of the vibration energy transmission efficiency simulation data by the person skilled in the art;
[0169] If the end point of the high-risk migration path is reached, it is determined that the electronic lock is in an irreversible malicious state, the safe state node data is read from the layered mirror image storage area, if the safe state node data is read successfully, whether the verification strategy needs to be adjusted is determined according to the vibration spectrum similarity analysis result;
[0170] If the strategy needs to be adjusted, the verification strategy of the register of the electronic lock is adjusted, if not, the basic verification is maintained;
[0171] The skilled person can understand that the way to adapt the differentiated checking strategy for the register is: if the vibration spectrum similarity shows that the mechanical vibration associated risk is aggravated, the high-risk register (such as the latch driving register) can be strengthened (such as increasing the bit width of the cross-register group staggered checking or additionally supplementing the global checking), or the checking format of the low-risk register (such as the behavior mode register) is optimized according to the risk change to balance protection and efficiency;
[0172] And maintaining the basic checking means that when the vibration spectrum similarity analysis shows that the current scene risk does not exceed the original protection adaptation range, the initial set differentiated checking scheme (high-risk register 4-bit data block + 2-bit cross-register group staggered checking, low-risk register 8-bit data block + 1-bit regular parity check, high-risk data block additional CRC check, etc.) is maintained to ensure that the checking strategy adjustment always fits the actual risk of the mechanical vibration associated scene, and is consistent with the dynamic adaptation risk lock control logic.
[0173] Embodiment 3
[0174] As shown in Figure 3 The AI-based electronic lock dynamic risk self-adaptive lock control system includes the following modules:
[0175] Disturbance association module: used for collecting the power supply voltage waveform of the electronic lock and extracting the power supply glitch feature, obtaining the vibration spectrum for similarity analysis to obtain the similarity, determining whether it is a mechanical vibration associated power supply glitch based on the power supply glitch feature and the similarity, and classifying the power supply disturbance scene based on the determination result;
[0176] Flip analysis module: used for obtaining the bit flip probability distribution of the electronic lock register under all power supply disturbance scenes, distinguishing the register disturbance type based on the bit flip probability distribution, and formulating the differentiated parity check and hierarchical mirror storage strategy based on the register disturbance type;
[0177] Path extraction module: based on the register disturbance type, the core state node is extracted, which is used to construct the migration probability graph of the core state node in combination with historical mechanical vibration associated attack cases, construct the path migration model in combination with the migration probability graph, and output the high-risk migration path;
[0178] Strategy adjustment module: based on the high-risk migration path, the electronic lock is subjected to real-time path local matching analysis, if the local matching is established, the phase-aware state machine freezing and vibration cycle monitoring are established, and the dynamic adjustment of the adaptive lock control protection strategy in the mechanical coupling scene is realized.
[0179] The above has been described in detail one embodiment of the present application, but the content is only the preferred embodiment of the present application, cannot be considered for limiting the scope of the present application. Any equivalent changes and improvements made in the scope of the present application, should still belong to the scope of the present application.
Claims
1. An AI-based electronic lock dynamic risk self-adaptive lock control method, characterized in that: The method comprises the following steps: The power supply voltage waveform of the electronic lock is collected, the power supply glitch feature is extracted, the vibration frequency spectrum is obtained, the similarity is obtained through similarity analysis, it is determined whether it is a power supply glitch related to mechanical vibration based on the power supply glitch feature and the similarity, and the power supply disturbance scene is classified based on the determination result; The power supply disturbance scene comprises a mechanical vibration related scene, a common electromagnetic interference scene, and a normal working condition scene; The bit flip probability distribution of the electronic lock register under all power supply disturbance scenes is obtained, the register disturbance type is distinguished based on the bit flip probability distribution, and the differential parity check and hierarchical mirror storage strategy are formulated based on the register disturbance type; The register disturbance type comprises a high-risk disturbance type and a low-risk disturbance type; The core state node is extracted based on the register disturbance type, which is used to construct a migration probability graph of the core state node in combination with historical mechanical vibration related attack cases, a path migration model is constructed in combination with the migration probability graph, and a high-risk migration path is output; Real-time path local matching analysis is performed on the electronic lock based on the high-risk migration path, if the local matching is matched, a phase-aware state machine freezing is triggered and vibration cycle monitoring is started, and a dynamic adjustment of the adaptive lock control protection strategy in the mechanical coupling scene is realized.
2. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 1, characterized in that: The method for determining whether it is a power supply glitch related to mechanical vibration is: The similarity of the vibration frequency spectrum is used to determine whether to trigger mechanical vibration type glitch verification, if triggered, the drop depth, drop duration cycle of voltage drop, and the similarity of the vibration frequency spectrum are obtained; A three-dimensional criterion is established, if the drop depth, drop duration cycle of voltage drop, and the similarity of the vibration frequency spectrum meet the three-dimensional criterion, it is a power supply glitch of the mechanical vibration related scene.
3. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 2, characterized in that: The similarity of the vibration frequency spectrum is obtained in the following way: During the drop duration cycle, the vibration signal is synchronously collected and the vibration acceleration sequence synchronized with the voltage sampling cycle is obtained; The vibration acceleration sequence is preprocessed to obtain the vibration frequency spectrum sequence; The vibration frequency spectrum reference library of the electronic lock under different historical application scenes is obtained, the similarity of the vibration frequency spectrum sequence and the vibration frequency spectrum reference library in different scenes is analyzed, and the similarity is obtained.
4. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 1, characterized in that: The method for distinguishing the register disturbance type is: The scene amplification coefficients of all registers are obtained, the scene amplification coefficients of all registers are classified through a clustering algorithm, and high-risk registers and low-risk registers are obtained.
5. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 4, characterized in that: The method for obtaining the scene amplification coefficients of the registers is: The power supply disturbance scenes are classified to obtain the mechanical vibration related scene, the common electromagnetic interference scene, and the normal working condition scene; From the historical log data of the electronic lock, the total bit flip number of the registers in different power supply disturbance scenes, the scene cycle number, and the number of bits of the registers are extracted; The total bit flip number of the registers in different power supply disturbance scenes, the scene cycle number, and the number of bits of the registers are input into the bit flip probability equation to obtain the bit flip probability of the registers corresponding to the power supply disturbance scenes; The ratio of the bit flip probability of the mechanical vibration related scene, the common electromagnetic interference scene, and the normal working condition scene is calculated to obtain the scene amplification coefficient.
6. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 1, characterized in that: The output manner of the high-risk migration path is: Obtain the migration probability graph of the mechanical vibration correlation scene by Markov chain algorithm, construct a path migration model, and output the high-risk migration path.
7. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 6, characterized in that: The construction manner of the path migration model is: Determine the fragile time window bound to the fluctuation time point based on the characteristics of the mechanical coupling fluctuation time point; Obtain the migration probability graph and the fragile time window, and the node attack weight of the initial node set; Based on the migration probability graph and the fragile time window, combined with the node attack weight of the initial node set, perform forward scanning of the Markov chain to obtain the node migration probability under different time steps; Based on the node migration probability under different time steps, filter out the high-risk migration path.
8. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 7, characterized in that: The manner of obtaining the migration probability graph is: Obtain the high-risk data block and the low-risk data block in the differential parity check and hierarchical mirror storage strategy; Respectively extract the core state nodes of the high-risk data block and the low-risk data block, and extract the node attack weight of the core state nodes; Associate the node attack weight with all the core state nodes to construct an initial node set; Obtain the matching case number of the low-risk data block in the corresponding core state node, and the matching case number of the high-risk data block in the corresponding core state node, and obtain the migration probability of the low-risk data block and the high-risk data block through the migration probability equation; Take the initial node set as the vertex and the migration probability as the directed edge weight to construct the migration probability graph of the mechanical vibration correlation scene.
9. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 7, characterized in that: The manner of obtaining the node attack weight is: Obtain the scene amplification coefficient of the low-risk data block and the high-risk data block, and perform normalization processing to obtain the node influence coefficient; Obtain the tampered probability of each core state node in the historical attack case library, combined with the node influence coefficient corresponding to each core state node; Multiply the tampered probability of each core state node with the node influence coefficient, and take the calculation result of the multiplication processing as the node attack weight of each node.
10. The AI-based electronic lock dynamic risk self-adaptive lock control method according to claim 1, characterized in that: The manner of performing the real-time path local fitting analysis is: Continuously monitor the complete migration path of the electronic lock, if the complete migration path of the current electronic lock locally fits with the high-risk migration path, but does not reach the end point of the high-risk migration path, extract the vibration main frequency phase angle and the drop duration cycle of the current working condition of the electronic lock; If the sampling points in the drop duration cycle of the electronic lock meet the mechanical coupling fluctuation time point, and the vibration main frequency phase angle is in the sensitive interval, trigger the state machine clock of the frozen electronic lock, and start the vibration cycle monitoring.
Citation Information
Patent Citations
Persistent fault analysis method based on voltage burrs
CN120428077A
Switch loop data extraction method, device and equipment based on phase locking
CN120654164A