CN111984451A - Error correction method, system, device and storage medium for table data - Google Patents

Error correction method, system, device and storage medium for table data Download PDF

Info

Publication number
CN111984451A
CN111984451A CN202010847678.9A CN202010847678A CN111984451A CN 111984451 A CN111984451 A CN 111984451A CN 202010847678 A CN202010847678 A CN 202010847678A CN 111984451 A CN111984451 A CN 111984451A
Authority
CN
China
Prior art keywords
physical address
table data
data
error
confirmed
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.)
Granted
Application number
CN202010847678.9A
Other languages
Chinese (zh)
Other versions
CN111984451B (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.)
SHENZHEN SILICONGO MICROELECTRONICS CO Ltd
Original Assignee
SHENZHEN SILICONGO MICROELECTRONICS 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 SHENZHEN SILICONGO MICROELECTRONICS CO Ltd filed Critical SHENZHEN SILICONGO MICROELECTRONICS CO Ltd
Priority to CN202010847678.9A priority Critical patent/CN111984451B/en
Publication of CN111984451A publication Critical patent/CN111984451A/en
Application granted granted Critical
Publication of CN111984451B publication Critical patent/CN111984451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Detection And Correction Of Errors (AREA)

Abstract

The invention discloses a method, a system, a terminal device and a computer storage medium for error correction of table data, which are characterized in that when a re-reading error of the table data is detected, an error physical address in the table data is determined, wherein the error physical address is identified by bytes; bit overturning is carried out on bytes corresponding to the wrong physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed; extracting a data identifier according to the physical address to be confirmed; and if the data identification is matched with a preset logical address, reconstructing the table data by using the physical address to be confirmed to finish error correction. The method and the device can correct the error of the table data with more errors of the physical address, can more quickly finish the error correction process of the table data, improve the error correction efficiency of the table data, and effectively avoid the situation that the storage device cannot correct the error of the table data with errors of a large number of physical addresses based on hardware of the storage device, so that the source data is lost.

Description

