Biological characteristic data management method, device and equipment applied to embedded equipment

By dividing the Flash storage space into fixed-sized storage blocks in embedded devices and using linked list structure for data management, the efficiency and complexity of biometric data storage and management in embedded devices are solved, and efficient and compact data storage and operation are achieved.

CN119810933APending Publication Date: 2025-04-11RECONOVA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411610050.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In embedded devices, existing file systems and databases face problems such as limited storage space, slow startup speed, low operational efficiency and increased system complexity when storing and managing biometric data.

Method used

By dividing the Flash storage space into multiple fixed-sized storage blocks, each storage block stores a biometric data and its feature header information, and loads the data into memory after the operating system is started, establishing a mirror relationship between memory and Flash, and using user linked lists, idle linked lists and updates for data operations and synchronous updates.

Benefits of technology

It realizes efficient and compact biometric data storage and management, improves storage efficiency and operation efficiency, reduces system complexity, and ensures data accuracy and completeness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810933A_ABST
    Figure CN119810933A_ABST
Patent Text Reader

Abstract

The invention discloses a biological characteristic data management method, a biological characteristic data management device and biological characteristic data management equipment applied to embedded equipment. The biological characteristic data management method comprises the following steps of: dividing a storage space of Flash into a plurality of storage blocks with fixed sizes; after an operating system of the embedded equipment is started, loading all the biological characteristic data into a memory from Flash, and establishing a mirror image relationship between the memory and a storage space of the Flash; verifying the legality of the corresponding biological characteristic data by traversing a storage block of Flash, and initializing a user linked list, an idle linked list and an update linked list; performing data operation in a memory by using the user linked list, the idle linked list and the update linked list, and recording the data operation into the update linked list, the types of the data operation including addition, deletion, modification and query; and traversing the update chain table, and synchronously updating to a storage block of the Flash according to the type of the data operation. Biological characteristic data can be efficiently and compactly stored and managed, and meanwhile quick starting, high performance and low complexity of the system are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage management, and in particular to a method, device and equipment for managing biometric data applied to embedded devices. Background Art

[0002] With the rapid development of technology, NAND Flash memory is increasingly used for data storage in electronic systems, especially in embedded devices such as smart door locks, where there is a growing demand for storing biometric data (such as palm vein or facial recognition features) to achieve efficient personnel identification. However, the current file system (such as YAFFS, UBIFS or JFFS2) combined with the SQLite3 database solution faces multiple challenges in embedded environments:

[0003] Limited storage space: The storage space of embedded devices is limited. The existing file system takes up a lot of space, which reduces the actual available storage space, affects storage efficiency and capacity, and even increases costs.

[0004] Slow startup speed: The check and repair process when the file system is started is lengthy, which seriously slows down the device startup speed and is not conducive to the instant response characteristics pursued by embedded devices;

[0005] Inefficient operation: When processing the addition, deletion, modification and query of biometric data, the existing file systems and databases are not optimized for such data, resulting in inefficient and slow processing, which in turn affects system performance and user experience, and weakens product market competitiveness;

[0006] Increased system complexity: The introduction of existing file systems and databases increases the complexity of the system architecture, which not only takes up more program and data storage space, but also further increases costs. Summary of the invention

[0007] In view of this, the purpose of the present invention is to propose a biometric data management method, apparatus and device for embedded devices, aiming to solve the problem of how to efficiently and compactly store and manage biometric data in embedded devices while ensuring fast startup, high performance and low complexity of the system.

[0008] To achieve the above object, the present invention provides a biometric data management method applied to an embedded device, the method comprising:

[0009] Divide the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information;

[0010] After the operating system of the embedded device is started, all the biometric data are loaded from the Flash into the memory, and a mirroring relationship between the storage space of the memory and the Flash is established;

[0011] By traversing the storage blocks of the Flash, verifying the legitimacy of the corresponding biometric data, and initializing the user list, free list and update list;

[0012] Performing data operations in the memory using the user linked list, the free linked list and the update linked list, and recording the data operations in the update linked list, wherein the types of data operations include adding, deleting, modifying and checking;

