Forklift dynamic data balance anti-loss storage method

By calculating the disk partition capacity, creating fixed-sized data files, dual backup mechanisms and power outage protection, the data loss problem of forklift instruments in frequent start-stop and power outage environments is solved, ensuring data integrity and storage device life, and realizing the reliability and storage efficiency of data recovery.

CN120407283APending Publication Date: 2025-08-01ZHENGZHOU JIACHEN ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510434803.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the environment of frequent start-stop and sudden power outages, the existing data storage technology cannot effectively prevent data loss, affects data integrity and reliability, and cannot alleviate the local wear and tear of storage media.

Method used

By calculating the disk partition capacity, creating a fixed-sized data file and adopting a dual backup mechanism, combining the polling mechanism to write uniformly, integrating the supercapacitor module for power-off protection, and automatically replacing the data file when it is close to wear life, and attaching a CRC32 verification code to ensure data integrity.

Benefits of technology

It realizes data reliability and integrity in environments where forklifts are frequently started and stopped and powered off, extends the service life of storage devices, and ensures the reliability and storage efficiency of data recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407283A_ABST
    Figure CN120407283A_ABST
Patent Text Reader

Abstract

The invention discloses a forklift dynamic data balance anti-loss storage method, and relates to the technical field of data storage, and the method comprises the steps: calculating and setting the disk partition capacity according to the size of a single write-in file, a data recording cycle and the total working hour of a product life cycle, creating an independent disk partition, and storing temporary data; the method comprises the following steps: dynamically creating a data file with a fixed size and a double-backup index table in a disk partition, recording data file information, balancing writing through a polling mechanism, monitoring erasing times, timely replacing the data file to prevent abrasion, ensuring that power is supplied for at least 100ms during power failure by an integrated super capacitor, finishing current writing and adding CRC32 verification, and after a forklift instrument system is restarted, performing data writing and data writing. According to the method, the disk partition capacity is dynamically determined, the data file abrasion is reduced through polling mechanism writing, the data file erasing and writing frequency is monitored in real time, and the data file is automatically replaced when the service life is close.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and particularly to a method for saving dynamic data balance and preventing data loss of a forklift. Background Art

[0002] During the operation of a forklift instrument, real-time data needs to be saved for equipment health monitoring, fault backtracking, and operation efficiency analysis. Existing operating systems generally adopt a cache mechanism to improve the writing efficiency of data files, that is, data is first temporarily stored in the memory buffer, and then written to the disk in batches after accumulating to a certain amount or a specific time. Due to problems such as high vibration, frequent start-stop, and sudden power-off in the forklift operation environment, the requirements for the data storage technology of forklift instruments are more stringent.

[0003] Chinese Patent with application number CN2024119967176 discloses a data reading and writing method, system, device, computing device, and storage medium. The data reading and writing method includes: receiving a data reading and writing request sent from the user state through the asynchronous I / O layer and storing the data reading and writing request in the request queue; when it is determined in the asynchronous I / O layer that the data reading and writing request is of the direct pass type, sending the data reading and writing request to the driver layer; parsing the data reading and writing request by the driver layer and sending the request information of the data reading and writing request to the target processing end device for reading and writing processing. Although this solution improves the I / O throughput and supports high-concurrency scenarios, in the scenario of frequent start-stop of forklifts, it lacks the ability to protect data during power-off, cannot avoid data loss problems caused by sudden power-off, and it is difficult to recover data files after damage, affecting the integrity and reliability of data, hindering the subsequent maintenance, management, and operation analysis of forklifts, and also cannot alleviate the local wear problem of the storage medium, and there may be premature failure of local areas of the storage medium.

[0004] Therefore, a method for saving dynamic data balance and preventing data loss of a forklift is proposed to solve the above problems. Summary of the Invention

[0005] The purpose of the present invention is to disclose a method for saving dynamic data balance and preventing data loss of a forklift to solve the problems raised in the above background art.

[0006] To achieve the above purpose, the present invention is realized through the following technical solutions: specifically including the following steps:

