Data caching method and device, electronic equipment and storage medium

A data cache and data technology, applied in database update, digital data processing, structured data retrieval, etc., can solve problems such as poor user experience, and achieve the effect of maintaining consistency and ensuring timely updates.

Inactive Publication Date: 2019-06-11
BEIJING BYTEDANCE NETWORK TECH CO LTD
View PDF9 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Embodiments of the present disclosure provide a data caching method, device, electronic device, and storage medium for a database, so as to solve the technical problem of poor user experience caused by the untimely update of the local cache, and ensure the consistency of the local cache and local data

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 caching method and device, electronic equipment and storage medium
  • Data caching method and device, electronic equipment and storage medium
  • Data caching method and device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] figure 1 It is a flow chart of a data caching method provided by Embodiment 1 of the present disclosure. This embodiment is especially suitable for timely updating local caches in the state of data intercommunication. This method can be executed by a data caching device. The data caching The device may be configured in a terminal or a server to implement the data caching method of the embodiment of the present disclosure. Such as figure 1 As shown, the method of this embodiment may specifically include:

[0025] S110. Acquire log information generated by the local database when a data change event of the local database is detected.

[0026] Exemplarily, when a data change event of the local database is detected, obtaining log information of the local database may include: obtaining log information of the local database when a local change operation of data of the local database is detected, wherein the Local alter operations may include modify, write, and / or delete o...

Embodiment 2

[0039] figure 2 It is a schematic flowchart of a data caching method provided in Embodiment 2 of the present disclosure. This embodiment is further optimized based on each optional solution in the foregoing embodiments. In this embodiment, optionally, the parsing the log information and updating the local cache according to the parsing result includes: parsing out the change data and data operation sequence information in the log information, and according to the change data And the data operation order information updates the local cache.

[0040] In the embodiment of the present disclosure, optionally, parsing the log information includes: controlling the local database to send the log information to the incremental data subscription and consumption service component; based on the incremental data subscription and The consumer service component parses the log information.

[0041] Such as figure 2 As shown, the method of this embodiment may specifically include:

[0042]...

Embodiment 3

[0058] Figure 4 It is a schematic structural diagram of a data cache device provided in Embodiment 3 of the present disclosure, as shown in Figure 4 As shown, the data caching device provided by the embodiment of the present disclosure may include: a log information obtaining module 410 and a local cache updating module 420 . Among them, the log information obtaining module 410 is used to obtain the log information generated by the local database when a data change event of the local database is detected; the local cache update module 420 is used to analyze the log information and update the local cache.

[0059] In the technical solution of the embodiment of the present disclosure, by analyzing the log information generated when the data change event of the local database occurs, since the log information records the data information and data operation information of the local database, the local cache is updated according to the analysis result to solve the problem of Th...

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 embodiment of the invention discloses a data caching method and device, electronic equipment and a storage medium. The data caching method comprises the steps ofwhen a data change event of a localdatabase is detected, acquiring log information generated by the local database; and analyzing the log information, and updating a local cache according to an analysis result. According to the technical scheme of the embodiment of the invention, by analyzing log information generated when a data change event of a local database occurs, the local cache is updated according to the analysis result due to the fact that the log information records the data information and the data operation information of the local database. Thetechnical problem that the user experience is poor due to the fact that the local cache is not updated in time is solved, timely updating of the local cache can be guaranteed, and the consistency of the local cache and the local data is kept.

Description

technical field [0001] Embodiments of the present disclosure relate to the field of computer application technologies, and in particular, to a data caching method, device, electronic device, and storage medium. Background technique [0002] Currently, databases are generally provided with a data caching mechanism. The local cache of the database is generally used to store the data used by the user. When receiving a user's data usage request, you can first check whether there is any data that the user wants to use in the local database. If so, you can directly respond to the user's data usage request with the locally cached data without re-pulling the data from the database. On the one hand, it can relieve the pressure on the database, and on the other hand, it can quickly respond to user access requests. [0003] However, if the data in the local database has changed and the data in the local cache is not updated in time, the data in the local cache and the local database ...

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/2455
Inventor 宋维捷
Owner BEIJING BYTEDANCE NETWORK 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