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

Transaction distribution method, device, device and storage medium

A transaction and backup technology, applied in transaction processing, multi-programming devices, database distribution/replication, etc., can solve problems such as low execution performance, waste of performance in read-write separated database systems, and database transactions that cannot be evenly distributed in the main database. Achieve the effect of improving execution performance and enhancing data storage capacity

Active Publication Date: 2021-06-22
SHANGHAI DAMENG DATABASE
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the existing technology, only the access request type of the database is judged in the read-write separated database, and the operation object to execute the access request is determined according to the access type. There is a problem that database transactions cannot be evenly distributed to the main database or the backup database, resulting in read-write separation. The performance waste of the traditional database system leads to low execution performance

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
  • Transaction distribution method, device, device and storage medium
  • Transaction distribution method, device, device and storage medium
  • Transaction distribution method, device, device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] figure 1 It is a flow chart of the steps of a transaction distribution method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of read transaction distribution in a read-write separation database cluster. This method can be executed by a transaction distribution device, and generally can be integrated In the database control server, the device can be implemented in the form of hardware and / or software, and the method in the embodiment of the present invention specifically includes the following steps:

[0026] Step 101, when the transaction to be executed is obtained, respectively obtain the current transaction count of each database in the database cluster.

[0027] Wherein, the transaction to be executed can be a logic unit that needs to be executed in the database cluster, and can include a read transaction and a write transaction. Optionally, in the embodiment of the present invention, the transaction to be executed c...

Embodiment 2

[0038] figure 2 It is a flow chart of the steps of a transaction distribution method provided by Embodiment 2 of the present invention. The embodiment of the present invention is embodied on the basis of the above embodiments and is applied to a database cluster. The database cluster includes a primary database and at least one backup Database, when creating a database connection in an application, two connections can be built in, one is connected to the main database, and the other is connected to the backup database. The specific methods of the embodiments of the present invention include:

[0039] Step 201, when the transaction to be executed is obtained, respectively obtain the current transaction count of each database in the database cluster.

[0040] Wherein, the transaction to be executed may be a read transaction generated by an application, and may be executed by the primary database or the backup database in the database cluster.

[0041] Specifically, when the da...

Embodiment 3

[0067] image 3 It is a schematic structural diagram of a transaction distribution device provided in Embodiment 3 of the present invention, which can execute the transaction distribution method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. The device may be implemented by software and / or hardware, and specifically includes: a count acquisition module 301 , a target determination module 302 and a transaction distribution module 303 .

[0068] Wherein, the count obtaining module 301 is configured to respectively obtain the current transaction counts of the databases in the database cluster when the transactions to be executed are obtained.

[0069] The target determination module 302 is configured to determine the target database of the transaction to be executed from the database cluster according to the current transaction counts.

[0070] The transaction distribution module 303 ...

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 embodiment of the present invention discloses a transaction distribution method, device, equipment and storage medium. The method includes: when acquiring the transaction to be executed, acquiring the current transaction count of each database in the database cluster respectively; , determine the target database of the transaction to be executed from the database cluster; distribute the transaction to be executed to the target database, and update the current transaction count corresponding to the target database. In the embodiment of the present invention, by using the current transaction count to ensure that transactions are evenly distributed to each database, the execution performance of the database is improved, and the data storage capability can be enhanced.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data storage, and in particular to a database cluster transaction distribution method, device, device and storage medium. Background technique [0002] Databases play a pivotal role in today's life, and the field of databases has developed rapidly. When the amount of concurrent access to data is high, a read-write separation database system is often used. The database is mainly composed of a main database and a backup database. The main database can be To execute read and write transactions, the standby database can only execute read transactions. [0003] In the existing technology, only the access request type of the database is judged in the read-write separated database, and the operation object to execute the access request is determined according to the access type. There is a problem that database transactions cannot be evenly distributed to the main database or the backup...

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/46G06F16/23G06F16/27
CPCG06F9/466G06F16/2358G06F16/27
Inventor 赵侃杨超
Owner SHANGHAI DAMENG DATABASE
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