File-system-free embedded small-capacity storage data security management method and system
By employing dual and multiple backup storage areas in small-capacity embedded memory, combined with CRC and SUM checks, the problems of high resource consumption and insufficient data security in small-capacity memory are solved, achieving reliable data storage and secure management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SIFANG JIBAO AUTOMATION
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, small-capacity embedded memories suffer from high resource consumption due to the lack of file system support, and frequent writes may damage the memory. Furthermore, they lack data backup mechanisms, resulting in insufficient data security.
The system employs dual-backup and multi-backup storage areas, achieving dual backup and multiple redundant storage of data through physical address mapping and data structure verification. Combined with CRC and SUM checks, it ensures data integrity and storage reliability.
It effectively prevents partial memory failure and data loss, saves storage resources, is suitable for small-capacity memory, supports protection against frequent data writes, and ensures data security and reliability.
Smart Images

Figure CN121996474A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of file system-less storage technology, and more specifically, relates to a method and system for data security management of embedded small-capacity storage without a file system. Background Technology
[0002] File system-less embedded small-capacity memories generally include electrically erasable programmable read-only memory (EEPROM), ferroelectric memory (FRAM), flash memory (FLASH), and non-volatile random access memory (NVRAM). These memories are generally small in capacity, are designed according to the embedded system, do not have a bus interface for general storage media, do not support expansion, and their storage content or file access rules need to be designed in the embedded system.
[0003] For traditional small embedded systems, incorporating a file system requires significant hardware resources. Most terminal or sensor products lack the hardware to support embedded software using a file system. Therefore, these products typically store data by directly specifying the physical address and content, reserving a portion of memory to specify the physical address, thus providing scalability for storing a specific type of data.
[0004] CN105243071 proposes a method for retrieving files without a file system. This patent utilizes a cached linked storage structure. Each data block has a fixed-format header pointing to the previous data block, and a fixed header containing detailed file information is stored at the starting address of the memory. When an external computer needs to read data from the embedded device, the embedded system sends data from the starting address of the memory to the external computer. When data is returned, all data in the embedded memory can be returned to the external computer, and then the entire file or a specific file can be reconstructed based on the detailed file information in the fixed header. However, it essentially still uses a file system and file management model, distributing files to different physical addresses in the memory according to scalability requirements. Reading and writing are performed through data tables and linked storage structures, which still places high demands on resources, requiring significant storage space to record file header information and linked storage information, making it unsuitable for small-capacity storage.
[0005] CN119862157 proposes a file resource access method, device, and medium without a file system platform. It allocates memory space to store file resources and file list areas separately, uses PC folders for file resource and file list area management, and formats the read file data into C language arrays of appropriate length for transmission. Its storage media include NAND flash memory, NOR flash memory, and flash memory. However, it primarily targets various types of flash memory and uses a PC file system for file resource generation and file list management, making it unsuitable for small embedded systems or small-capacity storage media. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method for secure data management of small-capacity embedded storage without a file system. It is primarily applicable to microcontrollers equipped with small embedded memories, such as EEPROM, FRAM, FLASH, and NVRAM, used in micro-miniature embedded systems. This method saves memory resources, reduces embedded system overhead, solves the problem of data lack of backup in traditional technologies, and addresses the issue of frequent data writes potentially damaging the memory.
[0007] The present invention adopts the following technical solution.
[0008] The first aspect of this invention proposes a method for secure data management of embedded small-capacity storage without a file system, comprising: Use any specified physical address of the memory as the storage address for the memory's first read / write flag; write the set flag data into the memory's first read / write flag; divide the area corresponding to other physical addresses of the memory, excluding the set physical address, into multiple dual-backup storage data areas and multiple multi-backup storage data areas, wherein the dual-backup storage data area contains two backup areas and the multi-backup storage data area contains multiple backup areas. When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time. When reading stored data in the dual backup storage data area, first determine whether it is the first read based on the first read / write flag of the memory. If so, format the stored data. Otherwise, verify the stored data in the two backup areas in the set order, and read and overwrite the data according to the verification results. When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. When reading stored data in the multi-backup storage data area, first determine whether it is the first read based on the memory's first read / write flag. If so, format the stored data; otherwise, read it based on the data number.
[0009] Preferably, the physical address includes the page or sector where the first address is located, the page or sector where the last address is located, or the page or sector where any intermediate address is located.
[0010] Preferably, when the stored data is designated as important data, the stored data is encapsulated into a corresponding storage structure, specifically as follows: Before writing, a correctness check is performed, which verifies the data type, data size, and data range. If the correctness check is not met, the write operation is not performed. If the correctness check is satisfied, then the stored data entity is checked. The stored data entity check is either CRC cyclic redundancy check or SUM summation check, and a stored data entity check flag is obtained. For dual-backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data version, storage data entity, and reserved space.
[0011] Preferably, the step of simultaneously writing the storage structure into two backup areas of a dual-backup storage data area specifically involves: Once the address corresponding to the first backup area of the dual backup storage data region is successfully written, the same storage structure will be written to the address corresponding to the second backup area of the same dual backup storage data region. The corresponding storage structure is written to the first backup area and the corresponding address in the first backup area. If any one of the writes fails, a memory failure alarm event is reported. If both writes fail, a storage failure alarm message is reported.
[0012] Preferably, the step of sequentially verifying the stored data in the two backup areas according to a set order, and then reading and overwriting the data based on the verification results, specifically involves: The storage data written to the address corresponding to the first backup area of the dual backup storage data area is the first set of parameters for the corresponding dual backup storage data area, and the storage data written to the address corresponding to the second backup area is the second set of parameters for the corresponding dual backup storage data area. First, load the second set of parameters and check the stored data entity verification flag, recording whether the verification result is correct; then load the first set of parameters and check the stored data entity verification flag. If both stored data entity flags show that the verification is correct, then the first parameter is used and loaded into memory; and the stored data entity verification flags of the two parameters are compared to see if they are consistent. If they are inconsistent, then the first parameter is overwritten by the second parameter and stored in the corresponding address of the second backup area. If only one parameter passes the validation, the corresponding parameter that passed the validation is used, the corresponding parameter is loaded into memory, and the parameter that passed the validation overwrites the parameter that failed the validation. If both verifications fail, the first set of parameters is used. The first set of parameters is loaded into memory, and a storage error alarm is reported.
[0013] Preferably, the step of performing multiple writes involves encapsulating the stored data into a corresponding storage structure each time a write operation is performed, specifically as follows: Before writing, a correctness check is performed, which verifies the data type, data size, and data range. If the correctness check is not met, the write operation is not performed. If the correctness check is satisfied, the data number in the storage structure is incremented by one based on the original data number, and then the storage data entity is checked. The storage data entity check is either CRC cyclic redundancy check or SUM summation check to obtain the storage data entity check flag. For multiple backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data number, and storage data entity; Select the backup area number in the corresponding multi-backup storage data area to be written to based on the data number; if the memory write fails, report a memory failure alarm message.
[0014] Preferably, the step of selecting the backup area number in the corresponding multi-backup storage data area to be written according to the data number specifically involves: The backup area number is written to the multi-backup storage data area by taking the remainder of the current data number relative to the total number of backup areas in the multi-backup storage data area.
[0015] Preferably, the step of reading according to the data number specifically includes: The system continuously loads the storage data of all backup areas that have been written to the corresponding multi-backup storage data areas, checks the storage data entity verification flags, and compares the data numbers corresponding to the data that have passed the verification. It then finds the storage data with the largest data number, loads the storage data with the largest data number into memory, and overwrites the storage data of all backup areas whose verification flags have failed the verification with the loaded storage data. If the verification result of all stored data entity verification flags is that the verification fails, then find the stored data with the largest corresponding data number in the backup area of all stored data and put it into memory, and report the storage error alarm information.
[0016] Preferably, when checking the stored data entity verification flag, if the verification fails, the data is read repeatedly for verification. The time interval between each reread is a set time interval. If a verification passes, the reading stops and the data is finally judged as having passed. If the verification fails after a set number of times, the data is finally judged as having failed.
[0017] The second aspect of this invention proposes a file system-free embedded small-capacity storage data security management system based on the method described in the first aspect of this invention, comprising a physical address mapping and initial read / write management module, a dual-backup storage write module, a dual-backup storage read module, a multi-backup storage write module, and a multi-backup storage read module, specifically: Physical address mapping and first read / write management module: Uses any specified physical address of the memory as the storage address for the memory's first read / write flag; writes set flag data into the memory's first read / write flag; divides the area corresponding to other physical addresses in the memory (excluding the set physical address) into multiple dual-backup storage data areas and multiple multi-backup storage data areas, wherein the dual-backup storage data area contains two backup areas and the multi-backup storage data area contains multiple backup areas. Dual backup storage write module: When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time; Dual backup storage read module: When reading stored data in the dual backup storage data area, it first determines whether it is the first read based on the first read / write flag of the memory. If so, it formats the stored data. Otherwise, it checks the stored data in the two backup areas in the set order and reads and overwrites the data based on the check results. Multi-backup storage write module: When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. Multi-backup storage read module: When reading stored data in the multi-backup storage data area, it first determines whether it is the first read based on the first read / write flag of the storage. If so, it formats the stored data; otherwise, it reads the data based on the data number.
[0018] The beneficial effects of this invention are that, compared with the prior art, (1) The present invention has a dual backup error correction mechanism for storing important data, which effectively prevents data loss due to abnormal reasons such as partial failure of the memory or abnormal power failure during reading and writing; (2) Supports multiple backups and fragmented storage for frequently accessed data to prevent damage to storage media with limited erase / write cycles, such as EEPROM and FLASH, which would affect data storage and retrieval. (3) The data stored in the storage medium of the present invention are arranged in a compact, fully mapped manner according to different data structure forms designed, which greatly saves the storage resources of small-capacity memory; (4) The present invention can issue an alarm signal for storage failure or storage identification caused by abnormal storage medium, and overwrite erroneous data during reading to ensure data correctness; (5) It is simple to implement, extremely small in size, and easy to port. It is suitable for small microcontroller embedded systems and embedded storage. When data is stored in the memory, it exists in the form of data structure or data stream. There is no concept of "file" and no file management related methods are used. Attached Figure Description
[0019] Figure 1 A diagram illustrating the full mapping of memory data structures; Figure 2 Flowchart of write operation for dual backup storage; Figure 3 Flowchart for dual backup storage read operation; Figure 4 Flowchart for write operations to multiple backup storage; Figure 5 Flowchart for multiple backup storage read operations. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0021] Embodiment 1 of the present invention proposes a method for secure data management of embedded small-capacity storage without a file system, including... like Figure 1As shown, any specified physical address of the memory is used as the storage address for the memory's first read / write flag; the set flag data is written into the memory's first read / write flag; it should be noted that the set flag data is not the default data, and after the first read / write, the first read / write flag is modified to the default data; It should be noted that, Figure 1 There are two initial read / write flags in the memory. Both of these flags are used for verification, and using two flags prevents data loss. The default state of the memory at the factory is to read data that is all 0s or all 0xFFs (usually all 0xFFs). During the first operation, both initial operation flags need to be written to the same preset value that is not 0xFF. During the next verification, as long as either flag is the preset value that has been written, it proves that the memory has been initialized by operation.
[0022] The first operation flag is theoretically only written when the program runs for the first time. After that, it will only be used for reading to determine whether the memory is the first operation. If the program runs the memory for the first time, other double-backed or multi-backed storage data can be stored for the first time in a preset manner.
[0023] The memory is divided into multiple dual-backup storage data areas and multiple multi-backup storage data areas, except for the set physical addresses. The dual-backup storage data areas contain two backup areas, and the multi-backup storage data areas contain multiple backup areas. Specifically, in this embodiment, the number of dual-backup storage data areas and the number of multi-backup storage data areas are the same, both being n. Figure 1 In the first multi-backup storage data area, m1 represents the total number of backup areas. n This is the nth multiple backup storage data area.
[0024] It should be noted that for other physical address regions of the memory, a full mapping method using data structures is used to dynamically allocate the actual physical storage addresses for each dual-backup and multi-backup storage data region according to the requirements of the embedded system. These actual physical addresses can be dynamically calculated using the member offsets of the data structure and do not need to be defined.
[0025] When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time. It should be noted that the important data includes parameters involved in the operation of the embedded system.
[0026] When reading stored data in the dual backup storage data area, first determine whether it is the first read based on the first read / write flag of the memory. If so, format the stored data. Otherwise, verify the stored data in the two backup areas in the set order, and read and overwrite the data according to the verification results. When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. It should be noted that if the two conditions are not met—that the stored data is set as important data and that the memory is a memory with a lifespan of less than a set number of erase / write cycles and the stored data is data with a storage frequency higher than a set frequency threshold—then the stored data can either be stored with dual backups for greater reliability, or it can be stored normally without verification. If it is stored without verification, it is not discussed within the scope of this invention.
[0027] It should be noted that the set number threshold is set to 100,000 or 1 million times; the memory with a write cycle life of less than the set number threshold is an EEPROM or FLASH memory.
[0028] It should be noted that the storage structures corresponding to dual backup data storage and multi backup data storage can coexist on the same storage medium and can be stored continuously.
[0029] When reading stored data in the multi-backup storage data area, first determine whether it is the first read based on the memory's first read / write flag. If so, format the stored data; otherwise, read it based on the data number.
[0030] In this preferred embodiment, the physical address includes the page or sector where the first address is located, the page or sector where the last address is located, or the page or sector where any intermediate address is located.
[0031] In this preferred embodiment, when the stored data is designated as important data, the stored data is encapsulated into a corresponding storage structure, specifically as follows: like Figure 2 As shown, when writing, a correctness check is performed first, which verifies the data type, data size, and data range; if the correctness check is not met, the writing is not performed. If the correctness check is satisfied, then the stored data entity is checked. The stored data entity check is either CRC cyclic redundancy check or SUM summation check, and a stored data entity check flag is obtained. For dual-backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data version, storage data entity, and reserved space.
[0032] In this preferred embodiment, the step of simultaneously writing the storage structure into two backup areas of a dual-backup storage data area specifically involves: Once the address corresponding to the first backup area of the dual backup storage data region is successfully written, the same storage structure will be written to the address corresponding to the second backup area of the same dual backup storage data region. The corresponding storage structure is written to the first backup area and the corresponding address in the first backup area. If any one of the writes fails, a memory failure alarm event is reported. If both writes fail, a storage failure alarm message is reported.
[0033] In this preferred embodiment, the step of sequentially verifying the stored data of the two backup areas in a set order, and then reading and overwriting the data based on the verification results, specifically involves: like Figure 3 As shown, the storage data written to the address corresponding to the first backup area of the dual backup storage data area is the first set of parameters for the corresponding dual backup storage data area, and the storage data written to the address corresponding to the second backup area is the second set of parameters for the corresponding dual backup storage data area. First, load the second set of parameters and check the stored data entity verification flag, recording whether the verification result is correct; then load the first set of parameters and check the stored data entity verification flag. If both stored data entity flags show that the verification is correct, then the first parameter is used and loaded into memory; and the stored data entity verification flags of the two parameters are compared to see if they are consistent. If they are inconsistent, then the first parameter is overwritten by the second parameter and stored in the corresponding address of the second backup area. If only one parameter passes the validation, the corresponding parameter that passed the validation is used, the corresponding parameter is loaded into memory, and the parameter that passed the validation overwrites the parameter that failed the validation. If both verifications fail, the first set of parameters is used. The first set of parameters is loaded into memory, and a storage error alarm is reported.
[0034] In this preferred embodiment, the process of performing multiple writes involves encapsulating the stored data into a corresponding storage structure each time a write operation is performed. like Figure 4 As shown, when writing, a correctness check is performed first, which verifies the data type, data size, and data range; if the correctness check is not met, the writing is not performed. If the correctness check is satisfied, the data number in the storage structure is incremented by one based on the original data number, and then the storage data entity is checked. The storage data entity check is either CRC cyclic redundancy check or SUM summation check to obtain the storage data entity check flag. For multiple backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data number, and storage data entity; Select the backup area number in the corresponding multi-backup storage data area to be written to based on the data number; if the memory write fails, report a memory failure alarm message.
[0035] In this preferred embodiment, the step of selecting the backup area number in the corresponding multi-backup storage data area to be written according to the data number specifically involves: The backup area number is written to the multi-backup storage data area by taking the remainder of the current data number relative to the total number of backup areas in the multi-backup storage data area.
[0036] In this preferred embodiment, the step of reading according to the data number specifically includes: like Figure 5 As shown, the system iteratively loads the storage data of all backup areas that have been written to the corresponding multi-backup storage data areas, checks the storage data entity verification flags, and compares the data numbers corresponding to the data that have passed the verification. The system then finds the storage data with the largest data number. The storage data with the largest data number is loaded into memory, and the loaded storage data with the largest data number is used to overwrite the storage data of all backup areas whose verification flags have failed the verification. If the verification result of all stored data entity verification flags is that the verification fails, then find the stored data with the largest corresponding data number in the backup area of all stored data and put it into memory, and report the storage error alarm information.
[0037] In this preferred embodiment, when checking the stored data entity verification flag, if the verification fails, the data is read repeatedly for verification. The time interval between each reread is a set time interval. If a verification passes, the reading stops and the data is finally judged as having passed. If the verification fails the set number of times, the data is finally judged as having failed.
[0038] Embodiment 2 of the present invention proposes a file system-less embedded small-capacity storage data security management system based on the method described in Embodiment 1 of the present invention, including a physical address mapping and initial read / write management module, a dual backup storage write module, a dual backup storage read module, a multi-backup storage write module, and a multi-backup storage read module, specifically as follows: Physical address mapping and first read / write management module: Uses any specified physical address of the memory as the storage address for the memory's first read / write flag; writes set flag data into the memory's first read / write flag; divides the area corresponding to other physical addresses in the memory (excluding the set physical address) into multiple dual-backup storage data areas and multiple multi-backup storage data areas, wherein the dual-backup storage data area contains two backup areas and the multi-backup storage data area contains multiple backup areas. Dual backup storage write module: When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time; Dual backup storage read module: When reading stored data in the dual backup storage data area, it first determines whether it is the first read based on the first read / write flag of the memory. If so, it formats the stored data. Otherwise, it checks the stored data in the two backup areas in the set order and reads and overwrites the data based on the check results. Multi-backup storage write module: When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. Multi-backup storage read module: When reading stored data in the multi-backup storage data area, it first determines whether it is the first read based on the first read / write flag of the storage. If so, it formats the stored data; otherwise, it reads the data based on the data number.
[0039] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for secure data management of embedded small-capacity storage without a file system, characterized in that: include Use any physical address of the memory as the storage address for the first read / write flag of the memory. Write the set flag data into the first read / write flag of the memory; divide the area corresponding to the physical address other than the set physical address of the memory into multiple dual-backup storage data areas and multiple multi-backup storage data areas, wherein the dual-backup storage data area contains two backup areas and the multi-backup storage data area contains multiple backup areas; When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time. When reading stored data in the dual backup storage data area, first determine whether it is the first read based on the first read / write flag of the memory. If so, format the stored data. Otherwise, verify the stored data in the two backup areas in the set order, and read and overwrite the data according to the verification results. When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. When reading stored data in the multi-backup storage data area, first determine whether it is the first read based on the memory's first read / write flag. If so, format the stored data; otherwise, read it based on the data number.
2. The method for secure data management of embedded small-capacity storage without a file system according to claim 1, characterized in that: The physical address includes the page or sector containing the first address, the page or sector containing the last address, or the page or sector containing any intermediate address.
3. The method for secure data management of embedded small-capacity storage without a file system according to claim 1, characterized in that: When the stored data is designated as important data, the stored data is encapsulated into a corresponding storage structure, specifically as follows: Before writing, a correctness check is performed, which verifies the data type, data size, and data range. If the correctness check is not met, the write operation is not performed. If the correctness check is satisfied, then the stored data entity is checked. The stored data entity check is either CRC cyclic redundancy check or SUM summation check, and a stored data entity check flag is obtained. For dual-backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data version, storage data entity, and reserved space.
4. The method for secure data management of embedded small-capacity storage without a file system according to claim 3, characterized in that: The process of simultaneously writing the storage structure into two backup areas of a dual-backup storage data area is as follows: Once the address corresponding to the first backup area of the dual backup storage data region is successfully written, the same storage structure will be written to the address corresponding to the second backup area of the same dual backup storage data region. The corresponding storage structure is written to the first backup area and the corresponding address in the first backup area. If any one of the writes fails, a memory failure alarm event is reported. If both writes fail, a storage failure alarm message is reported.
5. The method for secure data management of embedded small-capacity storage without a file system according to claim 4, characterized in that: The process involves sequentially verifying the stored data in the two backup areas according to a pre-defined order, and then reading and overwriting the data based on the verification results. The storage data written to the address corresponding to the first backup area of the dual backup storage data area is the first set of parameters for the corresponding dual backup storage data area, and the storage data written to the address corresponding to the second backup area is the second set of parameters for the corresponding dual backup storage data area. First, load the second set of parameters and check the stored data entity verification flag, recording whether the verification result is correct; then load the first set of parameters and check the stored data entity verification flag. If both stored data entity flags show that the verification is correct, then the first set of parameters is used and loaded into memory; The system compares the storage data entity verification flags of the two sets of parameters to see if they are consistent. If they are inconsistent, the first set of parameters is overwritten by the second set of parameters and stored at the corresponding address in the second backup area. If only one parameter passes the validation, the corresponding parameter that passed the validation is used, the corresponding parameter is loaded into memory, and the parameter that passed the validation overwrites the parameter that failed the validation. If both verifications fail, the first set of parameters is used. The first set of parameters is loaded into memory, and a storage error alarm is reported.
6. The method for secure data management of embedded small-capacity storage without a file system according to claim 1, characterized in that: The process involves multiple writes, with each write operation encapsulating the stored data into a corresponding storage structure. Specifically: Before writing, a correctness check is performed, which verifies the data type, data size, and data range. If the correctness check is not met, the write operation is not performed. If the correctness check is satisfied, the data number in the storage structure is incremented by one based on the original data number, and then the storage data entity is checked. The storage data entity check is either CRC cyclic redundancy check or SUM summation check to obtain the storage data entity check flag. For multiple backup storage data areas, the storage structure is set as storage data entity verification flag, data length, data number, and storage data entity; Select the backup area number in the corresponding multi-backup storage data area to be written to based on the data number; if the memory write fails, report a memory failure alarm message.
7. The method for secure data management of embedded small-capacity storage without a file system according to claim 6, characterized in that: The step of selecting the backup area number in the corresponding multi-backup storage data area to be written according to the data number is specifically as follows: The backup area number is written to the multi-backup storage data area by taking the remainder of the current data number relative to the total number of backup areas in the multi-backup storage data area.
8. The method for secure data management of embedded small-capacity storage without a file system according to claim 7, characterized in that: The process of reading data based on the data number specifically involves: The system continuously loads the storage data of all backup areas that have been written to the corresponding multi-backup storage data areas, checks the storage data entity verification flags, and compares the data numbers corresponding to the data that have passed the verification. It then finds the storage data with the largest data number, loads the storage data with the largest data number into memory, and overwrites the storage data of all backup areas whose verification flags have failed the verification with the loaded storage data. If the verification result of all stored data entity verification flags is that the verification fails, then find the stored data with the largest corresponding data number in the backup area of all stored data and put it into memory, and report the storage error alarm information.
9. The method for secure data management of embedded small-capacity storage without a file system according to claim 8, characterized in that: When verifying the stored data entity verification flag, if the verification fails, the data is read repeatedly for verification. The time interval between each reread is the set time interval. If a verification passes, the reading stops and the data is ultimately judged as verified. If the verification fails the set number of times, the data is ultimately judged as verified.
10. A file-free embedded small-capacity storage data security management system based on the method of any one of claims 1-9, comprising a physical address mapping and initial read / write management module, a dual-backup storage write module, a dual-backup storage read module, a multi-backup storage write module, and a multi-backup storage read module, characterized in that: Physical address mapping and first read / write management module: Uses any specified physical address of the memory as the storage address for the memory's first read / write flag; Write the set flag data into the first read / write flag of the memory; divide the area corresponding to the physical address other than the set physical address of the memory into multiple dual-backup storage data areas and multiple multi-backup storage data areas, wherein the dual-backup storage data area contains two backup areas and the multi-backup storage data area contains multiple backup areas; Dual backup storage write module: When the stored data is set to be important data, the stored data is encapsulated into the corresponding storage structure, and the storage structure is written to the two backup areas of a dual backup storage data area at the same time; Dual backup storage read module: When reading stored data in the dual backup storage data area, it first determines whether it is the first read based on the first read / write flag of the memory. If so, it formats the stored data. Otherwise, it checks the stored data in the two backup areas in the set order and reads and overwrites the data based on the check results. Multi-backup storage write module: When the memory is a memory with a lifespan of less than the set number of erase / write cycles and the stored data is data with a storage frequency higher than the set frequency threshold, multiple writes are performed. Each time the data is written, it is encapsulated into a corresponding storage structure. Each time the data is written, the data number flag in the storage structure is incremented by one. The backup area number in the corresponding multi-backup storage data area is selected according to the data number. Multi-backup storage read module: When reading stored data in the multi-backup storage data area, it first determines whether it is the first read based on the first read / write flag of the storage. If so, it formats the stored data; otherwise, it reads the data based on the data number.