Unlocking method and device based on data compression, equipment and storage medium

By extracting features and compressing the face images in the smart door lock, the problem of slow transmission speed caused by the large amount of face image data is solved, efficient and safe biometric data transmission is achieved, and the user experience and system stability are improved. sex.

CN118629113APending Publication Date: 2024-09-10GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410937018.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In smart door locks with face recognition functions, the large amount of face image data results in slow transmission speed, affecting the real-time performance and user experience of the system, and there are potential data security risks.

Method used

By collecting face images, extracting feature vectors, constructing serialized preset format strings, compressing them, and uploading them to the server using specified communication protocols (such as MQTT or HTTP), reducing data transmission size and increasing transmission rate , and decompress and compare the feature vector on the server side to send the unlocking signal.

Benefits of technology

It reduces the bandwidth occupied by data transmission, improves the transmission rate and user experience, and enhances the security of data transmission and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629113A
    Figure CN118629113A
Patent Text Reader

Abstract

The invention provides an unlocking method and device based on data compression, equipment and a storage medium, and the unlocking method based on data compression comprises the steps: collecting a human face image, carrying out the feature extraction of the human face image, determining a human face feature vector, and determining a serialized preset format character string according to the human face image and the human face feature vector, thereby facilitating the transmission. According to the method, the character string in the preset format is compressed to obtain compressed data, the compressed data is uploaded to the server through a specified communication protocol, and the transmission rate is improved by reducing the size of data transmission and reducing bandwidth occupation; the face feature vector is extracted from the compressed data through the server, the face feature vector is compared with the pre-stored feature vector, when the comparison result is that the face feature vector is the same as the pre-stored feature vector, the unlocking signal is sent for unlocking, the processing time of the whole process is shortened, and the user experience is better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method, device, equipment and storage medium for unlocking based on data compression. Background Art

[0002] In smart door locks with face recognition function, it is usually necessary to transmit the user's face image to the server for processing and then comparison. In this process, due to the large amount of face image data, when the face image data is directly transmitted, it will occupy a lot of bandwidth and affect the transmission speed, thus affecting the real-time performance of the system and user experience. Therefore, a new technical solution is needed to solve these problems. Summary of the invention

[0003] The embodiment of the present application provides a method, device, equipment and storage medium for unlocking based on data compression to solve at least one problem existing in the related art. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a method for unlocking based on data compression, comprising:

[0005] Collecting a facial image, and performing feature extraction on the facial image to determine a facial feature vector;

[0006] Determine a serialized preset format string according to the facial image and the facial feature vector;

[0007] Compressing the preset format character string to obtain compressed data, and uploading the compressed data to a server via a specified communication protocol;

[0008] The server extracts the facial feature vector from the compressed data, compares the facial feature vector with a pre-stored feature vector, and sends an unlocking signal to unlock the door when the comparison result is the same.

[0009] In one implementation, determining a serialized preset format string according to the facial image and the facial feature vector includes:

[0010] Performing data encoding on the face image to obtain an encoding result;

[0011] Using a preset data dictionary template, constructing a data dictionary according to the encoding result and the facial feature vector;

[0012] The data dictionary is serialized to obtain a serialized JSON string.

[0013] In one implementation, compressing the preset format character string to obtain compressed data includes:

[0014] In the case of determining the serialized JSON string, call the gzip module;

[0015] The serialized JSON string is compressed by the gzip module to obtain compressed data.

[0016] In one embodiment, uploading the compressed data to the server through a specified communication protocol includes:

[0017] Uploading the compressed data to the server via the default MQTT communication protocol or HTTP communication protocol;

[0018] or,

[0019] Check the communication protocol options;

[0020] When the priority factor of the selection item is real-time, the MQTT communication protocol is determined as the designated communication protocol, and the compressed data is uploaded to the server through the MQTT communication protocol;

[0021] When the priority factor of the selection item is security, the HTTP communication protocol is determined as the designated communication protocol, and encrypted communication is performed through SSL or TLS supported by the HTTP communication protocol to upload the compressed data to the server.

