CN116594569A - Computer data clearing system and method based on second-hand mobile phone - Google Patents

Computer data clearing system and method based on second-hand mobile phone Download PDF

Info

Publication number
CN116594569A
CN116594569A CN202310668479.5A CN202310668479A CN116594569A CN 116594569 A CN116594569 A CN 116594569A CN 202310668479 A CN202310668479 A CN 202310668479A CN 116594569 A CN116594569 A CN 116594569A
Authority
CN
China
Prior art keywords
disk
data
reading
read
file
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.)
Pending
Application number
CN202310668479.5A
Other languages
Chinese (zh)
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 Shanhui Technology Co ltd
Original Assignee
Shenzhen Shanhui 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 Shenzhen Shanhui Technology Co ltd filed Critical Shenzhen Shanhui Technology Co ltd
Priority to CN202310668479.5A priority Critical patent/CN116594569A/en
Publication of CN116594569A publication Critical patent/CN116594569A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • 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
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a system and a method for clearing computer data based on a second hand mobile phone, which are characterized in that the read-write operation is carried out on a disk sector according to the disk information by acquiring the disk information of the second hand mobile phone, so as to determine the read-write performance of the disk information, if the read operation fails, bad blocks exist in part of the disk, if the read operation is normal, the Chinese book returns to the preset number of bytes read after the operation is finished, if the read operation is abnormal, the bad blocks exist in the disk, and the number of bytes returned after the read operation is finished is inconsistent with the preset number of bytes; before writing data into a disk, the original data is migrated and written back, the data written into the disk is read, the consistency of the read data and the pre-written data is compared, if the read data and the pre-written data are consistent, a bad block does not exist in a writing operation area in the disk, otherwise, the bad block exists in the area is judged, and the stored data are cleared or restored according to the disk information and the reading and writing performance, so that the accuracy of disk data detection and the safety of the data are improved.

Description