[0007] S1, obtain the full-disk overwrite life of the disk and the disk page size, calculate the disk space occupied by the size of a single written file according to the size of a single written file, the data recording period, and the total working hours of the product life cycle, calculate the total disk write volume, and determine the disk partition capacity according to the full-disk overwrite life and the safety factor, and create an independent disk partition on the disk for storing temporary data;

[0008] S2. Create multiple data files of a fixed size within the disk partition. The number of data files is dynamically adjusted according to the disk partition capacity and the size of each write file. Create a file index table to record the file number, write timestamp, and status information, and store it using a dual-backup mechanism.

[0009] S3. Use a polling mechanism to sequentially write real-time data into different data files, ensuring that each write operation is distributed to different physical storage areas to achieve wear leveling. After each write is completed, update the file index table to record the location of the latest valid data file. Monitor the number of erase / write cycles of the data file in real time. When the number of erase / write cycles of the data file approaches the full-disk erase lifetime of the disk, automatically mark the highly worn data file as read-only and allocate a new data file to replace it.

[0010] S4. Integrate a supercapacitor module to implement a power-off protection mechanism. After detecting a power-off signal, maintain the power supply of the forklift instrument system for at least 100 ms to ensure that the current data file write operation is completed. When writing each data file, calculate the CRC32 checksum of the data and append it to the end of the data file.

[0011] S5. After the forklift instrument system restarts, read the file index table, locate the latest valid data file for data recovery. If the latest data file is damaged, read the data from the previous written data file and verify the CRC32 checksum, and load the recovered data into the forklift instrument system.

[0012] As a preferred technical solution of the present invention, in the step S1, the calculation formula for the size f of each write file occupying the disk space is:

[0013] f = ceil(c / ь), where c represents the size of each write file, ь represents the disk page size, and ceil represents rounding up.

[0014] As a preferred technical solution of the present invention, in the step S1, the calculation formula for the total disk write volume g is:

[0015] g = e × 3600 / d × f × b,

[0016] where e represents the total working hours of the product life cycle, d represents the data recording period, f represents the size of each write file occupying the disk space, and b represents the disk page size.

[0017] As a preferred technical solution of the present invention, in the step S1, the calculation formula for the disk partition capacity j is:

[0018] j = g / a × i,

[0019] Among them, g represents the total disk write volume, a represents the full disk overwrite life of the disk, and i represents the safety factor.

[0020] As a preferred technical solution of the present invention, in the step S2, the calculation formula for the number N of data files is:

[0021] N = floor(j / (f × b)),

[0022] Among them, j represents the disk partition capacity, f represents the disk space occupied by a single written file, b represents the disk page size, and floor represents rounding down.

[0023] As a preferred technical solution of the present invention, in the step S2, the file index table is stored using a dual-backup mechanism: the main index table is stored at the starting position of the disk partition, and the backup index table is stored at the end position of the disk partition. When updating the file index table each time, first update the backup index table, and then update the main index table.

[0024] As a preferred technical solution of the present invention, in the step S3, the implementation of wear leveling includes: real-time statistics of the overwrite times of each data file in the disk partition to generate a wear leveling report. When the overwrite times of a data file approach the full disk overwrite life a of the disk, it is automatically marked as read-only and a new data file is allocated for replacement.

[0025] As a preferred technical solution of the present invention, in the step S4, the specific implementation of the power-off protection mechanism includes: integrating a supercapacitor module to maintain the power supply of the forklift instrument system for at least 100 ms after detecting a power-off signal. During the power-off protection period, the file index table is preferentially written.

[0026] As a preferred technical solution of the present invention, in the step S5, the specific rule for data recovery is: if the latest data file is damaged, read the previous valid data file number in the file index table. If the file index table is damaged, traverse all data files in the disk partition and determine the data file that was successfully and completely written to the storage device last time before the forklift instrument system powered off according to the timestamp.

[0027] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0028] 1. The present invention dynamically determines the disk partition capacity by precisely calculating the disk life, page size, and single-write file size, ensuring efficient utilization of disk space. It creates multiple data files of a fixed size within the disk partition, evenly distributes write operations through a polling mechanism, constructs a dual-backup file index table to ensure data recoverability. At the same time, it uses the polling mechanism to reduce the wear of individual data files and extend the device life, and monitors the number of erase / write cycles of data files in real time. When approaching the end of life, it automatically replaces the data files to ensure data security, regularly generates a wear leveling report, and provides health status monitoring.