[0013] The update linked list is traversed, and the storage blocks of the Flash are updated synchronously according to the type of the data operation.

[0014] Preferably, the verifying the legitimacy of the corresponding biometric data by traversing the storage blocks of the Flash includes:

[0015] Verify the legitimacy of the biometric data using a CRC method or a checksum method;

[0016] When the verification is valid, the valid biometric data is added to the user linked list, otherwise, it is added to the free linked list.

[0017] Preferably, performing data operations in the memory by using the user linked list, the free linked list and the update linked list, and recording the data operations in the update linked list, comprises:

[0018] When adding the biometric data, a memory data block is taken from the head of the free list, the biometric data and the corresponding feature header information are modified, added to the user list and the update list, and the corresponding update flag is set to ADD.

[0019] Preferably, performing data operations in the memory by using the user linked list, the free linked list and the update linked list, and recording the data operations in the update linked list, comprises:

[0020] When deleting the biometric data, searching in the user list using the user ID in the feature header information;

[0021] Deleting the found biometric data from the user linked list, adding it to the update linked list, and setting the corresponding update flag to DEL;

[0022] The deleted memory data block is added to the tail of the free linked list.

[0023] Preferably, performing data operations in the memory by using the user linked list, the free linked list and the update linked list, and recording the data operations in the update linked list, comprises:

[0024] When all the biometric data are cleared, all the biometric data in the user linked list are deleted and added to the update linked list, and the corresponding update flag is set to DEL_ALL.

[0025] Preferably, the performing data operations in the memory by using the user linked list, the free linked list and the update linked list comprises:

[0026] When comparing the biometric data, the feature comparison operation is performed by traversing the user linked list.

[0027] Preferably, traversing the update linked list and synchronously updating the storage block of the Flash according to the type of the data operation includes:

[0028] When writing to Flash, the alignment position that satisfies the specific block size is calculated based on the updated memory address of the biometric data, and based on the mirror relationship between the memory and Flash, the written Flash address and size are calculated based on the alignment position of the specific block size; wherein the specific block size is the same as the size of the minimum block operation of Flash.

[0029] Preferably, the calculating the alignment position satisfying the specific block size according to the updated memory address of the biometric data, and calculating the written Flash address and size according to the alignment position of the specific block size based on the mirror relationship between the memory and the Flash, comprises:

[0030] Use aligned_addr = (update_ptr / alignment) * alignment to calculate the alignment position of a specific block size, where update_ptr represents the memory address where the updated biometric data is located, and alignment represents the size of the minimum block operation of Flash;

[0031] The written Flash address is calculated using flash_addr=(aligned_addr-gFirstFeature)+Flash_offset, where gFirstFeature=((gFeatures+alignment-1) / alignment)*alignment, where Flash_offset represents the starting address of the Flash, gFirstFeature represents the address of the first biometric data, and gFeatures represents the starting address of the memory.

[0032] To achieve the above object, the present invention further provides a biometric data management device for embedded devices, the device comprising:

[0033] A storage block division unit, used to divide the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information;

[0034] A mapping establishment unit, used to load all the biometric data from the Flash into the memory after the operating system of the embedded device is started, and to establish a mirror relationship between the storage space of the memory and the Flash;

[0035] A verification unit, used to verify the legitimacy of the corresponding biometric data by traversing the storage blocks of the Flash, and to initialize a user linked list, a free linked list, and an update linked list;

[0036] A data operation unit, used to perform data operations in the memory using the user linked list, the free linked list and the update linked list, and record the data operations in the update linked list, wherein the types of data operations include adding, deleting, modifying and checking;

[0037] The synchronous update unit is used to traverse the update linked list and synchronously update the storage block of the Flash according to the type of the data operation.

[0038] In order to achieve the above-mentioned purpose, the present invention also proposes a biometric data management device applied to an embedded device, comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a biometric data management method applied to an embedded device as described in the above-mentioned embodiment.

[0039] In order to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to implement the steps of a biometric data management method applied to an embedded device as described in the above-mentioned embodiment.

