File management method for embedded device and related apparatus

By configuring the Flash file system and page cache space based on the end flag in wearable embedded devices, the problem of small built-in Flash capacity of MCU is solved, lightweight file management is realized, file reading and writing requirements are met, and the increase of device size and power consumption is avoided.

CN119576228BActive Publication Date: 2025-10-21KINGSIGNAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411628229.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-10-21
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The MCU built-in on-chip Flash capacity of wearable embedded devices is small and cannot adapt to the complexity and operating overhead of general Flash file systems. Integrating external storage media will increase the device size, power consumption and cost, making it difficult to meet the requirements of low power consumption and small and easy to wear.

Method used

In the Flash storage space of wearable embedded devices, a lightweight file system is configured based on the end mark, and the page cache space is used for file reading and writing management, avoiding the transplantation of heavy general file systems and external storage media.

Benefits of technology

It provides a lightweight file system function within the limited Flash space to meet file reading and writing needs, reduce system complexity and power consumption, and adapt to the low power consumption and compact and easy-to-wear requirements of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576228B_ABST
    Figure CN119576228B_ABST
Patent Text Reader

Abstract

The application provides a file management method of an embedded device, comprising the following steps: based on a page space of a Flash storage space, a plurality of block spaces are pre-configured in a high address space of the Flash storage space according to a storage requirement of a current file, one block space comprises at least one page space, and one block space is used for storing one file; in the block space, a Flash file system is configured based on an end mark, the end mark is used for marking the end of the current file; and the current file is read and written by the Flash file system and a page cache space. The application can configure the Flash file management based on the end mark, provide a lightweight file system function in a very limited Flash space of a wearable embedded device, comprise a page cache space, a file read and write complete function, and meet the needs of an application layer for file reading and writing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded devices, and in particular to a file management method, device, electronic device and storage medium for embedded devices. Background Art

[0002] In current wearable embedded devices, due to the requirements of power consumption and size, the MCU has built-in on-chip Flash, which is used to store running software code and files and data (including log data, configuration data, etc.).

[0003] On-chip Flash memory capacity is relatively small, ranging from a few hundred KB to several MBytes depending on MCU specifications. Wearable embedded devices typically require relatively simple data file reading and writing, generally focusing on configuration and log data storage. Therefore, to meet these file access requirements, a Flash file system must be implemented within the device. Porting a general-purpose Flash file system would be prohibitively complex, resulting in excessive operational and management overhead. The MCU's CPU processing power and internal Flash memory capacity are both extremely limited, making this unsuitable for a general-purpose Flash file system. Furthermore, porting a general-purpose Flash file system requires porting the corresponding supporting OS, further increasing system complexity and operational overhead. Integrating a larger external storage medium, such as an SD card, would add additional circuitry, increasing device size, power consumption, and cost. This contradicts the wearable device's requirements for low power consumption and compactness.

[0004] The on-chip Flash memory built into the MCU of existing embedded devices has a small capacity, and a portion of the Flash storage space is also required to store the running software code. This makes porting a general-purpose Flash file system and supporting OS unsuitable due to the complexity and overhead involved. Integrating external large-capacity storage media requires additional circuitry, increasing device size, power consumption, and cost. Therefore, a file management solution is urgently needed to address the file access issues currently faced by wearable embedded devices. Summary of the Invention

[0005] An embodiment of the present invention provides a file management method for an embedded device, aiming to solve the current problems faced by wearable embedded device application file access. The present invention can configure Flash file management based on end markers, providing lightweight file system functions within the very limited Flash space of wearable embedded devices, including page cache space and complete file read and write functions, thereby meeting the application layer's needs for file reading and writing. There is no need to transplant a heavy, full-featured general Flash file system, nor is there a need for external storage such as SD cards to provide additional storage space for file storage access.

[0006] In a first aspect, an embodiment of the present invention provides a file management method for an embedded device, wherein the embedded device includes a Flash storage space and a page cache space, wherein a basic storage unit of the Flash storage space is a page space, wherein a low address space of the Flash storage space is used to store software execution code, and a high address space of the Flash storage space is used for a Flash file system, and the page cache space is used for read and write caching of the Flash storage space, and the page cache space is associated with the page space of the Flash storage space, and the method comprises the following steps:

[0007] Based on the page space of the Flash storage space and according to the storage requirements of the current file, pre-configuring a plurality of block spaces in the high address space of the Flash storage space, wherein one block space includes at least one page space, and one block space is used to store one file;

[0008] In the block space, a Flash file system is configured based on an end marker, where the end marker is used to mark the end of the current file;

[0009] The current file is read and written managed through the Flash file system and the page cache space.

[0010] Optionally, the preconfiguring a plurality of block spaces in the high address space of the Flash storage space based on the page space of the Flash storage space according to the storage requirements of the file includes:

[0011] In the Flash storage space, from the high address space downward, according to the storage requirements of the configuration file and the current file, a block space corresponding to the configuration file and several block spaces corresponding to the current file are pre-allocated in sequence.

[0012] Optionally, configuring the Flash file system based on the end flag in the block space includes:

[0013] In the block space, a scanning rule of the Flash file system is configured based on the end flag, and the Flash file system is constructed according to the scanning rule. The preset scanning rule includes:

[0014] Scanning the page spaces in each of the block spaces in sequence from a high address space downwards, and determining whether a current file has been scanned based on whether the end mark has been scanned;

[0015] If the current file is scanned, the file data of the scanned current file is obtained and read into the page cache space;

[0016] If the current file is not scanned, the current file is determined to be empty and the file length is determined to be 0.

[0017] Optionally, scanning the page spaces in each of the block spaces in sequence from the high address space downward, and determining whether the current file is scanned based on whether the end mark is scanned includes:

[0018] Scan the block spaces one by one from the high address space downwards;

[0019] For each block space, scanning starts from the start page space of the block space until the end page space of the block space is scanned;

[0020] For the scanned page space, taking the end mark as a scanning target, scanning from the start byte of the page space until the end byte of the page space is scanned;

