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

Uniform data caching method and device based on Redis cluster, terminal and storage medium

A data and cluster technology, applied in electrical digital data processing, data processing input/output process, instruments, etc., can solve the problems of idle memory, performance degradation, waste of resources, etc., and achieve the effect of uniform data distribution

Pending Publication Date: 2020-04-28
CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in this way, when a key has a large amount of data, a large amount of data of the same key is stored in a master node, the memory of the master node is used up, and the memory of other master nodes is still a lot of free
The master node whose memory has been used up exceeds its own capacity, causing performance degradation or even data unavailability. At the same time, there are still a large number of idle master nodes in the memory that cannot serve other data requests, resulting in waste of resources.

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
  • Uniform data caching method and device based on Redis cluster, terminal and storage medium
  • Uniform data caching method and device based on Redis cluster, terminal and storage medium
  • Uniform data caching method and device based on Redis cluster, terminal and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0060] figure 1 It is a flowchart of a method for evenly caching data based on a Redis cluster provided in Embodiment 1 of the present invention.

[0061] In this embodiment, the method for evenly caching data based on a Redis cluster can be applied to a terminal, and for a terminal that requires evenly caching data based on a Redis cluster, the Redis-based method provided by the method of the present invention can be directly integrated on the terminal. The function of evenly caching the data of the cluster, or running in the terminal in the form of a software development kit (Software Development Kit, SKD).

[0062] Such as figure 1 As shown, the Redis cluster-based data uniform caching method specifically includes the following steps. According to different requirements, the order of the steps in the flow chart can be changed, and some can be omitted.

[0063] S11, initialize the set array.

[0064] Redis can start service instances on different physical machines or on t...

Embodiment 2

[0126] figure 2 It is a structural diagram of a Redis cluster-based data uniform caching device provided in Embodiment 2 of the present invention.

[0127] In some embodiments, the Redis cluster-based uniform data caching device 20 may include a plurality of functional modules composed of program code segments. The program codes of the various program segments in the Redis cluster-based data uniform caching device 20 can be stored in the memory of the terminal, and executed by the at least one processor for execution (see figure 1 Description) The function of evenly caching data based on Redis cluster.

[0128] In this embodiment, the Redis cluster-based data uniform caching device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an initialization module 201, an index association module 202, a hash calculation module 203, a logical operation module 204, a result judgment module 205, a remainder op...

Embodiment 3

[0189] refer to image 3 As shown in , it is a schematic structural diagram of a terminal provided by Embodiment 3 of the present invention. In a preferred embodiment of the present invention, the terminal 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .

[0190] Those skilled in the art should understand that, image 3 The structure of the terminal shown does not constitute a limitation of the embodiment of the present invention, it can be a bus structure or a star structure, and the terminal 3 can also include more or less other hardware or software than shown in the figure , or different component arrangements.

[0191] In some embodiments, the terminal 3 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but not limited to microprocessors, application-specific integrated circuits, programmabl...

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 provides a uniform data caching method based on a Redis cluster. The uniform data caching method comprises the following steps: initializing a set array; associating the index of the setarray with a storage node in a Redis cluster; when a caching instruction of data is received, calculating a hash value of the data; performing logic AND operation on the hash value and the maximum int type data; performing complementation operation on a result after the logic AND operation and the length of the set array to obtain a key value; matching a target index which is the same as the keyvalue from the set array; and storing the data corresponding to the key value in the storage node corresponding to the target index. The invention further provides a uniform data caching device basedon the Redis cluster, a terminal and a storage medium. According to the method, the data can be uniformly cached in the Redis cluster, so that the situation that a memory of one storage node in the Redis cluster is used up and the memories of other storage nodes are idle is avoided.

Description

technical field [0001] The invention relates to the technical field of data caching, in particular to a Redis cluster-based uniform data caching method, device, terminal and storage medium. Background technique [0002] With the rapid development of information technology, the amount of information in modern society is growing explosively. In the era of big data, the volume of application data is increasing rapidly. The traditional data architecture can no longer meet the high concurrency, high availability, and high-quality response time of large-scale Internet applications. . As a result, a series of solutions such as NoSQL have emerged, among which remote data service (Remote Dictionary Server, Redis), as one of the high-quality choices, has gradually been adopted by major enterprises as a supplement to their data architecture. [0003] Redis cluster cache data is through the consistent hash algorithm for each key value to obtain the node where the data should be placed....

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): G06F3/06
CPCG06F3/0607G06F3/0656G06F3/067
Inventor 黄建虎黄帮德
Owner CHINA PING AN PROPERTY INSURANCE CO LTD
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