CN106156282A - The synchronous method of internal storage data and device - Google Patents

The synchronous method of internal storage data and device Download PDF

Info

Publication number
CN106156282A
CN106156282A CN201610480157.8A CN201610480157A CN106156282A CN 106156282 A CN106156282 A CN 106156282A CN 201610480157 A CN201610480157 A CN 201610480157A CN 106156282 A CN106156282 A CN 106156282A
Authority
CN
China
Prior art keywords
data
synchronized
tables
information
priority
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.)
Pending
Application number
CN201610480157.8A
Other languages
Chinese (zh)
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.)
Qingdao Hisense Media Network Technology Co Ltd
Original Assignee
Qingdao Hisense Media Network 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 Qingdao Hisense Media Network Technology Co Ltd filed Critical Qingdao Hisense Media Network Technology Co Ltd
Priority to CN201610480157.8A priority Critical patent/CN106156282A/en
Publication of CN106156282A publication Critical patent/CN106156282A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Abstract

The present invention provides synchronous method and the device of a kind of internal storage data, and wherein, the method includes: obtains the first tables of data to be synchronized in DB data base, wherein, has the information of the data being provided with priority in the first tables of data to be synchronized;Judge in the first tables of data to be synchronized, if there is the information of data;The when that there is in determining the first tables of data to be synchronized the information of data, according to the priority order of each data characterized in the first tables of data to be synchronized, each data characterized in the first tables of data to be synchronized are carried out data syn-chronization.The data requiring requirement higher, ageing higher promptness carry out data synchronization processing timely, ensure that effectiveness and the promptness of data, prevent the situation that the loss of data and business cannot be used by a user, and then ensure that each business, especially promptness require normal operation and the use of the higher business of requirement higher, ageing.

Description