Computer data clearing system and method based on second-hand mobile phone
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a system and a method for clearing computer data based on a second hand mobile phone.
Background
In the information age, the important role of data is self-evident, the disk is used as a device for mainly storing data on a personal computer, and the stable operation of the disk provides powerful guarantee for the safety of the data. Many companies that initiate data recovery services are on the market, for different user needs and different degrees of recovery services, such as a largely divided hardware-based and software-based recovery-based service. However, the hardware recovery method requires a considerable technical means and special hardware recovery equipment, and accordingly, a user needs to pay a high price and invest a lot of time and effort, if a carrier of data information such as a magnetic disk is not damaged in a lot of physical properties, the software recovery method is a good choice, and for a personal user, the data recovery of the magnetic disk on a laptop is mostly performed in the software recovery method. Because various detection tools and data recovery software exist, but some operations are too complex, so that the user experience is poor, the selection and learning cost of the user can be increased, and even the risk of stealing important data of the user is increased, therefore, the important data in a second-hand mobile phone computer is required to be thoroughly cleared, and the safety of the user data is ensured.
Disclosure of Invention
In view of the above, the present invention provides a system and a method for clearing data based on a second hand mobile phone computer for improving data security and data detection accuracy of the second hand computer, which solve the above technical problems.
In a first aspect, the present invention provides a computer data clearing system based on a second hand mobile phone, comprising:
the disk information acquisition module is used for acquiring disk information of the secondhand computer, wherein the disk information comprises capacity, partition division and a file system;
the disk detection module is used for performing read-write operation on the disk sector according to the disk information to determine the read-write performance of the disk information, if the read operation fails, bad blocks exist in part of the disk, if the read operation is normal, the Chinese book returns to a preset read byte number, if the read operation is abnormal, the bad blocks exist in the disk, and the returned byte number after the read operation is finished is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
and the data clearing module is used for clearing or recovering the stored data according to the disk information and the read-write performance.
As a further improvement of the above technical solution, the disk detection module further includes during the read operation:
when the reading operation is carried out, counting the reading times of each block, when the reading times corresponding to the modules of the magnetic disk reach a preset threshold value, triggering the reading and refreshing operation of migration data, traversing the blocks containing valid pages of the current die, sorting the block numbers in ascending order according to the erasing times, sorting in descending order according to the reading times, and then respectively dividing the blocks into eight types for carrying out reverse matching to obtain the optimal reading times of each block;
matching the tolerable number of reads of the available migration block with the number of reads of the data page in the migration block, wherein the tolerable number of reads = optimal number of reads-current number of reads;
and traversing the valid pages in the migration blocks, performing page moving operation, and distributing data to the matched migration blocks.
As a further improvement of the above technical solution, the method includes the steps of sorting the block numbers in ascending order according to the number of erasures, sorting the block numbers in descending order according to the number of readings, and then respectively dividing the sorted block numbers into eight types for reverse matching to obtain the optimal number of readings of each block, including:
and respectively sorting the sequence numbers of the blocks containing the effective pages according to the ascending order of the reading times and the descending order of the error rate characteristics, and matching the blocks with low error rate and high reading times to obtain the latest reading times.
As a further improvement of the technical scheme, the optimal reading times are obtained through a mathematical model, n blocks are preset in a magnetic disk, each block has m pages, R ij 、P ij And W is ij The expression of the reading error rate generated by the reading interference is P, which are the reading times, the error rate and the error code number of the jth page in the ith block respectively ij =β i +α·R ij Where α is a constant related to the factory characteristics of the disk to reflect the positive effect of the number of reads on the bit error rate, β i Representing the specific attribute of the ith block, and measuring the difference of the original error rate of each block, namely the erasure times;
the expression that the reading error times of the pages caused by the reading interference depend on the reading times of other pages of the same block isWhere R and W represent the number of reads and the number of errors for the entire system.
As a further improvement of the technical scheme, the disk detection module comprises a read-write test unit, and the execution process of the read-write test unit comprises the following steps:
selecting the capacity of a test block, namely the number of bytes read by a reading function each time, positioning a reading pointer to a starting block of a magnetic disk, and reading the content of a block area into a buffer area by the reading function;
the read pointer is moved to the next block area and the operation is repeated until the last block is read.
As a further improvement of the above technical solution, the disk detection module further includes a data recovery unit, and an execution process of the data recovery unit includes:
reading a cluster operation list under the 80H attribute in the MFT list items, acquiring a starting cluster number and a cluster number of each cluster operation structure, and circularly traversing all the MFT list items in each section of MFT area;
acquiring an MFT table entry of a user file, constructing a node data structure, and reading a file name, a directory name, a file record reference number and a father directory file record reference number;
judging whether the record reference number of the parent directory file is 0x05, if so, the parent directory is a root directory, inserting the node under the root directory of the directory tree, and if not, turning to the next step;
obtaining the MFT list item according to the MFT reference number of the father catalog file, reading the file name or catalog name, adopting a search function to search whether the father catalog file exists in the constructed catalog tree, if yes, inserting the father catalog file into the catalog tree according to rules, otherwise, constructing a new node by the father catalog file, inserting the file node under the new node, continuously repeating the process until the MFT reference number of the father catalog is 0x05, judging the existence of the father catalog, inserting the father catalog file into the catalog tree according to rules, and if yes, returning to continuously reading the next MFT list item.
As a further improvement of the above technical solution, the directory tree reconstruction algorithm process includes:
when searching the directory tree, if the searched target is a directory node, when searching under one directory node, searching in the same layer sequence according to a preset searching mode, and if the file node is found in the child node, the subsequent node of the layer is the file node, and directly jumping to the next layer.
As a further improvement of the above technical solution, after the target tree structure is built, searching the target file in the stored binary directory tree, after finding the target file node, entering the corresponding MFT record start sector, storing the content of the read data attribute under the corresponding path, if the target is a folder, building a directory hierarchical structure under the new path in sequence, replying all file data under the directory file node, and storing to the built corresponding directory.
As a further improvement of the technical scheme, according to the initial cluster number information in the directory entry, the sub-directory entry needs to be searched in the initial sector, the information of the sub-directory entry is extracted to form a sub-node chain of the sub-directory entry, and the construction of all nodes is completed through recursion to form a file directory tree data structure.
In a second aspect, the invention also provides a system and a method for clearing computer data based on a second hand mobile phone, comprising the following steps:
acquiring disk information of a second-hand computer, wherein the disk information comprises capacity, partition division and a file system;
performing read-write operation on a disk sector according to disk information to determine the read-write performance of the disk information, if the read operation fails, partial bad blocks exist in the disk, if the read operation is normal, returning a Chinese book to a preset read byte number after the operation is completed, if the read operation is abnormal, determining that the bad blocks exist in the disk, and the returned byte number after the read operation is completed is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
and carrying out clearing or restoring operation on the stored data according to the disk information and the read-write performance.
The invention provides a system and a method for clearing computer data based on a second hand mobile phone, which are characterized in that the read-write operation is carried out on a disk sector according to the disk information by acquiring the disk information of the second hand mobile phone to determine the read-write performance of the disk information, if the read operation fails, bad blocks exist in part of the disk, if the read operation is normal, the Chinese book returns to the preset number of bytes read after the operation is finished, if the read operation is abnormal, the bad blocks exist in the disk, and the number of bytes returned after the read operation is finished is inconsistent with the preset number of bytes; before writing data into a disk, the original data is migrated and written back, the data written into the disk is read, the consistency of the read data and the pre-written data is compared, if the read data and the pre-written data are consistent, a bad block does not exist in a writing operation area in the disk, otherwise, the bad block exists in the area is judged, and the stored data are cleared or restored according to the disk information and the reading and writing performance, so that the accuracy of disk data detection and the safety of the data are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of a computer data clearing system based on a second hand mobile phone according to the present invention;
FIG. 2 is a flow chart of a read operation of the present invention;
FIG. 3 is a diagram illustrating the data recovery unit of the present invention;
fig. 4 is a flowchart of a computer data clearing method based on a second hand mobile phone according to the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
Referring to fig. 1, the invention provides a computer data clearing system based on a second hand mobile phone, comprising:
the disk information acquisition module is used for acquiring disk information of the secondhand computer, wherein the disk information comprises capacity, partition division and a file system;
the disk detection module is used for performing read-write operation on the disk sector according to the disk information to determine the read-write performance of the disk information, if the read operation fails, bad blocks exist in part of the disk, if the read operation is normal, the Chinese book returns to a preset read byte number, if the read operation is abnormal, the bad blocks exist in the disk, and the returned byte number after the read operation is finished is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
and the data clearing module is used for clearing or recovering the stored data according to the disk information and the read-write performance.
Referring to fig. 2, optionally, the disk detection module further includes, during the read operation:
s1: when the reading operation is carried out, counting the reading times of each block, when the reading times corresponding to the modules of the magnetic disk reach a preset threshold value, triggering the reading and refreshing operation of migration data, traversing the blocks containing valid pages of the current die, sorting the block numbers in ascending order according to the erasing times, sorting in descending order according to the reading times, and then respectively dividing the blocks into eight types for carrying out reverse matching to obtain the optimal reading times of each block;
s2: matching the tolerable number of reads of the available migration block with the number of reads of the data page in the migration block, wherein the tolerable number of reads = optimal number of reads-current number of reads;
s3: and traversing the valid pages in the migration blocks, performing page moving operation, and distributing data to the matched migration blocks.
In this embodiment, the block numbers are sorted according to ascending order of the erasing times, descending order of the reading times, and then respectively divided into eight types for reverse matching to obtain the optimal reading times of each block, including: and respectively sorting the sequence numbers of the blocks containing the effective pages according to the ascending order of the reading times and the descending order of the error rate characteristics, and matching the blocks with low error rate and high reading times to obtain the latest reading times. Obtaining optimal reading times through a mathematical model, presetting n blocks in a magnetic disk, wherein each block has m pages, R ij 、P ij And W is ij The expression of the reading error rate generated by the reading interference is P, which are the reading times, the error rate and the error code number of the jth page in the ith block respectively ij =β i +α·R ij Where α is a constant related to the factory characteristics of the disk to reflect the positive effect of the number of reads on the bit error rate, β i Representing the specific attribute of the ith block, and measuring the difference of the original error rate of each block, namely the erasure times; the expression that the reading error times of the pages caused by the reading interference depend on the reading times of other pages of the same block is Wherein R and W represent the wholeThe number of reads and the number of errors of the system.
The disk is accessed in sectors, each sector generally contains 512 bytes, and when the disk is operated, the disk rotates at a high speed about the spindle, and the magnetic head is approximately floating in an air layer having a short distance from the disk. The writing operation is performed on the disk sector, which can cover and destroy the original data of the sector, so that the protection of the original data needs to be considered, the original data needs to be migrated to other places before the data is written, the original data is written back after the operation is completed, and the abnormal conditions need to be captured and further processed when the program is operated for processing some abnormal conditions such as sudden program termination, exiting and the like, so that the data is ensured to be written back to the original position in time. After the writing operation is completed, the data written into the disk needs to be read in time, and finally, the consistency of the read data and the data which are ready to be written in advance is compared. And if the two conditions are consistent, indicating that no bad block exists in the area, otherwise, judging that the bad block exists in the area, and then carrying out subsequent processing. The detection of the bad blocks needs to increase time cost, and the original data can not be damaged by adding the buffer protection, so that the read-write frequency is increased. Before data is cleared, the storage medium in the second-hand mobile phone or the computer needs to be detected, data is recovered or important data such as an operating system is extracted, so that the safety of the data is ensured.
Optionally, the disk detection module includes a read-write test unit, and the execution process of the read-write test unit includes:
selecting the capacity of a test block, namely the number of bytes read by a reading function each time, positioning a reading pointer to a starting block of a magnetic disk, and reading the content of a block area into a buffer area by the reading function;
the read pointer is moved to the next block area and the operation is repeated until the last block is read.
In this embodiment, the read-write performance is a very important performance index of the disk, and the disk in the computer needs to continuously meet frequent operation processing of the user in daily life, and the read-write performance of the disk directly affects user experience, and the read-write performance of the disk is mainly shown in the following way; continuous read-write and random read-write. The read-write performance test is mainly used for testing the average continuous read-write speed of the magnetic disk, the performance of the magnetic disk is intuitively reflected by drawing a test graph, the read test is used for counting the number of bytes which are completed by the read operation in unit time, and the write test is similar to the read test except that the direct write operation can destroy the data in the magnetic disk. When testing, a new file is established, data writing is carried out on the new file, and the file is deleted after the data writing is finished, so that the original data can be prevented from being destroyed, and the target size of the file has a certain influence on the test result because of the discontinuous condition of the large file in the disk storage, the files with different sizes can be established, and the problem can be reflected by testing a group of files.
Referring to fig. 3, optionally, the disk detection module further includes a data recovery unit, and the execution process of the data recovery unit includes:
s10: reading a cluster operation list under the 80H attribute in the MFT list items, acquiring a starting cluster number and a cluster number of each cluster operation structure, and circularly traversing all the MFT list items in each section of MFT area;
s11: acquiring an MFT table entry of a user file, constructing a node data structure, and reading a file name, a directory name, a file record reference number and a father directory file record reference number;
s12: judging whether the record reference number of the parent directory file is 0x05, if so, the parent directory is a root directory, inserting the node under the root directory of the directory tree, and if not, turning to the next step;
s13: obtaining the MFT list item according to the MFT reference number of the father catalog file, reading the file name or catalog name, adopting a search function to search whether the father catalog file exists in the constructed catalog tree, if yes, inserting the father catalog file into the catalog tree according to rules, otherwise, constructing a new node by the father catalog file, inserting the file node under the new node, continuously repeating the process until the MFT reference number of the father catalog is 0x05, judging the existence of the father catalog, inserting the father catalog file into the catalog tree according to rules, and if yes, returning to continuously reading the next MFT list item.
In this embodiment, the directory tree reconstruction algorithm process includes: when searching the directory tree, if the searched target is a directory node, when searching under one directory node, searching in the same layer sequence according to a preset searching mode, and if the file node is found in the child node, the subsequent node of the layer is the file node, and directly jumping to the next layer. After the target tree structure is built, searching a target file in a stored binary directory tree, after finding a target file node, entering a corresponding MFT record starting sector, storing the content of the read data attribute under a corresponding path, if the target is a folder, sequentially building a directory hierarchical structure under a new path, replying all file data under the directory file node, and storing the file data into an established corresponding directory. According to the initial cluster number information in the directory entry, the sub-directory entry needs to be searched in the initial sector, the information of the sub-directory entry is extracted to form a sub-node chain of the sub-directory entry, and the construction of all nodes is completed through recursion to form a file directory tree data structure.
It should be noted that, the information in the MFT file record is stored in a file attribute manner, each attribute corresponds to an attribute number, for example, the file name attribute is 30H, the data attribute is 80H, and the attribute value can be directly stored in the MFT table, because each MFT table entry has a fixed size of 1KB, sometimes the MFT table entry space is tensed due to more attribute data content, at this time, another disk cluster can be allocated by the system to store the data, and index information of the data storage positions is reserved in the MFT table entry.
Referring to fig. 4, the invention also provides a system and a method for clearing computer data based on a second hand mobile phone, comprising the following steps:
s20: acquiring disk information of a second-hand computer, wherein the disk information comprises capacity, partition division and a file system;
s21: performing read-write operation on a disk sector according to disk information to determine the read-write performance of the disk information, if the read operation fails, partial bad blocks exist in the disk, if the read operation is normal, returning a Chinese book to a preset read byte number after the operation is completed, if the read operation is abnormal, determining that the bad blocks exist in the disk, and the returned byte number after the read operation is completed is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
s22: and carrying out clearing or restoring operation on the stored data according to the disk information and the read-write performance.
In this embodiment, the detection result is that the bad area condition of the sector unit needs to be displayed, the bad sector table is counted, in order to show the obvious effect visually, the size of the bad block needs to be defined, and from the viewpoint of the detection efficiency, the detection needs to be considered to be performed in units of disk blocks which are much larger than the sector capacity. The bad block size is an integer multiple of the sector, and can be changed according to actual conditions, if the capacity of the whole magnetic disk is changed greatly, two different magnetic disks are tested, and experience effects are different. Since the detected disc cheering coverage rate is usually not high in practice, if the capacity of the selected detection unit is smaller, the number of times of misoperation on the disc in detection will be increased, which will affect the detection efficiency, and the capacity of the detection unit, namely the selection of the size of the bad block is also important, for example, the size of the bad block can be 1M, 100K, etc., and the bad block only exists in the detection process and is detected according to the unit size, which can be regarded as dividing the disc into a plurality of detection units with limited number, thereby improving the accuracy of disc data detection and the security of data.
Any particular values in all examples shown and described herein are to be construed as merely illustrative and not a limitation, and thus other examples of exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The above examples merely represent a few embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the present invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention.

