CN111967027B - Method and device for safely storing and efficiently recovering data and computer equipment - Google Patents

Method and device for safely storing and efficiently recovering data and computer equipment Download PDF

Info

Publication number
CN111967027B
CN111967027B CN202010732656.8A CN202010732656A CN111967027B CN 111967027 B CN111967027 B CN 111967027B CN 202010732656 A CN202010732656 A CN 202010732656A CN 111967027 B CN111967027 B CN 111967027B
Authority
CN
China
Prior art keywords
data
file
information
data packet
sector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010732656.8A
Other languages
Chinese (zh)
Other versions
CN111967027A (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.)
Beijing Jianjingjian Technology Co ltd
Original Assignee
Beijing Jianjingjian 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 Beijing Jianjingjian Technology Co ltd filed Critical Beijing Jianjingjian Technology Co ltd
Priority to CN202010732656.8A priority Critical patent/CN111967027B/en
Publication of CN111967027A publication Critical patent/CN111967027A/en
Application granted granted Critical
Publication of CN111967027B publication Critical patent/CN111967027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/80Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in storage media based on magnetic or optical technology, e.g. disks with sectors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a method, a device and computer equipment for safe data storage and efficient data recovery, wherein the method comprises the following steps: s1: establishing an initialized data packet file, wherein the data packet file comprises storage information of the data packet file; s2: writing original data into the data packet file after data compression and encryption; s3: and when the original data cannot be read in the current file system, searching the storage information to position the position information of the data packet file in the hard disk, and recovering the encrypted file according to the position information. The software compiled by the technical scheme of the invention can protect the data security of the user to the maximum extent and prevent illegal information stealing and leakage; the data storage by using the technical scheme of the invention can simply and efficiently recover the data from the hard disk under the condition that the system can not be started normally or the data can not be read normally, and even any recovery software can not identify the partition file system.

Description