The synchronous method of internal storage data and device
Technical field
The present invention relates to data processing technique, particularly relate to synchronous method and the device of a kind of internal storage data.
Background technology
Along with application and the development of all kinds of business, all kinds of business can produce substantial amounts of synchrodata, and wherein business is user The business opened an account in business hall, user activates the business of product, user's business buying product bag etc., needs each business Data syn-chronization gets off so that user can normally use each business.
In prior art, the data of each business are carried out data syn-chronization when, it is written of successively with reference to each business Chronological order removes to carry out the data syn-chronization of data, thus will be written of data at first and first carry out data syn-chronization, by finally quilt The data of write finally carry out data syn-chronization, and then complete the process of the data syn-chronization of each business.
But in prior art, business can produce the data that promptness requirement requirement higher, ageing is higher, existing The method of the data syn-chronization in technology, it is impossible to the data requiring requirement higher, ageing higher these promptnesses are timely Carry out data synchronization processing, the effectiveness in turn resulting in data reduces or loses, and feelings that business cannot be used by a user Condition.
Summary of the invention
The present invention provides synchronous method and the device of a kind of internal storage data, in order to solve in prior art cannot by these and The data that time property requires requirement higher, ageing higher carry out data synchronization processing timely, and in turn result in data has Effect property reduces or loses, and the problem of situation that business cannot be used by a user.
It is an aspect of the present invention to provide the synchronous method of a kind of internal storage data, including:
Obtain the first tables of data to be synchronized in DB (Database, be called for short DB) data base, wherein, described first to be synchronized Tables of data has the information of the data being provided with priority;
Judge in described first tables of data to be synchronized, if there is the information of data;
The when that there is in determining described first tables of data to be synchronized the information of data, according to described first number to be synchronized According to the priority order of each data characterized in table, each data characterized are carried out data same in described first tables of data to be synchronized Step.
Another aspect of the present invention is to provide the synchronizer of a kind of internal storage data, including:
First acquisition module, for obtaining the tables of data to be synchronized of first in DB data base, wherein, described first to be synchronized Tables of data has the information of the data being provided with priority;
First judge module, is used for judging in described first tables of data to be synchronized, if having the information of data;
First synchronization module, the when of for having the information of data in determining described first tables of data to be synchronized, depends on According to the priority order of each data characterized in described first tables of data to be synchronized, will described first tables of data to be synchronized characterize Each data carry out data syn-chronization.
The present invention is by accessing and obtain the information of the data in the tables of data to be synchronized of first in DB data base, first Tables of data to be synchronized has the information of the data being provided with priority, in determining the first tables of data to be synchronized, there are data The when of information, according to the priority order of each data characterized in the first tables of data to be synchronized, by the first tables of data to be synchronized Each data of middle sign carry out data syn-chronization.Such that it is able to by data higher for promptness requirement requirement higher, ageing Carry out data synchronization processing timely, it is ensured that the effectiveness of data and promptness, prevent the loss of data and the business cannot Situation about being used by a user, and then ensure that each business, the industry that especially promptness requirement requirement higher, ageing is higher The normal operation of business and use.
Accompanying drawing explanation
The flow chart of the synchronous method of the internal storage data that Fig. 1 provides for the embodiment of the present invention one;
The flow chart of the synchronous method of the internal storage data that Fig. 2 provides for the embodiment of the present invention two;
The structural representation of the synchronizer of the internal storage data that Fig. 3 provides for the embodiment of the present invention three;
The structural representation of the synchronizer of the internal storage data that Fig. 4 provides for the embodiment of the present invention four.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is The a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under not making creative work premise, broadly falls into the scope of protection of the invention.
The flow chart of the synchronous method of the internal storage data that Fig. 1 provides for the embodiment of the present invention one, as it is shown in figure 1, this enforcement The method of example includes:
Step 101, the first tables of data to be synchronized obtained in DB data base, wherein, have in the first tables of data to be synchronized It is provided with the information of the data of priority.
In the present embodiment, concrete, the executive agent of the present embodiment can be synchronizer or the clothes of internal storage data Business device or other device that can perform this method or equipment.
In types of applications program and all kinds of service based on data, all having all kinds of business, each business has user to open The business that the business at family, user open an account in business hall, user activates the business of product, user buys the business of product bag, user Business of change account etc..Each class business correspond to a memory database respectively;Memory database can be provided with In one server or other equipment, specifically, memory database corresponding for each class business can be separately positioned on In one entity device, or, by memory database corresponding for each business, it is arranged in same entity device, but These entity devices are all the executive agents belonging to the present embodiment.
When each memory database of the synchronizer of internal storage data carries out initialized, due to each internal storage data Storehouse correspond to an information table, and in this information table, storage has the every terms of information of business, will be to needing synchronization in memory database Information table, carries out list structure establishment and memory allocation;The access DB data base of each memory database periodic polling needs The information of the data synchronized.In DB data base, there is the information table of data to be synchronized.Table 1 is the information in DB data base Table, table 1 is properly termed as Table:CACHE_TABLE_DIC, as shown in table 1:
Information table in table 1 DB data base
NODEID TABLEID TBLNAME RECSIZE RECNUM
53100008 20082 IPLIVETVINCSC 48 5000
20143000 81001 PCMERCHANTINFO 340 1000
Wherein, NODEID characterizes the ID of the server that information table is belonged to, and TABLEID characterizes the ID of information table, TBLNAME characterizes the table name of information table, and RECSIZE characterizes the memory size of information table, and RECNUM characterizes information table Data volume.
First, each memory database, timing scan DB data base, obtain the first tables of data to be synchronized in DB data base, There is in the first tables of data to be synchronized the information of the different pieces of information of each business, and these data be provided with priority, Specifically, owing to the information table of each business has priority, thus the data of information table have priority.
Wherein, DB data base can be arranged on the executive agent of the present embodiment.
For example, the memory database of business of opening an account, periodically access the first data to be synchronized in DB data base Table;Or, activate the memory database of business, periodically access the first tables of data to be synchronized in DB data base.
Step 102, judge in the first tables of data to be synchronized, if there is the information of data.
In the present embodiment, concrete, each memory database of the synchronizer of internal storage data have accessed DB number The when of according to the first tables of data to be synchronized in storehouse, need to judge in the first tables of data to be synchronized, if having and be directed to work as The information of the data of the business that front memory database characterizes.
For example, the memory database of business of opening an account, the first tables of data to be synchronized accessed in DB data base time Wait, it is judged that in the first tables of data to be synchronized, if there is the information of the data of the business of opening an account.
The most for example, the memory database of business is activated, the first tables of data to be synchronized in accessing DB data base Time, it is judged that in the first tables of data to be synchronized, if there is the information of the data of activation business.
Step 103, when there is in determining the first tables of data to be synchronized the information of data, according to the first number to be synchronized According to the priority order of each data characterized in table, each data characterized in the first tables of data to be synchronized are carried out data syn-chronization.
In the present embodiment, concrete, at each memory database of the synchronizer of internal storage data, determine DB data In the first tables of data to be synchronized in storehouse, the when that there is the information of data of the business characterized for current memory data base, Just each data characterized in the first tables of data to be synchronized can be carried out data syn-chronization.Specifically, each internal storage data After storehouse obtains the information of each data in the first tables of data to be synchronized, owing to determining priority in these data, from And according to the priority order of each data, each data characterized in the first tables of data to be synchronized can be carried out data syn-chronization.
For example, the memory database of business of opening an account, opening of the first tables of data to be synchronized in accessing DB data base The when of the information of the data of family business, obtain the information of the data of the business of opening an account of party A-subscriber, this data define priority For the first order;The memory database of activation business, the activation business of the first tables of data to be synchronized in accessing DB data base The when of the information of data, obtaining the information of the data of the activation business of party A-subscriber, this data defining priority is second Level;Thus afterwards, it is possible to according to the priority order of two above data, first the data of the business of opening an account of party A-subscriber are entered Then the data of the activation business of party A-subscriber are carried out data syn-chronization by row data syn-chronization.
The most for example, user buys the memory database of the business of product bag, and first in accessing DB data base is treated The when of the information of data of the business buying product bag of synchrodata table, obtain the business buying product bag of party A-subscriber The information of data, the information of data of business of product bag of buying of party B-subscriber, the number of business buying product bag of C user According to information, defining priority in these three data the most successively is the second level, the first order, the third level, thus just can depend on Go up the priority order of three data according to this, first the data of the business buying product bag of party B-subscriber are carried out data syn-chronization, so After the data of business buying product bag of party A-subscriber are carried out data syn-chronization, finally by the business buying product bag of C user Data carry out data syn-chronization.
The present embodiment is by accessing and obtain the information of data in the tables of data to be synchronized of first in DB data base, the One tables of data to be synchronized has the information of the data being provided with priority, in determining the first tables of data to be synchronized, there are data Information when, according to the priority order of each data characterized in the first tables of data to be synchronized, by the first data to be synchronized The each data characterized in table carry out data syn-chronization.Such that it is able to by number higher for promptness requirement requirement higher, ageing According to carrying out data synchronization processing timely, it is ensured that the effectiveness of data and promptness, prevent the loss of data and business without The situation that method is used by a user, and then ensure that each business, especially promptness require that requirement higher, ageing is higher The normal operation of business and use.
The flow chart of the synchronous method of the internal storage data that Fig. 2 provides for the embodiment of the present invention two, on the basis of embodiment one On, as in figure 2 it is shown, the method for the present embodiment, before step 101, also include:
Step 201, acquisition data, and determine in data whether be defined priority;Determining that data have been determined preferentially During level, in the information write of the information table that data are belonged to the first tables of data to be synchronized;Determining that data are not by the most preferential During level, in the information write of the information table that data are belonged to the second tables of data to be synchronized.
In the present embodiment, concrete, the executive agent of the present embodiment can be synchronizer or the clothes of internal storage data Business device or other device that can perform this method or equipment.DB data base can be arranged on the executive agent of the present embodiment In.
DB data base determine have new data to be written to DB data base when, DB data base will write new data into In first tables of data to be synchronized and the second tables of data to be synchronized, the first tables of data to be synchronized is the data that storage is provided with priority Table, the second tables of data to be synchronized is the table of data that storage is not provided with priority.
First tables of data to be synchronized includes priority list and information data table, includes information table in information data table Information, information data table is properly termed as Table:CACHE_SYN_URGENT;Priority list sets the priority of information table, Priority list is properly termed as CACHE_TABLE_URGENT.Having new data to enter in DB data base when, can be by this number According in the information table putting into the business corresponding with these data, the information that then information table of this business has new data is put Enter in information data table, owing to the information table of each business sets priority, thus need the information of priority It is deposited in priority list.Table 2 is information data table, and table 3 is priority list, as shown in table 2 and table 3:
Table 2 information data table
Wherein, CACHEDBNODE characterizes the title of the server that information table is belonged to, and TABLEID characterizes information table ID, TBLNAME characterize the table name of information table, OP, KEYID, KEYNAME and SYNCOUNT are the additional letter of information table Breath, GENERATEDATE is temporal information.
Table 3 priority list
TABLEID TBLNAME PRIORITY
20082 IPLIVETVINCSC 1
81001 PCMERCHANTINFO 2
Wherein, TABLEID characterizes the ID of information table, and TBLNAME characterizes the table name of information table, and PRIORITY characterizes The priority of information table.
Specifically, DB data base uses DB script to create the process obtaining data, needs to store the letter of new data Each information of breath table, is written in the first tables of data to be synchronized and the second tables of data to be synchronized.
There is in DB data base the information table of each business, the such as business of opening an account there is an information table, activate business There is an information table, can be information table set priority, it is known that, in the present invention, priority be for information table for 's.First determine whether whether the new data in information table has priority, i.e. judge whether the information table being written with new data sets Priority;If it is determined that the new data in information table has priority, now understand and be written with the information table of new data and set Priority, then the information of the information table that can these data be belonged to is written in the first tables of data to be synchronized, now, is first The information of information table data belonged to is written in information data table, the priority of the information table then data belonged to Information is written in priority list;If it is determined that the new data in information table does not have priority, now understand and be written with new data Information table be not set priority, then the information of the information table that can these data be belonged to is written to the second number to be synchronized According in table.
Below for creating internal storage data table and the example of SQL statement write data into the first tables of data to be synchronized:
According to above example, it is known that, determine that the new data in information table has priority, now understand and be written with new data Information table set priority, the information of the information table that can data be belonged to is written in information data table, then will The precedence information of the information table that data are belonged to is written in priority list.
For example, DB data base has the information table of N number of business, the information table of business of such as opening an account, cancellation industry The information table of business, the information table revising business etc.;Can be that a part of information table in these information tables sets priority, from And the information table of M business in the information table of N number of business has priority, wherein M is less than N;New data is written to DB data The when of storehouse, the business that can be belonged to according to this new data, this new data is put in the information table of this business, can be out Family business, thus can write the data in the information table of the business of opening an account;Then, however, it is determined that go out the information table tool of business of opening an account There is priority, can write in information data table in the information table of business of opening an account and be written with new data, and write in priority list Enter the information of the priority of the information table of the business of opening an account;If it is determined that open an account, the information table of business does not have priority, and meeting exists Second tables of data to be synchronized writes in the information table of business of opening an account and be written with new data.
Step 102, specifically includes:
Determine whether the information table in information data table has new data, and determine that there is new data according to priority list The priority of information table.
In the present embodiment, concrete, after each memory database of the synchronizer of internal storage data initializes, The first tables of data to be synchronized in each memory database periodic timing scan DB data base respectively, may thereby determine that first In information data table in tables of data to be synchronized, if show that the information table of each business has new data;Thus determining In information data table in one tables of data to be synchronized, the when of showing that the information table of each business has new data, can be In priority list in one tables of data to be synchronized, go to determine the priority of the information table of each business with new data.Then go The priority of the information table according to each business in the priority list in the first tables of data to be synchronized, by have new data and There are the data in the information table of priority and carry out data syn-chronization.
For example, the first tables of data to be synchronized in the memory database timing scan DB data base of business of opening an account, go Determine in the information data table in the first tables of data to be synchronized, if show that the information table of the business of opening an account has new data; If it is determined that open an account, the information table of business has new data, then can the priority list in the first tables of data to be synchronized go Determine the priority of the information table of the business of opening an account;Then according to the order of priority of the information table of business of opening an account, will have newly In the information table of the business of opening an account of data, new data carries out data syn-chronization.
Also include:
Step 202, when not there is in determining the first tables of data to be synchronized the information of data, obtain in DB data base The second tables of data to be synchronized, wherein, the second tables of data to be synchronized has the information of the data being not provided with priority.
In the present embodiment, concrete, if the in each memory database respectively periodic timing scan DB data base One tables of data to be synchronized, determines in the information data table in the first tables of data to be synchronized, shows in the information table of each business not There is new data;The most each memory database can obtain the tables of data to be synchronized of second in DB data base, at the second number to be synchronized According to the information of the information table in table with each business, and now the information table of these business is not provided with priority, thus Second tables of data to be synchronized has the information of data for arranging priority.Table 4 is the second tables of data to be synchronized, and table 4 is permissible It is referred to as Table:CACHE_SYN_TABLE, as shown in table 4:
Table 4 second tables of data to be synchronized
Wherein, CACHEDBNODE characterizes the title of the server that information table is belonged to, and TABLEID characterizes information table ID, TBLNAME characterize the table name of information table, OP, KEYID, KEYNAME and SYNCOUNT are the additional letter of information table Breath, GENERATEDATE is temporal information.Now, the information table characterized in table 4 is not set table in priority, and then table 4 Storage data in the information table levied do not have priority.
For example, the data having talk business are stored in the information table of talk business when, due to call The information table of business does not has priority, thus can write in the second tables of data to be synchronized in the information table of talk business and store New data.
Step 203, judge in the second tables of data to be synchronized, if there is the information of data.
In the present embodiment, concrete, first determine whether the information of the information table of business, table in the second tables of data to be synchronized Whether bright have new data to have been written in the information table of business, so that it is determined that in the second tables of data to be synchronized, if there are data Information.
For example, the data having talk business are stored in the information table of talk business when, due to call The information table of business does not has priority, thus can write in the second tables of data to be synchronized in the information table of talk business and store New data;Such that it is able to according to the information in the second tables of data to be synchronized, it may be determined that whether go out in the information table of talk business There is new data, and then determine not to be set in the information table of priority whether have new data to be written into.
Step 204, when there is in determining the second tables of data to be synchronized the information of data, according to the second number to be synchronized According to the storage order of each data characterized in table, each data characterized in the second tables of data to be synchronized are carried out data syn-chronization.
In the present embodiment, concrete, the memory database in each business determines in the second tables of data to be synchronized have The when of the information of data, it may be determined that be not set in the information table of priority and have new data to be written into, such that it is able to according to The each information table characterized in second tables of data to be synchronized, according to the storage order of each data in each information table, by each information table In each data carry out data syn-chronization, thus each data characterized in the second tables of data to be synchronized are carried out data syn-chronization.
For example, the memory database of talk business can be according to the information in the second tables of data to be synchronized, can be true Make and the information table of talk business has new data, the information table of talk business there is no priority;At the second number to be synchronized There is the information of the information table of talk business according to storage in table, thus the memory database of talk business can be to be synchronized according to second The information of the information table of the talk business of storage in tables of data, finds the new number of talk business in the information table of talk business According to, simultaneously because each data have storage order in the information table of talk business, and then the memory database of talk business can With the storage order of the new data according to talk business, the new data of this talk business is carried out data syn-chronization.
The memory database of each business determines the information in the second tables of data to be synchronized without data when, then Can terminate this time to scan the process of DB data base.
After step 103, also include:
Step 205, the second tables of data to be synchronized obtained in DB data base, wherein, have in the second tables of data to be synchronized It is not provided with the information of the data of priority;Judge in the second tables of data to be synchronized, if there is the information of data;Determining second The when that tables of data to be synchronized having the information of data, according to the storage time of each data characterized in the second tables of data to be synchronized The each data characterized in second tables of data to be synchronized are carried out data syn-chronization by sequence.
In the present embodiment, concrete, in step 103, each data characterized in the first tables of data to be synchronized are carried out After data syn-chronization, in the information table of the business that will characterize in the first tables of data to be synchronized, the new data stored, count After synchronizing, the memory database of each business can continue to scan on the tables of data to be synchronized of second in DB data base, goes not have The new data in information table that is that set priority and that store new data is had to carry out data syn-chronization, this process and 202~step Process described in 204 is identical.
The present embodiment is by when determining that data have been determined priority, and the information of information table data belonged to writes extremely In first tables of data to be synchronized;When determining that data are not determined priority, the information of information table data belonged to writes extremely In second tables of data to be synchronized;Such that it is able to by the information in the information table setting priority, be written to the first number to be synchronized According in table, owing to information table has the data in priority, and then information table, also there is priority, in the first tables of data to be synchronized In there is the information of the data being not provided with priority;The information of the information table having priority, not having priority can be divided Do not store.By first accessing and obtain the information of the data in the tables of data to be synchronized of first in DB data base, determining The when of having the information of data in one tables of data to be synchronized, in foundation the first tables of data to be synchronized, each data of sign is preferential The each data characterized in first tables of data to be synchronized are carried out data syn-chronization by level order;Then the second tables of data to be synchronized is accessed In the information of data, when there is in determining the second tables of data to be synchronized the information of data, according to the second tables of data to be synchronized The each data characterized in second tables of data to be synchronized are carried out data syn-chronization by the storage order of each data of middle sign, and then first First will have data advanced person's row data syn-chronization of priority, simultaneously can by data advanced person's row data syn-chronization higher for priority, To not have data advanced person's row data syn-chronization of priority again;Such that it is able to promptness to be required higher, ageing requirement is compared Higher data carry out data synchronization processing timely, it is ensured that the effectiveness of data and promptness, prevent the loss of data with And the situation that business cannot be used by a user, and then ensure that each business, especially promptness require requirement higher, ageing The normal operation of the highest business and use.
The structural representation of the synchronizer of the internal storage data that Fig. 3 provides for the embodiment of the present invention three, as it is shown on figure 3, this The device that embodiment provides, including:
First acquisition module 31, for obtaining the tables of data to be synchronized of first in DB data base, wherein, the first number to be synchronized According to the information in table with the data being provided with priority;
First judge module 32, for judging in the first tables of data to be synchronized, if having the information of data;
First synchronization module 33, the when of for having the information of data in determining the first tables of data to be synchronized, foundation The each data characterized in first tables of data to be synchronized are entered by the priority order of each data characterized in the first tables of data to be synchronized Row data syn-chronization.
The synchronizer of the internal storage data of the present embodiment can perform the synchronization of the internal storage data that the embodiment of the present invention one provides Method, it is similar that it realizes principle, and here is omitted.
The present embodiment is by accessing and obtain the information of data in the tables of data to be synchronized of first in DB data base, the One tables of data to be synchronized has the information of the data being provided with priority, in determining the first tables of data to be synchronized, there are data Information when, according to the priority order of each data characterized in the first tables of data to be synchronized, by the first data to be synchronized The each data characterized in table carry out data syn-chronization.Such that it is able to by number higher for promptness requirement requirement higher, ageing According to carrying out data synchronization processing timely, it is ensured that the effectiveness of data and promptness, prevent the loss of data and business without The situation that method is used by a user, and then ensure that each business, especially promptness require that requirement higher, ageing is higher The normal operation of business and use.
The structural representation of the synchronizer of the internal storage data that Fig. 4 provides for the embodiment of the present invention four, in embodiment three On the basis of, as shown in Figure 4, the device that the present embodiment provides, also include:
Second acquisition module 41, the when of for not having the information of data in determining the first tables of data to be synchronized, obtains Take the tables of data to be synchronized of second in DB data base, wherein, the second tables of data to be synchronized has the data being not provided with priority Information;
Second judge module 42, for judging in the second tables of data to be synchronized, if having the information of data;
Second synchronization module 43, the when of for having the information of data in determining the second tables of data to be synchronized, foundation The each data characterized in second tables of data to be synchronized are carried out by the storage order of each data characterized in the second tables of data to be synchronized Data syn-chronization.
Also include:
3rd acquisition module 44, is used for each data number in the first tables of data to be synchronized at the first synchronization module 33 After synchronizing, obtain the second tables of data to be synchronized in DB data base, wherein, the second tables of data to be synchronized has and is not provided with The information of the data of priority;
3rd judge module 45, for judging in the second tables of data to be synchronized, if having the information of data;
3rd synchronization module 46, the when of for having the information of data in determining the second tables of data to be synchronized, foundation The each data characterized in second tables of data to be synchronized are carried out by the storage order of each data characterized in the second tables of data to be synchronized Data syn-chronization.
First tables of data to be synchronized, includes priority list and information data table, includes information table in information data table Information, priority list includes the priority of information table;
Accordingly, the first judge module 32, specifically for:
Determine whether the information table in information data table has new data, and determine that there is new data according to priority list The priority of information table.
Also include:
Writing module 47, was used for before the first acquisition module 31 obtains the tables of data to be synchronized of first in DB data base, Obtain data, and determine in data whether be defined priority;When determining that data have been determined priority, data are belonged to The information write of information table in the first tables of data to be synchronized;When determining that data are not determined priority, data are belonged to The information write of information table in the second tables of data to be synchronized.
The synchronizer of the internal storage data of the present embodiment can perform the synchronization of the internal storage data that the embodiment of the present invention two provides Method, it is similar that it realizes principle, and here is omitted.
The present embodiment is by when determining that data have been determined priority, and the information of information table data belonged to writes extremely In first tables of data to be synchronized;When determining that data are not determined priority, the information of information table data belonged to writes extremely In second tables of data to be synchronized;Such that it is able to by the information in the information table setting priority, be written to the first number to be synchronized According in table, owing to information table has the data in priority, and then information table, also there is priority, in the first tables of data to be synchronized In there is the information of the data being not provided with priority;The information of the information table having priority, not having priority can be divided Do not store.By first accessing and obtain the information of the data in the tables of data to be synchronized of first in DB data base, determining The when of having the information of data in one tables of data to be synchronized, in foundation the first tables of data to be synchronized, each data of sign is preferential The each data characterized in first tables of data to be synchronized are carried out data syn-chronization by level order;Then the second tables of data to be synchronized is accessed In the information of data, when there is in determining the second tables of data to be synchronized the information of data, according to the second tables of data to be synchronized The each data characterized in second tables of data to be synchronized are carried out data syn-chronization by the storage order of each data of middle sign, and then first First will have data advanced person's row data syn-chronization of priority, simultaneously can by data advanced person's row data syn-chronization higher for priority, To not have data advanced person's row data syn-chronization of priority again;Such that it is able to promptness to be required higher, ageing requirement is compared Higher data carry out data synchronization processing timely, it is ensured that the effectiveness of data and promptness, prevent the loss of data with And the situation that business cannot be used by a user, and then ensure that each business, especially promptness require requirement higher, ageing The normal operation of the highest business and use.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each method embodiment can be led to The hardware crossing programmed instruction relevant completes.Aforesaid program can be stored in a computer read/write memory medium.This journey Sequence upon execution, performs to include the step of above-mentioned each method embodiment;And aforesaid storage medium includes: ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Last it is noted that above example is only in order to illustrate technical scheme, it is not intended to limit;Although With reference to previous embodiment, the present invention is described in detail, it will be understood by those within the art that: it still may be used So that the technical scheme described in foregoing embodiments to be modified, or wherein portion of techniques feature is carried out equivalent; And these amendment or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (10)