Error correction method, system, device and storage medium for table data
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method, a system, a terminal device, and a computer storage medium for error correction of table data.
Background
In the process of storing source data provided by a data owner (host) in a storage device, a mapping relationship between the source data and physical addresses of the source data in the storage device is usually established, for example, one or more mapping relationship tables are developed in an independent storage space of the storage device, and then the physical storage addresses are stored in the mapping relationship tables, so that when the source data needs to be extracted from the storage device, the physical addresses can be determined by directly reading table data of the mapping relationship tables, and then the source data can be quickly located and subjected to data extraction.
However, in the practical application process, an error in reading the table data may occur, and if the error correction cannot be performed on the table data, it is easy to cause the loss of the source data corresponding to the physical address on the mapping table. Although the existing storage device itself may implement error correction on the table data through the hardware module, thereby recovering successful reading of the table data, the above approach can implement error correction on the table data only for the case of a small number of physical address errors.
In summary, the conventional error correction method for table data is limited to performing error correction on the table data only in the case that the physical address error amount is small (the table data error amount is within the range in which the memory device can perform error correction based on its own hardware), but when a large number of physical addresses in the table data are in error, the above method cannot complete error correction, and the error correction efficiency is low.
Disclosure of Invention
The invention mainly aims to provide a method and a device for correcting error of table data, a terminal device and a computer storage medium, and aims to solve the technical problems that in the prior art, the error correction of the table data is realized and the error correction efficiency is low based on the condition that hardware of a storage device can only make errors on a small number of physical addresses.
In order to achieve the above object, the present invention provides an error correction method for table data, including:
when a re-reading error of table data is detected, determining an error physical address in the table data, wherein the error physical address is identified by bytes;
bit overturning is carried out on bytes corresponding to the wrong physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed;
extracting a data identifier according to the physical address to be confirmed;
and if the data identification is matched with a preset logical address, reconstructing the table data by using the physical address to be confirmed to finish error correction.
Further, before the step of determining an erroneous physical address in the table data when the re-reading error of the table data is detected, the method further includes:
the physical addresses of the storage source data of the storage device are arranged into a set and identified by bytes, and the bytes are packaged to form table data, wherein the physical addresses comprise one or more items of channels, logical unit numbers, row addresses and cluster offsets.
Further, before the step of determining an erroneous physical address in the table data when the re-reading error of the table data is detected, the method further includes:
after the storage device performs decoding and error correction on the table data based on a preset hardware error correction module, detecting whether the table data is a reread error.
Further, the preset logical address and the error physical address have a mutual mapping relation,
if the data identification is matched with a preset logical address, reconstructing table data by using the physical address to be confirmed to finish error correction, wherein the step comprises the following steps of:
if the data identification is detected to be matched with the preset logical address mapped by the wrong physical address, determining that the physical address to be confirmed is recovered to be normal;
replacing the error physical address with the recovered normal physical address to be confirmed to construct and obtain new table data;
and updating the mapping relation based on the new table data to complete error correction.
Further, the step of determining the erroneous physical address in the table data includes:
sequentially analyzing bytes in the table data to obtain a physical address of the byte identifier;
extracting a data identifier according to the physical address of the byte identifier;
and if the data identifier is not matched with the preset logical address, determining that the physical address of the byte identifier is the wrong physical address.
Further, the step of obtaining the physical address to be confirmed by the reparse includes:
carrying out reanalysis on bytes formed by bit flipping to obtain a default physical address;
and if the default physical address is detected to be a legal address, marking the default physical address as a physical address to be confirmed.
Further, the step of extracting the data identifier according to the physical address to be confirmed includes:
executing a reading operation aiming at the physical address to be confirmed so as to detect whether the physical address to be confirmed carries a data identifier or not;
and if so, extracting the data identification.
In addition, to achieve the above object, the present invention provides an error correction system for table data, including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining an error physical address in table data when the re-reading error of the table data is detected, and the error physical address is identified by a preset byte;
the correcting module is used for carrying out bit flipping on the bytes corresponding to the error physical address and analyzing the bytes again to obtain a physical address to be confirmed;
the extraction module is used for extracting a data identifier according to the physical address to be confirmed;
and the reconstruction module is used for reconstructing the table data by using the physical address to be confirmed to finish error correction if the data identification is matched with a preset logical address.
Each functional module of the error correction system for table data of the present invention implements the steps of the error correction method for table data as described above when operating.
In addition, to achieve the above object, the present invention also provides a terminal device, including: the system comprises a memory, a processor and an error correction program of table data stored on the memory and capable of running on the processor, wherein the error correction program of the table data realizes the steps of the error correction method of the table data as described above when being executed by the processor.
In order to achieve the above object, the present invention further provides a computer storage medium having a computer program stored thereon, the computer program implementing the steps of the method for correcting errors of table data as described above when executed by a processor.
The error correction method, the system, the terminal equipment and the computer storage medium of the table data provided by the invention determine the error physical address in the table data when the re-reading error of the table data is detected, wherein the error physical address is identified by bytes; bit overturning is carried out on bytes corresponding to the wrong physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed; extracting a data identifier according to the physical address to be confirmed; and if the data identification is matched with a preset logical address, reconstructing the table data by using the physical address to be confirmed to finish error correction.
When detecting that the storage device repeatedly generates errors which cannot be corrected by the storage device according to table data (the table data is used for representing the mapping relation between the logical address of the source data and the physical address of the source data in the storage device), detecting and determining an error physical address generated in error in a plurality of physical addresses (each physical address is identified in a byte form) packaged by the table data, then carrying out bit inversion on bytes for identifying the error physical address, re-analyzing new bytes obtained through the bit inversion to obtain a legal physical address to be confirmed, extracting a data identifier through the physical address to be confirmed, comparing whether the data identifier is matched with a preset logical address, and reconstructing the table data by using the physical address to be confirmed to update the mapping relation when comparing that the data identifier is matched with the preset logical address, thereby completing error correction of the table data for the re-read error.
Compared with the existing mode of decoding and correcting errors only based on hardware of the storage device, the method and the device have the advantages that the physical address mapped with the logical address of the source data is identified in a byte mode, so that a new physical address is obtained by carrying out bit inversion on the byte corresponding to the erroneous physical address based on the physical address with errors, and the table data is reconstructed based on the new physical address to update the mapping relation, so that the error correction on the table data can be completed.
Drawings
Fig. 1 is a schematic structural diagram of the hardware operation of a terminal device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a method for error correction of table data according to the present invention;
FIG. 3 is a flowchart illustrating a detailed process of step S400 in an embodiment of a method for error correction of table data according to the present invention;
FIG. 4 is a block diagram of an error correction system for table data according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment related to a terminal device according to an embodiment of the present invention.
It should be noted that fig. 1 is a schematic structural diagram of a hardware operating environment of the terminal device. The terminal equipment of the embodiment of the invention can be data storage control terminals, PC, portable computers and other terminal equipment.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 is not intended to be limiting of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, a user interface module, and a distributed task processing program therein. Among them, the operating system is a program that manages and controls the hardware and software resources of the sample terminal device, a handler that supports distributed tasks, and the execution of other software or programs.
In the terminal apparatus shown in fig. 1, the user interface 1003 is mainly used for data communication with each terminal; the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; and the processor 1001 may be configured to call an error correction procedure of the table data stored in the memory 1005, and perform the following operations:
when a re-reading error of table data is detected, determining an error physical address in the table data, wherein the error physical address is identified by bytes;
bit overturning is carried out on bytes corresponding to the wrong physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed;
extracting a data identifier according to the physical address to be confirmed;
and if the data identification is matched with a preset logical address, reconstructing the table data by using the physical address to be confirmed to finish error correction.
Further, the processor 1001 may call an error correction procedure of the table data stored in the memory 1005, and before performing the determination of the erroneous physical address in the table data when the re-reading error of the table data is detected, further perform the following operations:
the physical addresses of the storage source data of the storage device are arranged into a set and identified by bytes, and the bytes are packaged to form table data, wherein the physical addresses comprise one or more items of channels, logical unit numbers, row addresses and cluster offsets.
Further, the processor 1001 may call an error correction procedure of the table data stored in the memory 1005, and before performing the step of determining an erroneous physical address in the table data when the re-reading error of the table data is detected, further perform the following operations:
after the storage device performs decoding and error correction on the table data based on a preset hardware error correction module, detecting whether the table data is a reread error.
Further, the preset logical address and the erroneous physical address have a mapping relationship, and the processor 1001 may call an error correction program of the table data stored in the memory 1005, and further perform the following operations:
if the data identification is detected to be matched with the preset logical address mapped by the wrong physical address, determining that the physical address to be confirmed is recovered to be normal;
replacing the error physical address with the recovered normal physical address to be confirmed to construct and obtain new table data;
and updating the mapping relation based on the new table data to complete error correction.
Further, the processor 1001 may call an error correction procedure of the table data stored in the memory 1005, and also perform the following operations:
sequentially analyzing bytes in the table data to obtain a physical address of the byte identifier;
extracting a data identifier according to the physical address of the byte identifier;
and if the data identifier is not matched with the preset logical address, determining that the physical address of the byte identifier is the wrong physical address.
Further, the processor 1001 may call an error correction procedure of the table data stored in the memory 1005, and also perform the following operations:
carrying out reanalysis on bytes formed by bit flipping to obtain a default physical address;
and if the default physical address is detected to be a legal address, marking the default physical address as a physical address to be confirmed.
Further, the processor 1001 may call an error correction procedure of the table data stored in the memory 1005, and also perform the following operations:
executing a reading operation aiming at the physical address to be confirmed so as to detect whether the physical address to be confirmed carries a data identifier or not;
and if so, extracting the data identification.
Based on the above structure, various embodiments of the error correction method of table data of the present invention are proposed.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for correcting error of table data according to a first embodiment of the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown or described herein.
The method for correcting the error of the table data according to the embodiment of the present invention is applied to the terminal device for controlling data storage, and the terminal device according to the embodiment of the present invention may be a terminal device such as a data storage control terminal, a PC, a portable computer, or the like, and is not limited specifically herein.
The error correction method of the table data of the embodiment comprises the following steps:
step S100, when a re-reading error of table data is detected, determining an error physical address in the table data, wherein the error physical address is identified by bytes;
when the current terminal device detects that the re-reading of the storage device for the table data has an error, the current terminal device immediately starts to determine all the error physical addresses causing the error of the re-reading of the table data by the storage device from the plurality of physical addresses packaged and stored in the table data.
It should be noted that, in this embodiment, the table data is used to identify the logical address of the source data, and the mapping relationship between the logical address of the source data and the physical address of the source data stored in the storage device in the solid state, that is, the physical address encapsulated in the table data is respectively mapped with the logical address of the source data. In addition, each physical address in the table data is identified in a byte format, and for example, when the table data is managed in 2KB (kilo-byte, measurement unit, 2KB 2048 byte), one mapped physical address is identified every 4 bytes. It should be understood that, based on different design requirements of practical applications, in other possible embodiments, the table data may also be managed by using other unit sizes, and bytes with other bit numbers may also be used in the table data to identify one physical address.
Further, in a possible embodiment, before step S100, the method for correcting the error of the table data according to the embodiment of the present invention may further include:
step S500, physical addresses of storage source data of the storage device are arranged into a set and identified by bytes, and the bytes are encapsulated to form table data, wherein the physical addresses comprise one or more items of channels, logic unit numbers, row addresses and cluster offsets.
Before detecting whether the rereading of the storage device for the table data has an error, the current terminal device integrates the source data into a set by the physical addresses such as channels, logical unit numbers, row addresses and/or cluster offsets stored in the storage device in a solid state, then identifies the physical addresses in a byte form, and encapsulates the bytes to form the table data.
Specifically, for example, the current terminal device integrates physical addresses mapped by logical addresses (logical addresses 0 to 7) of one sector source data, i.e., a channel, a logical unit number lun, a row address-row, and a cluster offset, into one set, then represents the set by 4 bytes (in which the cluster offset can be represented by the 3 rd byte) to identify the physical addresses based on the 4 bytes, then the current terminal device develops one or more blank tables of 2KB in size in an independent storage space of the storage device, and finally, the current terminal device packages the blank tables into table data identifying one physical address by sequentially packaging 4 bytes of each physical address (one table can package 4 bytes identifying 512 physical addresses, and after one table is filled up, continues to develop new blank tables to package other bytes identifying physical addresses), thereby packaging the blank tables into table data identifying one physical address by every 4 bytes, and represents a mapping relationship between the logical address and the physical address based on the table data.
In this embodiment, physical addresses mapped by each logical address of the source data are represented in a set manner, that is, a channel, a logical unit number, a row address, and a cluster offset are identified by a byte, so that, when it is detected that a reread error of table data is caused by an error of a physical address with a large data amount, a byte identifying the erroneous physical address is directly subjected to bit flipping, and a correct physical address is recovered to correct the data table, thereby ensuring normal implementation of error correction of the table data when the physical address with the large data amount in the table data is erroneous.
It should be noted that, in this embodiment, when an error occurs in a mapping relationship between a logical address of source data and a physical address of the source data stored in the storage device in a solid state, and the error is an error that the storage device cannot successfully correct the error based on its hardware (the storage device can only correct errors for a small number of physical addresses in table data based on its hardware, and in a case where there are many physical addresses in the table data, the storage device cannot perform an error correction process), the terminal device corrects the error for the table data to ensure that the mapping relationship between the logical address and the physical address is normal, and ensures that the source data is not accidentally lost due to the error in the mapping relationship. Furthermore, the current terminal device is interconnected with the storage device.
Further, in a possible embodiment, in step S100, before determining an erroneous physical address in the table data when a re-reading error of the table data is detected, the method for correcting the error of the table data according to the embodiment of the present invention may further include:
step S600, after the storage device performs decoding and error correction on the table data based on a preset hardware error correction module, detecting whether the table data is a reread error.
After the current terminal device packages bytes for identifying physical addresses in an independent storage space of the storage device to form table data, if source data cannot be extracted based on the table data, the storage device integrates a preset hardware error correction module based on the storage device, performs error correction on the physical addresses with errors in the table data, and then after the storage device performs error correction based on the preset error correction module, the current terminal device starts to detect whether re-reading errors still occur when the storage device performs re-reading on the table data.
It should be noted that, in this embodiment, the preset hardware error correction module is a functional module that is preset by the storage device itself and based on a hard decoding or soft decoding manner, and performs an error correction process for a physical address with a small data size in the table data, for example, the preset hardware error correction module may be a functional module based on an LDPC (Low Density Parity Check Code) error correction algorithm and integrally configured in the storage device.
In this embodiment, when the storage device extracts the source data based on the physical address encapsulated in the table data, if it is found that the read source data is incorrect, it is determined that the physical address in the table data is incorrect, so that the storage device first starts to correct the error of the table data in a hard decoding (or soft decoding) manner based on a function module based on an LDPC error correction algorithm preset by the storage device itself, and after the error correction process is completed, the current terminal device connected to the storage device immediately controls the storage device to perform a re-reading operation on the table data again, thereby detecting whether the re-reading error still occurs in the table data after the error correction of the hardware of the storage device itself.
Further, in a possible embodiment, when the terminal device records that the re-reading performed by the storage device for the table data has an error, the error amount of the table data is large, and then, the terminal device determines, from the table data with the smallest error amount, all the error physical addresses causing the error of the re-reading of the table data, so as to perform the subsequent bit flipping on the bytes identifying the error physical addresses.
Specifically, for example, in the process of rereading table data for multiple times by adjusting voltages of different magnitudes in a storage device-storage medium Nnad Flash, the current terminal device records different error amounts (error bit numbers) of the table data obtained by rereading the storage medium Nnad Flash based on the voltages of different magnitudes each time, and then, based on comparing the error amounts, the current terminal device sequentially determines error physical addresses in all stored physical addresses from the corresponding table data when the error amount is the minimum.
In this embodiment, by determining the error physical address corresponding to the minimum error amount of the re-read table data, the subsequent bit flipping operation for the byte identifying the error physical address is performed, so that the workload of bit flipping is greatly reduced, and the overall error correction efficiency for the table data is improved.
Further, in a possible embodiment, in step S100, the step of "determining the erroneous physical address in the table data" may include:
step S101, analyzing bytes in the table data in sequence to obtain a physical address of the byte identification;
step S102, extracting a data identifier according to the physical address of the byte identifier;
it should be noted that, in this embodiment, when the current terminal device detects the storage device and detects that the table data after being error-corrected by the storage device based on its own hardware error correction module still has a re-read error, it is determined that the storage device has not successfully implemented error correction on the table data based on its own hardware error correction module, so as to start to locate an error physical address, where an error occurs in the table data and causes the re-read error of the table data, from the table data. In addition, the data identifier is a part of redundant data existing in each physical address, and the redundant data is used for indicating a logical address of source data (a logical address of source data of a certain sector) mapped with the physical address.
The current terminal equipment extracts and analyzes the bytes for identifying each physical address in sequence in each byte for identifying the physical address encapsulated in the table data, thereby obtaining all the physical addresses identified by the bytes in sequence and reading the data identification carried in the physical address in sequence.
Specifically, for example, the current terminal device extracts table data of 2KB size from an independent storage space of the storage device, and parses 4 bytes each time in order to obtain all 512 physical addresses in an order of identifying one physical address every 4 bytes on the table data. After each time of resolving to obtain a physical address, the current terminal device immediately performs a read operation on the physical address, thereby extracting redundant data carried in the physical address, that is, a logical address (e.g., logical addresses 0 to 7) of source data mapped by the physical address.
Step S103, if the data identifier does not match the preset logical address, determining that the physical address of the current byte identifier is an erroneous physical address.
It should be noted that, in this embodiment, the preset logical address is a logical address of the source data, to which the physical address is mapped, and which is obtained by parsing by the current terminal device.
After the current terminal device reads the data identifier to be written in the physical address from the physical address obtained by analyzing the bytes, the current terminal device further compares the data identifier with the logical address of the source data mapped by the physical address, so as to detect whether the data identifier is matched with the logical address, and if the data identifier is not matched with the logical address, the physical address can be determined as an erroneous physical address causing a table data re-reading error.
Specifically, for example, the logical addresses of the source data mapped by the current physical address are logical addresses 8 to 15, and after the current terminal device reads redundant data carried by the current physical address from the current physical address obtained by sequentially parsing 4 bytes, that is, the logical addresses (logical addresses 0 to 7) of the source data mapped by the current physical address, the current terminal device compares the logical addresses with the logical addresses 8 to 15 of the source data mapped by the current physical address, and detects that the logical addresses 0 to 7 do not match the logical addresses 8 to 15, so that the current terminal device can determine that the current physical address is an erroneous physical address causing a table data re-reading error.
Further, in another possible embodiment, when the current terminal device detects that the data identifier carried in the current physical address matches the logical address of the source data mapped by the current physical address, the current terminal device immediately skips the current physical address and continues to detect whether the next physical address is an erroneous physical address.
It should be noted that, in the present embodiment, since the size of the data amount in which an error occurs in the table data is random, and the physical address in which the error occurs is also random, for example, in the table data with the size of 2KB, there may be 512 bits in which the error occurs in the physical address, and the 512 bits in error are exactly distributed in 512 physical addresses identified by 4 bytes, so that the error occurs in all 512 physical addresses in the table data. Therefore, based on the random uncertainty of the bit with error in each byte in the table data, when the current terminal device detects that the error correction of the table data is performed by the storage device based on its own hardware error correction module, and the re-reading error still exists, the current terminal device needs to sequentially analyze the physical addresses identified by every 4 bytes in order to comprehensively and accurately locate all the erroneous physical addresses in the table data.
Step S200, bit overturning is carried out on bytes corresponding to the error physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed;
after determining all wrong physical addresses in table data, the current terminal device sequentially extracts bytes for identifying each wrong physical address from the table data, then performs bit flipping operation on the bytes based on the existing mature bit flipping algorithm, and finally performs re-analysis on the bytes obtained after the bit flipping operation to obtain the physical address to be confirmed which recovers to be normal based on the bit flipping.
It should be noted that, in this embodiment, bit flipping is also often referred to as bit inversion, since the physical address is identified by a byte in a set manner, each byte is filled with 8 bits, and each bit is filled with "0" or "1", so that in the process of correcting errors for the erroneous physical address to recover to obtain a correct physical address, bit flipping is performed for 4 bytes, and "0" and "1" on 32 bits, which identify the erroneous physical address, that is, "1" on an occupied bit is flipped to "0" and "0" on an occupied bit is flipped to "1".
Further, in a possible embodiment, the step of "re-resolving to obtain the physical address to be confirmed" in the step S200 includes:
step S201, carrying out reanalysis on bytes formed by bit flipping to obtain a default physical address;
after bit flipping is performed on the bytes identifying the wrong physical address by the current terminal device, the bytes formed by the bit flipping are re-analyzed to obtain a default physical address according to a rule that the physical address is identified by the bytes in a set form.
Specifically, for example, after the current terminal device performs bit flipping on "0" and "1" of occupied bits on 32 bits- "0001100100001101000001001100011" of 4 bytes identifying the current wrong physical address to obtain 4 bytes- "0000011000000010000010100011100" after the bit flipping, the current terminal device compiles and parses the 4 bytes- "0000011000000010000010100011100" to obtain a default physical address according to rules that each byte individually identifies a channel, a logical unit number, a row address, and a cluster offset in the physical address.
Step S202, if the default physical address is detected to be a legal address, the default physical address is marked as a physical address to be confirmed.
After re-analyzing bytes formed by bit flipping by the current terminal device to obtain a default physical address, detecting whether the default physical address is a valid legal address, if so, marking the default physical address as a physical address to be confirmed, which is subjected to error correction recovery for an erroneous physical address and may have recovered to be normal.
Step S300, extracting a data identifier according to the physical address to be confirmed;
and step S400, if the data identification is matched with a preset logical address, reconstructing table data by using the physical address to be confirmed to finish error correction.
The method comprises the steps that after a current terminal conducts repartition on bytes obtained after bit flipping operation to obtain a to-be-confirmed physical address which is recovered to be normal based on bit flipping, current terminal equipment conducts reading operation on the to-be-confirmed physical address to extract a data identifier from the to-be-confirmed physical address, then the current terminal equipment conducts comparison matching on the data identifier and a preset logical address (wherein the preset logical address is a logical address of source data mapped by a current wrong physical address), when the data identifier is detected to be matched with the preset logical address, the to-be-confirmed physical address is determined to be recovered aiming at the wrong physical address, the physical address obtained under normal recovery conditions is the correct mapping relation exists between the to-be-confirmed physical address and the logical address of the source data, and therefore the current terminal equipment replaces the wrong physical address by the confirmed physical address to rebuild a new data table And replacing the original data table with the new data table to finish error correction of the original data table.
Further, in a possible embodiment, the step S300 of extracting the data identifier according to the physical address to be confirmed may include:
step S301, executing a read operation for the physical address to be confirmed to detect whether the physical address to be confirmed carries a data identifier;
step S302, if yes, extracting the data identification.
After re-analyzing bytes formed by bit flipping to obtain a recovered normal physical address to be confirmed, the current terminal device performs a read operation on the physical address to be confirmed based on the existing mature storage address reading technology, thereby detecting whether redundant data representing a logical address of source data (a logical address of source data of a certain sector) mapped by the physical address is contained in the physical address to be confirmed, if the redundant data is detected to be contained in the physical address to be confirmed, marking the redundant data as a data identifier in the physical address to be confirmed, and extracting the data identifier for comparing whether the data identifier is matched with the logical address.
It should be noted that, in this embodiment, in the step S400, the preset logical address may be a logical address of source data mapped by the erroneous physical address (specifically, a logical address of source data of one sector, for example, logical addresses 0 to 7).
Further, referring to the detailed flowchart of step S400 shown in fig. 3, in a possible embodiment, in step S400, if the data identifier matches a preset logical address, reconstructing table data by using the physical address to be confirmed to complete error correction may include:
step S401, if it is detected that the data identifier is matched with a preset logical address mapped by the error physical address, determining that the physical address to be confirmed is recovered to be normal;
specifically, for example, the current terminal device performs a read operation for the physical address to be confirmed, so that from among the physical addresses to be confirmed, after marking the redundant data which represents the logical address of the source data mapped by the physical address (the redundant address represents the logical address of the first sector source data, namely logical addresses 0 to 7) as a data identifier and extracting the data identifier, the current terminal device compares the data identification with the logical addresses (logical addresses 0 to 7) of the source data to which the erroneous physical address is mapped, and detects that the data identification matches the logical address of the source data to which the incorrect physical address maps, that is, all represent logical addresses 0 to 7 of the first sector source data, the current terminal device determines that the physical address to be confirmed, which is recovered based on bit flipping of the byte identifying the erroneous physical address, is recovered to be normal.
Step S402, replacing the error physical address with the recovered normal physical address to be confirmed to construct and obtain new table data;
step S403, updating the mapping relation based on the new table data to complete error correction.
Specifically, for example, after determining that the physical address to be confirmed returns to normal, the current terminal device replaces all the erroneous physical addresses identified by the bytes before bit flipping one by returning all the confirmed physical addresses to normal, so as to reconstruct new table data not containing the erroneous physical addresses in an independent storage space of the storage device, and based on a new mapping relationship between the logical address of the source data and the physical address of the source data stored in the storage device, complete all error correction processes for the table data containing the erroneous physical addresses.
In this embodiment, when detecting that the storage device repeatedly generates an error that cannot be corrected by itself for table data (the table data is used to represent a mapping relationship between a logical address of source data and a physical address of the source data in the storage device), an erroneous physical address where an error occurs among a plurality of physical addresses (each physical address is identified in a byte form) encapsulated by the table data is detected and determined, then, a byte identifying the erroneous physical address is bit-reversed, a new byte obtained through the bit reversal is re-analyzed to obtain a legal physical address to be confirmed, a data identifier is extracted from the physical address to be confirmed, then whether the data identifier matches with a preset logical address is compared, and when the data identifier matches with the preset logical address is compared, the table data is reconstructed by using the physical address to be confirmed to update the mapping relationship, thereby completing error correction of the table data for the re-read error.
Compared with the existing mode of decoding and correcting errors only based on own hardware, the error correction method of the table data of the embodiment of the invention has the advantages that by identifying the physical address mapped with the logical address of the source data in a byte form, therefore, based on the positioning of the physical address with the error, the byte corresponding to the physical address with the error is subjected to bit flipping to re-analyze and recover to obtain a new physical address, and the table data is reconstructed based on the new physical address to update the mapping relation, so that the error correction of the table data can be completed, the error correction of the table data with more errors of the physical address can be performed, the error correction process of the table data can be completed more quickly, the error correction efficiency of the table data is improved, and the situation that the storage device cannot correct errors of the table data with a large number of errors of the physical address based on hardware of the storage device and the source data is lost is effectively avoided.
In addition, referring to fig. 4, an embodiment of the present invention further provides an error correction system for table data, including:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining an error physical address in table data when the re-reading error of the table data is detected, and the error physical address is identified by a preset byte;
the correcting module is used for carrying out bit flipping on the bytes corresponding to the error physical address and analyzing the bytes again to obtain a physical address to be confirmed;
the extraction module is used for extracting a data identifier according to the physical address to be confirmed;
and the reconstruction module is used for reconstructing the table data by using the physical address to be confirmed to finish error correction if the data identification is matched with a preset logical address.
Preferably, the system for correcting an error in table data according to an embodiment of the present invention further includes:
the device comprises a collecting module, a storing module and a processing module, wherein the collecting module is used for collecting physical addresses of storage source data of the storage device into a set, identifying the physical addresses by bytes, and packaging the bytes to form table data, and the physical addresses comprise one or more items of channels, logical unit numbers, row addresses and cluster offsets.
Preferably, the system for correcting an error in table data according to an embodiment of the present invention further includes:
the detection module is used for detecting whether the table data is re-read in error after the storage device performs decoding and error correction on the table data based on the preset hardware error correction module.
Preferably, the preset logical address and the erroneous physical address have a mapping relationship with each other, and the reconfiguration module includes:
the first determining unit is used for determining that the physical address to be confirmed is recovered to be normal if the data identifier is detected to be matched with the preset logical address mapped by the wrong physical address;
the construction unit is used for replacing the error physical address with the recovered normal physical address to be confirmed so as to construct and obtain new table data;
and the updating unit is used for updating the mapping relation based on the new table data so as to complete error correction.
Preferably, the determining module includes:
the analyzing unit is used for sequentially analyzing the bytes in the table data to obtain the physical addresses of the byte identifiers;
the extraction unit is used for extracting the data identification according to the physical address of the byte identification;
and a second determining unit, configured to determine that the physical address of the current byte identifier is an erroneous physical address if the data identifier does not match a preset logical address.
Preferably, the correction module comprises:
the overturning unit is used for carrying out repartition on bytes formed by bit overturning to obtain a default physical address;
and the marking unit is used for marking the default physical address as a physical address to be confirmed if the default physical address is detected to be a legal address.
Preferably, the extraction module comprises:
a detection unit, configured to perform a read operation on the physical address to be confirmed to detect whether the physical address to be confirmed carries a data identifier;
and the extraction unit is used for extracting the data identification.
The steps implemented by the functional modules of the error correction device for table data in the present invention during operation can refer to the above embodiments of the error correction device method for table data, and are not described herein again.
In addition, an embodiment of the present invention further provides a terminal device, where the terminal device includes: the system comprises a memory, a processor and an error correction program of table data stored on the memory and capable of running on the processor, wherein the error correction program of the table data realizes the steps of the error correction method of the table data as described above when being executed by the processor.
The steps implemented when the error correction program of the table data running on the processor is executed may refer to various embodiments of the error correction method of the table data of the present invention, and are not described herein again.
Furthermore, an embodiment of the present invention further provides a computer storage medium applied to a computer, where the computer storage medium may be a non-volatile computer-readable computer storage medium, and the computer storage medium stores thereon an error correction program for table data, and the error correction program for table data implements the steps of the error correction method for table data as described above when executed by a processor.
The steps implemented when the error correction program of the table data running on the processor is executed may refer to various embodiments of the error correction method of the table data of the present invention, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a computer storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for error correction of tabular data, the method comprising:
when a re-reading error of table data is detected, determining an error physical address in the table data, wherein the error physical address is identified by bytes;
bit overturning is carried out on bytes corresponding to the wrong physical address, and the bytes are re-analyzed to obtain a physical address to be confirmed;
extracting a data identifier according to the physical address to be confirmed;
and if the data identification is matched with a preset logical address, reconstructing the table data by using the physical address to be confirmed to finish error correction.
2. The method for correcting error of table data according to claim 1, wherein before the step of determining the erroneous physical address in the table data when the re-reading error of the table data is detected, further comprising:
the physical addresses of the storage source data of the storage device are arranged into a set and identified by bytes, and the bytes are packaged to form table data, wherein the physical addresses comprise one or more items of channels, logical unit numbers, row addresses and cluster offsets.
3. The method for correcting error of table data according to claim 1, wherein before the step of determining the erroneous physical address in the table data when the re-reading error of the table data is detected, further comprising:
after the storage device performs decoding and error correction on the table data based on a preset hardware error correction module, detecting whether the table data is a reread error.
4. The method of correcting error of table data according to claim 1, wherein the predetermined logical address and the erroneous physical address have a mapping relationship with each other,
if the data identification is matched with a preset logical address, reconstructing table data by using the physical address to be confirmed to finish error correction, wherein the step comprises the following steps of:
if the data identification is detected to be matched with the preset logical address mapped by the wrong physical address, determining that the physical address to be confirmed is recovered to be normal;
replacing the error physical address with the recovered normal physical address to be confirmed to construct and obtain new table data;
and updating the mapping relation based on the new table data to complete error correction.
5. The method of correcting errors in table data according to claim 1, wherein the step of determining the erroneous physical address in the table data comprises:
sequentially analyzing bytes in the table data to obtain a physical address of the byte identifier;
extracting a data identifier according to the physical address of the byte identifier;
and if the data identifier is not matched with the preset logical address, determining that the physical address of the byte identifier is the wrong physical address.
6. The method for correcting errors in tabular data as set forth in claim 1, wherein said step of re-resolving to obtain a physical address to be confirmed comprises:
carrying out reanalysis on bytes formed by bit flipping to obtain a default physical address;
and if the default physical address is detected to be a legal address, marking the default physical address as a physical address to be confirmed.
7. The method for correcting errors in table data according to claim 1, wherein the step of extracting the data id according to the physical address to be confirmed comprises:
executing a reading operation aiming at the physical address to be confirmed so as to detect whether the physical address to be confirmed carries a data identifier or not;
and if so, extracting the data identification.
8. An error correction system for tabular data, comprising:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining an error physical address in table data when the re-reading error of the table data is detected, and the error physical address is identified by a preset byte;
the correcting module is used for carrying out bit flipping on the bytes corresponding to the error physical address and analyzing the bytes again to obtain a physical address to be confirmed;
the extraction module is used for extracting a data identifier according to the physical address to be confirmed;
and the reconstruction module is used for reconstructing the table data by using the physical address to be confirmed to finish error correction if the data identification is matched with a preset logical address.
9. A terminal device, characterized in that the terminal device comprises: a memory, a processor and an error correction program of table data stored on the memory and operable on the processor, the error correction program of table data implementing the steps of the error correction method of table data according to any one of claims 1 to 7 when executed by the processor.
10. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the error correction method of table data according to any one of claims 1 to 7.
CN202010847678.9A 2020-08-19 2020-08-19 Error correction method, system, equipment and storage medium for table data Active CN111984451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010847678.9A CN111984451B (en) 2020-08-19 2020-08-19 Error correction method, system, equipment and storage medium for table data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010847678.9A CN111984451B (en) 2020-08-19 2020-08-19 Error correction method, system, equipment and storage medium for table data

