A database connection processing method and device

A processing method and technology of a processing device, which are applied in the field of data communication, can solve the problems of large consumption of server resources, confusion of user rights, and increase in the number of connections, and achieve the effect of saving server resources and avoiding the continuous increase of the total number of connections.

Active Publication Date: 2016-12-07
BEIJING QIHOO TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Now that a client is connecting, and the user name has not been sent at this stage, how should the connection pool decide whether to create a new connection or reuse a connection? There are two possible principles: one is that all queues are less than 64 before creating a new one Connection, the problem brought about is that user B always has only 1 connection (because user A has reached 64 connections), which is likely to be insufficient and cause the client to report an error, so this method is not feasible; the second is that there is a queue lower than 64 This way of creating a new connection is also a very serious problem. Just imagine, if user A keeps coming to c

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
  • A database connection processing method and device
  • A database connection processing method and device
  • A database connection processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0046] figure 1 The application scenarios of the embodiments of the present invention are shown. exist figure 1 In the shown application scenario, it includes multiple clients (two are shown in the figure, respectively client one and client two), a connection pool module and a server, and the server has the client needs to access and operate The database, the MySQL database shown in the figure, of course, can also be other types ...

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 database connection processing method and device, belonging to the technical field of data communication. The method includes: when receiving a database connection request from a client, judging whether the length of the connection queue of the connection pool is less than a preset threshold, wherein the database connection associated with the user name is stored in the connection queue; when the connection When the length of the queue is greater than or equal to the preset threshold, take out a database connection from the connection queue; judge whether the user name used by the client is the same as the user name of the taken out database connection; if they are the same, assign the database connection to the client Use, otherwise, notify the server to authenticate the client, and assign the database connection to the client after the authentication is passed. The present invention realizes multi-user authority isolation, avoids the continuous increase of the total number of database connections, and saves server resources consumed by connection pools.

Description

technical field [0001] The invention relates to the technical field of data communication, in particular to a database connection processing method and device. Background technique [0002] In database applications, each data access request from the client needs to go through the steps of establishing a database connection with the server, opening the database, accessing data, and closing the database connection. Connecting and opening the database is a resource-consuming and time-consuming task. , if such database operations occur frequently, the performance of the system will inevitably drop sharply. The database connection pool technology does not close the database connection after the data access operation is completed, but stores it. The next database operation request can directly use this database connection. By reusing the established database connection, it can be extremely efficient. Greatly save system resources and database operation time. [0003] When using ...

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
IPC IPC(8): H04L29/06G06F17/30
Inventor 朱超陈飞王超
Owner BEIJING QIHOO TECH CO 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