[go: up one dir, main page]

CN116701053A - Data backup and recovery method, device, equipment and medium for production environment database - Google Patents

Data backup and recovery method, device, equipment and medium for production environment database Download PDF

Info

Publication number
CN116701053A
CN116701053A CN202310632383.3A CN202310632383A CN116701053A CN 116701053 A CN116701053 A CN 116701053A CN 202310632383 A CN202310632383 A CN 202310632383A CN 116701053 A CN116701053 A CN 116701053A
Authority
CN
China
Prior art keywords
target
task
backup
data
production environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310632383.3A
Other languages
Chinese (zh)
Other versions
CN116701053B (en
Inventor
陈茂林
万庆
刘松
王燕灵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Zhengyun Data Technology Co ltd
Original Assignee
Hangzhou New China And Big Polytron Technologies Inc
Hangzhou Zhengyun Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou New China And Big Polytron Technologies Inc, Hangzhou Zhengyun Data Technology Co ltd filed Critical Hangzhou New China And Big Polytron Technologies Inc
Priority to CN202310632383.3A priority Critical patent/CN116701053B/en
Publication of CN116701053A publication Critical patent/CN116701053A/en
Application granted granted Critical
Publication of CN116701053B publication Critical patent/CN116701053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for restoring data backup of a production environment database. Applied to a data backup and recovery system, the system comprises: a task repeater and at least one task executor, the method comprising: responding to the target backup task through the task relay, and determining a target task executor corresponding to the target backup task; acquiring a user identification of a target user through a target task executor, and creating a backup log record corresponding to a target backup task according to the user identification; acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message; and responding to the target recovery task, unpacking the data message, and recovering to obtain each target data. The scheme of the embodiment of the invention can accurately backup or restore the related data from the production environment database and provides basis for subsequent operation.

Description

生产环境数据库的数据备份恢复方法、装置、设备及介质Data backup and recovery method, device, equipment and medium for production environment database

技术领域technical field

本发明实施例涉及计算机技术领域,尤其涉及一种生产环境数据库的数据备份恢复方法、装置、设备及介质。The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, device and medium for data backup and restoration of a production environment database.

背景技术Background technique

在诸如财政、行政等业务领域中,所有业务系统都部署在相应的用户业务环境中,开发人员无法通过网络连接到用户业务环境;当业务系统出现故障时,开发人员无法对故障进行定位;此时,需要从生产环境数据库中备份或者恢复相关数据到相应位置进行调试。In business fields such as finance and administration, all business systems are deployed in the corresponding user business environment, and developers cannot connect to the user business environment through the network; when a business system fails, developers cannot locate the fault; this , it is necessary to backup or restore relevant data from the production environment database to the corresponding location for debugging.

由于需要备份的数据量庞大,且各数据之间关联关系错综复杂,难以实现对相关数据进行备份。Due to the huge amount of data that needs to be backed up and the intricate correlation between each data, it is difficult to back up related data.

如何准确地从生产环境数据库中对相关数据进行备份或者恢复,为进行后续操作提供依据是业内研究的重点问题。How to accurately backup or restore relevant data from the production environment database to provide a basis for subsequent operations is a key issue in the industry's research.

发明内容Contents of the invention

本发明实施例提供了一种生产环境数据库的数据备份恢复方法、装置、设备及介质,以准确地从生产环境数据库中对相关数据进行备份或者恢复,为进行后续操作提供依据。Embodiments of the present invention provide a data backup and restoration method, device, equipment and medium for a production environment database, so as to accurately back up or restore relevant data from the production environment database, and provide a basis for subsequent operations.

根据本发明实施例的一方面,提供了一种生产环境数据库的数据备份恢复方法,应用于数据备份恢复系统,所述数据备份恢复系统包括:任务中继器以及至少一个任务执行器,所述任务中继器与各所述任务执行器通信连接;所述方法包括:According to an aspect of the embodiments of the present invention, a data backup and recovery method for a production environment database is provided, which is applied to a data backup and recovery system, and the data backup and recovery system includes: a task repeater and at least one task executor, the The task repeater communicates with each of the task executors; the method includes:

通过所述任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;determining a target task executor corresponding to the target backup task in response to a target backup task for target data in the production environment database initiated by the target user through the task repeater;

通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;Obtaining the user ID of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user ID;

根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;Obtain each target data in the production environment database according to the backup log records, and assemble each target data to obtain a backup data message;

响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据。In response to the target recovery task initiated by the target user for the target data in the production environment database, the data packet is unpacked, and each target data is recovered.

根据本发明实施例的另一方面,提供了一种生产环境数据库的数据备份恢复装置,应用于数据备份恢复系统,所述数据备份恢复系统包括:任务中继器以及至少一个任务执行器,所述任务中继器与各所述任务执行器通信连接;所述装置包括:According to another aspect of the embodiments of the present invention, there is provided a data backup and recovery device for a production environment database, which is applied to a data backup and recovery system, and the data backup and recovery system includes: a task repeater and at least one task executor, the The task repeater is connected in communication with each of the task executors; the device includes:

任务执行器确定模块,用于通过所述任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;A task executor determining module, configured to determine a target task executor corresponding to the target backup task in response to the target backup task for the target data in the production environment database initiated by the target user through the task repeater;

备份日志记录创建模块,用于通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;A backup log record creating module, configured to obtain the user ID of the target user through the target task executor, and create a backup log record corresponding to the target backup task according to the user ID;

备份数据报文确定模块,用于根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;The backup data message determination module is used to obtain each target data in the production environment database according to the backup log records, and assemble each of the target data to obtain a backup data message;

目标数据确定模块,用于响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据。The target data determination module is configured to unpack the data packet and recover the target data in response to the target recovery task for the target data in the production environment database initiated by the target user.

根据本发明实施例的另一方面,提供了一种电子设备,所述电子设备包括:According to another aspect of the embodiments of the present invention, an electronic device is provided, and the electronic device includes:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明实施例任一实施例所述的生产环境数据库的数据备份恢复方法。The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute any of the embodiments of the present invention. The data backup and recovery method of the production environment database described above.

根据本发明实施例的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明实施例任一实施例所述的生产环境数据库的数据备份恢复方法。According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the embodiments of the present invention. The data backup recovery method of the production environment database described in the embodiment.

本发明实施例的技术方案,通过任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据,可以准确地从生产环境数据库中对相关数据进行备份或者恢复,为进行后续操作提供依据。In the technical solution of the embodiment of the present invention, the target task executor corresponding to the target backup task is determined by the task repeater in response to the target backup task for the target data in the production environment database initiated by the target user; through the target The task executor obtains the user identification of the target user, and creates a backup log record corresponding to the target backup task according to the user identification; obtains each target data in the production environment database according to the backup log record, and The target data is assembled to obtain a backup data message; in response to the target recovery task initiated by the target user for the target data in the production environment database, the data message is unpacked, and the target data is recovered to obtain each target data, which can be Accurately back up or restore relevant data from the production environment database to provide a basis for subsequent operations.

应当理解,本部分所描述的内容并非旨在标识本发明实施例的实施例的关键或重要特征,也不用于限制本发明实施例的范围。本发明实施例的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the embodiments of the present invention. Other features of the embodiments of the present invention will be easily understood through the following description.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明实施例的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some implementations of the embodiments of the present invention. For example, those of ordinary skill in the art can also obtain other drawings based on these drawings on the premise of not paying creative efforts.

图1是根据本发明实施例一提供的一种生产环境数据库的数据备份恢复方法的流程图;FIG. 1 is a flow chart of a data backup and recovery method for a production environment database according to Embodiment 1 of the present invention;

图2是根据本发明实施例二提供的一种生产环境数据库的数据备份恢复方法的流程图;2 is a flowchart of a data backup and recovery method for a production environment database provided according to Embodiment 2 of the present invention;

图3是根据本发明实施例三提供的一种生产环境数据库的数据备份恢复装置的结构示意图;3 is a schematic structural diagram of a data backup and recovery device for a production environment database provided according to Embodiment 3 of the present invention;

图4是实现本发明实施例的生产环境数据库的数据备份恢复方法的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device implementing a data backup and recovery method for a production environment database according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明实施例方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明实施例一部分的实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明实施例保护的范围。In order to enable those skilled in the art to better understand the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described implementation Examples are only some of the embodiments of the present invention, not all of them. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the embodiments of the present invention.

需要说明的是,本发明实施例的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明实施例的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the embodiments of the present invention and the above drawings are used to distinguish similar objects, but not necessarily to describe a specific order or sequence order. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

实施例一Embodiment one

图1是根据本发明实施例一提供的一种生产环境数据库的数据备份恢复方法的流程图,本实施例可适用于准确地从生产环境数据库中对相关数据进行备份或者恢复的情况,该方法可以由生产环境数据库的数据备份恢复装置来执行,该生产环境数据库的数据备份恢复装置可以采用硬件和/或软件的形式实现,该生产环境数据库的数据备份恢复装置可配置于计算机、服务器或者平板电脑等电子设备中。Fig. 1 is a flow chart of a data backup and recovery method for a production environment database according to Embodiment 1 of the present invention. This embodiment is applicable to the situation where the relevant data is accurately backed up or restored from the production environment database. The method It can be executed by the data backup and recovery device of the production environment database, which can be implemented in the form of hardware and/or software, and the data backup and recovery device of the production environment database can be configured on a computer, server or tablet In electronic equipment such as computers.

需要说明的是,本实施例中涉及到的生产环境数据库的数据备份恢复方法可以应用于数据备份恢复系统,所述数据备份恢复系统可以包括:任务中继器以及至少一个任务执行器,所述任务中继器与各所述任务执行器通信连接;示例性的,在本实施例的一个例子中,数据备份恢复系统可以包括一个任务中继器以及两个任务执行器,任务中继器分别与这两个任务执行器通信连接,且这两个任务执行器可以分别执行数据备份任务以及数据恢复任务。It should be noted that the data backup and recovery method for the production environment database involved in this embodiment can be applied to a data backup and recovery system, and the data backup and recovery system can include: a task repeater and at least one task executor, the The task repeater communicates with each of the task executors; exemplary, in an example of this embodiment, the data backup and recovery system may include a task repeater and two task executors, and the task repeaters are respectively It communicates with the two task executors, and the two task executors can perform data backup tasks and data recovery tasks respectively.

具体的,参考图1,该方法具体包括如下步骤:Specifically, referring to Fig. 1, the method specifically includes the following steps:

步骤110、通过所述任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器。Step 110: Responding to the target backup task for the target data in the production environment database initiated by the target user through the task repeater, determine a target task executor corresponding to the target backup task.

其中,目标用户可以为任一注册用户,其可以通过客户端向数据备份恢复系统发送针对于目标数据的目标备份任务;其中,目标数据可以为一个数据也可以为多个数据,还可以为一个类型或者多个类型的数据,本实施例中对其不加以限定。示例性的,目标数据可以为财务领域中第一季度的营业额或者收支情况等。Wherein, the target user can be any registered user, and it can send a target backup task for the target data to the data backup and restoration system through the client; wherein, the target data can be one data or multiple data, or one Type or multiple types of data are not limited in this embodiment. Exemplarily, the target data may be the turnover or revenue and expenditure of the first quarter in the financial field.

在本实施例的一个可选实现方式中,数据备份恢复系统在接收到目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之后,可以通过任务中继器对接收到的目标备份任务进行处理,从而确定与该目标备份任务对应的目标执行器,即可以通过任务中继器对接收到的目标备份任务对任务执行时间以及资源消耗进行估算,从而对任务进行分发。In an optional implementation of this embodiment, after the data backup and recovery system receives the target backup task for the target data in the production environment database initiated by the target user, the received target backup task can be processed through the task repeater Processing is performed to determine the target executor corresponding to the target backup task, that is, the task execution time and resource consumption of the received target backup task can be estimated through the task repeater, so as to distribute the task.

可选的,在本实施例中,通过任务中继器确定与所述目标备份任务对应的目标任务执行器,可以包括:生成与所述目标备份任务对应的目标任务,并将所述目标任务添加至任务队列;从任务队列中获取所述目标任务,确定所述目标任务的资源消耗;根据所述目标任务的资源消耗确定所述目标任务执行器。Optionally, in this embodiment, determining the target task executor corresponding to the target backup task through the task repeater may include: generating a target task corresponding to the target backup task, and placing the target task adding to the task queue; obtaining the target task from the task queue, determining the resource consumption of the target task; determining the target task executor according to the resource consumption of the target task.

可选的,在本实施例中,生成与所述目标备份任务对应的目标任务,可以包括:根据所述目标备份任务直接生成与所述目标备份任务对应的目标任务;或者,拦截所述目标备份任务,提取所述目标备份任务的用户访问标识,并根据所述用户访问标识进行业务访问仲裁;在业务访问仲裁通过的情况下,生成与所述目标备份任务对应的目标任务;否则,返回错误。Optionally, in this embodiment, generating the target task corresponding to the target backup task may include: directly generating the target task corresponding to the target backup task according to the target backup task; or, intercepting the target Backup task, extracting the user access ID of the target backup task, and performing business access arbitration according to the user access ID; in the case of passing the business access arbitration, generating a target task corresponding to the target backup task; otherwise, returning mistake.

在本实施例的一个可选实现方式中,在接收到目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之后,可以直接生成与目标备份任务对应的目标任务,并将生成的目标任务添加至任务队列;进一步的,可以依次获取任务队列中的各任务,确定任务队列中的每个任务的资源消耗,并根据各资源消耗确定每个任务的任务执行器;在本实施例中,在从任务队列中获取到目标任务之后,可以确定目标任务的资源消耗,并根据目标任务的资源消耗确定目标任务的目标任务执行器,即与目标备份任务对应的目标任务执行器。In an optional implementation of this embodiment, after receiving the target backup task for the target data in the production environment database initiated by the target user, the target task corresponding to the target backup task can be directly generated, and the generated target Tasks are added to the task queue; further, each task in the task queue can be obtained in turn, the resource consumption of each task in the task queue can be determined, and the task executor of each task can be determined according to the resource consumption; in this embodiment , after the target task is acquired from the task queue, the resource consumption of the target task can be determined, and the target task executor of the target task, that is, the target task executor corresponding to the target backup task, can be determined according to the resource consumption of the target task.

在本实施例的另一个可选实现方式中,在接收到目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之后,可以对目标备份任务进行拦截处理,提取目标备份任务的用户访问标识,并根据用户访问标识进行业务访问仲裁;在业务访问仲裁通过的情况下,生成与目标备份任务对应的目标任务,并将生成的目标任务添加至任务队列;进一步的,可以依次获取任务队列中的各任务,确定任务队列中的每个任务的资源消耗,并根据各资源消耗确定每个任务的任务执行器。In another optional implementation of this embodiment, after receiving the target backup task for the target data in the production environment database initiated by the target user, the target backup task can be intercepted to extract the user access data of the target backup task. ID, and perform business access arbitration according to the user access ID; if the business access arbitration is passed, generate the target task corresponding to the target backup task, and add the generated target task to the task queue; further, the task queue can be obtained in sequence For each task in the task queue, the resource consumption of each task in the task queue is determined, and the task executor of each task is determined according to each resource consumption.

具体的,在接收到目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之后,业务拦截器会对目标备份任务进行拦截,提取用户访问标识,并在任务中继器申请业务访问仲裁,如果仲裁结果是拒绝访问,直接返回用户错误。如果仲裁结果是通过,则产品对应的任务。在本实施例中,数据备份恢复系统也可以包括,业务拦截器;业务拦截器可以用于防止任务在执行时,如果用户进行业务的其它数据操作,会造成数据二次污染,导致数据出错。Specifically, after receiving the target backup task for the target data in the production environment database initiated by the target user, the business interceptor will intercept the target backup task, extract the user access ID, and apply for business access arbitration at the task repeater , if the arbitration result is access denied, directly return user error. If the arbitration result is passed, then the product corresponds to the task. In this embodiment, the data backup and restoration system may also include a business interceptor; the business interceptor may be used to prevent secondary data pollution and data errors if the user performs other business data operations during task execution.

步骤120、通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录。Step 120: Obtain the user ID of the target user through the target task executor, and create a backup log record corresponding to the target backup task according to the user ID.

在本实施例的一个可选实现方式中,在通过任务中继器确定得到与目标备份任务对应的目标任务执行器之后,可以进一步的通过目标任务执行器获取目标用户的用户标识,并根据获取到的用户标识创建与目标备份任务对应的备份日志记录。In an optional implementation of this embodiment, after the target task executor corresponding to the target backup task is determined through the task repeater, the user ID of the target user may be further obtained through the target task executor, and according to the acquired Create a backup log record corresponding to the target backup task for the user ID that was accessed.

其中,备份日志记录,可以包括下述至少一项:任务标识、版本、时间以及状态字段。Wherein, the backup log record may include at least one of the following: task identification, version, time and status fields.

可选的,在本实施例中,目标任务执行器在接收到目标备份任务时,可以在日志数据库中创建全局任务标识(即,用户标识);进一步的,可以通过元数据库获取元数据,并根据用户执行的任务类型进行调度执行。Optionally, in this embodiment, when the target task executor receives the target backup task, it can create a global task identifier (that is, a user identifier) in the log database; further, it can obtain metadata through the metadata database, and Schedule execution according to the type of task performed by the user.

步骤130、根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文。Step 130: Obtain each target data in the production environment database according to the backup log records, and assemble each target data to obtain a backup data message.

在本实施例的一个可选实现方式中,在通过目标任务执行器获取目标用户的用户标识,并根据获取到的用户标识创建与目标备份任务对应的备份日志记录之后,目标任务执行器可以进一步的根据备份日志记录在生产环境数据库中获取各目标数据,并对各目标数据进行组装,从而得到备份数据报文。In an optional implementation of this embodiment, after obtaining the user ID of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the obtained user ID, the target task executor can further According to the backup log records, each target data is obtained in the production environment database, and each target data is assembled to obtain a backup data message.

其中,目标数据为生产环境数据库中与目标备份任务相关的数据。Wherein, the target data is data related to the target backup task in the production environment database.

可选的,在本实施例中,目标任务执行器可以根据“任务+节点+数据标识+版本”,即根据备份日志记录,在业务数据库进行数据获取,并进行数据组装,形成以json为格式的数据报文。Optionally, in this embodiment, the target task executor can obtain data from the business database according to "task + node + data identification + version", that is, according to the backup log records, and perform data assembly to form a format in json datagrams.

在本实施例的一个可选实现方式中,在根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文之后,还可以包括:对所述备份报文数据进行加密和/或压缩,得到与所述目标备份任务对应的备份数据。In an optional implementation of this embodiment, after obtaining the target data in the production environment database according to the backup log records, and assembling the target data to obtain the backup data message, it may also include: The backup message data is encrypted and/or compressed to obtain backup data corresponding to the target backup task.

可选的,在本实施例中,在数据组装完成后,可以对数据sm3进行加密;进一步的,可以对数据报文的密文进行数据格式压缩;最后,可以将数据备份文件输出到存储服务器,供用户下载,并更新日志数据库“备份”字段。Optionally, in this embodiment, after the data assembly is completed, the data sm3 can be encrypted; further, the ciphertext of the data message can be compressed in a data format; finally, the data backup file can be output to the storage server , for users to download and update the log database "Backup" field.

步骤140、响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据。Step 140 , in response to the target recovery task initiated by the target user for the target data in the production environment database, unpack the data packet, and restore each target data.

在本实施例的一个可选实现方式中,如果继续接收到目标用户发起的针对生产环境数据库的目标恢复任务,目标任务执行器可以对上述得到的备份数据报文进行解包,从而恢复得到各目标数据。In an optional implementation of this embodiment, if the target recovery task for the production environment database initiated by the target user continues to be received, the target task executor can unpack the backup data message obtained above, so as to restore each target data.

可选的,在本实施例中,响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据,可以包括:读取与所述目标备份任务对应的备份数据,对所述备份数据进行解密,得到解密后的数据文件,并按照任务节点对所述解密后的数据文件进行分割,得到与各任务节点对应的分割文件;将各所述分割文件进行组装,得到数据库语句;根据各数据库语句对目标数据进行恢复。Optionally, in this embodiment, in response to the target recovery task initiated by the target user for the target data in the production environment database, unpacking the data packet, and recovering the target data may include: Read the backup data corresponding to the target backup task, decrypt the backup data to obtain decrypted data files, and divide the decrypted data files according to the task nodes to obtain the corresponding task nodes. splitting the file; assembling each of the split files to obtain a database statement; recovering the target data according to each database statement.

在本实施例的一个可选实现方式中,在接收到目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务之后,可以对备份数据报文减小解密操作,在服务器输出解密后的数据文件,并按任务节点进行分割。进一步的,可以根据用户标识,删除数据库数据,根据元数据任务节点,获取对应恢复的任务节点文件,进行数据加载,并自动组装数据库语句,进行数据恢复执行,数据恢复完成,对不同结果做如下操作:成功:提示用户已恢复到的版本情况;失败:删除当前恢复的数据,返回对备份数据进行解密的操作。In an optional implementation of this embodiment, after receiving the target recovery task for the target data in the production environment database initiated by the target user, the decryption operation can be reduced for the backup data message, and the decrypted Data files, and split by task nodes. Furthermore, the database data can be deleted according to the user ID, and the task node file corresponding to recovery can be obtained according to the metadata task node, and the data can be loaded, and the database statement can be automatically assembled to execute the data recovery. After the data recovery is completed, the different results can be performed as follows Operation: Success: Prompt the user of the version that has been restored; Failure: Delete the currently restored data and return to the operation of decrypting the backup data.

本实施例的技术方案,通过任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据,可以准确地从生产环境数据库中对相关数据进行备份或者恢复,为进行后续操作提供依据。In the technical solution of this embodiment, the target task executor corresponding to the target backup task is determined through the task repeater in response to the target backup task for the target data in the production environment database initiated by the target user; through the target task The executor obtains the user ID of the target user, and creates a backup log record corresponding to the target backup task according to the user ID; obtains each target data in the production environment database according to the backup log record, and performs the The target data is assembled to obtain the backup data message; in response to the target recovery task initiated by the target user for the target data in the production environment database, the data message is unpacked, and the target data is recovered to obtain the target data, which can be accurately Backup or restore relevant data from the production environment database in a timely manner to provide a basis for subsequent operations.

实施例二Embodiment two

图2是根据本发明实施例二提供的一种生产环境数据库的数据备份恢复方法的流程图,本实施例是对上述各技术方案的进一步细化,本实施例中的技术方案可以与上述一个或者多个实施例中的各个可选方案结合。如图2所示,生产环境数据库的数据备份恢复方法可以包括如下步骤:Fig. 2 is a flow chart of a data backup and recovery method for a production environment database according to Embodiment 2 of the present invention. This embodiment is a further refinement of the above-mentioned technical solutions. The technical solutions in this embodiment can be compared with the above-mentioned one Or a combination of alternative solutions in multiple embodiments. As shown in Figure 2, the data backup recovery method of the production environment database may include the following steps:

步骤210、基于预设规则对所述生产环境数据库中的各元数据进行装配。Step 210, assemble each metadata in the production environment database based on preset rules.

在本实施例的一个可选实现方式中,在响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之前,还可以包括:基于预设规则对所述生产环境数据库中的各元数据进行装配。In an optional implementation manner of this embodiment, before responding to the target backup task for the target data in the production environment database initiated by the target user, it may further include: metadata for assembly.

其中,预设规则可以为可扩展的标记语言模式文档规范(XML SchemaDocumentation,XSD)。Wherein, the preset rule may be an extensible markup language schema document specification (XML SchemaDocumentation, XSD).

可选的,在本实施例中,在响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之前,还可以基于XSD规范对所述生产环境数据库中的各元数据进行装配。即,技术人员可以根据用户业务场景梳理,基于XSD规范对任务元数据进行配置。Optionally, in this embodiment, before responding to the target backup task for the target data in the production environment database initiated by the target user, each metadata in the production environment database may also be assembled based on the XSD specification. That is, technicians can sort out user business scenarios and configure task metadata based on XSD specifications.

步骤220、通过所述任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;Step 220, through the task repeater, respond to the target backup task for the target data in the production environment database initiated by the target user, and determine the target task executor corresponding to the target backup task;

步骤230、通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;Step 230: Obtain the user ID of the target user through the target task executor, and create a backup log record corresponding to the target backup task according to the user ID;

步骤240、根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;Step 240: Obtain each target data in the production environment database according to the backup log records, and assemble each target data to obtain a backup data message;

步骤250、响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据。Step 250 , in response to the target recovery task initiated by the target user for the target data in the production environment database, unpack the data packet, and recover the target data.

本实施例的方案,在响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务之前,还可以基于预设规则对所述生产环境数据库中的各元数据进行装配,为后续对目标数据的备份恢复提供依据。In the solution of this embodiment, before responding to the target backup task for the target data in the production environment database initiated by the target user, each metadata in the production environment database may be assembled based on preset rules to provide for subsequent Provide a basis for backup and recovery of target data.

实施例三Embodiment Three

图3是根据本发明实施例三提供的一种生产环境数据库的数据备份恢复装置的结构示意图。如图3所示,该装置包括:任务执行器确定模块310、备份日志记录创建模块320、备份数据报文确定模块330以及目标数据确定模块340。FIG. 3 is a schematic structural diagram of a data backup and recovery device for a production environment database according to Embodiment 3 of the present invention. As shown in FIG. 3 , the device includes: a task executor determination module 310 , a backup log record creation module 320 , a backup data packet determination module 330 and a target data determination module 340 .

任务执行器确定模块310,用于通过所述任务中继器响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;A task executor determination module 310, configured to determine a target task executor corresponding to the target backup task in response to the target backup task for the target data in the production environment database initiated by the target user through the task repeater;

备份日志记录创建模块320,用于通过所述目标任务执行器获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;A backup log record creation module 320, configured to obtain the user ID of the target user through the target task executor, and create a backup log record corresponding to the target backup task according to the user ID;

备份数据报文确定模块330,用于根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;The backup data message determining module 330 is used to obtain each target data in the production environment database according to the backup log record, and assemble each of the target data to obtain a backup data message;

目标数据确定模块340,用于响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据。The target data determination module 340 is configured to unpack the data packet and recover the target data in response to the target recovery task for the target data in the production environment database initiated by the target user.

本实施例的方案,通过任务执行器确定模块响应于目标用户发起的针对生产环境数据库中的目标数据的目标备份任务,确定与所述目标备份任务对应的目标任务执行器;通过日志记录创建模块获取所述目标用户的用户标识,并根据所述用户标识创建与所述目标备份任务对应的备份日志记录;通过数据报文确定模块根据所述备份日志记录在生产环境数据库获取各目标数据,并对各所述目标数据进行组装,得到备份数据报文;通过数据确定模块响应于目标用户发起的针对生产环境数据库中的目标数据的目标恢复任务,对所述数据报文进行解包,恢复得到各所述目标数据,可以准确地从生产环境数据库中对相关数据进行备份或者恢复,为进行后续操作提供依据。In the solution of this embodiment, the target task executor corresponding to the target backup task is determined in response to the target backup task for the target data in the production environment database initiated by the target user through the task executor determination module; through the log record creation module Obtain the user ID of the target user, and create a backup log record corresponding to the target backup task according to the user ID; obtain each target data in the production environment database according to the backup log record through the data message determination module, and Assemble each of the target data to obtain a backup data message; through the data determination module, respond to the target recovery task for the target data in the production environment database initiated by the target user, unpack the data message, and recover to obtain Each of the target data can be accurately backed up or restored from the production environment database to provide a basis for subsequent operations.

在本实施例的一个可选实现方式中,生产环境数据库的数据备份恢复装置,还包括:装配模块,用于基于预设规则对所述生产环境数据库中的各元数据进行装配;In an optional implementation of this embodiment, the data backup and recovery device for the production environment database further includes: an assembly module, configured to assemble each metadata in the production environment database based on preset rules;

其中,所述预设规则为:可扩展的标记语言模式文档规范XSD。Wherein, the preset rule is: Extensible Markup Language Schema Document Specification XSD.

在本实施例的一个可选实现方式中,任务执行器确定模块310,具体用于生成与所述目标备份任务对应的目标任务,并将所述目标任务添加至任务队列;In an optional implementation of this embodiment, the task executor determination module 310 is specifically configured to generate a target task corresponding to the target backup task, and add the target task to a task queue;

从任务队列中获取所述目标任务,确定所述目标任务的资源消耗;acquiring the target task from the task queue, and determining resource consumption of the target task;

根据所述目标任务的资源消耗确定所述目标任务执行器。The target task executor is determined according to the resource consumption of the target task.

在本实施例的一个可选实现方式中,任务执行器确定模块310,还具体用于根据所述目标备份任务直接生成与所述目标备份任务对应的目标任务;In an optional implementation of this embodiment, the task executor determining module 310 is further specifically configured to directly generate a target task corresponding to the target backup task according to the target backup task;

或者,or,

拦截所述目标备份任务,提取所述目标备份任务的用户访问标识,并根据所述用户访问标识进行业务访问仲裁;Intercepting the target backup task, extracting the user access ID of the target backup task, and performing service access arbitration according to the user access ID;

在业务访问仲裁通过的情况下,生成与所述目标备份任务对应的目标任务;If the service access arbitration is passed, generate a target task corresponding to the target backup task;

否则,返回错误。Otherwise, an error is returned.

在本实施例的一个可选实现方式中,生产环境数据库的数据备份恢复装置,还包括:加密模块,用于对所述备份报文数据进行加密和/或压缩,得到与所述目标备份任务对应的备份数据。In an optional implementation of this embodiment, the data backup and recovery device for the production environment database further includes: an encryption module, configured to encrypt and/or compress the backup message data to obtain the corresponding backup data.

在本实施例的一个可选实现方式中,目标数据确定模块340,具体用于读取与所述目标备份任务对应的备份数据,对所述备份数据进行解密,得到解密后的数据文件,并按照任务节点对所述解密后的数据文件进行分割,得到与各任务节点对应的分割文件;In an optional implementation of this embodiment, the target data determination module 340 is specifically configured to read the backup data corresponding to the target backup task, decrypt the backup data, obtain a decrypted data file, and Segmenting the decrypted data file according to the task nodes to obtain the segmented files corresponding to each task node;

将各所述分割文件进行组装,得到数据库语句;Assembling each of the split files to obtain a database statement;

根据各数据库语句对目标数据进行恢复。The target data is restored according to each database statement.

在本实施例的一个可选实现方式中,所述备份日志记录,包括下述至少一项:In an optional implementation of this embodiment, the backup log records include at least one of the following:

任务标识、版本、时间以及状态字段。Task ID, Version, Time, and Status fields.

本发明实施例所提供的生产环境数据库的数据备份恢复装置可执行本发明实施例任意实施例所提供的生产环境数据库的数据备份恢复方法,具备执行方法相应的功能模块和有益效果。The data backup and restoration device of the production environment database provided by the embodiment of the present invention can execute the data backup and restoration method of the production environment database provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

实施例四Embodiment Four

图4示出了可以用来实施本发明实施例的实施例的电子设备10的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明实施例的实现。FIG. 4 shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the embodiments of the invention described and/or claimed herein.

如图4所示,电子设备10包括至少一个处理器11,以及与至少一个处理器11通信连接的存储器,如只读存储器(ROM)12、随机访问存储器(RAM)13等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器11可以根据存储在只读存储器(ROM)12中的计算机程序或者从存储单元18加载到随机访问存储器(RAM)13中的计算机程序,来执行各种适当的动作和处理。在RAM 13中,还可存储电子设备10操作所需的各种程序和数据。处理器11、ROM 12以及RAM 13通过总线14彼此相连。输入/输出(I/O)接口15也连接至总线14。As shown in FIG. 4, the electronic device 10 includes at least one processor 11, and a memory connected in communication with the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores There is a computer program executable by at least one processor, and the processor 11 can operate according to a computer program stored in a read-only memory (ROM) 12 or loaded from a storage unit 18 into a random access memory (RAM) 13. Various appropriate actions and processes are performed. In the RAM 13, various programs and data necessary for the operation of the electronic device 10 are also stored. The processor 11 , ROM 12 , and RAM 13 are connected to each other through a bus 14 . An input/output (I/O) interface 15 is also connected to the bus 14 .

电子设备10中的多个部件连接至I/O接口15,包括:输入单元16,例如键盘、鼠标等;输出单元17,例如各种类型的显示器、扬声器等;存储单元18,例如磁盘、光盘等;以及通信单元19,例如网卡、调制解调器、无线通信收发机等。通信单元19允许电子设备10通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

处理器11可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器11的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器11执行上文所描述的各个方法和处理,例如生产环境数据库的数据备份恢复方法。Processor 11 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes various methods and processes described above, for example, a data backup and recovery method for a production environment database.

在一些实施例中,生产环境数据库的数据备份恢复方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元18。在一些实施例中,计算机程序的部分或者全部可以经由ROM 12和/或通信单元19而被载入和/或安装到电子设备10上。当计算机程序加载到RAM 13并由处理器11执行时,可以执行上文描述的生产环境数据库的数据备份恢复方法的一个或多个步骤。备选地,在其他实施例中,处理器11可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行生产环境数据库的数据备份恢复方法。In some embodiments, the data backup and recovery method for the production environment database can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 10 via the ROM 12 and/or the communication unit 19 . When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for data backup and restoration of the production environment database described above can be executed. Alternatively, in other embodiments, the processor 11 may be configured in any other appropriate way (for example, by means of firmware) to execute the data backup and recovery method for the production environment database.

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.

用于实施本发明实施例的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the embodiments of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, so that the computer program causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented when executed by the processor. A computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

在本发明实施例的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of embodiments of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device . A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。In order to provide interaction with the user, the systems and techniques described herein can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user. monitor); and a keyboard and pointing device (eg, a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business expansion in traditional physical hosts and VPS services. defect.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明实施例中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明实施例的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the embodiments of the present invention may be executed in parallel, sequentially, or in a different order, as long as the expected results of the technical solutions of the embodiments of the present invention can be achieved, no limitation is imposed herein.

上述具体实施方式,并不构成对本发明实施例保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明实施例的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明实施例保护范围之内。The above specific implementation manners do not constitute a limitation to the scope of protection of the embodiments of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.

Claims (10)

1. A data backup and recovery method of a production environment database is applied to a data backup and recovery system, and the data backup and recovery system comprises the following steps: the task relay is in communication connection with each task executor; characterized in that the method comprises:
determining a target task executor corresponding to a target backup task by the task relay in response to the target backup task initiated by a target user and aiming at target data in a production environment database;
acquiring a user identification of the target user through the target task executor, and creating a backup log record corresponding to the target backup task according to the user identification;
acquiring each target data in a production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
and responding to a target recovery task initiated by a target user and aiming at target data in a production environment database, unpacking the data message, and recovering to obtain each target data.
2. The method of claim 1, further comprising, prior to responding to a target user initiated target backup task for target data in the production environment database:
assembling each metadata in the production environment database based on a preset rule;
wherein, the preset rule is: extensible markup language schema document specification XSD.
3. The method of claim 1, wherein the determining a target task executor corresponding to the target backup task comprises:
generating a target task corresponding to the target backup task, and adding the target task to a task queue;
acquiring the target task from a task queue, and determining the resource consumption of the target task;
and determining the target task executor according to the resource consumption of the target task.
4. The method of claim 3, wherein the generating a target task corresponding to the target backup task comprises:
directly generating a target task corresponding to the target backup task according to the target backup task;
or,
intercepting the target backup task, extracting a user access identifier of the target backup task, and performing service access arbitration according to the user access identifier;
generating a target task corresponding to the target backup task under the condition that the service access arbitration passes;
otherwise, an error is returned.
5. The method of claim 1, further comprising, after obtaining each target data in a production environment database according to the backup log record and assembling each target data to obtain a backup data packet:
and encrypting and/or compressing the backup data message to obtain backup data corresponding to the target backup task.
6. The method according to claim 5, wherein said unpacking said data message and recovering each of said target data in response to a target recovery task initiated by a target user for target data in a production environment database comprises:
reading backup data corresponding to the target backup task, decrypting the backup data to obtain decrypted data files, and dividing the decrypted data files according to task nodes to obtain divided files corresponding to each task node;
assembling each divided file to obtain a database statement;
and recovering the target data according to each database statement.
7. The method of claim 1, wherein the backup log record comprises at least one of:
task identity, version, time, and status fields.
8. A data backup and recovery device of a production environment database is applied to a data backup and recovery system, and the data backup and recovery system comprises: the task relay is in communication connection with each task executor; characterized in that the device comprises:
the task executor determining module is used for determining a target task executor corresponding to a target backup task initiated by a target user and aiming at target data in a production environment database through the task repeater;
the backup log record creation module is used for acquiring the user identification of the target user through the target task executor and creating a backup log record corresponding to the target backup task according to the user identification;
the backup data message determining module is used for acquiring each target data in the production environment database according to the backup log record, and assembling each target data to obtain a backup data message;
and the target data determining module is used for responding to a target recovery task initiated by a target user and aiming at target data in the production environment database, unpacking the data message and recovering to obtain each target data.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data backup restoration method of the production environment database of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of recovering data backup of a production environment database according to any one of claims 1-7.
CN202310632383.3A 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database Active CN116701053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310632383.3A CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310632383.3A CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Publications (2)

Publication Number Publication Date
CN116701053A true CN116701053A (en) 2023-09-05
CN116701053B CN116701053B (en) 2024-03-19

Family

ID=87833266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310632383.3A Active CN116701053B (en) 2023-05-30 2023-05-30 Method, device, equipment and medium for restoring data backup of production environment database

Country Status (1)

Country Link
CN (1) CN116701053B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369338A (en) * 2023-11-15 2024-01-09 广州飞数工业软件有限公司 Operation and maintenance management system and method for industrial manufacturing equipment
CN118672828A (en) * 2024-07-10 2024-09-20 北京火山引擎科技有限公司 Data backup method, device, medium, electronic equipment and program product

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488546A (en) * 2013-01-29 2014-01-01 中国人民解放军理工大学 Backup and recovery method capable of supporting online concurrency of multi-level data and database
CN108170867A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of metadata service system
US10146629B1 (en) * 2015-03-30 2018-12-04 EMC IP Holding Company LLC Extensible workflow manager for backing up and recovering microsoft shadow copy compatible applications
CN112181948A (en) * 2020-09-30 2021-01-05 中国工商银行股份有限公司 Database operation statement processing method and device, electronic equipment and medium
CN112363871A (en) * 2020-11-23 2021-02-12 腾讯科技(深圳)有限公司 Data file returning method, device and storage medium
CN113946565A (en) * 2021-10-29 2022-01-18 中国建设银行股份有限公司 Method and system for supporting sub-base and sub-table migration of heterogeneous data
CN115599603A (en) * 2022-10-25 2023-01-13 上海安钛飞信息技术有限公司(Cn) Data recovery method and system for distributed database
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system
CN115934414A (en) * 2022-11-09 2023-04-07 上海爱数信息技术股份有限公司 Data backup method, data recovery method, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103488546A (en) * 2013-01-29 2014-01-01 中国人民解放军理工大学 Backup and recovery method capable of supporting online concurrency of multi-level data and database
US10146629B1 (en) * 2015-03-30 2018-12-04 EMC IP Holding Company LLC Extensible workflow manager for backing up and recovering microsoft shadow copy compatible applications
CN108170867A (en) * 2018-01-31 2018-06-15 国信优易数据有限公司 A kind of metadata service system
CN112181948A (en) * 2020-09-30 2021-01-05 中国工商银行股份有限公司 Database operation statement processing method and device, electronic equipment and medium
CN112363871A (en) * 2020-11-23 2021-02-12 腾讯科技(深圳)有限公司 Data file returning method, device and storage medium
CN113946565A (en) * 2021-10-29 2022-01-18 中国建设银行股份有限公司 Method and system for supporting sub-base and sub-table migration of heterogeneous data
CN115599603A (en) * 2022-10-25 2023-01-13 上海安钛飞信息技术有限公司(Cn) Data recovery method and system for distributed database
CN115934414A (en) * 2022-11-09 2023-04-07 上海爱数信息技术股份有限公司 Data backup method, data recovery method, device, equipment and storage medium
CN115729749A (en) * 2022-11-30 2023-03-03 上海爱数信息技术股份有限公司 Data backup method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李爽等: "《红蓝对抗 解密渗透测试与网络安全建设》", 北京理工大学出版社, pages: 334 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369338A (en) * 2023-11-15 2024-01-09 广州飞数工业软件有限公司 Operation and maintenance management system and method for industrial manufacturing equipment
CN118672828A (en) * 2024-07-10 2024-09-20 北京火山引擎科技有限公司 Data backup method, device, medium, electronic equipment and program product

Also Published As

Publication number Publication date
CN116701053B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN109034993B (en) Account checking method, account checking equipment, account checking system and computer readable storage medium
US9589153B2 (en) Securing integrity and consistency of a cloud storage service with efficient client operations
US12135612B2 (en) Snapshotting hardware security modules and disk metadata stores
US10031948B1 (en) Idempotence service
US9940113B2 (en) Big data assistant
CN116701053B (en) Method, device, equipment and medium for restoring data backup of production environment database
US10725799B2 (en) Big data pipeline management within spreadsheet applications
US20170147704A1 (en) Processing large xml files by splitting and hierarchical ordering
WO2024021861A1 (en) Data recovery method and electronic device
US10318385B2 (en) Service recovery using snapshots and interservice messages
CN111930346B (en) Artificial intelligence information processing method, device, electronic equipment and storage medium
AU2018264046A1 (en) Analyzing value-related data to identify an error in the value-related data and/or a source of the error
CN113326038B (en) Methods, devices, equipment, storage media and program products used to provide services
CN115774739A (en) Transaction data tracking method and device
CN112148762A (en) Statistical method and device for real-time data flow
CN115329395A (en) Data processing method, device, system, device and storage medium for database
CN115129554A (en) A consensus transaction tracking method, device, equipment and storage medium
CN113609156A (en) Data query and writing method, device, electronic device and readable storage medium
CN113760765B (en) Code testing method and device, electronic equipment and storage medium
US10671505B2 (en) System and method for monitoring service
CN113360407B (en) Function positioning method and device, electronic equipment and readable storage medium
CN110389862B (en) A data storage method, device, equipment and storage medium
CN116302086A (en) Application processing method and device, electronic equipment and readable storage medium
CN115801357A (en) Global exception handling method, device, equipment and storage medium
CN116954998A (en) An off-site disaster recovery method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20230905

Assignee: Hangzhou Haolian Intelligent Technology Co.,Ltd.

Assignor: Hangzhou new China and the big Polytron Technologies Inc.

Contract record no.: X2024980042943

Denomination of invention: Data backup and recovery methods, devices, equipment, and media for production environment databases

Granted publication date: 20240319

License type: Common License

Record date: 20241231

EE01 Entry into force of recordation of patent licensing contract