[0022] In one implementation, extracting the facial feature vector from the compressed data by the server includes:

[0023] The server calls the gzip module to decompress the compressed data and recover the serialized JSON string;

[0024] When a serialized JSON string is obtained, the JSON module in Python is called;

[0025] Deserialize the serialized JSON string through the JSON module to obtain the data dictionary;

[0026] The facial feature vector is extracted from the data dictionary.

[0027] In one embodiment, the method further comprises:

[0028] Record the recognition time data of the smart door lock within a specified time, and calculate and analyze the recognition time data to determine the average recognition time;

[0029] Recording the current recognition time, and comparing the current recognition time with the average recognition time;

[0030] When the current recognition duration is greater than the average recognition duration and there is no communication protocol selection option, the MQTT communication protocol is used as the default communication protocol;

[0031] When the current recognition time is longer than the average recognition time and there is a communication protocol selection option where the priority factor is security, the user is prompted whether to change the communication protocol.

[0032] In one implementation, comparing the facial feature vector with a pre-stored feature vector, and when the comparison result is the same, sending an unlock signal to unlock includes:

[0033] Calculating the similarity between the facial feature vector and the pre-stored feature vector by using a similarity algorithm;

[0034] Comparing the similarity with a similarity threshold to obtain a comparison result, wherein when the similarity is greater than or equal to the similarity threshold, it indicates that the comparison results are the same;

[0035] When the comparison results are the same, an unlocking signal is sent through the server to unlock the door.

[0036] In a second aspect, an embodiment of the present application provides an unlocking device based on data compression, comprising:

[0037] The acquisition module is used to acquire a face image, extract features from the face image, and determine a face feature vector;

[0038] A determination module, used to determine a serialized preset format string according to the face image and the face feature vector;

[0039] A processing module, used for compressing the preset format character string to obtain compressed data, and uploading the compressed data to a server through a specified communication protocol;

[0040] The comparison module is used to extract the facial feature vector from the compressed data through the server, compare the facial feature vector with the pre-stored feature vector, and send an unlocking signal to unlock the door when the comparison results are the same.

[0041] In one embodiment, the unlocking device based on data compression further includes an analysis module, and the analysis module is used to:

[0042] Record the recognition time data of the smart door lock within a specified time, and calculate and analyze the recognition time data to determine the average recognition time;

[0043] Recording the current recognition time, and comparing the current recognition time with the average recognition time;

[0044] When the current recognition duration is greater than the average recognition duration and there is no communication protocol selection option, the MQTT communication protocol is used as the default communication protocol;

[0045] When the current recognition time is longer than the average recognition time and there is a communication protocol selection option where the priority factor is security, the user is prompted whether to change the communication protocol.

[0046] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement a method in any one of the above-mentioned embodiments.

[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, the method in any one of the above-mentioned embodiments is implemented.

[0048] The beneficial effects of the above technical solution include at least:

[0049] By collecting face images and extracting features from the face images, face feature vectors are determined. According to the face images and face feature vectors, a serialized preset format string is determined for easy transmission. The preset format string is compressed to obtain compressed data. The compressed data is uploaded to the server through a specified communication protocol. By reducing the size of data transmission, the bandwidth occupancy is reduced and the transmission rate is increased. The face feature vector is extracted from the compressed data by the server, and the face feature vector is compared with the pre-stored feature vector. When the comparison result is the same, an unlocking signal is sent to unlock the door, thereby reducing the processing time of the entire process and better satisfying the user experience.

[0050] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0052] Figure 1 This is a schematic diagram of the steps of the unlocking method based on data compression according to an embodiment of the present application;

[0053] Figure 2This is a structural block diagram of an unlocking device based on data compression according to an embodiment of the present application;

[0054] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0056] In the related technology, there is a problem of large data volume during data transmission to the server, which will occupy a large amount of bandwidth, resulting in slow transmission speed, affecting the transmission speed and the real-time performance of the system, and thus affecting the user experience; at the same time, the data is easily intercepted and tampered with, posing a security risk, and packet loss and errors may occur during data transmission, resulting in incomplete data or transmission failure, affecting the stability and reliability of the system.

