A method, device, equipment and medium for extending storage life of identification module

By introducing a self-learning mechanism and dynamic storage strategy into the face recognition module, the problem of uneven Flash wear caused by the inability of facial features to adapt to changes is solved, extending the service life of the module and avoiding resource waste.

CN117666958BActive Publication Date: 2024-09-13SHENZHEN MAGIC INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311666581.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2024-09-13
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

The existing face recognition module lacks a self-learning mechanism, resulting in the inability of facial features to automatically adapt to daily changes, resulting in uneven wear of the Flash storage area and shortening the service life of the module.

Method used

By receiving feature matching instructions, the storage strategy is adjusted based on the self-learning judgment results, the storage area is dynamically selected and the storage status is recorded, data fusion and data exchange between blocks are realized to balance the wear and tear of Flash storage.

Benefits of technology

The storage life of the identification module is extended, resource waste is avoided, and the reliability and service life of the storage device are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666958B
    Figure CN117666958B
Patent Text Reader

Abstract

The present invention provides a method for extending the storage life of an identification module, comprising: receiving a feature matching instruction from the identification module, obtaining a self-learning judgment result according to the feature matching instruction; storing the feature data after self-learning in a storage module of the identification module according to the self-learning judgment result indicating the existence of a self-learning process, and recording the storage state of the storage module; adjusting the self-learning strategy of the identification module according to the storage state of the storage module. Dynamically selecting a suitable storage area according to the self-learning result and the wear condition of the current Flash storage module and updating the self-learning strategy at the same time, so as to achieve the effect of balanced wear, thereby greatly extending the storage life of the identification module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and in particular to a method, device, equipment and medium for extending the storage life of an identification module. Background Art

[0002] With the rapid development of deep learning, deep learning technology can process large-scale complex data sets and extract high-level abstract features from them by building deep neural network models. This technological breakthrough has enabled machine learning to achieve breakthrough results in areas such as image processing and natural language processing. For example, the application of deep learning technology in the field of computer vision has been able to identify objects and scenes in pictures and realize functions such as intelligent image search and image annotation.

[0003] Taking the field of face recognition as an example, general face recognition modules lack a self-learning mechanism, that is, the facial features after registration remain unchanged. This results in face registration only recording the current facial feature status and posture information, and cannot automatically adapt to the daily changes of the face. There is a risk of being unable to unlock the door after a period of time.

[0004] The face recognition module with a self-learning mechanism will update and record the daily changes of the face, and gradually supplement other information such as posture and direction that were not covered during registration. However, the face recognition module usually uses a simple operating system without file system management, and the facial feature storage location and the Flash area adopt a simple one-to-one mapping relationship. The algorithm for searching for free and available Flash is also a sequential search from beginning to end, which will lead to inconsistent Flash wear in each block: frequently used and frequently updated facial features will have more Flash erase and write times, and the head Flash block will also have more Flash erase and write times due to more frequent additions and deletions. This also causes these blocks to reach the end of their service life faster. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention provides a method and device for extending the storage life of the identification module, which can dynamically select a suitable storage area according to the self-learning results and the wear condition of the current Flash storage module and update the self-learning strategy at the same time to achieve the effect of balanced wear, thereby greatly extending the storage life of the identification module.

[0006] The technical solution adopted by the present invention to solve its technical problem is: a method for extending the storage life of an identification module, and its improvement lies in that the method comprises: receiving a feature matching instruction from the identification module, and obtaining a self-learning judgment result according to the feature matching instruction; according to the self-learning judgment result indicating the existence of a self-learning process, storing the feature data after self-learning in a storage module of the identification module, and recording the storage status of the storage module; according to the storage status of the storage module, adjusting the self-learning strategy of the identification module.

[0007] The above technical solution describes receiving a feature matching instruction from the identification module and obtaining a self-learning judgment result based on the feature matching instruction, including: when the identification module receives an ID registration instruction, saving the current feature data carried by the ID into the storage module; if there is a difference between the current feature data carried by the ID and the feature data saved in the storage module, fusing the current feature data of the ID with the saved feature data; based on the feature data after the data fusion, the self-learning judgment result indicates that there is a self-learning process in the identification module.