[0021] The current page space used by the current file is determined by scanning the block space and the page space, and all bytes of the current page space are read from the Flash storage space to the page cache space.

[0022] Optionally, the performing read and write management on the file through the Flash file system and the page cache space includes:

[0023] When performing write management on the current file, copying the to-be-written data corresponding to the current file to the page cache space;

[0024] If the page cache space is full, erasing the corresponding page space of the Flash storage space, and programming the data in the page cache space into the corresponding page space of the Flash storage space;

[0025] Updating the page cache space to a next page space of the corresponding page space, and reading all bytes of the next page space from the Flash storage space to the page cache space, wherein the corresponding page space and the next page space are continuous page spaces in the same block space;

[0026] The remaining data of the data to be written continues to be written into the page cache space, and the data of the remaining data that was last written into the page cache space is not programmed into the corresponding page space of the Flash storage space.

[0027] Optionally, the performing read and write management on the current file through the Flash file system and the page cache space further includes:

[0028] When performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end marker, the number of used bytes corresponding to the page cache space is used as the page offset, the byte corresponding to the end marker is set, and the page cache space is set to dirty;

[0029] updating the length of the current file, and if the length of the current file is greater than the total available space of the block space, determining that the current file wraps;

[0030] If it is determined that the current file has wrapped, recalculate and set the page space corresponding to the current file, and update the length of the current file to the total available space length of the block space minus 1;

[0031] The amount of page space used to configure the block space is recalculated according to the length of the current file.

[0032] Optionally, the performing read and write management on the current file through the Flash file system and the page cache space further includes:

[0033] When performing read management on the current file, selecting a block space corresponding to the current file;

[0034] Calculate whether the current file wraps around in the block space according to the starting page space of the current file, the starting byte of the current file, and the length of the current file;

[0035] If there is no wraparound, when the number of page spaces used by the current file is 1, the file data of the current file is directly read from the page cache space and returned;

[0036] When the number of page spaces used by the current file is greater than 1, a first portion of file data of the current file is read from the Flash storage space, and a second portion of file data of the current file is read from the page cache space and returned, and the first portion of file data and the second portion of file data are used to construct the returned current file;

[0037] If wraparound exists, when the number of page spaces used by the current file is 1, first non-wrapped data is read from the non-wrapped portion of the page cache space, and first wrapped data is read from the wrapped portion of the page cache space, and the first non-wrapped data and the first wrapped data are used to construct the returned current file;

[0038] When the number of page spaces used by the current file is greater than 1, reading second non-wrap data from a non-wrap portion of the Flash storage space;

[0039] If the length of the wraparound portion is greater than the data length of the page cache space, second wraparound data is read from the second wraparound portion of the Flash storage space, and third wraparound data is read from the page cache space, and the second non-wrapped data, the second wraparound data, and the third wraparound data are used to construct the returned current file;

[0040] If the length of the wraparound portion is equal to the data length of the page cache space, the fourth wraparound data is read from the page cache space, and the second non-wrapped data and the fourth wraparound data are used to construct the returned current file.

[0041] In a second aspect, an embodiment of the present invention further provides a file management device for an embedded device, the embedded device including a Flash storage space and a page cache space, the basic storage unit of the Flash storage space being a page space, the low address space of the Flash storage space being used to store software execution code, the high address space of the Flash storage space being used for a Flash file system, the page cache space being used for read and write caching of the Flash storage space, the page cache space being associated with the page space of the Flash storage space, the file management device for the embedded device including:

[0042] A first configuration module is configured to pre-configure a plurality of block spaces in a high address space of the Flash storage space based on the page space of the Flash storage space and according to storage requirements of a current file, wherein one block space includes at least one page space, and one block space is used to store one file;

[0043] a second configuration module, configured to configure a Flash file system in the block space based on an end marker, where the end marker is used to mark the end of the current file;

[0044] The management module is used to manage the reading and writing of the current file through the Flash file system and the page cache space.

[0045] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the file management method for an embedded device provided in an embodiment of the present invention are implemented.

[0046] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the file management method for an embedded device provided in an embodiment of the invention are implemented.

[0047] In an embodiment of the present invention, based on the page space of the Flash storage space, according to the storage requirements of the current file, several block spaces are pre-configured in the high address space of the Flash storage space, one block space includes at least one page space, and one block space is used to store one file; in the block space, the Flash file system is configured based on the end mark, and the end mark is used to mark the end of the current file; the current file is read and written through the Flash file system and the page cache space. The present invention can configure Flash file management based on the end mark, and provides a lightweight file system function within the very limited Flash space of the wearable embedded device, including page cache space, complete file reading and writing functions, meeting the application layer's needs for file reading and writing. There is no need to transplant a heavy, full-featured general Flash file system, nor is there any need for external storage such as SD cards to provide additional storage space for file storage access. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 This is a flow chart of a file management method for an embedded device provided by an embodiment of the present invention;

[0050] Figure 2This is a schematic diagram of address allocation of a Flash storage space provided by an embodiment of the present invention;

[0051] Figure 3 This is a structural diagram of a file management device for an embedded device provided by an embodiment of the present invention;

[0052] Figure 4 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0054] like Figure 1 As shown, Figure 1 This is a flowchart of a method for file management of an embedded device provided by an embodiment of the present invention. The file management method of the embedded device includes the following steps:

[0055] 101. Based on the page space of the Flash storage space, according to the storage requirements of the current file, several block spaces are pre-configured in the high address space of the Flash storage space.

[0056] In an embodiment of the present invention, the file management method of the above-mentioned embedded device is applied to a wearable embedded device. The embedded device includes a Flash storage space and a page cache space. The basic storage unit of the Flash storage space is a page space. The low address space of the Flash storage space is used to store software running code, the high address space of the Flash storage space is used for the Flash file system, and the page cache space is used for the read and write cache of the Flash storage space. The page cache space is associated with the page space of the Flash storage space. A block space includes at least one page space, and a block space is used to store a file.