[0057] Reference Figure 1 , a flow chart of an unlocking method based on data compression according to an embodiment of the present application is shown. The unlocking method based on data compression may include at least steps S100-S400:

[0058] S100: Collect a face image, extract features from the face image, and determine a face feature vector.

[0059] S200: Determine a serialized preset format string according to the face image and the face feature vector.

[0060] S300, compressing the preset format character string to obtain compressed data, and uploading the compressed data to the server through a specified communication protocol.

[0061] S400, extracting a facial feature vector from the compressed data through the server, comparing the facial feature vector with a pre-stored feature vector, and sending an unlocking signal to unlock the door when the comparison result is the same.

[0062] The technical solution of the embodiment of the present application is to collect facial images, extract features from the facial images, determine facial feature vectors, determine a serialized preset format string based on the facial images and the facial feature vectors for easy transmission, compress the preset format string to obtain compressed data, and upload the compressed data to a server through a specified communication protocol, thereby reducing the size of data transmission, reducing bandwidth occupancy, and improving the transmission rate; extracting facial feature vectors from the compressed data through the server, comparing the facial feature vectors with pre-stored feature vectors, and sending an unlocking signal to unlock the door when the comparison results are the same, thereby reducing the processing time of the entire process and better satisfying user experience.

[0063] In one implementation, a facial image may be captured by a camera of a smart door lock, and then a processing chip of the smart door lock may use an image processing algorithm to extract features from the facial image and determine a facial feature vector.

[0064] In one embodiment, step S200 includes steps S210-S230:

[0065] S210: Perform data encoding on the face image to obtain an encoding result.

[0066] Optionally, the processing chip of the smart door lock performs data encoding on the facial image, for example, encoding the facial image into Base64 to obtain an encoding result.

[0067] S220, using a preset data dictionary template, constructing a data dictionary according to the encoding result and the facial feature vector.

[0068] It should be noted that the data dictionary contains the definition of data, the source of data, the format of data, the use of data, etc., and then a data dictionary template is established to obtain a preset data dictionary template, which is convenient for collecting data dictionary information and can make the dictionary information unified and easy to manage. In the embodiment of the present application, the processing chip of the smart door lock uses the preset data dictionary template to collect information such as encoding results and human face feature vectors, thereby constructing a data dictionary.

[0069] S230. Serialize the data dictionary to obtain a serialized JSON string.

[0070] Optionally, the data dictionary is serialized by the serialization algorithm of the processing chip of the smart door lock to obtain a serialized preset format string. It should be noted that the preset format takes the JSON format as an example, so the serialized preset format string is a JSON string, and the JSON format facilitates data transmission and storage; the JSON string may include information such as face images, face feature vectors, and timestamps.

[0071] In one implementation, compressing the preset format string in step S300 to obtain compressed data includes steps S310-S320:

[0072] S310: When the serialized JSON string is determined, a gzip module is called.

[0073] S320. Compress the serialized JSON string using a gzip module to obtain compressed data.

[0074] Optionally, when the processing chip of the smart door lock determines the serialized JSON string, the gzip module is called, and then the serialized JSON string is compressed using the gzip module to obtain compressed data; the gzip module can provide a simple method to compress and decompress data.

[0075] In one embodiment, uploading the compressed data to the server through the specified communication protocol in step S300 includes step S330 or S340:

[0076] S330, uploading the compressed data to the server through the default MQTT communication protocol or HTTP communication protocol.

[0077] Optionally, a default communication protocol can be preset in the smart door lock, for example, a default MQTT communication protocol or HTTP communication protocol, and then when data transmission is required, the compressed data is uploaded to the server using the recognized MQTT communication protocol or HTTP communication protocol.

[0078] It should be noted that MQTT protocol communication has the following characteristics: concise design, small bandwidth usage, and suitable for resource-constrained devices and networks; low latency: supports real-time message push, low latency, and is suitable for application scenarios that require fast response; reliability: supports QoS level to ensure the reliability of message delivery; connectivity: suitable for unstable connections such as mobile networks, and can maintain a long-term connection state. HTTP supports SSL / TLS for encrypted communication, has high security, and is simple, flexible, and easy to expand.

