CN109254995A - A method of utilizing cache synchronization data - Google Patents

A method of utilizing cache synchronization data Download PDF

Info

Publication number
CN109254995A
CN109254995A CN201810870408.2A CN201810870408A CN109254995A CN 109254995 A CN109254995 A CN 109254995A CN 201810870408 A CN201810870408 A CN 201810870408A CN 109254995 A CN109254995 A CN 109254995A
Authority
CN
China
Prior art keywords
client
data
server
timestamp
cache
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
CN201810870408.2A
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.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software 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 Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201810870408.2A priority Critical patent/CN109254995A/en
Publication of CN109254995A publication Critical patent/CN109254995A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The present invention provides a kind of method using cache synchronization data, belong to computer field, the present invention includes that configuration needs synchronous tables of data, according to configuration information record SQL action statement and stamp timestamp, client updates the timestamp in client-cache by the timestamp synchrodata with server correlation data table into local cache, after synchronously completing.By this method, client can be reduced to the amount of access of server data table, improve software operation efficiency.

Description

A method of utilizing cache synchronization data
Technical field
The present invention relates to Computer Applied Technology more particularly to a kind of methods using cache synchronization data.
Background technique
The database of business management software houses a large amount of tables of data, and client needs frequently to visit in user operation process Ask the data in server data table.If reading data from server database every time, a large amount of data are had from clothes Business device is transferred to client, causes database and network transmission to bear excessive, the client end response time extends, and influences user's body It tests.To reduce the access to server data table, a cache database can be established in client, in server database Data buffer storage is to client, and directly access data reduce network transmission to client in the buffer.It is synchronous to occur data again in this way The problem of, when the data in server database are changed, how automatic synchronization is into caching data on client library, to protect Newest data are accessed in card client at any time.
Summary of the invention
In order to solve the above technical problems, can pass through the invention proposes a kind of method using cache synchronization data This method automatic synchronization server data is to client.
The technical scheme is that
A method of using cache synchronization data, mainly comprise the steps that
1. configuration needs synchronous tables of data, it is saved in the PSPTABLEHISTORY table of server.
2. according to configuration information record SQL action statement and stamping timestamp:
(1) operation of data mainly includes: INSERT, UPDATE, DELETE these types mode, when user is to specified number After table handling, when clicking preservation, check the need for caching in the SQLPRIEVIEW event of datawindow.
(2) if checking PSPTABLEHISTORY has the corresponding data of current operation table, SQL record is serviced SQL Sentence is inserted into PSPSQLBUFFER table, and stamps timestamp.
3. client is by the timestamp synchrodata with server correlation data table into local cache:
(1) it first checks for client to automatically create if not whether there is or not PSPTABLEHISTORY table, and in client Timestamp stamps 1900-01-01, to carry out initial synchronisation.
(2) then the PSPTABLEHISTORY_LASTUPDATE of comparison client and server decides whether to carry out together Step synchronizes if client is later than server time stamp, otherwise asynchronous.
(3) according to the PSPSQLBUFFER table of the timestamp filtering server of client, SQL statement is extracted, in client It is executed in caching, it is synchronous to complete data.
4. updating the timestamp in client-cache after synchronously completing: after caching data on client synchronously completes, updating visitor Timestamp in the caching of family end is consistent with server.
The present invention includes two tables of data PSPTABLEHISTORY, PSPSQLBUFFER.
1. data buffer storage table PSPTABLEHISTORY
Field name Type Explanation
PSPTABLEHISTORY_TABLENAME varchar(20) Data table name
PSPTABLEHISTORY_LASTUPDATE varchar(20) Recent renewal time
PSPTABLEHISTORY_SFQY char(1) By no enabling
2. data value PSPSQLBUFFER
The beneficial effects of the invention are as follows
Method provided by the invention can reduce client to the amount of access of server, reduce network transmission pressure, work as clothes Data in business device database are changed, and automatic synchronization is into caching data on client library, to guarantee that client is visited at any time Ask newest data.
Detailed description of the invention
Fig. 1 shows the flow charts of client more new data;
Fig. 2 indicates the flow chart of client access data.
Specific embodiment
More detailed elaboration is carried out to the contents of the present invention below:
By taking synchronous meter ZWWLDW as an example,
1, data buffer storage table PSPTABLEHISTORY is created in server database, and is inserted into data: insert into PSPTABLEHISTORY values(‘ZWWLDW’,”,’1’)。
2, it checks the need for caching in the SQLPRIEVIEW event of client datawindow, if checked PSPTABLEHISTORY has the corresponding data of current operation table, then SQL statement is inserted into PSPSQLBUFFER table, and stamp Timestamp.
3, the PSPTABLEHISTORY_LASTUPDATE for comparing client and server decides whether to synchronize.
4, according to the PSPSQLBUFFER table of the timestamp filtering server of client, SQL statement is extracted, it is slow in client Middle execution is deposited, it is synchronous to complete data.
5, after caching data on client synchronously completes, the timestamp updated in client-cache is consistent with server.

Claims (5)

