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

A method and device for querying data in pages

A technology for querying and querying data by paging, which is applied in the field of data processing and can solve problems such as access volume or concurrency performance of paging interfaces

Active Publication Date: 2022-03-29
天津车之家软件有限公司
View PDF13 Cites 0 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
  • A method and device for querying data in pages
  • A method and device for querying data in pages
  • A method and device for querying data in pages

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 querying data in pages, which is suitable for execution in a distributed system, wherein the distributed system includes a database server, a cache server and an application server, the application server is suitable for receiving requests from clients, and the cache server is suitable for For obtaining data from the cache, the database server is suitable for obtaining data from the database, and the cache is preset with a data structure as the pagination key of the set collection. The method includes: obtaining the request parameter when the interface is called; generating the paging flag value based on the request parameter; obtaining the binary log of the database to determine whether the data in the database has changed; writing the paging flag value into the set corresponding to the paging flag key , and receive the return value, wherein, when the data in the database changes, the collection corresponding to the paging flag key is cleared so as to update the return value; and based on the return value, the query data is paged from the cache or the database.

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 Patents(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