[0029] 2. The present invention integrates a supercapacitor module to achieve power-off protection, ensuring the completion of write operations. It preferentially writes the file index table to guarantee data recoverability, attaches a CRC32 checksum during each write, and verifies it during reading to ensure data integrity. After the forklift instrument system restarts, it preferentially reads the file index table to restore data. If the file index table or the latest data file is damaged, it determines the valid data based on the timestamp to ensure the reliability of data recovery. This method significantly improves the reliability of data storage and the disk life, providing a solid guarantee for the stable operation of the forklift instrument. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is the flowchart of the dynamic data storage partition management of the forklift in the present invention;

[0031] Figure 2 is the flowchart of the file management and writing of the dynamic data storage of the forklift in the present invention;

[0032] Figure 3 is the flowchart of wear leveling and file management of the dynamic data storage of the forklift in the present invention;

[0033] Figure 4 is the flowchart of power failure response and data verification of the dynamic data storage of the forklift in the present invention;

[0034] Figure 5 is the flowchart of data recovery and verification after the system restart of the dynamic data of the forklift in the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0035] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0036] It can be understood that the terms "first", "second", etc. used in this application can be used in this document to describe various elements, but unless otherwise specified, these elements are not restricted by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of this application, the first xx script can be called the second xx script, and similarly, the second xx script can be called the first xx script.

[0037] The present invention discloses a method for saving dynamic data balance and anti-loss of a forklift, which specifically includes the following steps:

[0038] S1, obtain the full-disk overwrite life of the disk and the disk page size, calculate the disk space occupied by the single write file size according to the single write file size, data recording period, and total working hours of the product life cycle, calculate the total disk write volume, and determine the disk partition capacity according to the full-disk overwrite life and safety factor, and create an independent disk partition on the disk for storing temporary data.

[0039] Specifically, as Figure 1 shown, obtain the full-disk overwrite life a of the disk from the disk manual or through the SMART command. The full-disk overwrite life of the eMMC chip is 1000 times; obtain the disk page size b from the disk manual or the operating system API. The page size of NANDFlash is 4KB.

[0040] Among them, the calculation formula for the disk space f occupied by the single write file size is: f = ceil(c / b), where c represents the single write file size, b represents the disk page size, and ceil represents rounding up. If the single write file size is 3KB and the disk page size is 4KB, then f = ceil(3 / 4) = 1, that is, the single write occupies 1 disk page.

[0041] The calculation formula for the total disk write volume g is: g = e × 3600 / d × f × b, where e represents the total working hours of the product life cycle, d represents the data recording period, f represents the disk space occupied by the single write file size, b represents the disk page size. The disk product life cycle is 10 years, 10 years × 365 days × 8 hours = 29200 hours, e is 29200 hours, data is recorded once every 10 seconds, d is 10 seconds, f is 1, b is 4096 bytes, then g = 29200 * 3600 / 10 * 1 * 4096 = 41.1GB. It is estimated that the total write volume of the entire life cycle of the disk product is 41.1GB.

[0042] The calculation formula for the disk partition capacity j is: j = g / a × i, where i represents the safety factor. The safety factor i is used to ensure that while the disk partition capacity meets the expected write requirements, there is a certain amount of redundant space to cope with fluctuations in data writing or disk lifespan. Then j = 41.1 / 1000 * 1.5 = 61.65MB. That is, the disk partition capacity is 61.65MB. Use the partition tool of the operating system to create an independent partition on the disk and monitor the usage of the disk partition. When the remaining space is lower than the set threshold, automatically expand the disk partition capacity or trigger a data cleaning mechanism to dynamically adjust the disk partition capacity.

[0043] S2. Create multiple data files of fixed size within the disk partition. The number of data files is dynamically adjusted according to the disk partition capacity and the size of a single written file. Create a file index table to record the file number, write timestamp, and status information, and store it using a double-backup mechanism.

[0044] Specifically, as Figure 2 shown, the calculation formula for the number of data files N is: N = floor(j / (f × b)). As an example, j represents the disk partition capacity, such as 62MB (65011712 bytes); f represents the disk space occupied by the size of a single written file; b represents the disk page size, such as 4KB (4096 bytes), and floor means rounding down. Then N = floor(65011712 / (1 * 4096)) = 15868 files.

