CN113535682A - Data version management system, method, device and storage medium - Google Patents
Data version management system, method, device and storage medium Download PDFInfo
- Publication number
- CN113535682A CN113535682A CN202110833564.3A CN202110833564A CN113535682A CN 113535682 A CN113535682 A CN 113535682A CN 202110833564 A CN202110833564 A CN 202110833564A CN 113535682 A CN113535682 A CN 113535682A
- Authority
- CN
- China
- Prior art keywords
- data
- version
- version number
- branch
- managed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 239000002699 waste material Substances 0.000 claims abstract description 8
- 230000007246 mechanism Effects 0.000 claims description 45
- 238000007726 management method Methods 0.000 claims description 35
- 230000008859 change Effects 0.000 claims description 33
- 238000013499 data model Methods 0.000 claims description 15
- 239000002131 composite material Substances 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 3
- 238000005516 engineering process Methods 0.000 abstract description 2
- 230000008520 organization Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 4
- 229920002472 Starch Polymers 0.000 description 3
- 235000019698 starch Nutrition 0.000 description 3
- 239000008107 starch Substances 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2474—Sequence data queries, e.g. querying versioned data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses a data version management system, a method, equipment and a storage medium, relating to the data processing technology. The system comprises: a service layer and a storage layer; the service layer comprises a logical sublayer; the logic sublayer is used for managing and controlling data to be managed; the model sublayer stores a data branch table, and the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch; the logic sublayer comprises a snapshot assembly module, and the snapshot assembly module is connected with the model sublayer and is used for combining the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch. Embodiments of the present invention provide a data version management system, method, device, and storage medium, so as to reduce space waste and complexity of assembling data.
Description
Technical Field
Embodiments of the present invention relate to data processing technologies, and in particular, to a data version management system, method, device, and storage medium.
Background
The data representation of the composite structure is combined into a whole by multi-part data, for example, the organization tree is combined to be the composite structure, and is combined by a plurality of organizations, and for example, the employee information is combined to be the basic information, the family information, the position information and the like.
In the prior art, a version management scheme for data of a composite structure is as follows:
the first scheme is as follows: for each version of the historical snapshot, a copy of the data of the overall structure is saved.
Scheme II: for each version of the historical snapshot, only the changed part is saved and a version number field is recorded.
The above scheme has the following defects:
the first scheme is as follows: the part which is not changed is also repeatedly stored, and the space waste is large.
Scheme II: the snapshot data is complex to assemble, analysis needs to be performed according to the full amount of data, and version comparison is also complex.
Disclosure of Invention
Embodiments of the present invention provide a data version management system, method, device, and storage medium, so as to reduce space waste and complexity of assembling data.
In a first aspect, an embodiment of the present invention provides a data version management system, where the data version management system includes a service layer and a storage layer;
the storage layer stores a data model of data to be managed by using a database of a set type, supports data change and query, and is data of a composite structure;
the service layer is connected with the storage layer and is used for managing the data to be managed stored in the storage layer;
the service layer comprises a logic sublayer and a model sublayer, and the model sublayer defines a data model of data to be managed; the logic sublayer is used for managing and controlling data to be managed;
the model sublayer stores a data branch table, and the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch;
the logic sublayer comprises a snapshot assembly module, and the snapshot assembly module is connected with the model sublayer and is used for combining the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch.
In a second aspect, an embodiment of the present invention further provides a data version management method, which is applied to any snapshot assembly module in the embodiment of the present invention, where the method includes:
responding to a data assembly request of a target version, and determining data contents of each data branch related to the target version from each version of the recorded data to be managed according to a target version number, a starting version number and an ending version number of each data branch;
and combining the data content of each data branch associated with the target version to obtain the data to be managed of the target version.
In a third aspect, an embodiment of the present invention further provides a data version management method, which is applied to any version management module in the embodiment of the present invention, where the method includes:
initializing a data model, and loading each data branch of data to be managed;
setting the initial version number of the data branch according to the version information of the created data branch;
setting a termination version number of the data branch according to the version information of the waste data branch;
and recording the change information of the data to be managed and the data branch to which the change information belongs, and updating the initial version number or the ending version number of the data branch.
In a fourth aspect, an embodiment of the present invention further provides a data version management method, which is applied to any snapshot comparison module in the embodiment of the present invention, where the method includes:
responding to a data change information request between a first version and a second version, and determining data change information between the first version and the second version from each version data of the data to be managed according to a second version number, a starting version number and an ending version number of each data branch;
wherein the first version number is less than the second version number.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the embodiments of the invention.
In a sixth aspect, the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method according to any one of the embodiments of the present invention.
The embodiment of the invention stores a data branch table in a model sublayer, wherein the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch; the snapshot assembly module combines the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch, and the method can avoid the storage of repeated information because only the record of the change information is carried out each time, thereby reducing the space waste.
And determining the target version of each data branch according to the initial version number and the ending version number of each data branch, and combining the target versions of the data branches to obtain the data to be managed of the specified version. The method does not need to refer back version by version, thereby reducing the complexity of assembling data.
Drawings
Fig. 1 is a schematic structural diagram of a data version management system according to an embodiment of the present invention;
fig. 2 is a flowchart of a data version management method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a data version management method according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of an initial structure of a north branch structure tree according to a fifth embodiment of the present invention;
fig. 5 is a schematic diagram of an added structure of a north branch structure tree according to a fifth embodiment of the present invention;
fig. 6 is a schematic diagram of a modified structure of a north branch structure tree according to a fifth embodiment of the present invention;
fig. 7 is a schematic diagram of a deletion structure of a north branch structure tree according to a fifth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic structural diagram of a data version management system according to an embodiment of the present invention. The present embodiment is applicable to a case where historical version management is performed on data of a composite structure. Referring to fig. 1, a data version management system provided in an embodiment of the present application includes: a service layer and a storage layer;
the storage layer stores a data model of data to be managed by using a database of a set type, supports data change and query, and is data of a composite structure;
the service layer is connected with the storage layer and is used for managing the data to be managed stored in the storage layer;
the service layer comprises a logic sublayer and a model sublayer, and the model sublayer defines a data model of data to be managed; the logic sublayer is used for managing and controlling data to be managed;
the model sublayer stores a data branch table, and the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch;
the logic sublayer comprises a snapshot assembly module, and the snapshot assembly module is connected with the model sublayer and is used for combining the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch.
Wherein the start version indicates which version of the current mechanism tree the current record was created in, and the end version indicates which version of the current mechanism tree the current record was obsolete in.
In order to realize the recording of the change information of the data to be managed and the determination of the difference information of the data to be managed between the two versions, the logic sublayer further comprises: the system comprises a version management module and a snapshot comparison module;
the version management module is connected with the model sublayer and used for recording version change information of the data to be managed;
and the snapshot comparison module is connected with the model sublayer and is used for comparing the difference information of the data to be managed between the two versions.
Optionally, the type of the database may be any type, the data model of the data to be managed is any model of a composite structure, and typically, the type of the database is a relational database; and the data model of the data to be managed is a mechanism tree.
The embodiment of the invention stores a data branch table in a model sublayer, wherein the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch; the snapshot assembly module combines the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch, and the method can avoid the storage of repeated information because only the record of the change information is carried out each time, thereby reducing the space waste.
Example two
Fig. 2 is a flowchart of a data version management method according to a second embodiment of the present invention. The present embodiment is applicable to a case where historical version management is performed on data of a composite structure. The method may be applied to the snapshot assembly module described in the above embodiment, and the method described with reference to fig. 2 includes:
s110, responding to a data assembly request of the target version, and determining the data content of each data branch related to the target version from each version of the recorded data to be managed according to the target version number, the initial version number and the ending version number of each data branch.
And S120, combining the data content of each data branch associated with the target version to obtain the data to be managed of the target version.
Specifically, if the version number is incremented from 1, determining the data content of each data branch associated with the target version from each version of the recorded data to be managed according to the target version number, the start version number and the end version number of each data branch, includes:
comparing the target version number with the initial version number of each data branch, and comparing the target version number with the ending version number of each data branch;
and extracting the data branch of which the initial version number is less than or equal to the target version number and the termination version number is greater than the target version number or the termination version number is a null mark from the data branch table according to the comparison result, and taking the data content of the extracted data branch as the data content of each data branch related to the target version.
The technical scheme of the embodiment of the invention determines the target version of each data branch according to the initial version number and the ending version number of each data branch, and combines the target versions of each data branch to obtain the data to be managed of the specified version. The method does not need to refer back version by version, thereby reducing the complexity of assembling data.
EXAMPLE III
Fig. 3 is a flowchart of a data version management method according to a third embodiment of the present invention. The embodiment is applicable to the case of recording the change information of the data to be managed. The method is applied to the version management module in the above embodiment, and the method described with reference to fig. 3 includes:
s210, initializing a data model, and loading each data branch of the data to be managed.
S220, setting the initial version number of the data branch according to the version information of the created data branch.
And S230, setting the ending version number of the data branch according to the version information of the abandoned data branch.
S240, recording the change information of the data to be managed and the data branch to which the change information belongs, and updating the initial version number or the ending version number of the data branch.
According to the embodiment of the invention, the initial version number of the data branch is set according to the version information of the created data branch. And setting the termination version number of the data branch according to the version information of the waste data branch. And recording the change information of the data to be managed and the data branch to which the change information belongs, and updating the initial version number or the ending version number of the data branch, thereby realizing the recording of the change information of the data to be managed.
Example four
The embodiment can be applied to the situation of comparing the data difference between the two versions. The method can be applied to the snapshot comparison module in any embodiment of the present invention, and the method includes:
responding to a data change information request between a first version and a second version, and determining data change information between the first version and the second version from each version data of the data to be managed according to a second version number, a starting version number and an ending version number of each data branch;
wherein the first version number is less than the second version number.
Specifically, if the version number is incremented from 1, determining data change information between the first version and the second version from each version data of the data to be managed according to the second version number, the start version number and the end version number of each data branch, including:
comparing the second version number with the start version number of each data branch, and the second version number with the end version number of each data branch;
and extracting the data branch with the initial version number equal to the target version number or the ending version number equal to the target version number from the data branch table according to the comparison result, and taking the data content of the extracted data branch as the data change information between the first version and the second version.
According to the technical scheme of the embodiment of the invention, the data change information between the first version and the second version is determined from the data of each version of the data to be managed according to the number of the second version, the number of the initial version and the number of the ending version of each data branch, so that the determination of the data difference between the two versions is realized.
EXAMPLE five
The embodiment of the invention is an alternative scheme which is provided by taking the data type as a relational database and taking the data model as a mechanism tree as an example on the basis of the embodiment. The embodiment of the invention is used for analyzing the structure and the function of each module in the data version management system:
1. data model
The data model mainly comprises two tables, the first table in table 1 is a mechanism version table, each adjustment of each mechanism tree corresponds to a record in the table, the table has three fields, the field records of the mechanism tree are the mechanism trees corresponding to the current modification, the change description field is the description of the change and mainly comprises four types of changes of initializing, adding mechanisms, modifying mechanisms and deleting mechanisms, the version number is the number of the change of the mechanism tree, and each mechanism tree is increased from 1. Referring to table 2, the second is a mechanism table, a mechanism may have multiple records in the table, one record may be added for each modification, and the fields of the table mainly include a mechanism number, a parent mechanism number, basic information, other information, a start version indicating which version of the current mechanism tree the current record is created in, and a stop version indicating which version of the current mechanism tree the current record is discarded in, and if the current record is not discarded, null is set.
TABLE 1
TABLE 2
2. Version management
Initializing a mechanism tree: a record is added to the organization tree version table, the version number is set to be 1, all organizations are added to the organization table, the starting version number is set to be 1, and the ending version number is set to be null.
Adding a mechanism: adding a record to the mechanism tree version table, adding 1 to the version number, adding a new mechanism to the mechanism table, setting the initial version to be the version of the current mechanism tree added with 1, and setting the final version to be null.
Modifying a mechanism: adding a record to the mechanism tree version table, adding 1 to the version number, finding a mechanism to be modified with a null ending version in the mechanism table, setting the ending version as the version of the mechanism tree after adding 1, inserting the modified mechanism data, setting the initial version as the version of the mechanism tree after adding 1, and setting the null ending version as the null.
Deleting a mechanism: adding a record to the mechanism tree version table, adding 1 to the version number, finding a mechanism to be deleted with a null ending version in the mechanism table, and setting the ending version as the version number of the mechanism tree version added with 1.
3. Snapshot assembly: the snapshot assembly is to find out all data of a specified version of a certain organization tree and assemble the data into a tree structure, as long as all data of which the initial version is less than or equal to the specified version and the final version is greater than the specified version or null are found out and then the data are assembled, and the method specifically comprises the following steps
Select*from org
Where start version < ═ specified version
And (end version > specified version | | | end version ═ null)
4. Snapshot comparison: the snapshot comparison is to find a change part between two snapshots, for example, to find a difference between the snapshot of the organization tree with versions 2 and 3, as long as the organization with the initial version or the ending version 3 is queried, as follows
Select*from org
Where start-up version ═ specified version
Or terminating version-specified version
5. Version management deduction:
with reference to FIG. 4, the north-branch structure tree is initialized, and the initialized mechanism is shown in Table 3:
TABLE 3
Referring to fig. 5, with the addition of the L mechanism, the corresponding mechanism table is as in table 4:
TABLE 4
Father organization | Basic information | Other information | Initial edition | Terminating version | |
null | North score | … | 1 | null | |
A | Sea starch | … | 1 | null | |
A | Rising yang | … | 1 | null | |
B | Zhongguancun (China village) | … | 1 | null | |
B | Go up to the ground | … | 1 | null | |
C | Youth road | … | 2 | null |
Referring to fig. 6, the name of the B agency is changed from the sea lake to the sea lake zone, and the corresponding agency table is as shown in table 5:
TABLE 5
Mechanism | Father organization | Basic information | Other information | Initial edition | Terminating version |
A | null | North score | … | 1 | null |
B | A | Sea starch | … | 1 | 3 |
C | A | Rising yang | … | 1 | null |
D | B | Zhongguancun (China village) | … | 1 | null |
E | B | Go up to the ground | … | 1 | null |
L | C | Youth road | … | 2 | null |
B | A | Sea lake area | … | 3 | null |
Referring to fig. 7, the D mechanism is deleted and the corresponding mechanism table is shown in table 6:
TABLE 6
Mechanism | Father organization | Basic information | Other information | Initial edition | Terminating version |
A | null | North score | … | 1 | null |
B | A | Sea starch | … | 1 | 3 |
C | A | Rising yang | … | 1 | null |
D | B | Zhongguancun (China village) | … | 1 | 4 |
E | B | Go up to the ground | … | 1 | null |
L | C | Youth road | … | 2 | null |
B | A | Sea lake area | … | 3 | null |
Taking the data to be managed in table five, taking the target assembly version as 3 as an example, snapshot assembly may be described as follows:
and searching a data branch with the initial version number less than or equal to 3 and the terminal version number more than 3 or the terminal version number equal to null from the table five, namely the data branch corresponding to the A organization, the C organization, the D organization, the E organization, the L organization and the B organization with the basic information of the hai lake area. These data branches are combined to obtain the data to be managed with version number 3.
Taking the data to be managed in table five, taking the versions to be compared as 2 and 3 as examples, the snapshot comparison can be described as follows:
and searching a data branch with the starting version number equal to 3 or the ending version number equal to 3 from the table five, namely a data branch corresponding to the B organization with the basic information of the hai lake and the B organization with the basic information of the hai lake area. The data content corresponding to the two data branches is the difference data of the two versions.
EXAMPLE six
Fig. 8 is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention, as shown in fig. 8, the apparatus includes a processor 80, a memory 81, an input device 82, and an output device 83; the number of the processors 80 in the device may be one or more, and one processor 80 is taken as an example in fig. 8; the processor 80, the memory 81, the input device 82 and the output device 83 in the apparatus may be connected by a bus or other means, and the connection by a bus is exemplified in fig. 8.
The memory 81 is a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data version management method in the embodiment of the present invention. The processor 80 executes various functional applications of the device and data processing, i.e., implements the above-described data processing method, by executing software programs, instructions, and modules stored in the memory 81.
The memory 81 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 81 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 81 may further include memory located remotely from processor 80, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 82 may be used to receive entered numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 83 may include a display device such as a display screen.
EXAMPLE seven
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a data version management method, including:
responding to a data assembly request of a target version, and determining data contents of each data branch related to the target version from each version of the recorded data to be managed according to a target version number, a starting version number and an ending version number of each data branch;
and combining the data content of each data branch associated with the target version to obtain the data to be managed of the target version.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the data version management method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A data version management system is characterized by comprising a service layer and a storage layer;
the storage layer stores a data model of data to be managed by using a database of a set type, supports data change and query, and is data of a composite structure;
the service layer is connected with the storage layer and is used for managing the data to be managed stored in the storage layer;
the service layer comprises a logic sublayer and a model sublayer, and the model sublayer defines a data model of data to be managed; the logic sublayer is used for managing and controlling data to be managed;
the model sublayer stores a data branch table, and the table records the data content and the incidence relation of each data branch in the data to be managed and the initial version number and the ending version number of each data branch;
the logic sublayer comprises a snapshot assembly module, and the snapshot assembly module is connected with the model sublayer and is used for combining the data to be managed of the specified version according to the initial version number and the ending version number of each data branch and the data content and the incidence relation of each data branch.
2. The method of claim 1, wherein the logical sub-layer further comprises: the system comprises a version management module and a snapshot comparison module;
the version management module is connected with the model sublayer and used for recording version change information of the data to be managed;
and the snapshot comparison module is connected with the model sublayer and is used for comparing the difference information of the data to be managed between the two versions.
3. The method of claim 1, wherein the type of database is a relational database; and the data model of the data to be managed is a mechanism tree.
4. A data version management method applied to the snapshot assembly module of any one of claims 1 to 3, wherein the method comprises:
responding to a data assembly request of a target version, and determining data contents of each data branch related to the target version from each version of the recorded data to be managed according to a target version number, a starting version number and an ending version number of each data branch;
and combining the data content of each data branch associated with the target version to obtain the data to be managed of the target version.
5. The method according to claim 4, wherein if the version number is incremented from 1, determining the data content of each data branch associated with the target version from among the versions recording the data to be managed according to the target version number, the start version number and the end version number of each data branch comprises:
comparing the target version number with the initial version number of each data branch, and comparing the target version number with the ending version number of each data branch;
and extracting the data branch of which the initial version number is less than or equal to the target version number and the termination version number is greater than the target version number or the termination version number is a null mark from the data branch table according to the comparison result, and taking the data content of the extracted data branch as the data content of each data branch related to the target version.
6. A data version management method applied to the version management module of claim 2, the method comprising:
initializing a data model, and loading each data branch of data to be managed;
setting the initial version number of the data branch according to the version information of the created data branch;
setting a termination version number of the data branch according to the version information of the waste data branch;
and recording the change information of the data to be managed and the data branch to which the change information belongs, and updating the initial version number or the ending version number of the data branch.
7. A data version management method applied to the snapshot comparing module in claim 2, wherein the method comprises:
responding to a data change information request between a first version and a second version, and determining data change information between the first version and the second version from each version data of the data to be managed according to a second version number, a starting version number and an ending version number of each data branch;
wherein the first version number is less than the second version number.
8. The method of claim 7, wherein if the version number is incremented from 1, determining data change information between the first version and the second version from each version data of the data to be managed according to the second version number, the start version number and the end version number of each data branch comprises:
comparing the second version number with the start version number of each data branch, and the second version number with the end version number of each data branch;
and extracting the data branch with the initial version number equal to the target version number or the ending version number equal to the target version number from the data branch table according to the comparison result, and taking the data content of the extracted data branch as the data change information between the first version and the second version.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 4-8.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 4-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110833564.3A CN113535682B (en) | 2021-07-23 | 2021-07-23 | Data version management system, method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110833564.3A CN113535682B (en) | 2021-07-23 | 2021-07-23 | Data version management system, method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113535682A true CN113535682A (en) | 2021-10-22 |
CN113535682B CN113535682B (en) | 2024-05-17 |
Family
ID=78088736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110833564.3A Active CN113535682B (en) | 2021-07-23 | 2021-07-23 | Data version management system, method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113535682B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160147468A1 (en) * | 2014-11-21 | 2016-05-26 | Sandisk Enterprise Ip Llc | Data Integrity Enhancement to Protect Against Returning Old Versions of Data |
CN105677889A (en) * | 2016-01-30 | 2016-06-15 | 武汉大学 | Partial updating and reduction overall incremental updating method for spatial data |
CN110032613A (en) * | 2019-04-16 | 2019-07-19 | 重庆市地理信息中心 | A kind of space-time data integrated management method based on chain type storage |
CN110059096A (en) * | 2019-03-16 | 2019-07-26 | 平安城市建设科技(深圳)有限公司 | Data version management method, apparatus, equipment and storage medium |
CN111078269A (en) * | 2019-07-19 | 2020-04-28 | 华控清交信息科技(北京)有限公司 | Version management method, version recovery method, editor, system and storage medium |
CN112487198A (en) * | 2020-11-17 | 2021-03-12 | 中信银行股份有限公司 | Physical model processing method and device, electronic equipment and computer storage medium |
CN112612905A (en) * | 2020-12-28 | 2021-04-06 | 北京明略软件系统有限公司 | Elasticissearch-based data processing method, system, computer and readable storage medium |
-
2021
- 2021-07-23 CN CN202110833564.3A patent/CN113535682B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160147468A1 (en) * | 2014-11-21 | 2016-05-26 | Sandisk Enterprise Ip Llc | Data Integrity Enhancement to Protect Against Returning Old Versions of Data |
CN105677889A (en) * | 2016-01-30 | 2016-06-15 | 武汉大学 | Partial updating and reduction overall incremental updating method for spatial data |
CN110059096A (en) * | 2019-03-16 | 2019-07-26 | 平安城市建设科技(深圳)有限公司 | Data version management method, apparatus, equipment and storage medium |
CN110032613A (en) * | 2019-04-16 | 2019-07-19 | 重庆市地理信息中心 | A kind of space-time data integrated management method based on chain type storage |
CN111078269A (en) * | 2019-07-19 | 2020-04-28 | 华控清交信息科技(北京)有限公司 | Version management method, version recovery method, editor, system and storage medium |
CN112487198A (en) * | 2020-11-17 | 2021-03-12 | 中信银行股份有限公司 | Physical model processing method and device, electronic equipment and computer storage medium |
CN112612905A (en) * | 2020-12-28 | 2021-04-06 | 北京明略软件系统有限公司 | Elasticissearch-based data processing method, system, computer and readable storage medium |
Non-Patent Citations (1)
Title |
---|
韩敏;赵松龄;: "基于特征-版本的时空数据模型在湿地管理中的应用研究", 测绘科学, no. 06, 20 November 2007 (2007-11-20) * |
Also Published As
Publication number | Publication date |
---|---|
CN113535682B (en) | 2024-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10152513B2 (en) | Managing record location lookup caching in a relational database | |
US8396852B2 (en) | Evaluating execution plan changes after a wakeup threshold time | |
US8527556B2 (en) | Systems and methods to update a content store associated with a search index | |
US9378233B2 (en) | For all entries processing | |
US9110601B2 (en) | Backup lifecycle management | |
CN108875077B (en) | Column storage method and device of database, server and storage medium | |
US9519673B2 (en) | Management of I/O and log size for columnar database | |
CN106407360B (en) | Data processing method and device | |
CN109086382B (en) | Data synchronization method, device, equipment and storage medium | |
CN111221791A (en) | Method for importing multi-source heterogeneous data into data lake | |
CN109299101B (en) | Data retrieval method, device, server and storage medium | |
CN110134681B (en) | Data storage and query method and device, computer equipment and storage medium | |
CN111859132A (en) | Data processing method and device, intelligent equipment and storage medium | |
CN108376156A (en) | Create method, apparatus, server and the storage medium of database index | |
CN108629026A (en) | A kind of update method of full-text index, device, equipment and storage medium | |
CN111666302A (en) | User ranking query method, device, equipment and storage medium | |
CN113535682B (en) | Data version management system, method, device and storage medium | |
CN111897837A (en) | Data query method, device, equipment and medium | |
US10534761B2 (en) | Significant cleanse change information | |
CN112835905B (en) | Array type column indexing method, device, equipment and storage medium | |
JP2004145706A (en) | Multimedia data retrieval system | |
KR20230160051A (en) | User equipment for flashback of database and operating method therefor | |
CN108984720B (en) | Data query method and device based on column storage, server and storage medium | |
US11048692B2 (en) | Partition move in case of table update | |
CN114116723A (en) | Snapshot processing method and device and electronic equipment |
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 |