CN109684421B - Graph theory-based method for engraving and restoring Oracle database file - Google Patents

Graph theory-based method for engraving and restoring Oracle database file Download PDF

Info

Publication number
CN109684421B
CN109684421B CN201811594848.6A CN201811594848A CN109684421B CN 109684421 B CN109684421 B CN 109684421B CN 201811594848 A CN201811594848 A CN 201811594848A CN 109684421 B CN109684421 B CN 109684421B
Authority
CN
China
Prior art keywords
block
current
executing
icur
data page
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
CN201811594848.6A
Other languages
Chinese (zh)
Other versions
CN109684421A (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.)
Xly Salvationdata Technology Inc
Original Assignee
Xly Salvationdata Technology Inc
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 Xly Salvationdata Technology Inc filed Critical Xly Salvationdata Technology Inc
Priority to CN201811594848.6A priority Critical patent/CN109684421B/en
Publication of CN109684421A publication Critical patent/CN109684421A/en
Application granted granted Critical
Publication of CN109684421B publication Critical patent/CN109684421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • 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)
  • Quality & Reliability (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 method for engraving and restoring Oracle database files based on graph theory, which comprises the following steps: s100: searching a data page block of an Oracle database in the idle area and counting into a set Addr; s200: sorting the data page blocks in the set Addr according to the ascending order of the data block IDs, and counting the data page blocks into a set NAddr; s300: putting the elements of the set NAddr into a directed acyclic graph, and calculating a relationship weight value of each combination; s400: according to the relation weight value, searching a path with the maximum sum of the weight values and the vertex not intersecting in the directed acyclic graph, if the path is searched, executing the step S500, otherwise, ending the flow; s500: and (3) verifying the path acquired in the step S400, if the condition is met, reserving, otherwise, discarding the current path and executing the step S400.

Description

Graph theory-based method for engraving and restoring Oracle database file
Technical Field
The invention belongs to the field of data recovery, and relates to a method for carving and recovering an Oracle database file based on graph theory.
Background
With the advent of the information age, data management and applications have been separated from databases. Database systems are one of the important components of computer application systems, and database technology is widely applied to various aspects such as data processing, information retrieval, artificial intelligence and the like, and is one of the necessary technologies for people working with computers.
The oracle corporation is one of the largest software providers in the world. Oracle Database, also known as Oracle RDBMS, or Oracle for short, is a relational Database management system of Oracle corporation. It is a product that has been in the lead in the database field. The Oracle database system is a popular relational database management system in the world at present, has good portability, convenient use and strong functions, and is suitable for various large, medium, small and microcomputer environments.
In the use process of the database, the database is damaged by misoperation, artificial malicious damage, software and hardware faults and other reasons, and important data are lost. At this time, the database is recovered, and it is important to retrieve the data.
The storage format of the Oracle database is a Oracle custom storage format, the means for normally checking data cannot extract and recover the database data of the destroyed structure, and the database processing technology in the prior art cannot rapidly and accurately copy the deleted and lost data of the Oracle in massive data.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for carving and replying Oracle database files based on graph theory, which comprises the steps of searching all Oracle database data page blocks in an idle area and sequencing in ascending order; then, putting all the data page blocks into the directed acyclic graph, and calculating the relation weight value of each combination in the directed acyclic graph; and searching a path with the maximum sum of weight values and no vertex intersection, and finally verifying whether the path accords with the correctness, so as to realize carving and restoring of the Oracle database file, wherein the terms possibly related to the invention are as follows for convenience of description:
cluster/block: the minimum management unit of the partition in the conventional file system consists of a continuous fixed number of sectors;
data files of the database: the method is characterized by comprising the following steps of referring to the general names of related files for recording the table structure and the actual data of a database;
data page: also called a data block, the minimum management unit in the data file of the database, the page size is an integer multiple of the sector;
data page block: a section consisting of one or more data pages that are physically contiguous is called a data page block;
zone: the structure formed by fixed number of data pages in the same data file is the minimum unit of the storage allocation of the database engine;
segment: the data of the data page object with independent storage structure is often divided into an index section, a data section, a rollback section and a temporary period according to different characteristics and purposes of the data to be stored.
Graph theory: the Graph Theory is a branch of mathematics. It takes the graph as the study object. A graph in a graph theory is a graph formed of a number of given points and lines connecting the two points, and this graph is generally used to describe a specific relationship between something, where the points represent something, and the lines connecting the two points represent that there is such a relationship between the corresponding two things.
The invention comprises the following steps:
s100: searching a data page block of an Oracle database in the idle area and counting into a set Addr;
s200: sorting the data page blocks in the set Addr according to the ascending order of the data block IDs, and counting the data page blocks into a set NAddr;
s300: putting the elements of the set NAddr into a directed acyclic graph, and calculating a relationship weight value of each combination;
s400: according to the relation weight value, searching a path with the maximum sum of the weight values and the vertex not intersecting in the directed acyclic graph, if the path is searched, executing the step S500, otherwise, ending the flow;
s500: and (3) verifying the path acquired in the step S400, if the condition is met, reserving, otherwise, discarding the current path and executing the step S400.
Preferably, step S100 comprises the steps of:
s101: aligning the idle area according to sectors with 512 bytes, setting the number of sectors in the idle area as nSec, setting a set Addr and an initial value as null, and setting a variable icur=0;
s102: setting a set piece addr { startAddr: -1; endAddr, -1; flag is NULL; startBlockNum:0, wherein flag 1 represents a data page block including a header, flag 2 represents a data page block not including a header, and flag 0 represents a truncated data page block;
S103:nSec=nSec-1;
s104: if nSec >0, then step S105 is performed, otherwise step S200 is performed;
s105: judging the first 30 bytes of each sector and performing corresponding operation, wherein the specific steps are as follows:
(1) the starting address of the current sector is backwards offset by 0x01, the content with the byte length of 1 byte is read as the byte length of a data block, if the current read content is any one of 0x62, 0x82, 0xA2 and 0xC2, the step (2) is executed, and otherwise, the step (5) is executed;
(2) the start address of the current sector is offset backward by 0x02 to read content of byte length 14 bytes,
if the current read content is 0x00000000C0FF 00000000000000000000, step (3) is performed,
otherwise, executing the step (6);
(3) piece addr.flag=1, piece addr.startaddr=icur, step (4) is performed;
(4) according to the byte length of the data block in the step (1), executing the following operation of the corresponding rule:
if the byte length is 0x62, it indicates that the corresponding data block size is 4 sectors, iCur=iCur+4, nSec=nSec-3;
if the byte length is 0x82, indicating that the corresponding data block size is 8 sectors, iCur=iCur+8, nSec=nSec-7;
if the byte length is 0xA2, indicating that the corresponding data block size is 16 sectors, icur=icur+16, nsec=nsec-15;
if the byte length is 0xC2, the corresponding data block size is 32 sectors; icur=icur+32, nsec=nsec-31;
step S103 is performed;
(5) if the piece addr is not equal to-1, piece addr is given by enaddr=icur-1, otherwise, icur=icur+1, step c is performed;
(6) the variables aflag=0, bflag=0, cflag=0, dflag=0;
(7) the starting address of the current sector is offset backwards by 0x00, and the content with the byte length of 1 byte is read and assigned to aFlag; backward shifting 0x08 from the starting address of the current sector, reading the content with the byte length of 2 bytes and assigning the content to bFlag; backward shifting 0x0E from the starting address of the current sector, reading the content with the byte length of 1 byte and assigning the content to the cFlag; the current aFlag, bFlag, cFlag values are combined into the format 0 xcflagafmagbflag and 0 xcflagafmagbflag is assigned to dFlag.
(8) Calculating a size blockSize of the data block according to the correspondence rule in step (4): backward shifting the blockSize-4bytes from the starting address of the current sector, and reading the content with the byte length of 4bytes as a value of the flag V;
(9) if dFlag is equal to flagV, icur=icur+1, step S103 is performed, otherwise step (5) is performed;
if the piece Addr is not equal to the initial value, assigning the start block number of the piece Addr to startBlockNum and counting the piece Addr into the set Addr, otherwise, executing step S102.
Preferably, step S300 comprises the steps of:
s301: obtaining each factor of the relation weight value, including:
the presence or absence of page ID repetition x between blocks: indicating whether there is a block number repetition between each combination, specifically, judging by calculating the start block number and the end block number of two data page blocks to be combined, the start block number being startBlockNum, the end block number= (endAddr-startAddr)/0 x2000 being rounded down;
inter-block spacing distance y: representing the difference of startAddr of two data page blocks;
inter-block skip accuracy z: representing the association relationship between two data page blocks, specifically, acquiring a segment number from data segment management information of one data page block, wherein the inter-block skip accuracy z is the probability that the current segment number appears in a plurality of data page blocks;
sum of block numbers u: representing the number of complete Oracle data blocks in the fragment blocks, and specifically, obtaining the number through a check value in the Oracle data blocks and an association relationship between block heads and block tails;
s302: calculating a relation weight value: the relationship weight p=ax+by+cz+du, wherein A, B, C, D is a percentage of not more than 100%;
s303: putting the relation weight value P into a set Q;
s304: and judging whether the calculation of the relation weight value P of all the data page blocks in the set NAddr is completed, if yes, executing the step S400, otherwise, executing the step S300.
Preferably, the specific steps of step S400 are as follows:
s401: acquiring a current maximum weight value from the set Q and taking the current maximum weight value as a starting point, and searching a path with the maximum sum of the weight values and disjoint vertexes;
s402: judging whether a path with the maximum sum of the searching weight values and disjoint vertexes exists or not, if so, executing the step S500, otherwise, executing the step S403;
s403: removing the current maximum weight value in the set Q, taking the next largest weight value in the set Q as the current maximum weight value, and executing step S404;
s404: and judging whether elements exist in the set Q, if so, executing the step S401, otherwise, ending the flow.
Preferably, the specific steps of step S500 are as follows:
s501: calculating cohesive weight value NP of each data page block in current path i =Rw+J v And NP is combined with i Counting into a set NPArr, wherein the cohesive weight value NP i Representing the degree of association of data page blocks, rw, J v Respectively the coefficient of the check value w and the start address v of the current data page block and Rw+J v Not more than 100%, i is the relative sequence number of the current data page block, wherein Rw, J v All are not more than 100 percent;
s502: calculate the average ave= (NP) of the set NPArr 1 +NP 2 +……+NP n ) N, wherein n is a natural number not less than 1;
s503: calculating variance VAR of current path 2 The following are provided:
VAR 2 =[(NP 1 -AVE) 2 +(NP 2 -AVE) 2 +……+(NP n -AVE) 2 ]/n;
s504: determining the current variance VAR 2 If the detected value is within the predetermined range, step 505 is executed, otherwise step 506 is executed;
s505: preserving current variance VAR 2 And eliminating all weight values in the current path from the directed acyclic graph, and executing step S400;
s506: and discarding the current path, and replacing all the weight values in the current path into the directed acyclic graph, and executing step S400 by taking the next largest weight value as the current maximum weight value.
The beneficial effects of the invention are as follows:
1. the method can carve and multiplex the database fragment segments with the database file heads;
2. the method can carve and multiplex the database fragment segments without database file heads;
3. the fragments of the database fragments for which the broken data blocks exist can be engraved back.
Drawings
FIG. 1 is a general flow chart of the method provided by the present invention;
FIG. 2 is a flowchart showing a method for searching a data page block of an Oracle database in a free area according to the present invention;
fig. 3 is a flowchart showing the verification of the acquired path in the present invention.
Detailed Description
Fig. 1 shows a general flow chart of the method provided by the invention.
As shown in fig. 1, the present invention includes the steps of:
s100: searching a data page block of an Oracle database in the idle area and counting into a set Addr; FIG. 2 is a flowchart showing a specific process for searching for a data page block of an Oracle database in a free area according to the present invention, and as shown in FIG. 2, step S100 includes the steps of:
s101: aligning the idle area according to sectors with 512 bytes, setting the number of sectors in the idle area as nSec, setting a set Addr and an initial value as null, and setting a variable icur=0;
s102: setting a set piece addr { startAddr: -1; endAddr, -1; flag is NULL; startBlockNum:0, wherein flag 1 represents a data page block including a header, flag 2 represents a data page block not including a header, and flag 0 represents a truncated data page block;
S103:nSec=nSec-1;
s104: if nSec >0, then step S105 is performed, otherwise step S200 is performed;
s105: judging the first 30 bytes of each sector and performing corresponding operation, wherein the specific steps are as follows:
(1) the starting address of the current sector is backwards offset by 0x01, the content with the byte length of 1 byte is read as the byte length of a data block, if the current read content is any one of 0x62, 0x82, 0xA2 and 0xC2, the step (2) is executed, and otherwise, the step (5) is executed;
(2) the starting address of the current sector is backwards offset by 0x02 to read the content with the byte length of 14 bytes, if the current read content is 0x00000000C0FF 00000000000000000000, executing the step (3), otherwise executing the step (6);
(3) piece addr.flag=1, piece addr.startaddr=icur, step (4) is performed;
(4) according to the byte length of the data block in the step (1), executing the following operation of the corresponding rule:
if the byte length is 0x62, it indicates that the corresponding data block size is 4 sectors, iCur=iCur+4, nSec=nSec-3;
if the byte length is 0x82, indicating that the corresponding data block size is 8 sectors, iCur=iCur+8, nSec=nSec-7;
if the byte length is 0xA2, indicating that the corresponding data block size is 16 sectors, icur=icur+16, nsec=nsec-15;
if the byte length is 0xC2, the corresponding data block size is 32 sectors; icur=icur+32, nsec=nsec-31;
step S103 is performed;
(5) if the piece addr is not equal to-1, piece addr is given by enaddr=icur-1, otherwise, icur=icur+1, step c is performed;
(6) the variables aflag=0, bflag=0, cflag=0, dflag=0;
(7) the starting address of the current sector is offset backwards by 0x00, and the content with the byte length of 1 byte is read and assigned to aFlag; backward shifting 0x08 from the starting address of the current sector, reading the content with the byte length of 2 bytes and assigning the content to bFlag; backward shifting 0x0E from the starting address of the current sector, reading the content with the byte length of 1 byte and assigning the content to the cFlag; the current aFlag, bFlag, cFlag values are combined into the format 0 xcflagafmagbflag and 0 xcflagafmagbflag is assigned to dFlag.
(8) Calculating the size blockSize of the data block according to the corresponding rule in the step (4): backward shifting the blockSize-4bytes from the starting address of the current sector, and reading the content with the byte length of 4bytes as a value of the flag V;
(9) if dFlag is equal to flagV, iCur=iCur+1, executing step S103, otherwise executing step (5);
if the piece Addr is not equal to the initial value, assigning the start block number of the piece Addr to startBlockNum and counting the piece Addr into the set Addr, otherwise, executing step S102.
S200: the data page blocks in the set Addr are ordered in ascending order of the data block IDs and counted into the set NAddr.
S300: placing the elements of the set NAddr into a directed acyclic graph and calculating a relationship weight value for each combination, step S300 includes the steps of:
s301: obtaining each factor of the relation weight value, including:
the presence or absence of page ID repetition x between blocks: indicating whether there is a block number repetition between each combination, specifically, judging by calculating the start block number and the end block number of two data page blocks to be combined, the start block number being startBlockNum, the end block number= (endAddr-startAddr)/0 x2000 being rounded down;
inter-block spacing distance y: representing the difference of startAddr of two data page blocks;
inter-block skip accuracy z: representing the association relationship between two data page blocks, in particular, acquiring a segment number from the data segment management information of one data page block, wherein the inter-block skip accuracy z is the probability that the current segment number appears in a plurality of data page blocks;
sum of block numbers u: representing the number of complete Oracle data blocks in the fragment blocks, and specifically, obtaining the number through a check value in the Oracle data blocks and an association relationship between block heads and block tails;
s302: calculating a relation weight value: in this embodiment, according to the importance degrees of a, B, C, and D, the importance degrees are respectively assigned to 35%,15%,45%, and 5%, that is, p=35% ×15% ×y+45% ×z+5% ×u, and the calculated weight P value is put into the set Q;
s303: putting the relation weight value P into a set Q;
s304: whether the calculation of the relation weight value P of all the data page blocks in the set NAddr is completed is judged, if yes, step S400 is executed, otherwise step S300 is executed.
S400: according to the relation weight value, searching a path with the maximum sum of the weight values and the vertex not intersecting in the directed acyclic graph, if the path is searched, executing the step S500, otherwise, ending the flow; the specific steps of step S400 are as follows:
s401: acquiring a current maximum weight value from the set Q and taking the current maximum weight value as a starting point, and searching a path with the maximum sum of the weight values and disjoint vertexes;
s402: judging whether a path with the maximum sum of the searching weight values and disjoint vertexes exists or not, if so, executing the step S500, otherwise, executing the step S403;
s403: removing the current maximum weight value in the set Q, taking the next maximum weight value in the set Q as the current maximum weight value, and executing step S404;
s404: whether an element exists in the set Q is judged, if yes, step S401 is executed, otherwise, the flow is ended.
S500: verifying the path acquired in step S400, if the condition is satisfied, preserving, otherwise, discarding the current path and executing step S400, and fig. 3 shows a specific flowchart of verifying the acquired path in the present invention, and as shown in fig. 3, the specific steps of step S500 are as follows:
s501: calculating individual data page blocks in the current pathCohesive weight value NP i =Rw+J v And NP is combined with i Counting into a set NPArr, wherein the cohesive weight value NP i Representing the degree of association of data page blocks, rw, J v Respectively the coefficient of the check value w and the start address v of the current data page block and Rw+J v Not more than 100%, i is the relative sequence number of the current data page block, wherein Rw, J v All are not more than 100 percent;
s502: calculate average ave= (NP) for the set NPArr 1 +NP 2 +……+NP n )/n;
S503: calculating variance VAR of current path 2 The following are provided:
VAR 2 =[(NP 1 -AVE) 2 +(NP 2 -AVE) 2 +……+(NP n -AVE) 2 ]/n;
s504: determining the current variance VAR 2 If the detected value is within the predetermined range, step 505 is executed, otherwise step 506 is executed;
s505: preserving current variance VAR 2 And eliminating all weight values in the current path from the directed acyclic graph, and executing step S400;
s506: and discarding the current path, and replacing all the weight values in the current path into the directed acyclic graph, and executing step S400 by taking the next largest weight value as the current maximum weight value.
The above range may be around a certain threshold, for example, within plus or minus 10% of a certain threshold.
The method solves the technical problem that a method for carving and restoring the Oracle database file does not exist in the prior art.
It is to be understood that the invention is not limited to the examples described above, and that modifications and variations may be effected in light of the above teachings by those skilled in the art, all of which are intended to be within the scope of the invention as defined in the appended claims.

Claims (2)

1. The method for engraving and restoring the Oracle database file based on the graph theory is characterized by comprising the following steps of:
s100: searching the data page blocks of the Oracle database in the free area and counting into a set Addr, wherein the step S100 comprises the following steps:
s101: aligning the idle area according to sectors with 512 bytes, setting the number of sectors in the idle area as nSec, setting a set Addr and an initial value as null, and setting a variable icur=0;
s102: setting a set piece addr { startAddr: -1; endAddr, -1; flag is NULL; startBlockNum:0, wherein flag 1 represents a data page block including a header, flag 2 represents a data page block not including a header, and flag 0 represents a truncated data page block;
S103:nSec=nSec-1;
s104: if nSec >0, then step S105 is performed, otherwise step S200 is performed;
s105: judging the first 30 bytes of each sector and performing corresponding operation, wherein the specific steps are as follows:
1 the starting address of the current sector is backwards offset by 0x01, reading the content with the byte length of 1 byte as the byte length of a data block, if the current read content is any one of 0x62, 0x82, 0xA2 and 0xC2, executing the step (2), otherwise executing the step (5);
2 the start address of the current sector is offset backward by 0x02 to read content of byte length 14 bytes,
if the current read content is 0x00000000C0FF0000000000000000, executing the step (3), otherwise executing the step (6);
3piece addr. Flag=1, piece addr. Startaddr=icur, step (4) is performed;
4, according to the byte length of the data block in the step (1), executing the following operation according to the corresponding rule:
if the byte length is 0x62, indicating that the corresponding data block size is 4 sectors, icur=icur+4,
nSec=nSec-3;
if the byte length is 0x82, indicating that the corresponding data block size is 8 sectors, then
iCur=iCur+8,nSec=nSec-7;
If the byte length is 0xA2, indicating that the corresponding data block size is 16 sectors,
iCur=iCur+16,nSec=nSec-15;
if the byte length is 0xC2, the corresponding data block size is 32 sectors;
iCur=iCur+32,nSec=nSec-31;
step S103 is performed;
5 if the piece addr is not equal to-1, piece addr is given by endaddr=icur-1, otherwise, icur=icur+1, executing step d;
the 6 variables aflag=0, bflag=0, cflag=0, dflag=0;
7, the starting address of the current sector shifts backwards by 0x00, reads the content with the byte length of 1 byte and assigns the content to aFlag; backward shifting 0x08 from the starting address of the current sector, reading the content with the byte length of 2 bytes and assigning the content to bFlag; backward shifting 0x0E from the starting address of the current sector, reading the content with the byte length of 1 byte and assigning the content to the cFlag; the current aFlag, bFlag, cFlag values are combined into the format 0 xcflagafmagbflag and 0 xcflagafmagbflag is assigned to dFlag.
8 calculating the size blockSize of the data block according to the corresponding rule in the step (4): backward shifting the blockSize-4bytes from the starting address of the current sector, and reading the content with the byte length of 4bytes as a value of the flag V;
9 if dFlag is equal to flagV, icur=icur+1, executing step S103, otherwise executing step (5);
if the piece Addr is not equal to the initial value, assigning the start block number of the piece Addr to startBlockNum and counting the piece Addr into the set Addr, otherwise, executing step S102;
s200: sorting the data page blocks in the set Addr according to the ascending order of the data block IDs, and counting the data page blocks into a set NAddr;
s300: placing the elements of the set NAddr into a directed acyclic graph, and calculating a relationship weight value of each combination, wherein the step S300 includes the following steps:
s301: obtaining each factor of the relation weight value, including:
the presence or absence of page ID repetition x between blocks: indicating whether there is a block number repetition between each combination, specifically, judging by calculating the start block number and the end block number of two data page blocks to be combined, the start block number being startBlockNum, the end block number= (endAddr-startAddr)/0 x2000 being rounded down;
inter-block spacing distance y: representing the difference of startAddr of two data page blocks;
inter-block skip accuracy z: representing the association relationship between two data page blocks, specifically, acquiring a segment number from data segment management information of one data page block, wherein the inter-block skip accuracy z is the probability that the current segment number appears in a plurality of data page blocks;
sum of block numbers u: representing the number of complete Oracle data blocks in the fragment blocks, and specifically, obtaining the number through a check value in the Oracle data blocks and an association relationship between block heads and block tails;
s302: calculating a relation weight value: the relationship weight p=ax+by+cz+du, wherein A, B, C, D is a percentage of not more than 100%;
s303: putting the relation weight value P into a set Q;
s304: judging whether the calculation of the relation weight value P of all the data page blocks in the set NAddr is completed, if yes, executing a step S400, otherwise, executing a step S300;
s400: according to the relation weight value, searching a path with the maximum sum of the weight values and the vertex not intersecting in the directed acyclic graph, if the path is searched, executing the step S500, otherwise, ending the flow;
s500: verifying the path acquired in the step S400, if the condition is satisfied, reserving, otherwise, discarding the current path and executing the step S400, wherein the specific steps of the step S500 are as follows:
s501: calculating cohesive weight value NP of each data page block in current path i =Rw+J v And NP is combined with i Counting into a set NPArr, wherein the cohesive weight value NP i Representing the degree of association of data page blocks, rw, J v Respectively the coefficient of the check value w and the start address v of the current data page block and Rw+J v Not more than 100%, i is the relative sequence number of the current data page block, wherein Rw, J v All are not more than 100 percent;
s502: calculate the average ave= (NP) of the set NPArr 1 +NP 2 +……+NP n ) N, wherein n is a natural number not less than 1;
s503: calculating variance VAR of current path 2 The following are provided:
VAR 2 =[(NP 1 -AVE) 2 +(NP 2 -AVE) 2 +……+(NP n -AVE) 2 ]/n;
s504: determining the current variance VAR 2 If the detected value is within the predetermined range, step 505 is executed, otherwise step 506 is executed;
s505: preserving current variance VAR 2 And eliminating all weight values in the current path from the directed acyclic graph, and executing step S400;
s506: and discarding the current path, and replacing all the weight values in the current path into the directed acyclic graph, and executing step S400 by taking the next largest weight value as the current maximum weight value.
2. The method for engraving and restoring an Oracle database file based on graph theory as claimed in claim 1, wherein the specific steps of the step S400 are as follows:
s401: acquiring a current maximum weight value from the set Q and taking the current maximum weight value as a starting point, and searching a path with the maximum sum of the weight values and disjoint vertexes;
s402: judging whether a path with the maximum sum of the searching weight values and disjoint vertexes exists or not, if so, executing the step S500, otherwise, executing the step S403;
s403: removing the current maximum weight value in the set Q, taking the next largest weight value in the set Q as the current maximum weight value, and executing step S404;
s404: and judging whether elements exist in the set Q, if so, executing the step S401, otherwise, ending the flow.
CN201811594848.6A 2018-12-25 2018-12-25 Graph theory-based method for engraving and restoring Oracle database file Active CN109684421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811594848.6A CN109684421B (en) 2018-12-25 2018-12-25 Graph theory-based method for engraving and restoring Oracle database file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811594848.6A CN109684421B (en) 2018-12-25 2018-12-25 Graph theory-based method for engraving and restoring Oracle database file

Publications (2)

Publication Number Publication Date
CN109684421A CN109684421A (en) 2019-04-26
CN109684421B true CN109684421B (en) 2023-05-02

Family

ID=66188291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811594848.6A Active CN109684421B (en) 2018-12-25 2018-12-25 Graph theory-based method for engraving and restoring Oracle database file

Country Status (1)

Country Link
CN (1) CN109684421B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870762A (en) * 1996-09-26 1999-02-09 Lee; Paul Error detection and recovery of database files
CN104361182A (en) * 2014-11-21 2015-02-18 中国人民解放军国防科学技术大学 Microprocessor micro system structure parameter optimization method based on Petri network
CN105447168A (en) * 2015-12-04 2016-03-30 四川效率源信息安全技术股份有限公司 Method for restoring and recombining fragmented files in MP4 format
CN105677797A (en) * 2015-12-31 2016-06-15 四川秘无痕信息安全技术有限责任公司 Fragment recombination method based on data similarity in JPEG picture files
CN106155840A (en) * 2015-05-11 2016-11-23 米克罗西斯特美信公司 The method and apparatus used when restructuring fragment jpeg image
CN106897322A (en) * 2015-12-21 2017-06-27 中国移动通信集团山西有限公司 The access method and device of a kind of database and file system
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870762A (en) * 1996-09-26 1999-02-09 Lee; Paul Error detection and recovery of database files
CN104361182A (en) * 2014-11-21 2015-02-18 中国人民解放军国防科学技术大学 Microprocessor micro system structure parameter optimization method based on Petri network
CN106155840A (en) * 2015-05-11 2016-11-23 米克罗西斯特美信公司 The method and apparatus used when restructuring fragment jpeg image
CN105447168A (en) * 2015-12-04 2016-03-30 四川效率源信息安全技术股份有限公司 Method for restoring and recombining fragmented files in MP4 format
CN106897322A (en) * 2015-12-21 2017-06-27 中国移动通信集团山西有限公司 The access method and device of a kind of database and file system
CN105677797A (en) * 2015-12-31 2016-06-15 四川秘无痕信息安全技术有限责任公司 Fragment recombination method based on data similarity in JPEG picture files
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Detecting Bugs of Concurrent Programs With Program Invariants;Rong Wang 等;《IEEE Transactions on Reliability》;20170404;第66卷(第2期);425-439 *
Oracle数据文件的文件雕复;武振东 等;《计算机工程》;20131015;第39卷(第10期);297-300 *
关系型数据库数据文件的碎片级恢复研究;黄旭 等;《警察技术》;20210307(第2期);67-71 *
基于图的DL-Lite本体不一致性处理方法的研究;付雪峰;《信息科技》;20170115(第01期);I138-31 *

Also Published As

Publication number Publication date
CN109684421A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN103034659B (en) A kind of method and system of data de-duplication
CN101963982B (en) Method for managing metadata of redundancy deletion and storage system based on location sensitive Hash
CN106815326B (en) System and method for detecting consistency of data table without main key
CN110569147B (en) Deleted file recovery method based on index, terminal device and storage medium
CN110555770B (en) Block chain world state checking and recovering method based on incremental hash
CN106980680B (en) Data storage method and storage device
CN109753382B (en) Recovery method and system for database deleted records
CN103049263B (en) Document classification method based on similarity
EP3522040B1 (en) Method and device for file storage
CN109656929B (en) Method and device for carving complex relation type database file
CN109344163B (en) Data verification method and device and computer readable medium
CN117076200B (en) Remote sensing data recovery method, device and storage medium based on metadata
CN109684421B (en) Graph theory-based method for engraving and restoring Oracle database file
CN111857603B (en) Data processing method and related device
CN111061428B (en) Data compression method and device
CN112181790A (en) Capacity statistical method and system of storage equipment and related components
CN116781699A (en) Data communication method and system based on distributed edge computing
CN108021472B (en) Format recovery method of ReFS file system and storage medium
CN116319815A (en) Cloud data placement policy management system introducing SaaS features
CN107943415B (en) Method and system for searching free cluster based on FAT file system
CN109697197B (en) Method for engraving and restoring Access database file
CN114138565A (en) Method and system for accelerating database backup
CN112698984A (en) Database recovery method of embedded device, electronic device and medium
CN112380174B (en) XFS file system analysis method containing deleted files, terminal device and storage medium
US11960451B2 (en) Method, computer-readable medium and file system for deduplication utilzing calculation range and re-chunking

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