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

Method and device for dynamically distributing database connections

A dynamic allocation and database technology, applied in the computer field, can solve problems such as number limitation, database connections cannot be released, interfaces cannot be applied for database connections, etc., to achieve the effect of increasing the recovery function

Inactive Publication Date: 2018-07-06
中国移动通信集团江西有限公司 +1
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the database connection used by the interface program is generally a long connection, which leads to the fact that the database connection occupied by the interface program will not be released during the initialization phase of the business module or during the peak business period
Since the total number of database connections is limited, the number of database connections allocated to each business module is also limited
This brings the biggest bottleneck in the interaction between the interface program and the database, that is, the Internet channel requires the interface to provide higher concurrency, but the interface cannot apply for more database connections

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 dynamically distributing database connections
  • Method and device for dynamically distributing database connections
  • Method and device for dynamically distributing database connections

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] Features and exemplary embodiments of various aspects of the invention will be described in detail below. The following description covers numerous specific details in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only to provide a clearer understanding of the present invention by showing examples of the present invention. The present invention is by no means limited to any specific configuration set forth below, but covers any modification, substitution and improvement of related elements or components without departing from the spirit of the invention.

[0022] The present invention proposes a method and device for dynamically allocating database connections. By establishing a thread monitoring mechanism and a database connection allocation mechanism, the activ...

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 method and device for dynamically distributing database connection. The method comprises the following steps of: determining each thread in an active state at one or more time points in a predetermined time period in a thread pool; and recovering database connections corresponding to the other threads except each thread in the active state at the one or more time point inthe predetermined time period in the thread pool. According to the method and device, a thread monitoring mechanism and a database connection distribution mechanisms are established to monitor the active state of each thread in the thread pool and then recover the database connections corresponding to the idle threads in the thread pool, so that a function of recovering the idle database connections by an interface program is added, the idle database connections are released to business modules corresponding to other active threads, and the idle database connections are not occupied by the business modules in a long connection mode, thereby realizing dynamic application and using of the business modules and realizing a data connection releasing mechanism so as to achieve the aim of efficiently using the database connections.

Description

technical field [0001] The present invention relates to the computer field, and more specifically relates to a method and device for dynamically allocating database connections. Background technique [0002] Database connections are precious resources in data processing systems, and the management of database connections can significantly affect the scalability and robustness of the entire application, thereby affecting the performance indicators of the program. Establishing and disconnecting a database connection is a resource-consuming operation for a data processing system. At present, the database connection pool is used to solve the resource-consuming problem of establishing and disconnecting the database connection, that is, to put the frequently used database connection into the database connection pool, thereby improving the performance of the data processing system. [0003] Usually, the number of threads of different interface programs and the number of database c...

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): G06F17/30
CPCG06F16/25
Inventor 王淳潘文锋
Owner 中国移动通信集团江西有限公司
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