Memory data optimization loading method and storage medium

A technology for in-memory data and data, applied in the field of optimal loading of in-memory data, it can solve problems such as slow program startup and impact on use functions, and achieve the effects of stable performance of the whole machine, ensuring integrity, and optimizing the loading method.

Active Publication Date: 2019-10-01
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF6 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For the above scenario, when the program is started, or when the program needs to reload data to the local memory due to restart, power failure or other abnormal conditions, the program needs to load relevant data from the database one by one, and then write it again In the local memory, this method is also acceptable when the amount of data is small, but when the amount of data is large, or the database table needs to be queried multiple times, it will cause the program to start very slowly, which affects the overall use function

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
  • Memory data optimization loading method and storage medium
  • Memory data optimization loading method and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] Please refer to figure 1 with figure 2 This embodiment provides a method for optimizing loading of memory data, which can not only increase the speed of data loading into the memory, thereby increasing the startup speed of the program; but also ensure that the running speed of the program is not affected and the integrity of the loaded data is ensured.

[0038] First, see figure 1 , set the main cache and backup cache inside the server, and the data in the backup cache is kept in sync with the data in the main cache, and the backup cache is used to synchronize the data in the main cache to play a backup role. When the client calls the server interface, the interface will read data from the main cache, and the data in the main cache can also be used by other internal functions of the server.

[0039] When the data in the main cache changes (such as data changes or operations by background operation and maintenance personnel), the program will only update the data in t...

Embodiment 2

[0045]This embodiment provides the corresponding embodiment 1 and provides a specific application scenario:

[0046] 1. The client calls the server interface, and the interface needs to read the dictionary list data from the main cache, about 1000 items; the program directly reads the 1000 items of data from the main cache and returns them.

[0047] 2. The current time is 22 o'clock. After 10 minutes, the background management personnel added 100 new dictionary data, and the program will update the dictionary list data in the main program to 1100, and update the corresponding database records at the same time.

[0048] 3. At this time, an independent asynchronous thread in the program will regularly read the data in the main cache and write it into the backup cache every 30 seconds to ensure that the data in the main and backup caches are consistent.

[0049] 4. Another independent asynchronous thread will be started every hour. The main task is to read the data in the backup ...

Embodiment 3

[0052] This embodiment provides a corresponding embodiment 1 and embodiment 2, and provides a computer-readable storage medium on which a computer program is stored. The steps included in the method for optimizing loading of memory data described above, the specific steps will not be repeated here, please refer to the description of Embodiment 1 or Embodiment 2 for details.

[0053] To sum up, the method for optimizing loading of memory data and the storage medium provided by the present invention can not only realize effective backup of memory data; but also can increase the loading speed of memory data, thereby increasing the startup rate of programs; furthermore, it can also ensure The integrity of the loaded data; finally, it can ensure that the daily running speed of the program is not affected, and improve the stability of the services provided by the main cache.

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 memory data optimization loading method and a storage medium. The memory data optimization loading method comprises: a standby cache in a server synchronously backing up dataof a main cache; reading the data of the standby cache regularly, storing the data in the form of snapshot files, and recording storage time at the same time; when the main cache data is refreshed, reading the snapshot file at the latest time point, and obtaining a data record which takes the latest time point as a starting point and takes the current time point as a terminating point from a database; and combining the data in the snapshot file with the data obtained from the database. According to the method, the loading mode of the memory data can be optimized, it can be guaranteed that therunning performance of the whole machine is not affected in the daily stage, the loading speed can be increased, and the accuracy and integrity of the loaded data can be guaranteed.

Description

technical field [0001] The invention relates to the field of memory data processing, in particular to a method for optimizing loading of memory data and a storage medium. Background technique [0002] In many existing business systems or software, there are various data, such as some configuration information or some frequently used data information, or some commonly used important data. In the face of these frequently used data, there will be a storage place. Under normal circumstances, the general system will be stored in a unified place, such as a redis cluster or a zookeeper cluster. However, in this way, new software dependencies are introduced, and many systems or software directly store these important information in the local memory. When the system is started each time, the relevant information is generally queried from the database and loaded. into local memory. [0003] For the above scenario, when the program is started, or when the program needs to reload dat...

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): G06F9/445G06F12/02
CPCG06F9/44521G06F12/0246
Inventor 刘德建林伟郭玉湖
Owner FUJIAN TIANQUAN EDUCATION TECH 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