A data recovery method and apparatus

CN116521436BActive Publication Date: 2026-10-23INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310224179.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2026-10-23
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

在需要恢复删除的数据资产时,如果通过手工方式重新建模建立关系,效率较低;如果通过备份数据库进行数据还原,在数据资产删除后,如果有其他业务人员对关联数据进行更新,那么存在这些更新数据也会被覆盖,导致恢复后的数据不够准确

Benefits of technology

[0018]本发明实施例提供的数据恢复方法及装置,能够接收数据恢复请求,所述数据恢复请求包括恢复字段;根据所述恢复字段在数据库的各个数据模型中进行精确匹配,获得待恢复的关联字段数据;根据待恢复的关联字段数据以及数据库的各个数据模型,获得待恢复的关联字段数据对应的数据模型以及对应的数据恢复关系;根据待恢复的关联字段数据对应的数据模型以及对应的数据恢复关系,对待恢复的关联字段数据对应的数据模型进行数据恢复,能够在数据字段级别精确地进行数据字段以及关联关系的恢复,提高了数据恢复的精确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521436B_ABST
    Figure CN116521436B_ABST
Patent Text Reader

Abstract

The application provides a data recovery method and device, which can be used in the financial field or other technical fields.The method comprises the following steps: receiving a data recovery request, wherein the data recovery request comprises a recovery field; performing accurate matching in each data model of a database according to the recovery field to obtain associated field data to be recovered; obtaining a data model corresponding to the associated field data to be recovered and a corresponding data recovery relationship according to the associated field data to be recovered and each data model of the database; and performing data recovery on the data model corresponding to the associated field data to be recovered according to the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship.The device is used to execute the above method.The data recovery method and device provided by the embodiment of the application improve the accuracy of data recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and specifically to a data recovery method and apparatus. Background Technology

[0002] With the development of digital banking and information technology, commercial banks need to understand the technological development and business needs of various industries. Commercial banks establish asset management systems, conduct data modeling, and store various data assets.

[0003] During data modeling, if some old data assets are deleted due to various business needs or other reasons, the associated relationships of these deleted old data assets will also be unbound and deleted. When it is necessary to restore the deleted data assets, manually remodeling and establishing relationships is inefficient; if data is restored through a backup database, any updates made by other business personnel to the associated data after the data assets were deleted will also be overwritten, resulting in inaccurate restored data. Summary of the Invention

[0004] To address the problems in the prior art, embodiments of the present invention provide a data recovery method and apparatus that can at least partially solve the problems existing in the prior art.

[0005] In a first aspect, the present invention proposes a data recovery method, comprising:

[0006] Receive a data recovery request, the data recovery request including recovery fields;

[0007] Based on the recovery fields, precise matching is performed in various data models of the database to obtain the associated field data to be recovered;

[0008] Based on the related field data to be recovered and the various data models of the database, obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship;

[0009] Based on the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship, data recovery is performed on the data model corresponding to the associated field data to be recovered.

[0010] In a second aspect, the present invention provides a data recovery apparatus, comprising:

[0011] A receiving module is configured to receive a data recovery request, wherein the data recovery request includes a recovery field;

[0012] The first obtaining module is used to perform precise matching in various data models of the database according to the recovery field to obtain the associated field data to be recovered;

[0013] The second acquisition module is used to obtain the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship based on the associated field data to be recovered and the various data models of the database.

[0014] The data recovery module is used to recover data based on the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship.

[0015] Thirdly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data recovery method described in any of the above embodiments.

[0016] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data recovery method described in any of the above embodiments.

[0017] Fifthly, the present invention provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the data recovery method described in any of the above embodiments.

[0018] The data recovery method and apparatus provided in this invention can receive a data recovery request, the data recovery request including a recovery field; perform precise matching in various data models of the database according to the recovery field to obtain the related field data to be recovered; obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship according to the related field data to be recovered and the various data models of the database; and perform data recovery on the data model corresponding to the related field data to be recovered according to the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship. This method and apparatus can accurately recover data fields and relationships at the data field level, thus improving the accuracy of data recovery. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0020] Figure 1 This is a schematic diagram of the data recovery system provided in the first embodiment of the present invention.

