Method and device for caching multi-instance data

A technology for caching data and multiple instances, applied in the field of data processing, can solve the problems of server-side cache pressure database connection, database pressure application program pressure, read-write interlocking for resources and other problems, so as to reduce CPU overhead and reduce pressure , to avoid the effect of cache data occupying memory space

Active Publication Date: 2015-02-04
BEIJING GRIDSUM TECH CO LTD
View PDF4 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

A server-side program serves multiple instances, and each instance has its own independent database. When multiple instances are queried concurrently, on the one hand, data is continuously written into the database table, which may cause read-write interlocking to compete for resources. On the one hand, it is necessary to provide different data to multiple instances in an application program. If the database is queried every time the client requests, the pressure on both the database and the application program will be very high.
[0003] In the existing technical solution, the server regularly updates the cache required by each instance, and the client directly reads the cached data for each request. In the above solution, when there are too many instances, the cached data in the server is also very special. Many, which causes server-side cache pressure and unnecessary database connections

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
  • Method and device for caching multi-instance data
  • Method and device for caching multi-instance data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. 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.

[0032] The embodiment of the present invention adds an active instance list to the memory of the server, and dynamically maintains the active instance list according to the data requested by the client from the server, and the server only performs data caching on the instances in the active instance list, so as to avoid low usage rate. High cache data takes up memory space, and can also minimize CPU overhead and unnecessary database connections, red...

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 method and a device for caching multi-instance data. The method comprises the following steps: firstly, establishing and maintaining an active instance list in a memory of a server, and performing updating maintenance only on cache data of all instances existing in the active instance list; when a data request sent by a certain instance is received, if the instance is not found in the active instance list, adding the ID (identity) of the instance to the active instance list, and setting corresponding time T as the time of the current server; moreover, querying the data of the instance from a database, and then, returning the data of the instance to a client which corresponds to the instance. According to the method, not only can the cache data not high in usage rate be prevented from occupying the memory space but also the overhead of a CPU (central processing unit) and unnecessary database connection can be reduced to the greatest extent, so that the pressure on the database is reduced.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method and device for caching multi-instance data. Background technique [0002] At present, in the real-time data monitoring system, the client needs to query the server-side data frequently. The usual method is that the client sends out query conditions, and the server queries the database after receiving the query conditions, returns the data results and passes them to the client. A server-side program serves multiple instances, and each instance has its own independent database. When multiple instances are queried concurrently, on the one hand, data is continuously written into the database table, which may cause read-write interlocking to compete for resources. On the one hand, multiple instances need to be provided with different data in an application. If the database is queried every time the client requests, the pressure on both the database and the application...

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): G06F17/30G06F12/08H04L29/06G06F12/0804
CPCG06F16/217G06F16/24552
Inventor 郭涛王鹏
Owner BEIJING GRIDSUM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products