Data storage method, device, equipment and storage medium

By introducing the distinction between approximate file directories and reused flash memory blocks in flash memory storage devices, combined with the adjustment of error detection codes, the problem of shortened lifespan of flash memory storage devices is solved, achieving longer service life and higher storage efficiency.

CN114442905BActive Publication Date: 2024-10-29HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011197034.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-31
Publication Date
2024-10-29
Estimated Expiration
2040-10-31

AI Technical Summary

Technical Problem

The erasability number of flash memory storage devices has decreased, resulting in the shortening of the life of flash memory cells with higher storage density. How to effectively improve the life of flash memory storage devices is an urgent problem that needs to be solved.

Method used

By introducing the distinction between normal flash memory blocks, reused flash memory blocks and bad flash memory blocks in electronic devices, and using the combination of approximate file directories and reused flash memory blocks, the impact of file storage in reused flash memory blocks on users is reduced, and the impact of flash memory blocks is improved. service life of the parts. Specific methods include determining the storage location of the file based on the data error rate of the file and the error rate threshold entered by the user, and optimizing the ratio of the number of reused flash memory blocks and bad flash memory blocks by adjusting the ability of the error detection code EDC.

Benefits of technology

It effectively improves the service life of flash memory storage devices, reduces the impact on users, and at the same time meets the file storage needs with low data accuracy requirements, extending the service life of flash memory storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114442905B_ABST
    Figure CN114442905B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data storage method, apparatus, device and storage medium. The method is applied to an electronic device, the flash memory device of the electronic device includes a normal flash memory block, a reused flash memory block and a bad flash memory block. The method includes: in response to a received file addition request to add a file to a file directory, obtaining a target file; if the file directory is a preset approximate file directory, adding an approximate file tag to the target file, and adding the target file to the approximate file directory, the approximate file directory is a file collection of files with a data error rate less than or equal to a third preset error rate; according to the approximate file tag, writing the target file to the reused flash memory block, therefore, the present application not only meets the user's requirements for file accuracy, but also improves the life of the flash memory device by adding the file to the approximate file directory and adding a tag to the file, and storing the tagged file in the reused flash memory block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to storage technology, and more particularly to a data storage method, device, equipment and storage medium. Background Art

[0002] There are many types of flash memory cells, such as single level cell (SLC), triple level cell (TLC), and quadruple level cell (QLC). As people's demand for storage capacity of electronic products increases, TLC and QLC with higher storage density are widely used in various electronic products, such as mobile phones and tablets.

[0003] On the one hand, the storage density of flash memory cells has been improved, while on the other hand, the erasability of flash memory cells has been reduced. For example, TLC has up to 8 level states, while SLC has 2 level states. Compared with SLC, TLC can tolerate lower voltage peak changes, resulting in a significant decrease in the erasability of TLC compared to SLC. The decrease in the erasability of flash memory cells with higher storage density shortens the life of flash memory storage devices.

[0004] Therefore, how to effectively improve the life of flash memory devices is one of the problems that urgently need to be solved in the field of storage technology. Summary of the invention

[0005] Embodiments of the present application provide a data storage method, apparatus, device, and storage medium to increase the life of a flash memory device.

[0006] In a first aspect, an embodiment of the present application provides a data storage method, which is applied to an electronic device, wherein the electronic device includes a flash memory device, and the flash memory device includes a normal flash memory block, a reused flash memory block, and a bad flash memory block. The normal flash memory block is a flash memory block with a data error rate less than a first preset error rate, the reused flash memory block is a flash memory block with a data error rate greater than or equal to the first preset error rate and less than a second preset error rate, and the bad flash memory block is a flash memory block with a data error rate greater than or equal to the second preset error rate. The method includes:

[0007] In response to a received file adding request for adding a file to a file directory, obtaining a target file;

[0008] If the file directory is a preset approximate file directory, add an approximate file tag to the target file, and add the target file to the approximate file directory, where the approximate file directory is a file collection of files whose data error rate is less than or equal to a third preset error rate, and the third preset error rate is less than or equal to the second preset error rate;

[0009] Based on the approximate file tags, the target file is written to the reused flash memory block.

[0010] The embodiment of the present application can store files added to the approximate file directory in the reused flash memory block. Through the combination of the approximate file directory and the reused flash memory block, it can not only reduce the impact of storing files in the reused flash memory block on the user, but also increase the service life of the flash memory storage device.

[0011] In some embodiments, the second predetermined error rate is related to an error detection capability of an error detection code (EDC) in the flash memory device.

[0012] In this embodiment, the third preset error rate of the approximate file directory is less than or equal to the second preset error rate, and the second preset error rate is related to the error detection capability of the error detection code EDC in the flash memory storage device. Therefore, the third preset error rate can not only meet user needs, but also take into account the error detection capability of the EDC in the flash memory storage device, thereby improving the rationality of the third preset error rate.

[0013] In some embodiments, before writing the target file into the reused flash memory block, the method further includes:

[0014] Get the data error rate of the target file;

[0015] Write the target file to the reused flash memory block based on the approximate file tag, including:

[0016] The target file is written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file.

[0017] The embodiment of the present application writes the target file into the reused flash memory block based on the approximate file tag and data error rate of the target file, which is conducive to storing the target file in a suitable reused flash memory block.

[0018] In some embodiments, the method further comprises:

[0019] In response to the received approximate file directory creation request, obtaining an error rate threshold input by a user;

[0020] According to the error rate threshold, an approximate file directory is created, and a third preset error rate is determined.

[0021] In the embodiment of the present application, an approximate file directory is created according to an error rate threshold input by a user, and a third preset error rate corresponding to the approximate file directory is determined, so that the approximate file directory can meet user needs.

[0022] Optionally, creating an approximate file directory according to an error rate threshold and determining a third preset error rate includes:

[0023] obtaining an error rate threshold configuration condition associated with a reused flash memory block;

[0024] If the error rate threshold input by the user meets the error rate threshold configuration condition, an approximate file directory is created, and the error rate threshold is determined to be a third preset error rate.

[0025] In an embodiment of the present application, the error rate threshold input by the user is restricted so that when the user configures the third preset error rate of the approximate file directory, it can meet the hardware conditions, thereby improving the feasibility of storing files in the approximate file directory in the reused flash memory block.

[0026] Optionally, obtaining an error rate threshold configuration condition associated with the reused flash memory block includes:

[0027] In the flash memory device, obtaining a second preset error rate;

[0028] If the error rate threshold input by the user meets the error rate threshold configuration condition, then creating an approximate file directory and determining the error rate threshold as a third preset error rate, including:

[0029] If the error rate threshold input by the user is less than or equal to the second preset error rate, an approximate file directory is created, and the error rate threshold is determined to be the third preset error rate.

[0030] In the embodiment of the present application, the error rate threshold configuration condition associated with the reused flash memory block is determined based on the second preset error rate related to the error detection capability of the error detection code EDC, thereby improving the rationality of the error rate threshold configuration condition.

[0031] In some embodiments, after creating the similar file directory, the method further includes:

[0032] According to the third preset error rate, in the flash memory device, the number of reused flash memory blocks and bad flash memory blocks is adjusted.

[0033] The embodiment of the present application adjusts the number of reused flash memory blocks and bad flash memory blocks according to the third preset error rate, thereby improving the rationality of the proportion of the number of reused flash memory blocks and bad flash memory blocks.

[0034] Optionally, the number of reused flash memory blocks and bad flash memory blocks is adjusted, including:

[0035] According to the third preset error rate, adjusting the error detection code EDC in the flash memory device;

[0036] According to the adjusted error detection code EDC, the number of reused flash memory blocks and bad flash memory blocks is adjusted in the flash memory storage device.

[0037] The embodiment of the present application adaptively adjusts the error detection capability of the error detection code EDC according to the third preset error rate, thereby improving the rationality of the error detection capability of the error detection code EDC. The number of reused flash memory blocks and bad flash memory blocks is adjusted according to the adjusted error detection code EDC, thereby improving the rationality of the proportion of the number of reused flash memory blocks and bad flash memory blocks.

[0038] Optionally, the number of reused flash memory blocks and bad flash memory blocks is adjusted, including:

[0039] Performing error rate detection on each flash memory block in the flash memory storage device through the adjusted error detection code EDC to obtain the data error rate of each flash memory block;

[0040] Update the second preset error rate according to the adjusted error detection code EDC

[0041] Determine a flash memory block whose data error rate is greater than or equal to a first preset error rate and less than an updated second preset error rate as a reused flash memory block;

[0042] A flash memory block having a data error rate greater than or equal to the updated second preset error rate is determined as a bad flash memory block.

[0043] In some embodiments, if the file directory is a preset similar file directory, adding a similar file tag to the target file and adding the target file to the similar file directory includes:

[0044] If the file directory is an approximate file directory, then check whether the target file meets the preset conditions;

[0045] If the target file meets the preset conditions, a similar file tag is added to the target file, and the target file is added to the similar file directory.

[0046] In the embodiment of the present application, an approximate file tag is added to the target file and the target file is added to the approximate file directory only when the target file meets the preset conditions, so as to avoid writing files that are not suitable for storage in the reused flash memory block into the reused flash memory block due to user error.

[0047] Optionally, the preset condition includes that a file in the similar file directory meets a preset file type. If the target file meets the preset condition, a similar file tag is added to the target file, and the target file is added to the similar file directory, including:

[0048] If the target file meets the preset file type, a similar file tag is added to the target file, and the target file is added to the similar file directory;

[0049] The method further comprises:

[0050] If the target file does not meet the preset file type, a reminder message is output, and the reminder message is used to remind the user that adding the target file to the approximate file directory fails.

[0051] Optionally, the file type includes uncompressed file.

[0052] The data storage method of the embodiment of the present application adds an approximate file tag to the target file added to the approximate file directory, writes the target file into the reused flash memory block according to the approximate file tag, and stores the target file in the reused flash memory block. Therefore, by adding files with low data accuracy requirements to the approximate file directory and marking them, the files with low data accuracy requirements can be stored in the reused flash memory block, which can reduce the impact of storing files in the reused flash memory block on users and increase the service life of the flash memory storage device.

[0053] In some embodiments, the files in the similar file directory are read-only files, thereby avoiding multiple write operations on the files in the reused storage blocks, which may increase the error rate of the files.

[0054] In a second aspect, an embodiment of the present application provides a data storage device, the device is applied to an electronic device, the electronic device includes a flash memory device, the flash memory device includes a normal flash memory block, a reused flash memory block and a bad flash memory block, the normal flash memory block is a flash memory block with a data error rate less than a first preset error rate, the reused flash memory block is a flash memory block with a data error rate greater than or equal to the first preset error rate and less than a second preset error rate, and the bad flash memory block is a flash memory block with a data error rate greater than or equal to the second preset error rate;

[0055] The device comprises:

[0056] An acquisition unit, configured to acquire a target file in response to a received file adding request for adding a file to a file directory;

[0057] an adding unit, configured to add an approximate file tag to a target file and add the target file to the approximate file directory if the file directory is a preset approximate file directory, wherein the approximate file directory is a file set of files whose data error rate is less than or equal to a third preset error rate;

[0058] The writing unit is used for writing the target file into the reused flash memory block according to the approximate file tag.

[0059] In some embodiments, the second predetermined error rate is related to an error detection capability of an error detection code (EDC) in the flash memory device.

[0060] In some embodiments, the acquisition unit is further configured to:

[0061] Get the data error rate of the target file;

[0062] The write unit is specifically used for:

[0063] The target file is written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file.

[0064] In some embodiments, the acquisition unit is further configured to:

[0065] In response to the received approximate file directory creation request, obtaining an error rate threshold input by a user;

[0066] The device also includes:

[0067] The creating unit is used to create an approximate file directory according to an error rate threshold input by a user, and determine a third preset error rate.

[0068] Optionally, create a unit, specifically for:

[0069] obtaining an error rate threshold configuration condition associated with a reused flash memory block;

[0070] If the error rate threshold input by the user meets the error rate threshold configuration condition, an approximate file directory is created, and the error rate threshold is determined to be a third preset error rate.

[0071] Optionally, create a unit, specifically for:

[0072] In the flash memory device, obtaining a second preset error rate;

[0073] If the error rate threshold input by the user is less than or equal to the second preset error rate, an approximate file directory is created, and the error rate threshold is determined to be a third preset error rate.

[0074] In some embodiments, the apparatus further comprises:

[0075] The flash memory management unit is used to adjust the number of reused flash memory blocks and bad flash memory blocks in the flash memory storage device according to a third preset error rate.

[0076] Optionally, a flash memory management unit is used to:

[0077] According to a third preset error rate, adjusting an error detection code EDC in the flash memory device;

[0078] According to the adjusted error detection code EDC, the number of reused flash memory blocks and bad flash memory blocks is adjusted in the flash memory storage device.

[0079] Optionally, a flash memory management unit is used to:

[0080] Performing error rate detection on each flash memory block in the flash memory storage device through the adjusted error detection code EDC to obtain the data error rate of each flash memory block;

[0081] Update the second preset error rate according to the adjusted error detection code EDC

[0082] Determine a flash memory block whose data error rate is greater than or equal to a first preset error rate and less than an updated second preset error rate as a reused flash memory block;

[0083] A flash memory block having a data error rate greater than or equal to the updated second preset error rate is determined as a bad flash memory block.

[0084] In some embodiments, the adding unit is specifically configured to:

[0085] If the file directory is an approximate file directory, then check whether the target file meets the preset conditions;

[0086] If the target file meets the preset conditions, a similar file tag is added to the target file, and the target file is added to the similar file directory.

[0087] Optionally, add units specifically for:

[0088] If the target file meets the preset file type, a similar file tag is added to the target file, and the target file is added to the similar file directory;

[0089] The device also includes:

[0090] The reminder unit is used to output a reminder message if the target file does not meet the preset file type, and the reminder message is used to remind the user that the addition of the target file to the approximate file directory fails.