[0079] S340, detecting the options of the communication protocol;

[0080] When the priority factor of the selection item is real-time, the MQTT communication protocol is determined as the designated communication protocol, and the compressed data is uploaded to the server through the MQTT communication protocol;

[0081] When the priority factor of the selection item is security, the HTTP communication protocol is determined as the specified communication protocol, and encrypted communication is performed through SSL or TLS supported by the HTTP communication protocol to upload the compressed data to the server.

[0082] In some embodiments, a selection of communication protocols is provided to the user, and the user can adjust the selection as needed through a terminal APP, a public account or a mini-program, or directly in the smart door lock. For example, if the user prioritizes speed and real-time as priority factors, the processing chip of the smart door lock will determine the MQTT communication protocol as the designated communication protocol, and then use the MQTT communication protocol to upload the compressed data to the server.

[0083] If the user prioritizes security as a priority factor, the processing chip of the smart door lock will determine the HTTP communication protocol as the designated communication protocol, and then perform encrypted communication through SSL or TLS supported by the HTTP communication protocol, and upload the compressed data to the server to improve security.

[0084] In one implementation, in step S400, extracting a facial feature vector from compressed data by a server includes steps S410-S430:

[0085] S410, calling the gzip module through the server to decompress the compressed data and restore the serialized JSON string.

[0086] Optionally, after receiving the compressed data uploaded by the smart door lock, the server calls the gzip module and uses the gzip module to decompress the compressed data, thereby restoring a serialized JSON string.

[0087] S420. When a serialized JSON string is obtained, a JSON module in Python is called.

[0088] S430. Deserialize the serialized JSON string through the JSON module to obtain a data dictionary, and extract the facial feature vector from the data dictionary.

[0089] Then, when the server obtains the serialized JSON string, it calls the JSON module in Python and uses the JSON module to deserialize the serialized JSON string to obtain a data dictionary. Then, the server can extract the facial feature vector from the data dictionary.

[0090] In one implementation, in step S400, the facial feature vector is compared with the pre-stored feature vector. When the comparison result is the same, sending an unlock signal to unlock includes steps S440-S460:

[0091] S440: Calculate the similarity between the facial feature vector and the pre-stored feature vector through a similarity algorithm.

[0092] Optionally, when a user enters a face in the smart door lock, the processing chip or server extracts features of the entered face through an image processing algorithm to obtain a corresponding pre-stored feature vector and stores it in the server. In the embodiment of the present application, the similarity between the face feature vector and the pre-stored feature vector is calculated by algorithms including but not limited to Euclidean distance and cosine similarity.

[0093] S450: Compare the similarity with the similarity threshold to obtain a comparison result.

[0094] Then, the similarity is compared with the similarity threshold to obtain a comparison result. It should be noted that when the similarity is greater than or equal to the similarity threshold, the representation comparison results are the same, otherwise the representation comparison results are different.

[0095] S460: When the comparison result is the same, an unlocking signal is sent through the server to unlock the door.

[0096] Specifically, when the server obtains the same relative comparison result, an unlocking signal is sent to the smart door lock through the server, so that the smart door lock is unlocked.

[0097] In one implementation, the unlocking method based on data compression in the embodiment of the present application may further include steps S510-S530:

[0098] S510: Record the recognition time data of the smart door lock within a specified time, and calculate and analyze the recognition time data to determine the average recognition time.

[0099] Optionally, data collection can be performed in the smart door lock, such as recording the identification time data, user information and other data of each unlocking operation, and storing them in a log system. The log data can be used for subsequent auditing and analysis to improve the security and management level of the system.

[0100] S520: Record the current recognition time, and compare the current recognition time with the average recognition time.

[0101] It should be noted that the length of time for recording data, i.e. the designated time, can be set independently. The smart door lock records the recognition time data of the smart door lock within the designated time, and then the processing chip of the smart door lock calculates and analyzes the recognition time data, determines the average recognition time, and then records it in the log data. Then, when the user performs the unlocking operation, the current recognition time is recorded and compared with the average recognition time.