[0021] Figure 2This is a flowchart illustrating the data recovery method provided in the second embodiment of the present invention.

[0022] Figure 3 This is a flowchart illustrating the data recovery method provided in the third embodiment of the present invention.

[0023] Figure 4 This is a flowchart illustrating the data recovery method provided in the fourth embodiment of the present invention.

[0024] Figure 5 This is a flowchart illustrating the data recovery method provided in the fifth embodiment of the present invention.

[0025] Figure 6 This is a schematic diagram of the data structure of the data model provided in the sixth embodiment of the present invention.

[0026] Figure 7 This is a schematic diagram of the data structure of the data model provided in the seventh embodiment of the present invention.

[0027] Figure 8 This is a schematic diagram of the data recovery device provided in the eighth embodiment of the present invention.

[0028] Figure 9 This is a schematic diagram of the data recovery device provided in the ninth embodiment of the present invention.

[0029] Figure 10 This is a schematic diagram of the data recovery device provided in the tenth embodiment of the present invention.

[0030] Figure 11 This is a schematic diagram of the data recovery device provided in the eleventh embodiment of the present invention.

[0031] Figure 12 This is a schematic diagram of the physical structure of the electronic device provided in the twelfth embodiment of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with relevant laws and regulations. The user information in the embodiments of this application is obtained through legal and compliant means, and the acquisition, storage, use, and processing of user information have been authorized and agreed upon by the customer.

[0033] Figure 1 This is a schematic diagram of the data recovery system provided in the first embodiment of the present invention, as shown below. Figure 1 As shown, the data recovery system provided in this embodiment of the invention includes a server 1 and at least one client 2, wherein:

[0034] Server 1 communicates with each client 2. Client 2 includes, but is not limited to, devices such as desktop computers and laptops.

[0035] Server 1 can query data from the database, which uses meta-modeling technology to model the data and establish the required data model. The data model is configured according to actual needs, and this embodiment of the invention does not impose any limitations.

[0036] For example, as shown in Table 1, the data model includes various fields such as class_name, attr_name, ch_name, attr_seq, editable, and visible. class_name includes fields like BusinessDomain and Entity, where BusinessDomain represents the business domain and Entity represents the entity. attr_name includes fields like aimDesc (purpose), defDesc (definition), scaleDesc (scope), and BusinessDomainRValueFlow (value stream associated with the business domain), which are set according to actual needs.

[0037] When building a data model, you can use the various drawing tools in the AmaterasUML plugin installed on Eclipse to draw the data model graphically. The attributes of the data model can be defined using the drawing tools provided by the AmaterasUML plugin in Eclipse, generating an xxx.ecore file, thus completing the data model configuration. The generated ecore file can be used for subsequent data model upgrades.

[0038] Table 1 Fields of the Data Model

[0039]

[0040] For ease of understanding, the content defined in the ecore file can be presented in tabular form, with the table header representing the field names of the data model. As shown in Table 2, the example in Table 2 is the business domain data model, whose content is stored in the ecore file. Specifically, the business domain data model is defined as BusinessDomain, including attribute fields such as name, aimDesc, defDesc, scaleDesc, businessDomainRValueFlow, and businessDomainREntity. Their corresponding Chinese names are purpose, definition, scope, the value flow associated with the business domain, and the business domain itself. Each attribute field is sorted by comparing its size using attr_seq. The editable and visible properties control whether the attribute fields are visible and editable.

[0041] Table 2 Data Model for Business Areas

[0042]

[0043]

[0044] The following describes the specific implementation process of the data recovery method provided in this embodiment of the invention, using a server as the execution subject as an example.

[0045] Figure 2 This is a flowchart illustrating the data recovery method provided in the second embodiment of the present invention, as shown below. Figure 2 As shown, the data recovery method provided in this embodiment of the invention includes:

[0046] S201. Receive a data recovery request, wherein the data recovery request includes a recovery field;

[0047] Specifically, when data recovery is required, business personnel can send a data recovery request to the server through the client. This data recovery request includes recovery fields. The server will receive the data recovery request. The recovery fields may include one piece of data, or two or more pieces of data.

[0048] For example, the recovery field includes a data name and field data, where the data name uniquely corresponds to the data model, and the field data can be a certain attribute field of the data model.