[0091] Optionally, the file type includes uncompressed file.

[0092] Optionally, files in the similar file directory are read-only.

[0093] The beneficial effects of the data storage device provided by the second aspect and each possible implementation of the second aspect can be referred to the beneficial effects brought about by the first aspect and each possible implementation of the first aspect, and will not be elaborated here.

[0094] In a third aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored, wherein the computer program includes at least one section of code, and the at least one section of code can be executed by a computer to control the computer to execute the method described in the first aspect.

[0095] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect.

[0096] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0097] at least one processor;

[0098] a memory communicatively coupled to the at least one processor;

[0099] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the method described in the first aspect is executed.

[0100] In a sixth aspect, an embodiment of the present application provides a chip, including:

[0101] at least one processor;

[0102] a memory communicatively coupled to the at least one processor;

[0103] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the method described in the first aspect is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0104] Figure 1 A schematic diagram of the structure of an electronic device applicable to an embodiment of the present application;

[0105] Figure 2 An example diagram of the life cycle of a flash memory block is shown;

[0106] Figure 3 This is an example diagram of the life cycle of a flash memory block in an embodiment of the present application;

[0107] Figure 4 A schematic diagram of a data storage method provided in an embodiment of the present application;

[0108] Figure 5 An example diagram of an interface for adding a single target file to a folder provided in an embodiment of the present application;

[0109] Figure 6 An example diagram of an interface for adding multiple target files to a folder provided in an embodiment of the present application;

[0110] Figure 7 An example diagram of a process for adding a target file to an approximate file directory provided in an embodiment of the present application;

[0111] Figure 8An example diagram of an interface for adding a target file to an approximate file directory provided in an embodiment of the present application;

[0112] Fig. 9 An example diagram for storing files in an approximate file directory in a flash memory device UFS or EMMC provided in an embodiment of the present application;

[0113] Fig.10 An example diagram of an interface for a user to create an approximate file directory provided in an embodiment of the present application;

[0114] Fig.11 An example diagram of a configuration process for a third preset error rate of an approximate file directory provided in an embodiment of the present application;

[0115] Fig.12 An example diagram of performing data reading and writing in a flash memory device and adjusting EDC according to a third preset error rate provided in an embodiment of the present application;

[0116] Fig.13 An example of a virtual architecture of an electronic device involved in an embodiment of the present application;

[0117] Fig.14 A schematic diagram of the structure of a data storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0118] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0119] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, and B can also be determined based on A and / or other information. The term "plurality" in this article refers to two or more. The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previously associated objects are in an "or" relationship.

[0120] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings distinguish between identical or similar items with substantially identical functions and effects. Those skilled in the art will understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. do not necessarily limit the difference.

[0121] Figure 1 A schematic diagram of the structure of an electronic device applicable to this application is shown in FIG. Figure 1As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0122] The processor 110 may include one or more acquisition units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display acquisition unit (displayprocess unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different acquisition units may be independent devices or integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may save instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the electronic device 100 system.

[0123] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones and play audio through the headphones.

[0124] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0125] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device 100 through the power management module 141.

[0126] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0127] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0128] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier, etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0129] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0130] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0131] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and / or IR technology. The above-mentioned GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0132] The electronic device 100 can realize the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute instructions to generate or change display information.

[0133] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0134] The electronic device 100 can implement a shooting function through an ISP, one or more cameras 193, a video codec, a GPU, one or more display screens 194, and an application processor.

[0135] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0136] The DPU is also called a display sub-system (DSS). The DPU is used to adjust the color of the display screen 194. The DPU can adjust the color of the display screen through a three-dimensional lookup table (3D LUT). The DPU can also perform image scaling, noise reduction, contrast enhancement, backlight brightness management, HDR processing, and display parameter Gamma adjustment.

[0137] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, data files such as music, photos, and videos are stored in the external memory card.

[0138] The internal memory 121 can be used to store one or more computer programs, which include instructions. The processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running the above instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system; the program storage area can also store one or more applications (such as a gallery, contacts, etc.). The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. In some embodiments, the processor 110 can enable the electronic device 100 to perform various functional applications and data processing by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor 110. Optionally, the internal memory may include a memory and a disk.

[0139] The electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. For example, music playback, recording, etc. Among them, the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 are arranged in the processor 110. The speaker 170A, also known as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C with his mouth to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording functions, etc. The headphone jack 170D is used to connect wired headphones. The headphone jack 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0140] The sensor 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0141] Among them, the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0142] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation, somatosensory game scenes, etc.

[0143] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0144] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0145] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0146] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0147] The fingerprint sensor 180H (also called a fingerprint identifier) ​​is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc. In addition, other records about the fingerprint sensor can refer to the international patent application PCT / CN2017 / 082773 entitled "Method and electronic device for processing notifications", the entire content of which is incorporated by reference in this application.

[0148] The touch sensor 180K may also be referred to as a touch panel or a touch-sensitive surface. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 may form a touch screen, also referred to as a touch screen. The touch sensor 180K is used to detect a touch operation applied thereto or thereabout. The touch sensor may transmit the detected touch operation to an application processor to determine the type of touch event. Visual output related to the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, at a position different from that of the display screen 194.

[0149] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0150] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0151] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0152] To facilitate understanding of this application, the professional terms involved in this application are explained below:

[0153] Single Level Cell (SLC): Each storage cell stores 1 bit of data.

[0154] Multi-level cell (MLC): Each storage cell stores more than 2 bits of data. Among them, triple level cell (TLC) and quadruple level cell (QLC) are both MLC. TLC means that each storage cell stores 3 bits of data, and QLC means that each storage cell stores 4 bits of data. Bit is a unit of information, which can also be understood as a bit in binary data.

[0155] Among them, flash memory devices using SLC have fast storage speed and long service life, but high cost and small storage capacity. Compared with flash memory devices using SLC, flash memory devices using MLC have slow storage speed and short service life, but low cost and large storage capacity.

[0156] Error Correction Codes (ECC): An error correction algorithm developed from parity checking. Error correction codes add check bits after the original data (e.g., one byte or multiple bytes), determine the number and location of error bits in the original data through the original data and the check bits, and correct the error bits. The more check bits there are, the stronger the error correction capability of the error correction code.

[0157] Error Detection Codes (EDC): Cyclic Redundancy Code (CRC) is used to detect whether the data is wrong. Compared with ECC, EDC has stronger error detection capability, but cannot correct errors.

[0158] As the number of erasures of a flash memory block in a flash memory device increases, the number of error bits (i.e., bits) that appear will also increase. In the related art of managing flash memory blocks in flash memory devices, the error bits of the flash memory blocks are checked and corrected by ECC. When an error bit that cannot be corrected by ECC appears in at least one page in the flash memory block, the flash memory block is marked as a bad flash memory block. Limited by the error correction capability of ECC, even if there are only a small number of error bits that cannot be corrected on a flash memory block, it will still be marked as a bad flash memory block, and a reserved flash memory block will be used to replace the bad flash memory block. The life of flash memory devices, such as embedded multimedia cards (EMMC), universal flash storage (UFS), etc., mainly depends on the number of bad flash memory blocks. Since the number of reserved flash memory blocks is limited, when the number of bad flash memory blocks reaches a preset threshold, the life of the flash memory device ends.