Method and device for safely storing and efficiently recovering data and computer equipment
Technical Field
The invention relates to the technical field of data security, in particular to a method, a device and computer equipment for data security storage and efficient recovery.
Background
As people rely on computers more and more, personal privacy disclosure events of users are also in endless, wherein most privacy disclosure events come from the disclosure of private data of computer hard disks of users at the root. It is thus easy to find out that the importance of the data is obvious, and once the data is corrupted or leaked, its loss will be enormous.
The prior art mainly has the following defects aiming at the backup encryption technology of hard disk data materials:
the technology of the hard disk protection card is adopted for protection, the hard disk protection card depends on installation of professional technicians, the flexibility is poor, and all important data are difficult to store under the background that the data volume of the existing hard disk is larger and larger;
the existing compact disk technology is adopted for data protection, the core of the method is that a data file is virtualized into a disk which can only be used as a storage system, the damage operation of deleting the file itself by virus and the like cannot be prevented, the stability and the transportability are poor, and the data recovery cannot be carried out;
in the prior art, as the technical scheme disclosed in CN01117730.6, there are cases where a file is damaged and data recovery cannot be performed, and sector write operation is required in the data recovery process, which may result in secondary coverage damage to the data and file loss even after recovery is completed.
Disclosure of Invention
The problems existing in the prior art are as follows: the data storage scheme in the prior art has the technical problems of poor safety, poor portability and incapability of data recovery.
In view of the defects in the prior art, in a first aspect, the present invention provides a method for safely storing and efficiently recovering data, including:
s1: establishing an initialized data packet file, wherein the data packet file comprises storage information of the data packet file;
s2: writing original data into the data packet file after data compression and encryption;
s3: and when the original data cannot be read in the current file system, searching the storage information to position the position information of the data packet file in the hard disk, and recovering the encrypted file according to the position information.
Further, the storing information includes: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information.
Further, the S3 specifically includes:
s3.1: searching and analyzing the storage information to acquire hard disk sector distribution information occupied by the data packet file;
s3.2: judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, continuing to read the data of the hard disk sector;
s3.3: and repeating the loop to execute S3.2 until the last sector of the hard disk.
Further, the S1 specifically includes:
establishing an independent storage space under the current file system; and distributing and recording the storage information according to a preset rule for the data written into the storage space.
Further, still include:
s4: and when the encrypted file in the data packet needs to be read, decompressing and decrypting the data packet file.
Further, still include: s5: and backing up the data packet file to a network disk through a network under a preset condition.
In a second aspect, the present invention provides a device for secure storage and efficient recovery of data, including:
the creating module is used for creating an initialized data packet file, and the data packet file comprises storage information of the data packet file;
the storage module is used for writing the original data into the data packet file after data compression and encryption;
and the recovery module is used for searching the storage information to locate the position information of the data packet file in the hard disk when the original data cannot be read in the current file system, and recovering the encrypted file according to the position information.
Further, the storing information includes: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information.
Further, the recovery module specifically includes:
the searching and analyzing module is used for searching and analyzing the storage information and acquiring the distribution information of the hard disk sector occupied by the data packet file;
the judging module is used for judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, continuing to read the data of the hard disk sector.
In a third aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The invention has the beneficial effects that:
the code software compiled by the method of the invention is realized by the application level, thereby greatly enhancing the stability of the system, having very good code portability and not depending on the support of hardware equipment.
Meanwhile, the method disclosed by the invention can support all operating systems by compiling software, an asymmetric encryption algorithm is used, the geometric grade of encryption strength is increased, and data backup can be carried out without password login.
The software compiled by the technical scheme of the invention can protect the data security of the user to the maximum extent and prevent illegal information stealing and leakage; the data storage by using the technical scheme of the invention can simply and efficiently recover the data from the hard disk under the condition that the system can not be started normally or the data can not be read normally, and even any recovery software can not identify the partition file system.
Drawings
FIG. 1 is a flow chart of a method for secure storage and efficient recovery of data according to the present invention;
FIG. 2 is a schematic flow chart of accessing data in the form of a physical disk in the method for secure storage and efficient recovery of data according to the present invention;
FIG. 3 is a schematic diagram illustrating a process of initializing the data package file in a method for secure storage and efficient recovery of data according to the present invention;
FIG. 4 is a schematic diagram illustrating the process of encrypting data in a method for secure storage and efficient recovery of data according to the present invention;
FIG. 5 is a schematic diagram illustrating a process of extracting data in a method for secure storage and efficient recovery of data according to the present invention;
FIG. 6 is a schematic diagram illustrating a self-checking process of recoverable information in a method for secure storage and efficient recovery of data according to the present invention;
fig. 7 is a schematic structural diagram of a data secure storage and efficient recovery apparatus according to the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular equipment structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
As shown in fig. 1, in a first aspect, the present invention provides a method for safely storing and efficiently recovering data, including:
s1: establishing an initialized data packet file, wherein the data packet file comprises storage information of the data packet file;
s2: writing original data into the data packet file after data compression and encryption;
s3: and when the original data cannot be read in the current file system, searching the storage information to position the position information of the data packet file in the hard disk, and recovering the encrypted file according to the position information.
The invention has the beneficial effects that:
the code software compiled by the method of the invention has the advantages that the codes are all realized in an application level, the stability of the system can be greatly enhanced, the portability of the codes is very good, and the support of hardware equipment is not needed.
Meanwhile, the method disclosed by the invention can support all operating systems by compiling software, an asymmetric encryption algorithm is used, the geometric grade of encryption strength is increased, and data backup can be carried out without password login.
The software compiled by the technical scheme of the invention can protect the data security of the user to the maximum extent and prevent illegal information stealing and leakage; the data storage by using the technical scheme of the invention can simply and efficiently recover the data from the hard disk under the condition that the system can not be started normally or the data can not be read normally, and even any recovery software can not identify the partition file system.
In some demonstrative embodiments, the storing of the information may include: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information. The association information and the end information represent the specific position of the encrypted file in the data area in a linked list mode. Wherein, the first sector of the data packet file is represented by the data structure of the logical sector 0 in the embodiment.
The data area is a data space for storing compressed and encrypted data.
In some illustrative embodiments, the S3 specifically includes:
s3.1: searching and analyzing the storage information to acquire hard disk sector distribution information occupied by the data packet file; wherein, the distribution information is stored in the form of a file physical sector distribution frame structure in the embodiment. Including the number of blocks of a packet, the number of sectors per block.
S3.2: judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, continuing to read the storage information;
s3.3: and repeating the loop to execute S3.2 until the last sector of the hard disk.
In some illustrative embodiments, S1 specifically includes:
establishing an independent storage space under the current file system; and distributing and recording the storage information according to a preset rule for the data written into the storage space.
In some preferred embodiments, further comprising:
s3.4: when obtaining the distribution information of the hard disk sector occupied by the data packet file, the hard disk sector distribution information is sequentially expanded by taking 16 bytes as a description item, wherein the description item represents the initial position and the size distribution information of one space distribution cluster of the data packet file in a hard disk, the first 8 bytes of the description item represent the initial physical sector of the current cluster, and the last 8 bytes of the description item represent the total number of sectors occupied by the current distribution cluster.
One sector size of the hard disk used in the present invention is 512 bytes.
As shown in fig. 2
The flow description of the physical disk form access data of the invention:
after the sector distribution information of the data packet in the hard disk is analyzed, the sector information is sequentially arranged in a mode of taking 16 bytes as a description unit item;
the first 8 bytes of each unit item are the initial physical sector number of the allocated cluster, and the last 8 bytes are the number of continuous sectors of the allocated cluster starting with the initial physical sector.
The sector arrangement information of the present invention conforms to the access pattern of the file content information from the head to the tail.
The following describes a specific data access flow:
for a 500M packet, when a user accesses data at NM locations in a file, the offset bytes first need to be calculated: n × 1024; wherein N is a positive integer.
Access to the data at NM is then achieved by using SetFilePointer to set the pointer to the offset byte position.
If the access is performed by using a physical disk, a user must calculate the specific position of the NM offset in the data packet file sector distribution information description item in the present application:
first, the user sets the starting physical sector number of the first description item as s 1 The number of consecutive sectors of the first description item is n 1 And the analogy is that: s 1 ,n 1 ;s 2 ,n 2 ;s 3 ,n 3 ;...s n ,n n .., where s n Starting physical sector number, n, representing the nth description item n The number of continuous sectors of the nth description item is shown, and n is a positive integer. The description item is the starting position and size distribution information of a disk space distribution cluster in the hard disk.
Then, circularly judging and comparing until the sum of the byte sizes of the data blocks corresponding to the first n description items is larger than the size of the offset byte to be accessed; and when the sum of the byte sizes of the data blocks corresponding to the current n description items is larger than the size of the offset byte to be accessed, considering that the specific position corresponding to the offset to be accessed exists in the data block corresponding to the current description item.
The calculation formula of the physical address sector number is as follows:
sector number = (N × 1024-S) n *512)/512+s n
Wherein n is a positive integer, S n Representing the sum of the number of sectors of the data block corresponding to n description items
S n =n 1 +n 2 +n 3 +……n n
Specifically, for example, a specific position of the 300M offset in the sector distribution information description item of the packet file described in the present application is found:
judgment and comparison n 1 *512 is greater than 300 x 1024; wherein, one sector corresponds to 512 bytes;
if yes, obtaining the specific position of the offset with the current first description item being 300M in the data packet file sector distribution information description item, if not, continuing to compare (n) 1 +n 2 ) Whether 512 is greater than 300 x 1024;
if yes, obtaining the specific position of the offset with the current second description item being 300M in the data packet file sector distribution information description item, and if yes, continuing to compare (n) 1 +n 2 +n 3 ) Whether 512 is greater than 300 x 1024;
……
and repeating the steps until the specific position of the offset of which the current nth description item is 300M in the sector distribution information description item of the data packet file is obtained.
If at the 5 th description position: (n) 1 +n 2 +n 3 +n 4 +n 5 )*512>300*1024*1024;
Then the offset of 300M is considered to be in the fifth data block at the specific location in the packet file sector distribution information description item described in this application.
Then the corresponding sector number is obtained as:
sector number = (300 × 1024- (n) 1 +n 2 +n 3 +n 4 +n 5 )*512)/512+s 5
Then, reading specific data according to the length of the required data, when the access data length exceeds the block to locate the maximum data information which can be provided by the last sector of the block, continuing to read the data of the next block, and so on until the required data is read.
In some demonstrative embodiments, the method further includes:
s4: and when the encrypted file in the data packet needs to be read, decompressing and decrypting the data packet file.
In some demonstrative embodiments, the method further includes: s5: and backing up the data packet file to a network disk through a network under a preset condition.
Example 1
Fig. 3 is a schematic diagram illustrating a process of initializing the data package file in a secure data storage and efficient data recovery method according to the present invention.
Firstly, judging whether the file definition size creation data packet is successful or not, and if not, reporting an error;
if the formatting is successful, whether the formatting is successful is continuously judged, and if the formatting is unsuccessful, an error is reported;
if the password is successfully set, continuously judging whether the password is set, if so, further judging whether the key is successfully generated, and if not, reporting an error;
if the process is successful, the process of initializing the data packet is ended.
In the process of initializing the data packet, an independent storage space needs to be established under the current file system; and distributing and recording the storage information according to a preset rule for the data written into the storage space.
Fig. 4 is a schematic diagram illustrating a process of encrypting stored data in a secure data storage and efficient data recovery method according to the present invention.
Firstly, reading original data needing to be stored in a data packet file;
the invention adopts the asymmetric encryption algorithm, can increase the intensity of data compression and encryption in geometric grade, and can carry out data backup without password login. (ii) a
Writing the encrypted data into the data packet file;
judging whether the residual space of the hard disk is enough, and if not, reporting an error;
if yes, continuing to judge whether the current data is completely written, and if not, returning to re-read the original data needing to be stored in the data packet file;
and if all the writing is finished, generating an encrypted file.
The encryption algorithm of the present invention combines the current mainstream encryption algorithms, such as: DES, 3DES, RC2, RC4, IDEA, RSA, AES, BLOWFSH, elGamal, deffie-Hellman, novel elliptic curve algorithm ECC, and the like. The invention randomly mixes and collocates the algorithms, and the KEY value used in the encryption algorithm is generated by the participation of the password.
Fig. 5 is a schematic diagram illustrating a process of extracting data in a method for secure storage and efficient recovery of data according to the present invention.
Firstly, reading encrypted data in the encrypted data packet file which needs to be decrypted originally;
decrypting and decompressing the data according to a decryption and decompression algorithm of the compression and encryption algorithm;
writing the decrypted data;
judging whether all data are read completely, and returning to read the original compressed encrypted data in the encrypted data packet file needing to be decrypted again if all data are not read completely;
and if all the reading is finished, generating a decryption file.
Fig. 6 is a schematic diagram illustrating a self-checking process of recoverable information in a method for secure storage and efficient recovery of data according to the present invention.
Firstly, judging whether the current boundary sector is correct or not, and exiting if the current boundary sector is correct; when judging, firstly, whether the frame format of the step size boundary data frame in the boundary sector is correct is determined, then according to the frame information of the step size boundary data frame, the distribution information of the physical sector of the magnetic disk stored in the current data packet in the frame format is further deduced, the distribution information of the physical sector of the magnetic disk of the current file is obtained again, and whether the current sector is the boundary sector is judged by judging whether the distribution information of the physical sector of the magnetic disk is the same or not.
If not, restoring the original data in the unavailable cluster; the subsequent searching of clusters meeting the boundary sector condition is facilitated;
searching clusters meeting the boundary sector condition in the distribution table and judging whether the boundary sector is successfully found, wherein in the searching process, the searching can be carried out according to the data of the step boundary data frame structure in the embodiment; if no boundary sector is found, further judging whether all the distribution tables are read, and if all the distribution tables are read, and no cluster meeting the boundary sector condition is found, reporting an error; if not reading all the distribution tables, continuously searching the clusters meeting the boundary sector condition in the distribution tables until reading all the distribution tables;
after the boundary sector is found successfully, a boundary sector distribution information frame is created, which can be created according to the structure of the step size boundary data frame in the embodiment, and the current boundary sector is set as an unavailable cluster;
the physical sector number of the boundary sector is then added to the fast positioning data frame. The method is convenient for directly positioning the data file subsequently, and saves the operation and time for searching the hard disk, thereby realizing positioning.
The functions in the software compiled based on the data safety storage and recovery method comprise:
CreatFile, readFile, writeFile, closeHandle, getFileSize, findFirstFile, findNextFile, rename, createDirectory, getFileAttribute, setFileAttribute, removeFile, etc
The functions executed by each function in the software compiled based on the data security storage and recovery method are as follows:
int CreatFile (char FileName, UINT CreateFlag): open or create file, return value: file operation handles;
int ReadFile (int fd, uloglong points, void Buffer, int Size): reading file data, and returning a value: the length of the file reading data;
int WriteFile (int fd, ulolong points, void Buffer, int Size): writing file data and returning a value; the length of the file write data;
BOOL CloseHandle (int fd): close file handle, return value: TRUE succeeds, FALSE fails;
ULONLONG GetFileSize (int fd): get file size, return value: the size of the file;
PFILE_FIND_INFO FindFirstFile(char*FileName,FILE_FIND_DATA*pFileData)
get query handle, return value: inquiring a structure pointer;
BOOL FindNextFile(FILE_FINA_INFO*pFileData,FILE_FIND_DATA*pFileData)
obtaining the information of the next query file and filling the attributes into the structure, returning the value, wherein TRUE succeeds and FALSE fails;
BOOL Rename (char: oldName, char: newName): modifying the file name, returning a value, wherein TRUE is successful, and FALSE is failed;
BOOL CreateDirectory (char path): create a directory, return the value: TRUE succeeds, FALSE fails;
UINT GetFileAttribute (char name): obtaining the file attribute, and returning the value: a file attribute value;
BOOL SetFileAttribute (char name, UINT Attribute): setting file attributes, returning values: TRUE succeeds, FALSE fails;
BOOL removeFile (char name): delete file, return value: TRUE succeeded and FALSE failed.
In order to improve the utilization rate of space, the data security storage and recovery method compresses the written data in a block or stream mode, and the compression algorithm uses the mature compression algorithm in the prior art, such as: zip, lzma, lz4, lzo, and so on. The invention adopts nearly 60 compression algorithms and is very convenient to use.
Brief introduction of the data frame structure of the present invention:
and (3) quickly positioning a frame structure:
data length Meaning of data
8 bytes First sector number pointing to positioning frame
8 bytes Second sector number pointing to positioning frame
4 bytes Number of data blocks
4 bytes Data frame checksum
4 bytes Creation time
4 bytes Frame mark
Step size boundary data frame structure:
data length Meaning of data
8 bytes First sector number pointing to disk information frame
8 bytes Second sector number pointing to disk information frame
8 bytes Total sector number of recovery data
4 bytes Number of data blocks
4 bytes Data frame checksum
4 bytes Creation time
4 bytes Frame mark
File physical sector distribution frame structure:
Figure BDA0002603876110000141
Figure BDA0002603876110000151
logical sector 0 structure information:
Figure BDA0002603876110000152
Figure BDA0002603876110000161
as shown in fig. 7, in a second aspect, the present invention provides a device for safely storing and efficiently recovering data, including:
a creating module 100, configured to create an initialized data package file, where the data package file includes storage information of the data package file;
the storage module 200 is used for writing the original data into the data packet file after data compression and encryption;
a recovering module 300, configured to search the storage information to locate location information of the data packet file in the hard disk when the original data cannot be read in the current file system, and recover the encrypted file according to the location information.
In some demonstrative embodiments, the storing information may include: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information.
In some illustrative embodiments, the recovery module specifically includes:
the searching and analyzing module is used for searching and analyzing the storage information and acquiring the distribution information of the hard disk sector occupied by the data packet file;
the judging module is used for judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, the storage information is continuously read.
In a third aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The software compiled by the data safety storage and recovery method of the invention comprises the following steps:
the data security of the user can be protected to the maximum extent, and illegal information stealing and leakage can be prevented;
under the condition that the system cannot be started normally or data cannot be read normally, and even any recovery software cannot identify the partition file system, the data backed up before can be recovered from the hard disk simply and efficiently;
the safety of computer data is realized in the true sense, and the method plays a vital role in the development of society and the economic progress.
Possible alternatives of the invention are: adopting a similar compressed packet format (common zip, wirrar, 7z and the like) to organize and manage files, modifying a large number of software codes to enable the compressed packet to support an access mode taking a sector as a unit, adding a hidden data segment, and storing disk distribution information of the compressed packet in a specific format, such as a data storage format of a file physical sector distribution frame structure in an embodiment; the method comprises the steps of obtaining physical sector distribution information of a compressed packet on a disk by a direct positioning or step length (the content of a sector at the step length can adopt a step length boundary data frame of the invention) searching and positioning mode, initializing a disk access mode, reading data and extracting the data.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a logistics management server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (8)