[0049] S202. Based on the recovery fields, perform precise matching in each data model of the database to obtain the associated field data to be recovered;

[0050] Specifically, the server performs precise matching in each data model of the database based on the recovery field, and uses the data corresponding to the attribute fields of the matched data models as the associated field data to be recovered.

[0051] Understandably, if no data is found corresponding to the attribute field of the data model, it indicates that there is a problem with the recovery field, and an error message can be returned to the client.

[0052] S203. Based on the related field data to be recovered and the various data models of the database, obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship;

[0053] Specifically, after obtaining the related field data to be recovered, the server performs data matching in the backup attributes of each data model in the database based on the related field data to be recovered. If the backup attributes of a data model include the related field data to be recovered, then that data model is taken as the data model corresponding to the related field data to be recovered, and the data recovery relationship that includes the related field data to be recovered in the backup attributes of that data model is taken as the data recovery relationship corresponding to that data model. The backup attributes of the data model are obtained in advance and may include data recovery relationships.

[0054] S204. Based on the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship, perform data recovery on the data model corresponding to the associated field data to be recovered.

[0055] Specifically, the server performs data recovery based on the data recovery relationship corresponding to the data model of the associated field data to be recovered, and restores the previously deleted associated field data and its corresponding relationship.

[0056] The data recovery method provided in this invention can receive a data recovery request, which includes a recovery field; perform precise matching on the recovery field in various data models of the database to obtain the related field data to be recovered; obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship based on the related field data to be recovered and the various data models of the database; and perform data recovery on the data model corresponding to the related field data to be recovered based on the data model and the corresponding data recovery relationship. This method can accurately recover data fields and their relationships at the data field level, improving the accuracy of data recovery. Furthermore, it eliminates the need for manual intervention in rebuilding the relationships, thus improving the efficiency of data recovery.

[0057] Figure 3This is a flowchart illustrating the data recovery method provided in the third embodiment of the present invention, as shown below. Figure 3 As shown, based on the above embodiments, the recovery field further includes a data name and field data; correspondingly, the step of performing precise matching in various data models of the database based on the recovery field to obtain the associated field data to be recovered includes:

[0058] S301. Obtain the data model corresponding to the data name by querying the database according to the data name;

[0059] Specifically, the recovery field includes a data name and field data. Each data model in the database has a unique corresponding data name, and the field data can be a key-value pair corresponding to a certain attribute field of the data model. The server queries each data model to see if there is a data name with the same name. If there is a data name with the same name, the data model that includes the data name is selected as the data model corresponding to the data name.

[0060] S302. If field data is obtained by querying the backup attributes of the data model corresponding to the data name, then the field data is used as the associated field data to be restored.

[0061] Specifically, the server queries the field data in the backup attributes of the data model corresponding to the data name. If the backup attributes of the data model corresponding to the data name include the field data, then the field data is used as the associated field data to be restored.

[0062] Figure 4 This is a flowchart illustrating the data recovery method provided in the fourth embodiment of the present invention, as shown below. Figure 4 As shown, based on the above embodiments, the recovery field further includes a data name; correspondingly, the step of performing precise matching in various data models of the database based on the recovery field to obtain the associated field data to be recovered includes:

[0063] S401. Obtain the data model corresponding to the data name by querying the database according to the data name;

[0064] Specifically, the server queries the database for the data names of each data model based on the data name. If the data name of a data model is the same as the data name included in the recovery field, then that data model is used as the data model corresponding to the data name included in the recovery field.

[0065] S402. Obtain the associated field data to be restored from the backup attributes of the data model corresponding to the data name.

[0066] Specifically, since the recovery field includes the data name but not the field data, it indicates that all deleted data in the backup attributes of the data model corresponding to the data name needs to be recovered. The server retrieves the corresponding data from the various related data recovery relationships included in the backup attributes of the data model corresponding to the data name as the related field data to be recovered.

[0067] For example, backup data for a data model includes a relationship for restoring related data: entity-protocol condition. The entity-protocol condition indicates that the protocol condition is a key-value pair that has been deleted from the attribute field entity. The protocol condition can be retrieved from the entity-protocol condition as the related field data to be restored.

[0068] Based on the above embodiments, further, obtaining the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship according to the associated field data to be recovered and the various data models of the database includes:

[0069] If the backup attributes of the data model include any of the related field data to be restored, then the data model is used as the data model corresponding to the related field data to be restored, and the data recovery relationship corresponding to the data model is obtained from the backup attributes of the data model.

[0070] Specifically, the server compares each field in the associated field data to be recovered with the key values ​​included in the backup attributes of the data model. If any of the field data in the associated field data to be recovered is included in the key values ​​of the backup attributes of the data model, then that data model is used as the data model corresponding to the associated field data to be recovered, and the data recovery relationship including the field data in the associated field data to be recovered is used as the data recovery relationship corresponding to the data model. Here, the key values ​​corresponding to the backup attributes of the data model are obtained in advance, and these key values ​​are the data recovery relationships.

[0071] Based on the above embodiments, the step of performing data recovery on the data model corresponding to the associated field data to be recovered, according to the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship, includes:

[0072] The associated field data to be recovered is recovered according to the data model corresponding to the data recovery relationship, and the data recovery relationship corresponding to the recovered associated field data is deleted from the backup attribute of the corresponding data model.

[0073] Specifically, the server retrieves relevant data from the data recovery relationship and adds it to the corresponding data model to restore the associated field data. After restoring the associated field data, the data recovery relationship corresponding to the restored associated field data is deleted from the backup attributes of the data model corresponding to the data recovery relationship.

[0074] For example, the associated field data to be recovered is a protocol condition. The corresponding data recovery relationship for the protocol condition is entity-protocol condition, where entity-protocol condition indicates that the protocol condition is a key-value pair deleted from the attribute field entity. The entity and protocol condition are retrieved from the entity protocol condition. The protocol condition is added to the attribute field entity of the data model corresponding to the protocol condition as a key-value pair, thus realizing the data recovery of the protocol condition. Then, entity-protocol condition is deleted from the backup attribute of the data model corresponding to the protocol condition.

[0075] Figure 5 This is a flowchart illustrating the data recovery method provided in the fifth embodiment of the present invention, as shown below. Figure 5 As shown, based on the above embodiments, the data recovery method provided by the embodiments of the present invention further includes:

[0076] S501. Receive a data deletion request, wherein the data deletion request includes deleting data;

[0077] Specifically, when data deletion is required, business personnel can send a data deletion request to the server through the client. The data deletion request includes deleting the data. The server will receive the data deletion request.

[0078] For example, a data model named "Personal Deposits" includes an attribute field called "Associated Entities," which contains four key-value pairs: account, balance, currency, and agreement conditions. To delete the agreement conditions, these conditions can be included as deleted data in a data deletion request sent to the server.

[0079] S502. Obtain the data model corresponding to the deleted data and the corresponding associated data recovery relationship from the database based on the deleted data;

[0080] Specifically, the server iterates through each data model in the database based on the deleted data. If a data model includes the deleted data, then the data model is used as the data model corresponding to the deleted data, and the associated data recovery relationship corresponding to the deleted data is obtained.

[0081] For example, if the server receives a deletion request that includes protocol conditions, and the server iterates through each data model in the database, and the associated entity of the data model named "Personal Deposit" includes the protocol conditions, then the data model named "Personal Deposit" is taken as the data model corresponding to the protocol conditions, and the associated data recovery relationship corresponding to the protocol conditions is obtained as: associated entity - protocol conditions. The associated data recovery relationship corresponding to the protocol conditions can be recorded in the backup attributes of the data model named "Personal Deposit".

[0082] S503. Back up the data according to the data model corresponding to the deleted data and the corresponding associated data recovery relationship;

[0083] Specifically, after obtaining the associated data recovery relationship corresponding to the deleted data, the server will back up the associated data recovery relationship corresponding to the deleted data to the data model corresponding to the deleted data, so that the data model corresponding to the deleted data can be accurately recovered during subsequent data recovery.

[0084] S504. Delete the data to be deleted from the corresponding data model.

[0085] Specifically, after backing up the data, the server removes the deleted data from the data model corresponding to the deleted data.

[0086] Based on the above embodiments, the step of backing up the data according to the data model corresponding to the deleted data and the corresponding associated data recovery relationship includes:

[0087] Add the corresponding associated data recovery relationship to the backup attributes of the data model corresponding to the deleted data.