Publications (2)

Publication Number Publication Date
CN111984451A true CN111984451A (en) 2020-11-24
CN111984451B CN111984451B (en) 2024-09-06

Family

ID=73442960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010847678.9A Active CN111984451B (en) 2020-08-19 2020-08-19 Error correction method, system, equipment and storage medium for table data

Country Status (1)

Country Link
CN (1) CN111984451B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112634973A (en) * 2020-12-29 2021-04-09 合肥致存微电子有限责任公司 Data rereading method and system of storage medium, terminal device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066568A1 (en) * 2010-09-14 2012-03-15 Kabushiki Kaisha Toshiba Storage device, electronic device, and data error correction method
CN108804025A (en) * 2018-03-07 2018-11-13 深圳忆联信息系统有限公司 A kind of method and solid state disk for reducing flash memory and being detained mistake
CN109800179A (en) * 2019-01-31 2019-05-24 维沃移动通信有限公司 It obtains the method for data, send method, host and the embedded memory of data
CN111143111A (en) * 2019-12-27 2020-05-12 深圳忆联信息系统有限公司 SSD mapping table protection mechanism verification method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120066568A1 (en) * 2010-09-14 2012-03-15 Kabushiki Kaisha Toshiba Storage device, electronic device, and data error correction method
CN108804025A (en) * 2018-03-07 2018-11-13 深圳忆联信息系统有限公司 A kind of method and solid state disk for reducing flash memory and being detained mistake
CN109800179A (en) * 2019-01-31 2019-05-24 维沃移动通信有限公司 It obtains the method for data, send method, host and the embedded memory of data
CN111143111A (en) * 2019-12-27 2020-05-12 深圳忆联信息系统有限公司 SSD mapping table protection mechanism verification method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112634973A (en) * 2020-12-29 2021-04-09 合肥致存微电子有限责任公司 Data rereading method and system of storage medium, terminal device and storage medium

