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

Cache data dynamic synchronization method

A technology for caching data and data, applied in the database field, can solve problems such as large impact on data performance, troublesome code maintenance, affecting database performance, etc., to achieve the effect of easy code without affecting performance

Pending Publication Date: 2020-11-13
北京首汽智行科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Among them, the disadvantages of the interface-based loading cache method are low versatility and high maintenance costs
While nesting and adapting business logic, the accompanying new problem is low versatility, basically no versatility at all
Due to the excessive coupling with business logic, code maintenance is also very troublesome. If you are not familiar with the business, you cannot operate and use cached data correctly.
[0005] The disadvantage of the method based on asynchronous timing tasks is that it has a greater impact on data performance
Since the asynchronous timing task mechanism is adopted, the database must be operated more frequently in the pursuit of low latency. This batch and high-frequency strategy greatly affects the performance of the database.
[0006] It can be seen that the above two solutions cannot guarantee low latency and do not affect the performance of the database at the same time.

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be specifically introduced below in conjunction with specific embodiments.

[0029] The cache data dynamic synchronization method provided by the embodiment of the present invention includes the following steps:

[0030] S101. Obtain a JDBC template name from a preset second data set, and obtain a JDBC template matching the JDBC template name through a Java context.

[0031] Among them, the JDBC template (Java Data Base Connectivity, java database connection) is a Java API for executing SQL statements, which can provide unified access to various relational databases. It consists of a set of classes and interfaces written in the Java language. It is a standard specification for Java to access databases.

[0032] S102. Obtain a single data query sql statement from the second data set and write the primary key of each piece of data in the binary log generated by the operation database into the preset single data query sql statement.

[0033] Am...

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 discloses a cache data dynamic synchronization method and relates to the technical field of databases. The method comprises the steps of obtaining a JDBC template name from a preset second data set; obtaining a JDBC template matched with the name of the JDBC template through a Java context environment; obtaining a single data query sql statement from the second data set, and writinga main key of each part of data in a binary log generated by operating the database into a preset single data query sql statement, executing a single data query sql statement by utilizing the JDBC template; and obtaining the current data, judging whether the validity of the data needs to be verified or not, if so, judging whether the data is valid or not, and if yes, writing the data into the target cache container, thereby realizing complete decoupling with the service logic, enabling codes to be easy to maintain, ensuring low delay, not influencing the performance of the database, ensuring data synchronization to be formal, and supporting the HA architecture.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method for dynamically synchronizing cached data. Background technique [0002] Cache data is a very important part of the Internet's layered architecture. It is usually used to reduce the pressure on the database, improve the overall performance of the system, and shorten the access time. The cache data synchronization method has always been a hot issue. Different methods have different emphases and are accompanied by different advantages and disadvantages. In general, when synchronizing cached data, achieving low latency, decoupling from business logic, and minimizing the impact on the database is the same goal. [0003] At this stage, there are two mainstream cache data synchronization methods, one is based on the interface loading method, including two strategies of active refresh and lazy loading; the other is based on asynchronous timing tasks, refreshing the cache at ...

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/957
CPCG06F16/9574
Inventor 敬岩杨明
Owner 北京首汽智行科技有限公司