[0088] Specifically, the server restores the associated data relationship corresponding to the deleted data and adds it to the backup attribute of the data model corresponding to the deleted data, as the key value of the backup attribute.

[0089] The following describes the specific implementation process of the data recovery method provided by the present invention using a specific embodiment.

[0090] Create two data models in a MongoDB database, data model A as follows: Figure 6 As shown, data model B is as follows Figure 7As shown. Data Model A and Data Model B are defined using the drawing tools provided by the AmaterasUML plugin in Eclipse. MongoDB is a collection-oriented database, where each collection is the data stored in the MongoDB database. It can use any data structure, such as JSON, TXT, or binary stream files, because MongoDB, as a non-relational database, does not have the concept of tables; all stored information exists in the form of key-value pairs.

[0091] Data model A is named "Personal Deposits" and includes attribute fields such as Purpose (aimDesc), Definition (defDesc), Scope (scaleDesc), Related Value Flow (businessDomainRValueFlow), Related Entity (businessDomainREntity), and Backup Attribute. Data model A is a business domain. The key value for Purpose is: "To obtain customer funds through bank credit and use this as the basis for operations to achieve the business objective of raising funds and expanding profitability." The key value for Definition is: "A financial behavior or activity in which individual customers temporarily transfer funds or currency to the bank while retaining ownership, and can withdraw funds at any time or at a predetermined time and receive interest income." The key value for Scope is: "Involved Customers: Individual Customers." The key values ​​for Related Value Flow are: "Establishing a personal deposit system," "Establishing a personal deposit plan," and "Providing financial services." The key values ​​for Related Entity are: "Account," "Balance," "Currency," and "Agreement Conditions." If no data deletion has been performed after initializing data in data model A, the key value for Backup Attribute is empty.

[0092] Data model B is named "Agreement Conditions" and includes attribute fields such as Purpose, Definition, Scope, Associated Business Objects, Associated Business Domains, and Backup Attributes. Data model B is an entity. The key value for Purpose is: "Controlling business processes and providing differentiated customer service." The key value for Definition is: "Agreement terms between the bank and the customer regarding the processes and controls during the use of the product after it has been sold to the customer." The key value for Scope is: "Includes negotiable product conditions, but excludes non-negotiable product conditions (reflected in the product conditions)." The key value for Associated Business Objects is: "Product Agreement." The key values ​​for Associated Business Domains are: "Wealth Management Products," "Credit Cards," "Personal Accounts," and "Personal Deposits." If no data deletion has been performed after initializing data in data model B, the key value for the Backup Attribute is empty.

[0093] Data from both Data Model A and Data Model B can be stored in a collection using JSON. The specific format of Data Model A is: {"class_name":"businessDomain","name":"Personal Deposits","aimDesc":"Obtaining customer funds through bank credit and using this as the basis for operations to achieve the business objective of raising funds and expanding profitability.","defDesc":"A financial activity or activity in which individual customers temporarily transfer funds or currency to a bank while retaining ownership, and can withdraw funds at any time or according to an agreed time and receive interest income.","scaleDesc":"Customers involved: Individual customers","businessDomainRValueFlow":["Establishing a personal deposit system","Establishing a personal deposit plan","Providing financial services"],"businessDomainREntity":["Account","Balance","Currency","Agreement conditions"]}. The specific format of Data Model B is similar to that of Data Model A, and will not be elaborated here.

[0094] Data models A and B have a relationship. Based on the key-value pair "businessDomainREntity":["Account","Balance","Currency","Agreement Conditions"] in the JSON data of data model A, four related entity data can be identified from personal deposits, including agreement conditions. Similarly, the key-value pair "entityRbusinessDomain":["Financial Products","Credit Card","Personal Account","Personal Deposits"] in the JSON data of data model B can be identified from agreement conditions, including personal deposits. Since the related entity of personal deposit data model A includes agreement conditions, and the related business area of ​​agreement conditions data B includes personal deposits, a relationship can be established between the data of data models A and B.