1. a kind of method using cache synchronization data, it is characterised in that it is comprised the steps of:
1) configuration needs synchronous tables of data;
2) according to configuration information record SQL action statement and timestamp is stamped;
3) client is by the timestamp synchrodata with server correlation data table into local cache;
4) timestamp in client-cache is updated after synchronously completing.
2. according to the method described in claim 1, it is characterized by:
In step 1), configuration needs synchronous tables of data, is saved in the PSPTABLEHISTORY table of server.
3. according to the method described in claim 1, it is characterized by:
In step 2,
After user is to specified feature operation, when clicking preservation, checking in the SQLPRIEVIEW event of datawindow is It is no to need to cache;
If checking there are the corresponding data of current operation table in client table PSPTABLEHISTORY, SQL statement is inserted into Into server PS PSQLBUFFER table, and stamp timestamp.
4. according to the method described in claim 1, it is characterized by:
In step 3),
Client is first checked for whether there is or not PSPTABLEHISTORY table, is automatically created if not, and is beaten in client time stamp Upper 1900-01-01, to carry out initial synchronisation;
Then the PSPTABLEHISTORY_LASTUPDATE for comparing client and server decides whether to synchronize, if Client is later than server time stamp, then synchronizes, otherwise asynchronous;
According to the PSPSQLBUFFER table of the timestamp filtering server of client, SQL statement is extracted, is held in client-cache It is synchronous to complete data for row.
5. according to the method described in claim 1, it is characterized by:
In step 4), after caching data on client synchronously completes, the timestamp updated in client-cache is consistent with server.
CN201810870408.2A 2018-08-02 2018-08-02 A method of utilizing cache synchronization data Pending CN109254995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810870408.2A CN109254995A (en) 2018-08-02 2018-08-02 A method of utilizing cache synchronization data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810870408.2A CN109254995A (en) 2018-08-02 2018-08-02 A method of utilizing cache synchronization data

Publications (1)

Publication Number Publication Date
CN109254995A true CN109254995A (en) 2019-01-22

Family

ID=65049071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810870408.2A Pending CN109254995A (en) 2018-08-02 2018-08-02 A method of utilizing cache synchronization data

Country Status (1)

Country Link
CN (1) CN109254995A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708796A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Data consistency method based on time stamp

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904887A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for data synchronization of Web client and server
CN103761255A (en) * 2013-12-27 2014-04-30 北京集奥聚合网络技术有限公司 Method and system for optimizing data storage of NoSQL mode
CN104639767A (en) * 2015-03-13 2015-05-20 深圳市鸿宇顺科技有限公司 Mobile terminal and control method thereof on cache data flow rate
CN106648917A (en) * 2016-09-19 2017-05-10 福建天泉教育科技有限公司 Cache data differential updating method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102904887A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for data synchronization of Web client and server
CN103761255A (en) * 2013-12-27 2014-04-30 北京集奥聚合网络技术有限公司 Method and system for optimizing data storage of NoSQL mode
CN104639767A (en) * 2015-03-13 2015-05-20 深圳市鸿宇顺科技有限公司 Mobile terminal and control method thereof on cache data flow rate
CN106648917A (en) * 2016-09-19 2017-05-10 福建天泉教育科技有限公司 Cache data differential updating method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708796A (en) * 2020-06-23 2020-09-25 浪潮云信息技术股份公司 Data consistency method based on time stamp

Similar Documents

Publication Publication Date Title
CN106164865B (en) The method and system of the affairs batch processing of dependence perception for data duplication
CN105630863B (en) Transaction control block for multi-version concurrent commit status
CN110879813B (en) Binary log analysis-based MySQL database increment synchronization implementation method
US9779128B2 (en) System and method for massively parallel processing database
US5758355A (en) Synchronization of server database with client database using distribution tables
CN101828182B (en) ETL-less zero redundancy system and method for reporting OLTP data
US20120158795A1 (en) Entity triggers for materialized view maintenance
CN100495400C (en) Indexes on-line updating method of full text retrieval system
US11487714B2 (en) Data replication in a data analysis system
US20110191299A1 (en) Logical data backup and rollback using incremental capture in a distributed database
EP2380090B1 (en) Data integrity in a database environment through background synchronization
CN109656999A (en) Method of data synchronization, equipment, storage medium and the device of big data quantity
CN108536745A (en) Tables of data extracting method, terminal, equipment and storage medium based on Shell
CN110019469A (en) Distributed data base data processing method, device, storage medium and electronic device
CN105808653A (en) User label system-based data processing method and device
CN107704573A (en) A kind of intelligent buffer method coupled with business
JP2017534986A (en) Online scheme and data conversion
CN106777085A (en) A kind of data processing method, device and data query system
CN111367994A (en) Method and system for synchronously backing up incremental data of database
CN107562882A (en) A kind of method of data synchronization and device based on log analysis
CN102193938A (en) Method and device for acquiring incremental data
CN112527801A (en) Data synchronization method and system between relational database and big data system
CN104391899A (en) Data management method and system for centralized clearing system
CN109254995A (en) A method of utilizing cache synchronization data
CN109446262A (en) A kind of data assemblage method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190122