1. the synchronous method of an internal storage data, it is characterised in that including:
Obtain the first tables of data to be synchronized in DB data base, wherein, described first tables of data to be synchronized has be provided with excellent The information of the data of first level;
Judge in described first tables of data to be synchronized, if there is the information of data;
The when that there is in determining described first tables of data to be synchronized the information of data, according to described first tables of data to be synchronized The each data characterized in described first tables of data to be synchronized are carried out data syn-chronization by the priority order of each data of middle sign.
Method the most according to claim 1, it is characterised in that also include:
The when of not having the information of data in determining described first tables of data to be synchronized, second obtained in DB data base is treated Synchrodata table, wherein, has the information of the data being not provided with priority in described second tables of data to be synchronized;
Judge in described second tables of data to be synchronized, if there is the information of data;
The when that there is in determining described second tables of data to be synchronized the information of data, according to table in the second tables of data to be synchronized The each data characterized in described second tables of data to be synchronized are carried out data syn-chronization by the storage order of each data levied.
Method the most according to claim 1, it is characterised in that each data in described first tables of data to be synchronized are being entered After row data syn-chronization, also include:
Obtain the second tables of data to be synchronized in DB data base, wherein, described second tables of data to be synchronized has be not provided with excellent The information of the data of first level;
Judge in described second tables of data to be synchronized, if there is the information of data;
The when that there is in determining described second tables of data to be synchronized the information of data, according to table in the second tables of data to be synchronized The each data characterized in described second tables of data to be synchronized are carried out data syn-chronization by the storage order of each data levied.
Method the most according to claim 1, it is characterised in that described first tables of data to be synchronized, includes priority list And information data table, described information data table includes the information of information table, described priority list includes described information The priority of table;
Accordingly, in described first tables of data to be synchronized of described judgement, if there is the information of data, including:
Determine whether the information table in described information data table has new data, and determine that according to described priority list there is new number According to the priority of information table.
5. according to the method described in any one of claim 1-4, it is characterised in that first in described acquisition DB data base is treated Before synchrodata table, also include:
Obtain data, and determine in data whether be defined priority;
When determining that data have been determined priority, the information of information table data belonged to writes to the first tables of data to be synchronized In;
When determining that data are not determined priority, the information of information table data belonged to writes to the second tables of data to be synchronized In.
6. the synchronizer of an internal storage data, it is characterised in that including:
First acquisition module, for obtaining the tables of data to be synchronized of first in DB data base, wherein, described first data to be synchronized Table has the information of the data being provided with priority;
First judge module, is used for judging in described first tables of data to be synchronized, if having the information of data;
First synchronization module, the when of for having the information of data in determining described first tables of data to be synchronized, according to institute State the priority order of each data characterized in the first tables of data to be synchronized, each by what described first tables of data to be synchronized characterized Data carry out data syn-chronization.
Device the most according to claim 6, it is characterised in that also include:
Second acquisition module, the when of for not having the information of data in determining described first tables of data to be synchronized, obtains The second tables of data to be synchronized in DB data base, wherein, has, in described second tables of data to be synchronized, the number being not provided with priority According to information;
Second judge module, is used for judging in described second tables of data to be synchronized, if having the information of data;
Second synchronization module, the when of for having the information of data in determining described second tables of data to be synchronized, according to the The each data characterized in described second tables of data to be synchronized are entered by the storage order of each data characterized in two tables of data to be synchronized Row data syn-chronization.
Device the most according to claim 6, it is characterised in that also include:
3rd acquisition module, is used for each data number in described first tables of data to be synchronized at described first synchronization module After synchronizing, obtain the second tables of data to be synchronized in DB data base, wherein, described second tables of data to be synchronized has not The information of the data of priority is set;
3rd judge module, is used for judging in described second tables of data to be synchronized, if having the information of data;
3rd synchronization module, the when of for having the information of data in determining described second tables of data to be synchronized, according to the The each data characterized in described second tables of data to be synchronized are entered by the storage order of each data characterized in two tables of data to be synchronized Row data syn-chronization.
Device the most according to claim 6, it is characterised in that described first tables of data to be synchronized, includes priority list And information data table, described information data table includes the information of information table, described priority list includes described information The priority of table;
Accordingly, described first judge module, specifically for:
Determine whether the information table in described information data table has new data, and determine that according to described priority list there is new number According to the priority of information table.
10. according to the device described in any one of claim 6-9, it is characterised in that also include:
Writing module, before obtaining the first tables of data to be synchronized in DB data base at described first acquisition module, obtains Data, and determine in data whether be defined priority;When determining that data have been determined priority, the letter that data are belonged to The information of breath table writes to the first tables of data to be synchronized;When determining that data are not determined priority, the letter that data are belonged to The information of breath table writes to the second tables of data to be synchronized.
CN201610480157.8A 2016-06-27 2016-06-27 The synchronous method of internal storage data and device Pending CN106156282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610480157.8A CN106156282A (en) 2016-06-27 2016-06-27 The synchronous method of internal storage data and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610480157.8A CN106156282A (en) 2016-06-27 2016-06-27 The synchronous method of internal storage data and device

