CN103218450A - Synchronization method for data in multi-application real-time database - Google Patents

Synchronization method for data in multi-application real-time database Download PDF

Info

Publication number
CN103218450A
CN103218450A CN2013101517985A CN201310151798A CN103218450A CN 103218450 A CN103218450 A CN 103218450A CN 2013101517985 A CN2013101517985 A CN 2013101517985A CN 201310151798 A CN201310151798 A CN 201310151798A CN 103218450 A CN103218450 A CN 103218450A
Authority
CN
China
Prior art keywords
data
application
real
time
under
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
Application number
CN2013101517985A
Other languages
Chinese (zh)
Other versions
CN103218450B (en
Inventor
吴庆曦
王瑾
彭晖
靳晶
魏娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nari Technology Co Ltd
Original Assignee
Nari Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nari Technology Co Ltd filed Critical Nari Technology Co Ltd
Priority to CN201310151798.5A priority Critical patent/CN103218450B/en
Publication of CN103218450A publication Critical patent/CN103218450A/en
Application granted granted Critical
Publication of CN103218450B publication Critical patent/CN103218450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a synchronization method for data in a multi-application real-time database. The data under multiple different applications in the real-time database are synchronized in real time. The synchronization method comprises the following steps: (1) the application of each data element in the real-time database is defined through a specific domain in a dictionary table; (2) in the real-time database, each application owns and uses a data file corresponding to the application, and the data elements shared among the applications have a copy in the data file owned by each application; and (3) when data change, the real-time database determines the application owned by the changed data according to the definition, and updates and synchronizes the data into the data files of the applications. The synchronization method for the data in the multi-application real-time database is capable of carrying out independent and parallel access and operation on the data in the real-time database, and improves the concurrence of data accesses and data efficiency of the real-time database. In addition, the real-time database carries out real-time synchronization on the variation of the data, and improves the consistency and safety of the data.

Description

A kind of real-time data base method of data synchronization of using more
Technical field
The present invention relates to a kind of real-time data base method of data synchronization of using more, belong to the real-time data base technical applications.
Background technology
Real-time data base is a branch of Database Systems development, and it is applicable to the issued transaction of handling the fast-changing data of bringing in constant renewal in and having time restriction.The real-time data base technology is the product that real-time system and database technology combine, and it can be used for automatic collection, storage and the supervision of plant processes, and data for many years that can online each technological process point of storage can provide clear, accurate operational circumstances picture; In real-time data base, if using, all share a data entity, in the face of increasing the application time, it is low access efficiency to occur, the problem that real-time descends.If adopt many parts of entities, the problem of data consistency is arranged again, cause the system data security to descend.
Summary of the invention
For solving the deficiency of existing method, the purpose of this invention is to provide a kind of real-time data base data sync methods of using more, real time data is used affiliated data according to application memory, and when keeping being applied in more new data, make that the Data Update in the data file can be synchronized in the data file of other application in real time.
For achieving the above object, technical scheme of the present invention is as follows:
A kind of real-time data base data sync mode of using more, it is characterized in that, each application has the data file that has comprised its required all data in the real-time data base, use and use own affiliated data, real-time data base guarantees a consistance of using the common data in the affiliated data file, it is characterized in that comprising following three steps:
(1) data element in the real-time data base (table, record and territory) can be by using under the specific territory definition in dictionary table;
(2) in the real-time data base, each uses a data file that all has and use this application correspondence, in the data file of data shared element under each is used a copy is arranged all between application;
(3) when data change, real-time data base is determined application under the delta data according to definition, and Data Update is synchronized in the data file of these application.
The aforesaid real-time data base data sync mode of using more, it is characterized in that: in described step (1), be used to represent that the field of using under the data element is an integer numerical value, each bit of this numerical value is represented a specific application, this application equals 2 the several of square power by a value and identifies, the application of n bit representative, the ident value of application is 2 n-1 power, n is a natural number.
The aforesaid real-time data base data sync mode of using more, it is characterized in that: in described step (2), independently data file storage real time data database data is taked in each application, and this data file comprises and only comprise the real time data database data that belongs to this application.
In the described step (3), real-time data base is when synchronous real time data, according to following steps:
(a) taking-up is modified the affiliated application field of record of data, affiliated application field in territory and the affiliated application field of table, and the affiliated application field of described record, the affiliated application field in territory does step-by-step with the affiliated application field of table and computing obtains end value;
(b),, otherwise do not do operation if be 1 then calculate its corresponding application identities value 2n-1 to each bit of The above results value;
(c), the data that change are write this use employed real-time data base to each application identities value that calculates.
The beneficial effect that the present invention reached:
The present invention passes through said method, with the data in the real-time data base according to storing respectively under the different application, guarantee that simultaneously data carry out synchronously in real time between a plurality of application, its application can realize independently the affiliated data in the real-time data base and parallel visit and operation, improve the data efficiency of the concurrency and the real-time data base of data access; And real-time data base carries out in real time synchronously having improved data consistency and security to the variation of data.
Description of drawings
Describe the present invention in detail below in conjunction with the drawings and specific embodiments;
Fig. 1 is visioning procedures of using real-time database data more.
Fig. 2 is the real-time data base data sync flow processs of using more.
Embodiment
For technological means, creation characteristic that the present invention is realized, reach purpose and effect is easy to understand, below in conjunction with embodiment, further set forth the present invention.
Referring to Fig. 1 and Fig. 2, the present invention is to provide a kind of real-time data base method of data synchronization of using more, it at first is affiliated application of data element establishment in the real-time data base.In data dictionary, field of independent definition is used for the affiliated application of store data element, this field is an integer numerical value, each bit of this numerical value is represented a specific application, this application equals 2 the several of square power by a value and identifies, the application of n bit representative, the ident value of application is 2 n-1 power.
To be applied as example under the table, for Table A, the affiliated application field in the table definition table is for using under the table, and its type is an integer numerical value, and each bit is represented an application, and this bit is that 1 expression Table A belongs to this application, is that 0 expression Table A does not belong to this application.
The Table Properties table
Table name Use under the table
A 25
Table A belongs to uses 1(ident value 1), use 4(ident value 8) and use 5(ident value 16), so the value of the affiliated application field of Table A is 20+23+24=25.
In like manner, territory definition list in the data dictionary and record definition list also comprise similar field to characterize the affiliated application message of territory and record.
The mode of the invention provides makes real-time data base to create according to the attaching information of data element (table, record and territory) and uses affiliated database, generate data file, and corresponding data are written in the data file of application, forming and use exclusive data, flow process is as shown in Figure 1.Real-time data base is when make up using real time data, according to following steps:
(1) data element in the real-time data base (table, record and territory) can be by using under the specific territory definition in dictionary table; The i.e. table definition table in the scan-data dictionary at first, the value and the application identities value of application field under the table of every table are done step-by-step and computing, whether the result otherwise do not belong to for or not that 0 this table of expression belongs to this application, and the table that will belong to this application joins and uses the real-time data base that uses;
(2) in the real-time data base, each uses a data file that all has and use this application correspondence, in the data file of data shared element under each is used a copy is arranged all between application;
Present embodiment is after above-mentioned steps (1), scan the corresponding territory definition of this table then, the value and the application identities value of application field under the territory table in each territory are done step-by-step and computing, the result represents that for or not 0 this territory belongs to this application, otherwise do not belong to, and the territory that will belong to this application joins the table of response;
(2) when data change, real-time data base is determined application under the delta data according to definition, and Data Update is synchronized in the data file of these application.
Be the record in the scan table, the value and the application identities value of the affiliated application field of each record are done step-by-step and computing, whether the result for or not that 0 this territory of expression belongs to this application, otherwise do not belong to, and record data are written to use the real-time data base that uses.
(4) all tables are finished above operation steps (1) to step (3), the real-time data base that application is used is promptly created and is finished.
The mode that the invention provides is when application is upgraded real-time database data, and the data that are updated will be according to information synchronization under the application of its corresponding data element in the corresponding affiliated data file of using, and flow process as shown in Figure 2.Real-time data base is when synchronous real time data, according to following steps:
1) take out application field A under the record be modified data, application field C under application field B and the table under the territory, three values do step-by-step and computing obtains D as a result.
2),, otherwise do not do operation if be 1 then calculate its corresponding application identities value 2n-1 to each bit of D.
3), the data that change are write this use employed real-time data base to each application identities value that calculates.
The many application real-time data base data sync mode that the present invention relates to is in conjunction with realizing on the real-time storehouse of independent development that is operated in application layer, do not rely on concrete operating system, being applicable to various operating systems.The many application real-time data base data sync mode that the present invention relates to has guaranteed portability, can be along with real-time storehouse security of system, stably operate on IBM AIX, Sun Solaris, Alpha Tru64, HPUX, the operating system platforms such as Linux, Windows; System programming language adopts ANSI C/C++, and meets IEEE POSIX.2 standard.
More than show and described ultimate principle of the present invention and principal character and advantage of the present invention.The technician of the industry should understand; the present invention is not restricted to the described embodiments; that describes in the foregoing description and the instructions just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements all fall in the claimed scope of the invention.The claimed scope of the present invention is defined by appending claims and equivalent thereof.