[0057] Specifically, in wearable embedded devices, due to the requirements for power consumption and volume, the MCU has built-in on-chip Flash, one for storing running software code, and the other for storing files and data (including log data, configuration data, etc.). The on-chip Flash capacity is not large, and the capacity ranges from a few hundred KBytes to several MBytes depending on the MCU specifications. The requirements of wearable embedded devices for reading and writing data files are not too complicated, and generally focus on configuration data and log data access, etc. In the embodiment of the present application, the Flash file system and the running software code share the Flash storage space, during which the running software code is stored in the Flash low address space, and the Flash file system is stored in the Flash high address space, which can effectively adapt to the growth of the software code and the Flash file system space. For example, the software code grows from the low address to the high address, while the Flash file system grows from the high address to the low address.

[0058] You can refer to Figure 2 , Figure 2 This is a schematic diagram of address allocation of a Flash storage space provided by an embodiment of the present invention. Figure 2 In the , Flash file system is allocated from the high address of Flash downward, and the software running code storage is allocated from the low address of Flash upward.

[0059] Flash storage space is organized into pages (also called Flash Pages). Pages are the basic unit of Flash management. Page size varies depending on the Flash device, typically ranging from 4KBytes to 8KBytes. Based on the application's file storage requirements, storage space is pre-allocated for files and the Flash storage space is divided into slices (also called Flash Slices). Each slice is used to store a single file. Each slice consists of consecutive Flash Pages. A slice can be as small as one Flash Page or as large as all available consecutive Flash Pages within the Flash storage space. It's important to note that before writing to Flash, it must be erased. Erasing is performed in units of Pages. After erasing, each character byte within a Flash Page is 0xFF.

[0060] 102. In the block space, configure the Flash file system based on the end marker.

[0061] In the embodiment of the present invention, the end marker is used to mark the end of the current file. For the Flash storage space storing text type data files, 0xFF can be selected as the end marker.

[0062] The page space Flash Page and block space Flash Slice are configured through the end marker, so that a file is stored in a block space Flash Slice, and the file data of the corresponding page space Flash Page is read and written through the ID of the block space Flash Slice.

[0063] 103. Read and write the current file through the Flash file system and page cache space.

[0064] In an embodiment of the present invention, the page buffer is used to manage the reading and writing of file data, which can reduce the storage pressure and access times of the Flash storage space. For a file, if the data volume is less than one page space, the file data will not be written to the Flash storage space, that is, it will not be written to the page space of the corresponding block space in the Flash storage space, so it can be read directly from the page buffer of the page buffer. If the data volume is full of one page space, part of the file data is written to the Flash storage space, that is, it is written to the page space of the corresponding block space in the Flash storage space, and part is written to the page buffer of the page buffer. In this way, the Flash storage space only needs to store part of the file data. When reading data, it is only necessary to read the file data in the corresponding page space and the file data in the page buffer of the page buffer from the Flash storage space and return them to the user.

[0065] In an embodiment of the present invention, based on the page space of the Flash storage space, according to the storage requirements of the current file, several block spaces are pre-configured in the high address space of the Flash storage space, one block space includes at least one page space, and one block space is used to store one file; in the block space, the Flash file system is configured based on the end mark, and the end mark is used to mark the end of the current file; the current file is read and written through the Flash file system and the page cache space. The present invention can configure Flash file management based on the end mark, and provides a lightweight file system function within the very limited Flash space of the wearable embedded device, including page cache space, complete file reading and writing functions, meeting the application layer's needs for file reading and writing. There is no need to transplant a heavy, full-featured general Flash file system, nor is there any need for external storage such as SD cards to provide additional storage space for file storage access.

[0066] It should be noted that the file management method for embedded devices provided in the embodiment of the present invention can be applied to embedded devices such as smart bracelets and smart head displays that can perform the file management method for embedded devices.

[0067] It is understandable that in the specific implementation of this application, when user data, device data, file data and other related data are involved, when the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as model training, deployment and use, must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0068] Optionally, in the step of pre-configuring several block spaces in the high address space of the Flash storage space according to the storage requirements of the file based on the page space of the Flash storage space, a block space corresponding to a configuration file and several block spaces corresponding to the current file can be pre-allocated in sequence in the Flash storage space from the high address space downward according to the storage requirements of the configuration file and the current file.

[0069] In an embodiment of the present invention, the configuration file is a running configuration file, and the current file is a running log file. Based on the application's demand for current file storage, storage space is pre-allocated for the current file, and the Flash storage space is divided into Flash Slices. One Flash Slice is used for one file storage, and each Flash Slice is composed of continuous Flash Pages. The minimum Flash Slice space can be one Flash Page, and the maximum can be all available continuous Flash Pages in the Flash. The storage requirement of the current file can be a default file length, such as a file length set by the user or the factory setting. It can be understood that the longer the file length of the current file, the higher the storage requirement.

[0070] Please continue to refer to Figure 2 Flash slice 0 allocates one Flash page for storing the running configuration file. Flash slice 1 occupies eight Flash pages for storing the running log file. Depending on the available Flash storage space, you can increase the Flash slice size or allocate a new Flash slice.

[0071] Optionally, in the step of configuring the Flash file system based on the end mark in the block space, the scanning rules of the Flash file system can be configured based on the end mark in the block space, and the Flash file system is constructed by the scanning rules. The preset scanning rules include: from the high address space downward, the page space in each block space is scanned in turn, and whether the current file is scanned is determined based on whether the end mark is scanned; if the current file is scanned, the file data of the scanned current file is obtained and read into the page cache space; if the current file is not scanned, the current file is determined to be empty and the file length is determined to be 0.

[0072] In an embodiment of the present invention, the Flash storage space must be erased before writing. The erasure is performed in units of Flash Pages. After erasure, each byte in the Flash Page is 0xFF. The Flash file system must be erased before use. It is understandable that due to the writing of data, the bytes occupied by the data are not 0xFF. Therefore, for the Flash file system that stores text-type data files, the end marker can be 0xFF. Specifically, the above-mentioned end marker can be the first 0xFF after a non-0xFF.