Publications (1)

Publication Number Publication Date
CN106156282A true CN106156282A (en) 2016-11-23

Family

ID=57349367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610480157.8A Pending CN106156282A (en) 2016-06-27 2016-06-27 The synchronous method of internal storage data and device

Country Status (1)

Country Link
CN (1) CN106156282A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112839067A (en) * 2019-11-22 2021-05-25 腾讯科技(深圳)有限公司 Data synchronization method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162820A (en) * 2015-06-25 2015-12-16 广东欧珀移动通信有限公司 Data synchronous method and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162820A (en) * 2015-06-25 2015-12-16 广东欧珀移动通信有限公司 Data synchronous method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭进伟等: ""基于中小煤矿的双机热备数据同步系统"", 《煤炭科学技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112839067A (en) * 2019-11-22 2021-05-25 腾讯科技(深圳)有限公司 Data synchronization method and device

Similar Documents

Publication Publication Date Title
CN108804483A (en) Rendering intent, server and the computer readable storage medium of the cell page
CN107665306B (en) A kind of method, apparatus, client and the server of the injection of detection illegal file
CN104424030A (en) Sharing memory multi-process operation method and device
CN108647075A (en) Listview method for refreshing, device and the electronic equipment of five application page
CN102467525A (en) Document associating method and system
CN102023843A (en) Function calling method and device as well as smart card
CN106682492A (en) Method and device for managing heap corruption
CN108228300A (en) The method and device that a kind of control content refreshes in real time
CN103136301A (en) File management method and electronic device executing the same
CN104239337B (en) Processing method and processing device of tabling look-up based on TCAM
CN104424240A (en) Multi-table correlation method and system, main service node and computing node
CN101197675B (en) Accesses control list configuration method and device
US20160154545A1 (en) Electronic device and method for managing and displaying application icons
CN107632852A (en) Information updating method and device
CN106156282A (en) The synchronous method of internal storage data and device
CN107515907A (en) The display methods and device of browser page
CN110134511A (en) A kind of shared storage optimization method of OpenTSDB
CN111046115B (en) Heterogeneous database interconnection management method based on knowledge graph
CN106095245A (en) The display packing of a kind of message, device and terminal
CN106202374A (en) A kind of data processing method and device
CN102184105A (en) Data processing method based on modularity and data center system
CN104461549B (en) The arrangement display methods and device of graphical interfaces
CN109213979A (en) Method, apparatus, electronic equipment and the storage medium that electrical form is screened
CN103581845B (en) Method and system for pushing service information
CN104572097B (en) One kind is taken pictures data readjustment processing method 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20161123