Claims (5)

1. use the real-time data base method of data synchronization more one kind, it is characterized in that each application has the data file that has comprised its required all data in the real-time data base, use and use own affiliated data, it comprises step:
(1) each data element is used define it in data dictionary under in the real-time data base; A field is set in the data dictionary table is used to specify application under this data element, this field is represented the mode of different application by different bits, comprises the application attaching information of data element;
(2) each application has independently data file, has comprised all data that belong to this application; Different application is used its own data file, visit wherein data and the data in the data file under it are upgraded;
(3) renewal of each data element can be synchronized in the every other application; Real-time data base is used under looking into it according to the data element that is updated is counter, and need to determine the data updated entity, at last data updated is written under the application that has comprised this data element in the data entity.
2. the real-time data base method of data synchronization of using according to claim 1 more, it is characterized in that: in described step (1), being used to specify the field of using under this data element is integer numerical value, each bit of this integer numerical value is represented an application, this application equals 2 the several of square power by a value and identifies, the application of n bit representative, the ident value of application is 2 n-1 power, n is a natural number.
3. the real-time data base method of data synchronization of using according to claim 1 more, it is characterized in that: in described step (2), independently data file storage real time data database data is taked in each application, and this data file comprises the real time data database data that belongs to this application.
4. the real-time data base method of data synchronization of using according to claim 1, it is characterized in that: described data element is table, record or territory more.
5. the real-time data base method of data synchronization of using according to claim 1 more, it is characterized in that: in the described step (3), real-time data base is when synchronous real time data, according to following steps: (a) take out application field under the record that is modified data, application field under application field and the table under the territory, application field under the described record, the affiliated application field in territory does step-by-step with the affiliated application field of table and computing obtains end value;
(b),, otherwise do not do operation if be 1 then calculate its corresponding application identities value 2n-1 to each bit of The above results value;
(c), the data that change are write this use employed real-time data base to each application identities value that calculates.
CN201310151798.5A 2013-04-26 2013-04-26 A kind of many application real-time data base method of data synchronization Active CN103218450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310151798.5A CN103218450B (en) 2013-04-26 2013-04-26 A kind of many application real-time data base method of data synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310151798.5A CN103218450B (en) 2013-04-26 2013-04-26 A kind of many application real-time data base method of data synchronization