1. A method for safe storage and efficient recovery of data is characterized by comprising the following steps:
s1: establishing an initialized data packet file, wherein the data packet file comprises storage information of the data packet file;
s2: writing original data into the data packet file after data compression and encryption;
s3: when the original data cannot be read in the current file system, searching the storage information to position the position information of the data packet file in the hard disk, and recovering the encrypted file according to the position information;
the S3 specifically includes:
s3.1: searching and analyzing the storage information to acquire hard disk sector distribution information occupied by the data packet file;
s3.2: judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, continuing to read the data of the hard disk sector;
s3.3: and repeating the loop to execute S3.2 until the last sector of the hard disk.
2. The method of claim 1, wherein storing information comprises: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information.
3. The method according to claim 1, wherein S1 specifically comprises:
establishing an independent storage space under the current file system; and distributing and recording the storage information according to a preset rule for the data written into the storage space.
4. The method according to any one of claims 1 to 3, further comprising:
s4: and when the encrypted file in the data packet needs to be read, decompressing and decrypting the data packet file.
5. The method according to any one of claims 1 to 3, further comprising: s5: and backing up the data packet file to a network disk through a network under a preset condition.
6. A device for secure storage and efficient recovery of data, comprising:
the creating module is used for creating an initialized data packet file, and the data packet file comprises storage information of the data packet file;
the storage module is used for writing the original data into the data packet file after data compression and encryption;
the recovery module is used for searching the storage information to position the position information of the data packet file in the hard disk when the original data cannot be read under the current file system, and recovering the encrypted file according to the position information;
the recovery module specifically includes:
the searching and analyzing module is used for searching and analyzing the storage information and acquiring the distribution information of the hard disk sector occupied by the data packet file;
the judging module is used for judging whether the current sector is a boundary sector or not, and if so, finding the position information of the data packet file; if not, continuing to read the data of the hard disk sector.
7. The apparatus of claim 6, wherein the stored information comprises: the data packet file occupies hard disk sector distribution information, allocation table information and a data area, wherein the allocation table information is used for storing cluster position information stored in the sector by the data file, and association information and end information of each file cluster information.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in any one of claims 1 to 5 are implemented by the processor when executing the computer program.
CN202010732656.8A 2020-07-27 2020-07-27 Method and device for safely storing and efficiently recovering data and computer equipment Active CN111967027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010732656.8A CN111967027B (en) 2020-07-27 2020-07-27 Method and device for safely storing and efficiently recovering data and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010732656.8A CN111967027B (en) 2020-07-27 2020-07-27 Method and device for safely storing and efficiently recovering data and computer equipment