[0040] In order to achieve the above-mentioned purpose, the present invention also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of a biometric data management method applied to an embedded device as described in the above embodiment.

[0041] Beneficial effects:

[0042] The above scheme realizes unified structured storage of data by dividing the Flash storage space into fixed-size storage blocks and storing biometric data and corresponding feature header information. This method simplifies data management, improves storage efficiency, makes data management and maintenance simpler, reduces the complexity of development and maintenance, and makes the reading and writing of data in Flash more efficient. At the same time, a mirroring relationship between memory and Flash is established, so that data operations in memory can be reflected in Flash in real time, ensuring data consistency, avoiding Flash read operations during each operation, and improving operational efficiency. When updating data, only necessary data blocks are updated, reducing the amount of data written to Flash and improving writing efficiency.

[0043] The above scheme ensures the accuracy and integrity of the data by traversing the storage blocks of the Flash and verifying the validity of the data. Valid data is added to the user list and invalid data is added to the free list, which avoids data errors and conflicts and improves the stability and reliability of the system. In addition, through the verification method of data validity (such as checksum or CRC), the data reliability is ensured in the case of power failure and the use of erroneous data is avoided.

[0044] The above scheme realizes efficient management of feature data through userList, freeList and updateList linked lists, ensuring that data addition, deletion and update operations can be carried out smoothly. When adding biometric data, the memory data block is taken from the free linked list, and modified and added to the user linked list and update linked list, which simplifies the process of data addition, improves the efficiency of data addition, and ensures real-time update of data. At the same time, the update flag is set to ADD to facilitate subsequent data synchronization operations; when deleting biometric data, the user ID in the feature header information is searched in the user linked list, and added to the update linked list after deletion, and the released memory data block is added to the free linked list, which simplifies the process of data deletion, improves the efficiency of data deletion, and ensures real-time update of data and effective use of storage space; when clearing all biometric data, all data in the user linked list are deleted and added to the update linked list, which improves the efficiency of data clearing and ensures complete deletion of data and release of storage space; by traversing the user linked list to perform biometric data comparison operations, the efficiency and accuracy of data comparison are improved, making data comparison faster and more reliable.

[0045] In the above scheme, when writing to Flash, the alignment position that meets the specific block size is calculated according to the memory address of the updated biometric data, and the written Flash address and size are calculated based on the mirror relationship between the memory and Flash, which ensures the correct writing and reading of data in Flash, avoids data misalignment and damage, and improves data reliability and security. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 A schematic flow chart of a biometric data management method applied to an embedded device provided by an embodiment of the present invention.

[0048] Figure 2 A schematic diagram of the structure of a biometric data management device applied to an embedded device provided by an embodiment of the present invention.

[0049] The realization of the purpose, functional features and advantages of the invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0051] The content of the present invention is described in detail below with reference to embodiments.

[0052] In embedded devices, due to cost constraints, the storage capacity of Flash memory is usually small, such as 8M, 16M or 32M. When performing recognition based on biometric data such as face recognition or palm vein recognition, it is necessary to store the characteristic data of the registered person.

[0053] In actual products, it is often necessary to save a large number of biometric features for one-to-many or many-to-many comparison and identification. Therefore, storing a large number of biometric features in a limited storage space and efficiently performing addition, deletion, modification and query operations is of great significance for reducing costs, improving product competitiveness and optimizing customer experience.

[0054] Since the write operation of Flash devices can only be performed in empty or erased cells, and NAND Flash performs erase and reprogram operations in blocks, a block erase operation must usually be performed before a write operation. Based on the characteristics of Flash and product requirements, this solution is proposed.

[0055] Reference Figure 1 FIG. 1 is a flow chart of a biometric data management method applied to an embedded device provided by an embodiment of the present invention.

[0056] In this embodiment, the method includes:

[0057] S11, dividing the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information.

