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

Method and storage medium for optimized loading of memory data

A technology for in-memory data and data, applied in the field of optimal loading of in-memory data, 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 reducing the probability of stalling.

Active Publication Date: 2022-04-12
FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF0 Cites 0 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
  • Method and storage medium for optimized loading of memory data
  • Method and storage medium for optimized loading of memory data

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, and when the program is executed by a processor, it can realize the above-mentioned embodiment 1 or embodiment 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] In summary, 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 that 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 ...

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 method for optimizing loading of memory data and a storage medium. The invention includes: the standby cache in the server side synchronously backs up the data in the main cache; regularly reads the data in the standby cache, stores it in the form of a snapshot file, and records the storage time at the same time ; When refreshing the main cache data, read the snapshot file of the latest time point, and obtain from the database the data record starting from the latest time point and ending at the current time point; merging the data in the snapshot file and data retrieved from the database. The invention can optimize the loading mode of the memory data, not only ensuring that the performance of the whole machine running in the daily stage is not affected, but also improving the loading speed and ensuring the accuracy and integrity of the loaded data.

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 Patents(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 Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products