[0159] like Figure 2 As shown, when the data error rate of the flash memory block (the data error rate of the flash memory block can be understood as the ratio of the number of error bits of the flash memory block to the total number of bits on the flash memory block) is small, the error bits can be detected and checked by ECC to obtain a normal flash memory block without errors. As the data error rate of the flash memory block increases, due to the limited error correction capability of ECC, error bits that cannot be corrected appear on the normal flash memory block (for example, when the data error rate is greater than or equal to a1, error bits that cannot be corrected appear on the normal flash memory block). In other words, for the flash memory block, ECC fails, and the normal flash memory block is marked as a bad flash memory block, and the bad flash memory block is replaced by a reserved flash memory block, and the bad flash memory block will no longer be used to store data.

[0160] Users have a certain error tolerance rate for data, such as some bad pixels in temporary images, the loss of several frames of images in short video playback, the loss of several decimal places in text data, etc. Based on this point, and in order to effectively improve the life of flash memory devices, the embodiments of the present application propose to reuse flash memory blocks between normal flash memory blocks and bad flash memory blocks, and use the reused flash memory blocks to store files in the approximate file directory. Therefore, the data that the user can tolerate errors can be put into the approximate file directory, and the files in the approximate file directory can be stored in the reused flash memory blocks. It not only improves the life of the flash memory device, but also does not affect the user's requirements for the accuracy of the file.

[0161] like Figure 3 As shown, when the data error rate of the flash memory block is small, the error bit detection and inspection can be performed through ECC to obtain a normal flash memory block without errors. As the data error rate of the flash memory block increases, due to the limited error correction capability of ECC, error bits that cannot be corrected appear on the normal flash memory block (for example, when the data error rate is greater than or equal to a1, error bits that cannot be corrected appear on the normal flash memory block). At this time, the error detection capability of EDC is stronger than that of ECC, and the flash memory block can be error-detected through EDC. If the ECC inspection of the normal flash memory block fails but the data error rate obtained by the EDC inspection is less than a2, the normal flash memory block is marked as a reused flash memory block. As the data error rate of the reused flash memory block increases, if EDC detects that the data error rate of the reused flash memory block is greater than or equal to a2, the reused flash memory block is marked as a bad flash memory block. The bad flash memory block will be replaced by a reserved flash memory block.

[0162] Wherein, a1 represents the first preset error rate, and a2 represents the second preset error rate. A normal flash memory block refers to a flash memory block whose data error rate is less than the first preset error rate, a reused flash memory block refers to a flash memory block whose data error rate is greater than or equal to the first preset error rate and less than the second preset error rate, and a bad flash memory block refers to a flash memory block whose data error rate is greater than or equal to the second preset error rate. The first preset error rate is determined by the error correction capability of the ECC, and the second preset error rate can be determined by the error detection capability of the EDC or can be set by the user.

[0163] It can be seen that compared with Figure 3 The following diagram shows an example of the life cycle of a flash memory block. Figure 4 The life cycle of the flash memory block shown is significantly longer, which can effectively increase the service life of the flash memory block, thereby increasing the service life of the flash memory device. In combination with the embodiment of the present application, the files in the similar file directory are stored in the reused flash memory block, which not only increases the life of the flash memory device, but also does not affect the user's accuracy requirements for the file.

[0164] Among them, the flash memory storage device applicable to the present application is an open flash memory storage device. For example, a flash memory storage device that integrates flash block management into the host side (Host side); for another example, a storage device that provides an open customizable flash translation layer, which can modify the storage device: open modification of address mapping algorithm, flash block management, verification algorithm configuration, garbage collection strategy (i.e., recycling of old data in flash blocks), etc.

[0165] The following specific embodiments are used to describe in detail the technical solutions of the embodiments of the present application and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0166] Figure 4 is a flowchart of a data storage method provided by an embodiment of the present application, the method is applied to Figure 1 In the electronic device 100 shown in FIG. 1 , the execution subject of the method may be a processor 110 in the electronic device 100, and the processor 110 executes the method to store the file in a flash memory device. Figure 4 As shown, the method comprises the following steps:

[0167] S401. In response to a received file adding request for adding a file to a file directory, a target file is acquired.

[0168] The file directory can be understood as a file collection for managing one or more files, such as a folder of an application layer of an electronic device. The operating system in the electronic device can manage one or more file directories of the application layer through a virtual file system (VFS), and send the file to the flash memory device through the file system (FS) to read or write the file from the flash memory device.

[0169] In this embodiment, when the electronic device receives a file adding request from a user or a third-party application to add a file to a file directory, it can obtain the target file to be added to the file directory from the file adding request. The type of the target file can be, for example, a document, an image, an audio, a video, etc.

[0170] Optionally, when an interface operation of dragging a file into a file directory is detected, or when a file copy instruction of copying a file into a file directory is detected, a file adding request to add a file into the file directory is triggered. For example, a user may drag a file into a folder on a display interface of an electronic device through an input device such as a mouse or a handle, or may drag a file into a folder on a display interface of an electronic device through a touch screen with a finger.

[0171] For example, Figure 5 This is an example diagram of a user dragging target file 1 into folder 1 by touching the screen with his finger. The user can long press target file 1 to move the position of target file 1. When the position of target file 1 reaches the position range of folder 1, a file addition request to add target file 1 to folder 1 is triggered.

[0172] There are one or more target files, and the user can add multiple target files to the file directory by triggering file adding requests for multiple target files.

[0173] For example, Figure 6 This is an example diagram of a user dragging multiple target files into folder 1 by touching the screen with a finger. For example, the user can drag multiple target files in folder 2, such as selected target file 1 and target file 3, into folder 1 by selecting all or part of the files in folder 2.

[0174] S402: If the file directory is a preset similar file directory, add a similar file tag to the target file, and add the target file to the similar file directory.

[0175] Among them, the approximate file directory is a file collection of files whose data error rate is less than or equal to the third preset error rate, which is used to manage files for which users do not have high requirements for file accuracy. In other words, it is used to store files whose data error rate is greater than or equal to 0 and less than or equal to the third preset error rate that users can tolerate. Therefore, users can put files that have no errors but can tolerate a data error rate less than or equal to the third preset error rate into the approximate file directory, and can also put files that have errors but have a data error rate less than or equal to the third preset error rate. The data error rate refers to the ratio of erroneous data to total data in a file, and the data error rate of a file can be detected by an error correction code ECC or an error detection code EDC. The third preset error rate can be a system default value of the electronic device, or a value set by the user.