[0102] S530. When the current recognition time is longer than the average recognition time and there is no communication protocol selection option, the MQTT communication protocol is used as the default communication protocol. When the current recognition time is longer than the average recognition time and there is a communication protocol selection option with security as the priority factor, the user is prompted whether to change the communication protocol.

[0103] In the embodiment of the present application, when the current recognition time is longer than the average recognition time and there is no communication protocol option, the MQTT communication protocol with better real-time performance is used as the default communication protocol, and the compressed data is subsequently transmitted using the MQTT communication protocol, aiming to improve the subsequent recognition time. When the current recognition time is longer than the average recognition time and the priority factor of the communication protocol option is security, the smart door lock or server can prompt the user on the smart door lock, or in the form of a public account or mini program, prompting the user whether to change the communication protocol and decide which communication protocol to use for the next transmission of compressed data, which is more user-friendly.

[0104] Through the method of the embodiment of the present application, efficient and reliable biometric data transmission is achieved, effectively solving the problems of large data volume, slow transmission speed, poor security, etc. in the prior art. The serialized data contains image information, feature vectors, timestamps, etc., which are convenient for subsequent processing and comparison; the serialized JSON string is compressed using gzip, the amount of compressed data is greatly reduced, and the transmission efficiency is significantly improved. The compressed data is sent to the server by selecting HTTP, MQTT or other transmission protocols to ensure the efficiency and security of data transmission. In addition, the smart door lock or server records the time, user information and other data of each unlocking operation, and stores them in the log system. The log data can be used for subsequent auditing and analysis to improve the security and management level of the system.

[0105] Reference Figure 2 , shows a structural block diagram of an unlocking device based on data compression according to an embodiment of the present application, and the device may include:

[0106] The acquisition module is used to acquire face images, extract features from the face images, and determine face feature vectors;

[0107] A determination module, used to determine a serialized preset format string according to a face image and a face feature vector;

[0108] The processing module is used to compress the preset format string to obtain compressed data, and upload the compressed data to the server through the specified communication protocol;

[0109] The comparison module is used to extract the facial feature vector from the compressed data through the server, compare the facial feature vector with the pre-stored feature vector, and send an unlocking signal to unlock the door when the comparison results are the same.

[0110] In one embodiment, the unlocking device based on data compression further includes an analysis module, which is used to:

[0111] Record the recognition time data of the smart door lock within the specified time, and calculate and analyze the recognition time data to determine the average recognition time;

[0112] Record the current recognition time and compare it with the average recognition time;

[0113] When the current recognition time is longer than the average recognition time and there is no communication protocol option, the MQTT communication protocol is used as the default communication protocol;

[0114] When the current recognition time is longer than the average recognition time and there is a communication protocol whose priority factor is security, the user is prompted whether to change the communication protocol.

[0115] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and will not be repeated here.

[0116] Reference Figure 3 , shows a structural block diagram of an electronic device according to an embodiment of the present application, the electronic device includes: a memory 310 and a processor 320, the memory 310 stores instructions that can be run on the processor 320, and the processor 320 loads and executes the instructions to implement the unlocking method based on data compression in the above embodiment. The number of the memory 310 and the processor 320 can be one or more.

[0117] In one embodiment, the electronic device also includes a communication interface 330 for communicating with external devices and performing data exchange transmission. If the memory 310, the processor 320 and the communication interface 330 are implemented independently, the memory 310, the processor 320 and the communication interface 330 can be interconnected through a bus and complete mutual communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0118] Optionally, in a specific implementation, if the memory 310, the processor 320 and the communication interface 330 are integrated on a chip, the memory 310, the processor 320 and the communication interface 330 can communicate with each other through an internal interface.

[0119] An embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the unlocking method based on data compression provided in the above embodiment is implemented.

[0120] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.

[0121] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.

[0122] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0123] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0124] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0125] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the described specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0126] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0127] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.

