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

Database connection method and device for distributed cluster

A technology of distributed cluster and connection method, applied in the field of database connection method and device of distributed cluster, can solve the problems of increasing the number of connections, database access burden, reducing work efficiency, etc., to reduce pressure, avoid repeated connections, and improve work. The effect of efficiency

Pending Publication Date: 2021-08-17
BANK OF CHINA
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Each node needs to create a connection for each task, and the number of connections increases; and once the task ends, the connection will be disconnected, and the next time the server is allocated to the server, it will still need to connect to the database repeatedly. Once the program is executed, it may connect thousands or even hundreds of times, so Not only does the program perform repeated connections, which not only reduces work efficiency, but also places a heavy burden on database access

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
  • Database connection method and device for distributed cluster
  • Database connection method and device for distributed cluster
  • Database connection method and device for distributed cluster

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0039] In order to better understand the embodiments of the present invention, first explain the technical terms involved in the embodiments of the present invention:

[0040] mysql: mysql is an open source relational database management system (RDBMS), using the most commonly used database management language - Structured Query Language (SQL) for database management. mysql is open source, so anyone can download it under the General Public Licens...

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 database connection method and device for a distributed cluster, and the method comprises the steps: distributing at least one server resource needed by program operation in the distributed cluster according to a submitted program; establishing connection with the mysql database on all server nodes required by program operation; and when each task operated by the program executes the mysql operation on the corresponding server node, calling the connection with the mysql database corresponding to the created server node. Compared with the prior art of repeatedly connecting the database, the method has the advantages that the connection with the mysql database is created on all the server nodes required by program operation in advance, and direct calling is performed during operation, so that repeated connection in the program execution process can be avoided, the working efficiency of program execution is improved, and the pressure of the database can be relieved. The method is applied to the field of distributed technologies.

Description

technical field [0001] The invention relates to the field of distributed technologies, in particular to a database connection method and device for distributed clusters. Background technique [0002] When accessing the database in a distributed cluster, when a task is distributed to any node in the distributed cluster, it is always necessary to re-create a database connection on the node server, and the connection is closed every time the task is executed, and the next time it is reassigned to a random node A new database connection is created, and the connection is frequent. Each node needs to create a connection for each task, and the number of connections increases; and once the task ends, the connection will be disconnected, and the next time the server is allocated to the server, it will still need to connect to the database repeatedly. Once the program is executed, it may connect thousands or even hundreds of times, so Not only does the program perform repeated connec...

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/50G06F16/21G06F16/27G06F16/28
CPCG06F9/5027G06F16/211G06F16/27G06F16/284
Inventor 朱阿龙田林石慧彪豆敏娟张靖羚刘宇琦刘琦张小乐何聪聪张亚泽
Owner BANK OF CHINA
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