[0176] In this embodiment, the file directory can be obtained from the file adding request, and whether the file directory is an approximate file directory is detected. If the file directory is determined to be an approximate file directory, an approximate file tag is added to the target file, and the target file is added to the approximate file directory, otherwise the target file is written to the normal flash memory block. The approximate file tag can be added to the file attribute information of the target file, for example, the approximate file tag can be Approx_tag, and each file in the approximate file directory is marked with Approx_tag. Therefore, the user can explicitly mark the files that the user can tolerate a certain error rate by adding the file to the approximate file directory.

[0177] There may be one or more approximate file directories. When there are multiple approximate file directories, different approximate file directories may correspond to different third preset error rates, which are used to manage files with different file accuracy requirements of the user; and / or, different approximate file directories may correspond to different file types, which are used to manage different types of files with low file accuracy requirements of the user. For example, the file type corresponding to approximate file directory A is image, which is used to manage image files with low file accuracy requirements of the user, and the file type corresponding to approximate file directory B is video, which is used to manage video files with low file accuracy requirements of the user. Optionally, the approximate file directory may also correspond to a preset error rate range, which is used to manage a file collection of files whose data error rates meet the error rate range.

[0178] Optionally, if the file directory is an approximate file directory, a reminder message may be output to remind the user that some errors may occur in the target file after it is placed in the approximate file directory. After receiving the user's confirmed placement instruction, the target file is added to the approximate file directory.

[0179] Optionally, the files in the similar file directory are read-only files to avoid multiple updates to the files in the similar file directory after writing to the reused flash memory block, which aggravates the data error rate of the reused flash memory block and the data error rate of the files in the similar file directory. After determining that the file directory is a similar file directory, a reminder message can be output to remind the user that the target file is a read-only file after being placed in the similar file directory, to avoid the target file being converted to a read-only file without the user's knowledge.

[0180] Optionally, if the file directory is an approximate file directory, it is detected whether the target file meets the preset condition. If so, an approximate file tag is added to the target file, and the target file is added to the approximate file directory. The preset condition may be a requirement for the data error rate of the target file, and it is detected whether the data error rate of the target file meets the third preset error rate of the approximate file target. If the data error rate of the target file is greater than the third preset error rate of the approximate file directory, it is determined that the target file does not meet the preset condition, otherwise it is determined that the target file meets the preset condition. Alternatively, the preset condition may be a requirement for the file type of the target file, and it is detected whether the file type of the target file meets the preset file type. If so, it is determined that the target file meets the preset condition, otherwise it is determined that the target file does not meet the preset condition.

[0181] Optionally, the default file type is a non-compressed file. Since the quality of a compressed file will be seriously affected if important data is wrong, only non-compressed files are allowed to be placed in the approximate file directory to ensure file quality.

[0182] As an example, Figure 7 The following is an example of the process of adding the target file to the approximate file directory. Figure 7 In the process, the user drags the target file to the approximate file directory, at which time the third preset error rate of the approximate file directory can be obtained and the user can be reminded whether to agree; if the user agrees to the third preset error rate, the user is reminded that the target file is a read-only file after being placed in the approximate file directory and the user is confirmed whether to agree; if the user agrees that the target file is converted to a read-only file, it is determined whether the file type of the target file meets the preset conditions. If it does, the target file is added to the approximate file directory and an approximate file tag is added to the target file. If the user disagrees with the above process or the file type of the target file does not meet the preset conditions, the operation of placing the target file in the approximate file directory is terminated. The above reminder processes can be interchanged.

[0183] As an example, Figure 8 The following is an example of the interface where the target file is added to the approximate file directory. Figure 8As shown, when it is detected that the user drags the target file to the approximate file directory - folder 1, a pop-up box is used to remind the user that the upper limit of the data error rate of folder 1 (the third preset error rate) is 10%, and whether the user agrees is determined. If the user agrees, a pop-up box is used to remind the user that the target file will be converted into a read-only file after being placed in folder 1, and whether the user agrees is determined. The user can enter a feedback message of agreement or disagreement through two virtual keys "yes" and "no". If the user agrees, it continues to insist whether the file type of the target file meets the requirements. If not, the user is reminded that the file placement fails, and the user is informed to place the file in a non-compressed format.

[0184] S403: Write the target file into the reused flash memory block according to the similar file tag.

[0185] Among them, the read and write requests (Input / Output requests, I / O requests) of the target file carry the approximate file tag.

[0186] In this embodiment, after adding the target file to the approximate file directory, the operating system of the electronic device will send a write request for the target file to the flash memory device through the virtual file system and the file system, and the write request for the target file includes the approximate file tag of the target file. The management module of the flash memory device detects whether the write request for the target file carries the approximate file tag. If so, the target file is written to the reused flash memory block, otherwise, the target file is written to the normal flash memory block. Therefore, the target file that the user does not require high file accuracy is written to the reused flash memory block, which not only meets the user's requirements for file accuracy, but also improves the service life of the flash memory device.

[0187] Optionally, before writing the target file into the reused flash memory block, the data error rate of the target file may be obtained, and the target file may be written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file. The management module of the flash memory storage device determines that the target file is stored in the reused flash memory block according to the approximate file tag of the target file, and then selects a reused flash memory block that meets the data error rate from a plurality of reused flash memory blocks according to the data error rate of the target file, for example, a reused flash memory block whose data error rate is lower than the data error rate of the target file is selected.

[0188] As an example, Fig. 9An example diagram of storing files in an approximate file directory to a flash storage device UFS or EMMC. The operating system obtains files (such as images, videos, and other files) in the approximate file directory of the application layer and generates an I / O request for the file. The I / O request carries the approximate file label and the data error rate of the file. The write request is passed through the I / O (write / read) stack in the operating system, passing through the virtual file system, file system, general block layer, I / O scheduling layer, block device driver layer, and reaches UFS or EMMC. The I / O request of each layer inherits the approximate file label and the data error rate of the file. Finally, the files in the approximate file directory are written to UFS or EMMC.

[0189] For the block management module or the block device driver layer, if the received I / O request does not carry the approximate file tag, the file corresponding to the I / O request is written into a normal flash memory block.

[0190] In this embodiment, at the storage layer, the characteristic that the error detection capability of EDC is stronger than that of ECC is utilized, and the flash memory device includes normal flash blocks, reused flash blocks and bad flash blocks, wherein the bad flash blocks no longer store data, and when the error rate of the reused blocks exceeds the second preset error rate, they are marked as bad flash blocks, and if there are reserved flash blocks in the flash memory device, the bad flash blocks are replaced by the reserved flash blocks. At the application layer, the approximate file directory is used to store files with an error rate lower than the third preset error rate, and the user can write the approximate files to the reused flash blocks by putting the files that can tolerate errors into the approximate file directory. When writing the files of the application layer to the storage layer, the approximate file tag is added to the I / O request of the file, so that the block management module can write the files carrying the approximate file tag to the reuse layer.

[0191] Therefore, this embodiment combines improvements in both the storage layer and the application layer, and by adding approximate file tags to the I / O requests for files, it not only improves the efficiency and accuracy of writing files to the reuse layer, but also effectively improves the service life of the storage device while taking into account the user's requirements for file accuracy.