[0128] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0129] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0130] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.

[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for unlocking based on data compression, characterized in that: include: Collecting a facial image, and performing feature extraction on the facial image to determine a facial feature vector; Determine a serialized preset format string according to the facial image and the facial feature vector; Compressing the preset format character string to obtain compressed data, and uploading the compressed data to a server via a specified communication protocol; The server extracts the facial feature vector from the compressed data, compares the facial feature vector with a pre-stored feature vector, and sends an unlocking signal to unlock the door when the comparison result is the same.

2. The unlocking method based on data compression according to claim 1, characterized in that: The determining of a serialized preset format string according to the facial image and the facial feature vector comprises: Performing data encoding on the face image to obtain an encoding result; Using a preset data dictionary template, constructing a data dictionary according to the encoding result and the facial feature vector; The data dictionary is serialized to obtain a serialized JSON string.

3. The unlocking method based on data compression according to claim 2, characterized in that: The compressing the preset format character string to obtain compressed data includes: In the case of determining the serialized JSON string, call the gzip module; The serialized JSON string is compressed by the gzip module to obtain compressed data.

4. The unlocking method based on data compression according to claim 2 or 3, characterized in that: The uploading of the compressed data to the server through the specified communication protocol comprises: Uploading the compressed data to the server via the default MQTT communication protocol or HTTP communication protocol; or, Check the communication protocol options; When the priority factor of the selection item is real-time, the MQTT communication protocol is determined as the designated communication protocol, and the compressed data is uploaded to the server through the MQTT communication protocol; When the priority factor of the selection item is security, the HTTP communication protocol is determined as the designated communication protocol, and encrypted communication is performed through SSL or TLS supported by the HTTP communication protocol to upload the compressed data to the server.

5. The unlocking method based on data compression according to claim 2, characterized in that: The extracting the facial feature vector from the compressed data by the server comprises: The server calls the gzip module to decompress the compressed data and recover the serialized JSON string; When a serialized JSON string is obtained, the JSON module in Python is called; Deserialize the serialized JSON string through the JSON module to obtain the data dictionary; The facial feature vector is extracted from the data dictionary.

6. The unlocking method based on data compression according to claim 4, characterized in that: The method further comprises: Record the recognition time data of the smart door lock within a specified time, and calculate and analyze the recognition time data to determine the average recognition time; Recording the current recognition time, and comparing the current recognition time with the average recognition time; When the current recognition duration is greater than the average recognition duration and there is no communication protocol selection option, the MQTT communication protocol is used as the default communication protocol; When the current recognition time is longer than the average recognition time and there is a communication protocol selection option where the priority factor is security, the user is prompted whether to change the communication protocol.

7. The unlocking method based on data compression according to claim 1, characterized in that: The step of comparing the facial feature vector with the pre-stored feature vector and sending an unlock signal to unlock the door when the comparison result is the same includes: Calculating the similarity between the facial feature vector and the pre-stored feature vector by using a similarity algorithm; Comparing the similarity with a similarity threshold to obtain a comparison result, wherein when the similarity is greater than or equal to the similarity threshold, it indicates that the comparison results are the same; When the comparison results are the same, an unlocking signal is sent through the server to unlock the door.

8. An unlocking device based on data compression, characterized in that: include: The acquisition module is used to acquire a face image, extract features from the face image, and determine a face feature vector; A determination module, used to determine a serialized preset format string according to the face image and the face feature vector; A processing module, used for compressing the preset format character string to obtain compressed data, and uploading the compressed data to a server through a specified communication protocol; The comparison module is used to extract the facial feature vector from the compressed data through the server, compare the facial feature vector with the pre-stored feature vector, and send an unlocking signal to unlock the door when the comparison results are the same.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Shared bike control method, device and system

    CN108109275A

  • A method and a device for quickly transmitting and storing edited contents

    CN109726345A

  • Access control passing method and system, and related device

    CN113362513A

  • Face data acquisition and storage method and related equipment

    CN117056296A

  • User behavior data acquisition method and device for vehicle-mounted application, equipment and medium

    CN117411909A