[0058] In this embodiment, it is based on Flash operation without a file system, which can avoid the overhead of the traditional file system and operate directly on the Flash, thereby improving the system startup speed and operating efficiency. The flash storage area is divided into multiple fixed-size storage blocks, each storage block is a fixed number of bytes. For example, 8000 storage blocks, each storage block is 512 bytes (to facilitate flash alignment processing, it is generally set to 256, 512, etc.), assuming that a maximum of 8000 feature storage is supported, and the feature length is 256 bytes. It actually depends on the demand and Flash capacity, biometric data, etc. The specific biometric data may also be variable length, and here it is assumed that 256 bytes is the maximum biometric data length.

[0059] Each storage block stores "feature header information + biometric data". The feature header information includes the meta-information of the biometric data, such as personnel ID, name, etc., valid flags and verification information, etc., to achieve a unified storage structure. Among them, the feature header information is aligned to 64 bytes, plus 256 bytes of biometric data, a total of 320 bytes. The feature header is aligned to 64 bytes to facilitate subsequent expansion. The checksum is placed in the first byte of the feature header for easy calculation. The specific definition (not limited to the following definition during specific implementation, different verification algorithms can be adjusted, more meta-information can be added, etc.) is as follows:

[0060] Fields Number of bytes illustrate checksum 1 Checksum version 1 Version Number valid_flag 2 Valid flag, 0xAA55: valid max_feature_length 2 Maximum feature data length valid_feature_length 2 Length of characteristic valid data uid 2 User ID name 32 username

[0061] S12, after the operating system of the embedded device is started, all the biometric data are loaded from the Flash into the memory, and a mirroring relationship between the storage space of the memory and the Flash is established.

[0062] In this embodiment, after the operating system of the embedded device is started, all biometric data is loaded from the Flash storage block into the memory, such as allocating a memory size of 4M+8K, where the 4M memory and the required Flash storage space are mirror images of each other, specifically, it is always ensured that the data in the 4M memory and the data in the Flash storage are exactly the same, and 8K is redundant memory data, which is convenient for alignment operations. It is required that the length of redundant data must be greater than or equal to "the minimum data (i.e., the minimum block operation) is 4K when the Flash is erased and written". Assuming that the minimum data is 4K when the Flash is erased and written, the correctness of the write can be ensured. In fact, it depends on the brand and model of the Flash, which is generally 4K. The storage space of the memory and the Flash is mirrored to each other to ensure that data alignment and read and write operations are simple and efficient.

[0063] S13, by traversing the storage blocks of the Flash, verifying the legitimacy of the corresponding biometric data, and initializing the user linked list, the free linked list and the update linked list.

[0064] Furthermore, the verification of the legitimacy of the corresponding biometric data by traversing the storage blocks of the Flash includes:

[0065] Verify the legitimacy of the biometric data using a CRC method or a checksum method;

[0066] When the verification is valid, the valid biometric data is added to the user linked list, otherwise, it is added to the free linked list.

[0067] In this embodiment, each biometric data corresponding to the storage block of Flash is traversed and its legitimacy is checked, and the user list (userList), free list (freeList), and update list (updateList) are initialized. The legitimacy check can be performed through CRC or checksum. If the CRC check passes and the valid flag is true, the biometric data block is placed in the userList (user list), otherwise it is placed in the freeList (free list), and the updateList (update list) is empty. Considering simple verification, CRC verification can be omitted and replaced with a verification method that adds up all data (i.e., checksum). For example, after reading the biometric data, the checksum of the data is recalculated and compared with the stored checksum. If the two are consistent, the data is legal; otherwise, the data may be damaged; note that if the valid flag is false, it is also invalid data. By relying on data verification, the validity of the data can be guaranteed in the case of power failure, that is, it can effectively detect errors that may occur in the storage and transmission of data, ensuring that the system can still maintain data integrity and reliability when encountering power failure or other abnormal conditions. Linked lists (free linked list, user linked list, update linked list) are used to manage free feature data blocks, user feature data blocks and updated data blocks respectively, so as to realize flexible and efficient data management.

[0068] S14, using the user linked list, the free linked list and the update linked list to perform data operations in the memory, and recording the data operations in the update linked list, the types of data operations include adding, deleting, modifying and checking.