[0192] In some embodiments, the approximate file directory is created in advance. In the process of creating the approximate file directory, a possible implementation method includes: in response to a received approximate file directory creation request, obtaining an error rate threshold input by a user, creating the approximate file directory according to the error rate threshold input by the user, and determining a third preset error rate for the approximate file directory.

[0193] In this embodiment, a request for creating an approximate file directory sent by a user can be received. For example, the user can input the request for creating an approximate file directory through an input device such as a mouse or keyboard, or through a touch screen. In response to the request for creating an approximate file directory input by the user, the user can be reminded to set a third preset error rate for the approximate file directory to be created. The error rate threshold input by the user is received, and it is detected whether the error rate threshold meets the error rate threshold configuration condition associated with the reused flash memory block. If it meets, the error rate threshold input by the user is determined as the third preset error rate of the approximate file directory to be created, and the approximate file directory is created. Otherwise, the user is reminded that the error rate threshold is inappropriate and the user is reminded to re-enter the error rate threshold. Therefore, the user can set the third preset error rate of the approximate file directory according to his or her tolerance for the error rate of the file, and the third preset error rate set by the user for the approximate file directory must meet the actual situation of the reused flash memory block to improve the rationality of the creation of the approximate file directory.

[0194] Optionally, the error rate threshold configuration condition associated with the reused flash memory block is a second preset error rate, that is, the maximum error rate that can be detected by the EDC in the flash memory device. If the error rate threshold input by the user is less than or equal to the second preset error rate, an approximate file directory is created and the error rate threshold input by the user is determined as a third preset error rate. Therefore, when configuring the third preset error rate of the approximate file directory, the user needs to consider both the requirements for the approximate file directory and the error detection capability of the EDC in the underlying flash memory device to improve the applicability of the approximate file directory.

[0195] As an example, Fig.10 This is an example of an interface for creating an approximate file directory for the user. Fig.10 As shown, the user can trigger a request to create a similar file directory by clicking the folder creation button 1001 on the right side of the screen on the folder management page, where folder 1 and folder 2 can be similar file directories that have been created. After receiving the request to create a similar file directory, similar file directories that have not been successfully created can be displayed on the interface (in Fig.10 ) and can be opened through Fig.10 In the form of a pop-up box, the user is reminded to enter an error rate threshold, and the third preset error rate of the newly created folder is set according to the error rate threshold entered by the user.

[0196] In some embodiments, after the error rate threshold input by the user is determined to be a third preset error rate of the approximate file directory, the number of reused flash memory blocks and bad flash memory blocks is adjusted in the flash memory storage device according to the third threshold error rate.

[0197] In this embodiment, the data error rate of the reused flash memory block is greater than or equal to the first preset error rate and less than the second preset error rate. The second preset error rate is determined by the error detection capability of the EDC. In other words, the second preset error rate is the maximum error rate that can be detected by the current EDC in the flash memory storage device. Since the reused flash memory block is used to store files in the approximate file directory, if the second preset error rate far exceeds the third threshold error rate, it means that the performance of the EDC is excessive. In order to reduce the overhead of the EDC, such as the EDC encoding overhead and space overhead, the EDC can be adjusted according to the third preset error rate, for example, the number of bits of the CRC code of the EDC is reduced. Then, according to the adjusted EDC, the number of reused flash memory blocks and bad flash memory blocks in the flash memory storage device is adjusted.

[0198] In this embodiment, in the process of adjusting the number of reused flash memory blocks and bad flash memory blocks in the flash memory device according to the adjusted EDC, the error rate of each flash memory block in the flash memory device can be detected by the adjusted EDC to obtain the data error rate of each flash memory block, and the second preset error rate is updated according to the adjusted EDC. Flash memory blocks with a data error rate greater than or equal to the first preset error rate and less than the updated second preset error rate are determined as reused flash memory blocks, and flash memory blocks with a data error rate greater than or equal to the updated second preset error rate are determined as bad flash memory blocks. Therefore, the reused flash memory blocks and bad flash memory blocks are adjusted according to the third preset error rate of the approximate file directory, so as to improve the coordination effect between the application layer and the storage layer, and save the cost of the storage device while improving the life of the flash memory device.

[0199] In the process of updating the second preset error rate according to the adjusted EDC, the maximum error rate that can be detected by the adjusted EDC can be obtained, and the maximum error rate is determined as the second preset error rate.

[0200] Optionally, since the third preset error rate of the approximate file directory involves the adjustment of the reused flash memory blocks and the bad flash memory blocks, before creating the approximate file directory, the flash memory device may be initialized, for example, the ECC and EDC in the flash memory device may be initialized, and according to the initialized ECC and EDC, normal flash memory blocks, reused flash memory blocks, and bad flash memory blocks may be configured in the flash memory device. After the flash memory device is initialized, the approximate file directory is created, and according to the third preset error rate of the approximate file directory, the number of reused flash memory blocks and bad flash memory blocks may be adjusted.

[0201] As an example, Fig.11 The following is an example diagram of the configuration process of the third preset error rate of the approximate file directory. Fig.11As shown, the flash memory device is initialized first, and then the approximate file directory is created. The maximum error rate that can be detected by the EDC in the flash memory device is obtained, and the user inputs the error rate threshold according to the maximum error rate. According to whether the error rate threshold configured by the user exceeds the maximum error rate, it is determined whether the error rate threshold configured by the user exceeds the capacity of the EDC. If it exceeds, continue to jump to the step where the user inputs the error rate threshold, otherwise the configuration is successful (that is, the error rate threshold input by the user is configured as the third preset error rate of the approximate file directory). After the reconfiguration is successful, the error rate threshold is sent to the management module of the flash memory device, and the management module of the flash memory device adjusts the number of reused flash memory blocks and bad flash memory blocks according to the error rate threshold.

[0202] As an example, Fig.12 1 is an example diagram of reading and writing data in a flash memory device and adjusting the EDC according to a third preset error rate. Fig.12 As shown, the flash block management represents a management module of the flash memory device, which determines whether the I / O request carries an approximate file tag when receiving an I / O request, and if so, writes the file to the reused flash block, or reads the file from the reused flash block. When the flash block management receives the third preset error rate of the approximate file directory, it adjusts the EDC algorithm according to the third preset error rate, and then adjusts the reused flash block and the bad flash block according to the adjusted EDC algorithm. In some embodiments, when writing the target file to the reused flash block, if there is insufficient space in the reused flash block in the flash memory device, the target file is written to the normal flash block, which can ensure the storage of the target file.

[0203] In some embodiments, when managing normal flash memory blocks, reused flash memory blocks, and bad flash memory blocks, if the space of normal flash memory blocks is insufficient and there are free approximate flash memory blocks, reserved flash memory blocks are used to replace the approximate flash memory blocks. The adopted reserved flash memory blocks are used as normal flash memory blocks for data storage, and the replaced approximate flash memory blocks can be used as reserved flash memory blocks or marked as bad flash blocks, thereby orderly managing normal flash memory blocks, reused flash memory blocks, and bad flash memory blocks.