[0008] The above technical solution stores the self-learned feature data in the storage module of the identification module and records the storage status of the storage module, including: traversing several storage blocks in the storage module, and if the number of erase and write times of the current storage block reaches a multiple of the set erase and write times, searching for free storage blocks in the storage module; according to the retrieval result indicating that there are free storage blocks with fewer erase and write times in the storage module, storing the self-learned feature data stored in the current storage block in the free storage block, and recording the erase and write times of the several storage blocks and the frequency of use of each ID.

[0009] After recording the number of times the storage blocks are erased and written and the usage frequency of each ID in the above technical solution, the method further comprises: obtaining the usage frequency of each ID and arranging them from high to low according to the usage frequency;

[0010] Determine whether there is a series of IDs among the IDs with lower usage frequency than the current ID whose usage frequency reaches a set difference with the current ID; if so, swap the ID with the smallest number of erase times in the series of IDs with the current ID storage block, increase the number of erase times of the swapped storage block by one, increase the current ID usage frequency by one, and modify the corresponding information value at the same time.

[0011] The above technical solution describes adjusting the self-learning strategy of the identification module according to the storage status of the storage module, including: if the overall erase and write times of the storage module is less than the first threshold, configuring the self-learning strategy of the identification module to the first mode; if the overall erase and write times of the storage module reaches the second threshold range, configuring the self-learning strategy of the identification module to the second mode; if the overall erase and write times of the storage module reaches the third threshold range, configuring the self-learning strategy of the identification module to the third mode; if the overall erase and write times of the storage module reaches greater than the fourth threshold, no longer self-learning is performed on the feature data, and the feature matching instruction is returned to the upper layer to notify the upper layer to make an early warning or other processing strategies.

[0012] The first mode of the self-learning strategy described in the above technical solution is normal learning; the second mode of the self-learning strategy is: for a newly registered ID, the behavior of learning new features must be maintained for the first 300 times; after 300 times, learning is performed only if the difference between the current feature data and the saved feature data reaches 10%; the third mode of the self-learning strategy is: for a newly registered ID, the behavior of learning new features must be maintained for the first 30 times; after 30 times, learning is performed only if the difference between the current feature data and the saved feature data reaches 15%.

[0013] The technical solution adopted by the present invention to solve its technical problem is: a device for extending the storage life of an identification module, the device comprising: a self-learning judgment module, used to receive a feature matching instruction from the identification module, and obtain a self-learning judgment result according to the feature matching instruction; a data storage module, used to store the self-learned feature data in a storage module of the identification module according to the self-learning judgment result indicating the existence of a self-learning process, and simultaneously record the storage status of the storage module; a strategy update module, used to adjust the self-learning strategy of the identification module according to the storage status of the storage module.

[0014] The technical solution adopted by the present invention to solve its technical problem is: an electronic device, comprising: at least one processor, at least one memory, wherein the memory stores program instructions or codes; the program instructions or codes are loaded and executed by the processor, so that the electronic device implements the method of extending the storage life of the identification module.

[0015] The technical solution adopted by the present invention to solve its technical problem is: a storage medium on which program instructions or codes are stored, and the program instructions or codes are loaded and executed by a processor to implement the method of extending the storage life of the identification module.

[0016] The beneficial effects of the present invention are: dynamically selecting a suitable storage area according to the self-learning result and the wear condition of the current Flash storage module and updating the self-learning strategy at the same time to achieve the effect of balanced wear, greatly extending the storage life of the recognition module and avoiding waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of a method for extending the storage life of an identification module provided by the present invention;

[0018] Figure 2 for Figure 1 , a method flow chart of step 10 in an exemplary embodiment;

[0019] Figure 3 for Figure 1 , a method flow chart of step 20 in an exemplary embodiment;

[0020] Figure 4 A schematic diagram of data transfer between storage blocks provided by the present invention;

