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

Method and system for changing program data source based on Redis

A program data and data source technology, applied in database management systems, structured data retrieval, special data processing applications, etc., can solve the problem of increasing code maintenance costs, affecting the normal operation of programs, and unable to share data sources with other applications and other issues to achieve the effect of reducing maintenance costs

Inactive Publication Date: 2020-11-03
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage of the existing technology is that the data source is managed through the configuration file, which is generally a single data source. If a new data source needs to be added or the data source needs to be changed, the program code needs to be modified, which increases the code maintenance cost; if The program is running and needs to be restarted, which affects the normal operation of the program
The data source in the prior art can only be used in this application system, and the data source cannot be shared with other applications, which restricts the diversity of program access 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
  • Method and system for changing program data source based on Redis
  • Method and system for changing program data source based on Redis
  • Method and system for changing program data source based on Redis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] Embodiment 1 of the present invention proposes a method for changing program data sources based on Redis, using Redis to manage data sources of multiple data sources of an application program, and correspondingly changing data sources specified by the program. Such as figure 2 A flowchart of a method for changing program data sources based on Redis in Embodiment 1 of the present invention is given.

[0033] First, the program starts. When the program starts, the preset first data source is written into the data source pool composed of Redis; when the program is running, the data source can also be updated in real time and configured in the Redis data source pool. This process can be set Multiple data sources. Such as image 3 For Embodiment 1 of the present invention, the preset data source is written into the data source pool composed of Redis to implement the program. The first data source includes a data source maintained by local Redis and a data source maintain...

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 and a system for changing a program data source based on Redis, and the method comprises the steps: writing a preset first data source into a data source pool module composed of Redis when a program is started; when the program runs, acquiring annotation information, and storing a second data source specified by the annotation information into a data source switching module through a Spring component; and the data source switching module is used for reading in the first data source, taking out the second data source required by the program from the data source pool module and injecting the second data source into the corresponding thread of the program. Based on the method, the invention further provides a system for changing the program data source, processing equipment and a storage medium. Data source management is performed on multiple data sources of the application program by utilizing Redis, and corresponding change is performed according to the specified data source of the program. Developers can conveniently and dynamically modify program data source settings, data source configuration can be dynamically adjusted when a program runs, and theeffect of modifying the running program in real time is achieved.

Description

technical field [0001] The invention relates to the technical field of software development, in particular to a method and system for changing program data sources based on Redis. Background technique [0002] In order to improve the efficiency of applications accessing data sources, the operation of separating reads and writes is generally performed in applications, which requires different data sources for applications and dynamic switching of data sources. For applications with multiple data sources, it is more necessary to accurately change to the corresponding data source for database operations. For a running program, if the data source information needs to be modified, the application program needs to be stopped and the data source reconfigured, which will affect the normal operation of the application system. Generally, applications can only store data sources in memory, and cannot share data sources with other applications. [0003] The existing technical solution...

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/25
CPCG06F16/252
Inventor 崔广银邓淮谦
Owner SUZHOU LANGCHAO INTELLIGENT 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