Implementation method and device for data reading-writing splitting system

A technology of separation mechanism and separation of reading and writing, applied in the field of data processing, can solve problems such as inflexible query methods, inability to read data, read dirty data, etc. Effect

Active Publication Date: 2012-07-18
BEIJING FEINNO COMM TECH
View PDF3 Cites 65 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The present invention provides a method and device for implementing a data reading and writing separation mechanism to solve the problem that the query mode of the existing scheme is not flexible enough, and the data cannot be read or dirty data is read when reading data from the library

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
  • Implementation method and device for data reading-writing splitting system
  • Implementation method and device for data reading-writing splitting system
  • Implementation method and device for data reading-writing splitting system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0024] see figure 1 , which is a flow chart of a method for implementing a data read-write separation mechanism provided in Embodiment 1 of the present invention, specifically including:

[0025] 11: Receive a Structured Query Language (Structured Query Language, SQL) access request.

[0026] 12: Determine the current operation type corresponding to the SQL access request.

[0027] Parse the SQL access request to determine whether the current operation type is a write operation or a read operation.

[0028] 13: If the current operation type is a write operation, establish a connection with the master database (hereinafter referred to as the master database), and write data into the master database.

[0029] 14: If the current operat...

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 an implementation method and a device for a data reading-writing splitting system. According to the implementation method for the data reading-writing splitting system provided by the embodiment of the invention, a piece of: HINT information indicating a reading-writing splitting strategy is set in an SQL (structured query language) access request of a reading operation. The method comprises the steps of analyzing a received SQL access request and judging the current operation type; if the current operation type is writing operation, establishing a connection with a master database and writing data into the master database; and if the current operation type is reading operation, acquiring the current reading-writing splitting strategy according to the HINT information in the SQL access request, acquiring the synchronization and time delay information from a slave database with respect to the master database, and executing the reading operation according to the current reading-writing splitting strategy and the synchronization and time delay information. According to the scheme, the needed trusted data can be read when time delay occurs in the slave database, the scheme is better compatible with the existing system resources and the utilization rate of the resources is increased.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method and device for realizing a data reading and writing separation mechanism. Background technique [0002] Among the Internet database solutions, the relational database MySQL is a more commonly used database. MySQL generally adopts read-write separation technology when the data access concurrency is high. [0003] The existing read-write separation scheme is to develop database connection strings of two roles, one role of the connection string as the master database (master), and the other role of the connection string as the slave database (slave), a master database can correspond to Multiple slaves. The master library can perform both write and read operations, and the slave library can only perform read operations. If you need to read or write data, you must send a request to the main library for the write operation. For the read operation, you can assign a co...

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
Inventor 吴炳锡李宁张雁飞
Owner BEIJING FEINNO COMM TECH
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