[0095] Business users send a data deletion request to the server via a client, including the protocol conditions. The server iterates through the database; data model A's "businessDomainREntity" contains the protocol conditions. Data model A is used as the data model corresponding to the protocol conditions. Based on "businessDomainREntity" and the protocol conditions, the server obtains the associated data recovery relationship corresponding to the protocol conditions: businessDomainREntity - protocol conditions. This associated data recovery relationship is stored in the backup attribute of data model A, serving as the key-value pair for the backup attribute of data model A. Then, the protocol conditions are deleted from "businessDomainREntity" in data model A. After deletion, the key-value pair for "businessDomainREntity" in data model A is: account, balance, currency. At this point, because the protocol conditions have been deleted from data model A, there is no longer a relationship between data model A and data model B.

[0096] When it's necessary to restore the protocol conditions of data model A, business personnel send a data recovery request to the server via the client. This request includes personal deposits and the protocol conditions. The server retrieves the corresponding data model A based on the personal deposits and then finds the protocol conditions in the backup field of data model A, specifically in the associated data recovery relationship: `businessDomainREntity-protocolCondition`. `businessDomainREntity-protocolCondition` is then used as the associated data recovery relationship for the protocol conditions. Based on this relationship, the protocol conditions are added to the `businessDomainREntity` attribute field, and then the `businessDomainREntity-protocolCondition` attribute in data model A's backup field is deleted. After data recovery, the key values ​​for `businessDomainREntity` in data model A are: Account, Balance, Currency, Protocol Conditions. The `businessDomainREntity-protocolCondition` attribute is no longer present in data model A's backup field. Because the protocol conditions have been restored in the `businessDomainREntity` of personal deposit data model A, the association between data models A and B can be re-established.

[0097] The data recovery method provided in this invention has at least three advantages over manual recovery or data overwriting via database backup:

[0098] (1) The "Delete Related Data" field attribute supports batch parsing to handle a large number of data relationships. When you want to restore the data after deletion, compared to manual operation, business personnel do not need to manually re-associate the data to be restored with other different data in the modeling process, which greatly reduces the workload of business personnel, improves work efficiency, and avoids omissions or incorrect modeling.

[0099] (2) Data recovery methods that rely on batch data overwriting from backup databases can lead to data loss during periods of inactivity (when data has been deleted but not yet recovered, and other personnel have made other data updates). The technical solution of this invention achieves automated and accurate data recovery. Furthermore, it reduces lag in restoring data relationships, allowing recovery to be completed as soon as new data is added to the system, ensuring both accuracy and efficiency in data recovery.

[0100] (3) It supports the use of data synchronization and association based on meta-model in different modeling scenarios. It is not only applicable to the business architecture modeling of banks, but also to the related association scenarios between data models encountered in data modeling of any industry, thus ensuring the universality of the technical solution.

[0101] Figure 8 This is a schematic diagram of the data recovery device provided in the eighth embodiment of the present invention, as shown below. Figure 8 As shown, the data recovery device provided in this embodiment of the invention includes a receiving module 801, a first obtaining module 802, a second obtaining module 803, and a data recovery module 804, wherein:

[0102] The receiving module 801 is used to receive a data recovery request, the data recovery request including a recovery field; the first obtaining module 802 is used to perform precise matching in each data model of the database according to the recovery field to obtain the related field data to be recovered; the second obtaining module 803 is used to obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship according to the related field data to be recovered and each data model of the database; the data recovery module 804 is used to perform data recovery on the data model corresponding to the related field data to be recovered according to the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship.

[0103] Specifically, when data recovery is required, business personnel can send a data recovery request to the receiving module 801 through the client. The data recovery request includes a recovery field. The receiving module 801 will receive the data recovery request. The recovery field may include one piece of data, or it may include two or more pieces of data.

[0104] The first acquisition module 802 performs precise matching in each data model of the database according to the recovery field, and uses the data corresponding to the attribute field of the matched data model as the associated field data to be recovered.

[0105] After obtaining the related field data to be recovered, the second acquisition module 803 performs data matching in the backup attributes of each data model in the database based on the related field data to be recovered. If the backup attributes of a data model include the related field data to be recovered, then that data model is taken as the data model corresponding to the related field data to be recovered, and the data recovery relationship of that data model, which includes the related field data to be recovered in its backup attributes, is taken as the data recovery relationship corresponding to that data model. The backup attributes of the data model are obtained in advance and may include data recovery relationships.