[0073] When the Flash file system is initialized, the Flash slices in the Flash storage space are scanned. Specifically, for each Flash slice in the Flash file system, the scan starts at Page 0 and continues to the End Page of the Flash slice, completing the scan of a Flash slice. If the scan reaches the End Marker, the End Marker is generated.

[0074] After the current file is scanned, the file data of the scanned current file can be obtained and read into the page buffer space; if the current file is not scanned, the current file is determined to be empty and the file length Size is determined to be 0. The above file data may include the page space identifier Page No and the byte identifier Byte No of the file start, the page space identifier Page No and the byte identifier Byte No of the end marker End Marker.

[0075] After obtaining the file data of the scanned current file, all bytes of the current Flash Page are read from the Flash storage space to the Page Buffer space to cache the data.

[0076] Optionally, the page spaces in each block space are scanned in sequence from the high address space downward. In the step of judging whether the current file is scanned based on whether the end mark is scanned, the block spaces can be scanned one by one from the high address space downward; for each block space, the scanning is started from the starting page space of the block space until the ending page space of the block space is scanned; for the scanned page space, the scanning is started from the starting byte of the page space with the end mark as the scanning target until the ending byte of the page space is scanned; by scanning the block space and the page space, the current page space used by the current file is determined, and all bytes of the current page space are read from the Flash storage space to the page cache space.

[0077] In an embodiment of the present invention, each Flash Slice in the Flash file system is scanned starting from Page 0, the starting page space of the Flash Slice, to End Page, the ending page space of the Flash Slice. When scanning each Flash Slice, each Flash Page is scanned starting from Byte 0, the starting byte of the FlashPage, to End Byte, the ending byte of the Page. For the scanned page space, if the current byte is found to be a non-end marker and the last byte Last Byte is an end marker End Marker, it is determined that the first file has been found to have started, and the page number Page No and the byte No of the first byte of the first page space corresponding to the start of the first file are recorded.

[0078] If the current byte is found to be the End Marker and the last byte is the Non-End Marker, it is determined that the first file ends, and the page number Page No of the second page space corresponding to the End Marker and the Byte No of the second byte corresponding to the End Marker are recorded.

[0079] For each block space Flash Slice, if it is found that the starting byte Byte 0 of the block space Flash Slice is a non-end marker and the ending byte End Byte of the block space Flash Slice is an end marker EndMarker, then the starting byte Byte 0 of the block space Flash Slice is determined to be the start of the file, and the first page space is recorded as the first starting page space of the file, that is, the Page No. of the file start is recorded as Page 0, and the first byte identifier is recorded as the first starting byte of the file start, that is, the Byte No. of the file start is recorded as Byte 0.

[0080] For each block space Flash Slice, if the starting byte Byte 0 of the block space Flash Slice is the End Marker and the ending byte End Byte of the block space Flash Slice is the Non-End Marker, then determine that the end page space End Page of the block space Flash Slice contains the end of the file, and record the second page space as the second starting page space of the End Marker, that is, record the Page No of the End Marker as Page 0, and record the second byte as the second starting byte of the End Marker, that is, record the Byte No of the End Marker as Byte 0.

[0081] Based on the first starting page space, the first starting byte, the second starting page space, and the second starting byte, the current page space used by the current file is determined, and the bytes of the current page space are read from the Flash storage space to the page buffer space. If the file start is not found during the above scanning process, the current file is empty and the size is 0. Based on the above scanned file starting Page No. and Byte No., the End Marker Page No. and Byte No., calculate and record the current file size, the number of pages used, the Page No currently in use, the number of bytes used by the current Flash Page, and other information. Read all bytes of the current Flash Page from the Flash to the Page Buffer cache data.

[0082] Optionally, in the step of performing read and write management on files through the Flash file system and page cache space, when performing write management on the current file, the data to be written corresponding to the current file can be copied to the page cache space; if the page cache space is full, the corresponding page space of the Flash storage space is erased, and the data in the page cache space is programmed into the corresponding page space of the Flash storage space; the page cache space is updated to the next page space of the corresponding page space, and all bytes of the next page space are read from the Flash storage space to the page cache space, and the corresponding page space and the next page space are continuous page spaces in the same block of space; the remaining data to be written continues to be written into the page cache space, and the data of the remaining data that was last written into the page cache space is not programmed into the corresponding page space of the Flash storage space.

[0083] In an embodiment of the present invention, when writing to the current file, it is not written directly to the Flash storage space, but first written to the page cache space Page Buffer corresponding to the corresponding block space. Only when the page cache space Page Buffer is full, the data in the page cache space Page Buffer will be written to the corresponding block space.

[0084] Specifically, the corresponding block space Flash Slice may be selected as the block space to be written according to the ID of the block space Slice.

[0085] Copy the current file data to be written to the Page Buffer, or copy the current file data, or copy to the page buffer space when the Page Buffer is full.

[0086] If the Page Buffer is full, the current Flash Page in the Flash Slice corresponding to the Flash storage space is erased. This current Flash Page corresponds to the Page Buffer in the Page Buffer, and the data in the Page Buffer in the Page Buffer is programmed into the erased Flash Page in the current Flash Page. The Page No of the current Flash Page is updated to the page number of the next Flash Page. All bytes in the next Flash Page are read from the Flash storage space and cached in the Page Buffer in the Page Buffer. The number of bytes used by the current Flash Page is updated to 0 for subsequent file data writing.

[0087] If there is any remaining current file data, continue copying the remaining current file data to the page buffer, and update the number of bytes used by the current page FlashPage to the number of bytes copied to the remaining current file data. If the remaining current file data continues to be full, continue programming the data in the page buffer to the erased current page Flash Page. Update the page number of the current page Flash Page to the page number of the next page Flash Page, read all the bytes in the next page Flash Page from the Flash storage space, and cache the data in the page buffer. Update the number of bytes used by the current page FlashPage to 0 for subsequent file data writing. Repeat this process until the number of unused bytes in the page buffer exceeds the number of bytes of the remaining current file data. At this point, the remaining current file data cannot fill the page buffer.

