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

Data loading method and device

A data loading and data technology, applied in the computer field, can solve problems such as inability to accurately delete cached data, impact on system query efficiency, and high system complexity, and achieve the effects of improving data loading efficiency, avoiding repeated loading, and ensuring uniqueness

Pending Publication Date: 2021-08-13
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Use distributed locks to control the singleton loading of the cache. When the request to acquire the lock is interrupted unexpectedly for some reason, the acquired lock needs to wait for a certain timeout period before it can be released, resulting in all subsequent requests being blocked. The query efficiency is affected; the use of random values ​​​​eliminates the problem of hot keys, and the cached data cannot be deleted accurately; the use of local caches to eliminate the problem of hot keys results in high system complexity

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
  • Data loading method and device
  • Data loading method and device
  • Data loading method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0043] As mentioned in the background, in the process of using Redis cache, it is necessary to avoid cache singleton loading. Among them, cache singleton loading refers to the following situation: if the cache corresponding to a certain key in the cache does not exist, it is necessary to load data into the cache from other data sources (such as a database). During the dat...

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 data loading method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: receiving a data loading request, and determining that the state of a key name in the data loading request is a common state; translating the key name according to the current offset, splicing the translated key name with the current offset, generating a new key name corresponding to the key name, updating the current offset, then judging whether the new key name exists in the cache or not, and if the new key name exists in the cache and the key value type corresponding to the new key name is an identification code type, waiting for a set time, repeating the step until no new key name exists in the cache; locking the current key name in the cache, and generating an identification code as a key value corresponding to the current key name; and acquiring data corresponding to the key name from the database, determining that the identification code is valid, and updating the current key name and the key value in the cache. According to the embodiment, other requests are prevented from being blocked while repeated loading is avoided, and the data loading efficiency is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a data loading method and device. Background technique [0002] In the process of using Redis cache, two types of problems will be involved, one is to cache singleton loading, and the other is to avoid hot key (key name) problems. Among them, the hot key problem refers to the problem that due to a large number of requests accessing the same key at the same time, the pressure on the single node of Redis is too large, which leads to the problem of cache collapse. [0003] In order to implement caching singleton loading, existing technologies usually implement distributed locks. In order to eliminate the impact of hot keys on Redis, the existing technology usually adds random values ​​after the key, so that a key has multiple backups on different nodes to avoid single-node pressure; local cache can also be increased to give priority to local access when accessing Cache, thereby ...

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/23G06F16/2455G06F16/2458
CPCG06F16/2343G06F16/24552G06F16/2471Y02D10/00
Inventor 糜鹏程
Owner BEIJING WODONG TIANJUN INFORMATION TECH 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