[0069] Further, the using the user linked list, the free linked list and the update linked list to perform data operations in the memory, and recording the data operations in the update linked list, includes:

[0070] When adding the biometric data, a memory data block is taken from the head of the free list, the biometric data and the corresponding feature header information are modified, added to the user list and the update list, and the corresponding update flag is set to ADD.

[0071] Further, when deleting the biometric data, the user ID in the feature header information is used to search in the user linked list;

[0072] Deleting the found biometric data from the user linked list, adding it to the update linked list, and setting the corresponding update flag to DEL;

[0073] The deleted memory data block is added to the tail of the free linked list.

[0074] Furthermore, when all the biometric data are cleared, all the biometric data in the user linked list are deleted and added to the update linked list, and the corresponding update flag is set to DEL_ALL.

[0075] Furthermore, when comparing the biometric data, the feature comparison operation is performed by traversing the user linked list.

[0076] In this embodiment, by using linked lists such as userList, freeList, and updateList, data operations such as adding, deleting, modifying, and checking data are performed in the memory, and the data operations are recorded in the update linked list (updateList). When adding or deleting biometric data, only the smallest data block (Flash storage block) where the biometric data and adjacent biometric data are located is updated, reducing the number of Flash erase and write times and minimizing update operations.

[0077] When adding biometric data, take the memory data block from the freeList header, modify the biometric data and feature header information, add it to the userList, and also add it to the updateList, setting the corresponding update flag to 'ADD'.

[0078] When deleting biometric data, use the uid in it to search from userList, delete it from userList after finding it, add it to updateList, and set the update flag to 'DEL'. Add the deleted memory data block to the end of freeList. When updating the data block, hang the deleted data block at the end of the free list, and allocate the data block from the head to avoid repeated use of the same data block, thereby improving the life of the Flash.

[0079] By calling the save interface, when saving all updated biometric data to the flash, by traversing the updateList linked list, if it is 'ADD', set the valid flag and checksum (before writing to the flash, the checksum needs to be calculated, that is, update the checksum field of the feature header; set the valid flag to 0xAA55, which means valid), and write to the flash; if it is 'DEL', update the valid flag and checksum (referring to clearing the checksum and valid flag, both are cleared to 0), and write to the flash.

[0080] In particular, the command to clear all biometric data is specially processed, marked as 'DEL_ALL', and added to the updateList linked list. When calling the save interface, if it is 'DEL_ALL', the entire Flash storage area, that is, 4M of storage space, is directly erased. When performing feature matching, the user's biometric data is obtained by traversing the userList and the feature is compared with the feature to be matched. Since the data is in the memory, there is no need to directly operate the Flash. After performing data operations in the memory (such as adding, deleting, modifying, and checking), it is synchronized to the Flash, which reduces the number of direct operations on the Flash and improves the response speed of the system.

[0081] S15, traversing the update linked list, and synchronously updating the storage blocks of the Flash according to the type of the data operation.

[0082] Further, traversing the update linked list and synchronously updating the storage block of the Flash according to the type of the data operation includes:

[0083] When writing to Flash, the alignment position that satisfies the specific block size is calculated based on the updated memory address of the biometric data, and based on the mirror relationship between the memory and Flash, the written Flash address and size are calculated based on the alignment position of the specific block size; wherein the specific block size is the same as the size of the minimum block operation of Flash.

[0084] Further, the calculation of the alignment position satisfying the specific block size according to the updated memory address of the biometric data, and the calculation of the written Flash address and size according to the alignment position of the specific block size based on the mirror relationship between the memory and the Flash, includes:

[0085] Use aligned_addr = (update_ptr / alignment) * alignment to calculate the alignment position of a specific block size, where update_ptr represents the memory address where the updated biometric data is located, and alignment represents the size of the minimum block operation of Flash;

[0086] The written Flash address is calculated using flash_addr=(aligned_addr-gFirstFeature)+Flash_offset, where gFirstFeature=((gFeatures+alignment-1) / alignment)*alignment, where Flash_offset represents the starting address of the Flash, gFirstFeature represents the address of the first biometric data, and gFeatures represents the starting address of the memory.

