Lightweight embedded security file system
By using a lightweight embedded secure file system, combined with multi-dimensional parameters such as encryption level, temperature, and read/write cycles, storage media wear is dynamically managed, solving the problem of unreasonable resource allocation in traditional storage technologies and improving the security and reliability of the storage system.
Patent Information
- Application Number
- CN202511137722.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-12-23
AI Technical Summary
Traditional storage technologies rely solely on read/write cycles to determine storage media wear, neglecting factors such as ambient temperature and encryption levels. This leads to unreasonable allocation of storage resources, premature failure of some physical blocks, and difficulty in meeting the reliability requirements of data storage at different security levels.
It adopts a lightweight embedded secure file system, divides storage areas according to encryption level through a partition management module, collects multi-dimensional operating parameters in real time through a parameter acquisition module, calculates real-time wear through a wear calculation module, and dynamically adjusts the proportion of storage units and provides visual early warning when the storage is full threshold is triggered by a dynamic control module.
It enables multi-dimensional calculation and dynamic management of storage media wear, improving the security and reliability of the storage system, extending the lifespan of the storage media, and enhancing the utilization rate of storage resources and the stability of data storage.
Smart Images

Figure CN121188807A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to embedded systems and information security technology, and in particular to a lightweight embedded secure file system. BACKGROUND
[0002] With the rapid development of technologies such as the Internet of Things and big data, embedded devices and storage systems are increasingly widely used in industrial control, intelligent terminals, cloud computing and other fields, and the requirements for the security, reliability of data storage and the service life of storage media are becoming increasingly stringent.
[0003] However, the current traditional storage technology has significant defects. The judgment of the wear of the physical block of the storage medium mostly depends on only a single dimension index of the number of read and write times, completely ignoring the comprehensive influence of multiple factors such as environmental temperature, encryption level, and number of read and write times on the wear of the physical block. For example, in a high-temperature or low-temperature environment, the physical properties of the storage medium will change, accelerating the aging of the physical block, and even if the number of read and write times does not change, the actual degree of wear will also increase significantly. However, the traditional technology fails to take these key factors into account, resulting in unreasonable allocation of storage resources, with some physical blocks prematurely failing due to overuse, while other physical blocks are in a low-load idle state. In addition, this single-dimensional judgment mode also fails to meet the differentiated needs of different security level data storage for reliability.
[0004] Therefore, how to combine multiple dimensions of data to judge the wear of the storage medium and improve the security of the storage system has become a problem that needs to be solved today. SUMMARY
[0005] The present application provides a lightweight embedded secure file system that can combine multiple dimensions of data to judge the wear of the storage medium and improve the security of the storage system.
[0006] In a first aspect, the present application provides a lightweight embedded secure file system, comprising: a partition management module for dividing storage areas according to encryption levels to obtain a plurality of encryption level areas, and determining the storage unit proportion of each encryption level area according to user configuration information; a parameter acquisition module for acquiring real-time multi-dimensional operating parameters of the storage unit; a wear calculation module for calculating the real-time wear of the storage unit according to the wear coefficient corresponding to the multi-dimensional operating parameters; a dynamic regulation module for obtaining the usage rate of the encryption level area in real time, and dynamically adjusting the storage unit proportion of each encryption level area and performing visual early warning when the storage fullness threshold is triggered.
[0007] Optionally, in a possible implementation manner of the first aspect, the wear calculation module is configured to calculate the real-time wear amount of the storage unit according to wear coefficients corresponding to the multi-dimensional operation parameters. obtaining write data, and matching a storage unit corresponding to the write data, the storage unit including cold storage units and hot storage units; determining wear coefficients corresponding to multi-dimensional operation parameters of the write data, the multi-dimensional operation parameters including a current read-write frequency, a current environment parameter, and a current encryption level, and obtaining the real-time wear amount of the storage unit according to products of the wear coefficients.
[0008] Optionally, in a possible implementation manner of the first aspect, the obtaining of the write data and the matching of the storage unit corresponding to the write data, the storage unit including cold storage units and hot storage units, includes: selecting an encryption level area corresponding to an encryption level of the write data, and traversing a plurality of storage units in the encryption level area; determining a storage unit without stored data as a cold storage unit, and determining a storage unit with stored data as a hot storage unit; preferentially matching the cold storage unit for the write data, and matching a hot storage unit with the lowest real-time wear amount if there is no cold storage unit.
[0009] Optionally, in a possible implementation manner of the first aspect, the determining of the wear coefficients corresponding to the multi-dimensional operation parameters of the write data, the multi-dimensional operation parameters including the current read-write frequency, the current environment parameter, and the current encryption level, and the obtaining of the real-time wear amount of the storage unit according to products of the wear coefficients, includes: obtaining a frequency difference value of the current read-write frequency and a reference read-write frequency, determining a first wear coefficient corresponding to the frequency difference value, the reference read-write frequency being configured with a plurality of frequency difference value intervals, and each of the difference value intervals being configured with a corresponding wear coefficient; determining a preset wear coefficient corresponding to the current encryption level as a second wear coefficient; obtaining a parameter difference value of the current environment parameter and a reference environment parameter, and determining a wear coefficient corresponding to an environment gradient interval in which the parameter difference value is located as a third wear coefficient; obtaining the real-time wear amount of the storage unit according to a product of the first wear coefficient, the second wear coefficient, and the third wear coefficient.
[0010] Optionally, in a possible implementation manner of the first aspect, the method further includes: when the storage unit is a hot storage unit, obtaining a historical wear amount of the hot storage unit, and obtaining a cumulative wear amount according to a sum of the historical wear amount and the real-time wear amount; If the cumulative wear-out amount exceeds the read-write upper limit of the hot storage unit, the storage unit corresponding to the write data is re-matched, and if not, the historical wear-out amount of the hot storage unit is updated based on the cumulative wear-out amount; When the storage unit is a cold storage unit, the real-time wear-out amount is recorded as the initial wear-out amount of the cold storage unit.
[0011] Optionally, in a possible implementation manner of the first aspect, the dynamic regulation module is configured to acquire the usage rate of the encryption level region in real time, dynamically adjust the storage unit proportion of each encryption level region when the storage-full threshold is triggered, and perform visual early warning, including: The trigger is performed when the usage rate of the encryption level region is greater than or equal to the storage-full threshold, and the encryption level region is determined as an adjustment region; An encryption level region with the smallest encryption level is acquired as a target level region; A storage unit in the target level region that meets a migration condition is selected as a target unit, storage data in the target unit is migrated to the remaining storage units in the target level region, the target unit is divided to the adjustment region, and the storage unit proportion of each encryption level region is re-adjusted; A proportion change image corresponding to the storage unit proportion of each encryption level region is generated, and early warning information is generated according to the proportion change image.
[0012] Optionally, in a possible implementation manner of the first aspect, the target unit is selected from the storage units in the target level region that meet the migration condition, and the storage data of the target unit is migrated to the remaining storage units in the target level region, including: It is determined that the storage unit with the smallest real-time wear-out amount in the target level region meets the migration condition; The cold storage unit in the target level region is preferentially selected to migrate the storage data of the target unit, and when there is no cold storage unit, the hot storage unit with the lowest real-time wear-out amount in the target level region is selected to migrate the storage data of the target unit.
[0013] Optionally, in a possible implementation manner of the first aspect, the proportion change image corresponding to the storage unit proportion of each encryption level region is generated, including: A progress bar corresponding to each encryption level region is generated according to the usage rate of each encryption level region; When the storage-full threshold is triggered, an alarm progress bar is obtained by updating the progress bar according to an alarm pixel value, and an adjustment progress bar of the encryption level region is re-generated according to the updated storage unit proportion; The proportion change image corresponding to each encryption level region is obtained according to the alarm progress bar and the adjustment progress bar.
[0014] Optionally, in a possible implementation manner of the first aspect, the method further includes: acquiring a read-write error number of each of the storage units in real time; when the read-write error number is greater than or equal to an error number threshold, constructing a redundant copy corresponding to the storage unit according to a quantity of backups corresponding to the encryption level and the access frequency of the storage unit.
[0015] Optionally, in a possible implementation manner of the first aspect, when the read-write error number is greater than or equal to the error number threshold, constructing the redundant copy corresponding to the storage unit according to the quantity of backups corresponding to the encryption level and the access frequency of the storage unit includes: determining a storage unit with the read-write error number greater than or equal to the error number threshold as a first storage unit, and determining a remaining storage unit with the same encryption level as the first storage unit as a second storage unit; arranging the second storage units in a sequence according to the real-time wear amount from small to large, and sequentially selecting corresponding second storage units in the sequence based on the quantity of backups, and copying storage data of the first storage unit to the selected second storage units.
[0016] The present application has many significant beneficial effects: 1. In the aspect of wear management, the present application breaks through the limitation of traditional single dimension, and fuses multi-dimensional parameters such as encryption level, temperature, read-write number, etc., so as to realize multi-dimensional calculation and dynamic management of storage unit wear, improve wear prediction accuracy, and provide accurate basis for storage resource scheduling.
[0017] 2. In the aspect of data reliability, the present application implements differentiated redundancy strategy according to the importance of data, so as to reduce the risk of data loss and ensure stable and reliable data storage and reading.
[0018] 3. In the aspect of storage medium life optimization, the present application can flexibly allocate tasks according to the actual wear state of the storage unit, avoid overuse of high-wear units, balance overall wear, and prolong the service life of physical blocks and storage media. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application; Figure 2 is a structural schematic diagram of a lightweight embedded secure file system provided by an embodiment of the present application; Figure 3 is a schematic diagram of adjusting a target unit provided by an embodiment of the present application. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] See Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of the present invention. The present invention provides a lightweight embedded secure file system for storage media. This system improves storage reliability and efficiency, space utilization, data security, and the lifespan of the storage media through multi-dimensional wear and tear calculation, dynamic partitioning to adjust physical block ownership, and hierarchical redundancy to enhance data reliability. Specifically, the partitioning management module divides storage areas according to encryption levels, the parameter acquisition module acquires multi-dimensional parameters such as read / write counts and temperature in real time, the wear and tear calculation module calculates real-time wear and tear based on parameter coefficients, and the dynamic control module migrates physical blocks for expansion and provides visual warnings when the area utilization exceeds a threshold.
[0022] The executing entity of this application may include, but is not limited to, at least one of the following: user equipment, network equipment, etc. User equipment may include, but is not limited to, computers, smartphones, personal digital assistants (PDAs), and the aforementioned electronic devices. Network equipment may include, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers. Cloud computing is a type of distributed computing, consisting of a super virtual computer composed of a group of loosely coupled computers. This embodiment does not impose any limitations on this. See also Figure 2 This is a schematic diagram of a lightweight embedded secure file system provided in an embodiment of the present invention. The lightweight embedded secure file system includes: The partition management module is used to divide storage areas according to encryption level, resulting in multiple encryption level areas, and to determine the proportion of storage units in each encryption level area based on user configuration information.
[0023] Understandably, dividing storage areas by encryption level can isolate highly sensitive data from ordinary data, ensuring that data meets security requirements during storage. This also avoids situations where high-security data uses low-reliability storage resources, or ordinary data consumes high-cost storage resources. Determining the proportion of storage units in each area based on user configuration allows for flexible adaptation to dynamic changes in data volume under different business scenarios.
[0024] Encryption level zones refer to the logically defined storage areas, which can be divided based on the strength of data encryption algorithms (such as SM1-SM5). Different zones correspond to different security protection levels and access permissions. For example, high-encryption level zones use high-strength encryption algorithms and are suitable for storing sensitive data. Storage unit ratio refers to the proportion of physical blocks allocated to each encryption zone in the storage medium. Users can flexibly configure this according to their actual needs to achieve dynamic allocation of storage resources. User configuration data refers to the user-defined proportion of physical blocks allocated to each encryption zone in the storage medium.
[0025] For example, suppose a user sets three encryption level zones in the system configuration interface, with the high encryption zone (SM5) accounting for 20%, the medium encryption zone (SM3) accounting for 30%, and the low encryption zone (SM1) accounting for 50%. The system divides the physical blocks of the storage medium according to this ratio. When writing data, it automatically stores the data in the corresponding zone according to the encryption level. For example, highly sensitive data is stored in the high encryption zone, and ordinary log data is stored in the low encryption zone.
[0026] By following the steps above, secure tiered storage of data can be achieved, reducing the risk of data leakage and attacks; and by flexibly adjusting the partition ratio, the utilization rate of storage resources can be significantly improved.
[0027] The parameter acquisition module is used to acquire multi-dimensional operating parameters of the storage unit in real time.
[0028] In practical applications, the wear and performance degradation of storage media are affected by a variety of factors. Traditional methods that rely solely on read / write cycles to assess the condition of storage media have limitations and cannot accurately reflect the health status of storage media under complex environments. Temperature variations, data encryption processing loads, and differences in read / write patterns all significantly impact the lifespan and performance of storage media. Real-time acquisition of multi-dimensional operating parameters of storage units can comprehensively monitor the working status of storage media, providing a data foundation for accurately assessing its wear level and predicting its remaining lifespan.
[0029] Multidimensional operating parameters refer to multiple indicators reflecting the working status of a storage unit, including but not limited to temperature, encryption level, and read / write cycles. These parameters together constitute a complete description of the storage unit's operating status. A storage unit refers to a physical block.
[0030] The system can collect parameters from the storage unit at a fixed frequency (e.g., once per second) to obtain information such as the current temperature, the encryption level of the data being processed, and the number of read / write operations completed. These parameters are then transmitted in real time to the subsequent processing modules for further analysis and calculation.
[0031] By comprehensively collecting multi-dimensional operating parameters, the system can more accurately assess the health status of storage media, significantly improve the reliability and stability of the storage system, and reduce the risk of data loss due to storage failures.
[0032] The wear calculation module is used to calculate the real-time wear of the storage unit based on the wear coefficient corresponding to the multi-dimensional operating parameters.
[0033] Understandably, traditional wear calculation methods based on a single read / write cycle cannot accurately reflect the wear and tear of storage media under real-world, complex operating environments. This can easily lead to uneven wear, with some storage cells failing prematurely while others remain underutilized. Introducing wear coefficients corresponding to multi-dimensional operating parameters, and comprehensively considering the impact of factors such as temperature, encryption level, and read / write patterns on wear, allows for a more realistic calculation of the real-time wear of storage cells.
[0034] Wear coefficients are coefficients set according to the degree of influence of different operating parameters on the wear of storage units. For example, the temperature coefficient reflects the effect of temperature changes on accelerating or slowing down wear, and the encryption coefficient reflects the additional wear of storage units caused by different encryption levels. Real-time wear refers to the equivalent wear degree of the storage unit in a single read / write operation, calculated by combining the wear coefficients corresponding to the current operating parameters. It is used to quantitatively evaluate the real-time wear of the storage unit.
[0035] The wear calculation module enables accurate calculation and dynamic evaluation of storage cell wear.
[0036] In some embodiments, the real-time wear of the storage unit is calculated based on the wear coefficient corresponding to the multi-dimensional operating parameters, including steps S101 to S102, as follows: S101, Obtain the written data and match the storage unit corresponding to the written data. The storage unit includes a cold storage unit and a hot storage unit.
[0037] Physical blocks in storage media experience varying degrees of wear and tear with use. If write tasks are allocated uniformly without considering their health status, some low-wear blocks will be overused and fail prematurely, while high-wear blocks will remain underutilized, resulting in a shortened overall storage lifespan. By differentiating between cold and hot storage units and intelligently matching them based on the characteristics of the written data, storage resources can be optimally allocated, balancing physical block wear levels, extending the overall lifespan of the storage media, improving the reliability of highly sensitive data storage, and preventing the loss of critical data due to physical block failure.
[0038] A cold storage unit refers to a physical block in a storage medium that has not yet stored any data; a hot storage unit is a physical block that has already stored data.
[0039] In some embodiments, step S101 can be implemented by the following steps: Select the encryption level region corresponding to the encryption level of the data to be written, and traverse multiple storage units in the encryption level region; determine that the storage unit without stored data is a cold storage unit, and determine that the storage unit with stored data is a hot storage unit; prioritize matching the cold storage unit for the data to be written, and if there is no cold storage unit, match the hot storage unit with the lowest real-time wear.
[0040] By selecting regions based on encryption levels and prioritizing cold storage units, tiered secure data storage can be achieved, meeting the protection requirements of data with varying levels of sensitivity. Simultaneously, the high performance and low wear characteristics of cold storage units ensure the stability of reading and writing high-frequency, critical data. When cold storage units are insufficient, selecting hot storage units with the lowest real-time wear further balances the overall wear of the storage media, preventing excessive wear on localized storage units, thereby extending the lifespan of the storage media and improving the reliability of the storage system.
[0041] For example, suppose user-generated data (encryption level SM5) needs to be written to the storage medium. The system first selects the area corresponding to the SM5 encryption level, traverses the storage units within this area, finds a cold storage unit that does not store data, and writes the data there, ensuring that sensitive transaction information is stored in a secure and high-performance unit. When the data volume surges and the cold storage units in the SM5 area are exhausted, the system then selects the unit with the lowest real-time wear from the hot storage units and continues the data writing operation, ensuring data storage continuity while minimizing wear on the storage medium.
[0042] The above methods can improve data storage security and storage media utilization efficiency. Regarding data, the security of sensitive data is strengthened through encryption level zone division. At the storage media level, the strategy of prioritizing cold storage units and selecting hot storage units based on wear levels ensures more even overall wear of the storage media.
[0043] S102, determine the wear coefficient corresponding to the multi-dimensional operating parameters of the written data. The multi-dimensional operating parameters include the current number of read / write operations, the current environmental parameters, and the current encryption level. The real-time wear of the storage unit is obtained by multiplying the wear coefficients.
[0044] Storage media wear is influenced by a variety of factors, including the number of read / write operations, environmental parameters (such as temperature and humidity), and encryption levels. These factors all affect the degree of wear on storage units. For example, high temperatures accelerate physical block aging, and writing high-encryption-level data increases the workload of the storage unit. By determining the wear coefficients corresponding to multi-dimensional operating parameters and comprehensively calculating real-time wear, we can more accurately assess the health status of storage units. This provides a scientific basis for storage resource scheduling and fault warning, thereby optimizing storage strategies and preventing premature failure or resource waste caused by inaccurate wear assessments.
[0045] In some embodiments, step S102 can be implemented by the following steps: The following steps are performed: First, obtain the difference between the current read / write count and the baseline read / write count; determine the first wear coefficient corresponding to the difference; the baseline read / write count is configured with multiple difference intervals, each interval having a corresponding wear coefficient; determine the preset wear coefficient corresponding to the current encryption level as the second wear coefficient; second, obtain the parameter difference between the current environmental parameters and the baseline environmental parameters; determine the wear coefficient corresponding to the environmental gradient interval where the parameter difference lies as the third wear coefficient; and finally, obtain the real-time wear amount of the storage unit based on the product of the first, second, and third wear coefficients.
[0046] By obtaining the difference between the current read / write count and the baseline value, the corresponding coefficient of the encryption level, and the difference between the environmental parameters and the baseline value, the corresponding wear coefficients are determined and multiplied to calculate the real-time wear amount. This allows for a comprehensive and accurate quantification of the wear level of storage units, providing an accurate basis for storage resource scheduling, lifespan prediction, and fault warning. It enables refined management of storage media, extends the overall lifespan, and improves data storage reliability.
[0047] The current read / write count is the cumulative number of read / write operations completed by the storage unit. The baseline read / write count serves as a reference standard to divide the count difference range. The difference between the two counts determines the first wear coefficient, which reflects the degree of influence of the read / write count on wear. The current encryption level corresponds to a preset second wear coefficient, reflecting the additional wear differences caused by different encryption algorithms on the storage unit. The parameter difference between the current environmental parameters and the baseline environmental parameters is used to determine the environmental gradient range in which it is located, and then to derive the third wear coefficient to measure the impact of environmental factors on wear. Multiplying the first wear coefficient, the second wear coefficient, and the third wear coefficient yields the real-time wear amount used to monitor the wear of the storage unit in real time, which can intuitively quantify the equivalent wear degree of a single read / write operation in the current state.
[0048] For example, assuming the current storage unit has 8000 read / write cycles, and the baseline read / write cycle is set to 5000, the difference of 3000 cycles falls within the pre-set range of 2000-4000 cycles, corresponding to a first wear factor of 1.5. The video data uses SM3 encryption, with a preset second wear factor of 1.3. The current ambient temperature is 45℃, and the baseline ambient temperature is 25℃, a temperature difference of 20℃ falling within the 15-25℃ environmental gradient range, corresponding to a third wear factor of 1.4. By multiplying these three factors, the system calculates the real-time wear amount of this write operation on the storage unit as 2.73, meaning that this write operation is equivalent to 2.73 wear cycles under baseline conditions.
[0049] The wear and tear calculations described above provide a more reliable guarantee for data storage, reduce the risk of data loss due to unexpected failure of storage units, and improve the stability and reliability of the storage system.
[0050] In addition to the above embodiments, this solution also includes the following embodiments: When the storage unit is a hot storage unit, the historical wear amount of the hot storage unit is obtained, and the cumulative wear amount is obtained by summing the historical wear amount and the real-time wear amount. If the cumulative wear amount exceeds the read / write limit of the hot storage unit, the storage unit corresponding to the written data is re-matched. If it does not exceed the limit, the historical wear amount of the hot storage unit is updated based on the cumulative wear amount. When the storage unit is a cold storage unit, the real-time wear amount is recorded as the initial wear amount of the cold storage unit.
[0051] During continuous use, storage units experience accumulated wear and tear. Without monitoring and management, this can lead to premature failure, data loss, or system malfunctions. For hot storage units, calculating cumulative wear by acquiring historical and real-time wear data allows for precise tracking of their wear status. When the cumulative wear exceeds the read / write limit, the storage unit is promptly re-matched, preventing data from being written to a failing unit and ensuring data storage security. If the limit is not exceeded, the historical wear data is updated, enabling dynamic recording of their wear status. For cold storage units, real-time wear data is recorded as the initial wear level, laying the foundation for continuous monitoring. This differentiated management approach helps optimize storage resource allocation, extends the overall lifespan of storage media, and improves the reliability and stability of data storage.
[0052] Historical wear records the cumulative wear during past use. Adding it to the real-time wear gives the cumulative wear, which can intuitively reflect the current total wear level of the unit. The read / write limit is a pre-set maximum wear threshold that the storage unit can withstand. When the cumulative wear exceeds this value, the storage unit needs to be rematched to ensure data security.
[0053] For example, suppose in a cloud storage system, a hot storage unit already contains some file data, and its historical wear level is 8000 units. When new data is written, the system calculates the real-time wear level for this operation as 300 units, and the cumulative wear level as 8300 units. If the read / write limit for this hot storage unit is set to 8500 units, the cumulative wear level does not exceed the limit, and the system updates the historical wear level of the hot storage unit based on the cumulative wear level of 8300 units. Subsequent data writes continue to be calculated and updated in this way. If the cumulative wear level reaches 8600 units after a certain calculation, exceeding the read / write limit, the system will stop writing data to this hot storage unit and re-match other suitable storage units for this data write. For cold storage units, such as a newly allocated physical block, the real-time wear level when data is first written is 50 units. This 50 units is recorded as the initial wear level of the cold storage unit, providing a basis for subsequent monitoring of its wear changes.
[0054] By accurately calculating and dynamically managing the wear and tear of cold and hot storage units, the reliability and stability of the storage system are improved.
[0055] The dynamic control module is used to obtain the usage rate of the encryption level area in real time, and dynamically adjust the storage unit ratio of each encryption level area and provide a visual warning when the storage threshold is triggered.
[0056] In practical applications, static partitioning for storage management struggles to adapt to dynamic changes in data volume, often resulting in insufficient storage space in some areas while other areas remain largely idle, leading to low storage resource utilization. Furthermore, the lack of a visual early warning mechanism prevents administrators from promptly monitoring storage status and taking timely action. The dynamic adjustment module monitors the usage rate of encrypted zones in real time and automatically triggers dynamic adjustments when a full threshold is reached. This allows storage resources to be migrated from low-utilization areas to high-demand areas, achieving dynamic optimization of storage resource allocation. The visual early warning function intuitively displays changes in storage status, enabling administrators to quickly understand the system situation and make informed decisions, thus improving storage management efficiency and system stability.
[0057] The storage full threshold is a user-preset critical value for the usage rate of the encryption level area. When the area usage rate reaches or exceeds this threshold, a dynamic adjustment mechanism is triggered. Visual alerts use charts, progress bars, color indicators, and other intuitive methods to display the storage usage status, partition adjustment process, and results of each encryption level area, which can help users quickly grasp changes in storage status.
[0058] For example, assuming the user sets the storage full threshold for the high-encryption zone (SM5) to 85%, when the system detects that the utilization rate of this zone reaches 88%, it automatically migrates some physical blocks from the low-encryption zone (SM1) with low utilization to the high-encryption zone. At the same time, the system generates a visual interface to dynamically display the change process of the storage unit ratio of each zone, and highlights the high-encryption zone in red to indicate that it has reached the storage full threshold.
[0059] The dynamic control module can effectively solve the problem of uneven distribution of storage resources and significantly improve the overall utilization of storage media; automated dynamic adjustment can reduce manual intervention and improve management efficiency; the visual early warning function can enhance the observability of the system, help administrators to discover and deal with storage resource shortages in a timely manner, and ensure the stable operation of the system.
[0060] In some embodiments, the usage rate of the encryption level region is obtained in real time, and the storage unit ratio of each encryption level region is dynamically adjusted and a visual warning is issued when the storage threshold is triggered. This includes steps S201 to S204, as follows: S201, when the usage rate of the encryption level area is greater than or equal to the full storage threshold, a trigger is made, and the encryption level area is determined to be an adjustment area.
[0061] To prevent data from being unable to be written due to the exhaustion of storage space in a certain encryption level area, the utilization rate of each area is monitored in real time. When the preset full threshold is reached, the adjustment mechanism is triggered in time to mark the area as an adjustment area, which can ensure the availability of the storage system and the continuity of data writing.
[0062] Among them, the adjustment area refers to the encrypted area whose usage rate has reached or exceeded the full storage threshold and requires space adjustment.
[0063] For example, assuming the high encryption level area (SM5) is filled to 80%, when the number of used storage units in this area reaches 82% of the total number, the system triggers the adjustment process and identifies it as the adjustment area.
[0064] S202, obtain the encryption level region with the lowest encryption level as the target level region.
[0065] When adjusting storage area space, prioritize acquiring free storage units from areas with the lowest encryption level. This minimizes the impact on the security of highly sensitive data storage and makes efficient use of resources. Areas with low encryption levels have lower data security requirements, and adjustments have less impact on them.
[0066] The target level area is the encryption level area selected to provide free storage units and make space adjustments.
[0067] S203, select the storage unit that meets the migration conditions in the target level area as the target unit, migrate the storage data in the target unit to the remaining storage units in the target level area, divide the target unit to the adjustment area, and readjust the storage unit ratio of each encryption level area.
[0068] See Figure 3 This diagram illustrates a method for allocating and adjusting target units according to an embodiment of the present invention. By selecting storage units that meet specific conditions from the target level region as target units, migrating their data to other storage units, freeing up space, and then allocating them to the adjustment region, and finally reallocating the proportion of storage units in each encryption level region, dynamic balancing of storage resources can be achieved to adapt to changes in data storage needs in different regions.
[0069] Meeting migration conditions means that the storage unit meets the preset migration criteria, such as data mobility and wear and tear within the allowable range; the target unit is the storage unit selected from the target level area to provide free space; readjusting the storage unit ratio of each encryption level area means updating the proportion of storage units in the entire storage medium for each encryption level area based on the adjusted storage unit allocation.
[0070] The above methods can achieve flexible allocation of storage resources, improve the utilization rate of storage media, make the allocation of storage space in each encryption level area more in line with actual needs, and ensure the efficient operation of the storage system.
[0071] Based on the above embodiments, the specific implementation of step S203, "selecting a storage unit that meets the migration conditions in the target level region as the target unit, and migrating the storage data in the target unit to the remaining storage units in the target level region," can be as follows: The storage unit with the lowest real-time wear in the target grade region is determined to meet the migration conditions; cold storage units in the target grade region are preferentially selected to migrate the stored data of the target unit; when there is no cold storage unit, hot storage unit with the lowest real-time wear in the target grade region is selected to migrate the stored data of the target unit.
[0072] When migrating and adjusting storage units, to ensure data storage reliability and the lifespan of the storage media, priority should be given to selecting storage units with better performance. Determining the storage unit with the lowest real-time wear to meet the migration conditions ensures that the migrated data is stored in a unit with lower wear and higher stability. Prioritizing the use of cold storage units for data migration is crucial because they offer the best performance, further ensuring data security and read / write performance. When cold storage units are insufficient, selecting hot storage units with the lowest real-time wear minimizes additional wear on the storage media while ensuring data storage security. This optimizes storage resource allocation, balances overall wear on the storage media, extends its lifespan, and reduces the risk of data loss due to storage unit failure.
[0073] In a storage system, when the high encryption level area (SM5) lacks sufficient storage space, the low encryption level area (SM1) is designated as the target area. Within SM1, the system selects the three storage cells with the lowest real-time wear and tear, deeming them suitable for migration. If a cold storage cell exists within SM1, the system prioritizes migrating data from the target cell to the cold storage cell. If no cold storage cell exists in SM1, the system selects the hot storage cell with the lowest real-time wear and tear for data migration. For example, a hot storage cell may have a low read / write frequency, a suitable ambient temperature, and handle low-encryption level data, resulting in the lowest calculated real-time wear and tear among all hot storage cells; in this case, the system selects that cell to receive the migrated data.
[0074] S204, generate a percentage change image corresponding to the percentage of storage units in each of the encryption level regions, and generate early warning information based on the percentage change image.
[0075] By visualizing the percentage changes, operations and maintenance personnel can quickly and intuitively understand the adjustments and trends in the storage unit proportions of each encryption level area. Based on this, early warning information can be generated to promptly remind relevant personnel to pay attention to the usage and adjustment status of storage resources, so that measures can be taken to ensure the stable operation of the storage system.
[0076] The percentage change image is a visual graph that shows the changes in the storage unit percentage of each encryption level area before and after adjustment in the form of charts, etc.; the warning information is a prompt message generated based on the potential problems reflected by the percentage change image (such as excessive changes in the percentage of a certain area, or the fact that the storage unit percentage is still close to the full threshold after adjustment), which is used to remind operation and maintenance personnel.
[0077] The above methods can improve the visibility of storage system management and operational efficiency, help operations and maintenance personnel keep abreast of storage resource dynamics, identify and address potential risks in advance, and enhance the reliability and stability of the storage system.
[0078] Based on the above embodiments, step S204 can be implemented in the following ways: A progress bar corresponding to each encryption level region is generated based on the usage rate of each encryption level region; when the full storage threshold is triggered, the progress bar is updated based on the warning pixel value to obtain a warning progress bar, and an adjustment progress bar for each encryption level region is regenerated based on the updated storage unit ratio; a ratio change image corresponding to each encryption level region is obtained based on the warning progress bar and the adjustment progress bar.
[0079] Visualization tools can be used to reflect the real-time usage status and adjustment process of storage areas, improving operational efficiency and system observability. Generating progress bars corresponding to encryption level areas visually displays the storage space occupancy of each area, facilitating quick identification of areas with limited space. When a storage full threshold is triggered, the progress bar is updated to an alert progress bar via warning pixel values, immediately drawing the attention of operations personnel and enabling timely responses to storage pressure. An adjustment progress bar is generated based on the adjusted storage unit percentage, and combined with the warning progress bar to create a percentage change image, dynamically presenting the redistribution process and results of storage resources. This helps operations personnel evaluate the adjustment effects and ensures the storage system is always operating at a reasonable level.
[0080] Progress bars are tools that visually represent the usage rate of encrypted areas, using changes in fill length or color to indicate space occupancy. Warning pixel values are visual parameters used to highlight storage pressure, such as changing the progress bar color or making it flash. Warning progress bars are progress bars updated with warning pixel values after the storage threshold is triggered, emphasizing the urgent state of insufficient space. Adjustment progress bars are progress bars regenerated based on the adjustment results of storage unit proportions, reflecting the adjusted space allocation.
[0081] Suppose a cloud storage platform has three regions: SM1 (low encryption), SM3 (medium encryption), and SM5 (high encryption), with a storage capacity threshold set at 80%. Initially, the SM5 region reaches 82% utilization, triggering the threshold. The system updates the progress bar for the SM5 region from green to a flashing red warning progress bar, and simultaneously selects the SM1 region as the target region for storage unit migration. After the adjustment, the storage unit percentage of the SM5 region increases from 20% to 25%, and its utilization rate decreases to 75%. The percentage of the SM1 region decreases from 60% to 55%. The system generates adjustment progress bars for SM5 and SM1 (displaying the new percentages in blue and green respectively), and generates a graph showing the percentage changes by comparing the bars, clearly illustrating the spatial adjustment range of the two regions.
[0082] The above steps, through the visualization of progress bars, warning progress bars, adjustment progress bars, and percentage change images, enable real-time early warning of storage area usage status and dynamic monitoring of the adjustment process, assisting maintenance personnel in making quick decisions.
[0083] In addition to the above embodiments, this solution also includes the following embodiments: The number of read / write errors for each storage unit is obtained in real time. When the number of read / write errors is greater than or equal to the error count threshold, a redundant copy of the storage unit is constructed based on the number of backups corresponding to the encryption level and access frequency of the storage unit.
[0084] Storage units may experience errors due to physical wear and tear, environmental interference, and other factors during frequent read and write operations. If not handled promptly, these errors can lead to data loss or system failure. Real-time monitoring of the read / write error count for each storage unit allows for dynamic monitoring of its health. When the error count exceeds a threshold, it indicates a high risk of storage unit failure. Redundant replicas are constructed by determining the number of backups based on encryption level and access frequency, providing differentiated protection for data of varying importance: data with high encryption levels and high access frequency requires more backups due to higher security and availability requirements; conversely, fewer backups are needed for less important data. This mechanism ensures the security of critical data while avoiding excessive backups that waste storage resources, thus improving the reliability and resource utilization efficiency of the storage system.
[0085] The number of read / write errors is the cumulative number of errors that occur in data read / write operations within a storage unit, used to measure the health status of the storage unit. The error count threshold is a pre-set critical value; when the number of read / write errors reaches or exceeds this value, it indicates that the storage unit has a high risk of failure. Access frequency represents the number of operations performed on the data in the storage unit per unit of time, reflecting the frequency of data use. The number of backups is the number of redundant copies determined based on the encryption level and access frequency of the data in the storage unit. Redundant copies are additional data copies identical to the original data content, used to restore data in the event of a failure of the original storage unit, ensuring data integrity and normal system operation.
[0086] For example, if a storage unit accumulates a pre-set error count threshold (e.g., 50 times) during continuous read / write operations, the system immediately initiates a redundant copy creation process. Assuming the data stored in this storage unit has a medium encryption level and a high access frequency, according to a pre-configured policy, data with a medium encryption level and high access frequency requires the creation of three redundant copies. The system then replicates the data from this storage unit in other healthy storage units, generating three redundant copies that are completely identical to the original data, thereby reducing the risk of data loss due to storage unit failure.
[0087] The steps described above can improve the data reliability of the storage system.
[0088] In some embodiments, the step "when the number of read / write errors is greater than or equal to the error count threshold, construct a redundant copy of the storage unit according to the number of backups corresponding to the encryption level and access frequency of the storage unit" includes: The storage unit with the number of read / write errors greater than or equal to the error threshold is identified as the first storage unit, and the remaining storage units with the same encryption level as the first storage unit are identified as the second storage units. The second storage units are arranged in ascending order of real-time wear to obtain a unit sequence. Based on the number of backups, the corresponding second storage units are selected sequentially from the unit sequence, and the stored data of the first storage unit is copied to the selected second storage unit.
[0089] By identifying the first storage unit (the unit where read / write errors exceed the threshold) and the second storage unit (other units with the same encryption level), it is ensured that data backups are performed within storage areas of the same security level, avoiding security risks caused by cross-level backups. The second storage units are sorted and selected based on real-time wear levels, prioritizing units with low wear and high performance as backup targets. This ensures the reliability of backup data storage, balances overall wear on the storage media, extends the lifespan of the storage system, and reduces the risk of premature failure of other storage units due to backup operations.
[0090] The first storage unit is the storage unit whose read / write error count reaches or exceeds the error count threshold and is judged as high-risk, requiring priority data backup. The second storage unit refers to the remaining storage units with the same encryption level as the first storage unit, serving as candidate areas for data backup. The unit sequence is an ordered list formed by sorting the second storage units in ascending order of real-time wear, facilitating the selection of reliable backup targets.
[0091] Suppose the system detects that a certain storage unit (the first storage unit) has experienced 60 read / write errors (the threshold is 50). It then locks all other storage units with the same encryption level as the first unit as the second storage units. The real-time wear level of each second storage unit is calculated; for example, unit A has a wear level of 0.3, unit B has 0.5, and unit C has 0.2. These units are then arranged in ascending order of wear level as C, A, B, forming a unit sequence. If the strategy requires creating two redundant copies of the first storage unit, the first two units in the sequence (C and A) are selected sequentially, and the data from the first storage unit is copied to units C and A, completing the backup operation.
[0092] The above steps, by prioritizing backups using low-wear units, can avoid storing data on high-risk targets and effectively extend its lifespan.
[0093] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lightweight embedded secure file system, characterized in that, include: The partition management module is used to divide the storage area according to the encryption level, resulting in multiple encryption level areas, and to determine the proportion of storage units in each encryption level area according to the user configuration information. The parameter acquisition module is used to acquire multi-dimensional operating parameters of the storage unit in real time; The wear calculation module is used to calculate the real-time wear of the storage unit based on the wear coefficient corresponding to the multi-dimensional operating parameters. The dynamic control module is used to obtain the usage rate of the encryption level area in real time, and dynamically adjust the storage unit ratio of each encryption level area and provide a visual warning when the storage threshold is triggered.
2. The system according to claim 1, characterized in that, The wear calculation module is used to calculate the real-time wear of the storage unit based on the wear coefficients corresponding to the multi-dimensional operating parameters, including: Acquire the written data and match the storage unit corresponding to the written data. The storage unit includes a cold storage unit and a hot storage unit. The wear coefficients corresponding to the multidimensional operating parameters of the written data are determined. The multidimensional operating parameters include the current number of read / write operations, the current environmental parameters, and the current encryption level. The real-time wear of the storage unit is obtained by multiplying the wear coefficients of each of the parameters.
3. The system according to claim 2, characterized in that, Retrieve the written data, match the storage unit corresponding to the written data, the storage unit includes a cold storage unit and a hot storage unit, including: Select the encryption level region corresponding to the encryption level of the written data, and traverse multiple storage units in the encryption level region; The storage unit that does not store data is identified as a cold storage unit, and the storage unit that stores data is identified as a hot storage unit. The data to be written is preferentially matched to the cold storage unit. If there is no cold storage unit, the data is matched to the hot storage unit with the lowest real-time wear.
4. The system according to claim 2, characterized in that, The wear coefficients corresponding to the multidimensional operating parameters of the written data are determined. These multidimensional operating parameters include the current number of read / write operations, current environmental parameters, and current encryption level. The real-time wear of the storage unit is obtained by multiplying the wear coefficients, including: The difference between the current read / write count and the baseline read / write count is obtained, and the first wear coefficient corresponding to the difference is determined. The baseline read / write count is configured with multiple difference intervals, and each difference interval is configured with a corresponding wear coefficient. The preset wear coefficient corresponding to the current encryption level is determined to be the second wear coefficient; Obtain the parameter difference between the current environmental parameters and the reference environmental parameters, and determine the wear coefficient corresponding to the environmental gradient interval where the parameter difference is located as the third wear coefficient; The real-time wear of the storage unit is obtained by multiplying the first wear coefficient, the second wear coefficient, and the third wear coefficient.
5. The system according to claim 2, characterized in that, Also includes: When the storage unit is a hot storage unit, the historical wear amount of the hot storage unit is obtained, and the cumulative wear amount is obtained based on the sum of the historical wear amount and the real-time wear amount; If the cumulative wear exceeds the read / write limit of the hot storage unit, the storage unit corresponding to the written data is re-matched; if it does not exceed the limit, the historical wear of the hot storage unit is updated based on the cumulative wear. When the storage unit is a cold storage unit, the recorded real-time wear amount is the initial wear amount of the cold storage unit.
6. The system according to claim 1, characterized in that, The dynamic control module is used to obtain the usage rate of the encryption level areas in real time, dynamically adjust the storage unit ratio of each encryption level area and provide a visual warning when the storage threshold is triggered, including: The process is triggered when the usage rate of the encryption level area is greater than or equal to the full storage threshold, and the encryption level area is determined to be an adjustment area. The target encryption level region is the region with the lowest encryption level. Select the storage unit that meets the migration conditions in the target level region as the target unit, migrate the storage data in the target unit to the remaining storage units in the target level region, divide the target unit into the adjustment region, and readjust the storage unit ratio of each encryption level region; Generate a percentage change image corresponding to the storage unit percentage of each encryption level region, and generate early warning information based on the percentage change image.
7. The system according to claim 6, characterized in that, Selecting a storage unit in the target level region that meets the migration conditions as the target unit, and migrating the stored data in the target unit to the remaining storage units in the target level region, includes: The storage cell with the lowest real-time wear in the target grade region is determined to meet the migration conditions. Prioritize selecting cold storage units in the target grade region to migrate the stored data of the target unit. If there is no cold storage unit, select the hot storage unit with the lowest real-time wear in the target grade region to migrate the stored data of the target unit.
8. The system according to claim 6, characterized in that, Generating a percentage change image corresponding to the storage unit percentage of each of the encryption level regions, including: A progress bar corresponding to each encryption level region is generated based on the usage rate of each encryption level region. When the full storage threshold is triggered, the progress bar is updated according to the warning pixel value to obtain a warning progress bar, and the adjustment progress bar of the encryption level area is regenerated according to the updated storage unit ratio. The percentage change image corresponding to each encryption level region is obtained based on the warning progress bar and the adjustment progress bar.
9. The system according to claim 6, characterized in that, Also includes: The number of read / write errors for each of the aforementioned storage units is obtained in real time; When the number of read / write errors is greater than or equal to the error threshold, a redundant copy of the storage unit is constructed based on the number of backups corresponding to the encryption level and access frequency of the storage unit.
10. The system according to claim 9, characterized in that, When the number of read / write errors is greater than or equal to the error threshold, a redundant replica of the storage unit is constructed based on the encryption level and access frequency of the storage unit and the corresponding number of backups, including: The storage unit with the number of read / write errors greater than or equal to the error count threshold is identified as the first storage unit, and the remaining storage units with the same encryption level as the first storage unit are identified as the second storage unit. The second storage units are arranged in ascending order of real-time wear to obtain a unit sequence. Based on the number of backups, the corresponding second storage units are selected sequentially in the unit sequence, and the stored data of the first storage unit is copied to the selected second storage unit.
