Method and device for updating data

A data update and database technology, applied in the database field, can solve serious file fragmentation, database performance degradation and other problems, and achieve the effect of improving performance

Active Publication Date: 2018-05-08
BEIJING FEINNO COMM TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the prior art, when data is synchronized, every time the data D1 is updated, the database needs to be accessed for database synchronization. Therefore, for application scenarios with frequent updates, the database will be accessed frequently, which will cause serious file fragmentation to the database. growth, the file fragmentation will degrade database performance

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 updating data
  • Method and device for updating data
  • Method and device for updating data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0071] This embodiment provides a method for updating data, see figure 2 , the method flow provided by this embodiment is specifically as follows:

[0072] 201: Obtain a data update request, where the data update request carries the first data identifier to be updated and the update data corresponding to the first data identifier;

[0073] 202: Query whether the historical data corresponding to the first data identifier is stored in the memory;

[0074] Further, after querying whether the historical data corresponding to the first data identifier is stored in the memory, it also includes:

[0075] If the historical data corresponding to the first data identifier is not stored in the memory, the historical data corresponding to the first data identifier is obtained from the database;

[0076] The historical data corresponding to the first data identifier acquired from the database is stored in the memory, and the step of updating the historical data corresponding to the firs...

Embodiment 2

[0098] Embodiment two

[0099] The embodiment of the present invention provides a method for updating data. For ease of understanding, combined with figure 1 And the content of the first embodiment above, take the application scenario of updating the user’s gold coin change as an example, wherein the first data to be updated is identified as user_id, which is ID1 (IDentity, identity identification), and the update data corresponding to ID1 is the latest gold coin of ID1 The number n1 is used to illustrate the method provided by this embodiment in detail. see image 3 , the method flow provided by this embodiment includes:

[0100] 301: Obtain a data update request, where the data update request carries the first data identifier to be updated and the update data corresponding to the first data identifier;

[0101] This embodiment does not limit the specific way of obtaining the data update request, for example, see figure 1 , the data update back-end device 101 obtains a da...

Embodiment 3

[0146] The embodiment of the present invention provides a method for updating data. After updating the data in the internal memory and the database through the above-mentioned embodiments, the method provided by the above-mentioned embodiments can also be used as the basis for updating the internal memory and the database. Perform data reading. For ease of understanding, combine figure 1 As well as the content of the first embodiment above, take the application scenario of reading changes in the user's gold coins as an example. Wherein, the first data identifier to be read is user_id, that is, ID2, and the historical data corresponding to ID2 is the number n2 of gold coins of ID2. The method provided in this embodiment is described in detail with an example. see Figure 5 , the method flow provided by this embodiment includes:

[0147] 501: Obtain a data read request, where the data read request carries a second data identifier;

[0148] This embodiment does not limit the ...

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 update method and device, belonging to the technical field of databases. The method includes: after obtaining the data update request, querying whether the historical data corresponding to the first data identifier is stored in the internal memory; if it is stored in the internal memory, updating the historical data stored in the internal memory according to the updated data, recording the update time, and storing it The corresponding update status is updated to the status not updated to the database; every preset period, the difference between the update time stored in the memory and the current time reaches a threshold and the update status is not updated to the database status, and the data is updated to the database. In the present invention, after obtaining the data update request, it is first updated to the memory, and then the data in the memory is synchronized to the database every preset time, so as to avoid frequent access to the database in an application scene with frequent updates, which may cause damage to the database. More serious file fragmentation, improve database performance.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method and device for updating data. Background technique [0002] With the advent of the information age, information is ubiquitous, and information updates are also ubiquitous, for example, user's mood phrase update, user's point change, user's location information change, etc. After the information is updated, the information synchronization in the database becomes the basic operation of massive information processing. Since data is the basic unit of information, the method of data synchronization directly affects the efficiency and accuracy of information synchronization. [0003] In the prior art, when data is synchronized, every time the data D1 is updated, the database needs to be accessed for database synchronization. Therefore, for application scenarios with frequent updates, the database will be accessed frequently, which will cause serious file fragmentation to th...

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): G06F17/30
Inventor 吴炳锡
Owner BEIJING FEINNO COMM TECH
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