Claims (10)

1. A computer data clearing system based on a second hand mobile phone, comprising:
the disk information acquisition module is used for acquiring disk information of the secondhand computer, wherein the disk information comprises capacity, partition division and a file system;
the disk detection module is used for performing read-write operation on the disk sector according to the disk information to determine the read-write performance of the disk information, if the read operation fails, bad blocks exist in part of the disk, if the read operation is normal, the Chinese book returns to a preset read byte number, if the read operation is abnormal, the bad blocks exist in the disk, and the returned byte number after the read operation is finished is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
and the data clearing module is used for clearing or recovering the stored data according to the disk information and the read-write performance.
2. The second hand mobile phone based computer data clearing system of claim 1, wherein the disk detection module further comprises during the read operation:
when the reading operation is carried out, counting the reading times of each block, when the reading times corresponding to the modules of the magnetic disk reach a preset threshold value, triggering the reading and refreshing operation of migration data, traversing the blocks containing valid pages of the current die, sorting the block numbers in ascending order according to the erasing times, sorting in descending order according to the reading times, and then respectively dividing the blocks into eight types for carrying out reverse matching to obtain the optimal reading times of each block;
matching the tolerable number of reads of the available migration block with the number of reads of the data page in the migration block, wherein the tolerable number of reads = optimal number of reads-current number of reads;
and traversing the valid pages in the migration blocks, performing page moving operation, and distributing data to the matched migration blocks.
3. The system for removing data from a second hand mobile phone based on computer data according to claim 2, wherein the steps of sorting the block numbers in ascending order of the number of erasures, in descending order of the number of reads, and then respectively dividing the sorted block numbers into eight types for reverse matching to obtain the optimal number of reads of each block, comprises:
and respectively sorting the sequence numbers of the blocks containing the effective pages according to the ascending order of the reading times and the descending order of the error rate characteristics, and matching the blocks with low error rate and high reading times to obtain the latest reading times.
4. The system for computer data clearing based on second hand mobile phone according to claim 2, wherein the optimal reading times are obtained through mathematical model, n blocks are preset in the magnetic disk, each block has m pages, R ij 、P ij And W is ij The expression of the reading error rate generated by the reading interference is P, which are the reading times, the error rate and the error code number of the jth page in the ith block respectively ij =β i +α·R ij Where α is a constant related to the factory characteristics of the disk to reflect the positive effect of the number of reads on the bit error rate, β i Representing the specific attribute of the ith block, and measuring the difference of the original error rate of each block, namely the erasure times;
the expression that the reading error times of the pages caused by the reading interference depend on the reading times of other pages of the same block isWherein R and W represent the number of reads and errors of the entire systemNumber of codes.
5. The system for removing data from a computer based on a second hand mobile phone according to claim 1, wherein the disk detection module comprises a read-write test unit, and the read-write test unit comprises:
selecting the capacity of a test block, namely the number of bytes read by a reading function each time, positioning a reading pointer to a starting block of a magnetic disk, and reading the content of a block area into a buffer area by the reading function;
the read pointer is moved to the next block area and the operation is repeated until the last block is read.
6. The system for removing data from a computer based on a second hand mobile phone according to claim 1, wherein the disk detection module further comprises a data recovery unit, and the execution process of the data recovery unit comprises:
reading a cluster operation list under the 80H attribute in the MFT list items, acquiring a starting cluster number and a cluster number of each cluster operation structure, and circularly traversing all the MFT list items in each section of MFT area;
acquiring an MFT table entry of a user file, constructing a node data structure, and reading a file name, a directory name, a file record reference number and a father directory file record reference number;
judging whether the record reference number of the parent directory file is 0x05, if so, the parent directory is a root directory, inserting the node under the root directory of the directory tree, and if not, turning to the next step;
obtaining the MFT list item according to the MFT reference number of the father catalog file, reading the file name or catalog name, adopting a search function to search whether the father catalog file exists in the constructed catalog tree, if yes, inserting the father catalog file into the catalog tree according to rules, otherwise, constructing a new node by the father catalog file, inserting the file node under the new node, continuously repeating the process until the MFT reference number of the father catalog is 0x05, judging the existence of the father catalog, inserting the father catalog file into the catalog tree according to rules, and if yes, returning to continuously reading the next MFT list item.
7. The second hand mobile phone based computer data clearing system of claim 6, wherein the directory tree reconstruction algorithm process comprises:
when searching the directory tree, if the searched target is a directory node, when searching under one directory node, searching in the same layer sequence according to a preset searching mode, and if the file node is found in the child node, the subsequent node of the layer is the file node, and directly jumping to the next layer.
8. The system of claim 7, wherein after the target tree structure is constructed, searching a target file in a stored binary directory tree, after finding a target file node, entering a corresponding MFT record start sector, storing the content of the read data attribute under a corresponding path, if the target is a folder, sequentially building a directory hierarchical structure under a new path, replying all file data under the directory file node, and storing the file data in the built corresponding directory.
9. The system for removing computer data based on second hand mobile phone according to claim 7, wherein the sub-directory entry is searched in the initial sector according to the initial cluster number information in the directory entry, the information of the sub-directory entry is extracted to form a sub-node chain thereof, and the construction of all nodes is completed by recursion to form a file directory tree data structure.
10. A second hand mobile phone based computer data clearing method based on a second hand mobile phone computer data clearing system according to any one of claims 1-9, comprising the steps of:
acquiring disk information of a second-hand computer, wherein the disk information comprises capacity, partition division and a file system;
performing read-write operation on a disk sector according to disk information to determine the read-write performance of the disk information, if the read operation fails, partial bad blocks exist in the disk, if the read operation is normal, returning a Chinese book to a preset read byte number after the operation is completed, if the read operation is abnormal, determining that the bad blocks exist in the disk, and the returned byte number after the read operation is completed is inconsistent with the preset byte number; before writing data into a disk, migrating the original data and writing the original data back, reading the data written into the disk, comparing the consistency of the read data with the data written in advance, if so, judging that a bad block does not exist in a writing operation area in the disk, otherwise, judging that the bad block exists in the area, wherein the reading operation of the disk is that a reading instruction is sent by a reading function in a program, and then reading the disk equipment through a disk controller and a driving part;
and carrying out clearing or restoring operation on the stored data according to the disk information and the read-write performance.
CN202310668479.5A 2023-06-06 2023-06-06 Computer data clearing system and method based on second-hand mobile phone Pending CN116594569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310668479.5A CN116594569A (en) 2023-06-06 2023-06-06 Computer data clearing system and method based on second-hand mobile phone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310668479.5A CN116594569A (en) 2023-06-06 2023-06-06 Computer data clearing system and method based on second-hand mobile phone

