CN107665227A - A kind of data version control method and versions of data controller - Google Patents
A kind of data version control method and versions of data controller Download PDFInfo
- Publication number
- CN107665227A CN107665227A CN201710229586.2A CN201710229586A CN107665227A CN 107665227 A CN107665227 A CN 107665227A CN 201710229586 A CN201710229586 A CN 201710229586A CN 107665227 A CN107665227 A CN 107665227A
- Authority
- CN
- China
- Prior art keywords
- data
- database
- unit
- change collection
- latest edition
- 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
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/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Abstract
The present invention provides a kind of data version control method and versions of data controller.Methods described includes:Read the data in relevant database;The data are converted into intermediate form file by preset data structure;Read the data of the latest edition in data warehouse with the data under same branches;The data of data in intermediate form file after conversion and latest edition under same branches in the data warehouse of reading are contrasted to obtain change collection;The change collection renewal is arrived into relevant database to data warehouse or according to the database dialect template to prestore by the change collection renewal.Methods described and terminal are by increasing intermediate form file, data in relevant database are converted into intermediate form file, after the data of the intermediate form file and latest edition under same branches in data warehouse are contrasted, change collection renewal is arrived into relevant database to data warehouse or renewal, with the Version Control of implementation relation type data.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of data version control method and versions of data control
Device.
Background technology
Existing version control system such as git, Subversion etc. can only carry out Version Control to file, can not be to storage
Data in relevant database carry out Version Control.
The content of the invention
The invention provides a kind of data version control method and data Version Control device, it is possible to achieve to relational data
Data in storehouse carry out Version Control.
On the one hand, the invention provides a kind of data version control method, this method to include:
Read the data in relevant database;
The data are converted into intermediate form file by preset data structure;
Read the data of the latest edition in data warehouse with the data under same branches;
By the data in the intermediate form file after conversion and latest edition under same branches in the data warehouse of reading
Data are contrasted to obtain change collection;
The change collection renewal is collected more to data warehouse or according to the database dialect template to prestore by the change
Newly arrive relevant database.
On the other hand, the invention provides a kind of versions of data controller, the versions of data controller to include:
First reading unit, for reading the data in relevant database;
Converting unit, for the data to be converted into intermediate form file by preset data structure;
Second reading unit, read the data of the latest edition in data warehouse with the data under same branches;
Comparison unit, for by the data in the intermediate form file after conversion with read data warehouse in same branches
The data of lower latest edition are contrasted to obtain change collection, and the change collection has and intermediate form file identical data structure;
Updating block, for the change collection renewal to be arrived into relevant database according to the database dialect template to prestore,
Or data warehouse is arrived into the change collection renewal.
Method and terminal provided in an embodiment of the present invention, by increasing intermediate form file, by relevant database
Data are converted to intermediate form file, and the intermediate form file and the data of latest edition under same branches in data warehouse are carried out
After contrast, change collection renewal is arrived into relevant database to data warehouse or renewal, with the version control of implementation relation type data
System.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, it is required in being described below to embodiment to use
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area
For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow diagram of data version control method provided in an embodiment of the present invention;
Fig. 2 is an a kind of sub- schematic flow sheet of data version control method provided in an embodiment of the present invention;
Fig. 3 is an a kind of sub- schematic flow sheet of data version control method provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic flow diagram for data version control method that another embodiment of the present invention provides;
Fig. 5 is the schematic flow diagram of submission method provided in an embodiment of the present invention;
Fig. 6 is the schematic flow diagram of method for detecting provided in an embodiment of the present invention;
Fig. 7 is the schematic flow diagram of update method provided in an embodiment of the present invention;
Fig. 8 is the schematic flow diagram of restoring method provided in an embodiment of the present invention;
Fig. 9 is a kind of schematic flow diagram for data version control method that another embodiment of the present invention provides;
Figure 10 is the schematic flow diagram of merging method provided in an embodiment of the present invention;
Figure 11 is a kind of schematic block diagram of versions of data control system provided in an embodiment of the present invention;
Figure 12 is a kind of schematic block diagram of versions of data controller provided in an embodiment of the present invention;
Figure 13 is the schematic block diagram of converting unit provided in an embodiment of the present invention;
Figure 14 is the schematic block diagram of updating block provided in an embodiment of the present invention;
Figure 15 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides;
Figure 16 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides;
Figure 17 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides;
Figure 18 is a kind of schematic block diagram for versions of data controller that further embodiment of this invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example, belongs to the scope of protection of the invention.
It should be appreciated that ought be in this specification and in the appended claims in use, term " comprising " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but it is not precluded from one or more of the other feature, whole
Body, step, operation, element, component and/or its presence or addition for gathering.
It is also understood that refer in description of the invention to the term "and/or" used in appended claims related
Join any combinations of one or more of the item listed and be possible to combine, and including these combinations.
It should be noted that relevant database is referred to as database below.
Fig. 1 is a kind of schematic flow sheet of data version control method provided in an embodiment of the present invention.This method includes
S101~S105.
S101, the data in reading database.Wherein, the data in database include data dictionary and relational data.
Wherein, it is to read the relational data in table by traversal list to read relational data.Preferably, controlled in versions of data
In, if the data in first time reading database, then the data of reading include data dictionary and relational data.Read
Data dictionary can be stored in workspace, during data in follow-up reading database, if not being related to the variation of data dictionary,
Field is newly increased in such as table, increases new table, then does not need read data words allusion quotation, it is only necessary to read relational data.
When needing the data of data dictionary, read in workspace.
S102, the data are converted into intermediate form file by preset data structure.Preferably, preset data structure is
XML data structure, intermediate form file are XML files, and the transfer ability of data stored with XML file is very strong.It is to be appreciated that
The data of intermediate form file storage are the data dictionary and/or relational data after the conversion of XML data structure.Specifically
Ground, as shown in Fig. 2 S102 includes S201-S202.S201, read data words allusion quotation is to obtain table structure.Wherein, in data dictionary
The content for having table structure of storage.If the data read from database only have relational data, then are read from workspace
Data dictionary is to obtain table structure.S202, table structure and relational data are converted to by intermediate form by preset data structure
File.Wherein, preset data structure is XML data structure.
S103, read the data of the latest edition in data warehouse with the data under same branches.Wherein, the number of reading
The data belonged to according to the data in the data and database of the latest edition in warehouse under same branch, wherein, data warehouse
In data have and intermediate form file identical data structure.There may be other points in data warehouse in the data of latest edition
The data changed of user of branch, as the database under the branch have it is multiple, when other branches also use identical number therein
During according to storehouse, after the data of other branches have submitted new version, there is the user of other branches after the data renewal of the branch
The data changed.In other embodiments, the data of latest edition in data warehouse can also be first read, then reads identical point
Data in the database of reading are converted to intermediate form file by the data of the lower database of branch by preset data structure.
S104, by the data in the intermediate form file after conversion and latest edition under same branches in the data warehouse of reading
This data are contrasted to obtain change collection, and the change collection has and intermediate form file identical data structure.
S105, by the change collection renewal to data warehouse or according to the database dialect template to prestore by the change
Database is arrived in collection renewal.Wherein, it is the change collection renewal to data warehouse is new to become one in data warehouse
Version.The change collection is updated to database to update or reduce forked working area according to the database dialect template to prestore
In content.As shown in figure 3, the change collection renewal is included by S301- to database according to the database dialect template to prestore
S304.S301, obtain type of database and version.Wherein, can be obtained by the type of database in reading database and version
Take, can also to obtain, (edition data in data warehouse includes by reading the data of the relevant version in data warehouse
The type and version of database).S302, pair of correspondence database type and version is searched in the database dialect template to prestore
Answer database dialect.Wherein, disparate databases type and the data of disparate databases version are stored with database dialect template
Dialect.Include correspondence database type and database version in the data stored in data warehouse, in database dialect template
The middle correspondence database dialect for searching the type of database and database version.S303, according to correspondence database dialect, parse institute
Stating change collection can be with execution script language to generate database.Wherein, script refers to SQL (Structure Query
Language) language, including data query language DQL (data query language), DML DML (data
Manipulation language), DDL DDL (data definition language), DCL
DCL (Data control language) etc. one or more.S304, performed in database the script with
Database is arrived into the change collection renewal.
Above method embodiment is converted to intermediate form text by increasing intermediate form file, by the data in database
Data in part, with data warehouse are contrasted to obtain change collection, and the change collection is updated to data warehouse to form this point
A new version in branch workspace, to complete the submission of the version of database, or the change collection is updated and arrives database,
To update or reduce the data in forked working area database.
Fig. 4 is a kind of schematic flow sheet for data version control method that another embodiment of the present invention provides.This method bag
Include S401~S407.This method is with the method difference in Fig. 1 embodiments:Add step S405-S406.
S405, the change collection is detected with the presence or absence of conflict.Wherein, conflicting, which includes same value, has a variety of different numbers
According to.It is to be appreciated that different users modifies (under different branches) to same value, the value of modification is different, such as first
The value is revised as abc by individual user, and the value is revised as dfg by second user, therefore will be conflicted.If conflict, perform
S406;If do not conflicted, S407 is performed.
S406, change the conflict.Detect after having conflicted, into conflict edit page, the edlin of advancing by leaps and bounds of liquidating is repaiied
Change, the value of conflict is correctly handled.
S407, by the change collection renewal to data warehouse or according to the database dialect template to prestore by the change
Database is arrived in collection renewal.Wherein, it is the change collection renewal to data warehouse is new to become one in data warehouse
Version.The change collection is updated to database to update or reduce forked working area according to the database dialect template to prestore
Data in database.
For a data Version Control device, common versions of data control operation has submission, renewal, reduction, conjunction
And wait operation.Wherein, operation is submitted to refer to that the data that database does not have versioned are submitted into data warehouse turns into one newly
Version, wherein, the submission of first time operation also referred to as check-in operation;Renewal operation refers to the version in downloading data warehouse
In data different from database to update database, local operation can be retained, wherein, the renewal operation of first time
Referred to as detection operation (forked working area is empty, or database is empty);Restoring operation is referred in data warehouse
The data cover of one version is to database;Union operation refers to the data of the database in different operating area being merged into wherein
The database of one workspace.
Fig. 5 is the schematic flow sheet of submission operating method provided in an embodiment of the present invention.The submission operating method with
Not having the data of versioned to be submitted to data warehouse workspace turns into a new versions of data.The submission operating method includes
S501-S507。
S501, the data in reading database.Data in reading database after entering forked working area, wherein,
Forked working area is entered according to version number of branch.First time submit operation, i.e., check-in operation when, into forked working area after also
Need the information of configuration database.Configuration database information includes the type and version, the use for connecting database of configuration database
Name in an account book, password, the table that may relate to etc..Preferably, when first time submitting operation, the data in reading database include data
Dictionary and relational data, after the completion of first time submits, the data of data dictionary are stored in forked working area.Subsequently reading
During data in database, if not being related to the variation of data dictionary, the new table of field, increase is newly increased in such as table, then
Read data words allusion quotation is not needed, only reads relational data.When needing the data of data dictionary, read in workspace.
Wherein, it is to read the relational data in table by traversal list to read relational data.
S502, the data in the database are converted into intermediate form file by preset data structure.Preferably, preset
Data structure is XML data structure, and intermediate form file is XML file.Specifically, the data are turned by preset data structure
It is changed to intermediate form file and refer to content described in Fig. 2.If submitting operation for the first time, i.e. check-in operation, perform the step
Afterwards, intermediate form file is directly submitted to data warehouse as a new version in data warehouse.
S503, read the data of latest edition under the same branches in data warehouse.Wherein, in the data warehouse of reading
The data that data in the data and database of latest edition belong under same branch, wherein, the data in data warehouse have
With intermediate form file identical data structure.In other embodiments, latest edition in data warehouse can also first be read
Data, then the data of database under same branches are read, the data in the database of reading are changed by preset data structure
For intermediate form file.
S504, by the latest edition under same branches in the data in the intermediate form file after conversion and data warehouse
Data are contrasted to obtain change collection.
Whether S505, detecting in data warehouse has new version.It is to be appreciated that detect whether that other users have submitted
New version, as that may have multiple databases under the branch, when other branches also use the identical database of the branch, when it
After his branch submits, new version just occurs.If there is new version, S507 is performed;If without new version, S506 is performed.
S506, data warehouse is arrived into change collection renewal.Turn into a new version after updating data warehouse.The version
The information such as the user name, the type of time and database and version of renewal can be recorded.
S507, prompt version out of date.Prompt version out of date, there are other users to have submitted newly to inform in data warehouse
Version, perform needs to carry out on the new version when submitting operation, in order to avoid cause data disunity.Prompt version out of date
Afterwards, resubmited after performing renewal operation.Wherein, the flow for updating operation refer to Fig. 7.It should be noted that referred to herein as
Renewal operation include Fig. 7 in, according to the database dialect template to prestore by it is described change collection renewal to database step
Suddenly.
Fig. 6 is the schematic flow sheet of detection operating method provided in an embodiment of the present invention.The detection operating method base
Have what is carried out after edition data in operation data warehouse in submitting, data are turned into the version taken out in data warehouse
Data in storehouse.The detection operating method includes S601-S602.
S601, read the data of the latest edition in data warehouse under the branch.Branch's work is entered according to version number of branch
After making area, the data of the latest edition in data warehouse under the branch are read.
S602, the data renewal of the latest edition is arrived by database according to the database dialect template to prestore.Specifically,
S602 refer to the content described in Fig. 3.
Fig. 7 is the schematic flow sheet of a more new manipulation method provided in an embodiment of the present invention.The more new manipulation method with
In downloading data warehouse with the content do not allowed in forked working area database.The more new manipulation method includes S701-S707.
S701, read the data of the latest edition in data warehouse under the branch.Branch's work is entered according to version number of branch
After making area, the data of the latest edition in data warehouse under the branch are read.
S702, reads the data in database under the branch, and the data include data dictionary and/or relational data.
S703, the data in the database are converted into intermediate form file by preset data structure.Preferably, preset
Data structure is XML data structure, and intermediate form file is XML file.Specifically, intermediate form file is converted this data to
It refer to the content described in Fig. 2.In other embodiments, the data of latest edition in data warehouse can also be first read, then read
The data of database under same branches are taken, the data in the database of reading are converted into intermediate form by preset data structure
File.
S704, by the latest edition under same branches in the data in the intermediate form file after conversion and data warehouse
Data are contrasted to obtain change collection.
S705, the change collection is detected with the presence or absence of conflict.Wherein, conflicting, which includes same value, has a variety of different numbers
According to.It is to be appreciated that different users modifies (under different branches) to same value, the value of modification is different, such as first
The value is revised as abc by individual user, and the value is revised as dfg by second user, therefore will be conflicted.If conflict, perform
S706;If do not conflicted, S707 is performed.
S706, change the conflict.Detect after having conflicted, into conflict edit page, the edlin of advancing by leaps and bounds of liquidating is repaiied
Change, the value of conflict is correctly handled.
S707, the change collection renewal is arrived by database according to the database dialect template to prestore.According to the data to prestore
Storehouse dialect template updates the change collection to database to update the content in the database in forked working area.Specifically, will
Database is arrived in change collection renewal, refer to the content described in Fig. 3.
Fig. 8 is the schematic flow sheet of a restoring method provided in an embodiment of the present invention.The restoring method is with by data bins
Latest edition in storehouse covers the database in forked working area.The restoring method includes S801-S805.
S801, read the data of the latest edition in data warehouse under the branch.Branch's work is entered according to version number of branch
Make to read behind area the data of the latest edition in data warehouse under the branch.
S802, read the data in database under the branch.
S803, the data in the database are converted into intermediate form file by preset data structure.Preferably, preset
Data structure is XML data structure, and intermediate form file is XML file.Specifically, intermediate form file is converted this data to
It refer to the content described in Fig. 2.In other embodiments, the data of latest edition in data warehouse can also be first read, then read
The data of database under same branches are taken, the data in the database of reading are converted into intermediate form by preset data structure
File.
S804, by the latest edition under same branches in the data in the intermediate form file after conversion and data warehouse
Data are contrasted to obtain change collection.
S805, the change collection renewal is arrived by database according to the database dialect template to prestore.According to the data to prestore
Storehouse dialect template updates the change collection to database to update the content in the database in forked working area.Specifically, will
Database is arrived in change collection renewal, refer to the content described in Fig. 3.
Fig. 9 is a kind of schematic flow sheet for data version control method that further embodiment of this invention provides.This method bag
Include at least two branches under same project, while based on submitting in operation data warehouse the version number of You Liangge branches
According to rear progress, the content of the data warehouse of Liang Ge branches is merged with realizing.This method includes S901-S904.
S901, read the data of the latest edition of Liang Ge branches in data warehouse under same project.
S902, the data of the latest edition of the Liang Ge branches are contrasted to obtain difference change collection.
S903, difference change collection is merged into the latest edition data of one of branch.
S904, the data of the latest edition of one of branch after merging are updated into data warehouse.
Above-described embodiment is merged the content of the data warehouse of the Liang Ge branches under same project with realizing.
Figure 10 is the schematic flow sheet of a union operation method provided in an embodiment of the present invention, and the union operation method is extremely
Include the first branch, the second branch under same project less, while there are two points based on submitting in operation data warehouse
Carried out after the edition data of branch, the data of the first branch in data warehouse are merged into the second branch.The merging method
Including S111-S116.
S111, the number of the data of the latest edition of the first branch and the latest edition of the second branch is read from data warehouse
According to.
S112, the data of the data of the latest edition of the first branch and the latest edition of the second branch are contrasted to obtain
Difference change collection;
S113, difference change collection is detected with the presence or absence of conflict.If conflict be present, S114 is performed;If in the absence of conflict, hold
Row S115.
S114, change the conflict.Detect after having conflicted, into conflict edit page, the edlin of advancing by leaps and bounds of liquidating is repaiied
Change, the value of conflict is correctly handled.
S115, difference change is collected in the data for the latest edition for being merged into the second branch.
S116, the data of the latest edition of the second branch after merging are updated into data warehouse.
Figure 11 is a kind of schematic block diagram of versions of data control system provided in an embodiment of the present invention.The versions of data control
System 110 processed includes versions of data controller 111, data warehouse 112.Wherein,
Data warehouse 112, the data of all versions for storing all branches.Wherein, the number stored in data warehouse
According to having and intermediate form file identical data structure.
Versions of data controller 111, for for the data in reading database, and convert this data to middle layout
Formula file, it is additionally operable to read the data of the latest edition in data warehouse with the data under same branches, by data interaction list
The data of related versions contrast under same branches in data in intermediate form file and data warehouse after member conversion
To change collect, and by the change collection update to data warehouse or according to the database dialect template to prestore by the change collection more
Newly arrive database.
A kind of Figure 12 schematic block diagrams of versions of data controller provided in an embodiment of the present invention.As shown in figure 12, data
Version Control device 120 includes the first reading unit 121, converting unit 122, the second reading unit 123, comparison unit 124, renewal
Unit 125.Wherein,
First reading unit 121, for the data in reading database, wherein, in database include data dictionary and
Relational data.Relational data in reading database is read by traversal list.Preferably, controlled in versions of data
In, if the data in first time reading database, then the data of reading include data dictionary and relational data.Read
Data dictionary can be stored in workspace, during data in follow-up reading database, if not being related to the variation of data dictionary,
Field is newly increased in such as table, increases new table, then does not need read data words allusion quotation, it is only necessary to read relational data.
When needing the data of data dictionary, read in workspace.
Converting unit 122, for converting this data to intermediate form file, it is preferable that preset data structure is XML numbers
According to structure, intermediate form file is XML file, and the transfer ability of data stored with XML file is very strong.It is it is to be appreciated that middle
The data of formatted file storage are the data dictionary and/or relational data after the conversion of XML data structure.Such as Figure 13 institutes
Show, converting unit 122 includes data dictionary reading unit 131, format conversion unit 132.Wherein, data dictionary reading unit
131, for read data words allusion quotation to obtain table structure.Wherein, what is stored in data dictionary has the content of table structure.Form is changed
Unit 132, for the table structure and the relational data read to be converted into intermediate form file by preset data structure.
Second reading unit 123, for reading the number of the latest edition in data warehouse with the data under same branches
According to, wherein, the data in data warehouse have and intermediate form file identical data structure.In other embodiments, can also
The content of the second reading unit is first carried out, then performs the content of the first execution unit and converting unit.
Comparison unit 124, for the data in the intermediate form file after conversion are identical with the data warehouse read
The data of latest edition are contrasted to obtain change collection under branch, and the change collection has and intermediate form file identical data knot
Structure.
Updating block 125, for change collection renewal to be arrived into database according to the database dialect template to prestore.Such as Figure 14
Shown, updating block 125 includes acquiring unit 141, searching unit 142, generation unit 143, execution unit 144.Wherein, obtain
Unit 141, for obtaining type of database and version.Wherein, can by the type of database in reading database and version come
Obtain, can also by read the data of the version in data warehouse obtain (edition data in data warehouse include count
According to the type and version in storehouse).Searching unit 142, for searching the corresponding database in the database dialect template to prestore
The correspondence database dialect of type and version.Wherein, disparate databases type and different numbers are stored with database dialect template
According to the data dialect of storehouse version.Include correspondence database type and database version in the data stored in data warehouse,
The correspondence database dialect of the type of database and database version is searched in database dialect template.Generation unit 143, is used for
According to correspondence database dialect, parsing the change collection can be with execution script language to generate the database.Wherein, script
Language refers to SQL (Structure Query Language) language, including data query language DQL (data query
Language), DML DML (data manipulation language), DDL DDL (data
Definition language), DCL DCL (Data control language) etc. one or more.
Execution unit 144, database is arrived so that the change collection to be updated for performing the script in database.Or
Updating block 125 is new to become one in data warehouse for change collection renewal to be arrived into data warehouse
Version.
Figure 15 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides.The versions of data
Controller 150 includes:First reading unit 151, converting unit 152, the second reading unit 153, comparison unit 154, renewal are single
Member 155, detection unit 156, modification unit 157.The difference of the embodiment and embodiment illustrated in fig. 12 is:It is single to add detection
Member 156, modification unit 157.Wherein, the first reading unit 151, converting unit 152, the second reading unit 153, comparison unit
154 refer to the content that embodiment corresponding units described in Figure 12 describe.
Detection unit 156, for detecting the change collection with the presence or absence of conflict, the conflict exists a variety of including same value
Different data.
Unit 157 is changed, if conflict be present for the change collection, changes the conflict.Detect after having conflicted, entered
Enter the edit page that conflicts, liquidated edlin modification of advancing by leaps and bounds, and the value of conflict is correctly handled.
Updating block 155, if not conflicting for changing collection, the change collection is updated to data warehouse or according to prestoring
Data block dialect template by the change collection renewal arrive database.
Figure 16 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides.The embodiment pair
The submission operating method of induction method embodiment.The data that workspace can not had versioned by embodiment are submitted to data warehouse
As a new versions of data.The versions of data controller 160 of the embodiment includes:First reading unit 161, converting unit
162nd, the second reading unit 163, comparison unit 164, updating block 165, detection unit 166, Tip element 167.Wherein, the reality
The difference for applying example and embodiment illustrated in fig. 12 is:Add detection unit 166, Tip element 167.Wherein, first list is read
Member 161, converting unit 162, the second reading unit 163, comparison unit 164 refer to embodiment corresponding units described in Figure 12 and describe
Content.
Detection unit 166, whether there is new version in data warehouse for detecting.It is to be appreciated that it is detected whether
His user have submitted new version, and as that may have multiple databases under the branch, other branches also use the identical of the branch
During database, after other branches submit, new version just occurs.
Updating block 165, if for not having new version in data warehouse, data warehouse is arrived into change collection renewal.More
Newly to turning into a new version after data warehouse.The version can record the type of the user name of renewal, time and database
With the information such as version.
Tip element 167, if for there is new version in data warehouse, prompt version out of date.Prompt version out of date,
There are other users to have submitted new version in data warehouse to inform, it is enterprising in the new version to perform needs when submitting operation
OK, in order to avoid causing data disunity.
Figure 17 is a kind of schematic block diagram for versions of data controller that another embodiment of the present invention provides.The embodiment pair
Union operation method in induction method embodiment.The embodiment comprises at least the first branch, the second branch, while is grasped based on submitting
Make in data warehouse what is carried out after the edition data of You Liangge branches, the data of the first branch in data warehouse are merged
Into the second branch.Versions of data controller 170 in the embodiment includes the first reading unit 171, converting unit 172, the
Two reading units 173, comparison unit 174, updating block 175, detection unit 176, modification unit 177.The embodiment of the present invention with
The difference of Figure 15 embodiments is as follows:
Second reading unit 173, it is additionally operable to read the data and second of the latest edition of the first branch from data warehouse
The data of the latest edition of branch.
Comparison unit 174, it is additionally operable to the number of the latest edition by the data of the latest edition of the first branch and the second branch
According to being contrasted to obtain difference change collection.
Detection unit 176, it is additionally operable to detect difference change collection with the presence or absence of conflict.
Unit 177 is changed, if conflicting for existing, changes the conflict.Detect after having conflicted, edited into conflict
The page, liquidated edlin modification of advancing by leaps and bounds, and the value of conflict is correctly handled.
Updating block 175, if being additionally operable to that conflict is not present, difference change collection is merged into the latest edition of the second branch
Data in, and the data of the latest edition of the second branch after merging are updated into data warehouse.
Figure 18 is a kind of schematic block diagram for versions of data controller that further embodiment of this invention provides.The versions of data
Controller 180 includes input unit 181, output device 182, memory 183 and processor 184, above-mentioned input unit
181st, output device 182, memory 183 and processor 184 are connected by bus 185.Wherein:
Input unit 181, conflict is edited for providing user, liquidate prominent modify.In the specific implementation, the present invention is implemented
The input unit 181 of example may include keyboard, mouse, photoelectricity input unit, acoustic input dephonoprojectoscope, touch input unit etc..
Output device 182, the data after being handled for output etc..In the specific implementation, the output device of the embodiment of the present invention
182 may include display, display screen, touch-screen, voice output etc..
Memory 183, for storing the routine data with various functions.Memory 183 stores in the embodiment of the present invention
Data include data dictionary, relational data, intermediate form file, change collection, database dialect template, type of database and
Version etc., and other routine datas that can call and run.In the specific implementation, the memory 183 of the embodiment of the present invention can be with
It is system storage, such as, volatile (such as RAM), the knot of non-volatile (such as ROM, flash memory etc.), or both
Close.In the specific implementation, the memory 183 of the embodiment of the present invention can also be the external memory storage outside system, such as, disk,
CD, tape etc..
Processor 184, for calling the routine data stored in memory 183, and perform following operation:
The data in relevant database are read, the data include data dictionary and relational data;By the data
Intermediate form file is converted to, wherein, the data of intermediate form file storage include the number after the conversion of preset data structure
According to dictionary and relational data;The data of the latest edition in data warehouse with the data under same branches are read, wherein,
Data in data warehouse have and intermediate form file identical data structure;By the data in the intermediate form file after conversion
Contrasted to obtain change collection with the data of latest edition under same branches in the data warehouse of reading, the change collection has with
Between formatted file identical data structure;By the change collection renewal to data warehouse or according to the database dialect mould to prestore
The change collection renewal is arrived relevant database by plate.
Processor 184, also perform following operation:
Read data words allusion quotation is to obtain table structure;The table is traveled through to read the relational data in the table;By pre-
If the table structure and the relational data are converted to intermediate form file by data structure.
Processor 184, also perform following operation:
Obtain relevant database type and version;The corresponding relationship type is searched in the database dialect template to prestore
The correspondence database dialect of type of database and version;According to correspondence database dialect, it is described to generate to parse the change collection
Relevant database can be with execution script language;The script is performed in relevant database so that the change to be collected
Update relevant database.
Processor 184, also perform following operation:
Detect the change collection includes same value and a variety of different data be present with the presence or absence of conflict, the conflict;If
There is conflict in the change collection, change the conflict.
Processor 184, also perform following operation:
Read the data of the latest edition of the Liang Ge branches in data warehouse under same project;By described two branches
The data of latest edition are contrasted to obtain change collection;The change collection is merged into the number of the latest edition of one of branch
In;The data of one of branch after merging are updated into data warehouse.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description
End and the specific work process of unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.This area
Those of ordinary skill it is to be appreciated that with reference to the embodiments described herein describe each example unit and algorithm steps,
It can be realized with electronic hardware, computer software or the combination of the two, can be mutual in order to clearly demonstrate hardware and software
It is transsexual, the composition and step of each example are generally described according to function in the above description.These functions actually with
Hardware or software mode perform application-specific and design constraint depending on technical scheme.Professional and technical personnel can be with
Described function is realized using distinct methods to each specific application, but this realization is it is not considered that exceed this hair
Bright scope.
In several embodiments provided herein, it should be understood that disclosed terminal and method, it can be passed through
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed phase
Coupling or direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, device or unit
Connection or electricity, the connection of mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize scheme of the embodiment of the present invention according to the actual needs
Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
It is that unit is individually physically present or two or more units are integrated in a unit.It is above-mentioned integrated
Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to be contributed in other words to prior art, or all or part of the technical scheme can be in the form of software product
Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced
Change, these modifications or substitutions should be all included within the scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain be defined.
Claims (10)
1. a kind of data version control method, it is characterised in that methods described includes:
Read the data in relevant database;
The data are converted into intermediate form file by preset data structure;
Read the data of the latest edition in data warehouse with the data under same branches;
By the data of the data in the intermediate form file after conversion and latest edition under same branches in the data warehouse of reading
Contrasted to obtain change collection;
The change collection renewal is arrived to data warehouse or according to the database dialect template to prestore by the change collection renewal
Relevant database.
2. the method as described in claim 1, it is characterised in that the data in relevant database include data dictionary and relation
Type data, intermediate form file is converted the data to, including:
Read data words allusion quotation is to obtain table structure;
The table structure and the relational data are converted to by intermediate form file by preset data structure.
3. the method as described in claim 1, it is characterised in that collected the change more according to the database dialect template to prestore
Relevant database newly is arrived, including:
Obtain relevant database type and version;
The correspondence database side of the corresponding relevant database type and version is searched in the database dialect template to prestore
Speech;
According to correspondence database dialect, parsing the change collection can be with execution script language to generate the relevant database
Speech;
The script is performed in relevant database so that the change collection renewal is arrived into relevant database.
4. the method as described in claim 1, it is characterised in that by the data in the intermediate form file after conversion and reading
The data of latest edition are contrasted after obtaining change collection under same branches in data warehouse, and methods described also includes:
Detect the change collection includes same value and a variety of different data be present with the presence or absence of conflict, the conflict;
If the change collection has conflict, the conflict is changed.
5. the method as described in claim 1, it is characterised in that methods described also includes:
Read the data of the latest edition of the Liang Ge branches in data warehouse under same project;
The data of the latest edition of described two branches are contrasted to obtain difference change collection;
In the data for the latest edition that difference change collection is merged into one of branch;
The data of the latest edition of one of branch after merging are updated into data warehouse.
6. a kind of versions of data controller, it is characterised in that the versions of data controller includes:
First reading unit, for reading the data in relevant database;
Converting unit, for the data to be converted into intermediate form file by preset data structure;
Second reading unit, read the data of the latest edition in data warehouse with the data under same branches;
Comparison unit, for by the data in the intermediate form file after conversion with the data warehouse that reads under same branches most
The data of redaction are contrasted to obtain change collection;
Updating block, for the change collection renewal to be arrived into relevant database according to the database dialect template to prestore, or
Data warehouse is arrived into the change collection renewal.
7. versions of data controller as claimed in claim 6, it is characterised in that the data in relevant database include data
Dictionary and relational data, the converting unit include data dictionary reading unit, format conversion unit;Wherein,
The data dictionary reading unit, for read data words allusion quotation to obtain table structure;
The format conversion unit, used in being converted to the table structure and the relational data by preset data structure
Between formatted file.
8. versions of data controller as claimed in claim 6, it is characterised in that the updating block includes acquiring unit, looked into
Look for unit, generation unit, execution unit;Wherein,
The acquiring unit, for obtaining relevant database type and version;
The searching unit, for searching corresponding the relevant database type and version in the database dialect template to prestore
This correspondence database dialect;
The generation unit, for according to correspondence database dialect, parsing the change collection to generate the relevant database
Can be with execution script language;
The execution unit, relation is arrived so that the change collection to be updated for performing the script in relevant database
Type database.
9. versions of data controller as claimed in claim 6, it is characterised in that the versions of data controller also includes detection
Unit, modification unit;Wherein,
The detection unit, for detect it is described change collection with the presence or absence of conflict, it is described conflict include same value exist it is a variety of
Different data;
The modification unit, if conflict be present for the change collection, change the conflict.
10. versions of data controller as claimed in claim 6, it is characterised in that
Second reading unit, it is additionally operable to read the number of the latest edition of the Liang Ge branches in data warehouse under same project
According to;
The comparison unit, it is additionally operable to be contrasted the data of the latest edition of described two branches to obtain difference change collection;
The updating block, it is additionally operable to collect difference change in the data for the latest edition for being merged into one of branch,
And the data of the latest edition of one of branch after merging are updated into data warehouse.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710229586.2A CN107665227B (en) | 2017-04-10 | 2017-04-10 | Data version control method and data version controller |
PCT/CN2017/090925 WO2018188196A1 (en) | 2017-04-10 | 2017-06-29 | Data version control method, data version controller, device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710229586.2A CN107665227B (en) | 2017-04-10 | 2017-04-10 | Data version control method and data version controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107665227A true CN107665227A (en) | 2018-02-06 |
CN107665227B CN107665227B (en) | 2019-12-24 |
Family
ID=61120730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710229586.2A Active CN107665227B (en) | 2017-04-10 | 2017-04-10 | Data version control method and data version controller |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107665227B (en) |
WO (1) | WO2018188196A1 (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108920638A (en) * | 2018-07-02 | 2018-11-30 | 山东浪潮商用系统有限公司 | Web terminal data collector file method and device based on data dictionary configuration |
CN109885299A (en) * | 2019-01-23 | 2019-06-14 | 平安科技(深圳)有限公司 | Template processing method, device, computer equipment and storage medium in model development |
CN110502563A (en) * | 2019-08-26 | 2019-11-26 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of the data of multi-data source, storage medium |
CN110781131A (en) * | 2018-09-04 | 2020-02-11 | 哈尔滨安天科技集团股份有限公司 | Mobile storage method, device and storage medium with version control function |
CN110879815A (en) * | 2019-11-26 | 2020-03-13 | 上海莉莉丝科技股份有限公司 | Method, device, equipment and storage medium for upgrading game database server |
CN112818059A (en) * | 2021-01-27 | 2021-05-18 | 百果园技术(新加坡)有限公司 | Information real-time synchronization method and device based on container release platform |
CN113110868A (en) * | 2021-04-07 | 2021-07-13 | 网易(杭州)网络有限公司 | File merging method and device, computer equipment and storage medium |
CN109885299B (en) * | 2019-01-23 | 2024-05-03 | 平安科技(深圳)有限公司 | Template processing method, device, computer equipment and storage medium in model development |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001167122A (en) * | 1999-12-13 | 2001-06-22 | Hitachi Kokusai Electric Inc | Information display system, information display server and recording medium |
US20010028603A1 (en) * | 2000-04-07 | 2001-10-11 | Nec Corporation | Usage history registering apparatus and automatic database retrieval statement generating apparatus |
JP2012078993A (en) * | 2010-09-30 | 2012-04-19 | Hitachi Solutions Ltd | Method and system to scale up and scale down relational database |
CN106445949A (en) * | 2015-08-07 | 2017-02-22 | 北京国双科技有限公司 | Method and device for detecting data change in data table |
-
2017
- 2017-04-10 CN CN201710229586.2A patent/CN107665227B/en active Active
- 2017-06-29 WO PCT/CN2017/090925 patent/WO2018188196A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001167122A (en) * | 1999-12-13 | 2001-06-22 | Hitachi Kokusai Electric Inc | Information display system, information display server and recording medium |
US20010028603A1 (en) * | 2000-04-07 | 2001-10-11 | Nec Corporation | Usage history registering apparatus and automatic database retrieval statement generating apparatus |
JP2012078993A (en) * | 2010-09-30 | 2012-04-19 | Hitachi Solutions Ltd | Method and system to scale up and scale down relational database |
CN106445949A (en) * | 2015-08-07 | 2017-02-22 | 北京国双科技有限公司 | Method and device for detecting data change in data table |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108920638A (en) * | 2018-07-02 | 2018-11-30 | 山东浪潮商用系统有限公司 | Web terminal data collector file method and device based on data dictionary configuration |
CN110781131A (en) * | 2018-09-04 | 2020-02-11 | 哈尔滨安天科技集团股份有限公司 | Mobile storage method, device and storage medium with version control function |
CN109885299A (en) * | 2019-01-23 | 2019-06-14 | 平安科技(深圳)有限公司 | Template processing method, device, computer equipment and storage medium in model development |
CN109885299B (en) * | 2019-01-23 | 2024-05-03 | 平安科技(深圳)有限公司 | Template processing method, device, computer equipment and storage medium in model development |
CN110502563A (en) * | 2019-08-26 | 2019-11-26 | 腾讯科技(深圳)有限公司 | A kind of processing method and processing device of the data of multi-data source, storage medium |
CN110502563B (en) * | 2019-08-26 | 2023-09-29 | 腾讯科技(深圳)有限公司 | Data processing method and device of multiple data sources and storage medium |
CN110879815A (en) * | 2019-11-26 | 2020-03-13 | 上海莉莉丝科技股份有限公司 | Method, device, equipment and storage medium for upgrading game database server |
CN112818059A (en) * | 2021-01-27 | 2021-05-18 | 百果园技术(新加坡)有限公司 | Information real-time synchronization method and device based on container release platform |
CN113110868A (en) * | 2021-04-07 | 2021-07-13 | 网易(杭州)网络有限公司 | File merging method and device, computer equipment and storage medium |
CN113110868B (en) * | 2021-04-07 | 2023-08-08 | 网易(杭州)网络有限公司 | File merging method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2018188196A1 (en) | 2018-10-18 |
CN107665227B (en) | 2019-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107665227A (en) | A kind of data version control method and versions of data controller | |
AU2020260374B2 (en) | Building reports | |
US20180357055A1 (en) | System and method for computer language migration | |
US20090303239A1 (en) | Methods and systems for creating and editing a graph data structure | |
JP2019518275A (en) | Data flow design with static and dynamic elements | |
CN102426582B (en) | Data manipulation management devices and data manipulation management method | |
US9195456B2 (en) | Managing a catalog of scripts | |
CN102959538B (en) | Index to document | |
CN106919606A (en) | A kind of method and system that SQL query condition is realized based on tree construction | |
CN112015722A (en) | Database management method, data blood relationship analysis method and related device | |
CN102214091A (en) | Method and system for positioning required change influence range during software development | |
US20170116240A1 (en) | System and method for search indexing | |
EP1909170B1 (en) | Method and system for automatically generating a communication interface | |
US11093509B2 (en) | Data processing system for curating search result facets | |
WO2016190444A1 (en) | Information management device, and file management method | |
CN114927180A (en) | Medical record structuring method and device and storage medium | |
JP6320901B2 (en) | Data linkage support system and data linkage support method | |
US10162877B1 (en) | Automated compilation of content | |
JP4956298B2 (en) | Dictionary construction support device | |
JP2015130040A (en) | Computer-assisted name identification device, computer-assisted name identification system, method, and program | |
JP2018156552A (en) | Computer system and method for searching text data | |
US20160342739A1 (en) | Method and apparatus for providing electronic chart using ontology | |
WO2012023192A1 (en) | Information processing device, method of processing information, program, and medium | |
JP2016177627A (en) | Rewriting device, processing method, program for the same, and information processing device | |
Freeman et al. | Performing Data Operations |
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 |