Also Published As

Publication number Publication date
CN111984451B (en) 2024-09-06

Similar Documents

Publication Publication Date Title
CN106843942B (en) Wearable device and firmware upgrading method thereof
EP3401782B1 (en) File identification method and related device
CN111880736B (en) Solid state disk access method, device, equipment and medium
CN110837393A (en) Method and device for manufacturing firmware differential upgrade package and readable storage medium
CN110083360B (en) Compiling method, device, equipment and storage medium of application program code
CN104217165B (en) The processing method of file and device
CN112286565B (en) Embedded system differential upgrading method based on storage container
CN110209520B (en) Method and device for improving SSD (solid State disk) testing efficiency, computer equipment and storage medium
CN106776105B (en) System startup file checking and compiling method
CN112860473B (en) Method and device for positioning source code during program operation error and computing equipment
KR101860674B1 (en) Method, Server and Computer Program for Crash Report Grouping
CN106293621B (en) A kind of firmware upgrade method and device
CN111984451B (en) Error correction method, system, equipment and storage medium for table data
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
US20120066465A1 (en) Techniques for resolving read-after-write (raw) conflicts using backup area
US5590347A (en) Method and system for specifying alternate behavior of a software system using alternate behavior indicia
CN114385418A (en) Protection method, device, equipment and storage medium for communication equipment
US20150347234A1 (en) Recovery method for portable touch-control device and portable touch-control device using the same
CN112800194A (en) Interface change identification method, device, equipment and storage medium
CN109343800B (en) Storage device management method and device and readable storage medium
CN103235745B (en) A kind of address conflict detecting method and device
CN112540799A (en) Management method, system, terminal device and storage medium of startup data
WO2021139443A1 (en) Data access control method and apparatus, and data access device and system
CN112887328A (en) Sample detection method, device, equipment and computer readable storage medium
CN111552586A (en) Application crash processing method and device

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