Publications (2)

Publication Number Publication Date
CN111967027A CN111967027A (en) 2020-11-20
CN111967027B true CN111967027B (en) 2022-12-02

Family

ID=73363043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010732656.8A Active CN111967027B (en) 2020-07-27 2020-07-27 Method and device for safely storing and efficiently recovering data and computer equipment

Country Status (1)

Country Link
CN (1) CN111967027B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751076A (en) * 2015-04-15 2015-07-01 四川神琥科技有限公司 Method for recovering disk data
CN104794024A (en) * 2015-04-15 2015-07-22 四川神琥科技有限公司 Data recovery method
CN108062262A (en) * 2017-12-25 2018-05-22 厦门市美亚柏科信息股份有限公司 Operating system backup-and-restore method and its system based on storage sector data
CN109871296A (en) * 2018-12-24 2019-06-11 航天信息股份有限公司 A kind of data back up method and system, data reconstruction method and system and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751076A (en) * 2015-04-15 2015-07-01 四川神琥科技有限公司 Method for recovering disk data
CN104794024A (en) * 2015-04-15 2015-07-22 四川神琥科技有限公司 Data recovery method
CN108062262A (en) * 2017-12-25 2018-05-22 厦门市美亚柏科信息股份有限公司 Operating system backup-and-restore method and its system based on storage sector data
CN109871296A (en) * 2018-12-24 2019-06-11 航天信息股份有限公司 A kind of data back up method and system, data reconstruction method and system and mobile terminal