[0204] As an example, Fig.13 This is an example of a virtual architecture of an electronic device involved in the embodiment of this application. Fig.13As shown, the embodiment of the present application involves a user interface system, an operating system, and a storage device controller system. The user creates a file directory and adds files on the user interface system. The approximate file management module creates an approximate file directory and adds files to the approximate file directory according to these user operations, and transmits the third preset error rate of the approximate file directory and the approximate file tag of the file to the flash memory block management module of the storage device controller system through the approximate tag transmission module of the operating system. The flash memory block management module can manage normal flash memory blocks, reused flash memory blocks, and bad flash memory blocks, and can also write files with unused similar tags into the reused flash memory blocks, and adjust the reused flash memory blocks and bad flash memory blocks according to the third preset error rate of the approximate file directory. For details, please refer to the aforementioned method embodiments.

[0205] An embodiment of the present application provides a computer storage medium, on which a computer program is stored. The computer program includes at least one section of code, and the at least one section of code can be executed by a computer to control the computer to execute the method described in any of the above embodiments.

[0206] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method described in any of the above embodiments.

[0207] Fig.14 A structural diagram of a data storage device provided in an embodiment of the present application is applied to an electronic device, the electronic device includes a flash memory device, the flash memory device includes a normal flash memory block, a reused flash memory block and a bad flash memory block, a normal flash memory block is a flash memory block with a data error rate less than a first preset error rate, a reused flash memory block is a flash memory block with a data error rate greater than or equal to the first preset error rate and less than a second preset error rate, and a bad flash memory block is a flash memory block with a data error rate greater than or equal to the second preset error rate. Fig.14 As shown, the data storage device of this embodiment may include: an acquisition unit 1401 , an adding unit 1402 , and a writing unit 1403 .

[0208] An acquiring unit 1401 is configured to acquire a target file in response to a received file adding request for adding a file to a file directory;

[0209] An adding unit 1402 is configured to add an approximate file tag to a target file and add the target file to the approximate file directory if the file directory is a preset approximate file directory, where the approximate file directory is a file set of files whose data error rate is less than or equal to a third preset error rate, where the third preset error rate is less than or equal to a second preset error rate;

[0210] The writing unit 1403 is used to write the target file into the reused flash memory block according to the similar file tag.

[0211] In some embodiments, the second predetermined error rate is related to an error detection capability of an EDC in the flash memory device.

[0212] In some embodiments, the acquisition unit 1401 is further configured to:

[0213] Get the data error rate of the target file;

[0214] The writing unit 1403 is specifically used for:

[0215] The target file is written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file.

[0216] In some embodiments, the acquisition unit 1401 is further configured to:

[0217] In response to the received approximate file directory creation request, obtaining an error rate threshold input by a user;

[0218] The data storage device further comprises:

[0219] The creating unit 1404 is configured to create an approximate file directory according to an error rate threshold input by a user, and determine a third preset error rate.

[0220] Optionally, the creating unit 1404 is specifically configured to:

[0221] obtaining an error rate threshold configuration condition associated with a reused flash memory block;

[0222] If the error rate threshold input by the user meets the error rate threshold configuration condition, an approximate file directory is created, and the error rate threshold is determined to be a third preset error rate.

[0223] Optionally, the creation unit 1404 is specifically configured to:

[0224] In the flash memory device, obtaining a second preset error rate;

[0225] If the error rate threshold input by the user is less than or equal to the second preset error rate, an approximate file directory is created, and the error rate threshold is determined to be a third preset error rate.

[0226] In some embodiments, the data storage device further comprises:

[0227] The flash memory management unit 1405 is used to adjust the number of reused flash memory blocks and bad flash memory blocks in the flash memory storage device according to a third preset error rate.

[0228] Optionally, the flash memory management unit 1405 is specifically configured to:

[0229] According to a third preset error rate, adjusting an error detection code EDC in the flash memory device;

[0230] According to the adjusted error detection code EDC, the number of reused flash memory blocks and bad flash memory blocks is adjusted in the flash memory storage device.

[0231] Optionally, the flash memory management unit 1405 is specifically configured to:

[0232] Performing error rate detection on each flash memory block in the flash memory storage device through the adjusted error detection code EDC to obtain the data error rate of each flash memory block;

[0233] Update the second preset error rate according to the adjusted error detection code EDC

[0234] Determine a flash memory block whose data error rate is greater than or equal to a first preset error rate and less than an updated second preset error rate as a reused flash memory block;

[0235] A flash memory block having a data error rate greater than or equal to the updated second preset error rate is determined as a bad flash memory block.

[0236] In some embodiments, the adding unit 1402 is specifically configured to:

[0237] If the file directory is an approximate file directory, then check whether the target file meets the preset conditions;

[0238] If the target file meets the preset conditions, a similar file tag is added to the target file, and the target file is added to the similar file directory.

[0239] Optionally, an adding unit 1402 is specifically configured to:

[0240] If the target file meets the preset file type, a similar file tag is added to the target file, and the target file is added to the similar file directory;

[0241] The data storage device further comprises:

[0242] The reminder unit is used to output a reminder message if the target file does not meet the preset file type, and the reminder message is used to remind the user that the addition of the target file to the approximate file directory fails.

[0243] Optionally, the file type includes uncompressed file.

[0244] Optionally, files in the similar file directory are read-only.

[0245] The data storage device described above in this embodiment can be used to execute the technical solution in any of the above method embodiments, and its implementation principles and technical effects are similar. The functions of each module can refer to the corresponding description in the method embodiment and will not be repeated here.

[0246] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional modules in the embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0247] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0248] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

Claims

1. A data storage method, characterized in that: The method is applied to an electronic device, wherein the electronic device comprises a flash memory device, wherein the flash memory device comprises a normal flash memory block, a reused flash memory block and a bad flash memory block, wherein the normal flash memory block is a flash memory block having a data error rate less than a first preset error rate, the reused flash memory block is a flash memory block having a data error rate greater than or equal to the first preset error rate and less than a second preset error rate, and the bad flash memory block is a flash memory block having a data error rate greater than or equal to the second preset error rate; The method comprises: In response to a received file adding request for adding a file to a file directory, obtaining a target file; If the file directory is a preset approximate file directory, adding an approximate file tag to the target file, and adding the target file to the approximate file directory, the approximate file directory is a file set of files whose data error rate is less than or equal to a third preset error rate, and the third preset error rate is less than or equal to the second preset error rate; Writing the target file into the reused flash memory block according to the approximate file tag; The method further comprises: In response to the received approximate file directory creation request, obtaining an error rate threshold input by a user; According to the error rate threshold, the approximate file directory is created, and the third preset error rate is determined.

2. The method according to claim 1, characterized in that The second preset error rate is related to the error detection capability of an error detection code EDC in the flash memory device.

3. The method according to claim 1 or 2, characterized in that: Before writing the target file into the reused flash memory block, the method further comprises: Obtaining a data error rate of the target file; The step of writing the target file into the reused flash memory block according to the approximate file tag comprises: The target file is written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file.

