Two-Level Cache Timeout Monitoring Reducing Database Load

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional timeout monitoring methods consume significant resources in databases due to the need to store and monitor large amounts of request data, especially in high-concurrent data environments, leading to considerable burden and resource consumption.

Innovation Solution

Implementing a two-level cache system where key information of request messages, including sending times, is stored in a first-level cache and scanned at a preset frequency, with unresponsive requests being moved to a second-level cache for timeout determination, using a message log to identify timeouts based on time thresholds, thereby reducing database resource consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all request data are stored in a database for timeout monitoring, then timeout detection can be performed, but database storage and computing resources are significantly consumed

Engineering Contradiction:
Improvetimeout detection accuracyVSAvoiddatabase resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the timeout monitoring function into two parts: hot data (recent requests) stored in memory cache and cold data (expired requests) stored in database. The LRU cache holds only recent request data that needs active monitoring, while the database stores historical data. This segmentation reduces database resource consumption while maintaining timeout detection accuracy for active requests.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the timeout monitoring function from the database and implements it in the application layer using in-memory cache. By taking out the hot data monitoring function from the database, the system reduces database computational burden and resource consumption while maintaining accurate timeout detection for active requests.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If all request data are stored in a database for timeout monitoring, then complete request history is preserved, but computing burden on database increases considerably

Engineering Contradiction:
Improvetimeout monitoring completenessVSAvoiddatabase computing power
Core Design Contradiction:
ReliabilityVSPower

Solution Approach 1:

The patent segments the monitoring workload by implementing a two-layer storage architecture: LRU cache for hot data (recent requests requiring active monitoring) and database for cold data (expired or less frequently accessed requests). This segmentation shifts the computational burden of active monitoring from the database to the application layer, reducing database computing power consumption while maintaining monitoring completeness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an LRU cache as an intermediary layer between the application and the database. This intermediary cache handles the computationally intensive timeout monitoring for recent requests, acting as a buffer that protects the database from high computational loads while ensuring complete monitoring coverage.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Use of energy by moving object

If request data are stored in memory cache instead of database, then resource consumption is reduced, but data persistence and reliability may be affected

Engineering Contradiction:
Improvememory resource consumptionVSAvoiddata persistence
Core Design Contradiction:
Use of energy by moving objectVSReliability

Solution Approach 1:

The patent segments data by recency and access patterns, storing hot data (recent requests) in volatile memory cache for fast access and low resource consumption, while cold data (expired or old requests) remains in persistent database storage. This segmentation optimizes resource consumption for active data while maintaining data persistence for historical records.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the storage parameter (memory vs. disk) based on data characteristics and time factors. Recently created request data is stored in memory with high accessibility, while data exceeding the timeout threshold or older data is moved to or remains in database storage, optimizing both resource consumption and data persistence according to different parameters.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3562096B1Method and device for timeout monitoring
Publication Date: 2023.04.19 CHINA UNIONPAY
  • EP3562096B1 patent drawingFigure 1
  • EP3562096B1 patent drawingFigure 2
  • EP3562096B1 patent drawingFigure 3

AI summary

The present invention relates to the technical field of data processing, and disclosed are a method and device for timeout monitoring, comprising: a server determining key information of a request message, the key information including a sending time of the request message; the server storing the key information to a first level cache; the server scanning the first level cache according to a set frequency, if the first level cache includes a first request message, storing the key information of the first request message into a second level cache, the first request message being a request message for which a reply message is not received; the server scanning the second level cache, and determining by means of a message log whether a reply message is received for a second request message in the second level cache, if not, the second request message times out, wherein the second request message is a request message in which the difference value between a sending time and a current time is greater than a time-out threshold value. The present invention solves the problem in the prior art wherein performing timeout monitoring on a request requires the consumption of a relatively large amount of database resources.