Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Cache refreshing method and device

A new method and caching technology, applied in the field of financial technology, can solve the problems of inconsistent cached data, difficulty in maintaining data consistency, and dysfunction.

Pending Publication Date: 2021-12-24
WEBANK (CHINA)
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the current cache refresh is completed through periodic asynchronous processing tasks, obviously it is impossible to realize that each service node performs cache refresh synchronously at the same time point; It will make it difficult for the local caches of multiple service nodes where the same application service is deployed to maintain data consistency. However, the reality is that when the same application service is deployed on multiple service nodes, the multiple service nodes need to follow the same The performance of external services, that is, when the JVM-level cache data of each service node is refreshed, the consistency of the data needs to be ensured to ensure that after the transaction request enters the distributed system and is routed to any service node, it can have the same process result
[0003] For the problem that the cache refresh technology described above cannot ensure the consistency of the local cache data of each service node, it can be solved by adjusting the timing to trigger the cache refresh; however, the timing trigger still cannot solve the problem caused by updating the database at the critical point of the cache refresh. JVM (Java Virtual Machine, Java Virtual Machine) cache data inconsistency and dysfunctional problems in nodes

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
  • Cache refreshing method and device
  • Cache refreshing method and device
  • Cache refreshing method and device

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0068] In the previous example, service node 1 and service node 2 in the distributed system constitute a quota product (that is, an application service). The application service corresponds to database 1 as an example. Assuming that the user updates database 1 at 2 minutes and 0 seconds, then the service After any service node in node 1 or service node 2 detects that database 1 is updated this time, the service node can update the timestamp corresponding to 2 minutes and 0 seconds to the begin_time field of the cache refresh time stamp table, so that At 2 minutes and 15 seconds, service node 1 and service node 2 read the refresh start time from the begin_time field of the cache refresh time stamp table of database 1 as 2 minutes and 0 seconds, and the two service nodes set the refresh start time to 2 minutes and 0 seconds Compared with its own current time of 2 minutes and 15 seconds, if the difference is determined to be less than the first set threshold, such as 30 seconds, b...

example 2

[0070] In the previous example, service node 1 and service node 2 in the distributed system constitute a quota product (i.e. application service). The application service corresponds to database 1 as an example, set at 2 minutes and 0 seconds, service node 1 and service node 2 None of the service nodes detects that database 1 has been updated, so neither service node 1 nor service node 2 needs to update the value of the begin_time field in the cache refresh time stamp table, which means that the begin_time in the cache refresh time stamp table The value of the field is at least 1 minute and 30 seconds (or an earlier time before 1 minute and 30 seconds), then at 2 minutes and 15 seconds, service node 1 and service node 2 refresh the begin_time of the time stamp table from the cache of database 1 The field reads that the refresh start time is 1 minute and 30 seconds, and the two service nodes compare the refresh start time of 1 minute and 30 seconds with their own current time of...

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 relates to the field of finance science and technology, and discloses a cache refreshing method and device, which are suitable for each service node of the same application service in a distributed system, the service node determines whether a database is updated relative to a local cache based on a cache refreshing pre-check thread at a first set time, and after determining that the database is updated, records the first set time in a cache refresh time record; the service node updates the local cache according to the database after determining that the difference value between the first set time and the second set time in the cache refresh time record is smaller than the first set threshold value based on the cache refresh thread at the second set time; wherein the second set time is after the first set time. Through the mode, the consistency of the data of the local caches of the service nodes forming the same application service in the distributed system from beginning to end can be realized.

Description

technical field [0001] The embodiments of the present application relate to the field of financial technology (Fintech), and in particular, to a cache refreshing method and device. Background technique [0002] With the development of computer technology, more and more technologies (such as big data, cloud computing or blockchain) are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. For the massive transaction data generated in the financial field, it can be stored through the database. When the transaction is processed through the distributed system, the data in the database can be refreshed to the local cache of each service node through the cache refresh technology, which can greatly improve the service response speed and system throughput. However, the current cache refresh is completed through periodic asynchronous processing tasks, obviously it is impossible to realize that each service node pe...

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
IPC IPC(8): G06F16/2455G06F16/27
CPCG06F16/24552G06F16/27
Inventor 邹啟文刘建波
Owner WEBANK (CHINA)
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products