[0106] The data recovery module 804 performs data recovery based on the data model corresponding to the data to be recovered, and restores the previously deleted data and corresponding relationships of the related fields.

[0107] The data recovery apparatus provided in this invention can receive a data recovery request, which includes a recovery field; perform precise matching of the recovery field in various data models of the database to obtain the related field data to be recovered; obtain the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship based on the related field data to be recovered and the various data models of the database; and perform data recovery on the data model corresponding to the related field data to be recovered based on the data model and the corresponding data recovery relationship. This allows for precise recovery of data fields and their relationships at the data field level, improving the accuracy of data recovery. Furthermore, it eliminates the need for manual intervention in rebuilding the relationships, thus improving the efficiency of data recovery.

[0108] Figure 9 This is a schematic diagram of the data recovery device provided in the ninth embodiment of the present invention, as shown below. Figure 9 As shown, based on the above embodiments, the recovered field further includes a data name and field data; correspondingly, the first obtaining module 802 includes a first query unit 8021 and a first obtaining unit 8022, wherein:

[0109] The first query unit 8021 is used to query the database according to the data name to obtain the data model corresponding to the data name; the first assignment unit 8022 is used to use the field data as the associated field data to be restored if the field data is obtained in the backup attribute of the data model corresponding to the data name.

[0110] Figure 10 This is a schematic diagram of the data recovery device provided in the tenth embodiment of the present invention, as shown below. Figure 10 As shown, based on the above embodiments, the recovery field further includes a data name; correspondingly, the first obtaining module 802 includes a second query unit 8023 and a second obtaining unit 8024, wherein:

[0111] The second query unit 8023 is used to query the database according to the data name to obtain the data model corresponding to the data name; the second processing unit 8024 is used to obtain the associated field data to be restored from the backup attributes of the data model corresponding to the data name.

[0112] Based on the above embodiments, the second obtaining module 803 is further specifically used for:

[0113] If the backup attributes of the data model include any of the fields in the associated field data to be restored, then the data model is used as the data model corresponding to the associated field data to be restored, and the data recovery relationship corresponding to the data model is obtained from the backup attributes of the data model.

[0114] Based on the above embodiments, the data recovery module 804 is further specifically used for:

[0115] The associated field data to be recovered is recovered according to the data model corresponding to the data recovery relationship, and the data recovery relationship corresponding to the recovered associated field data is deleted from the backup attribute of the corresponding data model.

[0116] Figure 11 This is a schematic diagram of the data recovery device provided in the eleventh embodiment of the present invention, as shown below. Figure 11 As shown, based on the above embodiments, the data recovery device provided in this embodiment further includes a data receiving module 805, a third obtaining module 806, a backup module 807, and a deletion module 808, wherein:

[0117] The data receiving module 805 is used to receive a data deletion request, the data deletion request including deleting data; the third obtaining module 806 is used to obtain the data model corresponding to the deleted data and the corresponding associated data recovery relationship in the database according to the deleted data; the backup module 807 is used to perform data backup according to the data model corresponding to the deleted data and the corresponding associated data recovery relationship; the deletion module 808 is used to delete the deleted data from the corresponding data model.

[0118] Based on the above embodiments, the backup module 807 is further specifically used for:

[0119] Add the corresponding associated data recovery relationship to the backup attributes of the data model corresponding to the deleted data.

[0120] The embodiments of the device provided in this invention can be used to execute the processing flow of the above-described method embodiments. Its functions will not be repeated here, but can be referred to the detailed description of the above-described method embodiments.

[0121] It should be noted that the data recovery method and apparatus provided in the embodiments of the present invention can be used in the financial field, or in any technical field other than the financial field. The embodiments of the present invention do not limit the application field of the data recovery method and apparatus.

[0122] Figure 12 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, as shown below. Figure 12 As shown, the electronic device may include a processor 1201, a communications interface 1202, a memory 1203, and a communication bus 1204. The processor 1201, communications interface 1202, and memory 1203 communicate with each other via the communication bus 1204. The processor 1201 can call logical instructions in the memory 1203 to execute the following methods: receiving a data recovery request, the data recovery request including a recovery field; performing precise matching in various data models of the database based on the recovery field to obtain the associated field data to be recovered; obtaining the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship based on the associated field data to be recovered and the various data models of the database; and performing data recovery on the data model corresponding to the associated field data to be recovered based on the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship.