[0045] Create 15868 data files of fixed size within the disk partition. The size of the data files is aligned with the disk page size, that is, 4KB. The file naming rule is data_<number>.bin, such as data_0001.bin, data_0002.bin.

[0046] Forklift instrument system construction file index table, used to record the detailed information of each data file, including file number, timestamp of the last write, current status. The forklift instrument system adopts a dual-backup mechanism to store data files and their file index tables. When creating a new data file or updating the file index table each time, the system copies this information to another independent storage medium or disk partition. The system creates a main index table at the starting position of the storage disk partition, recording the number, write timestamp, and status information of each data file; at the same time, it stores a complete backup index table at the end position of the disk partition. The content of the backup index table is the same as that of the main index table for redundant backup. When updating the file index table each time, it follows the process of updating the backup index table first and then the main index table to ensure the consistency of index data. The update process of the main index table and the backup index table is: read the main index table into memory, modify the status information of the target data file, write the updated file index table to the backup index table first, and then write the updated file index table to the main index table. If the main index table is damaged, recover data from the backup index table.

[0047] Use a polling pointer (such as currentFileId) to select the target data file to ensure that write operations are evenly distributed to different data files. After each write is completed, update the polling pointer to the next data file. When writing data, the forklift instrument system selects the target data file based on the polling pointer. At the same time, the forklift instrument system also records the metadata of each write, including write timestamp, file number, and size of the written data. If all data files are full, the forklift instrument system will trigger a data file rotation mechanism to clean up old data or expand the capacity of the disk partition (refer to the real-time monitoring and dynamic adjustment strategy in step S1); when reading data, the forklift instrument system quickly locates the target data file through the file index table according to the provided file number or time information.

[0048] Through the above steps, dynamically calculate and create fixed-size data files, establish a dual-backup index table, and use a polling pointer for write operations, effectively solving the problem of data loss caused by sudden power failure of the high-speed buffer. At the same time, with fixed-size data files, the storage efficiency and write performance are balanced, improving the storage efficiency and access speed of data, and avoiding the problem of space waste caused by too small data files.

[0049] S3. Adopt a polling mechanism to write real-time data into different data files in turn to ensure that each write operation is distributed to different physical storage areas to achieve wear leveling, reduce the wear of a single data file, and extend the service life of the storage device. After each write is completed, update the file index table to record the position of the latest valid data file. Real-time monitor the number of erase / write cycles of the data file. When the number of erase / write cycles of the data file approaches the full-disk erase life of the disk, automatically mark the high-wear data file as read-only and allocate a new data file to replace it.

[0050] Among them, as Figure 3 shown, the polling pointer uses the global variable currentFileId to record the number of the currently written file, with the initial value being 1. The writing process is to select the target data file (such as data_0001.bin) according to currentFileId, write the real-time data into the target data file, update the file index table, record the latest write timestamp and file status, increment currentFileId, and if it exceeds the total number N of data files, reset it to 1, forming a loop writing process.

[0051] The implementation of wear leveling includes: maintaining a write / erase counter for each data file, statistically counting the write / erase times of each data file in the disk partition in real time, generating a wear leveling report. When the write / erase times of a data file are close to the full-disk write / erase life a of the disk, it is automatically marked as read-only, and a new data file is allocated for replacement. When the forklift instrument system is initialized, the initial values of the write / erase counters corresponding to all data files are set to 0. Each time a write operation is performed on a data file, the forklift instrument system will automatically locate the write / erase counter corresponding to the data file and increment the value by 1. The forklift instrument system generates a wear leveling report according to a preset fixed period.

[0052] The free file pool is initialized when the forklift instrument system starts, incorporating all unused data files in the disk partition. During the use of data files, when the write / erase times of a data file are close to the full-disk write / erase life of the disk, a data file replacement operation is triggered. At the same time, the newly created data file is supplemented to the free file pool to ensure that there are always available data files in the free file pool. The free file pool preferentially allocates the data files that entered the free file pool earliest. When the write / erase times of a data file reach 90% of the full-disk write / erase life of the disk (for example, if a = 1000 times, that is, 900 times), the following operations are performed: accessing the file index table to update the file status to "read-only", prohibiting write operations, allocating a new data file from the free file pool to replace the old file marked as "read-only", updating the status of the new data file in the file index table to "available", and initializing the write / erase counter.