Also Published As

Publication number Publication date
CN111967027A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
KR100749428B1 (en) Distributed data archive device, system and recording medium
US8751462B2 (en) Delta compression after identity deduplication
US7900061B2 (en) Method and system for maintaining backup of portable storage devices
US20150261779A1 (en) Stream locality delta compression
EP2363815B1 (en) System for permanent file deletion
WO2012063755A1 (en) Distributed archive system, data archive device, and data restoring device
US20110072115A1 (en) Block based access to a dispersed data storage network
US9405925B2 (en) Content item encryption on mobile devices
WO1999014652A1 (en) Encrypting file system and method
JP2006012192A (en) Distributed data archive system
CN109766215B (en) Data processing method and device
CN112612576B (en) Virtual machine backup method and device, electronic equipment and storage medium
CN112115002B (en) Method and device for recovering file from damaged or untrusted mechanical hard disk
CN101930521A (en) File protecting method and device thereof
WO2017026987A1 (en) Encrypted data chunks
CN102624545A (en) Data backup method, data backup device, data recovery method and data recovery device of network management system
CN111967027B (en) Method and device for safely storing and efficiently recovering data and computer equipment
CN116069729B (en) Intelligent document packaging method, system and medium
GB2482112A (en) Distributed data storage and recovery
Chavhan et al. Implementation of improved inline deduplication scheme for distributed cloud storage
CN104881489A (en) Steganography-based extensible hidden file system of carrier document library
CN111291387B (en) File protection method and file processing system thereof
KR20090012987A (en) Method for managing and restoring identifier of storage device and apparatus thereof
Alhussein et al. Forensics filesystem with cluster-level identifiers for efficient data recovery
JP5756959B2 (en) Distributed archive system and data archive 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