[0123] Furthermore, the logical instructions in the aforementioned memory 1203 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0124] This embodiment discloses a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as: receiving a data recovery request, the data recovery request including a recovery field; performing precise matching in various data models of the database according to the recovery field to obtain the associated field data to be recovered; obtaining the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship according to the associated field data to be recovered and the various data models of the database; and performing data recovery on the data model corresponding to the associated field data to be recovered according to the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship.

[0125] This embodiment provides a computer-readable storage medium storing a computer program that causes a computer to execute the methods provided in the above-described method embodiments. For example, the methods include: receiving a data recovery request, the data recovery request including a recovery field; performing precise matching in various data models of the database based on the recovery field to obtain related field data to be recovered; obtaining the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship based on the related field data to be recovered and the various data models of the database; and performing data recovery on the data model corresponding to the related field data to be recovered based on the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship.

[0126] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0127] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0128] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0129] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0130] In the description of this specification, the references to terms such as "an embodiment," "a specific embodiment," "some embodiments," "for example," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0131] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data recovery method, characterized in that, include: Receive a data deletion request, the data deletion request including deleting data; Based on the deleted data, obtain the data model corresponding to the deleted data and the corresponding related data recovery relationship in the database; Add the corresponding associated data recovery relationship to the backup attributes of the data model corresponding to the deleted data; Remove the data from the corresponding data model; Receive a data recovery request, the data recovery request including recovery fields; The recovery fields are precisely matched in various data models of the database to obtain the related field data to be recovered. The data models are obtained by the database based on meta-model technology for data modeling. If the backup attributes of the data model include any of the fields in the associated field data to be restored, then the data model is used as the data model corresponding to the associated field data to be restored, and the data recovery relationship corresponding to the data model is obtained from the backup attributes of the data model. Based on the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship, data recovery is performed on the data model corresponding to the associated field data to be recovered.

2. The method according to claim 1, characterized in that, The recovery field includes a data name and field data; correspondingly, the step of performing precise matching in various data models of the database based on the recovery field to obtain the associated field data to be recovered includes: Based on the data name, query the database to obtain the data model corresponding to the data name; If field data is obtained by querying the backup attributes of the data model corresponding to the data name, then the field data will be used as the associated field data to be restored.

3. The method according to claim 1, characterized in that, The recovery field includes a data name; correspondingly, the step of performing precise matching in various data models of the database based on the recovery field to obtain the associated field data to be recovered includes: Based on the data name, query the database to obtain the data model corresponding to the data name; Retrieve the associated field data to be restored from the backup attributes of the data model corresponding to the data name.

4. The method according to claim 1, characterized in that, The step of performing data recovery based on the data model corresponding to the associated field data to be recovered and the corresponding data recovery relationship includes: The associated field data to be recovered is recovered according to the data model corresponding to the data recovery relationship, and the data recovery relationship corresponding to the recovered associated field data is deleted from the backup attribute of the corresponding data model.

5. A data recovery device, characterized in that, include: A data receiving module is used to receive data deletion requests, wherein the data deletion requests include deleting data; The third obtaining module is used to obtain, based on the deleted data, the data model corresponding to the deleted data and the corresponding associated data recovery relationship in the database; The backup module is used to add corresponding associated data recovery relationships to the backup attributes of the data model corresponding to the deleted data; The deletion module is used to delete the data from the corresponding data model. A receiving module is configured to receive a data recovery request, wherein the data recovery request includes a recovery field; The first obtaining module is used to perform precise matching in various data models of the database according to the recovery field to obtain the associated field data to be recovered. The data model is obtained by the database based on meta-model technology for data modeling. The second obtaining module is used to, if the backup attributes of the data model include any of the fields in the associated field data to be restored, use the data model as the data model corresponding to the associated field data to be restored, and obtain the data recovery relationship corresponding to the data model from the backup attributes of the data model. The data recovery module is used to recover data based on the data model corresponding to the related field data to be recovered and the corresponding data recovery relationship.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 4.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data recovery method and device, equipment and storage medium

    CN111382198A

  • Data recovery method and device, electronic equipment and storage medium

    CN115586988A