Unlock instant, AI-driven research and patent intelligence for your innovation.

Data synchronization method and system between cache and database

A data synchronization and database technology, applied in the database field, can solve problems such as database and cache inconsistency, data inconsistency, etc., to achieve the effect of ensuring data consistency

Pending Publication Date: 2021-05-04
SHENZHEN IPANEL TECH LTD
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the prior art, in the strategy of first updating the database and then deleting the cache, if the deletion of the cache fails, the program thinks that there is data in the cache, and the user will obtain the returned data from the cache. Since the database data has been updated, the user The obtained data is inconsistent with the data in the database, which leads to the inconsistency between the database and the cache

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data synchronization method and system between cache and database
  • Data synchronization method and system between cache and database
  • Data synchronization method and system between cache and database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0059] The inventor found through research that: according to the update sequence of the database and the cache, there are the following four data synchronization situations:

[0060] 1. Update the database first, then update the cache

[0061] In this case, the data synchronization process is as follows:

[0062] 1) Request A initiates first, updating the database to 99, but has not had time to update the cache;

[0063] 2) Request B to initiate, update the...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a data synchronization method and system between a cache and a database. The data synchronization system comprises an application service, RabbitMQ middleware, the cache and the database, and the application service updates target data in the database; the application service deletes the target data in the cache; and when the RabbitMQ middleware receives cache deletion failure information sent by the application service, the application service is triggered to delete the target data in the cache again until the target data in the cache is successfully deleted, and the data consistency between the cache and the database is ensured in a strategy of updating the data and then deleting the cache.

Description

technical field [0001] The present invention relates to the technical field of databases, and more specifically, to a data synchronization method and system between a cache and a database. Background technique [0002] In the field of database technology, in order to reduce the load pressure on the database and improve the response efficiency to users, the data of the database is generally synchronized to the cache, and the user can obtain the corresponding data by accessing the cache. How to ensure the consistency between the database and the cache when data is updated has become an urgent technical problem in this field. [0003] In the prior art, in the strategy of first updating the database and then deleting the cache, if the deletion of the cache fails, the program thinks that there is data in the cache, and the user will obtain the returned data from the cache. Since the database data has been updated, the user The obtained data is inconsistent with the data in the d...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/23G06F16/2455G06F16/27
CPCG06F16/23G06F16/24552G06F16/27
Inventor 徐佳宏陈华兵黄金龙曾珂
Owner SHENZHEN IPANEL TECH LTD