CN110286848B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN110286848B
CN110286848B CN201910381506.4A CN201910381506A CN110286848B CN 110286848 B CN110286848 B CN 110286848B CN 201910381506 A CN201910381506 A CN 201910381506A CN 110286848 B CN110286848 B CN 110286848B
Authority
CN
China
Prior art keywords
physical block
target
storage area
preset
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910381506.4A
Other languages
Chinese (zh)
Other versions
CN110286848A (en
Inventor
李海京
范志刚
周毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN201910381506.4A priority Critical patent/CN110286848B/en
Publication of CN110286848A publication Critical patent/CN110286848A/en
Application granted granted Critical
Publication of CN110286848B publication Critical patent/CN110286848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Abstract

The disclosure provides a data processing method and device, relates to the technical field of electronic information, and can solve the problem of low utilization rate of storage space resources when NAND Flash is cleaned. The specific technical scheme is as follows: dividing a target storage medium into at least one storage area, dividing each storage area in the target storage medium into at least one physical block, writing data corresponding to a target physical block into a preset physical block when the target physical block in the target storage medium is determined to meet preset requirements, and erasing the data of the target physical block; and finally, writing data corresponding to the preset physical block into the target physical block to achieve the technical effect of cleaning the NAND Flash. The method is used for cleaning the NAND Flash.

Description

Data processing method and device
Technical Field
The present disclosure relates to the field of electronic information technologies, and in particular, to a data processing method and apparatus.
Background
In order to store data efficiently, flash Memory technology is developed more and more rapidly, flash Memory can be divided into two types according to functional characteristics, one type is NOR Flash, which is mainly coded and applied, the other type is NAND Flash, which has a main function of storing data, and in order to improve the use efficiency of NAND Flash, NAND Flash is cleaned regularly, that is, data of NAND Flash is refreshed periodically. In the prior art, a physical data area is determined in a NAND Flash to achieve the technical purpose of cleaning the NAND Flash, the data storage capacity corresponding to the physical data area is set according to the maximum data storage capacity in the NAND Flash, which is needed to clean the physical data area, in order to ensure the effect of cleaning the NAND Flash, a larger data storage space is reserved in the physical data area for cleaning the NAND Flash, and the larger data storage space corresponding to the physical data area increases the storage cost of the NAND Flash; however, if the partition is cut off, the purpose of cleaning the NAND Flash cannot be achieved, so that the service life of the NAND Flash is shortened, and the cost of a client is increased.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method and device, which can solve the problem of low utilization rate of storage space resources when NAND Flash is cleaned. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a data processing method, including:
dividing a target storage medium into at least one storage area, and dividing each storage area in the target storage medium into at least one physical block;
when the target physical block meets the preset requirement, writing data corresponding to the target physical block into a preset physical block, wherein the target physical block belongs to the at least one physical block;
erasing data of the target physical block;
writing the data corresponding to the preset physical block into the target physical block;
and when the next physical block corresponding to the target physical block meets the preset requirement, writing the data corresponding to the next physical block into a preset physical block.
In one embodiment, before writing the data corresponding to the target physical block into the preset physical block, the method further includes,
when the target storage area meets the preset requirement, determining the target physical block in at least one physical block divided by the target area, wherein the target storage area belongs to the at least one storage area.
In one embodiment, before writing the data corresponding to the target physical block into the preset physical block, the method further includes,
and when the target physical block can store and delete data, confirming that the target physical block meets the preset requirement.
In one embodiment, the present disclosure provides a method for writing data corresponding to the target physical block into a predetermined physical block, including,
and when the preset physical block can store and delete data, writing the data corresponding to the target physical block into the preset physical block.
In one embodiment, after writing the data corresponding to the preset physical block to the target physical block, the method further includes,
updating the block state information corresponding to the target physical block into a processed state, wherein the block state information is used for indicating the processing state corresponding to at least one physical block in the target storage area;
and writing the block state information into a first physical block in a preset storage area, wherein the preset storage area comprises the preset physical block and at least one physical block.
In one embodiment, the disclosed method further comprises,
when the block state information corresponding to each physical block in the target storage area indicates a processed state, updating the area state information corresponding to the target storage area to the processed state;
and processing the next storage area corresponding to the target storage area according to a preset rule until all the storage areas in the target storage medium are processed.
According to the data processing method provided by the embodiment of the disclosure, a target storage medium is divided into at least one storage area, each storage area in the target storage medium is divided into at least one physical block, when the target physical block in the target storage medium is determined to meet a preset requirement, data corresponding to the target physical block is written into the preset physical block, and data erasing is performed on the target physical block; the method comprises the steps of writing data corresponding to the preset physical block into the target physical block, determining whether the next physical block corresponding to the target physical block meets the preset requirement or not until all physical blocks in the target storage medium are completely erased, and achieving the technical effect of cleaning the NAND Flash.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing apparatus including:
the device comprises a dividing module, a first writing module, an erasing module, a second writing module and a third writing module;
the dividing module is used for dividing the target storage medium into at least one storage area and dividing each storage area in the target storage medium into at least one physical block;
the first writing module is configured to write data corresponding to a target physical block into a preset physical block when the target physical block meets a preset requirement, where the target physical block belongs to the at least one physical block;
the erasing module is used for erasing data of the target physical block;
the second writing module is configured to write the data corresponding to the preset physical block into the target physical block.
The third writing module is configured to write data corresponding to a next physical block into a preset physical block when the next physical block corresponding to the target physical block meets the preset requirement.
In one embodiment, the apparatus further comprises, a first determining module,
the first determining module is configured to determine, when a target storage area meets a preset requirement, the target physical block in at least one physical block divided by the target area, where the target storage area belongs to the at least one storage area.
In one embodiment, the apparatus further comprises, a first update module and a fourth write module,
the first updating module is configured to update block state information corresponding to the target physical block to a processed state, where the block state information is used to indicate a processing state corresponding to at least one physical block in the target storage area;
the fourth writing module is configured to write the block state information into a first physical block in a preset storage area, where the preset storage area includes the preset physical block and at least one physical block.
In one embodiment, the apparatus further comprises, a second update module and a processing module,
the second updating module is used for updating the area state information corresponding to the target storage area to be in the processed state when the block state information corresponding to each physical block in the target storage area indicates the processed state;
the processing module is configured to process a next storage area corresponding to the target storage area in the target storage medium according to a preset rule until all storage areas in the target storage medium are processed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a data processing method provided by an embodiment of the present disclosure;
FIG. 2 is an interaction diagram of a data processing method provided by an embodiment of the present disclosure;
FIG. 3 is a block diagram of a data processing apparatus provided in an embodiment of the present disclosure;
FIG. 4 is a block diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 5 is a block diagram of a data processing apparatus provided by an embodiment of the present disclosure, FIG. 2;
FIG. 6 is a block diagram of a data processing apparatus according to an embodiment of the present disclosure shown in FIG. 3;
fig. 7 is a block diagram 4 of a data processing apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Example one
An embodiment of the present disclosure provides a data processing method, as shown in fig. 1, the data processing method includes the following steps:
101. the target storage medium is divided into at least one storage area, and each storage area in the target storage medium is divided into at least one physical block.
The physical block is a storage unit corresponding to the target storage medium; that is, a physical block is an access unit of data on a disk, that is, a minimum size of data to be transferred for each I/O operation.
In an alternative embodiment, the data processing method provided by the present disclosure, the dividing of the target storage medium, includes:
dividing a target storage area into at least one storage area, and marking an area index label corresponding to the at least one storage area;
and dividing the storage area into at least one physical block, and marking a block index label corresponding to the at least one physical block.
102. And when the target physical block meets the preset requirement, writing the data corresponding to the target physical block into the preset physical block.
The target physical block belongs to at least one physical block corresponding to the divided target storage medium.
In an alternative embodiment, the target physical block is a physical block in the target storage area, and the target storage area is a corresponding storage area after the target storage medium is divided.
In an optional embodiment, before determining that the target physical block meets the preset requirement, the data processing method provided by the present disclosure includes determining a target storage area, where the target storage area includes the target physical block:
acquiring an index label corresponding to at least one storage area in the target storage medium;
and when the index label corresponding to the at least one storage area meets a preset rule, determining the target storage area.
In an alternative embodiment, before writing the data corresponding to the target physical block into the preset physical block, the method further includes,
when the target storage area meets the preset requirement, determining the target physical block in at least one physical block of the target area, wherein the target storage area belongs to the at least one storage area.
In an alternative embodiment, when the data processing method provided by the present disclosure determines the target physical block in the at least one physical block, the target physical block may be determined according to the block index label or determined by block state information corresponding to the physical block, which is described by two specific examples, and the present disclosure is not limited thereto.
Example one, a block index number corresponding to at least one physical block is obtained,
and when the block index value corresponding to the at least one physical block is smaller than or equal to a preset value, determining that the at least one physical block is a target physical block, wherein the preset value is the number corresponding to the target storage area division physical block.
For example, the target storage area is divided into 4 physical blocks, a physical block B physical block C physical block D physical block, and the physical blocks are sequentially marked with corresponding block index labels: index number 1 corresponding to the physical block A, index number 2 corresponding to the physical block B, index number 3 corresponding to the physical block C and index number 4 corresponding to the physical block D;
if the number of the divided physical blocks of the target storage area is 4, the preset value is 4;
and acquiring an index number corresponding to any physical block, determining the physical block as a target physical block when the index number is less than or equal to 4, and cleaning the target physical block.
In example two, the target physical block is determined in the at least one physical block according to the block state information corresponding to each physical block in the target storage area.
For example, after the cleaning operation is completed on the physical block, the block state information corresponding to the physical block is updated to be processed;
acquiring block state information corresponding to a physical block before processing the physical block each time, and when the block state information indicates that the physical block is not processed, cleaning the physical block, namely writing data corresponding to the physical block into a preset physical block; and when the block state information indicates that the physical block is processed, cleaning the next physical block corresponding to the physical block.
In alternative embodiments, the predetermined physical blocks may be physical blocks in the target storage medium, or the predetermined physical blocks may be physical blocks in other storage media.
For the fact that the preset physical blocks can be physical blocks in the target storage medium, how to determine the preset physical blocks is further described:
after dividing the target storage area into at least one storage area, determining a preset storage area in the at least one storage area, and marking an area index label corresponding to the preset storage area as a preset area index label; and then determining a preset physical block in the preset storage area.
At this time, since the target storage area and the preset storage area are determined by dividing the same target storage medium, when the target storage area is determined in at least one storage area, the preset storage area needs to be excluded; the preset storage area is an area for storing data corresponding to a target storage area, and the target storage area is an area to be cleaned in the NAND Flash.
The preset storage area may be excluded by a target area index label corresponding to the target storage area and a preset area index label corresponding to the preset storage area.
In an alternative embodiment, before writing the data corresponding to the target physical block into the preset physical block, the method of the present disclosure further includes,
and when the target physical block can be used for data storage and data deletion, confirming that the target physical block meets the preset requirement.
Further, if the target physical block cannot implement data storage or data deletion, that is, if the target physical block is a bad block, the data corresponding to the target physical block is not processed, and the target physical block is marked.
According to the method and the device, the target storage medium to be cleaned in the NAND Flash is divided into at least one storage area, then the target storage area is divided into at least one physical block, and the purpose of cleaning the NAND Flash is achieved through the physical block, so that the purpose of cleaning the NAND Flash through the storage medium with the same storage space as the target storage medium in the prior art is replaced, and the use efficiency of the storage medium in cleaning the NAND Flash is improved.
103. And carrying out data erasure on the target physical block.
The data erasing is to completely delete the data stored in the target physical block so as to realize the technical effect of cleaning the NAND Flash; the method for cleaning the NAND Flash is an operation for refreshing Flash data, namely cleaning the NAND Flash by reading out and then writing back data stored in the NAND Flash; thereby prolonging the service life of the Flash.
104. And writing the data corresponding to the preset physical block into the target physical block.
In an alternative embodiment, the data corresponding to the target physical block is written into a preset physical block, including,
and when the preset physical block can store and delete data, writing the data corresponding to the target physical block into the preset physical block.
In an optional embodiment, after writing the data corresponding to the preset physical block into the target physical block, the data processing method provided by the present disclosure further includes updating the block state information of the target physical block and storing:
updating the block state information corresponding to the target physical block into a processed state, wherein the block state information is used for indicating the processing state corresponding to at least one physical block in the target storage area;
and writing the block state information into a first physical block in a preset storage area, wherein the preset storage area comprises the preset physical block and at least one physical block.
105. And when the next physical block corresponding to the target physical block meets the preset requirement, writing the data corresponding to the next physical block into a preset physical block.
In an optional embodiment, the present disclosure further includes updating the area state information corresponding to the target storage area, and processing the next storage area:
when the block state information corresponding to each physical block in the target storage area indicates a processed state, updating the area state information corresponding to the target storage area to the processed state;
processing the next storage area corresponding to the target storage area in the target storage medium according to a preset rule until all storage areas in the target storage medium are processed:
namely: and determining whether the physical blocks divided by the next storage area meet the preset requirement or not until all the physical blocks in the target storage medium are completely erased.
After the target storage medium is divided, the storage areas in the target storage medium are sequentially processed according to a preset rule until each storage area is processed, wherein each storage medium is processed, namely each physical block in the target storage area is processed. For example:
dividing a target storage medium into an A storage area and a B storage area, wherein the A storage area comprises: a physical block, b physical block and c physical block; and processing the storage area A and then processing the storage area B according to a preset rule.
And when the storage area A is processed, sequentially processing the physical block a, the physical block B and the physical block c according to a preset rule, after the physical block a, the physical block B and the physical block c are processed, determining that the storage area A is processed, and processing the storage area B. And finally, after the B storage area is processed, determining that the target storage medium is processed.
According to the method and the device, the function of recording the cleaning progress of the NAND Flash can be realized by storing the state information into the first physical block, and the NAND Flash can be continuously cleaned according to the last cleaning progress when the NAND Flash is suddenly powered off or under other conditions, so that the efficiency of cleaning the NAND Flash is ensured.
According to the data processing method provided by the embodiment of the disclosure, a target storage medium is divided into at least one storage area, each storage area in the target storage medium is divided into at least one physical block, when the target physical block in the target storage medium is determined to meet a preset requirement, data corresponding to the target physical block is written into the preset physical block, and data erasing is performed on the target physical block; the method comprises the steps of writing data corresponding to the preset physical block into the target physical block, determining whether the next physical block corresponding to the target physical block meets the preset requirement or not until all physical blocks in the target storage medium are completely erased, and achieving the technical effect of cleaning the NAND Flash.
Example two
Based on the data processing method provided by the embodiment corresponding to fig. 1, another embodiment of the present disclosure provides a data processing method, which can be applied to the cleaning of NAND Flash. The present embodiment is described by taking an example that the preset physical block may be a physical block in the first storage medium, and does not represent that the present disclosure is limited thereto. Referring to fig. 2, the data processing method provided in this embodiment includes the following steps:
201. the target storage medium is divided into at least one physical block.
In an alternative embodiment, dividing the target storage medium into at least one storage medium divided into at least one physical block comprises:
dividing target storage medium into at least one storage medium, and dividing the storage medium into at least one physical block
202. And determining a target physical block in at least one physical block divided by the target storage area according to a preset rule.
In an alternative embodiment, determining the target physical block comprises:
and when the block index value corresponding to the at least one physical block is smaller than or equal to a preset value, determining that the at least one physical block is a target physical block, wherein the preset value is the number corresponding to the target storage area division physical block.
203. And when the target physical block meets the preset requirement, writing the data corresponding to the target physical block into the preset physical block.
In an alternative embodiment, the predetermined physical block may be a physical block in the first storage area of the first storage medium.
And writing the data corresponding to the target physical block into the preset physical block through the address corresponding to the preset physical block.
204. And carrying out data erasure on the target physical block.
The data erasing is to completely delete the data stored in the target physical block so as to achieve the technical effect of cleaning the NAND Flash.
205. And writing the data corresponding to the preset physical block into the target physical block.
And writing the data corresponding to the preset physical block into the target physical block through the address corresponding to the target physical block.
The data processing method provided by the embodiment of the disclosure divides a target storage medium into at least one storage area, divides each storage area in the target storage medium into at least one physical block, writes data corresponding to a target physical block into a preset physical block when the target physical block in the target storage medium is determined to meet a preset requirement, and erases the data of the target physical block; the method comprises the steps of writing data corresponding to the preset physical block into the target physical block, determining whether the next physical block corresponding to the target physical block meets the preset requirement or not until all physical blocks in the target storage medium are completely erased, and achieving the technical effect of cleaning the NAND Flash.
EXAMPLE III
Based on the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, the following is an embodiment of the apparatus of the present disclosure, which can be used to execute the embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a data processing apparatus, as shown in fig. 3, the data processing apparatus 30 includes: a dividing module 301, a first writing module 302, an erasing module 303, a second writing module 304, and a third writing module 305;
the dividing module 301 is configured to determine a target physical block in at least one physical block divided according to a target storage area, where the target storage area is a storage area corresponding to a divided target storage medium, and the physical block is a storage unit corresponding to the target storage medium
The first writing module 302 is configured to write data corresponding to a target physical block into a preset physical block when the target physical block meets a preset requirement, where the target physical block is a physical block corresponding to a target storage area after the target physical block is divided, and the physical block is a storage unit corresponding to a target storage medium;
the erasing module 303 is configured to erase data of the target physical block;
the second writing module 304 is configured to write data corresponding to the preset physical block into the target physical block;
the third writing module 305 is configured to, when a next physical block corresponding to the target physical block meets the preset requirement, write data corresponding to the next physical block into a preset physical block.
In an alternative embodiment, shown in fig. 4, the apparatus 30 further comprises, a first determining module 306,
a first determining module 306, configured to determine, when a target storage area meets a preset requirement, the target physical block in at least one physical block divided by the target storage area, where the target storage area belongs to the at least one storage area.
In an alternative embodiment, shown in fig. 5, the apparatus 30 further comprises, a second determining module 307,
a second determining module 307, configured to confirm that the target physical block meets the preset requirement when the target physical block is capable of performing data storage and data deletion.
In an alternative embodiment, shown in fig. 6, the apparatus 30 further comprises, a first update module 308 and a fourth write module 309,
a first updating module 308, configured to update block state information corresponding to the target physical block to a processed state, where the block state information is used to indicate a processing state corresponding to at least one physical block in the target storage area;
a fourth writing module 309, configured to write the block state information into the first physical block in a preset storage area, where the preset storage area includes the preset physical block and at least one physical block.
In an alternative embodiment, as shown in fig. 7, the apparatus 30 further comprises, a second updating module 310 and a processing module 311,
the second updating module 310, when the block status information corresponding to each physical block in the target storage area indicates a processed status, updates the area status information corresponding to the target storage area to the processed status;
the processing module 311 is configured to process a next storage area corresponding to the target storage area in the target storage medium according to a preset rule until all storage areas in the target storage medium are processed.
According to the data processing device provided by the embodiment of the disclosure, a target storage medium is divided into at least one storage area, each storage area in the target storage medium is divided into at least one physical block, when the target physical block in the target storage medium is determined to meet a preset requirement, data corresponding to the target physical block is written into the preset physical block, and data erasing is performed on the target physical block; the method comprises the steps of writing data corresponding to the preset physical block into the target physical block, determining whether the next physical block corresponding to the target physical block meets the preset requirement or not until all physical blocks in the target storage medium are completely erased, and achieving the technical effect of cleaning the NAND Flash.
Based on the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of data processing, the method comprising:
dividing a target storage medium into at least one storage area, and dividing each storage area in the target storage medium into at least one physical block;
when a target physical block meets a preset requirement, writing data corresponding to the target physical block into a preset physical block, wherein the target physical block belongs to the at least one physical block;
performing data erasure on the target physical block;
writing data corresponding to the preset physical block into the target physical block;
and when the next physical block corresponding to the target physical block meets the preset requirement, writing the data corresponding to the next physical block into the preset physical block.
2. The method according to claim 1, further comprising, before writing the data corresponding to the target physical block into the default physical block,
when a target storage area meets a preset requirement, determining the target physical block in at least one physical block divided by the target area, wherein the target storage area belongs to the at least one storage area.
3. The method according to claim 1, wherein before writing the data corresponding to the target physical block into the default physical block, the method further comprises,
and when the target physical block can be used for data storage and data deletion, confirming that the target physical block meets the preset requirement.
4. The method according to claim 1, wherein after the writing the data corresponding to the predetermined physical block to the target physical block, the method further comprises,
updating the block state information corresponding to the target physical block into a processed state, wherein the block state information is used for indicating the processing state corresponding to at least one physical block in the target storage area;
and writing the block state information into a first physical block in a preset storage area, wherein the preset storage area comprises the preset physical block and at least one physical block.
5. The method of claim 1, further comprising:
when the block state information corresponding to each physical block in the target storage area indicates a processed state, updating the area state information corresponding to the target storage area to the processed state;
and processing the next storage area corresponding to the target storage area according to a preset rule until all storage areas in the target storage medium are processed.
6. A data processing apparatus, comprising: the device comprises a dividing module, a first writing module, an erasing module, a second writing module and a third writing module;
the dividing module is used for dividing a target storage medium into at least one storage area and dividing each storage area in the target storage medium into at least one physical block;
the first writing module is configured to write data corresponding to a target physical block into a preset physical block when the target physical block meets a preset requirement, where the target physical block belongs to the at least one physical block;
the erasing module is used for erasing data of the target physical block;
the second writing module is configured to write the data corresponding to the preset physical block into the target physical block;
and the third writing module is configured to write data corresponding to the next physical block into a preset physical block when the next physical block corresponding to the target physical block meets the preset requirement.
7. The apparatus of claim 6, further comprising, a first determining module,
the first determining module is configured to determine, when a target storage area meets a preset requirement, the target physical block in at least one physical block divided by the target storage area, where the target storage area belongs to the at least one storage area.
8. The apparatus of claim 6, further comprising, a second determining module,
and the second determining module is used for determining that the target physical block meets the preset requirement when the target physical block can perform data storage and data deletion.
9. The apparatus of claim 6, further comprising, a first update module and a fourth write module,
the first updating module is configured to update block state information corresponding to the target physical block to a processed state, where the block state information is used to indicate a processing state corresponding to at least one physical block in the target storage area;
the fourth writing module is configured to write the block state information into a first physical block in a preset storage area, where the preset storage area includes the preset physical block and at least one physical block.
10. The apparatus of claim 6, further comprising a second update module and a processing module,
the second updating module is used for updating the area state information corresponding to the target storage area to be in a processed state when the block state information corresponding to each physical block in the target storage area indicates to be in the processed state;
and the processing module is used for processing the next storage area corresponding to the target storage area in the target storage medium according to a preset rule until all the storage areas in the target storage medium are processed.
CN201910381506.4A 2019-05-08 2019-05-08 Data processing method and device Active CN110286848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910381506.4A CN110286848B (en) 2019-05-08 2019-05-08 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910381506.4A CN110286848B (en) 2019-05-08 2019-05-08 Data processing method and device

Publications (2)

Publication Number Publication Date
CN110286848A CN110286848A (en) 2019-09-27
CN110286848B true CN110286848B (en) 2022-12-09

Family

ID=68002323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910381506.4A Active CN110286848B (en) 2019-05-08 2019-05-08 Data processing method and device

Country Status (1)

Country Link
CN (1) CN110286848B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100184A (en) * 2020-10-26 2020-12-18 上海擎感智能科技有限公司 Vehicle total mileage data storage method and computer storage medium
CN112908390B (en) * 2021-02-02 2023-07-28 深圳市显控科技股份有限公司 Data storage method, device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419573A (en) * 2008-12-01 2009-04-29 成都市华为赛门铁克科技有限公司 Storage management method, system and storage apparatus
JP2012203443A (en) * 2011-03-23 2012-10-22 Toshiba Corp Memory system and control method of memory system
CN105278876B (en) * 2015-09-23 2018-12-14 华为技术有限公司 A kind of the data method for deleting and device of solid state hard disk

Also Published As

Publication number Publication date
CN110286848A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
US9632880B2 (en) Data storage device and flash memory control method
JP4778942B2 (en) Apparatus and method for managing nonvolatile memory
WO2017088185A1 (en) Method for storage device storing data and storage device
CN108897492B (en) Data writing method and device
CN110674056B (en) Garbage recovery method and device
CN110673789B (en) Metadata storage management method, device, equipment and storage medium of solid state disk
CN113220239A (en) Erasing and writing method, device and equipment for flash storage and readable storage medium
US20120246394A1 (en) Flash Memory Device and Data Writing Method for a Flash Memory
CN110286848B (en) Data processing method and device
CN108052287A (en) Partition data management method, set-top box and the medium of a kind of nonvolatile memory
CN111930301A (en) Garbage recycling optimization method and device, storage medium and electronic equipment
CN110389712B (en) Data writing method and device, solid state disk and computer readable storage medium
JP4829202B2 (en) Storage device and memory control method
JP2008123314A (en) Information recording method and information recording system to semiconductor storage device
US20160124650A1 (en) Data Storage Device and Flash Memory Control Method
US20130138910A1 (en) Information Processing Apparatus and Write Control Method
US8176231B2 (en) Methods for handling data updating of flash memory and related memory cards
US20130326120A1 (en) Data storage device and operating method for flash memory
US8209487B2 (en) Block update for flash memory utilizing a cache page and cache block
JP2011227802A (en) Data recording device
JP4468342B2 (en) Data management method
CN112181316A (en) Data block information inheritance method and device, storage medium and electronic equipment
JP2007505416A (en) Managing defective blocks in flash memory
CN112379831A (en) Data management method and device, computer equipment and storage medium
CN112988037A (en) Static wear leveling method, terminal and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Data processing methods and devices

Granted publication date: 20221209

Pledgee: Pudong Development Bank of Shanghai Limited by Share Ltd. Xi'an branch

Pledgor: XI'AN VANXVM ELECTRONICS TECHNOLOGY Co.,Ltd.

Registration number: Y2024610000022