A QR code recognition unlocking method and related equipment suitable for door machine
By collecting a variety of information and processing the photoresistor values, QR code information is generated that adapts to different light environments, the problem of changes in the light environment affecting QR code recognition is solved, and the passage efficiency and user experience of the access control system are improved.
Patent Information
- Application Number
- CN202411784102.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-06
AI Technical Summary
In different light environments, the difference in clarity of QR code images captured by the camera causes the success rate and speed of QR code recognition to be affected, affecting the passage efficiency and experience of the access control system.
By collecting information such as target door lock, door machine photoresistor, user biometrics and application access, processing biometrics generate attribute information containing identity and emotions, obtaining matching models and dataset training models, processing photoresistor values to obtain light intensity and environmental scene information, generating initial and target QR code information, and finally generating identification results based on its processing door lock information, realizing multi-factor adaptive adjustment.
Effectively improve the efficiency of QR code identification and opening the door, enhance the overall performance of the access control system, and improve the traffic efficiency and user experience.
Smart Images

Figure CN119251939B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a two-dimensional code recognition and unlocking method applicable to a door machine and related equipment. Background Art
[0002] In modern community access control systems, the application of QR code door opening technology provides great convenience for residents. In the background, with the popularization of smart phones and the development of mobile Internet technology, QR codes are widely used in various scenarios as a fast and secure way of information transmission. In the access control system, residents only need to use the QR code on their mobile phones and aim it at the door machine camera. After the door machine successfully recognizes it, they can quickly open the door without carrying traditional access control cards or keys. This technology not only reduces the risk of losing physical keys, but also improves the security of the access control system, because QR codes are usually time-sensitive and expire when they expire, making them difficult to copy or abuse. In addition, the QR code access control system can also facilitate remote authorization. For example, for temporary visitor access, the administrator can remotely generate a one-time QR code through the mobile phone, ensuring the temporary access rights of the visitor while ensuring the safety of the community. In general, the QR code access control system has become the preferred solution for modern community access control management with its convenience, security and flexibility.
[0003] However, in actual usage scenarios, different installation environments and weather conditions, as well as different lighting conditions at different times of the day, can lead to differences in the clarity of the QR code images captured by the camera, which in turn affects the success rate and speed of QR code recognition. For example, at night or on cloudy days, when the light is dim, the QR code images captured by the camera will not be clear. For another example, direct sunlight and overexposure of the camera will also affect the clarity of the QR code. All of the above will directly affect the recognition speed and success rate of the QR code, and thus directly affect the access efficiency and experience of the access control system.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of this application is to provide a QR code recognition unlocking method and related equipment and system suitable for door machine, which at least overcomes the problems existing in the prior art to a certain extent, by collecting information such as target door lock, door machine photoresistor, user biometrics and application access, processing biometrics to generate attribute information containing identity and emotions, and obtaining matching models and data set training models. Then the photoresistor value is processed to obtain light intensity and environmental scene information, and the target model processes the relevant information to obtain the initial and target QR code information, and finally generates the recognition result based on the door lock information processed by it, realizing multi-factor adaptive adjustment, effectively improving the efficiency of QR code recognition and door opening, and enhancing the overall performance of the access control system.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0007] According to one aspect of the present application, a QR code recognition unlocking method suitable for a door phone is provided, comprising: obtaining target door lock information, a photoresistor value of a target door phone, biometric information of a target user, and access information of a target application; processing the biometric information of the target user to generate identity attribute information of the target user, wherein the identity attribute information of the target user includes the identity information of the target user and the emotional information of the target user; obtaining an initial door phone QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial door phone QR code generation model, wherein the training data set includes the emotional information of the target user; other user data that matches the information; processing the initial outdoor machine QR code generation model based on the training data set to generate a target outdoor machine QR code generation model; processing the photoresistor value of the outdoor machine to generate the environmental scene information of the outdoor machine; processing the identity information of the target user and the access information of the target application based on the target outdoor machine QR code generation model to generate the initial outdoor machine QR code information; processing the environmental scene information of the outdoor machine and the initial outdoor machine QR code information based on the target outdoor machine QR code generation model to generate the target outdoor machine QR code information; processing the target door lock information based on the target outdoor machine QR code information to generate the recognition result of the target door lock.
[0008] Another aspect of the present application is a QR code recognition and unlocking device suitable for a door phone, characterized in that it includes: an acquisition module for acquiring target door lock information, a photoresistor value of a target door phone, biometric information of a target user, and access information of a target application; acquiring an initial door phone QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial door phone QR code generation model, wherein the training data set includes other user data that matches the emotional information of the target user; a processing module for processing the biometric information of the target user to generate the identity attribute information of the target user, wherein the identity attribute information of the target user includes the target user's identity attribute information. The method includes processing the target user's identity information and the target user's emotional information; processing the initial outdoor machine QR code generation model based on the training data set to generate a target outdoor machine QR code generation model; processing the photoresistor value of the outdoor machine to generate the outdoor machine's environmental scene information; processing the target user's identity information and the target application's access information based on the target outdoor machine QR code generation model to generate the initial outdoor machine QR code information; processing the outdoor machine's environmental scene information and the initial outdoor machine QR code information based on the target outdoor machine QR code generation model to generate the target outdoor machine QR code information; processing the target door lock information based on the target outdoor machine QR code information to generate the target door lock's recognition result.
[0009] According to another aspect of the present application, an electronic device is characterized in that it includes: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the above-mentioned QR code recognition and unlocking method applicable to a door machine by executing the executable instructions.
[0010] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a second processor, the two-dimensional code recognition and unlocking method applicable to a door machine is implemented.
[0011] According to another aspect of the present application, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a third processor, the above-mentioned two-dimensional code recognition and unlocking method applicable to a door machine is implemented.
[0012] The application provides a QR code recognition unlocking method and related equipment applicable to a door machine, which collects information such as the target door lock, the door machine photoresistor, the user's biometrics, and application access, processes the biometrics to generate attribute information containing identity and emotions, and obtains a matching model and a data set training model. Then the photoresistor value is processed to obtain the light intensity and environmental scene information, and the target model processes the relevant information to obtain the initial and target QR code information, and finally generates the recognition result based on the door lock information processed, realizing multi-factor adaptive adjustment, effectively improving the efficiency of QR code recognition and door opening, and enhancing the overall performance of the access control system.
[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of a QR code recognition unlocking method applicable to a door machine provided by an embodiment of the present application is shown;
[0015] Figure 2 A schematic diagram of the structure of a QR code recognition unlocking device applicable to a door machine provided by an embodiment of the present application is shown;
[0016] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown;
[0017] Figure 4 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0019] Combine the following Figure 1 To describe the QR code recognition unlocking method applicable to the door machine according to the exemplary embodiment of the present application. It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present application, and the implementation of the present application is not limited in this regard. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0020] In one implementation, the present application also proposes a QR code recognition unlocking method and related equipment applicable to a door machine. Figure 1 The following schematically shows a flow chart of a two-dimensional code recognition unlocking method applicable to a door machine according to an embodiment of the present application. Figure 1 As shown, the method is applied to a server, comprising:
[0021] S101, obtaining target door lock information, a photoresistor value of a target outdoor station, biometric information of a target user, and access information of a target application.
[0022] In one implementation, the model of the door lock is "XX Smart Door Lock-Type A", the current power of the door lock is 70% (sufficient power), the lock cylinder status of the door lock is normal (no abnormal alarm), the network signal strength to which the door lock is connected is good (such as Wi-Fi signal strength is -45dBm), and the last successful unlocking time of the door lock is "2023-10-15 12:30:00". The door lock information also includes the firmware version number of the door lock (such as V1.2.5), which is used to determine whether a system upgrade is required to obtain better performance and security. The unlocking methods supported by the door lock (such as fingerprint, password, card, Bluetooth, QR code, etc.) and the current activation status of each unlocking method, for example, the fingerprint unlocking function is normally enabled, and the password unlocking has been temporarily locked for 5 minutes after 3 consecutive wrong inputs. In addition, whether the door lock has an anti-pry alarm function and the current status of the function (whether it is turned on, the last alarm time, etc.) also belong to the scope of the target door lock information. This information helps to fully understand the status of the door lock, so as to better perform access control management and related operations.
[0023] For the photoresistor value of the target outdoor station, specifically, at a certain moment, the photoresistor value of the outdoor station is 800Ω (assuming that the ambient light is brighter, according to the photoresistor characteristics in the document, the resistance value decreases as the light intensity increases). The photoresistor value will change in real time with the change of ambient light. For example, when the sunlight is weak in the morning, the photoresistor value is 2000Ω; when the sunlight is strong at noon, it drops to 500Ω; when the light gradually dims in the evening, it rises back to 1500Ω. The system can set a certain time interval (such as every 5 seconds) to continuously read the photoresistor value to monitor the dynamic changes of the ambient light, provide accurate data basis for subsequent judgment of the environmental scene (strong light, normal light, weak light, etc.), and then determine the control strategy of the camera exposure and fill light. At the same time, the change curve of the photoresistor value over a period of time can also be recorded to analyze the lighting law of the location of the outdoor station, and further optimize the scene division threshold and the corresponding device control strategy.
[0024] Regarding the biometric information of the target user, specifically, the user authenticates his / her identity through the biometric collection module of the door machine (such as a camera or fingerprint reader), collects the user's face image, and obtains facial feature point information after image processing, such as the distance between eyes, nose shape, mouth contour and other data; or collects the user's fingerprint pattern information, including the distribution pattern of ridges and valleys, the position and direction of detailed feature points (such as end points, bifurcation points, etc.), etc.
[0025] For the access information of the target application, specifically, the user uses the access control management application on the mobile phone, which records the time when the user accesses the access control system every day in the past week, such as multiple access records between 8:00-9:00 every morning from Monday to Friday, and fewer access times on Saturdays and Sundays; the application also records the frequency of user access, such as an average of 3 visits per day; at the same time, it records the operations performed by the user in the application, such as viewing door opening records, modifying personal information, and other operations. Access information can also include the user's use of different devices (such as mobile phones, tablets, etc.) to access the application, as well as records of access from different geographical locations, which helps detect whether there is abnormal access behavior (such as the user account being logged in from a different location). The setting information in the application is also part of the access information, such as whether the user has enabled the fingerprint quick login function, whether to receive notification messages from the access control system, etc. In addition, data analysis can be performed on access information to explore user behavior patterns, such as whether users have fixed entry and exit time patterns. Based on these patterns, personalized service recommendations can be provided to users (such as pushing weather information before users' regular entry and exit times, etc.). It can also be used to optimize the resource allocation of the access control system (such as preparing server resources in advance during peak access times to ensure system response speed).
[0026] S102: Process the biometric information of the target user to generate identity attribute information of the target user.
[0027] In one implementation, the identity attribute information of the target user includes the identity information of the target user and the emotion information of the target user.
[0028] The target user's biometric information is processed to generate initial facial image information and the target user's identity information. When the user approaches the outdoor station, the outdoor station's high-definition camera captures the user's facial image, which is the original facial image data. Through image preprocessing techniques such as grayscale, noise reduction, and cropping, it is converted into initial facial image information suitable for subsequent processing. For example, the color image captured by the camera has a resolution of 1920×1080 pixels. After grayscale processing, it becomes a single-channel grayscale image, resized to 640×480 pixels, removing background noise interference, and only retaining key areas containing facial features (such as a certain range centered on the eyes, nose, and mouth).
[0029] At the same time, the face recognition algorithm is used to extract features from the initial face image and compare it with the user face feature template pre-stored in the database. Assuming that the database stores the identity information of the residents in the community and the corresponding face feature data, after comparison and matching, it is determined that the user is "Zhang San", whose identity information includes name "Zhang San", resident number "001234", residential unit "Room 502, Building 3", contact number "138xxxx5678", etc.
[0030] The initial facial image information is processed based on the preset processing rules to generate the influencing factors of the target user's facial expression characteristics. The initial facial image information is further analyzed, and the key facial feature points, such as the corners of the eyes, the corners of the mouth, and the center of the eyebrows, are first detected. Through the coordinate information of these feature points, the data feature set such as the shape and position relationship of the facial features is calculated. For example, the degree of eye opening (expressed as the ratio of the distance between the upper and lower eyelids to the height of the eyes), the opening angle of the mouth (calculated by the coordinates of the corners of the mouth), the tilt angle of the eyebrows (the angle between the line from the center of the eyebrows to the tip of the eyebrows and the horizontal direction) and so on are calculated.
[0031] Then, these data feature sets are classified and processed. For example, the degree of eye opening is divided into three categories: "large, medium, and small", the mouth opening angle is divided into three categories: "open, closed, and slightly open", and the eyebrow tilt angle is divided into three categories: "upward, horizontal, and drooping", etc., to obtain the classification information of the target face. Then, combined with the ambient light information during image acquisition (obtained by the photoresistor value of the door machine, etc.), the impact of light on the display of facial features is analyzed. For example, when the light is dim, the facial details are not clear, which will affect the accuracy of judging certain facial features. Combining these facial feature information and light information, the influencing factors of the target user's facial features are generated. For example, if the degree of eye opening is "small", the mouth is "closed", the eyebrows are "horizontal", and the light is dim, the generated facial feature influencing factors are "in a calm state, but the light factor affects the judgment".
[0032] Based on the preset emotion recognition model, the target user's expression feature influencing factors are processed to generate target face image information, wherein the target face image information includes the target user's expression change information. The above generated target user's expression feature influencing factors are input into the preset emotion recognition model. The model is a neural network model trained based on a deep learning algorithm, which has learned a large number of relationships between different expression features and emotions. For example, after the model receives the characteristic influencing factors of "small" eye opening, "closed" mouth, "horizontal" eyebrows, and dim light, after complex internal calculations, it determines that the user's current expression change information is "calm or slightly sleepy", and marks the corresponding expression category and confidence in the target face image information (such as calm: 0.7, sleepy: 0.3). At the same time, the model can also track the dynamic changes of expression based on the analysis of multiple consecutive frames of images. For example, if the previous frame image is judged to be "calm", the current frame image is combined with the new characteristic influencing factors, and it is judged that the expression has a certain trend of change in the direction of "sleepy", which will also be recorded in the target face image information.
[0033] The target face image information is processed to generate the target user's emotional information. The user's emotional information is further determined based on the expression change information in the target face image information. If the expression category in the target face image information is "calm or slightly sleepy" and the confidence is high, combined with other auxiliary information (such as the current time is 2 a.m. and the user has just finished the night shift and returned home), the user's emotion is comprehensively judged to be "tired". For example, if the expression change information shows that the eyes suddenly open wide, the mouth opens slightly, the eyebrows rise, and there is no obvious abnormal stimulus source in the environment (such as a sudden sound or strong light), the user's emotion is judged to be "surprised". Emotional information can be represented by text labels (such as "happy", "sad", "angry", "surprised", "tired", etc.) and corresponding numerical values (such as an emotional intensity value between 0-1, 0 means no such emotion, 1 means the emotion is very strong) so that the subsequent system can perform more accurate processing.
[0034] Generate the target user's identity attribute information based on the target user's identity information and the target user's emotional information. Generate the target user's identity attribute information by integrating the target user's identity information (such as "Zhang San", resident number "001234", etc.) and emotional information (such as "tired"). For example, the identity attribute information can be expressed as a structured data format: {"name": "Zhang San", "resident number": "001234", "residence unit": "Room 502, Building 3", "contact number": "138xxxx5678", "emotional state": "tired"}. This identity attribute information can be used by the access control system for a variety of purposes, such as giving a warm reminder when opening the door based on the user's emotional state ("Zhang San, you look very tired, please take a rest."); or recording the user's entry and exit status and the emotion at the time in the management background of the access control system for subsequent data analysis (such as counting the entry and exit frequency of users with different emotional states in different time periods, etc.), further optimizing the access control management strategy or providing personalized services.
[0035] In another embodiment, the initial facial image information is processed based on a preset processing rule to generate the influencing factors of the target user's expression features, including: processing the initial facial image information to generate a data feature set, wherein the data feature set is used to characterize the facial features corresponding to different expression information; classifying the data feature set to generate target facial classification information; processing the target facial classification information to generate facial features information and light information matching the facial features information; processing the facial features information and light information matching the facial features information to generate the influencing factors of the target user's expression features. Specifically, firstly, the initial facial image information is processed, and a facial feature point detection algorithm (such as a facial key point detection model based on deep learning) is used to locate the key feature points in the facial image, such as the corners of the eyes, the center of the pupil, the corners of the mouth, the midpoint of the lips, the tip of the nose, the edge of the nose wing, the beginning and end of the eyebrows, etc. Taking the eyes as an example, the feature data of the eyes are calculated through the feature point coordinates, including the aspect ratio of the eyes (the ratio of the width to the height of the eyes), the pupil distance (the distance between the centers of the pupils of the two eyes), the degree of eyelid opening and closing (the vertical distance between the upper eyelid and the lower eyelid), etc. For the mouth, the aspect ratio of the mouth, the angle of the mouth corners rising or falling, and other features are calculated. For the nose, the width of the nose wing and the length of the nose bridge can be calculated. Combining these feature data calculated for different facial features together, a data feature set is formed to characterize the facial features corresponding to different expression information. For example, a data feature set is {eye aspect ratio: 0.45, pupil distance: 50 pixels, eyelid opening and closing degree: 0.2 (indicating a slightly closed state), mouth aspect ratio: 0.8, mouth corners rising angle: -5° (indicating a slightly drooping mouth corner), nose wing width: 30 pixels, nose bridge length: 80 pixels}. These feature values can reflect that the current face is in a certain expression state, such as a tendency to look slightly tired or unhappy.
[0036] The generated data feature set is classified and processed. Taking the feature data of the eyes as an example, the classification threshold of the aspect ratio of the eyes is set. Assume that when the aspect ratio of the eyes is greater than 0.5, the eye state is classified as "wide open"; between 0.3-0.5, it is classified as "normal"; less than 0.3 is classified as "squinting". For the pupil distance, if it is greater than a certain proportion of the average pupil distance (such as 1.2 times), it is classified as "distracted pupils" (indicating states such as surprise or inattention); within the normal range, it is classified as "normal pupil distance"; less than a certain proportion (such as 0.8 times) is classified as "pupil convergence" (indicating states such as concentration or anger). In terms of the classification of the feature data of the mouth, a mouth with a width-to-height ratio greater than 1 and a mouth corner upward angle greater than 10° is classified as "laughing"; a width-to-height ratio between 0.6-1 and a mouth corner upward angle between 0-10° is classified as "smiling"; a width-to-height ratio less than 0.6 and a mouth corner drooping angle greater than 5° is classified as "pouting" (indicating unhappiness, etc.). By classifying the data of each facial feature, the target face classification information is generated. For example, for a certain frame of face image, its target face classification information is {eye state: "squinting", pupil distance state: "normal pupil distance", mouth state: "pouting"}, which indicates that the face image shows an unhappy expression with slightly squinting eyes at the current moment.
[0037] The facial features are further extracted based on the target face classification information. For the eyes, if they are classified as "squinting", the facial features record the specific squinting degree of the eyes (such as the specific value of the eyelid opening and closing degree is 0.2) and the position information of the eyes in the image (such as the position of the center coordinates of the eyes in the image). If the mouth is "pouting", the shape characteristics of the mouth (such as the shape parameters of the lip curve) and the position information are recorded. At the same time, the light information is obtained through the photoresistor value of the door machine. Assuming that the photoresistor value is 1000Ω (corresponding to a certain range of light intensity), it is converted into a light intensity level, such as "medium light intensity". And analyze the influence of light direction on the display of facial features. For example, light from the left side will cause a shadow on the right side of the face, which reduces the contrast of the facial features on the right side in the image. These light direction and shadow influence information are also recorded as part of the light information. In this way, the facial feature information and light information together constitute an information set that comprehensively describes the impact of light on the current facial state, for example, {eye features: {squinting degree: 0.2, position coordinates: (100, 200), impact of light: {light intensity: "medium light intensity", shadow impact: "shadow on the right side of the face, reduced contrast"}}, mouth features: {shape parameters: [specific curve parameter values], position coordinates: (150, 300), impact of light: {light intensity: "medium light intensity", shadow impact: "shadow on the right side of the face, slightly darker lips"}}}.
[0038] The facial features information and light information are combined to generate the influencing factors of the target user's facial expressions. If the facial features information shows that the eyes are squinting deeply, the mouth is in a pouting state, and the light information shows that the light intensity is medium but there are facial shadows that affect the clarity of the facial features, the generated facial features influencing factors are "the expression is unhappy or uncomfortable, the light conditions have a certain interference with the expression judgment, and it is necessary to analyze carefully". For another example, if the facial features information shows that the eyes are open normally but the pupils are gathered, the mouth is normal, and the light information shows that the light is dark and uniform (such as a high photoresistance value, indicating that the ambient light is dark), then the facial features influencing factors are "the expression seems normal but is in a state of concentration, the dark light conceals some subtle changes in expression, and further observation or combined with other information is needed to judge". These facial features influencing factors can provide richer contextual information for subsequent emotion recognition models, help to more accurately judge the user's emotional state, and then affect the relevant decisions of the access control system, such as whether to provide special prompts or services.
[0039] S103, obtaining an initial outdoor machine QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial outdoor machine QR code generation model.
[0040] In one embodiment, the training data set includes other user data that matches the target user's emotional information. The initial door machine QR code generation model is a complex system for generating a specific QR code based on the target user's relevant information. Its main components include a data acquisition and preprocessing module, a feature extraction and encoding module, an encryption and security module, an error correction encoding module, a QR code generation module, and a model training and optimization module. The following is a detailed description of each component:
[0041] Data collection and preprocessing module: responsible for collecting the target user's identity attribute information (such as name, resident number, residential unit, contact number, emotional state, etc.) and the target application's access information (such as access time, access frequency, operation records, etc.). Clean and preprocess the collected data to remove noise and invalid data to ensure the accuracy and completeness of the data. For example, correct or mark abnormal access times (such as time points that are obviously inconsistent with normal usage patterns), fill in missing emotional state information with default values or supplement it through other related data speculation. Obtain user identity information through the database interface of the access control system and extract access information from the application's logging system. Use data validation algorithms and rules, such as range checks and format checks, to clean the data; use data interpolation or mean filling methods to handle missing data.
[0042] Feature extraction and encoding module: Extract key features from preprocessed user information and convert it into a format suitable for encoding into a QR code. For example, convert the user's ID number into a specific binary encoding format, and map the access frequency to a numerical range before encoding. According to the preset encoding rules, combine these features into an information sequence to prepare for subsequent encryption and generation of QR codes. Design feature extraction algorithms and use different extraction methods for different types of information. For example, for text-based name information, extract its character features and convert them into corresponding ASCII codes or other encoding forms; for numerical access frequencies, normalize them and encode them. Use a coding table or algorithm to combine the extracted features into an information sequence in a certain order, such as using efficient coding algorithms such as Huffman coding to reduce the length of the code.
[0043] Encryption and security module: Encrypt the encoded user information to ensure the security of the QR code transmission and storage process and prevent user information leakage. A variety of encryption algorithms can be used, such as symmetric encryption algorithms (such as AES algorithm) or asymmetric encryption algorithms (such as RSA algorithm), and the appropriate encryption method can be selected according to the security requirements and performance requirements of the system. If symmetric encryption is used, a random key is generated and the encoded information is encrypted with the key; if asymmetric encryption is used, the information is encrypted with the public key, and the private key is securely stored by the access control system for decryption. During the encryption process, technologies such as digital signatures are also added to verify the integrity and source authenticity of the information to prevent the QR code from being tampered with.
[0044] Error correction coding module: In order to improve the fault tolerance of the QR code, an error correction code is added to the encrypted information. In this way, even if part of the QR code image is damaged or blocked during the scanning process, the original information can be restored through the error correction code to ensure the normal recognition of the QR code. According to the type of QR code and the expected fault tolerance level, select a suitable error correction coding algorithm, such as the Reed-Solomon error correction code algorithm. Take the encrypted information as input, generate the corresponding error correction code according to the rules of the error correction coding algorithm, and append it to the information sequence. For example, according to the version of the QR code and the error correction level requirements, calculate the number of error correction code bits that need to be added, and then generate a specific error correction code value through the algorithm.
[0045] QR code generation module: Convert the final information sequence containing user information, encrypted data and error correction code into a visual QR code image. According to the display requirements of the access control system and the compatibility of the equipment, determine the image format (such as black and white QR code or color QR code), size and resolution of the QR code. Use a QR code generation library (such as ZXing library or other open source QR code generation library), input the information sequence into the library function, and generate a QR code image according to the set parameters. In the process of generating the image, the appearance of the QR code will be optimized, such as adjusting the contrast and clarity of the image, adding some logos or decorative elements (such as community name, access control system logo, etc.) to make it easier to identify and beautiful.
[0046] Model training and optimization module: Use the training data set to train the initial door machine QR code generation model and adjust the parameters in the model to improve the accuracy and performance of QR code generation. Optimize the model based on the training results and actual usage feedback, and continuously improve the model generation strategy and algorithm. Obtain a large amount of sample data from the training data set (including the identity and access information of different users and the corresponding QR code recognition results, etc.) and input it into the model for training. By calculating the error between the QR code generated by the model and the actual expected result, use optimization methods such as the back propagation algorithm to adjust the parameters in the model (such as the weights in the feature extraction algorithm, the parameters in the encoding rules, etc.).
[0047] Evaluate the model regularly and use test data sets to verify the performance of the model, such as the speed of QR code generation, recognition success rate, etc. Improve the model based on the evaluation results, such as adjusting the strength of the encryption algorithm, optimizing the efficiency of error correction coding, etc., to adapt to the ever-changing access control environment and user needs.
[0048] The target user's identity attribute information consists of the following parts. Specifically, the identity information part includes: Name: For example, the user name is "Zhao Liu", which is the name registered by the user in the access control system. It is used to uniquely identify the user's identity and is associated with other user information in the database of the access control system, such as door opening authority, residential address, etc. Resident number: Assumed to be "007890", it is similar to the specific number of the ID card number in the access control system. It is an important identifier for internal management of users in the system. It may correspond to the resident file number of the community management department, which is convenient for information query and statistics. Residential unit: For example, "Room 202, Building 6", which clearly specifies the specific location of the user's residence. The access control system can limit the user's access rights based on this information, such as only allowing access to the access control of this unit building. Contact number: "139xxxx2345", used to contact the user when needed. For example, when the user's access control authority is abnormal or there is an important notification, the system can inform the user by SMS or phone.
[0049] The emotional information part includes: when the user approaches the door machine, the camera captures the user's facial expression, and analyzes the user's emotions through expression recognition technology. For example, if the user is smiling, with bright eyes and upturned corners of the mouth, it may be identified as a "happy" emotional state; if the brows are furrowed and the eyes are serious, it may be judged as a "serious" or "worried" emotional state. Emotions can also be inferred based on the user's recent operating behavior and time patterns in the access control application. For example, if the user frequently uses the access control late at night and operates slowly, it may be inferred that he is in a "tired" or "hurried" emotional state; if the user frequently enters and exits during holidays and has a relaxed and happy expression, he may be in a "happy" emotional state.
[0050] Other related attributes include: Assuming that the user's age is 35 years old calculated from the date of birth filled in by the user when registering with the access control system, the age information can be used for some personalized access control services, such as setting special reminders or access permissions for the elderly or children. For example, if the user's occupation is "teacher", the access control system can provide teacher users with fast access channels or special permissions during specific time periods (such as school classes) based on their occupational information, so that they can enter and exit the community for teaching-related activities. If the user is a community volunteer, the system will mark them as "volunteers". When the community organizes activities or needs assistance, these users can be quickly identified and contacted. At the same time, volunteers may have additional access permissions or functions during specific activities (such as free access to the event venue and related access control during community activities).
[0051] The training data set is a large data set used to optimize the initial door machine QR code generation model mentioned above. It contains a large number of other user data with similar access behaviors and characteristics to the target user. Take a training data set with 1,000 samples as an example. Each sample contains the following types of information: Basic user information: name, resident number, residential unit, etc., such as {"name":"Wang Wu","resident number":"003456","resident unit":"Room 401, Building 2"}. The user's access time on different dates and time periods, as well as the total number of visits and average access frequency over a period of time are recorded in detail. For example, {"visit time list":["2023-08-0107:15:00","2023-08-0118:30:00","2023-08-0207:20:00",...],"total number of visits":200,"average access frequency":3.5 times / day}. Covers various operations performed by users within the application, such as door opening records, types of announcements viewed, water and electricity bill inquiry history, etc. For example, {"operation record":["door opening","view community activity announcements","query August water and electricity bills","door opening",...]}.
[0052] Environmental related information, including the light intensity of the environment where the outdoor machine is located during each visit (converted from the photoresistor value), weather conditions (such as sunny, cloudy, rainy, etc., which can be obtained by connecting to the meteorological data interface), etc., such as {"Light intensity value list": [500Ω, 800Ω, 1000Ω,...],"Weather condition list": ["Sunny", "Cloudy", "Light rain",...]}. QR code recognition result information, records the recognition result, success or failure, and the reason for failure (such as fuzzy QR code, light interference, etc.) when using the previously generated QR code to open the door, for example {"Recognition result list": ["Success", "Success", "Failure-QR code fuzzy",...]}.
[0053] By learning from these sample data, the model can analyze the relationship between different access behaviors, environmental conditions and other factors and QR code generation and recognition, so as to adjust the model parameters and improve the accuracy and adaptability of QR code generation to better serve the access control needs of target users in various scenarios. For example, if it is found that the failure rate of QR code recognition is high when the light intensity is low during a certain period of time, the model can learn optimization strategies such as appropriately increasing the brightness or contrast of the QR code in this case, and perform corresponding processing in advance when generating QR codes for target users.
[0054] S104, processing the initial outdoor machine QR code generation model based on the training data set to generate a target outdoor machine QR code generation model.
[0055] In one implementation, any number of data features in the training data set are obtained. Assume that the training data set contains 1000 data samples, each sample has 10 data features, namely user access time (in minutes, value range 0-1440), access frequency (number of visits per day, value range 0-10), ambient light intensity (value converted from photoresistor value, value range 0-2000), user emotional state (0-4 for calm, slightly happy, happy, slightly unhappy, unhappy), application operation type (0-3 for opening the door, viewing notifications, checking fees, other operations), user age (value range 18-80), user gender (0 for male, 1 for female), residential floor (value range 1-30), whether it is a holiday (0 for no, 1 for yes), whether to carry items (0 for no, 1 for yes). Randomly select 50 data samples from them, obtain all the data features in these 50 samples, and form a 50×10 data matrix. The 10 eigenvalues of each sample constitute a row in the matrix. This is the data features of any number (50) obtained.
[0056] Generate adjacent features based on the distance between any number of data features and other numbers of data features of the same category, where the adjacent features include a preset number of any number of data features. For the 50 selected data features, calculate the distance between them. Here, the Euclidean distance formula is used to calculate the distance between two data feature vectors. For example, for sample 1 (feature value is [120,3,500,1,0,35,0,10,0,0]) and sample 2 (feature value is [150,2,600,0,1,40,1,15,0,1]). According to the calculated distance, select the 10 data features with the closest distance (the preset number is 10) as the adjacent features of each data feature. For example, for sample 1, find the features of the 10 other samples closest to it to form the adjacent feature set of sample 1. Perform this operation on all 50 samples to obtain 50 groups of adjacent features, each containing 10 adjacent features.
[0057] Based on the number of data features in the training data set, determine the sampling ratio, and based on the sampling ratio, determine the sampling rate. Count the number of all data features in the training data set, assuming that there are a total of 10,000 data features (1,000 samples, 10 features per sample). Set the target number of data features to be sampled to 2,000 (determined based on factors such as model training requirements and computing resources), then the sampling ratio is 0.2. Determine the sampling ratio based on the sampling ratio. The sampling ratio can be determined according to certain rules, such as using a linear sampling ratio, that is, gradually increasing from the starting sampling ratio (such as 0.1) to the ending sampling ratio (such as 0.3). Assume that the sampling process is divided into 10 stages, and the rate of increase in each stage is. In the first stage, the sampling ratio is 0.1, the second stage is 0.12, and so on, the tenth stage is 0.3.
[0058] Adjacent features are sampled based on the sampling ratio to generate a preset number of sampled features. In the first sampling stage, the sampling ratio is 0.1. For the adjacent features of each sample (10 in each group), sampling is performed at a sampling ratio of 0.1, that is, 1 feature is randomly selected from each adjacent feature set (). In this way, for 50 groups of adjacent features, a total of 50 sampled features will be obtained. In subsequent sampling stages, according to the gradually increasing sampling ratio, such as when the sampling ratio is 0.12 in the second stage, 1.2 features are randomly selected from each adjacent feature set (rounded up to 2 features) to obtain a new set of sampled features. Repeat this process until all sampling stages are completed, and finally a preset number (2000) of sampled features are obtained.
[0059] Based on any data feature and each sampling feature, multiple data groups are generated, wherein each data group contains a preset number of data samples, and at least one data sample includes identification information. For any data feature among the 50 data features randomly selected previously (such as the feature value of sample 1 [120, 3, 500, 1, 0, 35, 0, 10, 0, 0]), it is combined with the sampling features obtained in each sampling stage to form a data group. Assuming that one of the sampling features obtained in a certain sampling stage is [130, 2, 550, 0, 1, 38, 1, 12, 0, 1], they form a data group [120, 3, 500, 1, 0, 35, 0, 10, 0, 0, 130, 2, 550, 0, 1, 38, 1, 12, 0, 1]. Each data group contains 20 data samples (the original 10 features plus the 10 sampling features, the preset number is 20). Repeat this process, combine sample 1 with each sampling feature, and obtain multiple data groups. This operation is performed on all 50 original data features, and finally a large number of data groups are generated. Among them, at least one data sample in each data group (which can be an original data feature or a sampled feature) contains identification information, such as whether the user corresponding to the data sample has ever encountered an abnormal situation in QR code recognition (0 indicates normal and 1 indicates abnormal).
[0060] The initial outdoor machine QR code generation model is trained based on the data samples in the multiple data sets to generate the trained outdoor machine QR code generation model. The trained outdoor machine QR code generation model is processed based on the test set to generate the test results. If the data sample containing the identification information in the test result indicates that the outdoor machine QR code is in an abnormal state, the trained outdoor machine QR code generation model is used as the target outdoor machine QR code generation model. The generated multiple data sets are input into the initial outdoor machine QR code generation model for training. The model learns how to generate more accurate and more adaptable QR codes for different scenarios based on the feature information in the data set. For example, it learns that when the light is dim (the ambient light intensity feature value is low) and the user's emotion is slightly unhappy (the emotional state feature value is 3), the QR code generation parameters are adjusted, such as increasing the brightness or contrast of the QR code. The trained model is tested using an independent test set. The test set contains some data samples that are not involved in the training, and also has the above-mentioned various feature information and corresponding QR code recognition results (normal or abnormal). The data samples in the test set are input into the trained model, the model generates the corresponding QR code, and compares it with the actual recognition result to generate the test result. For example, there are 200 data samples in the test set. After being processed by the model, the QR code recognition results generated by 180 samples are consistent with the actual results (with an accuracy rate of 90%). If the test results contain a large number of data samples with identification information (such as QR code recognition anomalies), and the model has poor processing capabilities for these anomalies (such as the generated QR code cannot be accurately recognized in abnormal environments), it may be necessary to further adjust the model parameters or improve the model structure; if the model performs well in handling these anomalies and has a high overall accuracy rate, the trained door machine QR code generation model is used as the target door machine QR code generation model and used to generate QR codes for users in the actual access control system.
[0061] S105, processing the photoresistor value of the outdoor station to generate environmental scene information of the outdoor station.
[0062] In one implementation, the photoresistor value of the outdoor machine is processed based on a preset ambient light preset table to generate light intensity information of the target outdoor machine. The light intensity information of the target outdoor machine is processed to generate target light adjustment information, wherein the target light adjustment information is used to represent the light intensity adjustment of the target door lock, and the environmental scene information of the outdoor machine is generated based on the target light adjustment information.
[0063] Assume that the preset ambient light table is as follows:
[0064]
[0065] When the outdoor station detects that the photoresistor value is 3000Ω, we can calculate the light intensity by linear interpolation. 3000Ω is between 4000Ω and 2000Ω. Assuming the corresponding light intensity is, according to the linear interpolation formula: ;in, (Light intensity corresponding to 4000Ω), (light intensity corresponding to 2000Ω), R=3000 (current photoresistor value), , . =1500lux. So the light intensity information of the target outdoor station is 1500lux.
[0066] Generate target light adjustment information and set the light adjustment strategy rules as follows: When the light intensity is less than 500 lux, turn on the fill light to maximum power (set to 100% brightness) and set the camera exposure time to the longest (such as 1 / 30 second) to enhance light collection and ensure clear imaging of the QR code. When the light intensity is between 500-1500 lux, turn on the fill light to medium power (set to 50% brightness) and set the camera exposure time to moderate (such as 1 / 60 second) to supplement a certain amount of light while avoiding overexposure of the image due to excessive brightness. When the light intensity is greater than 1500 lux, turn off the fill light and set the camera exposure time to a shorter time (such as 1 / 120 second) to prevent the QR code image from being overexposed due to excessive light. Since the current light intensity is 1500 lux, according to the above rules, the target light adjustment information is: turn on the fill light to 50% brightness and set the camera exposure time to 1 / 60 second. This means that the system will control the outdoor station's fill light output power to 50% and adjust the camera's exposure parameters to adapt to such lighting conditions, so that the QR code image can be captured clearly for subsequent identification.
[0067] Generate the environment scene information of the outdoor station, and adjust the information according to the target light. The generated environment scene information of the outdoor station can be described as: "Medium light scene, the fill light is turned on to 50% brightness for auxiliary lighting, and the camera has been adjusted to the parameters suitable for this light (exposure time 1 / 60 second)". At the same time, detailed information such as light intensity value (1500lux), fill light status (on, 50% brightness), camera parameters (exposure time 1 / 60 second) can also be integrated into a data structure for recording and transmitting environment scene information. For example: {"Environment scene":"Medium light scene","Light intensity":1500,"Fill light status":"On, 50% brightness","Camera exposure time":"1 / 60 second"}. These environment scene information can be used by the access control system for various purposes, such as recording the working status of the access control equipment in different environments for subsequent analysis and optimization of the light adjustment strategy; it can also be saved as log information for troubleshooting or statistics on access control usage in different scenarios.
[0068] S106, processing the target user's identity information and the target application's access information based on the target outdoor station QR code generation model to generate initial outdoor station QR code information.
[0069] In one implementation, the target user's identity information is processed based on the target outdoor station QR code generation model to generate the target user's identity information. Assume that the target user's identity information is {"name":"Sun Qi","resident number":"009123","resident unit":"Room 101, Building 7","contact number":"133xxxx4567"}. The target outdoor station QR code generation model first encodes this information, for example, converts the name into a combination of the first letters of the pinyin capital letter "SYQ", the resident number remains unchanged "009123", the residential unit is converted to a digital code "0701" (Room 101, Building 7), and the contact number takes the last four digits "4567". Then, these encoded information are encrypted by a specific encryption algorithm (such as MD5 encryption) to obtain an encrypted string "e8c2c97c3d6919b89d477b9c43535044", which is the target user's identity information. This identity information can be used as a unique identifier for the user when a QR code is subsequently generated, ensuring that the access control system can accurately identify the user. At the same time, encryption processing ensures the security of user information and prevents information leakage.
[0070] The target application's access information is processed based on the target outdoor station QR code generation model to generate the target application's access time and target application's access frequency. The target outdoor station QR code generation model obtains the target application's access information from the application access log recorded by the access control system. Assume that in the past week, the user's access time records for the access control application are as follows: "2023-11-0107:20:00", "2023-11-0118:35:00", "2023-11-0207:15:00", "2023-11-0219:00:00", "2023-11-0307:30:00", "2023-11-0318:45:00", "2023-11-0407:25:00". The model analyzes these access times and extracts the first and last access times of each day, obtaining the access time range of 7:15-7:30 a.m. and 18:35-19:00 p.m. The access frequency is calculated at the same time. There are 7 visits in a week, about 2 visits per day, and the average access frequency is about 2 times per day. These access time and access frequency information can reflect the user's daily travel patterns, which is of great significance for access control system optimization services (such as preparing system resources in advance before the user's usual access time to improve recognition speed) and security management (such as early warning when abnormal access time or frequency changes are found).
[0071] The access time and access frequency of the target application are processed to generate the identification information of the target application. The model further processes the access time and access frequency information of the target application. The access time range is converted into a specific coding format, for example, 7:15-7:30 in the morning is coded as "0715-0730", and 18:35-19:00 in the evening is coded as "1835-1900". For the access frequency, according to the set frequency level classification (such as 0-1 times / day is low frequency, 2-3 times / day is medium frequency, and 4 times or more / day is high frequency), the access frequency of about 2 times a day is marked as "medium frequency" and coded as "02". These codes are combined to form the identification information of the target application "0715-0730_1835-1900_02". This identification information can be used as a feature identifier of the application usage mode, and when generating a QR code, it works together with the user identity identification information, so that the QR code contains more information about the user's behavior habits, so that the access control system can provide personalized services or carry out targeted security management according to the usage patterns of different users. For example, identification resources can be allocated preferentially to medium-frequency access users during peak hours, or additional identity authentication can be performed for users with abnormal access times.
[0072] The target user's identity information and the target application's identification information are processed to generate the preset unlocking information of the target door lock. The preset unlocking information of the target door lock is generated by combining the target user's identity information and the target application's identification information. Assume that the target user's identity information is "e8c2c97c3d6919b89d477b9c43535044" and the target application's identification information is "0715-0730_1835-1900_02". The model concatenates these two pieces of information to obtain "e8c2c97c3d6919b89d477b9c43535044_0715-0730_1835-1900_02". The spliced information is then encrypted again (such as using the SHA-256 algorithm) to obtain the encrypted preset unlock information "89f7d6a3c2b1e5f4d3c0b2a19876543210fedcba9876543210fedcba". This preset unlock information contains comprehensive information about the user's identity and application usage mode, and will be used as one of the key data for generating a QR code. It is used by the access control system to verify the user's unlocking authority when recognizing the QR code, ensuring that only legitimate users and those in accordance with their normal usage mode can successfully unlock the access control.
[0073] The preset unlock information of the target door lock is processed to generate the initial outdoor station QR code information. Based on the preset unlock information of the target door lock "89f7d6a3c2b1e5f4d3c0b2a19876543210fedcba9876543210fedcba", the target outdoor station QR code generation model converts it into the QR code format. The model will encode the encrypted information into a black and white square pattern (QR code) according to the preset QR code encoding rules. For example, using the QR code standard encoding method, each character in the preset unlock information is converted into a specific binary code, and then an error correction code is added according to the QR code error correction encoding rules (such as Reed-Solomon error correction code) to improve the fault tolerance of the QR code. Finally, an initial outdoor station QR code information is generated, and its image form can be scanned and recognized by the camera of the access control system, and after recognition, the information in the QR code can be compared with the preset unlock information through the decoding and verification process to determine whether the user has the right to open the door. If the information matches and the verification is successful, the access control system will execute the door opening operation; otherwise, the door opening will be refused and a corresponding prompt may be issued.
[0074] S107, generating target outdoor station QR code information based on the target outdoor station QR code generation model for the environmental scene information of the outdoor station and the initial outdoor station QR code information.
[0075] In one implementation, the environment scene information of the outdoor machine is processed based on the target outdoor machine QR code generation model to generate a first light adjustment value. The target outdoor machine QR code generation model includes a calculation formula for obtaining the first light adjustment value and the second light adjustment value, and the calculation formula for the first light adjustment value is:
[0076] ;in, is the first light adjustment value, It is the light intensity information of the target outdoor station (obtained from the photoresistor value of the outdoor station through the preset ambient light table). is the preset reference light intensity, ( ) indicates the deviation of the current light intensity from the reference value. The greater the deviation, the more significant the impact on light adjustment (through the coefficient adjust). is the access time of the target application, and its square root is calculated This is to make the effect of access time on light adjustment present a nonlinear relationship. For example, when the access time increases in the early stage, the light adjustment amplitude changes relatively little. As the access time increases, the light adjustment amplitude increases faster (by control). D is the access frequency of the target application, It is to change the access frequency. When the access frequency is low, its impact on the light adjustment value is relatively small. As the frequency increases, the impact gradually increases (by Decide). , , , , They are all weight coefficients, which are used to accurately adjust the contribution of each parameter in the calculation; , In the exponential term of the denominator, the characteristics of the exponential function are used to comprehensively consider the influence trend of the complex relationship between multiple parameters on the light adjustment value; for example, when the light intensity, access time and access frequency change at the same time, this term can make the overall calculation result present different change rates to adapt to the complex actual scene requirements.
[0077] Assume that the light intensity information I of the target outdoor station is 800 lux (obtained by processing the photoresistor value through the preset ambient light table), the preset reference light intensity The access time A of the target application is 100 minutes (assuming that the user has used the application to open the door over the past period of time), and the access frequency D is 5 times / day (the average number of times the application is used to open the door per day). Weight coefficient =0.3, =0.2, =0.1, =0.05, =0.03, =0.02.
[0078] First, calculate the light intensity deviation related part: =800-500=300. Square root of access time: = =10. Change of access frequency: = .
[0079] Compute the denominator exponential term: = .
[0080] Substitute the first light adjustment value formula to calculate: .
[0081] The initial outdoor machine QR code information is processed based on the target outdoor machine QR code generation model to generate a second light adjustment value. The calculation formula of the second light adjustment value is:
[0082] ;in, is the second light adjustment value, is the light intensity information of the target outdoor station (same as the definition in the first formula), Perform a sinusoidal transformation on the light intensity. is a frequency parameter used to adjust the periodic effect of light intensity in the calculation, so that the light adjustment value fluctuates in different light intensity ranges (determined by Control the fluctuation amplitude) to adapt to some special light environment changes. B is the identity information of the target user. Normalize the identity information so that the influence of the identity information on the light adjustment value varies between 0 and 1. Users with different identities can Adjusts its relative importance in light adjustments. is the preset unlock information of the target door lock. It is a hyperbolic tangent function, which is used to map the unlock information to between -1 and 1, and affects the light adjustment value (controlled by the degree of influence) according to the different states of the unlock information (such as normal unlock, abnormal unlock, etc.). , , , , , is the weight coefficient, , , The role of the denominator exponent term is similar to that in the first formula, and is used to consider the changing trend of the light adjustment value affected by multiple parameters to adapt to various complex actual scenes.
[0083] Specifically, the target user's identity information B is 0.6 after some encoding and processing (assuming it is a normalized value, indicating a relative value of the user's identity-related factors). The preset unlocking information E of the target door lock is 0.8 after a specific calculation (assuming that this value is related to factors such as the door lock status and user authority, and is an intermediate value before being mapped by the hyperbolic tangent function). Weight coefficient =0.25, =0.15, =0.1, , =0.05, =0.03.
[0084] Sine transformation of light intensity: = (The angle calculation results here need to be understood based on the radian system. In actual calculations, it is necessary to ensure that the parameter units of the trigonometric functions are correct).
[0085] The normalization of the identity information has been given as 0.6.
[0086] Hyperbolic tangent transformation of preset unlocking information: .
[0087] Compute the denominator exponential term: = . Substitute the second light adjustment value formula to calculate: .
[0088] The first light adjustment value and the second light adjustment value are processed to generate target light intensity information. Assume that according to the system setting, the target light intensity information V is the first light adjustment value and the second light adjustment value The weighted sum of and (These weights can be adjusted according to actual needs to balance the impact of different factors on light intensity). Calculate target light intensity information: This value will be used as the basis for subsequent adjustment of the light intensity of the QR code display. For example, it can be converted into an instruction value that actually controls the brightness of the fill light and the exposure parameters of the camera, so that the QR code can be displayed with the best light intensity under the current environment and user-related conditions, thereby improving the recognition success rate.
[0089] The initial outdoor station QR code information is processed based on the target light intensity information to generate the target outdoor station QR code information. The initial outdoor station QR code information is processed based on the target light intensity information V=64.635. Assume that the initial outdoor station QR code information is a QR code pattern containing user identity, application access information and other data generated according to a certain standard encoding (such as the QR code standard). Adjust the display properties of the QR code according to the light intensity information. For example, if the light intensity is high (such as ), the contrast of the QR code pattern can be appropriately reduced so that it can still be displayed clearly without being too glaring in a strong light environment; if the light intensity is low (such as ), the brightness and contrast of the QR code pattern are increased to improve its visibility in low-light environments. The specific adjustment method can be achieved by modifying the pixel values of the QR code image. For example, for brightness adjustment, the RGB value of each pixel can be increased (within a certain range); for contrast adjustment, the degree of difference between pixel values can be changed according to the contrast adjustment algorithm.
[0090] After adjustment, the final target door machine QR code information is obtained, which has a more appropriate display effect under the current environment scene and user-related conditions, which is convenient for the camera of the access control system to accurately and quickly identify, thereby improving the overall performance of the access control system and user experience. For example, in a strong light environment, the adjusted QR code may appear slightly lighter in color but still clearly recognizable; in a weak light environment, it is brighter and more prominent, ensuring that the access control system can efficiently identify the QR code and perform the corresponding door opening operation.
[0091] S108: Process the target door lock information based on the target door machine QR code information to generate an identification result of the target door lock.
[0092] In one implementation, the target door lock information includes the unique identification of the door lock (such as the door lock number "L001"), the door lock status (such as whether it is currently locked "locked", the power status "sufficient power (80%)", whether it is in an abnormal state (such as no abnormal alarm), etc.), and the door lock permission settings (such as which users or user types are allowed to unlock the door in which time periods, etc.). The target outdoor station QR code information includes the user's identity (such as the encrypted identity information generated by the previous steps), the access characteristics of the application (such as the access time range, access frequency and other coded information), and possible environmental scene related information (such as the ambient light intensity range recorded when the QR code is generated after light adjustment, etc.).
[0093] The access control system reads the user identity in the target door machine QR code information and compares it with the permission setting in the target door lock information. For example, if the user identity in the QR code is "e8c2c97c3d6919b89d477b9c43535044", the system searches for the permission corresponding to the identity in the door lock permission database. Assuming that the database records that the user has the permission to use the door lock within 24 hours a day, and the current door lock status is a normal unlockable state (not locked, sufficient power, no abnormalities), the preliminary match passes. At the same time, the system will also check other relevant information in the QR code information, such as whether the access characteristics of the application conform to the normal mode. If the access time range recorded in the QR code is "0715-0730_1835-1900", and the current time of scanning the QR code is 18:40, it is within the normal access time range, and the access frequency and other information are also normal (such as no abnormal high-frequency access in a short period of time), then further verification passes.
[0094] If all the above verifications are passed, the recognition result of the target door lock is "Opening authorization successful", the access control system sends an unlocking command to the door lock, the door lock executes the unlocking action, and the user can enter smoothly. If any mismatch or abnormality is found during the verification process, such as the user identity does not have the corresponding authority, the door lock is in a locked state (such as due to remote locking by the administrator or other reasons), insufficient power may affect the unlocking operation, and the access characteristics in the QR code information are abnormal (such as access at unauthorized times or abnormally high access frequency may indicate the risk of theft), etc., the recognition result is "Opening authorization failed", and the access control system will display the corresponding prompt information on the outdoor machine display (such as "No door opening authority, please contact the administrator" or "Door lock abnormal, please try again later", etc.), and may trigger the corresponding security mechanism (such as recording abnormal access attempts, sending alarm information to the administrator, etc.).
[0095] The application obtains the target door lock information, the photoresistor value of the door machine, the target user's biometric information and the application access information from the server. The biometric information is processed to generate identity attribute information, including identity information and emotional information. The process involves generating the initial face image information, obtaining the expression feature influencing factors and emotional information through the preset rules and emotional model processing, and then generating the identity attribute information. Then, the initial QR code generation model and training data set matching the identity attribute and access information are obtained, and the model is trained by data feature processing, sampling and other operations. If the abnormal state identification in the test result meets the requirements, it is determined to be the target model. Then, the light intensity information is obtained according to the photoresistor value through the preset table, and then the environmental scene information is generated. Based on the target model, the identity and access information are processed to obtain the initial QR code information, and then the first light adjustment value is generated in combination with the environmental scene information, and the second light adjustment value is generated for the initial QR code information. The two are processed to obtain the target light intensity information, thereby generating the target QR code information. Finally, the target door lock information is processed based on the target QR code information to generate the door lock recognition result, and adaptive adjustment is achieved according to multiple factors, so as to improve the accuracy, speed and traffic efficiency of QR code recognition and door opening, and improve the performance of the access control system.
[0096] In one embodiment, if Figure 2 As shown, the present application also provides a QR code recognition unlocking device suitable for a door machine, comprising:
[0097] The acquisition module 201 is used to acquire target door lock information, a photoresistor value of a target outdoor machine, biometric information of a target user, and access information of a target application; acquire an initial outdoor machine QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial outdoor machine QR code generation model, wherein the training data set includes other user data that matches the emotional information of the target user;
[0098] The processing module 202 is used to process the biometric information of the target user to generate the identity attribute information of the target user, wherein the identity attribute information of the target user includes the identity information of the target user and the emotional information of the target user; based on the training data set, the initial outdoor machine QR code generation model is processed to generate a target outdoor machine QR code generation model; the photoresistor value of the outdoor machine is processed to generate the environmental scene information of the outdoor machine; based on the target outdoor machine QR code generation model, the identity information of the target user and the access information of the target application are processed to generate the initial outdoor machine QR code information; based on the target outdoor machine QR code generation model, the environmental scene information of the outdoor machine and the initial outdoor machine QR code information are processed to generate the target outdoor machine QR code information; based on the target outdoor machine QR code generation model, the target outdoor machine QR code information is processed to generate the target outdoor machine QR code information; and the target door lock information is processed based on the target door lock QR code information to generate an identification result of the target door lock.
[0099] The present application embodiment provides an electronic device, such as Figure 3 As shown, the electronic device 3 includes a first processor 300, a memory 301, a bus 302 and a communication interface 303, and the first processor 300, the communication interface 303 and the memory 301 are connected via the bus 302; the memory 301 stores a computer program that can be run on the first processor 300, and when the first processor 300 runs the computer program, it executes the two-dimensional code recognition and unlocking method applicable to the door machine provided in any of the aforementioned embodiments of the present application.
[0100] The bus 302 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 301 is used to store programs, and the first processor 300 executes the programs after receiving the execution instruction. The two-dimensional code recognition unlocking method applicable to the door machine disclosed in any implementation of the embodiment of the present application may be applied to the first processor 300, or implemented by the first processor 300.
[0101] The first processor 300 is an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 300. The above-mentioned first processor 300 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 301, and the first processor 300 reads the information in the memory 301 and completes the steps of the above method in combination with its hardware.
[0102] The present application embodiment provides a computer-readable storage medium, such as Figure 4 As shown, the computer-readable storage medium stores 401 a computer program, and when the computer program is read and executed by the second processor 402, the aforementioned two-dimensional code recognition unlocking method applicable to a door machine is implemented.
[0103] The computer program product provided in the above-mentioned embodiments of the present application and the QR code recognition and unlocking method applicable to the door machine provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
Claims
1. A two-dimensional code recognition unlocking method suitable for a door machine, characterized in that: include: Obtain the target door lock information, the photoresistor value of the target outdoor station, the biometric information of the target user, and the access information of the target application; Processing the biometric information of the target user to generate identity attribute information of the target user, wherein the identity attribute information of the target user includes identity information of the target user and emotional information of the target user; Acquire an initial outdoor machine QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial outdoor machine QR code generation model, wherein the training data set includes other user data that matches the emotional information of the target user; Processing the initial outdoor machine QR code generation model based on the training data set to generate a target outdoor machine QR code generation model; Processing the photoresistor value of the outdoor station to generate environmental scene information of the outdoor station; Processing the target user's identity information and the target application's access information based on the target outdoor station QR code generation model to generate initial outdoor station QR code information; Generate target outdoor machine QR code information based on the target outdoor machine QR code generation model for the environmental scene information of the outdoor machine and the initial outdoor machine QR code information; The target door lock information is processed based on the target door machine QR code information to generate an identification result of the target door lock.
2. The method according to claim 1, characterized in that The biometric information of the target user is processed to generate identity attribute information of the target user, including: Processing the biometric information of the target user to generate initial facial image information and identity information of the target user; Processing the initial facial image information based on preset processing rules to generate expression feature influencing factors of the target user; Processing the influencing factors of the target user's expression characteristics based on a preset emotion recognition model to generate target face image information, wherein the target face image information includes expression change information of the target user; Processing the target face image information to generate emotion information of the target user; The identity attribute information of the target user is generated based on the identity information of the target user and the emotion information of the target user.
3. The method according to claim 2, characterized in that The initial face image information is processed based on preset processing rules to generate the influencing factors of the target user's expression characteristics, including: Processing the initial facial image information to generate a data feature set, wherein the data feature set is used to characterize facial features corresponding to different expression information; Classifying the data feature set to generate target face classification information; Processing the target face classification information to generate facial feature information and light information matching the facial feature information; The facial feature information and light information matching the facial feature information are processed to generate facial expression feature influencing factors of the target user.
4. The method according to claim 1, characterized in that The initial outdoor machine QR code generation model is processed based on the training data set to generate a target outdoor machine QR code generation model, including: Obtaining any number of data features in the training data set; Generate adjacent features based on the distance between the any number of data features and other numbers of data features of the same category, wherein the adjacent features include a preset number of the any number of data features; Determining a sampling ratio based on the number of each data feature in the training data set; Based on the sampling ratio, determining a sampling ratio; Sampling the adjacent features based on the sampling ratio to generate a preset number of sampling features; Based on any data feature and each sampling feature, generating multiple data groups, wherein each data group includes a preset number of data samples, and at least one data sample includes identification information; Training the initial outdoor machine QR code generation model based on the data samples in the plurality of data groups to generate a trained outdoor machine QR code generation model; Processing the trained door machine QR code generation model based on the test set to generate a test result; If the data sample containing identification information in the test result indicates that the outdoor station QR code is in an abnormal state, the trained outdoor station QR code generation model is used as the target outdoor station QR code generation model.
5. The method according to claim 1, characterized in that The photoresistor value of the outdoor station is processed to generate environmental scene information of the outdoor station, including: Processing the photoresistor value of the outdoor station based on a preset ambient light preset table to generate light intensity information of the target outdoor station; Processing the light intensity information of the target outdoor machine to generate target light adjustment information, wherein the target light adjustment information is used to represent the light intensity adjustment of the target door lock; The environmental scene information of the outdoor machine is generated based on the target light adjustment information.
6. The method according to claim 5, characterized in that The target user's identity information and the target application's access information are processed based on the target outdoor station QR code generation model to generate initial outdoor station QR code information, including: The target user's identity information is processed based on the target door machine QR code generation model to generate the target user's identity identification information; Processing the access information of the target application based on the target door machine QR code generation model to generate the access time and access frequency of the target application; Processing the access time and the access frequency of the target application to generate identification information of the target application; Processing the identity information of the target user and the identification information of the target application to generate preset unlocking information of the target door lock; The preset unlocking information of the target door lock is processed to generate initial door machine QR code information.
7. The method according to claim 6, characterized in that Generate target outdoor machine QR code information based on the target outdoor machine QR code generation model for the environmental scene information of the outdoor machine and the initial outdoor machine QR code information, including: Processing the environmental scene information of the outdoor machine based on the target outdoor machine QR code generation model to generate a first light adjustment value; Processing the initial outdoor machine QR code information based on the target outdoor machine QR code generation model to generate a second light adjustment value; Processing the first light adjustment value and the second light adjustment value to generate target light intensity information; Processing the initial outdoor station QR code information based on the target light intensity information to generate target outdoor station QR code information; The target outdoor station QR code generation model includes a calculation formula for obtaining a first light adjustment value and a second light adjustment value, and the calculation formula for the first light adjustment value is: ; in, is the first light adjustment value, is the light intensity information of the target outdoor station. is the preset reference light intensity, ( ) indicates the deviation of the current light intensity from the reference value. is the access time of the target application, D is the access frequency of the target application, It is to transform the access frequency. , , , , They are all weight coefficients, which are used to accurately adjust the contribution of each parameter in the calculation; The calculation formula of the second light adjustment value is: ; in, is the second light adjustment value, Perform a sinusoidal transformation on the light intensity. is a frequency parameter, B is the target user's identity information, Normalize the identity information. is the preset unlock information of the target door lock. is the hyperbolic tangent function, , , , , , is the weight coefficient.
8. A QR code recognition unlocking device suitable for a door machine, characterized in that: The device comprises: An acquisition module is used to acquire target door lock information, a photoresistor value of a target outdoor machine, biometric information of a target user, and access information of a target application; acquire an initial outdoor machine QR code generation model that matches the identity attribute information of the target user and the access information of the target application, and a training data set that matches the initial outdoor machine QR code generation model, wherein the training data set includes other user data that matches the emotional information of the target user; A processing module is used to process the biometric information of the target user to generate the identity attribute information of the target user, wherein the identity attribute information of the target user includes the identity information of the target user and the emotional information of the target user; based on the training data set, the initial outdoor machine QR code generation model is processed to generate a target outdoor machine QR code generation model; the photoresistor value of the outdoor machine is processed to generate the environmental scene information of the outdoor machine; based on the target outdoor machine QR code generation model, the identity information of the target user and the access information of the target application are processed to generate the initial outdoor machine QR code information; based on the target outdoor machine QR code generation model, the environmental scene information of the outdoor machine and the initial outdoor machine QR code information are processed to generate the target outdoor machine QR code information; based on the target outdoor machine QR code generation model, the target outdoor machine QR code information is processed to generate the target outdoor machine QR code information; 9. An electronic device, characterized in that: include: a first processor; and a memory for storing executable instructions of the first processor; Wherein, the first processor is configured to execute the two-dimensional code recognition unlocking method applicable to the door machine as described in any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the second processor, the two-dimensional code recognition unlocking method applicable to the door machine as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Remote checking method based on electronic certificate and related equipment
CN119128854A
Identity recognition method and related equipment
CN119150267A