[0021] Figure 5 for Figure 1 , a method flow chart of step 20 in another exemplary embodiment;

[0022] Figure 6 A schematic diagram of data exchange between storage blocks provided by the present invention;

[0023] Figure 7 for Figure 1 , a method flow chart of step 30 in an exemplary embodiment;

[0024] Figure 8 A device for extending the storage life of an identification module provided by the present invention;

[0025] Fig. 9 This is a structural block diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0026] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0027] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interchangeably without conflicting with each other.

[0028] like Figure 1 As shown, the present invention provides a method for extending the storage life of an identification module, the method comprising the following steps:

[0029] Step 10, receiving a feature matching instruction from the recognition module, and obtaining a self-learning judgment result according to the feature matching instruction.

[0030] Among them, taking a face recognition module that includes a self-learning mechanism as an example, when the face recognition module enters features for the same ID, along with the daily changes in the face, it is necessary to match the changed facial features with the saved facial features to determine whether there is a self-learning process in the face recognition module.

[0031] Specifically, in a possible implementation, such as Figure 2 As shown, the above step 10 may include the following steps:

[0032] Step 110: When the identification module receives the ID registration instruction, the current feature data carried by the ID is saved in the storage module.

[0033] When there is an ID registration behavior for the recognition module, the recognition module will receive an ID registration instruction generated by the ID registration behavior, and save the current feature data carried by the ID under the control of the ID registration instruction.

[0034] Step 120: If there is a difference between the current feature data carried by the ID and the feature data stored in the storage module, the current feature data of the ID is merged with the stored feature data.

[0035] Specifically, the storage module of the recognition module will give priority to the feature data saved for the first time as the facial features. When the face changes, for the feature data of the same identity ID, the storage module will match the current feature data with the saved feature data. When the matching result indicates that the difference between the feature data of the same ID exceeds the set threshold, it can be determined that the registered facial features have changed, and the saved data needs to be polarized and supplemented according to the changed feature data to obtain the feature data after self-learning.

[0036] Step 130: Based on the feature data after the data fusion, the self-learning judgment result indicates that a self-learning process exists in the recognition module.

[0037] Through the above steps, it is possible to determine whether there is a self-learning process in the recognition module, and after determining that there is a self-learning process, the self-learning strategy of the recognition module is updated.

[0038] Step 20, according to the self-learning judgment result indicating the existence of a self-learning process, the feature data after self-learning is stored in a storage module of the recognition module, and the storage state of the storage module is recorded at the same time.

[0039] It is worth mentioning that the feature data after self-learning can be saved to the inert area of ​​the storage module of the identification module, or to the active area of ​​the storage module of the identification module, which is not limited here. Among them, the inert area refers to the flash block in the storage module with few erase and write times or few ID usage times; the active area refers to the flash block in the storage module with many erase and write times or many ID usage times.

[0040] Specifically, in a possible implementation, such as Figure 3 As shown, the above step 20 may include the following steps:

[0041] Step 210, traverse a number of storage blocks in the storage module, and if the erasure times of the current storage block reaches a multiple of the set erasure times, search for free storage blocks in the storage module.

[0042] Usually, the flash block can be erased and written 100,000 times, and the set erase and write times of the storage block are set by itself. If the set value is 1% of the maximum erase and write times of the storage block, when the erase and write times of the current storage block reach 1,000 times, it is necessary to search for the free storage blocks in the storage module, so as to transfer the data in the current storage block to the free storage blocks to avoid wasting resources. The free storage blocks refer to the above-mentioned inert area.

[0043] Step 220, according to the retrieval result indicating that there is a free storage block with fewer erase and write times in the storage module, the self-learned feature data stored in the current storage block is stored in the free storage block, and the erase and write times of the several storage blocks and the usage frequency of each ID are recorded.

[0044] Specifically, Figure 4 As shown, block A is the current storage block of the characteristic data. After calculation, it is found that the number of erase and write times reaches a multiple of the set erase and write times. Then the self-learned characteristic data in the block is newly created as temporary data X. At the same time, after the storage module retrieves the free storage block B, the temporary data X is written into the free storage block B.