[0088] Optionally, in the step of performing read and write management on the current file through the Flash file system and page cache space, when performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end marker, the number of used bytes corresponding to the page cache space is used as the page offset, the byte corresponding to the end marker is set, and the page cache space is set to dirty; the length of the current file is updated, and if the length of the current file is greater than the total available space of the block space, it is determined that the current file has wrapped; if it is determined that the current file has wrapped, the page space corresponding to the current file is recalculated and set, and the length of the current file is updated to the total available space length of the block space minus 1; based on the length of the current file, the amount of page space used for the configured block space is recalculated.

[0089] In an embodiment of the present invention, when performing write management on the current file, if the number of bytes used by the current page space Flash Page is not 0, or the starting byte Byte 0 of the current page space Flash Page is not the end marker EndMarker, the number of bytes used by the current page space Flash Page is used as the Page offset, the End Marker is set, and the current page space Flash Page is set to Dirty.

[0090] Update the file length Size of the current file. If the file length Size is larger than the total available space of the Flash Slice, it indicates that the file has wrapped. Recalculate and set the starting Page No. and Byte No. of the file, and update the file length Size to the length Size of the total available space of the Flash Slice minus 1 (the End Marker occupies one byte).

[0091] Recalculate the number of FlashPage pages used by the Flash Slice based on the file length Size.

[0092] Optionally, in the step of performing read and write management on the current file through the Flash file system and the page cache space, the block space corresponding to the current file can also be selected when reading the current file; based on the starting page space of the current file, the starting byte of the current file and the length of the current file, calculate whether there is a wraparound in the block space of the current file; if there is no wraparound, then when the number of page spaces used by the current file is 1, the file data of the current file is directly read from the page cache space and returned; when the number of page spaces used by the current file is greater than 1, the first part of the file data of the current file is read from the Flash storage space, and the second file data of the current file is read from the page cache space and returned, and the first part of the file data and the second file data construct the returned current file; if there is a wraparound, then when the number of page spaces used by the current file is greater than 1, the first part of the file data of the current file is read from the Flash storage space, and the second part of the file data of the current file is read from the page cache space and returned, and the first part of the file data and the second file data construct the returned current file; When the number of page spaces is 1, the first non-rewinding data is read from the non-rewinding part of the page cache space, and the first rewinding data is read from the rewinding part of the page cache space. The first non-rewinding data and the first rewinding data construct the returned current file; when the number of page spaces used by the current file is greater than 1, the second non-rewinding data is read from the non-rewinding part of the Flash storage space; if the length of the rewinding part is greater than the data length of the page cache space, the second rewinding data is read from the second rewinding part of the Flash storage space, and the third rewinding data is read from the page cache space. The second non-rewinding data, the second rewinding data and the third rewinding data construct the returned current file; if the length of the rewinding part is equal to the data length of the page cache space, the fourth rewinding data is read from the page cache space. The second non-rewinding data and the fourth rewinding data are used to construct the returned current file.

[0093] In the embodiment of the present invention, the corresponding block space Flash Slice can be selected as the block space to be read according to the ID of the block space Slice. The block space to be read is scanned, and if the file size is 0, null is returned.

[0094] If the file size is not 0, the unwrapped bytes size (no page wrapping) and wrapped bytes size (page wrapping portion) of the file in the Flash Slice can be calculated based on the file's starting page number, byte number, and file length size.

[0095] If the unwrapped bytes size is equal to the file size size, there is no page wrapping in the Flash Slice block space.

[0096] At this time, if the number of pages used by the file is 1, all the data is in the page buffer space, and the file data is returned from the Byte No. at the beginning of the file in the Page Buffer.

[0097] If the file uses more than one page, the first portion of the file data is read from the Flash slice based on the file's starting page number and byte number. If the second portion of the file data is read, the second portion is returned from the Page Buffer. The first and second portion of the file data are used to construct the current file.

[0098] If the unwrapped bytes size is not equal to the file size, the file has page wrapping in the Flash slice.

[0099] At this point, if the number of pages used by the file is 1, all the data is in the page buffer. The first portion of data is the first non-wrapped data, which does not wrap around the page and is in the non-wrapped portion. The second portion of data is the first wrapping data, which is in the wrapping portion. At this point, if the first portion of data is read, the first non-wrapped data is returned from Byte 0, the starting byte of the file in the page buffer. If the second portion of data is read, the first wrapping data is returned from Byte 0, the starting byte of the page buffer.

[0100] If the number of Pages used by the file is greater than 1, if the first part of the file data (the second non-wrap data) is read, the second non-wrap data of the file is stored in a continuous page space Page in the block space Flash Slice. Since the second non-wrap data does not wrap around, the second non-wrap data of the file is returned from the block space Flash Slice based on the Page No and Byte No at the beginning of the file.

[0101] If the wrapped bytes size is greater than the data size stored in the page buffer, the second portion of the file's data (the second wrapped data) is located in the continuous page space Page of the wrapped portion of the Flash slice. Reading the second wrapped data returns this portion of the second wrapped data from Page 0, the starting page of the Flash slice. The third portion of the data (the third wrapped data) is located in the page buffer. Reading this portion of data returns this portion of the third wrapped data from Byte 0, the starting byte of the Page buffer. The second non-wrapped data, the second wrapped data, and the third wrapped data constitute the returned current file.

[0102] If the Wrapped Bytes Size is equal to the Data Size of the data stored in the Page Buffer, then all wrapped data is in the Page Buffer. If the second portion of data (the fourth wrapped data) is read, the fourth wrapped data of this portion is returned from Byte 0, the starting byte of the Page Buffer. The second non-wrapped data and the fourth wrapped data are used to construct the returned current file.

[0103] In this embodiment of the present invention, an End Marker-based Flash file system provides lightweight file system functionality within the very limited Flash space of wearable embedded devices. This includes page buffers and complete file read and write functions, meeting the application layer's file read and write needs. This eliminates the need to port a heavy, full-featured general-purpose Flash file system, nor does it require an external SD card or other storage device to provide additional storage space for file storage and access.