[0053] In addition, by regularly checking the write / erase times of each data file, generating a wear leveling report, when the write / erase times exceed the threshold (such as a*0.8), an alarm is triggered and a log is recorded so that the administrator can take measures in time, such as backing up the data file or replacing the storage device.

[0054] Through the above steps, the forklift instrument system realizes the efficient writing of real-time data and the wear leveling of the storage device, extending the service life of the storage device.

[0055] S4. Integrate a supercapacitor module to implement a power-off protection mechanism. After detecting a power-off signal, maintain the power supply of the forklift instrument system for at least 100 ms to ensure the completion of the current write operation. When writing each time, calculate the CRC32 checksum of the data and append it to the end of the data file.

[0056] As Figure 4 shown, the specific implementation of the power-off protection mechanism includes: integrating a supercapacitor module in the forklift instrument system as a backup power supply, using a voltage comparator (such as a voltage comparator of model LM393) to monitor the main power supply voltage in real time, triggering a power-off signal when the voltage is lower than the preset threshold. After the power-off signal is generated, the forklift instrument system maintains the power supply for 100 ms. During the power-off protection period, preferentially write the file index table and update the CRC32 checksum. Append the CRC32 checksum of the data calculated each time when writing data to the end of the data file for data integrity verification; when reading data, calculate the CRC32 checksum of the data and compare it with the checksum stored at the end of the data file. If the verification fails, try to read the previous valid data file.

[0057] Through the above steps, the power-off protection mechanism integrates a supercapacitor module to ensure that the forklift instrument system maintains a 100-ms power supply when the main power supply is off, preventing data loss. During this period, the forklift instrument system preferentially completes the writing of the file index table. Each time when writing, the forklift instrument system calculates the CRC32 checksum and appends it to the end of the data file. When reading, compare the checksum to timely detect and handle data integrity problems.

[0058] S5. After the forklift instrument system restarts, read the file index table, locate the latest valid data file for data recovery. If the latest data file is damaged, read the data in the previous written data file and verify the CRC32 checksum, and load the recovered data into the forklift instrument system.

[0059] As Figure 5 shown, the specific rule of data recovery is: if the latest data file is damaged, read the previous valid file number in the file index table. If the file index table is damaged, traverse all data files in the disk partition, and determine, according to the timestamp, the data file that was successfully and completely written to the storage device last time before the forklift instrument system powered off and can pass the CRC32 checksum verification.

[0060] This step locates the latest valid data file and performs data recovery by reading the file index table or traversing the data files in the disk partition, ensuring that the temporary data can be quickly recovered after the forklift instrument system restarts and guaranteeing the normal operation of the forklift instrument.

[0061] Among them, after the forklift instrument system restarts, it preferentially reads the main index table to obtain the number and timestamp of the latest valid data file. According to the file number in the file index table, it reads the data of the corresponding file and verifies the CRC32 checksum. If the verification passes, it loads the data into the forklift instrument system; if the verification fails, it attempts to read the previous valid data file.

[0062] If the file index table is damaged, it traverses all data files in the disk partition, determines the latest valid data file according to the timestamp. The latest valid data file is the data file that was successfully and completely written to the storage device for the last time before determining that the forklift instrument system was powered off. It reads the data of the latest valid data file and verifies the CRC32 checksum. If the verification passes, it is loaded into the forklift instrument system, and the restored data is parsed into a format recognizable by the forklift instrument system, and the parsed data is loaded into the forklift instrument system to restore to the state before power-off.

[0063] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0064] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The above program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0065] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0066] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the invention patent of the present invention should be subject to the appended claims.