[0045] It is worth mentioning that when multiple free storage blocks B1, B2, B3, etc. are retrieved from the storage module at the same time, they can be sorted according to the number of erasures or ID usage times in the multiple free storage blocks, and the temporary data X can be written from large to small according to the number of erasures or ID usage times, thereby ensuring that each free storage block can be used, while balancing the wear degree of each storage block and extending the service life.

[0046] In an exemplary embodiment, if Figure 5 As shown, after step 220, the above method may further include the following steps:

[0047] Step 230, obtaining the usage frequency of each ID, and arranging them from high to low according to the usage frequency.

[0048] Step 240 , determining whether there is a series of IDs among the IDs with lower usage frequencies than the current ID whose usage frequencies reach a set difference with the current ID.

[0049] Specifically, the ID with the least number of erasures (denoted as X) in the ID usage frequency in step 230 is obtained, and it is determined whether the difference between the number of erasures of the current ID and the number of erasures of X reaches a set value. If so, the two ID storage blocks are swapped, thereby achieving the effect of balancing the degree of wear of the storage blocks and extending the service life of the module.

[0050] Step 250, if it exists, swap the storage block with the smallest number of erasures in the series of IDs with the current ID storage block, increase the number of erasures of the swapped storage block by one, increase the frequency of use of the current ID by one, and modify the corresponding information value at the same time.

[0051] Specifically, Figure 6As shown, block A is the current ID storage block, and block B is the block with the smallest number of erase and write times in the series of IDs. The characteristic data contained in the current ID in block A is newly created as temporary data Y, and the characteristic data contained in block B is newly created as temporary data X. Then the temporary data Y originally stored in block A is written into block B, and the temporary data X originally stored in block B is written into block A. At the same time, the erase times of the swapped storage blocks are increased by one, the frequency of use of the current ID is increased by one, and the corresponding storage information is modified.

[0052] Through the above process, data exchange between the two blocks can be achieved, thereby achieving the effect of balancing the wear degree of the storage blocks and extending the service life of the module.

[0053] Step 30: adjust the self-learning strategy of the recognition module according to the storage status of the storage module.

[0054] As mentioned above, the present application can dynamically select a suitable storage area according to the self-learning result and the wear condition of the current Flash storage module to achieve the effect of balanced wear.

[0055] In an exemplary embodiment, if Figure 7 As shown, the above step 30 may include the following steps:

[0056] Step 310: If the number of erasure and writing times of the storage module as a whole is less than a first threshold, the self-learning strategy of the identification module is configured to be a first mode.

[0057] Optionally, taking the example that the first threshold is configured as the number of erase and write times of the storage module as a whole is less than 50% of the total life, the self-learning strategy of the identification module is normal learning, that is, when it is detected that the difference between the feature data for the same identity ID exceeds the set threshold, the polarity of the saved data is overwritten and supplemented to obtain the feature data after self-learning.

[0058] Step 320: If the number of erasure and writing times of the storage module as a whole reaches a second threshold range, the self-learning strategy of the identification module is configured to be a second mode.

[0059] Optionally, taking the second threshold configuration as the number of erase and write times of the storage module as a whole reaching 50%-80% of the total life as an example, at this time the self-learning strategy of the identification module is a more rigorous learning, that is, for a newly registered ID, the behavior of learning new features must be maintained for the first 300 times; after 300 times, learning will only be performed if the difference between the current feature data and the saved feature data reaches 10%.

[0060] Step 330: If the number of erasure and writing times of the storage module as a whole reaches a third threshold range, the self-learning strategy of the identification module is configured to be a third mode.

[0061] Optionally, taking the case where the third threshold is configured as the number of erase and write times of the storage module as a whole reaches 80%-98% of the total life, the self-learning strategy of the identification module is the most conservative learning, that is, for a newly registered ID, the behavior of learning new features must be maintained for the first 30 times; after 30 times, learning is performed only if the difference between the current feature data and the saved feature data reaches 15%.