Publications (2)

Publication Number Publication Date
CN103218450A true CN103218450A (en) 2013-07-24
CN103218450B CN103218450B (en) 2016-05-04

Family

ID=48816237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310151798.5A Active CN103218450B (en) 2013-04-26 2013-04-26 A kind of many application real-time data base method of data synchronization

Country Status (1)

Country Link
CN (1) CN103218450B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273522A (en) * 2015-06-01 2017-10-20 明算科技(北京)股份有限公司 Towards the data-storage system and data calling method applied more

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1092886A (en) * 1992-12-08 1994-09-28 艾利森电话股份有限公司 Be used for the system that database backs up
CN1472688A (en) * 2003-07-09 2004-02-04 北京四方继保自动化有限公司 Data monitoring method in electric network safe dynamic monitoring system
CN1542652A (en) * 2003-11-06 2004-11-03 北京四方继保自动化有限公司 Application method and network system of fully distributed protected information processing system real-time database
US7424496B1 (en) * 2002-03-20 2008-09-09 Applied Micro Circuits Corporation Asymmetric coherency protection
US8209289B1 (en) * 2005-01-27 2012-06-26 Netapp, Inc. Technique for accelerating the creation of a point in time representation of a virtual file system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1092886A (en) * 1992-12-08 1994-09-28 艾利森电话股份有限公司 Be used for the system that database backs up
US7424496B1 (en) * 2002-03-20 2008-09-09 Applied Micro Circuits Corporation Asymmetric coherency protection
CN1472688A (en) * 2003-07-09 2004-02-04 北京四方继保自动化有限公司 Data monitoring method in electric network safe dynamic monitoring system
CN1542652A (en) * 2003-11-06 2004-11-03 北京四方继保自动化有限公司 Application method and network system of fully distributed protected information processing system real-time database
US8209289B1 (en) * 2005-01-27 2012-06-26 Netapp, Inc. Technique for accelerating the creation of a point in time representation of a virtual file system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周宁等: "开放实时数据库及其在调度自动化系统中的应用", 《电网技术》, vol. 30, 31 October 2006 (2006-10-31), pages 171 - 175 *
翟明玉等: "电网调度广域分布式实时数据库系统体系架构和关键技术", 《电力系统自动化》, vol. 37, no. 2, 25 January 2013 (2013-01-25), pages 67 - 71 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273522A (en) * 2015-06-01 2017-10-20 明算科技(北京)股份有限公司 Towards the data-storage system and data calling method applied more
CN107273522B (en) * 2015-06-01 2020-01-14 明算科技(北京)股份有限公司 Multi-application-oriented data storage system and data calling method