[0067] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for saving dynamic data balance and anti-loss of a forklift, characterized in that: Specifically, it includes the following steps: S1. Obtain the full-disk erasure lifetime of the disk and the disk page size. Calculate the disk space occupied by a single write file according to the size of a single write file, the data recording period, and the total working hours of the product life cycle. Calculate the total disk write volume. Determine the disk partition capacity according to the full-disk erasure lifetime of the disk and the safety factor, and create an independent disk partition on the disk to store temporary data; S2. Create multiple data files of a fixed size within the disk partition. The number of the data files is dynamically adjusted according to the disk partition capacity and the size of a single write file. Create a file index table to record the file number, write timestamp, and status information, and store it using a dual-backup mechanism; S3. Use a polling mechanism to sequentially write real-time data into different data files to ensure that each write operation is distributed to different physical storage areas to achieve wear leveling. After each write is completed, update the file index table to record the location of the latest valid data file. Monitor the erasure count of the data file in real time. When the erasure count of the data file approaches the full-disk erasure lifetime of the disk, automatically mark the high-wear data file as read-only and allocate a new data file to replace it; S4. Integrate a supercapacitor module to implement a power-off protection mechanism. After detecting a power-off signal, maintain the power supply of the forklift instrument system for at least 100 ms to ensure the completion of the current data file write operation. Calculate the CRC32 checksum of the data and append it to the end of the data file during each data file write; S5. After the forklift instrument system restarts, read the file index table, locate the latest valid data file for data recovery. If the latest data file is damaged, read the data in the previous written data file, verify the CRC32 checksum, and load the recovered data into the forklift instrument system.

2. The preservation method for preventing loss of forklift dynamic data balance according to claim 1, characterized in that: In the step S1, the calculation formula for the disk space f occupied by a single write file is: f = ceil(c / ь), where c represents the size of a single write file, ь represents the disk page size, and ceil represents rounding up.

3. The method for preserving the dynamic data balance and anti-loss of a forklift according to claim 1, characterized in that: In the step S1, the calculation formula for the total disk write volume g is: g = e × 3600 / d × f × b, where e represents the total working hours of the product life cycle, d represents the data recording period, f represents the disk space occupied by a single write file, and b represents the disk page size.

4. The preservation method for preventing loss of forklift dynamic data balance according to claim 1, characterized in that: In the step S1, the calculation formula for the disk partition capacity j is: j = g / a × i, where g represents the total disk write volume, a represents the full-disk erasure lifetime of the disk, and i represents the safety factor.

5. The preservation method for preventing loss of dynamic data balance of a forklift according to claim 1, characterized in that: In the step S2, the calculation formula for the number N of the data files is: N = floor(j / (f × b)), where j represents the disk partition capacity, f represents the disk space occupied by a single write file, b represents the disk page size, and floor represents rounding down.

6. The preservation method for preventing loss of dynamic data balance of a forklift according to claim 1, characterized in that: In the step S2, the file index table is stored using a dual-backup mechanism: the main index table is stored at the starting position of the disk partition, and the backup index table is stored at the end position of the disk partition. When updating the file index table each time, first update the backup index table, and then update the main index table.

7. The preservation method for preventing loss of forklift dynamic data balance according to claim 1, characterized in that: In the step S3, the realization of wear leveling includes: statistically counting the number of erase / write times of each data file in the disk partition in real time, generating a wear leveling report, and when the number of erase / write times of a data file approaches the full-disk erase life a of the disk, automatically marking it as read-only and allocating a new data file to replace it.

8. The preservation method for preventing loss of forklift dynamic data balance according to claim 1, characterized in that: In the step S4, the specific implementation of the power-off protection mechanism includes: integrating a supercapacitor module, maintaining the power supply of the forklift instrument system for at least 100 ms after detecting a power-off signal, and preferentially writing to the file index table during the power-off protection period.

9. The preservation method for preventing loss of dynamic data balance of a forklift according to claim 1, characterized in that: In the step S5, the specific rule for data recovery is: if the latest data file is damaged, read the number of the last valid data file in the file index table; if the file index table is damaged, traverse all data files in the disk partition and determine, according to the time stamp, the data file that was successfully and completely written to the storage device last before the forklift instrument system powered off.

10. The preservation method for preventing loss of forklift dynamic data balance according to claim 1, characterized in that: The program instructions of the saving method are stored in a storage medium, and when the program instructions run, they control the device where the storage medium is located to execute the method described in any one of claims 1 to 9.