[0062] Step 340: If the number of erasures and writes of the storage module as a whole reaches a value greater than the fourth threshold, the feature data will no longer be self-learned, and the feature matching instruction will be returned to the upper layer to notify the upper layer to issue an early warning or other processing strategies.

[0063] Among them, when the fourth threshold is configured so that the number of erase and write times of the storage module as a whole reaches more than 98% of the total life, the feature data will no longer be self-learned, and the feature matching instruction will be returned to the upper layer to notify the upper layer to make an early warning or other processing strategy.

[0064] Through the above process, the self-learning strategy can be updated according to the wear condition of the current storage module, ensuring that the recognition module becomes more useful with use and that the operation of the storage module achieves balanced wear, thereby extending the service life of the product.

[0065] It should be understood that, although the various steps in the above-mentioned flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0066] The following is an embodiment of the device of the present application, which can be used to execute the method for extending the storage life of the recognition module involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method for extending the storage life of the recognition module involved in the present application.

[0067] See also Figure 8 In an embodiment of the present application, a device 40 for extending the storage life of an identification module is provided. The device 40 for extending the storage life of an identification module includes but is not limited to: a self-learning judgment module 410, a data storage module 420, and a strategy update module 430.

[0068] The self-learning judgment module 410 is used to receive a feature matching instruction from the recognition module, and obtain a self-learning judgment result according to the feature matching instruction.

[0069] The data storage module 420 is used to store the feature data after self-learning in the storage module of the recognition module according to the self-learning judgment result indicating the existence of the self-learning process, and record the storage status of the storage module at the same time.

[0070] The strategy updating module 430 is used to adjust the self-learning strategy of the identification module according to the storage status of the storage module.

[0071] It should be noted that the device for extending the storage life of the identification module provided in the above embodiment only uses the division of the above functional modules as an example when extending the storage life of the identification module. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device for extending the storage life of the identification module will be divided into different functional modules to complete all or part of the functions described above. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0072] In addition, the device for extending the storage life of the identification module provided in the above embodiments and the method for extending the storage life of the identification module belong to the same concept, and the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.

[0073] See also Fig. 9 , an electronic device 4000 is provided in an embodiment of the present application. Among them, the data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a channel for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 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.

[0074] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0075] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0076] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program instructions or codes in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to this.

[0077] The memory 4003 stores program instructions or codes, and the processor 4001 can read the program instructions or codes stored in the memory 4003 through the communication bus 4002 .

[0078] When the program instruction or code is executed by the processor 4001, the method for extending the storage life of the identification module in the above-mentioned embodiments is implemented.

[0079] In addition, a storage medium is provided in an embodiment of the present application, on which program instructions or codes are stored, and the program instructions or codes are loaded and executed by a processor to implement the method for extending the storage life of the identification module as described above.

[0080] In an embodiment of the present application, a computer program product is provided. The computer program product includes program instructions or codes. The program instructions or codes are stored in a storage medium. A processor of an electronic device reads the program instructions or codes from the storage medium, loads and executes the program instructions or codes, so that the electronic device implements the method for extending the storage life of an identification module as described above.

[0081] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for extending the storage life of an identification module, characterized in that: The method comprises: Receiving a feature matching instruction from the recognition module, and obtaining a self-learning judgment result according to the feature matching instruction; According to the self-learning judgment result indicating that there is a self-learning process, the feature data after self-learning is stored in the storage module of the recognition module, and the storage state of the storage module is recorded; According to the storage state of the storage module, the self-learning strategy of the recognition module is adjusted, including: If the number of erasures and writes of the storage module as a whole is less than a first threshold, the self-learning strategy of the identification module is configured to be a first mode; If the number of erasure and writing times of the storage module as a whole reaches a second threshold range, the self-learning strategy of the identification module is configured to be a second mode; If the number of erasures and writes of the storage module as a whole reaches a third threshold range, the self-learning strategy of the identification module is configured to be a third mode; If the number of erasure and writing times of the storage module as a whole reaches a value greater than the fourth threshold value, the feature data will no longer be self-learned, and the feature matching instruction will be returned to the upper layer to notify the upper layer to issue an early warning.