4. The method according to claim 1, characterized in that: The step of creating the approximate file directory and determining the third preset error rate according to the error rate threshold comprises: Obtaining an error rate threshold configuration condition associated with the reused flash memory block; If the error rate threshold input by the user meets the error rate threshold configuration condition, the approximate file directory is created, and the error rate threshold is determined as the third preset error rate.

5. The method according to claim 4, characterized in that The obtaining of an error rate threshold configuration condition associated with the reused flash memory block comprises: In the flash memory device, obtaining the second preset error rate; If the error rate threshold input by the user meets the error rate threshold configuration condition, creating the approximate file directory and determining the error rate threshold as the third preset error rate, comprises: If the error rate threshold input by the user is less than or equal to the second preset error rate, the approximate file directory is created, and the error rate threshold is determined to be the third preset error rate.

6. The method according to claim 1, characterized in that After creating the similar file directory, the method further includes: According to the third preset error rate, in the flash memory device, the number of the reused flash memory blocks and the bad flash memory blocks is adjusted.

7. The method according to claim 6, characterized in that The step of adjusting the number of the reused flash memory blocks and the bad flash memory blocks comprises: According to the third preset error rate, adjusting an error detection code EDC in the flash memory device; According to the adjusted error detection code EDC, in the flash memory device, the number of the reused flash memory blocks and the bad flash memory blocks is adjusted.

8. The method according to claim 7, characterized in that The step of adjusting the number of the reused flash memory blocks and the bad flash memory blocks comprises: Performing error rate detection on each flash memory block in the flash memory storage device by using the adjusted error detection code EDC to obtain a data error rate of each flash memory block; updating the second preset error rate according to the adjusted error detection code EDC; Determine a flash memory block whose data error rate is greater than or equal to the first preset error rate and less than the updated second preset error rate as the reused flash memory block; A flash memory block having a data error rate greater than or equal to the updated second preset error rate is determined as the bad flash memory block.

9. The method according to claim 1, characterized in that: If the file directory is a preset approximate file directory, adding an approximate file tag to the target file and adding the target file to the approximate file directory includes: If the file directory is the approximate file directory, detecting whether the target file meets a preset condition; If the target file meets the preset condition, a similar file tag is added to the target file, and the target file is added to the similar file directory.

10. The method according to claim 9, characterized in that The preset condition includes that the files in the similar file directory meet the preset file type, and if the target file meets the preset condition, adding a similar file tag to the target file and adding the target file to the similar file directory includes: If the target file meets the preset file type, adding a similar file tag to the target file, and adding the target file to the similar file directory; The method further comprises: If the target file does not meet the preset file type, a reminder message is output, where the reminder message is used to remind the user that adding the target file to the similar file directory fails.

11. The method according to claim 10, characterized in that The file types include uncompressed files.

12. The method according to any one of claims 1, 2, 4-11, characterized in that: The files in the approximate file directory are read-only files.

13. A data storage device, characterized in that: The device is applied to an electronic device, the electronic device includes a flash memory device, the flash memory device includes a normal flash memory block, a reused flash memory block and a bad flash memory block, the normal flash memory block is a flash memory block with a data error rate less than a first preset error rate, the reused flash memory block is a flash memory block with a data error rate greater than or equal to the first preset error rate and less than a second preset error rate, and the bad flash memory block is a flash memory block with a data error rate greater than or equal to the second preset error rate; The device comprises: An acquisition unit, configured to acquire a target file in response to a received file adding request for adding a file to a file directory; an adding unit, configured to add an approximate file tag to the target file and add the target file to the approximate file directory if the file directory is a preset approximate file directory, wherein the approximate file directory is a file set of files whose data error rate is less than or equal to a third preset error rate, and the third preset error rate is less than or equal to the second preset error rate; a writing unit, configured to write the target file into the reused flash memory block according to the approximate file tag; The acquisition unit is also used for: In response to the received approximate file directory creation request, obtaining an error rate threshold input by a user; The device also includes: A creating unit is used to create the approximate file directory according to the error rate threshold and determine the third preset error rate.

14. The device according to claim 13, characterized in that The second preset error rate is related to the error detection capability of an error detection code EDC in the flash memory device.

15. The device according to claim 13 or 14, characterized in that The acquisition unit is also used for: Obtaining a data error rate of the target file; The writing unit is specifically used for: The target file is written into the reused flash memory block according to the approximate file tag of the target file and the data error rate of the target file.

16. The device according to claim 13, characterized in that The creation unit is specifically used for: Obtaining an error rate threshold configuration condition associated with the reused flash memory block; If the error rate threshold input by the user meets the error rate threshold configuration condition, the approximate file directory is created, and the error rate threshold is determined as the third preset error rate.

17. The device according to claim 16, characterized in that The creation unit is specifically used for: In the flash memory device, obtaining the second preset error rate; If the error rate threshold input by the user is less than or equal to the second preset error rate, the approximate file directory is created, and the error rate threshold is determined to be the third preset error rate.

18. The device according to claim 13, characterized in that The device also includes: The flash memory management unit is used to adjust the number of the reused flash memory blocks and the bad flash memory blocks in the flash memory storage device according to the third preset error rate.

19. The device according to claim 18, characterized in that The flash memory management unit is specifically used for: According to the third preset error rate, adjusting an error detection code EDC in the flash memory device; According to the adjusted error detection code EDC, in the flash memory device, the number of the reused flash memory blocks and the bad flash memory blocks is adjusted.

20. The device according to claim 19, characterized in that The flash memory management unit is specifically used for: Performing error rate detection on each flash memory block in the flash memory storage device by using the adjusted error detection code EDC to obtain a data error rate of each flash memory block; The third preset error rate Determine a flash memory block whose data error rate is greater than or equal to the first preset error rate and less than the updated second preset error rate as the reused flash memory block; A flash memory block having a data error rate greater than or equal to the updated second preset error rate is determined as the bad flash memory block.

21. The device according to claim 13, characterized in that The adding unit is specifically used for: If the file directory is the approximate file directory, detecting whether the target file meets a preset condition; If the target file meets the preset condition, a similar file tag is added to the target file, and the target file is added to the similar file directory.

22. The device according to claim 21, characterized in that The preset condition includes that the files in the similar file directory meet the preset file type, and the adding unit is specifically used to: If the target file meets the preset file type, adding a similar file tag to the target file, and adding the target file to the similar file directory; The device also includes: The reminder unit is used to output a reminder message if the target file does not meet the preset file type, wherein the reminder message is used to remind the user that the addition of the target file to the similar file directory fails.

23. A computer storage medium, characterized in that The computer storage medium stores a computer program, wherein the computer program includes at least one section of code. The at least one section of code can be executed by a computer to control the computer to execute the data storage method according to any one of claims 1 to 12.

24. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the method described in any one of claims 1 to 12 is executed.

25. A chip, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the method described in any one of claims 1 to 12 is executed.

Citation Information

Patent Citations

  • A method for prolonging the life of a flash memory solid-state disk and a high-life flash memory solid-state disk

    CN109426622A