[0087] In this embodiment, the updateList update list is traversed, the Flash storage block is updated according to the operation type (ADD or DEL or DEL_ALL), and the Flash storage block is erased and written to ensure the 4K alignment of the data. When writing to the flash, the 4K aligned position is first calculated according to the memory address of the updated biometric data, and then the written flash address and size are calculated according to the mapping relationship between the memory and the flash. When updating the flash, there is no need to read data from the flash, and the erase and write operations are directly performed, and then the write operation is performed. The updated biometric data is stored in the flash. Only the 4K data size needs to be updated each time. Through the above scheme, a large amount of biometric data can be efficiently managed and operated in a limited Flash storage space, meeting the needs of embedded devices, reducing costs and improving product competitiveness.

[0088] Reference Figure 2 FIG. 1 is a schematic diagram of the structure of a biometric data management device applied to an embedded device provided by an embodiment of the present invention.

[0089] In this embodiment, the device 20 includes:

[0090] The storage block division unit 21 is used to divide the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information;

[0091] A mapping establishment unit 22, used to load all the biometric data from the Flash into the memory after the operating system of the embedded device is started, and to establish a mirror relationship between the storage space of the memory and the Flash;

[0092] The verification unit 23 is used to verify the legitimacy of the corresponding biometric data by traversing the storage blocks of the Flash, and initialize the user list, the free list and the update list;

[0093] A data operation unit 24, used to perform data operations in the memory using the user linked list, the free linked list and the update linked list, and record the data operations in the update linked list, wherein the types of data operations include adding, deleting, modifying and checking;

[0094] The synchronous updating unit 25 is used to traverse the update linked list and synchronously update the storage block of the Flash according to the type of the data operation.

[0095] Each unit module of the device 20 can respectively execute the corresponding steps in the above method embodiment, so each unit module will not be described in detail here. Please refer to the description of the above corresponding steps for details.

[0096] The embodiment of the present invention further provides a biometric data management device for embedded devices, the device comprising the biometric data management device for embedded devices as described above, wherein the biometric data management device for embedded devices can be used Figure 2 The structure of the embodiment can be executed accordingly. Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0097] The device includes: a mobile phone, a digital camera, a tablet computer, or other devices with a camera function, or a device with an image processing function, or a device with an image display function. The device may include components such as a memory, a processor, an input unit, a display unit, and a power supply.

[0098] Among them, the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an image playback function, etc.), etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory may also include a memory controller to provide the processor and the input unit with access to the memory.

[0099] The input unit can be used to receive input digital or character or image information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit of this embodiment includes not only a camera, but also a touch-sensitive surface (such as a touch display) and other input devices.

[0100] The display unit can be used to display information input by the user or information provided to the user and various graphical user interfaces of the device, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit may include a display panel, and optionally, the display panel may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor to determine the type of touch event, and then the processor provides a corresponding visual output on the display panel according to the type of touch event.

[0101] The embodiment of the present invention further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory in the above embodiment; or a computer-readable storage medium that exists independently and is not installed in a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement Figure 1 The biometric data management method applied to embedded devices is shown in the figure. The computer readable storage medium may be a read-only memory, a disk or an optical disk, etc.

[0102] The embodiment of the present invention also provides a computer program product, including a computer program / instruction, which is loaded and executed by a processor to implement Figure 1 A biometric data management method applied to embedded devices is shown.

[0103] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, equipment embodiment and storage medium embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0104] Furthermore, in this document, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0105] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the invention, through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A biometric data management method for embedded devices, characterized in that: The method comprises: Divide the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information; After the operating system of the embedded device is started, all the biometric data are loaded from the Flash into the memory, and a mirroring relationship between the storage space of the memory and the Flash is established; By traversing the storage blocks of the Flash, verifying the legitimacy of the corresponding biometric data, and initializing the user list, free list and update list; Performing data operations in the memory using the user linked list, the free linked list and the update linked list, and recording the data operations in the update linked list, wherein the types of data operations include adding, deleting, modifying and checking; The update linked list is traversed, and the storage blocks of the Flash are updated synchronously according to the type of the data operation.