2. The method for extending the storage life of the identification module according to claim 1, characterized in that: The receiving of the feature matching instruction from the recognition module and obtaining the self-learning judgment result according to the feature matching instruction includes: When the identification module receives the ID registration instruction, the current feature data carried by the ID is saved in the storage module; If there is a difference between the current feature data carried by the ID and the feature data stored in the storage module, the current feature data of the ID is merged with the stored feature data; Based on the feature data after the data fusion, the self-learning judgment result indicates that a self-learning process exists in the recognition module.

3. The method for extending the storage life of the identification module according to claim 1, characterized in that: The step of storing the self-learned feature data in a storage module of the recognition module and recording the storage state of the storage module includes: Traversing a plurality of storage blocks in the storage module, if the erasure and writing times of the current storage block reaches a multiple of the set erasure and writing times, searching for free storage blocks in the storage module; According to the retrieval result indicating that there are free storage blocks with fewer erasure times in the storage module, the self-learned feature data stored in the current storage block is stored in the free storage block, and the erasure times of the several storage blocks and the usage frequency of each ID are recorded.

4. The method for extending the storage life of the identification module according to claim 3, characterized in that: After recording the number of times the storage blocks are erased and written and the usage frequency of each ID, the method further includes: Obtain the usage frequency of each ID, and arrange them from high to low according to the usage frequency; Determine whether there is a series of IDs whose usage frequency is lower than that of the current ID and whose usage frequency reaches a set difference with that of the current ID; If it exists, the ID with the smallest number of erasures in the series of IDs is swapped with the current ID storage block, and the number of erasures of the swapped storage block is increased by one, and the frequency of use of the current ID is increased by one, and the corresponding information value is modified when used.

5. The method for extending the storage life of the identification module according to claim 1, characterized in that: include: The first mode of the self-learning strategy is normal learning; The second mode of the self-learning strategy is: for a newly registered ID, the behavior of learning new features must be maintained for the first 300 times; after 300 times, learning is performed only if the difference between the current feature data and the saved feature data reaches 10%; The third mode of the self-learning strategy is: for a newly registered ID, the behavior of learning new features must be maintained for the first 30 times; after 30 times, learning is performed only if the difference between the current feature data and the saved feature data reaches 15%.

6. A device for extending the storage life of an identification module, characterized in that: The device comprises: A self-learning judgment module, used for receiving a feature matching instruction from the recognition module, and obtaining a self-learning judgment result according to the feature matching instruction; A data storage module, used for storing the feature data after self-learning in the storage module of the recognition module according to the self-learning judgment result indicating the existence of the self-learning process, and recording the storage status of the storage module; A strategy updating module, used to adjust the self-learning strategy of the recognition module according to the storage state of the storage module, including: If the number of erasures and writes of the storage module as a whole is less than a first threshold, the self-learning strategy of the identification module is configured to be a first mode; If the number of erasure and writing times of the storage module as a whole reaches a second threshold range, the self-learning strategy of the identification module is configured to be a second mode; If the number of erasures and writes of the storage module as a whole reaches a third threshold range, the self-learning strategy of the identification module is configured to be a third mode; If the number of erasure and writing times of the storage module as a whole reaches a value greater than the fourth threshold value, the feature data will no longer be self-learned, and the feature matching instruction will be returned to the upper layer to notify the upper layer to issue an early warning.

7. An electronic device, characterized in that: include: at least one processor, at least one memory, wherein: The memory stores program instructions or codes; The program instructions or codes are loaded and executed by the processor, so that the electronic device implements the method for extending the storage life of the identification module as described in any one of claims 1 to 5.

8. A storage medium having program instructions or codes stored thereon, characterized in that: The program instructions or codes are loaded and executed by a processor to implement the method for extending the storage life of an identification module as described in any one of claims 1 to 5.