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

Method and device for paging query of data

A paging query and data query technology, applied in the field of data processing, can solve problems such as paging interface access volume or concurrency performance problems

Active Publication Date: 2019-12-20
天津车之家软件有限公司
View PDF13 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method will cause serious performance problems when the paging interface has a large amount of access or concurrency

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 paging query of data
  • Method and device for paging query of data
  • Method and device for paging query of data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0021] The introduction of caching can relieve the pressure on the database, improve performance and respond to user requests. Among them, the cache is the data backup stored in the memory. Try to avoid directly querying the data from the database, but read the data from the cache. When the amount of data is large, querying data by page is a common performance optimization method. In general, the client queries data by page by pass...

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 for paging query of data. The method is suitable for being executed in a distributed system. The distributed system comprises a database server, a cache server and anapplication server, the application server is suitable for receiving a request of a client, the cache server is suitable for acquiring data from a cache, the database server is suitable for acquiringdata from a database, and a paging flag key of which the data structure is set as a set set is preset in the cache. The method comprises the steps of obtaining a request parameter when an interface iscalled; generating a paging flag value based on the request parameter; acquiring a binary log of the database to judge whether the data in the database is changed or not; writing the paging flag value into a set corresponding to the paging flag key, and receiving a return value; when data in the database changes, emptying the set corresponding to the paging flag key so that the return value can be updated; and acquiring query data from the cache or the database in a paging manner based on the return value.

Description

technical field [0001] The present invention relates to the technical field of data processing, in particular to a method, device and system for page-by-page query data. Background technique [0002] Redis is a key-value data structure storage system. The supported data structures include string string, list linked list, set collection, zset ordered collection and hash hash. In actual business, some data is often cached in Redis. When the amount of data is relatively large, paging cache data can relieve the pressure on the database. When the interface is called, the server will cache each page of data with Redis according to the incoming parameters. When the interface is called again, the data will be returned directly from the cache without querying the database, which can improve the performance of the interface. If the interface list data changes, when the interface is called, the server ignores the cache, directly queries the data from the database and updates the cache...

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/2455
CPCG06F16/24552G06F16/24561
Inventor 韩天伟李荣尊
Owner 天津车之家软件有限公司
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