[0104] like Figure 3As shown, an embodiment of the present invention provides a file management device for an embedded device, the embedded device includes a Flash storage space and a page cache space, the basic storage unit of the Flash storage space is a page space, the low address space of the Flash storage space is used to store software running code, the high address space of the Flash storage space is used for a Flash file system, the page cache space is used for read and write cache of the Flash storage space, and the page cache space is associated with the page space of the Flash storage space. The file management device of the embedded device includes:

[0105] A first configuration module 301 is configured to pre-configure a plurality of block spaces in the high address space of the Flash storage space based on the page space of the Flash storage space and according to the storage requirements of the current file, wherein one block space includes at least one page space, and one block space is used to store one file;

[0106] A second configuration module 302 is configured to configure a Flash file system in the block space based on an end marker, where the end marker is used to mark the end of the current file;

[0107] The management module 303 is configured to manage the reading and writing of the current file through the Flash file system and the page cache space.

[0108] Optionally, the first configuration module 301 is further used to pre-allocate a block space corresponding to the configuration file and several block spaces corresponding to the current file in the Flash storage space, from high address space downward, according to the storage requirements of the configuration file and the current file.

[0109] Optionally, the second configuration module 302 is also used to configure the scanning rules of the Flash file system based on the end mark in the block space, and construct the Flash file system through the scanning rules. The preset scanning rules include: from the high address space downward, scanning the page space in each of the block spaces in turn, and judging whether the current file is scanned based on whether the end mark is scanned; if the current file is scanned, obtaining the file data of the scanned current file and reading it into the page cache space; if the current file is not scanned, determining the current file to be empty and the file length to be 0.

[0110] Optionally, the second configuration module 302 is also used to scan the block spaces one by one from the high address space downward; for each block space, start scanning from the starting page space of the block space until the ending page space of the block space is scanned; for the scanned page space, take the end mark as the scanning target, start scanning from the starting byte of the page space until the ending byte of the page space is scanned; by scanning the block space and the page space, determine the current page space used by the current file, and read all bytes of the current page space from the Flash storage space to the page cache space.

[0111] Optionally, the management module 303 is also used to copy the data to be written corresponding to the current file to the page cache space when performing write management on the current file; if the page cache space is full, erase the corresponding page space of the Flash storage space, and program the data in the page cache space into the corresponding page space of the Flash storage space; update the page cache space to the next page space of the corresponding page space, and read all bytes of the next page space from the Flash storage space to the page cache space, the corresponding page space and the next page space are continuous page spaces in the same block space; continue to write the remaining data of the data to be written into the page cache space, and the data of the remaining data that was last written into the page cache space is not programmed into the corresponding page space of the Flash storage space.

[0112] Optionally, the management module 303 is also used to, when performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end marker, use the number of used bytes corresponding to the page cache space as the page offset, set the byte corresponding to the end marker, and set the page cache space as dirty; update the length of the current file, and if the length of the current file is greater than the total available space of the block space, determine that the current file has wrapped; when it is determined that the current file has wrapped, recalculate and set the page space corresponding to the current file, and update the length of the current file to the total available space length of the block space minus 1; and recalculate the number of page spaces used to configure the block space based on the length of the current file.

[0113] Optionally, the management module 303 is also used to select the block space corresponding to the current file when reading the current file; calculate whether the current file wraps around in the block space based on the starting page space of the current file, the starting byte of the current file and the length of the current file; if there is no wrap-around, then when the number of page spaces used by the current file is 1, directly read the file data of the current file from the page cache space and return it; when the number of page spaces used by the current file is greater than 1, read the first part of the file data of the current file from the Flash storage space, and read the second file data of the current file from the page cache space and return it, and the first part of the file data and the second file data construct the returned current file; if there is a wrap-around, then when the number of page spaces used by the current file is 1, read the file data of the current file from the page cache space and return it. The first non-rewinding data is read from the non-rewinding part of the page cache space, and the first rewinding data is read from the rewinding part of the page cache space. The first non-rewinding data and the first rewinding data construct the returned current file; when the number of page spaces used by the current file is greater than 1, the second non-rewinding data is read from the non-rewinding part of the Flash storage space; if the length of the rewinding part is greater than the data length of the page cache space, the second rewinding data is read from the second rewinding part of the Flash storage space, and the third rewinding data is read from the page cache space. The second non-rewinding data, the second rewinding data and the third rewinding data construct the returned current file; if the length of the rewinding part is equal to the data length of the page cache space, the fourth rewinding data is read from the page cache space. The second non-rewinding data and the fourth rewinding data are used to construct the returned current file.

[0114] It should be noted that the file management apparatus for embedded devices provided in the embodiments of the present invention can be applied to devices such as smart bracelets and smart head displays that can perform the file management method for embedded devices.

[0115] The file management apparatus for embedded devices provided in the embodiment of the present invention can implement each process of the file management method for embedded devices in the above method embodiment and can achieve the same beneficial effects.

[0116] See also Figure 4 , Figure 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 4 As shown, the present invention includes: a memory 402, a processor 401, and a computer program for a file management method for an embedded device stored in the memory 402 and capable of running on the processor 401, wherein:

[0117] The processor 401 is configured to call the computer program stored in the memory 402 and execute the following steps:

[0118] Based on the page space of the Flash storage space and according to the storage requirements of the current file, pre-configuring a plurality of block spaces in the high address space of the Flash storage space, wherein one block space includes at least one page space, and one block space is used to store one file;

[0119] In the block space, a Flash file system is configured based on an end marker, where the end marker is used to mark the end of the current file;

[0120] The current file is read and written managed through the Flash file system and the page cache space.

[0121] Optionally, the page space based on the Flash storage space, performed by the processor 401, preconfiguring a plurality of block spaces in the high address space of the Flash storage space according to a storage requirement of a file includes:

