CN109815233A - A kind of processing method and system of tables of data - Google Patents

A kind of processing method and system of tables of data Download PDF

Info

Publication number
CN109815233A
CN109815233A CN201811614112.0A CN201811614112A CN109815233A CN 109815233 A CN109815233 A CN 109815233A CN 201811614112 A CN201811614112 A CN 201811614112A CN 109815233 A CN109815233 A CN 109815233A
Authority
CN
China
Prior art keywords
data
target matrix
message
backup
tables
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.)
Pending
Application number
CN201811614112.0A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201811614112.0A priority Critical patent/CN109815233A/en
Publication of CN109815233A publication Critical patent/CN109815233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a kind of processing method and system of tables of data, are related to database technical field, wherein the described method includes: server monitoring target matrix;The server sends backup units of the first message into operation system when determining that the first specified variation occurs for the target matrix, and the backup units carry out backup operation to the target matrix according to the first message;The server sends recovery unit of the second message into the operation system when determining that the second specified variation occurs for the target matrix, and the recovery unit carries out recovery operation to the target matrix according to the second message.The embodiment of the present invention realizes the function of backing up in realtime of target matrix, and, accidentally delete the timely recovery function when data in target matrix.

Description

A kind of processing method and system of tables of data
Technical field
The present invention relates to database technical fields, more particularly to a kind of processing method and system of tables of data.
Background technique
Database be store in a certain way together, can with multiple user sharings, have redundancy as small as possible, with Application program data acquisition system independent of each other.It include one or more tables of data in database, each tables of data is for storing tool The data of body, and the modification received to data operates, such as newly-increased, deletion, inquiry.
Currently, either developer or database administrator, may accidentally delete the data in database.Due to data Library, which is difficult the data accomplished to back up in realtime, therefore accidentally deleted, to lead to not the data for restoring accidentally to delete without backup file.
Summary of the invention
The present invention provides a kind of processing method and system of tables of data, with solve existing database do not accomplish in real time it is standby Part, the problem of data can not be restored in time in the case where accidentally deleting data.
To solve the above-mentioned problems, the present invention provides a kind of processing methods of tables of data, comprising: server monitoring target Tables of data;The server sends first message to business system when determining that the first specified variation occurs for the target matrix Backup units in system, the backup units carry out backup operation to the target matrix according to the first message;It is described It is extensive into the operation system to send second message when determining that the second specified variation occurs for the target matrix for server Multiple unit, the recovery unit carry out recovery operation to the target matrix according to the second message.
Optionally, the server monitoring target matrix, comprising: the server is based on preset interface and monitors institute in real time The journal file of target matrix is stated, and/or, the journal file is monitored according to predetermined period.
Optionally, the first specified variation occurs for the determination target matrix, comprising: the server is being based on institute It states preset interface and monitors the journal file in real time, and monitoring is obtained for newly-increased, modification and deleted in the journal file In any one operation first identifier information in the case where, determine that the target matrix occurs described first and specified becomes Change.
Optionally, the first message is carried for the described of any one operation in the newly-increased, modification and deletion First identifier information;The backup units carry out backup operation to the target matrix according to the first message, comprising: institute Backup units are stated according to the first identifier information in the first message to occurring described first in the target matrix The data of specified variation carry out backup operation.
Optionally, the backup units carry out backup operation to the target matrix according to the first message, comprising: When there is the first identifier information for the delete operation in the journal file, the backup units are according to The first identifier information of the delete operation is directed in first message, creation is for the corresponding data of the delete operation Marker, and retain data corresponding with the delete operation in the Backup Data table of the target matrix.
Optionally, the second specified variation occurs for the determination target matrix, comprising: the server is according to institute When stating the predetermined period monitoring journal file, what acquisition monitoring in the journal file obtained is directed to pre-set business operation Operating result;The server judges whether the operating result meets pre-set business condition;The server is in the operation When being as a result unsatisfactory for the pre-set business condition, determine that the described second specified variation occurs for the target matrix.
Optionally, the second message carries the operating result operated for the pre-set business and is unsatisfactory for the default industry The second identifier information of business condition;The recovery unit carries out recovery behaviour to the target matrix according to the second message Make, comprising: the recovery unit is according to the second identifier information in the second message, to sending out in the target matrix The data of raw described second specified variation carry out recovery operation.
Optionally, the recovery unit is according to the second identifier information in the second message, to the number of targets Recovery operation is carried out according to the data that the described second specified variation occurs in table, comprising: the recovery unit is according to second mark The index information for knowing the data of the specified variation of the generation described second carried in information, from the backup of the target matrix Search obtains Backup Data corresponding with the data that the described second specified variation occurs in tables of data;The recovery unit exists In the target matrix, the Backup Data is covered into the data that the described second specified variation occurs, or according to described Backup Data newdata.
The embodiment of the invention also provides a kind of processing system of tables of data, including operation system and server, the industry Business system includes backup units and recovery unit, and the server includes: monitoring module, is used for monitoring objective tables of data;It is described Monitoring module is also used to when determining that the first specified variation occurs for the target matrix, sends first message to the backup Unit, the backup units are used to carry out backup operation to the target matrix according to the first message;The monitoring mould Block is also used to when determining that the second specified variation occurs for the target matrix, sends second message to the recovery unit, institute Recovery unit is stated for carrying out recovery operation to the target matrix according to the second message.
Optionally, the monitoring module, for monitoring the journal file of the target matrix in real time based on preset interface, And/or the journal file is monitored according to predetermined period.
Optionally, the monitoring module, for monitoring the journal file in real time based on the preset interface, and in institute State the case where monitoring in journal file obtains the first identifier information for any one operation in newly-increased, modification and deletion Under, determine that the described first specified variation occurs for the target matrix.
Optionally, the first message is carried for the described of any one operation in the newly-increased, modification and deletion First identifier information;The backup units are used for according to the first identifier information in the first message to the number of targets Backup operation is carried out according to the data that the described first specified variation occurs in table.
Optionally, described when there is the first identifier information for the delete operation in the journal file Backup units are also used to according to the first identifier information for being directed to the delete operation in the first message, and creation is directed to institute The marker of the corresponding data of delete operation is stated, and retains in the Backup Data table of the target matrix and is grasped with the deletion Make corresponding data.
Optionally, the monitoring module, comprising: module is obtained, for monitoring the log according to the predetermined period When file, the operating result for pre-set business operation that the monitoring in the journal file obtains is obtained;Judgment module is used for Judge whether the operating result meets pre-set business condition;Determining module, it is described pre- for being unsatisfactory in the operating result If when professional qualification, determining that the described second specified variation occurs for the target matrix.
Optionally, the second message carries the operating result operated for the pre-set business and is unsatisfactory for the default industry The second identifier information of business condition;The recovery unit is used for according to the second identifier information in the second message, right The data that the described second specified variation occurs in the target matrix carry out recovery operation.
Optionally, the recovery unit, comprising: search module, for according to the institute carried in the second identifier information The index information that the data of the described second specified variation occur is stated, searches for and obtains from the Backup Data table of the target matrix Backup Data corresponding with the data that the described second specified variation occurs;Recovery module, in the target matrix In, the Backup Data is covered into the data that the described second specified variation occurs, or according to the newly-built number of the Backup Data According to.
Compared with the background art, the present invention includes the following advantages:
Server is monitored target matrix, when determining that the first specified variation occurs for target matrix, sends the Backup units of one message into operation system, backup units carry out backup operation to target matrix according to first message;Clothes Business device sends recovery unit of the second message into operation system when determining that the second specified variation occurs for target matrix, extensive Multiple unit carries out recovery operation to target matrix according to second message.
The embodiment of the present invention can carry out target matrix when determining that the first specified variation occurs for target matrix standby Part operation, realizes the function of backing up in realtime of target matrix.Moreover, when determining that the second specified variation occurs for target matrix Recovery operation can be carried out to target matrix, realize the timely recovery function when data accidentally deleted in target matrix.
Detailed description of the invention
Fig. 1 is a kind of step flow chart of the processing method of tables of data in the embodiment of the present invention;
Fig. 2 is the step flow chart of the processing method of another tables of data in the embodiment of the present invention;
Fig. 3 is a kind of design schematic diagram of data backup/restoration methods in the embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of the processing system of tables of data in the embodiment of the present invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
A kind of processing method of tables of data provided by the invention is discussed in detail below by several specific embodiments are enumerated And system.
Tables of data in the embodiment of the present invention can be the tables of data in arbitrary data library, also, real executing the present invention Before the processing method for applying the tables of data in example, need to be pre-created the backup database and Backup Data of tables of data to be processed Table, data structure of database belonging to backup database and tables of data to be processed etc. is consistent, Backup Data table with it is to be processed The data structure of tables of data etc. it is consistent, the embodiment of the present invention is to number belonging to tables of data to be processed, tables of data to be processed It is not specifically limited according to library, the title of backup database and Backup Data table, structure, storage location etc..
Referring to Fig.1, a kind of step flow chart of the processing method of tables of data in the embodiment of the present invention is shown.
Step 101, server monitoring target matrix.
In the embodiment of the present invention, the operation of monitoring objective tables of data can be executed by server, which can be special Door is used for the server of policer operation, or stores the server etc. of target matrix, the embodiment of the present invention is to server Type, configuration, operating system etc. be not specifically limited.The purpose of server monitoring target matrix is to determine target data Whether table changes, and specifically, whether the data in server monitoring target matrix change.Server monitoring target Tables of data can be divided into real time monitoring target matrix and regular monitoring target matrix two ways.Wherein, it monitors in real time The mode of target matrix can be mainly subsequent back up in realtime operation service to target matrix.Regular monitoring number of targets Mode according to table can be mainly subsequent to the timely recovery operation service of target matrix progress.Service in the embodiment of the present invention The operating process of real time monitoring target matrix can be individually performed during specifically executing monitoring objective tables of data in device, The operating process of regular monitoring target matrix can also be individually performed, can also both execute the behaviour of real time monitoring target matrix Make process, and execute the operating process of regular monitoring target matrix, that is, monitor the operating process of target matrix in real time and determines The operating process of phase monitoring objective tables of data can execute parallel, prison of the embodiment of the present invention to server monitoring target matrix Prosecutor formula and used monitoring technology means etc. are not specifically limited.
Step 102, server sends first message to business system when determining that the first specified variation occurs for target matrix Backup units in system, backup units carry out backup operation to target matrix according to first message.
The first specified variation in the embodiment of the present invention may be considered the change of target matrix under normal operation Change, the variation as executed target matrix caused by modification operation for target matrix.Determining target matrix When the first specified variation, the backup units of first message to operation system are generated and sent, which may include target The relevant information for the data that first specifies variation occurs in tables of data, the temporal information of variation is specified in generation first, first specifies Change the identification information etc. of corresponding operation, wherein the relevant information that the data of the first specified variation occur includes but is not limited to: Data Position, data type, data content are (in the data after data content and the first specified variation before the first specified variation Hold) etc., the embodiment of the present invention is to the relevant information of the data of the specified variation of generation first and content, format of first message etc. It is not specifically limited.
In the embodiment of the present invention, operation system may be considered the reality communicated with database belonging to target matrix Border application system, can store in the database belonging to target matrix in the operation system using data, can also deposit Storage is in target matrix.At least may include backup units and recovery unit in operation system, wherein backup units for pair Target matrix carries out backup operation, and recovery unit is used to carry out recovery operation to target matrix.
Step 103, server sends second message to business system when determining that the second specified variation occurs for target matrix Recovery unit in system, recovery unit carry out recovery operation to target matrix according to second message.
The second specified variation in the embodiment of the present invention may be considered change of the target matrix under abnormal operating condition Change, the variation of target matrix caused by operation is accidentally deleted as executed for target matrix.Determining target matrix When the second specified variation, the recovery unit of second message to operation system is generated and sent, which may include target The relevant information for the data that second specifies variation occurs in tables of data, the temporal information of variation is specified in generation second, second specifies Change the identification information etc. of corresponding operation, wherein the relevant information that the data of the second specified variation occur includes but is not limited to: Data Position, data type, data content are (in the data after data content and the second specified variation before the second specified variation Hold) etc., the embodiment of the present invention is to the relevant information of the data of the specified variation of generation second and content, format of second message etc. It is not specifically limited.
In conclusion the technical solution in the embodiment of the present invention, server are monitored target matrix, mesh is being determined When marking tables of data the first specified variation occurs, backup units of the first message into operation system are sent, backup units are according to the One message carries out backup operation to target matrix;Server is sent when determining that the second specified variation occurs for target matrix Recovery unit of the second message into operation system, recovery unit carry out recovery operation to target matrix according to second message.
The embodiment of the present invention can be to target matrix when server determines that the first specified variation occurs for target matrix Backup operation is carried out, the function of backing up in realtime of target matrix is realized.Moreover, server is determining that target matrix occurs the When two specified variations recovery operation can be carried out to target matrix, it is timely when realizing the data accidentally deleted in target matrix Restore function.
Referring to Fig. 2, the step flow chart of the processing method of another tables of data in the embodiment of the present invention is shown.
Step 201, the backup database and Backup Data table of target matrix are created.
It, can developer by operation system or database administrator manual creation number of targets in the embodiment of the present invention It, can also be by the creation module in operation system according to target data tableau format according to the backup database and Backup Data table of table Equal attribute informations creation backup database and Backup Data table, wound of the embodiment of the present invention to backup database and Backup Data table The mode of building is not specifically limited.
Creating the backup database finished can have data knot identical with target database belonging to target matrix Structure, target database are the storage container of target matrix, and target matrix is stored in target database.Creation finishes standby Part tables of data can have data structure identical with target matrix, backup text of the Backup Data table as target matrix Part, Backup Data table are also used to restore target matrix.Backup of the backup database as database belonging to target matrix File, backup database are the storage container of Backup Data table, and Backup Data table is stored in backup database, backup database It is also used to restore database belonging to target matrix.
The embodiment of the present invention can be in any accessible storage location creation backup database and Backup Data table, such as Backup database and Backup Data table can be created in the server, and target matrix and target database can be with Backup Datas Table and backup database are stored in server, and target matrix and target database can be with Backup Data tables and backup number Different storage locations is stored according to library, the embodiment of the present invention is to target matrix and target database and backup database It is not specifically limited with the storage location of Backup Data table etc..
Step 202, monitoring objective tables of data.
For example, target matrix can be monitored by the server of storage target matrix, it can also be by it The equipment such as the server of his not stored target matrix are monitored target matrix, and monitoring objective tables of data may include two Kind mode:
Mode one, real time monitoring target matrix.
The journal file of target matrix can be monitored in this mode one in real time based on preset interface.For example, calling Mysql-IO interface reads the journal files such as the binlog of target matrix.Wherein, binlog is the log text of binary format Part, for record the structured query language that target matrix is updated (Structured Query Language, SQL) information.In general, binlog does not support to need to call special purpose interface (such as using the order reading for checking text tool Mysql-IO interface) it reads.It, can be according to position (as defined starting position when calling mysql-IO interface to read binlog And end position) or according to the log content in time (as defined starting and end time) reading binlog.
Mode two, regular monitoring target matrix.
It can be according to the journal file of predetermined period monitoring objective tables of data in this mode two.For example, can be according to timing Task reads the journal files such as the binlog of target matrix.Wherein, which can be the timed task being pre-created, The timed task can create in target database, which can also create in operation system, and the present invention is implemented Example is not specifically limited the creation position etc. of timed task.It can be preset in timed task and read the specific of binlog In the log content of position (such as starting position and end position), the log of specific time (such as starting and end time) Hold, and, read the tasks such as log content, the interval time of log content of above-mentioned specific time of above-mentioned specific location ginseng Number, the embodiment of the present invention are not specifically limited the type of the task parameters in timed task and content etc..
Step 203, when determining that the first specified variation occurs for target matrix, first message is sent into operation system Backup units, backup units carry out backup operation to target matrix according to first message.
In the embodiment of the present invention, one determine that the first specified variation, i.e. server occur for target matrix through the above way By monitoring target matrix in real time, determine that the first specified variation occurs for target matrix.Specifically, real based on preset interface When monitoring objective tables of data journal file, and in journal file monitoring obtain for newly-increased, modification and delete in it is any In the case where the first identifier information of one operation, determine that the first specified variation occurs for target matrix.It is also understood that mesh Marking tables of data the first specified variation occurs is to execute newly-increased operation for target matrix, modify appointing in operation and delete operation It anticipates one and operates, moreover, any one operation in above-mentioned newly-increased operation, modification operation and delete operation may be considered just Normal business operation.
Server can be generated when determining that the first specified variation occurs for target matrix and send first message to first Message queue, and the backup units via first message queue transmission first message into operation system.The first message queue It can store a certain amount of first message, moreover, the first message in first message queue is transmitted according to the principle of first in, first out Backup units into operation system.It is may include in the first message of generation for newly-increased operation, modification operation and deletes behaviour The first identifier information of any one operation in work, is grasped moreover, may include in first identifier information with newly-increased operation, modification Make and delete operation in any one operate the relevant informations of corresponding data, such as the type of the positions of data, data.Example Such as, due to newly-increased operation the first specified variation occurs for target matrix, then generates the first identifier information comprising newly-increased operation First message.First identifier information can be with character string etc., and the embodiment of the present invention is to the content of first identifier information and type etc. It is not specifically limited.
After backup units in operation system receive first message, according to the first identifier information pair in first message The data that the first specified variation occurs in target matrix carry out backup operation.Specifically, backup units can disappear according to first First identifier information in breath determines newly-increased content, position, the type of data etc., then in the Backup Data of target matrix Also the data of identical content, position and type etc. are increased in table newly, i.e., by the data backup increased newly in target matrix to backing up number According in table.
In one preferred embodiment of the invention, if the first identifier information in first message is to hold to target matrix The first identifier information of row delete operation, then backup units are directed to the first identifier information of delete operation in Backup Data according to this Creation is directed to the marker of the corresponding data of delete operation in table, and retains and delete in the Backup Data table of target matrix Operate corresponding data.For example, the first specified variation that target matrix occurs is deleted to execute to the data A in target matrix Except operation, i.e., data A is deleted from target matrix, then backup units are the Backup Data A' of data A in Backup Data table Marker is created, and retains Backup Data A' in Backup Data table.
Step 204, when determining that the second specified variation occurs for target matrix, second message is sent into operation system Recovery unit, recovery unit carry out recovery operation to target matrix according to second message.
In the embodiment of the present invention, two determine that the second specified variation, i.e. server occur for target matrix through the above way By regular monitoring target matrix, determine that the second specified variation occurs for target matrix.Specifically, it is supervised according to predetermined period When controlling journal file, the operating result for pre-set business operation that the monitoring in journal file obtains is obtained, and judge to operate As a result whether meet pre-set business condition, if operating result is unsatisfactory for pre-set business condition, it is determined that target matrix occurs the Two specified variations.It is also understood that target matrix occur the second specified variation performed for target matrix it is default Business operation, but the operating result of pre-set business operation does not meet expected results that (quantity of such as operating result is beyond default Value range, operating result unit be not defined unit etc., specifically can be according to the operation rules of actual business operation Or depending on business norms), at this point, determining that above-mentioned pre-set business operation belongs to abnormal traffic operation.
For example, executing newly-increased operation for target matrix, but the data bulk after newly-increased operation in target matrix is anti- And reduce, indicate that the operating result of newly-increased operation is unsatisfactory for increased number of professional qualification, newly-increased operation at this time can consider Belong to abnormal traffic operation.In another example in target matrix student's total number of persons and each class number of student for including into Row statistical operation indicates the operating result of statistical operation if the sum of the number of student that student's total number of persons and each class include differs It is unsatisfactory for the equal professional qualification of number, then the statistical operation is it is also assumed that belong to abnormal traffic operation.
Server can be generated when determining that the second specified variation occurs for target matrix and send second message to second Message queue, and the recovery unit via second message queue transmission second message into operation system.
The second message queue can store a certain amount of second message, moreover, the second message in second message queue The recovery unit being transmitted to according to the principle of first in, first out in operation system.It is may include in the second message of generation for default The operating result of business operation is unsatisfactory for the second identifier information of pre-set business condition, moreover, can wrap in second identifier information Containing the relevant information for operating corresponding data with pre-set business, such as the type of the positions of data, data, alternatively, second message The index information etc. that the data of the second specified variation occur can be carried.
For example, due to missing delete operation the second specified variation occurs for target matrix, then generate comprising missing delete operation Second identifier information second message.Wherein, accidentally the confirmation work of delete operation can be by manually performing, can also be by making by oneself The mistake of justice is deleted logic and is completed.Second identifier information can be character string etc., and the embodiment of the present invention is in second identifier information Appearance and type etc. are not specifically limited.
After recovery unit in operation system receives second message, according to the second identifier information pair in second message The data that the second specified variation occurs in target matrix carry out recovery operation.
Specific recovery operation can be divided into following two: the first, complete restore.I.e. recovery unit can be according to Second identifier information in two message determines content, position, the type of data etc. being abnormal, then in target matrix Backup Data table reads out the data being abnormal in target matrix, by where the data read out row, column or item it is whole Body restores to target matrix.
Second, part is restored.I.e. recovery unit can be missed according to the determination of the second identifier information in second message Then content, position, type of the data of delete operation etc. read out in the Backup Data table of target matrix and accidentally delete number According to by the data self-recovery read out to target matrix.
No matter above-mentioned the first recovery operation or second recovery operation are directed to, and recovery unit can be according to the second mark Know the index information that the data of the second specified variation occur in information, from the Backup Data table of target matrix search obtain with The corresponding Backup Data of data that the second specified variation occurs, then occurs second for Backup Data covering in target matrix Specify the data of variation or according to Backup Data newdata.For example, including the accidentally data B1's of deletion in second identifier information Index information s1, recovery unit are searched in Backup Data table according to index information s1 and obtain Backup Data corresponding with data B1 B1 ' the Backup Data of data B1 (Backup Data B1 ' be), then in target matrix data B1 position, according to backup number According to B1 ' newdata, type, unit, structure and content of newly-built data etc. are identical as data B1 and Backup Data B1 '.
Based on a kind of related description of the above-mentioned processing method about tables of data, a kind of data backup/recovery is described below Method, as shown in figure 3, it is related to database, real time monitoring interface, timed task, message queue and operation system in this method, Wherein, operation system may include data backup subsystem and data recovery subsystem.In the implementation procedure of this method, pass through Real time monitoring interface monitors the data in database in real time, it is also possible to by timed task in database Data carry out regular monitoring.When normal variation occurs for the data in real time monitoring discovery database, sent to message queue logical Know message, notification message is transmitted to data backup subsystem by message queue, and data backup subsystem is according to notification message logarithm Backup operation is carried out according to the data that normal variation occurs in library.When the data in regular monitoring discovery database are abnormal variation When, it sends a notification message to message queue, notification message is transmitted to data recovery subsystem by message queue, and data restore subsystem System carries out recovery operation to the data for being abnormal variation in database according to notification message.
In conclusion the technical solution in the embodiment of the present invention, server are monitored target matrix, mesh is being determined When marking tables of data the first specified variation occurs, backup units of the first message into operation system are sent, backup units are according to the One message carries out backup operation to target matrix;Server is sent when determining that the second specified variation occurs for target matrix Recovery unit of the second message into operation system, recovery unit carry out recovery operation to target matrix according to second message.
The embodiment of the present invention can carry out target matrix when determining that the first specified variation occurs for target matrix standby Part operation, realizes the function of backing up in realtime of target matrix.Compared to it is existing to target matrix carry out schedule backup or For person manually backs up, in the case where the first specified variation occurs for target matrix, target matrix is carried out in real time Backup, can be according to the Backup Data table backed up in realtime to target matrix when target matrix is abnormal Timely recovery operation is carried out, is provided safeguard for the recovery operation of target matrix, and is avoided because not carried out to target matrix Back up in realtime and caused by loss of data the problem of.
Moreover, server can restore target matrix when determining that the second specified variation occurs for target matrix Operation, realizes the timely recovery function when data accidentally deleted in target matrix.Meanwhile with existing by manually to mesh Marking tables of data, to carry out recovery operation different, and the embodiment of the present invention, can be with when determining that the second specified variation occurs for target matrix Restore target matrix automatically according to Backup Data table by the recovery unit in operation system, guarantees Backup Data table externally not In visible situation, avoid manually to the operation error of Backup Data table and caused by loss of data or damage the case where.
The embodiment of the present invention passes through transmission when the first specified variation and/or the second specified variation occur for target matrix Corresponding first message and/or second message are realized logical with message to operation system with carrying out backup and/or recovery operation The form known is by the situation of change informing business system of target matrix.
The embodiment of the present invention can be backed up and be restored to target matrix by operation system, and operation system is improved Flexibility and independence of the developer to database manipulation.
Referring to Fig. 4, a kind of structural schematic diagram of the processing system of tables of data in the embodiment of the present invention is shown, which can To include server and operation system, server includes monitoring module 401, and operation system includes backup units 402 and restores single Member 403.
Monitoring module 401 is used for monitoring objective tables of data.
The monitoring module 401 is also used to send first when determining that the first specified variation occurs for the target matrix To the backup units 402, the backup units 402 are used to carry out the target matrix according to the first message message Backup operation.
The monitoring module 401 is also used to send second when determining that the second specified variation occurs for the target matrix To the recovery unit 403, the recovery unit 403 is used to carry out the target matrix according to the second message message Recovery operation.
In a preferred embodiment of the present invention, the monitoring module 401, for based on described in preset interface real time monitoring The journal file of target matrix, and/or, the journal file is monitored according to predetermined period.
In a preferred embodiment of the present invention, the monitoring module 401, for being supervised in real time based on the preset interface The journal file is controlled, and monitoring is obtained for any one operation in newly-increased, modification and deletion in the journal file First identifier information in the case where, determine that the described first specified variation occurs for the target matrix.
In a preferred embodiment of the present invention, the monitoring module 401, for sending the first message to first Message queue, and the first message is transmitted to the backup units 402 via the first message queue.
In a preferred embodiment of the present invention, the first message includes in the newly-increased, modification and deletion The first identifier information of any one operation;The backup units 402 are used for according to described the in the first message One identification information carries out backup operation to the data that the described first specified variation occurs in the target matrix.
In a preferred embodiment of the present invention, there is described for the delete operation in the journal file When one identification information, the backup units 402 are also used to according to being directed to described the of the delete operation in the first message The creation of one identification information is directed to the marker of the corresponding data of the delete operation, and in the Backup Data of the target matrix Retain data corresponding with the delete operation in table.
In a preferred embodiment of the present invention, the monitoring module 401, comprising: obtain module 4011, for according to When the predetermined period monitors the journal file, obtains the pre-set business that is directed to that the monitoring in the journal file obtains and operate Operating result;Judgment module 4012, for judging whether the operating result meets pre-set business condition;Determining module 4013, for when the operating result is unsatisfactory for the pre-set business condition, determining that the target matrix occurs described the Two specified variations.
In a preferred embodiment of the present invention, the monitoring module 401 disappears for sending the second message to second Queue is ceased, and transmits the second message to the recovery unit 403 via the second message queue.
In a preferred embodiment of the present invention, the second message includes the operation knot for pre-set business operation Fruit is unsatisfactory for the second identifier information of the pre-set business condition;The recovery unit 403 is used for according in the second message The second identifier information, recovery operation is carried out to the data that the described second specified variation occurs in the target matrix.
In a preferred embodiment of the present invention, the recovery unit 403, comprising: search module 4031, for according to institute The index information for stating the data of the specified variation of the generation described second carried in second identifier information, from the target data Search obtains Backup Data corresponding with the data that the described second specified variation occurs in the Backup Data table of table;Restore mould Block 4032, in the target matrix, the Backup Data to be covered the number that the described second specified variation occurs According to, or according to the Backup Data newdata.
For system embodiments, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It is provided for the embodiments of the invention a kind of processing method and system of tables of data above, is described in detail, Used herein a specific example illustrates the principle and implementation of the invention, and the explanation of above embodiments is only used In facilitating the understanding of the method and its core concept of the invention;At the same time, for those skilled in the art, according to the present invention Thought, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as Limitation of the present invention.

Claims (16)

1. a kind of processing method of tables of data characterized by comprising
Server monitoring target matrix;
The server sends first message into operation system when determining that the first specified variation occurs for the target matrix Backup units, the backup units according to the first message to the target matrix carry out backup operation;
The server sends second message to the business system when determining that the second specified variation occurs for the target matrix Recovery unit in system, the recovery unit carry out recovery operation to the target matrix according to the second message.
2. the processing method of tables of data according to claim 1, which is characterized in that the server monitoring target data Table, comprising:
The server monitors the journal file of the target matrix in real time based on preset interface, and/or, according to predetermined period Monitor the journal file.
3. the processing method of tables of data according to claim 2, which is characterized in that the determination target matrix hair Raw first specified variation, comprising:
The server is monitoring the journal file in real time based on the preset interface, and monitors in the journal file In the case where the first identifier information for any one operation in newly-increased, modification and deletion, the target data is determined Described first specified variation occurs for table.
4. the processing method of tables of data according to claim 3, which is characterized in that the first message is carried for described The first identifier information of any one operation in newly-increased, modification and deletion;
The backup units carry out backup operation to the target matrix according to the first message, comprising:
The backup units are according to the first identifier information in the first message to institute occurs in the target matrix The data for stating the first specified variation carry out backup operation.
5. the processing method of tables of data according to claim 1 or 4, which is characterized in that the backup units are according to First message carries out backup operation to the target matrix, comprising:
In the journal file exist for the delete operation the first identifier information when, the backup units according to The first identifier information of the delete operation is directed in the first message, creation is directed to the corresponding number of the delete operation According to marker, and retain corresponding with delete operation data in the Backup Data table of the target matrix.
6. the processing method of tables of data according to claim 2, which is characterized in that the determination target matrix hair Raw second specified variation, comprising:
When monitoring the journal file according to the predetermined period, acquisition monitors the server in the journal file The operating result for pre-set business operation arrived;
The server judges whether the operating result meets pre-set business condition;
The server determines that institute occurs for the target matrix when the operating result is unsatisfactory for the pre-set business condition State the second specified variation.
7. the processing method of tables of data according to claim 6, which is characterized in that the second message is carried for described The operating result of pre-set business operation is unsatisfactory for the second identifier information of the pre-set business condition;
The recovery unit carries out recovery operation to the target matrix according to the second message, comprising:
The recovery unit is according to the second identifier information in the second message, to institute occurs in the target matrix The data for stating the second specified variation carry out recovery operation.
8. the processing method of tables of data according to claim 7, which is characterized in that the recovery unit is according to described second The second identifier information in message restores the data that the described second specified variation occurs in the target matrix Operation, comprising:
The recovery unit is according to the specified data changed of the generation described second carried in the second identifier information Index information, search obtains and the number that the described second specified variation occurs from the Backup Data table of the target matrix According to corresponding Backup Data;
The recovery unit is in the target matrix, by the specified variation of the Backup Data covering generation described second Data, or according to the Backup Data newdata.
9. a kind of processing system of tables of data, which is characterized in that including operation system and server, the operation system includes standby Part unit and recovery unit, the server include:
Monitoring module is used for monitoring objective tables of data;
The monitoring module is also used to send first message extremely when determining that the first specified variation occurs for the target matrix The backup units, the backup units are used to carry out backup operation to the target matrix according to the first message;
The monitoring module is also used to send second message extremely when determining that the second specified variation occurs for the target matrix The recovery unit, the recovery unit are used to carry out recovery operation to the target matrix according to the second message.
10. the processing system of tables of data according to claim 9, which is characterized in that the monitoring module, for based on pre- If interface monitors the journal file of the target matrix in real time, and/or, the journal file is monitored according to predetermined period.
11. the processing system of tables of data according to claim 10, which is characterized in that the monitoring module, in base Monitor the journal file in real time in the preset interface, and in the journal file monitoring obtain for newly-increased, modification and In the case where the first identifier information of any one operation in deletion, it is specified to determine that the target matrix occurs described first Variation.
12. the processing system of tables of data according to claim 11, which is characterized in that the first message, which carries, is directed to institute The first identifier information of any one operation in stating newly-increased, modification and deleting;
The backup units are used for according to the first identifier information in the first message to sending out in the target matrix The data of raw described first specified variation carry out backup operation.
13. the processing system of the tables of data according to claim 9 or 12, which is characterized in that deposited in the journal file When being directed to the first identifier information of the delete operation, the backup units are also used to according to needle in the first message To the first identifier information of the delete operation, creation is directed to the marker of the corresponding data of the delete operation, and Retain data corresponding with the delete operation in the Backup Data table of the target matrix.
14. the processing system of tables of data according to claim 10, which is characterized in that the monitoring module, comprising:
Module is obtained, for when monitoring the journal file according to the predetermined period, acquisition to be supervised in the journal file Control the obtained operating result for pre-set business operation;
Judgment module, for judging whether the operating result meets pre-set business condition;
Determining module, for when the operating result is unsatisfactory for the pre-set business condition, determining the target matrix hair Raw described second specified variation.
15. the processing system of tables of data according to claim 14, which is characterized in that the second message, which carries, is directed to institute The operating result for stating pre-set business operation is unsatisfactory for the second identifier information of the pre-set business condition;
The recovery unit is used for according to the second identifier information in the second message, to sending out in the target matrix The data of raw described second specified variation carry out recovery operation.
16. the processing system of tables of data according to claim 15, which is characterized in that the recovery unit, comprising:
Search module, for according to the specified data changed of the generation described second carried in the second identifier information Index information, search obtains and the number that the described second specified variation occurs from the Backup Data table of the target matrix According to corresponding Backup Data;
Recovery module, for the Backup Data covering generation described second being specified and is become in the target matrix The data of change, or according to the Backup Data newdata.
CN201811614112.0A 2018-12-27 2018-12-27 A kind of processing method and system of tables of data Pending CN109815233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811614112.0A CN109815233A (en) 2018-12-27 2018-12-27 A kind of processing method and system of tables of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811614112.0A CN109815233A (en) 2018-12-27 2018-12-27 A kind of processing method and system of tables of data

Publications (1)

Publication Number Publication Date
CN109815233A true CN109815233A (en) 2019-05-28

Family

ID=66602544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811614112.0A Pending CN109815233A (en) 2018-12-27 2018-12-27 A kind of processing method and system of tables of data

Country Status (1)

Country Link
CN (1) CN109815233A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045868A (en) * 2019-12-13 2020-04-21 上海中通吉网络技术有限公司 Method and device for automatically recovering database data
CN112579344A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Data processing method, device and equipment
CN114816861A (en) * 2022-06-01 2022-07-29 深圳微言科技有限责任公司 Method and system for processing data table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140201161A1 (en) * 2013-01-11 2014-07-17 Commvault Systems, Inc. Table level database restore in a data storage system
CN105320576A (en) * 2014-05-30 2016-02-10 中国电信股份有限公司 Device and method for database backup
CN107544867A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 The restoration methods of intelligent network business, apparatus and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140201161A1 (en) * 2013-01-11 2014-07-17 Commvault Systems, Inc. Table level database restore in a data storage system
CN105320576A (en) * 2014-05-30 2016-02-10 中国电信股份有限公司 Device and method for database backup
CN107544867A (en) * 2016-06-29 2018-01-05 中兴通讯股份有限公司 The restoration methods of intelligent network business, apparatus and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579344A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Data processing method, device and equipment
CN111045868A (en) * 2019-12-13 2020-04-21 上海中通吉网络技术有限公司 Method and device for automatically recovering database data
CN111045868B (en) * 2019-12-13 2023-12-05 上海中通吉网络技术有限公司 Method and device for automatically recovering database data
CN114816861A (en) * 2022-06-01 2022-07-29 深圳微言科技有限责任公司 Method and system for processing data table
CN114816861B (en) * 2022-06-01 2024-02-02 深圳微言科技有限责任公司 Method and system for processing data table

Similar Documents

Publication Publication Date Title
US11082489B2 (en) Method and system for displaying similar email messages based on message contents
US10956364B2 (en) Efficient data synchronization for storage containers
EP3685268B1 (en) File system point-in-time restore using recycle bin and version history
CN104679772B (en) Method, apparatus, equipment and the system of file are deleted in Distributed Data Warehouse
JP4739786B2 (en) Data relocation method
US8595381B2 (en) Hierarchical file synchronization method, software and devices
US7328213B2 (en) Transaction processing method, transaction control apparatus and program thereof
KR101206556B1 (en) Ranking and prioritizing point in time snapshots
CN109815233A (en) A kind of processing method and system of tables of data
EP1814032A2 (en) Recovery for storage system
JP2004227359A (en) Operation management method for storage system based on policy
CN108156030B (en) Method and device for synchronizing configuration strategies
CN107426319B (en) Store controlled shared content item synchronous method, system and storage medium
CN111198923A (en) Data synchronization method and system based on message queue
US20160197959A1 (en) Assured federated records management
JP7322161B2 (en) Asynchronous storage management in distributed systems
CN106874343B (en) Data deletion method and system for time sequence database
GB2481930A (en) Information management device and information management program
CN107193688A (en) Data list structure amending method and device
US9847941B2 (en) Selectively suppress or throttle migration of data across WAN connections
US9977726B2 (en) System and method for smart framework for network backup software debugging
CN106407385B (en) Data management method, equipment and system
CN117931789B (en) Ordered processing method, system and computer equipment for data recovery task
CN116841983A (en) Data rollback method, device and computer readable storage medium
CN114328022A (en) Method and device for incremental backup of data assets

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528