IP Library Granted Patent US 11,449,570
Granted Patent B2
US 11,449,570 · App. 16/145,660 · Granted Sep 20, 2022

Data caching method and apparatus

Inventors: Lingyu Wang (Hangzhou, CN); Yamin Li (Hangzhou, CN)
Assignee: ANT WEALTH (SHANGHAI) FINANCIAL INFORMATION SERVICES CO., LTD.
G06F16/9574G06F16/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,449,570
App. No.
16/145,660
Granted
Sep 20, 2022
Kind
B2
Abstract

A data caching method comprises: after receiving a data request sent by a client, determining a remaining valid cache duration of cache data corresponding to the data request; determining whether the remaining valid cache duration is greater than a preset update threshold value; and if the remaining valid cache duration is less than or equal to the update threshold value, updating the cache data through a database.

Claims (54)

1. A data caching method, comprising:

dividing data from a data resource into at least two data sets according to a resource type of the data resource and a preset rule; and

separately caching each of the data sets and generating a key corresponding to each of the data sets for searching based on the keys, wherein each of the data sets has a different valid cache duration;

receiving a first data request for one of the cached data sets;

updating the cached data set responsive to receiving the first data request through a database;

receiving a second data request for the cached data set;

responsive to receiving the second data request:

determining whether the cached data set is being updated responsive to receiving the first data request;

if the cached data set is determined not being updated, determining a remaining valid cache duration of the cached data set and determining whether the remaining valid cache duration is greater than a preset update threshold value; and

when the remaining valid cache duration is determined to be less than or equal to the preset update threshold value, updating the cached data set through the database.

2. The method according to claim 1 , further comprising:

when the cached data set expires, checking whether a third data request corresponding to the cached data set is received;

when no data request corresponding to the cached data set is received, updating the cached data set through the database; and

when the third data request corresponding to the cached data set is received, searching the database for data corresponding to the data request and updating the cached data set based on the searched data.

3. The method according to claim 1 , wherein dividing the data into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a first page for presenting fixed data, dividing the data comprised in the first page and obtained from the database into the at least two data sets according to a page layout of the first page.

4. The method according to claim 1 , wherein dividing the data into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a second page having a condition query function, dividing the data comprised in the second page and obtained from the database into the at least two data sets according to a combination of query conditions that the second page involves, wherein the second page comprises a plurality of sets of query conditions each comprising at least one query condition.

5. A data caching apparatus, comprising: a processor and a non-transitory computer-readable storage medium storing instructions that, when executed by the processor, cause the processor to perform a data caching method, the method comprising:

dividing data from a data resource into at least two data sets according to a resource type of the data resource and a preset rule; and

separately caching each of the data sets and generating a key corresponding to each of the data sets for searching based on the keys, wherein each of the data sets has a different valid cache duration;

receiving a first data request for one of the cached data sets;

updating the cached data set responsive to receiving the first data request through a database;

receiving a second data request for the cached data set;

responsive to receiving the second data request:

determining whether the cached data set is being updated responsive to receiving the first data request;

if the cached data set is determined not being updated, determining a remaining valid cache duration of the cached data set and determining whether the remaining valid cache duration is greater than a preset update threshold value; and

when the remaining valid cache duration is determined to be less than or equal to the preset update threshold value, updating the cached data set through the database.

6. The apparatus according to claim 5 , wherein the method further comprises:

when the cached data set expires, checking whether a third data request corresponding to the cached data set is received;

when no data request corresponding to the cached data set is received, updating the cached data set through the database; and

when the third data request corresponding to the cached data set is received, searching the database for data corresponding to the data request and updating the cached data set based on the searched data.

7. The apparatus according to claim 5 , wherein dividing the data comprised in the data resource into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a first page for presenting fixed data, dividing the data comprised in the first page and obtained from the database into the at least two data sets according to a page layout of the first page.

8. The apparatus according to claim 5 , wherein: dividing the data comprised in the data resource into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a second page having a condition query function, dividing the data comprised in the second page and obtained from the database into the at least two data sets according to a combination of query conditions that the second page involves, wherein the second page comprises a plurality of sets of query conditions each comprising at least one query condition.

9. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a data caching method, the method comprising:

dividing data from a data resource into at least two data sets according to a resource type of the data resource and a preset rule; and

separately caching each of the data sets and generating a key corresponding to each of the data sets for searching based on the keys, wherein each of the data sets has a different valid cache duration;

receiving a first data request for one of the cached data sets;

updating the cached data set responsive to receiving the first data request through a database;

receiving a second data request for the cached data set;

responsive to receiving the second data request:

determining whether the cached data set is being updated responsive to receiving the first data request;

if the cached data set is determined not being updated, determining a remaining valid cache duration of the cached data set and determining whether the remaining valid cache duration is greater than a preset update threshold value; and

when the remaining valid cache duration is determined to be less than or equal to the preset update threshold value, updating the cached data set through the database.

10. The non-transitory computer-readable storage medium according to claim 9 , wherein the method further comprises:

when the cached data set expires, checking whether a third data request corresponding to the cached data set is received;

when no data request corresponding to the cached data set is received, updating the cached data set through the database; and

when the third data request corresponding to the cached data set is received, searching the database for data corresponding to the data request and updating the cached data set based on the searched data.

11. The non-transitory computer-readable storage medium according to claim 9 , wherein dividing the data comprised in the data resource into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a first page for presenting fixed data, dividing the data comprised in the first page and obtained from the database into the at least two data sets according to a page layout of the first page.

12. The non-transitory computer-readable storage medium according to claim 9 , wherein dividing the data comprised in the data resource into the at least two data sets according to the resource type and the preset rule comprises:

when the data resource is a second page having a condition query function, dividing the data comprised in the second page and obtained from the database into the at least two data sets according to a combination of query conditions that the second page involves, wherein the second page comprises a plurality of sets of query conditions each comprising at least one query condition.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 13, 2022
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANT WEALTH (SHANGHAI) FINANCIAL INFORMATION SERVICES CO., LTD.
Reel/Frame 060500/0700 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 5, 2018
From: WANG, LINGYU; LI, YAMIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 047677/0766 →
Priority Claims (1)
CN 201610204539.8 · Apr 1, 2016 · national
Continuity (2)
Continuation PCTCN2017077241 · Mar 20, 2017
Related Publication 20190034550A1 · Jan 31, 2019