[0122] In the Flash storage space, from the high address space downward, according to the storage requirements of the configuration file and the current file, a block space corresponding to the configuration file and several block spaces corresponding to the current file are pre-allocated in sequence.

[0123] Optionally, the configuring of the Flash file system based on the end flag in the block space performed by the processor 401 includes:

[0124] In the block space, a scanning rule of the Flash file system is configured based on the end flag, and the Flash file system is constructed according to the scanning rule. The preset scanning rule includes:

[0125] Scanning the page spaces in each of the block spaces in sequence from a high address space downwards, and determining whether a current file has been scanned based on whether the end mark has been scanned;

[0126] If the current file is scanned, the file data of the scanned current file is obtained and read into the page cache space;

[0127] If the current file is not scanned, the current file is determined to be empty and the file length is determined to be 0.

[0128] Optionally, the scanning of the page spaces in each of the block spaces in sequence from the high address space downward by the processor 401, and determining whether the current file is scanned based on whether the end mark is scanned includes:

[0129] Scan the block spaces one by one from the high address space downwards;

[0130] For each block space, scanning starts from the start page space of the block space until the end page space of the block space is scanned;

[0131] For the scanned page space, taking the end mark as a scanning target, scanning from the start byte of the page space until the end byte of the page space is scanned;

[0132] The current page space used by the current file is determined by scanning the block space and the page space, and all bytes of the current page space are read from the Flash storage space to the page cache space.

[0133] Optionally, the performing of read and write management on the file by using the Flash file system and the page cache space performed by the processor 401 includes:

[0134] When performing write management on the current file, copying the to-be-written data corresponding to the current file to the page cache space;

[0135] If the page cache space is full, erasing the corresponding page space of the Flash storage space, and programming the data in the page cache space into the corresponding page space of the Flash storage space;

[0136] Updating the page cache space to a next page space of the corresponding page space, and reading all bytes of the next page space from the Flash storage space to the page cache space, wherein the corresponding page space and the next page space are continuous page spaces in the same block space;

[0137] The remaining data of the data to be written continues to be written into the page cache space, and the data of the remaining data that was last written into the page cache space is not programmed into the corresponding page space of the Flash storage space.

[0138] Optionally, the performing of read and write management on the current file by using the Flash file system and the page cache space performed by the processor 401 further includes:

[0139] When performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end marker, the number of used bytes corresponding to the page cache space is used as the page offset, the byte corresponding to the end marker is set, and the page cache space is set to dirty;

[0140] updating the length of the current file, and if the length of the current file is greater than the total available space of the block space, determining that the current file wraps;

[0141] If it is determined that the current file has wrapped, recalculate and set the page space corresponding to the current file, and update the length of the current file to the total available space length of the block space minus 1;

[0142] The amount of page space used to configure the block space is recalculated according to the length of the current file.

[0143] Optionally, the performing of read and write management on the current file by using the Flash file system and the page cache space performed by the processor 401 further includes:

[0144] When performing read management on the current file, selecting a block space corresponding to the current file;

[0145] Calculate whether the current file wraps around in the block space according to the starting page space of the current file, the starting byte of the current file, and the length of the current file;

[0146] If there is no wraparound, when the number of page spaces used by the current file is 1, the file data of the current file is directly read from the page cache space and returned;

[0147] When the number of page spaces used by the current file is greater than 1, a first portion of file data of the current file is read from the Flash storage space, and a second portion of file data of the current file is read from the page cache space and returned, and the first portion of file data and the second portion of file data are used to construct the returned current file;

[0148] If wraparound exists, when the number of page spaces used by the current file is 1, first non-wrapped data is read from the non-wrapped portion of the page cache space, and first wrapped data is read from the wrapped portion of the page cache space, and the first non-wrapped data and the first wrapped data are used to construct the returned current file;

[0149] When the number of page spaces used by the current file is greater than 1, reading second non-wrap data from a non-wrap portion of the Flash storage space;

[0150] If the length of the wraparound portion is greater than the data length of the page cache space, second wraparound data is read from the second wraparound portion of the Flash storage space, and third wraparound data is read from the page cache space, and the second non-wrapped data, the second wraparound data, and the third wraparound data are used to construct the returned current file;

[0151] If the length of the wraparound portion is equal to the data length of the page cache space, the fourth wraparound data is read from the page cache space, and the second non-wrapped data and the fourth wraparound data are used to construct the returned current file.

[0152] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to devices such as smart bracelets and smart head displays that can perform the file management method of embedded devices.

[0153] The electronic device provided by the embodiment of the present invention can implement each process implemented by the file management method for an embedded device in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, no further details will be given here.

[0154] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the various processes of the file management method for an embedded device provided in an embodiment of the present invention and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0155] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware using a computer program. The computer program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The computer-readable storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0156] The above disclosure is merely a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A file management method for an embedded device, characterized in that: The embedded device includes a Flash storage space and a page cache space, wherein the basic storage unit of the Flash storage space is a page space, the low address space of the Flash storage space is used to store software running code, the high address space of the Flash storage space is used for a Flash file system, and the page cache space is used for read and write cache of the Flash storage space. The page cache space is associated with the page space of the Flash storage space, and the method includes the following steps: Based on the page space of the Flash storage space and according to the storage requirements of the current file, pre-configuring a plurality of block spaces in the high address space of the Flash storage space, wherein one block space includes at least one page space, and one block space is used to store one file; In the block space, a Flash file system is configured based on an end marker, where the end marker is used to mark the end of the current file; Performing read and write management on the current file through the Flash file system and the page cache space; The reading and writing management of the file through the Flash file system and the page cache space includes: When performing write management on the current file, copying the to-be-written data corresponding to the current file to the page cache space; If the page cache space is full, erasing the corresponding page space of the Flash storage space, and programming the data in the page cache space into the corresponding page space of the Flash storage space; Updating the page cache space to a next page space of the corresponding page space, and reading all bytes of the next page space from the Flash storage space to the page cache space, wherein the corresponding page space and the next page space are continuous page spaces in the same block space; Continue to write the remaining data of the data to be written into the page cache space, and the data of the remaining data that was last written into the page cache space is not programmed into the corresponding page space of the Flash storage space; The performing read and write management on the current file through the Flash file system and the page cache space further includes: When performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end marker, the number of used bytes corresponding to the page cache space is used as the page offset, the byte corresponding to the end marker is set, and the page cache space is set to dirty; updating the length of the current file, and if the length of the current file is greater than the total available space of the block space, determining that the current file wraps; If it is determined that the current file has wrapped, recalculate and set the page space corresponding to the current file, and update the length of the current file to the total available space length of the block space minus 1; The amount of page space used to configure the block space is recalculated according to the length of the current file.