Also Published As

Publication number Publication date
CN103218450B (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN110209728B (en) Distributed heterogeneous database synchronization method, electronic equipment and storage medium
CN103699638B (en) Method for realizing cross-database type synchronous data based on configuration parameters
CN104573231B (en) Wisdom building system and method based on BIM
CN106682077B (en) Mass time sequence data storage implementation method based on Hadoop technology
CN104899295B (en) A kind of heterogeneous data source data relation analysis method
CN105930493A (en) Method and system for data synchronization between different databases
JP6262874B2 (en) Database implementation method
CN104216961B (en) A kind of data processing method and device
CN105184482B (en) A kind of transformer account data verification system and its method
CN104391903A (en) Distributed storage and parallel calculation-based power grid data quality detection method
CN105389367B (en) The multilevel distributed storage method of grid graph multi-time Scales based on Mongo databases
CN104484494A (en) Structure computerizing automatic load transmission method based on building information model (BIM)
CN105404757A (en) Intelligent transformer station SCD file standardization degree verification method
CN105740410A (en) Data statistics method based on Hbase secondary index
CN106557307A (en) The processing method and processing system of business datum
CN111651519A (en) Data synchronization method, data synchronization device, electronic device, and storage medium
CN103606032B (en) A kind of method in two dimension power grid GIS data set
CN103699555A (en) Multisource data real-time database data generation method applicable to scheduling and transformer substation integrated system
CN101645073A (en) Method for guiding prior database file into embedded type database
CN104283932A (en) File synchronization system and method
CN103984723A (en) Method used for updating data mining for frequent item by incremental data
CN106802928A (en) Power network historical data management method and its system
TW201923628A (en) Random walking and cluster-based random walking method, apparatus and device
CN103218450A (en) Synchronization method for data in multi-application real-time database
WO2019072040A1 (en) Random walking and cluster-based random walking method, apparatus and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant