An unlocking method and system based on NFC wireless communication
By building state vectors and dynamic keys in the NFC wireless communication lock-opening system, using particle swarm optimization and federated learning to generate optimization tag templates, perform abnormal detection and multi-object lock-opening, the problem of insufficient security and convenience in the existing technology is solved, and efficient and safe lock-opening operations are achieved.
Patent Information
- Application Number
- CN202510646831.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing unlocking method based on NFC wireless communication is difficult to comprehensively and accurately collect data in door lock status management, insufficient security of key generation and management, lack of efficient dynamic mechanism for NFC tag collection decisions and updates, and lack of in-depth analysis of abnormal detection and unlocking decisions, resulting in insufficient system security and convenience.
By acquiring the initial state data for modeling, building a state vector, combining the cloud-based dynamic key to generate a set of NFC tags that comply with the specifications, using the particle swarm optimization algorithm for dynamic decision-making and federated learning, presetting and updating of tags, and combining time series data analysis for abnormal identification and multi-objective lock unlocking.
Improve the security and reliability of the system, ensure the security and adaptability of the tag collection, prevent illegal access, achieve accurate control of multi-target lock unlocking, and improve response efficiency and user experience.
Smart Images

Figure CN120164275B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent door locks, and in particular to an unlocking method and system based on NFC wireless communication. Background Art
[0002] With the rapid development of the Internet of Things technology, the smart home system has gradually become an important part of modern families. As an entry-level product of the smart home, the security and convenience of the intelligent door lock are directly related to the daily life experience of users. Traditional unlocking methods, such as key unlocking and password unlocking, although meeting the basic unlocking needs to a certain extent, have many security risks and inconveniences. Keys are easy to lose and be misappropriated, and passwords may be peeped or cracked. These problems have prompted the market to seek a more secure and convenient unlocking solution.
[0003] Existing unlocking methods based on NFC wireless communication have many challenges, such as it is difficult to comprehensively and accurately collect data in door lock state management, the security of key generation and management is insufficient, there is a lack of an efficient dynamic mechanism for the decision-making and update of a set of NFC tags that meet the specifications, it is difficult to achieve efficient preset update and effective learning in NFC tag template generation, and there is a lack of in-depth analysis in anomaly detection and unlocking decision-making. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an unlocking method and system based on NFC wireless communication, which improves the security of the system.
[0005] To solve the above technical problem, the technical solution of the present invention is as follows:
[0006] In a first aspect, an unlocking method based on NFC wireless communication, the method includes:
[0007] Obtain the initial state data composed of the conditions of the door lock at each stage;
[0008] Model the initial state data composed of the conditions of the door lock at each stage, construct an initial state vector, and use the state vector as a reference point;
[0009] Obtain a dynamic key from the cloud and combine it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications;
[0010] Perform dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, update the state vector, and obtain the corresponding NFC tag features;
[0011] According to the updated state vector and NFC tag features, perform preset and update of tags on distributed nodes, and implement federated learning on the preset tags to generate an optimized NFC tag template;
[0012] Read the latest tag information through the NFC device, including new status sequence data; combine the new status sequence data with the historical status sequence data and the optimized NFC tag template for time series data analysis to obtain an analysis result; based on the analysis result, perform an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result;
[0013] According to the anomaly detection result, perform multi-target unlocking to achieve NFC wireless communication unlocking.
[0014] Furthermore, obtain the initial state data composed of the conditions of the door lock at each stage, including:
[0015] Define the door lock status parameters to be collected, and deploy multi-source sensors and data acquisition devices;
[0016] Establish a data transmission and storage architecture based on the multi-source sensors and data acquisition devices;
[0017] According to the established data transmission and storage architecture, convert the raw data into understandable status tags, and integrate multi-stage data to generate a structured status report;
[0018] Obtain the initial state data through the generated structured status report.
[0019] Furthermore, model the initial state data composed of the conditions of the door lock at each stage, construct an initial state vector, and use the state vector as a reference point, including:
[0020] According to the initial state data, determine the door lock status elements for modeling, and normalize the state variables by subtracting the minimum value from the current value of the variable and then dividing by the difference between the maximum value and the minimum value to obtain normalized state variables;
[0021] Define the dimension and arrangement order of the state vector through the normalized state variables;
[0022] Set the reference point according to the dimension and arrangement order of the state vector.
[0023] Furthermore, obtain a dynamic key from the cloud and combine it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications, including:
[0024] Send a request to the cloud server through a secure communication protocol to obtain a dynamic key;
[0025] According to the obtained dynamic key, read the preset reference point information from local storage, and generate a verification rule by combining the dynamic key and the reference point;
[0026] According to the verification rule, combine the dynamic key and the reference point data to generate a dynamic encryption key;
[0027] Encrypt a preset NFC tag template using a dynamic encryption key to generate a set of NFC tags that meet the specifications.
[0028] Furthermore, perform dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, update the state vector, and obtain the corresponding NFC tag features, including:
[0029] Define a particle swarm, where each particle represents a set of NFC tags that meet the specifications, and initialize the state vector of each particle;
[0030] Evaluate the compliance of the set of NFC tags corresponding to the state vector of each particle by multiplying the weight of the security score by one, adding twice the weight of the coverage score, and adding three times the weight of the dynamicity score;
[0031] Update the state vector of the particle by multiplying the current velocity by the inertia weight, adding the learning factor multiplied by a random number, then multiplying by the difference between the particle's own historical optimal position and the current position, adding the learning factor multiplied by a random number, and then multiplying by the difference between the global optimal position and the current position to obtain the optimal solution;
[0032] Update the set of NFC tags that meet the specifications according to the state vector of the global optimal particle, and obtain the corresponding NFC tag features.
[0033] Furthermore, according to the updated state vector and NFC tag features, perform presetting and updating of tags on distributed nodes, and implement federated learning on the preset tags to generate an optimized NFC tag template, including:
[0034] Based on the updated state vector and NFC tag features, preset NFC tags on distributed nodes based on the initial tag configuration template. Each node dynamically adjusts the tag configuration according to local operation data and collects tag performance data;
[0035] Upload the local tag performance data to the federated learning framework and initialize the global model training task;
[0036] Each node trains a local model based on local data, and the federated learning framework aggregates the model parameters of each node to generate a global updated model;
[0037] Generate an optimized NFC tag template according to the global updated model, repeat the above operations until the tag performance reaches the preset threshold, and finally solidify the NFC tag template.
[0038] Further, read the latest tag information through the NFC device, including new status sequence data; combine the new status sequence data with the historical status sequence data and the optimized NFC tag template for time series data analysis to obtain an analysis result; based on the analysis result, perform an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result, including:
[0039] Read new tag information from the NFC device, receive the status sequence data uploaded by the NFC device, and perform cleaning and formatting;
[0040] Obtain the historical status sequence data related to the current tag ID, and generate a normal behavior reference baseline for the current tag according to the characteristic parameters of the latest tag template;
[0041] Perform time series analysis on the latest status sequence data and historical data according to the normal behavior reference baseline, and extract key features;
[0042] According to the reference baseline and the extracted features, automatically identify the pattern recognition abnormal behavior deviating from the baseline and classify the abnormal types by using the historical data to train a classifier;
[0043] Summarize the anomaly detection results according to the anomaly types.
[0044] Further, according to the anomaly detection result, perform multi-target unlocking to achieve NFC wireless communication unlocking, including:
[0045] According to the anomaly detection result, verify whether the current user or system has the unlocking permission for the target tag, and confirm that the tag ID is consistent with the anomaly record;
[0046] Generate a unified instruction set including the tag ID, unlocking time window, and operation priority for all tags to be unlocked;
[0047] According to the unified instruction set, send the unlocking instruction to the target tag through the NFC wireless communication protocol and wait for the tag response to achieve NFC wireless communication unlocking.
[0048] In a second aspect, an unlocking system based on NFC wireless communication includes:
[0049] An acquisition module for acquiring the initial state data composed of the conditions of the door lock at each stage; modeling the initial state data composed of the conditions of the door lock at each stage to construct an initial state vector, and using the state vector as a reference point; obtaining a dynamic key from the cloud and combining it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications;
[0050] An update module, configured to perform dynamic decision-making on a set of NFC tags that meet the specifications according to the particle swarm optimization drive, update the state vector, and obtain the corresponding NFC tag features; according to the updated state vector and NFC tag features, perform presetting and updating of tags on distributed nodes, and implement federated learning on the preset tags to generate an optimized NFC tag template;
[0051] A processing module, configured to read the latest tag information through an NFC device, including new state sequence data; combine the new state sequence data with the historical state sequence data and the optimized NFC tag template to perform time series data analysis to obtain an analysis result; based on the analysis result, execute an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result; according to the anomaly detection result, perform multi-target unlocking to achieve NFC wireless communication unlocking.
[0052] In a third aspect, a computing device includes:
[0053] One or more processors;
[0054] A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement the method described above.
[0055] In a fourth aspect, a computer-readable storage medium stores a program that, when executed by a processor, implements the method described above.
[0056] The above solution of the present invention has at least the following beneficial effects:
[0057] By combining the cloud dynamic key and the local reference point, a dynamic encryption key is generated to ensure the security of the set of NFC tags that meet the specifications, prevent the key from being cracked or copied, and encrypt the preset NFC tag template through the dynamic encryption key to generate a set of NFC tags that meet the specifications, effectively preventing the forgery or abuse of illegal tags. Through the particle swarm optimization algorithm, dynamic decision-making is performed on the set of NFC tags that meet the specifications, the state vector is updated, and the optimal NFC tag features are obtained, improving the compliance, security, and dynamic adaptability of the tag set. By comprehensively considering the security, coverage, and dynamic score, the optimal performance of the tag set in different scenarios is ensured.
[0058] Based on the initial tag configuration template, NFC tags are preset on distributed nodes. Each node dynamically adjusts the tag configuration according to local operation data to improve the adaptability and flexibility of the tags. Through the federated learning framework, the model parameters of each node are aggregated to generate a global updated model, optimizing the NFC tag template to ensure that the tag performance reaches the preset threshold and improving the overall performance of the system. Combining historical state sequence data and the latest tag template, time series data analysis is carried out to extract key features and identify abnormal behaviors, enhancing the security and reliability of the system. Anomaly types are classified by automatically identifying patterns that deviate from the baseline through a classifier, providing an accurate basis for subsequent multi-target unlocking. According to the anomaly detection results, the unlocking permission is verified to ensure that only authorized users or systems can perform the unlocking operation, preventing misoperation or malicious exploitation. A unified instruction set containing tag ID, unlocking time window, and operation priority is generated to achieve precise control of multi-target unlocking, improving the response efficiency and security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 FIG. is a schematic flow chart of an unlocking method based on NFC wireless communication provided by an embodiment of the present invention.
[0060] Figure 2 FIG. is a schematic diagram of an unlocking system based on NFC wireless communication provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0061] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0062] As Figure 1 shown, an embodiment of the present invention proposes an unlocking method based on NFC wireless communication, and the method includes the following steps:
[0063] Step 11, obtaining initial state data composed of the conditions of the door lock at each stage;
[0064] Step 12, modeling the initial state data composed of the conditions of the door lock at each stage, constructing an initial state vector, and using the state vector as a reference point;
[0065] Step 13, obtaining a dynamic key from the cloud and combining it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications;
[0066] Step 14, perform dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, update the state vector, and obtain the corresponding NFC tag features;
[0067] Step 15, based on the updated state vector and NFC tag features, perform presetting and updating of tags on the distributed nodes, and implement federated learning on the preset tags to generate an optimized NFC tag template;
[0068] Step 16, read the latest tag information through the NFC device, including new state sequence data; combine the new state sequence data with the historical state sequence data and the optimized NFC tag template, perform time series data analysis to obtain the analysis result; based on the analysis result, execute the anomaly recognition process to detect abnormal situations and obtain the anomaly detection result;
[0069] Step 17, perform multi-objective unlocking according to the anomaly detection result to achieve NFC wireless communication unlocking.
[0070] In the embodiment of the present invention, by obtaining the initial state data of the conditions of the door lock at each stage, ensuring a comprehensive perception of the door lock state, modeling the initial state data, constructing an initial state vector as a reference point, providing a reliable basis for subsequent dynamic decision-making and tag generation, through modeling, the system can more accurately understand the change law of the door lock state, adapt to the unlocking requirements in different scenarios, combine the cloud dynamic key with the local reference point to generate a dynamic encryption key, ensure the security of the set of NFC tags that meet the specifications, and perform dynamic decision-making on the set of NFC tags that meet the specifications through the particle swarm optimization algorithm, update the state vector, and obtain the optimal NFC tag features.
[0071] Based on the initial tag configuration template, preset NFC tags on the distributed nodes, and each node dynamically adjusts the tag configuration according to the local running data to improve the adaptability and flexibility of the tags. Aggregate the model parameters of each node through the federated learning framework to generate a global update model and optimize the NFC tag template to ensure that the tag performance reaches the preset threshold. Federated learning avoids uploading a large amount of data to the cloud, reduces the communication cost and the risk of data leakage. The federated learning and dynamic update mechanism reduce the manual intervention and maintenance cost, improve the sustainability and economy of the system. The multi-objective unlocking and precise control mechanism improve the user's unlocking experience and reduce the waiting time and operation complexity.
[0072] In a preferred embodiment of the present invention, the above step 11 may include:
[0073] Step 111, define the door lock state parameters to be collected, and deploy multi-source sensors and data acquisition devices;
[0074] Step 112: Establish a data transmission and storage architecture based on multi-source sensors and data acquisition devices;
[0075] Step 113: According to the established data transmission and storage architecture, convert the raw data into understandable status tags, and integrate multi-stage data to generate a structured status report;
[0076] Step 114: Obtain the initial status data through the generated structured status report.
[0077] In the embodiment of the present invention, by defining the door lock status parameters to be collected, it is ensured that the collected data is targeted and practical, avoiding the interference of invalid data. Deploying multi-source sensors and data acquisition devices can obtain door lock status information from multiple dimensions, improving the comprehensiveness and accuracy of the data. Establishing a data transmission and storage architecture ensures that the data can be efficiently and stably transmitted to the storage system, reducing data loss and latency. Converting the raw data into understandable status tags makes the data easier to analyze and utilize, reducing the complexity of data processing. Integrating multi-stage data to generate a structured status report provides a clear and orderly data basis for subsequent data analysis and decision-making. Obtain the initial status data through the generated structured status report.
[0078] In a specific embodiment of the present invention, the specific steps include:
[0079] Step 111: Identify the door lock status parameters to be monitored, such as the opening and closing status of the door lock, the position of the lock tongue, battery power, ambient temperature, humidity, vibration conditions, etc. According to the door lock type and usage scenario, select key parameters for collection. According to the collection target, select appropriate sensors, such as switch sensors, position sensors, power sensors, temperature and humidity sensors, acceleration sensors, etc., ensuring that the sensors have the characteristics of high precision, high reliability, and low power consumption. Install the sensors at key positions of the door lock to ensure that the required status information can be accurately collected. Deploy data acquisition devices responsible for collecting sensor data and transmitting it.
[0080] Step 112: Select an appropriate data transmission protocol to ensure efficient and stable data transmission. Consider the security of transmission and add encryption and authentication mechanisms. According to the distribution of sensors and data acquisition devices, construct a wired or wireless transmission network to ensure that the network covers all sensors and data acquisition devices and has redundancy and fault tolerance capabilities. Select an appropriate storage system, design the storage structure, ensure that the data can be stored and queried orderly and efficiently, and write the code for data transmission and storage to implement the transmission and storage of sensor data from the acquisition device to the storage system, ensuring the real-time nature of data transmission and the reliability of storage.
[0081] Step 113: According to the collected door lock status parameters, define understandable status labels, such as the door lock is open, the door lock is closed, low battery power, too high ambient temperature, etc., ensuring that the status labels have clear meanings and interpretability. Convert the cleaned original data into corresponding status labels, collect the status label data at different time points, integrate them into a multi-stage data sequence, analyze the variation law of the data sequence, extract key features, and generate a structured status report from the integrated multi-stage data, including information such as timestamps, status labels, and key features, ensuring that the report has a clear structure and easy-to-understand content.
[0082] Step 114: Parse the generated structured status report, extract key information, understand the door lock status represented by the status labels and key features in the report, and according to the report content, extract the initial status data of the door lock, such as the on / off status of the door lock, battery power, ambient temperature, etc., ensuring the accuracy and integrity of the initial status data.
[0083] In a preferred embodiment of the present invention, the above step 12 may include:
[0084] Step 121: According to the initial status data, determine the door lock status elements for modeling. For the status variable, divide the difference between the current value of the variable and the minimum value by the difference between the maximum value and the minimum value to obtain a normalized status variable.
[0085] Step 122: Define the dimension and arrangement order of the status vector through the normalized status variable.
[0086] Step 123: Set a reference point according to the dimension and arrangement order of the status vector.
[0087] In the embodiment of the present invention, determining the door lock status elements for modeling through the initial status data ensures that the modeling process focuses on key status variables, improving the pertinence and accuracy of the model. Normalize the status variable to obtain a normalized status variable. The normalization process eliminates the dimensional differences between different variables, making the variables comparable. The normalization process helps to improve the robustness of the model, making the model insensitive to the range changes of the input data and enhancing the generalization ability of the model. Defining the dimension and arrangement order of the status vector, and setting the reference point make the data processing more efficient and orderly. The multi-dimensional structure of the status vector and the setting of the reference point support the multi-dimensional analysis and dynamic decision-making of the door lock status, improving the intelligent level of the system.
[0088] In a specific embodiment of the present invention, the specific steps include:
[0089] Step 121: Based on the initial state data obtained in Step 11, understand various state information of the door lock, such as the switch state, battery level, ambient temperature, etc. According to the analysis, determine the elements crucial for modeling the door lock state, i.e., state variables. For example, the switch state of the door lock, the battery percentage, the ambient temperature value, etc. Pass through , and normalize the state variables to obtain normalized state variables, where is the state variable,[[]] is the minimum value of this state variable,[[]] is the maximum value of this state variable,[[]] is the converted value.[[]]
[0090] Step 122: According to the selected number of state variables, determine the dimension of the state vector, assign a fixed position to each dimension in the state vector, determine the arrangement order of the state variables, and construct the state vector based on the quantized state variable values and the arrangement order.[[]]
[0091] Step 123: The reference point is a reference standard for the door lock state, usually representing the normal state or the initial state of the door lock. According to the dimension and arrangement order of the state vector, select a suitable reference point value for each dimension, and combine the selected reference point values in the arrangement order of the state vector to form a reference point vector, ensuring that the reference point vector is consistent with the dimension and arrangement order of the state vector, and the reference point values are reasonable and meaningful.[[]]
[0092] In a preferred embodiment of the present invention, the above Step 13 may include:[[]]
[0093] Step 131: Send a request to the cloud server through a secure communication protocol to obtain a dynamic key;[[]]
[0094] Step 132: According to the obtained dynamic key, read the preset reference point information from local storage, and generate a verification rule by combining the dynamic key and the reference point;[[]]
[0095] Step 133: According to the verification rule, combine the dynamic key and the reference point data to generate a dynamic encryption key;[[]]
[0096] Step 134: Use the dynamic encryption key to encrypt the preset NFC tag template to generate a set of NFC tags that meet the specifications.[[]]
[0097] In the embodiments of the present invention, through steps such as dynamic key acquisition, verification rule generation, dynamic encryption key generation, and NFC tag template encryption, the security of the system is significantly improved, preventing illegal access and tampering. The combination of cloud and local information, and the generation mechanism of dynamic keys and encryption keys enable the system to flexibly adapt to different security requirements and application scenarios. The verification rules and encryption mechanism ensure the integrity and compliance of the data, preventing data leakage and illegal use. The generation of a set of compliant tags supports multiple application scenarios, enhancing the versatility and practicality of the system.
[0098] In a specific embodiment of the present invention, the specific steps include:
[0099] Step 131, establish a secure connection with the cloud server using a secure communication protocol to ensure the confidentiality and integrity of data transmission. Send a request to the cloud server to obtain a dynamic key. The request may contain identity authentication information to verify the compliance of the request. After the cloud server verifies the request, it generates a dynamic key and sends it back to the client through the secure connection. After the client receives the dynamic key, it stores it in a secure environment.
[0100] Step 132, read the preset reference point information from local storage. This information may include specific configuration parameters, status values, etc. Combine the obtained dynamic key with the read reference point information. According to the processing result, generate a verification rule and store the generated verification rule in a secure environment.
[0101] Step 133, before generating the dynamic encryption key, first verify the effectiveness of the verification rule to ensure that the current operation complies with the preset rules. Combine the dynamic key and the reference point data again, and possibly process them through a more complex algorithm. According to the processing result, generate a dynamic encryption key and store the generated dynamic encryption key in a secure environment.
[0102] Step 134, read the NFC tag template from local storage or preset resources. These templates may contain specific data formats, structures, etc. Encrypt the NFC tag template using the generated dynamic encryption key to ensure the confidentiality and integrity of the template data. Combine the encrypted NFC tag templates into a set of compliant tags and store the generated dynamic encryption key in a secure environment.
[0103] In a preferred embodiment of the present invention, the above step 14 may include:
[0104] Step 141, define a particle swarm. Each particle represents a set of compliant NFC tags, and initialize the state vector of each particle;
[0105] Step 142: Evaluate the compliance of the NFC tag set corresponding to the state vector of each particle by adding one times the weight of the security score, two times the weight of the coverage rate score, and three times the weight of the dynamicity score.
[0106] Step 143: Update the state vector of the particle to obtain the optimal solution by multiplying the current velocity by the inertia weight, adding the learning factor multiplied by a random number and then multiplying by the difference between the particle's own historical optimal position and the current position, and adding the learning factor multiplied by a random number and then multiplying by the difference between the global optimal position and the current position.
[0107] Step 144: Update the NFC tag set that complies with the specification according to the state vector of the global optimal particle, and obtain the corresponding NFC tag features.
[0108] In the embodiment of the present invention, through the particle swarm optimization algorithm, multiple possible NFC tag sets can be searched in parallel, improving the search efficiency. The multi-dimensional evaluation and dynamic adjustment of the search strategy ensure that the finally obtained solution is comprehensive, practical and optimal. The flexibility of weight adjustment and the dynamic adjustment of the search strategy enable the algorithm to adapt to different application scenarios and optimization goals. The updated NFC tag set that complies with the specification and the extracted key features have direct application value, which can improve the performance and security of the NFC wireless communication unlocking system.
[0109] In a specific embodiment of the present invention, the specific steps include:
[0110] Step 141: Determine the size of the particle swarm, that is, the number of particles. Each particle represents a NFC tag set that complies with the specification, and initialize a state vector for each particle, which may include various features or parameters of the NFC tag set such as tag ID, encryption key, validity period, etc.
[0111] Step 142, by , evaluate the compliance of the NFC tag set corresponding to the state vector of each particle, where , and are the security score, coverage rate score, and dynamicity score corresponding to the state vector of particle respectively. The security score is given by evaluating aspects such as the strength of the encryption algorithm, the security of key management, the effectiveness of the authentication mechanism, and the existence of security vulnerabilities. The coverage rate score is the number of application scenarios supported by the NFC tag set, device compatibility, and user group coverage. The dynamicity score is to evaluate the update ability, scalability, adaptability, and emergency response speed of the NFC tag set. is the weight of the security score, is the weight of the coverage rate score, is the weight of the dynamic score. By constructing the judgment matrix A, where the weight is the importance ratio of the -th element relative to the j-th element, and j is an index variable. is the fitness function value of the particle . is the state vector. is a positive integer used to identify the -th particle in the particle swarm.
[0112] Step 143: Update the state vector of the particle through to obtain the optimal solution. Among them, is the velocity vector of the -th particle at the -th iteration, is the velocity vector of the -th particle at the -th iteration, is the position vector of the -th particle at the -th iteration, is the inertia weight, is the individual learning factor, is the swarm learning factor, is a random number between is a random number between is the individual optimal position of the -th particle, is the global optimal position, is a positive integer used to identify the -th particle in the particle swarm. Repeat the above steps until the stop condition is met. During the iteration, record the state vector of the global optimal particle, and the NFC tag set corresponding to this vector is the optimal solution.
[0113] Step 144: Update the set of NFC tags that meet the specifications according to the state vector of the global optimal particle. Extract key features from the updated set of NFC tags that meet the specifications, such as tag ID, encryption key, validity period, application scenario, etc., and apply the extracted NFC tag features to the actual NFC wireless communication unlocking system.
[0114] In a preferred embodiment of the present invention, the above step 15 may include:
[0115] Step 151: Based on the updated state vector and NFC tag features, and on the basis of the initial tag configuration template, preset NFC tags on distributed nodes. Each node dynamically adjusts the tag configuration according to local operation data and collects tag performance data.
[0116] Step 152: Upload the local tag performance data to the federated learning framework and initialize the global model training task.
[0117] Step 153: Each node trains a local model based on local data. The federated learning framework aggregates the model parameters of each node to generate a globally updated model.
[0118] Step 154: Generate an optimized NFC tag template according to the globally updated model. Repeat the above operations until the tag performance reaches the preset threshold, and finally solidify the NFC tag template.
[0119] In the embodiment of the present invention, through steps such as distributed presetting, dynamic adjustment, model training, and template optimization, the performance and applicability of NFC tags are significantly improved. The application of the federated learning framework protects the privacy of local tag performance data and avoids the risk of data leakage. The dynamic adjustment and model training on distributed nodes enable the system to better adapt to the actual needs of different nodes, enhancing the flexibility of the system. The federated learning framework reduces communication overhead by aggregating model parameters, improves training efficiency, makes the optimization process more efficient, and the iterative optimization process and the setting of the preset threshold ensure the continuity and effectiveness of the optimization effect, and can continuously approach the optimal solution.
[0120] In a specific embodiment of the present invention, the specific steps include:
[0121] Step 151: Obtain the updated state vector and NFC tag features from the previous optimization process. These features reflect the latest configuration and performance requirements of NFC tags. Use the initial tag configuration template to preset NFC tags on distributed nodes. Each node dynamically adjusts the tag configuration according to local operation data. During the tag usage process, each node collects the performance data of the tag, such as read success rate, response time, error rate, etc.
[0122] Step 152: Each node uploads the collected local tag performance data to the federated learning framework. These data will be used as the input for model training. After receiving the data from each node, the federated learning framework initializes the global model training task.
[0123] Step 153: Each node trains a local model using local tag performance data. The federated learning framework collects the local model parameters of each node, aggregates them by dividing the sum of the local model parameters of all participating nodes by the total number of participating nodes, and generates a global updated model based on the aggregated model parameters. This model will be used to optimize the NFC tag configuration.
[0124] Step 154: Use the global updated model to optimize the initial tag configuration template, generate a new NFC tag template, apply the optimized NFC tag template to the distributed nodes, and repeat Steps 151 to 153 until the tag performance reaches a preset threshold. When the tag performance reaches the preset threshold, finally solidify the NFC tag template, which will be applied to the NFC wireless communication unlocking system as the final version to ensure the stability and reliability of the system.
[0125] In a preferred embodiment of the present invention, the above Step 16 may include:
[0126] Step 161: Read new tag information from the NFC device, receive the status sequence data uploaded by the NFC device, and perform cleaning and formatting.
[0127] Step 162: Obtain the historical status sequence data related to the current tag ID, and generate a normal behavior reference baseline for the current tag according to the characteristic parameters of the latest tag template.
[0128] Step 163: Perform time series analysis on the latest status sequence data and historical data according to the normal behavior reference baseline, and extract key features.
[0129] Step 164: According to the reference baseline and the extracted features, train a classifier using historical data to automatically identify pattern recognition abnormal behaviors deviating from the baseline and classify the abnormal types.
[0130] Step 165: Summarize the abnormal detection results according to the abnormal types.
[0131] In the embodiment of the present invention, through real-time abnormal detection, potential security threats can be discovered and addressed in a timely manner, improving the security of the system. Identifying and handling abnormal behaviors helps maintain the stable operation of the system, reduce failures and downtime. Through data cleaning and feature extraction, unnecessary data processing can be reduced, resource utilization can be optimized, and processing efficiency can be improved. The summarized abnormal detection results and classification information provide a strong decision-making basis for managers, helping to formulate more scientific and reasonable response strategies. Generating a normal behavior reference baseline according to the characteristic parameters of the latest tag template enables the system to adapt to different environments and requirements and has stronger adaptability.
[0132] In a specific embodiment of the present invention, the specific steps include:
[0133] Step 161: Read the information of the new tag from the NFC device, which may include tag ID, encryption key, expiration date, etc. Receive the status sequence data uploaded by the NFC device, clean the received status sequence data to remove noise, invalid data, and outliers, ensure the accuracy and reliability of the data, and format the cleaned data into a unified format.
[0134] Step 162: Obtain the historical status sequence data related to the current tag ID, which is used to construct a reference baseline for normal behavior. Obtain the characteristic parameters of the latest tag template, which may include the normal reading frequency of the tag, signal strength range, reading position range, etc. Generate a reference baseline for the normal behavior of the current tag based on the historical status sequence data and the characteristic parameters of the latest tag template.
[0135] Step 163: For the latest status sequence data and historical data, , calculate the average value of the time series data within a time window, where is the moving average at time , is the window size, is the index variable, is the th data point in the time series. Observe the change trend and periodic characteristics of the data over time, extract key features from the time series analysis, such as changes in reading frequency, fluctuations in signal strength, anomalies in reading position, etc. These features help to identify abnormal behaviors.
[0136] Step 164: Use the historical data to train a classifier so that it can identify normal and abnormal behaviors. According to the reference baseline and the extracted features, use the trained classifier to automatically identify the patterns that deviate from the baseline, i.e., abnormal behaviors, classify the identified abnormal behaviors, and determine the type of anomaly, such as signal strength anomaly, reading frequency anomaly, reading position anomaly, etc.
[0137] Step 165: Summarize the anomaly detection results according to the type of anomaly to form a comprehensive anomaly detection report. The report content may include the type of anomaly, the time when the anomaly occurred, the location where the anomaly occurred, the scope of influence of the anomaly, etc. According to the summarized anomaly detection results, formulate corresponding countermeasures.
[0138] In a preferred embodiment of the present invention, the above step 17 may include:
[0139] Step 171: According to the anomaly detection results, verify whether the current user or system has the unlocking permission for the target tag and confirm that the tag ID is consistent with the anomaly record;
[0140] Step 172: Generate a unified instruction set for all tags to be unlocked, including tag ID, unlocking time window, and operation priority.
[0141] Step 173: According to the unified instruction set, send the unlocking instruction to the target tag through the NFC wireless communication protocol and wait for the tag to respond to achieve unlocking via NFC wireless communication.
[0142] In the embodiment of the present invention, through permission verification and exception correlation verification, it is ensured that only authorized users or systems can perform unlocking operations on the target tag, preventing unauthorized access and misoperations. A unified instruction set is generated to facilitate centralized management and scheduling of unlocking operations for multiple tags, improving operation efficiency. Unlocking is achieved through NFC wireless communication without physical contact, enhancing the convenience and security of use and improving the user experience. The instruction set contains clear operation parameters to ensure the accuracy and controllability of unlocking operations and avoid misoperations. By setting the unlocking time window and operation priority, unlocking operations can be flexibly scheduled to meet the requirements in different scenarios.
[0143] In a specific embodiment of the present invention, the specific steps include:
[0144] Step 171: Obtain the latest anomaly detection results from the anomaly detection system. These results may include information such as anomaly type, occurrence time, tag ID, etc. Check whether the current user or system has the permission to unlock the target tag. This usually involves querying the permission management system to confirm the identity and permission level of the user or system, and checking whether the tag ID in the anomaly record is consistent with the target tag ID that needs to be unlocked currently, ensuring that the unlocking operation is associated with the previous anomaly detection results.
[0145] Step 172: Collect information on all tags to be unlocked, including tag ID, time requirements for unlocking, etc. Set an unlocking time window for each tag, that is, the time range during which unlocking is allowed. According to factors such as the importance and urgency of the tag, set the priority for the unlocking operation of each tag, and integrate all the tag information to be unlocked, unlocking time window, operation priority, etc. into a unified instruction set.
[0146] Step 173: Parse the unlocking instruction for each tag from the unified instruction set, including information such as tag ID, unlocking time window, operation priority, etc. Prepare the unlocking instruction according to the parsed information, use the NFC wireless communication protocol to send the unlocking instruction to the target tag. After sending the instruction, wait for the response of the target tag. The tag may return information indicating successful or failed unlocking, as well as other possible status data. According to the response result of the tag, perform corresponding processing. If unlocking is successful, record the unlocking time and result. If unlocking fails, record the reason for failure and may trigger a retry mechanism or alarm.
[0147] As Figure 2 shown, an embodiment of the present invention further provides an unlocking system 20 based on NFC wireless communication, including:
[0148] An acquisition module 21, configured to acquire initial state data formed by conditions of the door lock at each stage; model the initial state data formed by conditions of the door lock at each stage, construct an initial state vector, and use the state vector as a reference point; obtain a dynamic key from the cloud and combine it with the reference point to construct a dynamic key, so as to generate a set of NFC tags that meet the specifications;
[0149] An update module 22, configured to perform dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, update the state vector, and obtain corresponding NFC tag features; perform presetting and updating of tags on distributed nodes according to the updated state vector and NFC tag features, and perform federated learning on the preset tags to generate an optimized NFC tag template;
[0150] A processing module 23, configured to read the latest tag information through an NFC device, including new state sequence data; combine the new state sequence data with historical state sequence data and the optimized NFC tag template to perform time series data analysis to obtain an analysis result; based on the analysis result, execute an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result; perform multi-target unlocking according to the anomaly detection result to achieve unlocking by NFC wireless communication.
[0151] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. An unlocking method based on NFC wireless communication, characterized in that, The method includes: Obtaining the initial state data composed of the conditions of the door lock at each stage; Modeling the initial state data composed of the conditions of the door lock at each stage, constructing an initial state vector, and using the state vector as a reference point; Obtaining a dynamic key from the cloud and combining it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications; Performing dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, updating the state vector, and obtaining the corresponding NFC tag features; Based on the updated state vector and NFC tag features, performing presetting and updating of tags on distributed nodes, and implementing federated learning on the preset tags to generate an optimized NFC tag template; Reading the latest tag information through an NFC device, including new state sequence data; combining the new state sequence data with the historical state sequence data and the optimized NFC tag template for time series data analysis to obtain an analysis result; based on the analysis result, performing an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result; According to the anomaly detection result, performing multi-target unlocking to achieve NFC wireless communication unlocking.
2. The unlocking method based on NFC wireless communication according to claim 1, wherein Modeling the initial state data composed of the conditions of the door lock at each stage, constructing an initial state vector, and using the state vector as a reference point, including: Determining the door lock state elements according to the initial state data, including whether the door lock is locked and the battery power; For each state variable, using a normalization method to convert it into a value between 0 and 1; After completing the normalization of the state variables, defining the dimension of the state vector and the arrangement order of its internal state variables; Based on the dimension and arrangement order of the state vector, setting a reference point.
3. The unlocking method based on NFC wireless communication according to claim 2, wherein, Obtaining a dynamic key from the cloud and combining it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications, including: Sending a request to the cloud server through a secure communication protocol to obtain a dynamic key; According to the obtained dynamic key, reading the preset reference point information from local storage, and generating a verification rule by combining the dynamic key and the reference point; According to the verification rule, combining the dynamic key and the reference point data to generate a dynamic encryption key; Using the dynamic encryption key to encrypt the preset NFC tag template to generate a set of NFC tags that meet the specifications.
4. The unlocking method based on NFC wireless communication according to claim 3, wherein, Performing dynamic decision-making on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, updating the state vector, and obtaining the corresponding NFC tag features, including: Mapping the verification rules of the set of NFC tags that meet the specifications to the "search dimensions" of the particle swarm optimization, where each dimension represents an adjustable decision parameter; Randomly generating a set of candidate decision-making schemes, and each particle contains a set of parameter values; Using the state vector of the current door lock as the environmental input and binding it to the decision-making process of each particle; Calculating the fitness score of each particle, screening the corresponding scheme from all particles, updating the speed and position of each particle, and stopping the optimization when the preset number of iterations is reached to obtain the parameter combination corresponding to the final particle as the final verification strategy; According to the final verification strategy, updating the dynamic conditions in the door lock state vector and extracting NFC tag features.
5. The unlocking method based on NFC wireless communication according to claim 4, wherein, Presetting and updating tags on distributed nodes according to the updated state vector and NFC tag features, and performing federated learning on the preset tags to generate an optimized NFC tag template, including: According to the latest state vector and the features of the NFC tag, using the initial tag configuration template, preset NFC tags on each distributed node. Each node will dynamically adjust the preset tag configuration according to its own local operation data and collect data on tag performance; After completing the preliminary tag configuration and adjustment, each node uploads the local tag performance data it has collected to the federated learning framework; Each node trains its local model based on its own local data. After completion, the federated learning framework aggregates the model parameters uploaded by all nodes to generate a new global updated model; Based on the global updated model, an optimized NFC tag template is generated.
6. The unlocking method based on NFC wireless communication according to claim 5, wherein Read the latest tag information through the NFC device, including new state sequence data; combine the new state sequence data with the historical state sequence data and the optimized NFC tag template for time series data analysis to obtain the analysis result; Based on the analysis result, perform an anomaly recognition process to detect anomalies and obtain the anomaly detection result, including: Read the latest tag information through the NFC device, including receiving the new state sequence data uploaded by the NFC device and cleaning and formatting it; Based on the current tag ID, obtain the relevant historical state sequence data from the database, and combine the feature parameters in the latest optimized NFC tag template to construct a reference baseline representing the normal behavior of the tag; Use the reference baseline of normal behavior to perform time series analysis on the cleaned and formatted new state sequence data and historical data to extract key features reflecting the behavior pattern, including periodic changes and trends; According to the key features, use a classifier trained based on historical data to automatically identify the behavior pattern deviating from the reference baseline of normal behavior to obtain the anomaly type; According to the anomaly type, summarize all the anomaly detection results, including the occurrence time of each anomaly event, the involved tag ID, and the anomaly type.
7. The unlocking method based on NFC wireless communication according to claim 6, wherein, According to the anomaly detection result, perform multi-target unlocking to achieve NFC wireless communication unlocking, including: According to the anomaly detection result, verify whether the current user has the unlocking permission for the target tag. If the permission verification fails, terminate the unlocking process; if the verification passes, proceed to the next step; After completing the permission verification, generate a unified instruction set containing the following information for all tags that need to be unlocked, including: tag ID, used to identify the specific NFC tag; unlocking time window, used to define the time range allowing the unlocking operation to be performed; operation priority, used to assign different operation priorities to each tag according to the anomaly type; Based on the unified instruction set, send the unlocking instruction to the target tag through the NFC wireless communication protocol. After sending, wait for the response of the target tag to confirm whether the unlocking instruction is successfully executed. If the tag responds successfully, the unlocking operation is completed; if it fails, record the failure reason and take corresponding remedial measures.
8. An unlocking system based on NFC wireless communication, which implements the method described in any one of claims 1 to 7, characterized in that, Including: An acquisition module for acquiring initial state data composed of the conditions of the door lock at each stage; Model the initial state data composed of the conditions of the door lock at each stage, construct an initial state vector, and use the state vector as a reference point; obtain a dynamic key from the cloud and combine it with the reference point to construct a dynamic key to generate a set of NFC tags that meet the specifications; An update module for dynamically making decisions on the set of NFC tags that meet the specifications according to the particle swarm optimization drive, updating the state vector, and obtaining the corresponding NFC tag features; Based on the updated state vector and NFC tag features, perform presetting and updating of tags on distributed nodes, and perform federated learning on the preset tags to generate an optimized NFC tag template; A processing module for reading the latest tag information, including new state sequence data, through an NFC device; Combine the new state sequence data with the historical state sequence data and the optimized NFC tag template for time series data analysis to obtain an analysis result; Based on the analysis result, perform an anomaly recognition process to detect abnormal situations and obtain an anomaly detection result; According to the anomaly detection result, perform multi-target unlocking to achieve NFC wireless communication unlocking.
9. A computing device, characterized in that, Including: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A program is stored in the computer-readable storage medium, and when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Electronic lock system, electronic lock and unlocking method based on NFC
CN104978781A
NFC tag recognition device and NFC tag recognition system including the same
US20180123645A1