2. The file management method for an embedded device according to claim 1, wherein: The page space based on the Flash storage space, pre-configuring a plurality of block spaces in the high address space of the Flash storage space according to the storage requirements of the file, includes: In the Flash storage space, from the high address space downward, according to the storage requirements of the configuration file and the current file, a block space corresponding to the configuration file and several block spaces corresponding to the current file are pre-allocated in sequence.

3. The file management method for an embedded device according to claim 2, wherein: Configuring the Flash file system based on the end marker in the block space includes: In the block space, a scanning rule of the Flash file system is configured based on the end flag, and the Flash file system is constructed according to the scanning rule. The scanning rule includes: Scanning the page spaces in each of the block spaces in sequence from a high address space downwards, and determining whether a current file has been scanned based on whether the end mark has been scanned; If the current file is scanned, the file data of the scanned current file is obtained and read into the page cache space; If the current file is not scanned, the current file is determined to be empty and the file length is determined to be 0.

4. The file management method for an embedded device according to claim 3, wherein: Scanning the page spaces in each of the block spaces in sequence from the high address space downward, and determining whether the current file is scanned based on whether the end mark is scanned includes: Scan the block spaces one by one from the high address space downwards; For each block space, scanning starts from the start page space of the block space until the end page space of the block space is scanned; For the scanned page space, taking the end mark as a scanning target, scanning from the start byte of the page space until the end byte of the page space is scanned; The current page space used by the current file is determined by scanning the block space and the page space, and all bytes of the current page space are read from the Flash storage space to the page cache space.

5. The file management method for an embedded device according to claim 4, wherein: The performing read and write management on the current file through the Flash file system and the page cache space further includes: When performing read management on the current file, selecting a block space corresponding to the current file; Calculate whether the current file wraps around in the block space according to the starting page space of the current file, the starting byte of the current file, and the length of the current file; If there is no wraparound, when the number of page spaces used by the current file is 1, the file data of the current file is directly read from the page cache space and returned; When the number of page spaces used by the current file is greater than 1, a first portion of file data of the current file is read from the Flash storage space, and a second portion of file data of the current file is read from the page cache space and returned, and the first portion of file data and the second portion of file data are used to construct the returned current file; If wraparound exists, when the number of page spaces used by the current file is 1, first non-wrapped data is read from the non-wrapped portion of the page cache space, and first wrapped data is read from the wrapped portion of the page cache space, and the first non-wrapped data and the first wrapped data are used to construct the returned current file; When the number of page spaces used by the current file is greater than 1, reading second non-wrap data from a non-wrap portion of the Flash storage space; If the length of the wraparound portion is greater than the data length of the page cache space, second wraparound data is read from the second wraparound portion of the Flash storage space, and third wraparound data is read from the page cache space, and the second non-wrapped data, the second wraparound data, and the third wraparound data are used to construct the returned current file; If the length of the wraparound portion is equal to the data length of the page cache space, the fourth wraparound data is read from the page cache space, and the second non-wrapped data and the fourth wraparound data are used to construct the returned current file.

6. A file management device for an embedded device, characterized in that: The embedded device includes a Flash storage space and a page cache space, wherein the basic storage unit of the Flash storage space is a page space, the low address space of the Flash storage space is used to store software running code, the high address space of the Flash storage space is used for a Flash file system, and the page cache space is used for read and write cache of the Flash storage space. The page cache space is associated with the page space of the Flash storage space, and the file management device of the embedded device includes: A first configuration module is configured to pre-configure a plurality of block spaces in a high address space of the Flash storage space based on the page space of the Flash storage space and according to storage requirements of a current file, wherein one block space includes at least one page space, and one block space is used to store one file; a second configuration module, configured to configure a Flash file system in the block space based on an end marker, where the end marker is used to mark the end of the current file; A management module is used to perform read and write management on the current file through the Flash file system and the page cache space. When performing write management on the current file, the data to be written corresponding to the current file is copied to the page cache space; if the page cache space is full, the corresponding page space of the Flash storage space is erased, and the data in the page cache space is programmed into the corresponding page space of the Flash storage space; the page cache space is updated to the next page space of the corresponding page space, and all bytes of the next page space are read from the Flash storage space to the page cache space, and the corresponding page space and the next page space are continuous page spaces in the same block space; the remaining data of the data to be written continues to be written to the page cache space, and the last time the remaining data was written to the page cache space The data in the space is not programmed into the corresponding page space of the Flash storage space; and, when performing write management on the current file, if the number of used bytes corresponding to the page cache space is not 0, or the starting byte corresponding to the page cache space is not the end mark, the number of used bytes corresponding to the page cache space is used as the page offset, the byte corresponding to the end mark is set, and the page cache space is set to dirty; the length of the current file is updated, and if the length of the current file is greater than the total available space of the block space, it is determined that the current file has wrapped; when it is determined that the current file has wrapped, the page space corresponding to the current file is recalculated and set, and the length of the current file is updated to the total available space length of the block space minus 1; according to the length of the current file, the number of page spaces used to configure the block space is recalculated.

7. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the file management method for an embedded device according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the file management method for an embedded device according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • NandFlash memory read-write method capable of guaranteeing service life balance

    CN106527969A

  • Embedded file system supporting multiple channels and control method thereof

    CN113792023A