Publications (1)

Publication Number Publication Date
CN116594569A true CN116594569A (en) 2023-08-15

Family

ID=87599142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310668479.5A Pending CN116594569A (en) 2023-06-06 2023-06-06 Computer data clearing system and method based on second-hand mobile phone

Country Status (1)

Country Link
CN (1) CN116594569A (en)

Similar Documents

Publication Publication Date Title
CN1760875B (en) Transparent migration of files among various types of storage volumes based on file access properties
US7290013B2 (en) Space allocation in a write anywhere file system
US5764880A (en) Method and system for rebuilding log-structured arrays
CN110399310B (en) Method and device for recovering storage space
KR100226614B1 (en) Built-in directory method for data compression of direct-access storage device and directory record
RU2008140263A (en) METHODS AND DEVICES FOR PREVIOUS MEMORY MANAGEMENT
CN103019887B (en) Data back up method and device
JP6156517B2 (en) Write information storage device, method, and program
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
US20080162591A1 (en) Method of Logging Transactions and a Method of Reversing a Transaction
CN113253932B (en) Read-write control method and system for distributed storage system
CN110222035A (en) A kind of efficient fault-tolerance approach of database page based on exclusive or check and journal recovery
CN111694520B (en) Method and device for optimizing big data storage
CN109445715B (en) Bad block processing method and device for combined block
CN116594569A (en) Computer data clearing system and method based on second-hand mobile phone
CN114281242B (en) Memory load balancing method, device and equipment
CN108021562B (en) Disk storage method and device applied to distributed file system and distributed file system
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
US20090187719A1 (en) Data backup method for logical volume manager
US9128823B1 (en) Synthetic data generation for backups of block-based storage
CN111880735A (en) Data migration method, device, equipment and storage medium in storage system
CN114706536B (en) Metadata management method and device, electronic equipment and readable storage medium
CN114063919B (en) Physical block allocation sequence acquisition method and data recovery method for SSD
CN113609249B (en) Target model simulation data storage method and device
CN1331147C (en) A disk storage method

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