# US 2023/0267048 A1 · Master-slave architecture deployment method and device based on snapshot

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0267048 A1
- Document ID: US20230267048A1
- Status: Published application
- Kind: A1
- Application number: 18/140,623
- Filed: 2023-04-28
- Published: 2023-08-24
- Earliest claimed: 2020-11-27
- Assignees: Shanghai Suninfo Information Technology Co., Ltd.
- Applicants: Shanghai Suninfo Information Technology Co., Ltd.
- Inventors: Zhilong GUANG; Fei CHEN; Qing DU
- Web page: https://patentgrep.com/patent/US20230267048A1

## CPC

- G06F 8/60: Software deployment
- G06F 11/1446: Point-in-time backing up or restoration of persistent data
- G06F 16/24575: {using context}
- G06F 2201/80: Database-specific techniques
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A master-slave architecture deployment method based on snapshot includes: restoring a core library corresponding to a MySQL database at any point in snapshot time, where the core library is a virtual library of the MySQL database; querying out at least one piece of configuration information necessary for master-slave configuration of the MySQL database by using the core library as baseline; taking a snapshot on the core library by using a snapshot technology; creating and cloning at least one copy library corresponding to the core library respectively based on the snapshot and the at least one piece of configuration information necessary for master-slave configuration; and configuring a master-slave relationship and a master library and a slave library corresponding to the master-slave relationship for the core library and the at least one copy library. A master-slave architecture deployment device based on snapshot is further provided.

## Claims

### Claim 1

A master-slave architecture deployment method based on snapshot, comprising:
restoring a core library corresponding to a MySQL database at any point in snapshot time, wherein the core library is a virtual library of the MySQL database;
querying out at least one piece of configuration information necessary for master-slave configuration of the MySQL database by using the core library as baseline;
taking a snapshot on the core library by using a snapshot technology;
creating and cloning at least one copy library corresponding to the core library respectively based on the snapshot and the at least one piece of configuration information necessary for master-slave configuration; and
configuring a master-slave relationship and a master library and a slave library corresponding to the master-slave relationship for the core library and the at least one copy library.

### Claim 2 (depends on 1)

The master-slave architecture deployment method based on snapshot according to claim 1, wherein the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library comprises:
obtaining a configuration requirement of a user on a master-slave architecture deployment of the MySQL database; and
configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement.

### Claim 3 (depends on 2)

The master-slave architecture deployment method based on snapshot according to claim 2, wherein the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement comprises:
starting a database instance of the at least one copy library, and configuring a configuration master-slave relationship between the core library and each library of the at least one copy library and the master library and the slave library corresponding to the master-slave relationship based on the configuration requirement.

### Claim 4 (depends on 1)

The master-slave architecture deployment method based on snapshot according to claim 1, wherein the master-slave relationship comprises at least any one of the followings:
a master library and at least one slave library corresponding to the master library;
at least one master library;
at least one master library and at least one slave library corresponding to each of the at least one master library; and
a master library, at least one slave library corresponding to the master library, and one or more sub slave libraries corresponding to each of the at least one slave library.

### Claim 5 (depends on 1)

A non-volatile storage medium, storing a computer-readable instruction, wherein when the computer-readable instruction is executed by a processor, the processor is enabled to implement the master-slave architecture deployment method based on snapshot according to claim 1.

### Claim 6 (depends on 1)

A master-slave architecture deployment device based on snapshot, comprising:
one or more processors; and
a computer-readable medium, configured to store one or more computer-readable instructions,
wherein when the one or more computer-readable instructions are executed by the one or more processors, the one or more processors are enabled to implement the master-slave architecture deployment method based on snapshot according to claim 1.

### Claim 7 (depends on 2)

The master-slave architecture deployment method based on snapshot according to claim 2, wherein the master-slave relationship comprises at least any one of the followings:
a master library and at least one slave library corresponding to the master library;
at least one master library;
at least one master library and at least one slave library corresponding to each of the at least one master library; and
a master library, at least one slave library corresponding to the master library, and one or more sub slave libraries corresponding to each of the at least one slave library.

### Claim 8 (depends on 3)

The master-slave architecture deployment method based on snapshot according to claim 3, wherein the master-slave relationship comprises at least any one of the followings:
a master library and at least one slave library corresponding to the master library;
at least one master library;
at least one master library and at least one slave library corresponding to each of the at least one master library; and
a master library, at least one slave library corresponding to the master library, and one or more sub slave libraries corresponding to each of the at least one slave library.

### Claim 9 (depends on 5)

The non-volatile storage medium according to claim 5, wherein in the master-slave architecture deployment method based on snapshot, the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library comprises:
obtaining a configuration requirement of a user on a master-slave architecture deployment of the MySQL database; and
configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement.

### Claim 10 (depends on 9)

The non-volatile storage medium according to claim 9, wherein in the master-slave architecture deployment method based on snapshot, the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement comprises:
starting a database instance of the at least one copy library, and configuring a configuration master-slave relationship between the core library and each library of the at least one copy library and the master library and the slave library corresponding to the master-slave relationship based on the configuration requirement.

### Claim 11 (depends on 5)

The non-volatile storage medium according to claim 5, wherein in the master-slave architecture deployment method based on snapshot, the master-slave relationship comprises at least any one of the followings:
a master library and at least one slave library corresponding to the master library;
at least one master library;
at least one master library and at least one slave library corresponding to each of the at least one master library; and
a master library, at least one slave library corresponding to the master library, and one or more sub slave libraries corresponding to each of the at least one slave library.

### Claim 12 (depends on 6)

The master-slave architecture deployment device based on snapshot according to claim 6, wherein in the master-slave architecture deployment method based on snapshot, the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library comprises:
obtaining a configuration requirement of a user on a master-slave architecture deployment of the MySQL database; and
configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement.

### Claim 13 (depends on 12)

The master-slave architecture deployment device based on snapshot according to claim 12, wherein in the master-slave architecture deployment method based on snapshot, the step of configuring the master-slave relationship and the master library and the slave library corresponding to the master-slave relationship for the core library and the at least one copy library based on the configuration requirement comprises:
starting a database instance of the at least one copy library, and configuring a configuration master-slave relationship between the core library and each library of the at least one copy library and the master library and the slave library corresponding to the master-slave relationship based on the configuration requirement.

### Claim 14 (depends on 6)

The master-slave architecture deployment device based on snapshot according to claim 6, wherein in the master-slave architecture deployment method based on snapshot, the master-slave relationship comprises at least any one of the followings:
a master library and at least one slave library corresponding to the master library;
at least one master library;
at least one master library and at least one slave library corresponding to each of the at least one master library; and
a master library, at least one slave library corresponding to the master library, and one or more sub slave libraries corresponding to each of the at least one slave library.