2. A biometric data management method for embedded devices according to claim 1, characterized in that: The step of verifying the legitimacy of the biometric data by traversing the storage blocks of the Flash includes: Verify the legitimacy of the biometric data using a CRC method or a checksum method; When the verification is valid, the valid biometric data is added to the user linked list, otherwise, it is added to the free linked list.

3. The biometric data management method for embedded devices according to claim 1, characterized in that: The using the user linked list, the free linked list and the update linked list to perform data operations in the memory, and recording the data operations in the update linked list, comprises: When adding the biometric data, a memory data block is taken from the head of the free list, the biometric data and the corresponding feature header information are modified, added to the user list and the update list, and the corresponding update flag is set to ADD.

4. The biometric data management method for embedded devices according to claim 1, characterized in that: The using the user linked list, the free linked list and the update linked list to perform data operations in the memory, and recording the data operations in the update linked list, comprises: When deleting the biometric data, searching in the user list using the user ID in the feature header information; Deleting the found biometric data from the user linked list, adding it to the update linked list, and setting the corresponding update flag to DEL; The deleted memory data block is added to the tail of the free linked list.

5. The biometric data management method for embedded devices according to claim 4, characterized in that: The using the user linked list, the free linked list and the update linked list to perform data operations in the memory, and recording the data operations in the update linked list, comprises: When all the biometric data are cleared, all the biometric data in the user linked list are deleted and added to the update linked list, and the corresponding update flag is set to DEL_ALL.

6. The biometric data management method for embedded devices according to claim 1, characterized in that: The method of performing data operations in the memory by using the user linked list, the free linked list and the update linked list includes: When comparing the biometric data, the feature comparison operation is performed by traversing the user linked list.

7. The biometric data management method for embedded devices according to claim 1, characterized in that: The traversing the update linked list and synchronously updating the storage block of the Flash according to the type of the data operation includes: When writing to Flash, the alignment position that satisfies the specific block size is calculated based on the updated memory address of the biometric data, and based on the mirror relationship between the memory and Flash, the written Flash address and size are calculated based on the alignment position of the specific block size; wherein the specific block size is the same as the size of the minimum block operation of Flash.

8. The biometric data management method for embedded devices according to claim 7, characterized in that: The step of calculating an alignment position satisfying a specific block size according to the updated memory address of the biometric data, and calculating a written Flash address and size according to the alignment position of the specific block size based on a mirror relationship between the memory and the Flash, comprises: Use aligned_addr = (update_ptr / alignment) * alignment to calculate the alignment position of a specific block size, where update_ptr represents the memory address where the updated biometric data is located, and alignment represents the size of the minimum block operation of Flash; The written Flash address is calculated using flash_addr=(aligned_addr-gFirstFeature)+Flash_offset, where gFirstFeature=((gFeatures+alignment-1) / alignment)*alignment, where Flash_offset represents the starting address of the Flash, gFirstFeature represents the address of the first biometric data, and gFeatures represents the starting address of the memory.

9. A biometric data management device for embedded devices, characterized in that: The device comprises: A storage block division unit, used to divide the storage space of the Flash into a plurality of storage blocks of fixed size, wherein each storage block stores a biometric feature data and corresponding feature header information; A mapping establishment unit, used to load all the biometric data from the Flash into the memory after the operating system of the embedded device is started, and to establish a mirror relationship between the storage space of the memory and the Flash; A verification unit, used to verify the legitimacy of the corresponding biometric data by traversing the storage blocks of the Flash, and to initialize a user linked list, a free linked list, and an update linked list; A data operation unit, used to perform data operations in the memory using the user linked list, the free linked list and the update linked list, and record the data operations in the update linked list, wherein the types of data operations include adding, deleting, modifying and checking; The synchronous update unit is used to traverse the update linked list and synchronously update the storage block of the Flash according to the type of the data operation.

10. A biometric data management device applied to an embedded device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a biometric data management method applied to an embedded device as claimed in any one of claims 1 to 8.