A method, apparatus, device, and storage medium for table data lifecycle management

By setting public fields in table data management and creating corresponding data management tasks, the lack of table data life cycle management is solved, and data volume control and system performance are improved.

CN118885121BActive Publication Date: 2025-06-27CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411023119.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2025-06-27
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

There is currently a lack of effective table data lifecycle management methods, which leads to the continuous expansion of table data and affects system performance.

Method used

By setting public fields for the data table based on marking requirements, creating near-line archiving, offline archiving and destruction tasks, realizing the life cycle management of table data, including near-line archiving marking, offline archiving backup and data destruction.

Benefits of technology

Effectively manage the table data life cycle, avoid data bloat, provide data marking, backup, recycling bin management and thorough deletion functions, ensuring data security and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885121B_ABST
    Figure CN118885121B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, device and storage medium for table data life cycle management, relating to the technical field of data management. The method includes setting common fields for a data table based on tagging requirements, creating a data near-line archiving task, and performing near-line archiving and tagging processing on the table data; creating a data off-line archiving task according to the result of the near-line archiving and tagging processing, and performing off-line archiving and backup processing on the table data; creating a data destruction task according to the result of the off-line archiving and backup processing, and immediately deleting or putting into the recycle bin the table data that has been subjected to off-line archiving and backup; and performing restoration or complete deletion processing on the table data in the recycle bin based on the function settings of the recycle bin and the usage requirements of the table data. This application can effectively manage the life cycle of table data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data management, and particularly relates to a method, apparatus, device, and storage medium for managing the life cycle of table data. Background Art

[0002] In today's data economy era, major enterprises are all undergoing digital transformation, and the extraction, governance, and management of data play a crucial role in the digital transformation process. During the data governance process, a large number of data tables will be generated. With the continuous development of business, the amount of table data may become larger and larger, possibly reaching tens of millions or even hundreds of millions of data volumes. Therefore, the life cycle management of table data is particularly important.

[0003] However, there are few specific ways to manage the life cycle of table data in the current industry. Therefore, how to effectively manage the life cycle of table data has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for managing the life cycle of table data, which can effectively manage the life cycle of table data.

[0005] In a first aspect, an embodiment of this application provides a method for managing the life cycle of table data. The method for managing the life cycle of table data includes:

[0006] Setting common fields for a data table based on tagging requirements, and creating a data near-line archiving task to perform near-line archiving tagging processing on the table data;

[0007] According to the result of the near-line archiving tagging processing, creating a data off-line archiving task to perform off-line archiving backup processing on the table data;

[0008] According to the result of the off-line archiving backup processing, creating a data destruction task to immediately delete or put the table data that has been off-line archived and backed up into the recycle bin;

[0009] Based on the function settings of the recycle bin and the usage requirements of the table data, performing restoration or complete deletion processing on the table data in the recycle bin.

[0010] Combined with the first aspect, in an implementation manner,

[0011] The common fields include an archive_flag field and a delete_flag field;

[0012] The archive_flag field is an archiving identifier used to indicate whether the table data has been archived. When the value of the archive_flag field is 00, it means not archived; when the value of the archive_flag field is 01, it means archived.

[0013] The delete_flag field is a deletion identifier used to indicate whether the data has been marked for deletion. When the value of the delete_flag field is 00, it means not deleted; when the value of the delete_flag field is 01, it means deleted.

[0014] Combined with the first aspect, in an implementation, creating a data nearline archiving task to perform nearline archiving tagging on table data specifically includes:

[0015] Select the data table to be managed, create a data nearline archiving task, and set the archiving policy. The archiving policy includes retaining data for a set number of days and retaining a set number of data entries.

[0016] Configure the execution method of the data nearline archiving task. The execution methods of the data nearline archiving task include scheduled execution, periodic execution, and immediate execution.

[0017] According to the configured execution method of the data nearline archiving task, update the value of the archive_flag field of the table data in the selected data table that meets the archiving policy to 01 to achieve nearline archiving tagging of the table data.

[0018] Record the number of table data entries that have undergone nearline archiving tagging in each data table and provide visual display of page statistics.

[0019] Combined with the first aspect, in an implementation, creating a data offline archiving task to perform offline archiving backup on table data according to the nearline archiving tagging result specifically includes:

[0020] Select the data tables that have undergone nearline archiving tagging according to the nearline archiving tagging result.

[0021] Create a data offline archiving task and configure the execution method of the data offline archiving task. The execution methods of the data offline archiving task include scheduled execution, periodic execution, and immediate execution.

[0022] For the selected data tables, write the table data with the value of the archive_flag field being 01 in each data table into a csv file.

[0023] Compress the csv file into a zip file, upload the zip file to the file server for data backup to achieve offline archiving backup of the table data.

[0024] Record the number of table data entries that have been processed for offline archiving backup in each data table, and provide visual display of page statistics.

[0025] Combined with the first aspect, in one implementation, according to the offline archiving backup processing result, create a data destruction task to immediately delete or put into the recycle bin the table data that has been processed for offline archiving backup. Specifically, it includes:

[0026] According to the offline archiving backup processing result, obtain the data tables that have been processed for offline archiving backup;

[0027] Create a data destruction task and set a data destruction policy. The data destruction policy includes putting the data to be destroyed into the recycle bin and completely deleting the data to be destroyed;

[0028] Configure the execution method of the data destruction task. The execution methods of the data destruction task include scheduled execution, periodic execution, and immediate execution;

[0029] According to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put into the recycle bin the table data in the obtained data tables to implement the destruction processing of the table data;

[0030] Record the number of table data entries that have been destroyed in each data table, and provide visual display of page statistics.

[0031] Combined with the first aspect, in one implementation, according to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put into the recycle bin the table data in the obtained data tables to implement the destruction processing of the table data. Specifically, it includes:

[0032] When the set data destruction policy is to put the data to be destroyed into the recycle bin, then according to the configured execution method of the data destruction task, set the value of the delete_flag field of the table data with the value of the archive_flag field being 01 in the obtained data tables to 01, and put the table data with the field values set into the recycle bin to implement the destruction processing of the table data;

[0033] When the set data destruction policy is to completely delete the data to be destroyed, then according to the configured execution method of the data destruction task, completely delete the table data with the value of the archive_flag field being 01 in the obtained data tables to implement the destruction processing of the table data.

[0034] Combined with the first aspect, in one implementation,

[0035] Only the data tables that meet the set conditions are displayed in the recycle bin. Among them, when the number of table data with the delete_flag field value of 01 in the data table is greater than 0, the current data table meets the set conditions;

[0036] The recycle bin provides a function to restore data and a function to completely delete data. The function to restore data is to set the delete_flag field value of the table data to 00, and the function to completely delete data is to completely delete the table data with the delete_flag field value of 01.

[0037] In a second aspect, an embodiment of the present application provides a table data life cycle management device, which includes:

[0038] A first processing module, which is used to set common fields for the data table based on the marking requirements, and create a data near-line archiving task to perform near-line archiving and marking processing on the table data;

[0039] A second processing module, which is used to create a data off-line archiving task based on the near-line archiving and marking processing results, and perform off-line archiving and backup processing on the table data;

[0040] A third processing module, which is used to create a data destruction task based on the off-line archiving and backup processing results, and perform immediate deletion or put into the recycle bin processing on the table data that has been off-line archived and backed up;

[0041] An execution module, which is used to perform restoration or complete deletion processing on the table data in the recycle bin based on the function settings of the recycle bin and the usage requirements of the table data.

[0042] In a third aspect, an embodiment of the present application provides a table data life cycle management device, which includes a processor, a memory, and a table data life cycle management program stored on the memory and executable by the processor. When the table data life cycle management program is executed by the processor, the steps of the above-mentioned table data life cycle management method are implemented.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a table data life cycle management program is stored. When the table data life cycle management program is executed by a processor, the steps of the above-mentioned table data life cycle management method are implemented.

[0044] The beneficial effects brought by the technical solutions provided by the embodiments of the present application include:

[0045] By managing the life cycle of table data in the data table, it is possible to avoid the continuous expansion of the data volume in the data table as the business develops, which affects the performance of the system. At the same time, this application also provides a full set of data tagging, data backup, data entering the recycle bin, data restoration, and data complete deletion functions, ensuring that the table data in the data table can be safely deleted and can also be imported back into the data table through the backup file after deletion. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a schematic flowchart of the method for managing the life cycle of table data in this application form;

[0047] Figure 2 is a schematic diagram of the functional modules of the device for managing the life cycle of table data in this application form;

[0048] Figure 3 is a schematic diagram of the hardware structure of the device for managing the life cycle of table data in this application form. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0050] To make the purpose, technical solution, and advantages of this application clearer, the embodiments of this application will be further described in detail below in conjunction with the accompanying drawings.

[0051] In a first aspect, the embodiments of this application provide a method for managing the life cycle of table data, so as to more efficiently, accurately, and reasonably manage the life cycle of table data.

[0052] In one embodiment, refer to Figure 1 , Figure 1 is a schematic flowchart of the method for managing the life cycle of table data in this application form. As Figure 1 shown, the method for managing the life cycle of table data includes:

[0053] S1: Set public fields for the data table based on tagging requirements, and create a data near-line archiving task to perform near-line archiving and tagging processing on the table data;

[0054] In this application, the common fields include the archive_flag field and the delete_flag field, which are business fields for the life cycle management of table data. Specifically, each piece of table data in the data table is set with an archive_flag field and a delete_flag field; the archive_flag field is an archiving identifier used to indicate whether the table data has been archived. When the value of the archive_flag field is 00, it means not archived, and when the value of the archive_flag field is 01, it means archived; the delete_flag field is a deletion identifier used to indicate whether the data has been marked for deletion. When the value of the delete_flag field is 00, it means not deleted, and when the value of the delete_flag field is 01, it means deleted.

[0055] The data near-line archiving task in this application mainly archives and marks the table data. The value of the archive_flag field of the table data that meets the archiving conditions will be set to 01, indicating that it has been archived.

[0056] Further, in an embodiment, a data near-line archiving task is created to perform near-line archiving and marking processing on the table data, specifically including:

[0057] S101: Select the data tables to be managed, create a data near-line archiving task, and set the archiving policy. The archiving policy includes retaining data for a set number of days and retaining a set number of data records;

[0058] The number of selected data tables to be managed can be freely defined as needed.

[0059] For the data retained for a set number of days and the data retained for a set number of records in the archiving policy, among them, for the data retained for a set number of days, for example, it can be the table data within 100 days, and for the data retained for a set number of records, for example, it can be the most recent 1 million pieces of table data.

[0060] S102: Configure the execution mode of the data near-line archiving task. The execution mode of the data near-line archiving task includes scheduled execution, periodic execution, and immediate execution;

[0061] Among them, scheduled execution is to start execution at a specified time point; periodic execution can be to execute at 24:00 every day; immediate execution is to execute once immediately after configuring the data near-line archiving task.

[0062] S103: According to the configured execution mode of the data near-line archiving task, update the value of the archive_flag field of the table data that meets the archiving policy in the selected data tables to 01, so as to implement the near-line archiving and marking processing of the table data;

[0063] S104: Record the number of table data entries that have undergone nearline archiving and tagging processing in each data table, and provide visual display of page statistics.

[0064] S2: Create a data offline archiving task based on the results of nearline archiving and tagging processing, and perform offline archiving and backup processing on the table data;

[0065] The main purpose of the data offline archiving task is to write the table data that has undergone nearline archiving and tagging (i.e., the table data with the archive_flag field value of 01) into a csv (Comma-Separated Values) file, compress the csv file to generate a zip (a file format for data compression and document storage) file, and upload the zip file to a file server such as minio (a high-performance and highly available file system service), ftp, etc. for backup.

[0066] Further, in one embodiment, creating a data offline archiving task based on the results of nearline archiving and tagging processing, and performing offline archiving and backup processing on the table data specifically includes:

[0067] S201: Select the data tables that have undergone nearline archiving and tagging processing based on the results of nearline archiving and tagging processing; for example, if a certain piece of table data in data table A has undergone nearline archiving and tagging processing, then data table A will be selected at this time;

[0068] S202: Create a data offline archiving task and configure the execution mode of the data offline archiving task. The execution modes of the data offline archiving task include scheduled execution, periodic execution, and immediate execution;

[0069] S203: For the selected data tables, write the table data with the value of the archive_flag field equal to 01 in each data table into a csv file;

[0070] S204: Compress the csv file into a zip file, upload the zip file to the file server for data backup, and implement offline archiving and backup processing of the table data;

[0071] S205: Record the number of table data entries that have undergone offline archiving and backup processing in each data table, and provide visual display of page statistics.

[0072] S3: Create a data destruction task based on the results of offline archiving and backup processing, and immediately delete or put the table data that has undergone offline archiving and backup into the recycle bin for processing;

[0073] The main purpose of the data destruction task is to destroy the table data after offline archiving and backup processing, mainly including putting the data into the recycle bin or directly deleting it. If the option is to put the data to be destroyed into the recycle bin, then it can be completely deleted or restored in the recycle bin.

[0074] Further, in one embodiment, according to the offline archiving and backup processing results, a data destruction task is created to immediately delete or put into the recycle bin the table data that has been subject to offline archiving and backup processing. Specifically, it includes:

[0075] S301: According to the offline archiving and backup processing results, obtain the data tables that have undergone offline archiving and backup processing; for example, if a certain piece of table data in data table A has undergone offline archiving and backup processing, then data table A will be obtained at this time;

[0076] S302: Create a data destruction task and set a data destruction policy, where the data destruction policy includes putting the data to be destroyed into the recycle bin and completely deleting the data to be destroyed;

[0077] S303: Configure the execution method of the data destruction task, where the execution method of the data destruction task includes scheduled execution, periodic execution, and immediate execution;

[0078] S304: According to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put into the recycle bin the table data in the obtained data tables to achieve the destruction processing of the table data;

[0079] S305: Record the number of table data that has undergone destruction processing in each data table and provide a visual display of page statistics.

[0080] Specifically, according to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put into the recycle bin the table data in the obtained data tables to achieve the destruction processing of the table data. Specifically, it includes:

[0081] When the set data destruction policy is to put the data to be destroyed into the recycle bin, then according to the configured execution method of the data destruction task, set the value of the delete_flag field of the table data with the value of the archive_flag field being 01 in the obtained data tables to 01, and put the table data after setting the field values into the recycle bin to achieve the destruction processing of the table data;

[0082] When the set data destruction policy is to completely delete the data to be destroyed, then according to the configured execution method of the data destruction task, completely delete the table data with the value of the archive_flag field being 01 in the obtained data tables to achieve the destruction processing of the table data.

[0083] S4: Based on the function settings of the recycle bin and the usage requirements of the table data, restore or completely delete the table data in the recycle bin.

[0084] Specifically, only the data tables that meet the set conditions are displayed in the recycle bin. Among them, when the number of table data with the delete_flag field value of 01 in the data table is greater than 0, the current data table meets the set conditions.

[0085] The recycle bin provides a function to restore data and a function to completely delete data. The function to restore data is to set the delete_flag field value of the table data to 00, and the function to completely delete data is to completely delete the table data with the delete_flag field value of 01.

[0086] In this application, by creating a data near-line archiving task, the table data in the data table is marked according to the archiving policy, and then an off-line archiving task is created according to the result of the near-line archiving marking process to back up the data in the data table. Then, a data destruction task is created according to the result of the off-line archiving backup process to put the data into the recycle bin or completely delete it. At the same time, recycle bin operations are performed to execute the operation of completely deleting data or restoring data, and this application also provides page statistics visualization.

[0087] The method for managing the life cycle of table data in the embodiments of this application can avoid the continuous expansion of the data volume of the data table with the development of the business, which affects the performance of the system. At the same time, this application also provides a full set of functions for data marking, data backup, data entering the recycle bin, data restoration, and data complete deletion, ensuring that the table data in the data table can be safely deleted and can also be imported back into the data table through the backup file after deletion.

[0088] In the second aspect, the embodiments of this application also provide a device for managing the life cycle of table data.

[0089] In one embodiment, refer to Figure 2 , Figure 2 is a schematic diagram of the function modules of the device for managing the life cycle of table data in this application. As Figure 2 shown, the device for managing the life cycle of table data includes: a first processing module, a second processing module, a third processing module, and an execution module.

[0090] The first processing module is used to set common fields for the data table based on tagging requirements, create a data nearline archiving task, and perform nearline archiving and tagging processing on the table data; the second processing module is used to create a data offline archiving task based on the nearline archiving and tagging processing results, and perform offline archiving and backup processing on the table data; the third processing module is used to create a data destruction task based on the offline archiving and backup processing results, and perform immediate deletion or put into the recycle bin processing on the table data that has been offline archived and backed up; the execution module is used to perform restoration or complete deletion processing on the table data in the recycle bin based on the function settings of the recycle bin and the usage requirements of the table data.

[0091] In this application, the common fields include the archive_flag field and the delete_flag field;

[0092] The archive_flag field is an archiving identifier, used to indicate whether the table data has been archived. When the value of the archive_flag field is 00, it means not archived; when the value of the archive_flag field is 01, it means archived;

[0093] The delete_flag field is a deletion identifier, used to indicate whether the data has been marked for deletion. When the value of the delete_flag field is 00, it means not deleted; when the value of the delete_flag field is 01, it means deleted.

[0094] In this application, creating a data nearline archiving task and performing nearline archiving and tagging processing on the table data specifically includes:

[0095] Select the data table to be managed, create a data nearline archiving task, and set the archiving policy, where the archiving policy includes retaining data for a set number of days and retaining a set number of data records;

[0096] Configure the execution mode of the data nearline archiving task, and the execution mode of the data nearline archiving task includes scheduled execution, periodic execution, and immediate execution;

[0097] According to the configured execution mode of the data nearline archiving task, update the value of the archive_flag field of the table data that meets the archiving policy in the selected data table to 01, so as to achieve nearline archiving and tagging processing of the table data;

[0098] Record the number of table data that has undergone nearline archiving and tagging processing in each data table, and provide page statistical visualization display.

[0099] In this application, creating a data offline archiving task and performing offline archiving and backup processing on the table data based on the nearline archiving and tagging processing results specifically includes:

[0100] Select the data tables that have undergone near-line archiving and labeling processing according to the near-line archiving and labeling processing results;

[0101] Create a data offline archiving task and configure the execution method of the data offline archiving task. The execution methods of the data offline archiving task include scheduled execution, periodic execution, and immediate execution;

[0102] For the selected data tables, write the table data with the value of the archive_flag field being 01 in each data table into a csv file;

[0103] Compress the csv file into a zip file and upload the zip file to the file server for data backup, realizing the offline archiving and backup processing of the table data;

[0104] Record the number of table data rows that have undergone offline archiving and backup processing in each data table and provide a visual display of page statistics.

[0105] In this application, according to the offline archiving and backup processing results, create a data destruction task to immediately delete or put the table data that has undergone offline archiving and backup into the recycle bin. Specifically, it includes:

[0106] Obtain the data tables that have undergone offline archiving and backup processing according to the offline archiving and backup processing results;

[0107] Create a data destruction task and set a data destruction policy. The data destruction policy includes putting the data to be destroyed into the recycle bin and completely deleting the data to be destroyed;

[0108] Configure the execution method of the data destruction task. The execution methods of the data destruction task include scheduled execution, periodic execution, and immediate execution;

[0109] According to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put the table data in the obtained data tables into the recycle bin to realize the destruction processing of the table data;

[0110] Record the number of table data rows that have undergone destruction processing in each data table and provide a visual display of page statistics.

[0111] In this application, according to the set data destruction policy and the configured execution method of the data destruction task, immediately delete or put the table data in the obtained data tables into the recycle bin to realize the destruction processing of the table data. Specifically, it includes:

[0112] When the set data destruction policy is to put the data to be destroyed into the recycle bin, according to the execution method of the configured data destruction task, the value of the delete_flag field of the table data with the value of the archive_flag field being 01 in the obtained data table is set to 01, and the table data after the field value is set is put into the recycle bin to implement the destruction process of the table data;

[0113] When the set data destruction policy is to completely delete the data to be destroyed, according to the execution method of the configured data destruction task, the table data with the value of the archive_flag field being 01 in the obtained data table is completely deleted to implement the destruction process of the table data.

[0114] In this application, only the data tables that meet the set conditions are displayed in the recycle bin. Among them, when the number of table data with the value of the delete_flag field being 01 in the data table is greater than 0, the current data table meets the set conditions;

[0115] The recycle bin provides a function to restore data and a function to completely delete data. The function to restore data is to set the value of the delete_flag field of the table data to 00, and the function to completely delete data is to completely delete the table data with the value of the delete_flag field being 01.

[0116] In a third aspect, an embodiment of this application provides a device for managing the life cycle of table data. The device for managing the life cycle of table data can be a device with data processing functions such as a personal computer (PC), a laptop computer, a server, etc.

[0117] Refer to Figure 3 , Figure 3 which is a schematic diagram of the hardware structure of the device for managing the life cycle of table data involved in the solution of the embodiment of this application. In the embodiment of this application, the device for managing the life cycle of table data may include a processor, a memory, a communication interface, and a communication bus.

[0118] Among them, the communication bus can be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0119] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., which are used to implement the interconnection of components inside the device for managing the life cycle of table data, and interfaces for implementing the interconnection of the device for managing the life cycle of table data with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display screen (Display), a keyboard (Keyboard), etc.

[0120] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0121] The processor can be a general-purpose processor, which can call the table data life cycle management program stored in the memory and execute the table data life cycle management method provided by the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). Among them, the method executed when the table data life cycle management program is called can refer to the various embodiments of the table data life cycle management method of this application, which will not be elaborated here.

[0122] Those skilled in the art can understand that Figure 3 the hardware structure shown in does not constitute a limitation to the present application, and may include more or fewer components than shown, or combine some components, or different component arrangements.

[0123] In a fourth aspect, the embodiments of the present application further provide a computer-readable storage medium.

[0124] The table data life cycle management program is stored on the computer-readable storage medium of the present application. When the table data life cycle management program is executed by a processor, the steps of the table data life cycle management method as described above are implemented.

[0125] Among them, the method implemented when the table data life cycle management program is executed can refer to the various embodiments of the table data life cycle management method of this application, which will not be elaborated here.

[0126] It should be noted that the serial numbers of the above embodiments of the present application are only for description and do not represent the superiority or inferiority of the embodiments.

[0127] In the description of the specification, claims and the above-mentioned drawings of this application, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices. The descriptions such as "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second" and "third" are different types.

[0128] In the description of the embodiments of this application, words such as "exemplary", "for example" or "for instance" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for instance" is intended to present relevant concepts in a specific manner.

[0129] In the description of the embodiments of this application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "a plurality of" means two or more than two.

[0130] In some processes described in the embodiments of this application, there are multiple operations or steps that appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of this application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device to execute the methods described in the various embodiments of this application.

[0132] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.

Claims

1. A table data lifecycle management method, characterized in that: The table data lifecycle management method includes: Set common fields for the data table based on the tagging requirements, create a data near-line archiving task, and perform near-line archiving tagging on the table data; Create a data offline archiving task based on the near-line archiving and marking processing results to perform offline archiving and backup processing on the table data; Create a data destruction task based on the offline archive backup processing results to immediately delete or put the table data that has been offline archived into the recycle bin; Based on the function settings of the recycle bin and the usage requirements of the table data, restore or completely delete the table data in the recycle bin; in, The common fields include an archive_flag field and a delete_flag field; The archive_flag field is an archive flag, which is used to indicate whether the table data has been archived. When the value of the archive_flag field is 00, it indicates that the table data has not been archived. When the value of the archive_flag field is 01, it indicates that the table data has been archived. The delete_flag field is a deletion flag, which is used to indicate whether the data has been marked for deletion. When the value of the delete_flag field is 00, it indicates that the data has not been deleted. When the value of the delete_flag field is 01, it indicates that the data has been deleted. The step of creating a near-line data archiving task and performing near-line archiving marking processing on the table data specifically includes: Select the data table to be managed, create a near-line data archiving task, and set an archiving strategy, which includes retaining data for a set number of days and retaining a set number of data items; Configure the execution mode of the data near-line archiving task, wherein the execution mode of the data near-line archiving task includes scheduled execution, periodic execution, and immediate execution; According to the execution mode of the configured data near-line archiving task, the value of the archive_flag field of the table data in the selected data table that complies with the archiving strategy is updated to 01 to implement near-line archiving marking processing for the table data; Record the number of table data items in each data table that have been processed for near-line archiving and labeling, and provide a page statistics visualization display.

2. A table data lifecycle management method as claimed in claim 1, characterized in that: The process of creating a data offline archiving task based on the near-line archiving marking processing result and performing offline archiving backup processing on the table data specifically includes: According to the near-line archiving and marking processing results, the data table that has undergone the near-line archiving and marking processing is selected; Create a data offline archiving task and configure the execution mode of the data offline archiving task. The execution mode of the data offline archiving task includes scheduled execution, periodic execution, and immediate execution. For the selected data tables, write the table data whose archive_flag field value is 01 in each data table into the csv file; Compress the csv file into a zip file, upload the zip file to the file server for data backup, and realize offline archiving and backup processing of table data; Record the number of table data items in each data table that have been processed for offline archive backup, and provide a page statistics visualization display.

3. A table data lifecycle management method as claimed in claim 1, characterized in that: The data destruction task is created according to the offline archive backup processing result, and the table data that has been offline archived and backed up is immediately deleted or put into the recycle bin for processing, which specifically includes: According to the offline archive backup processing result, the data table which has been processed by the offline archive backup is obtained; Create a data destruction task and set a data destruction strategy, which includes placing the data to be destroyed in a recycle bin and completely deleting the data to be destroyed; Configure the execution mode of the data destruction task, wherein the execution mode of the data destruction task includes scheduled execution, periodic execution, and immediate execution; According to the set data destruction strategy and the execution method of the configured data destruction task, the table data in the acquired data table is immediately deleted or put into the recycle bin to achieve the destruction of the table data; Record the number of table data entries that have been destroyed in each data table, and provide a page statistics visualization display.

4. A table data lifecycle management method as claimed in claim 3, characterized in that: According to the set data destruction strategy and the execution mode of the configured data destruction task, the table data in the acquired data table is immediately deleted or put into the recycle bin to achieve the destruction of the table data, which specifically includes: When the data destruction policy is set to put the data to be destroyed into the recycle bin, according to the execution mode of the configured data destruction task, the delete_flag field value of the table data whose archive_flag field value is 01 in the acquired data table is set to 01, and the table data after the field value is set is put into the recycle bin to realize the destruction of the table data; When the data destruction policy is set to completely delete the data to be destroyed, the table data whose value of the archive_flag field in the acquired data table is 01 is completely deleted according to the execution mode of the configured data destruction task, thereby realizing the destruction of the table data.

5. A table data lifecycle management method as claimed in claim 4, characterized in that: The recycle bin only displays data tables that meet the set conditions, wherein when the number of table data in the data table with a delete_flag field value of 01 is greater than 0, the current data table meets the set conditions; The recycle bin provides a data restoration function and a complete deletion function. The data restoration function is to set the delete_flag field value of the table data to 00, and the complete deletion function is to completely delete the table data with the delete_flag field value of 01.

6. A table data lifecycle management device, characterized in that: The table data lifecycle management device comprises: The first processing module is used to set common fields in the data table based on the marking requirements, create a data near-line archiving task, and perform near-line archiving marking processing on the table data; The second processing module is used to create a data offline archiving task according to the near-line archiving marking processing result, and perform offline archiving backup processing on the table data; The third processing module is used to create a data destruction task according to the offline archive backup processing result, and immediately delete or put the table data that has been offline archived into the recycle bin for processing; An execution module, which is used to restore or completely delete the table data in the recycle bin based on the function settings of the recycle bin and the usage requirements of the table data; in, The common fields include an archive_flag field and a delete_flag field; The archive_flag field is an archive flag, which is used to indicate whether the table data has been archived. When the value of the archive_flag field is 00, it indicates that the table data has not been archived. When the value of the archive_flag field is 01, it indicates that the table data has been archived. The delete_flag field is a deletion flag, which is used to indicate whether the data has been marked for deletion. When the value of the delete_flag field is 00, it indicates that the data has not been deleted. When the value of the delete_flag field is 01, it indicates that the data has been deleted. The step of creating a near-line data archiving task and performing near-line archiving marking processing on the table data specifically includes: Select the data table to be managed, create a near-line data archiving task, and set an archiving strategy, which includes retaining data for a set number of days and retaining a set number of data items; Configure the execution mode of the data near-line archiving task, wherein the execution mode of the data near-line archiving task includes scheduled execution, periodic execution, and immediate execution; According to the execution mode of the configured data near-line archiving task, the value of the archive_flag field of the table data in the selected data table that complies with the archiving strategy is updated to 01 to implement near-line archiving marking processing for the table data; Record the number of table data items in each data table that have been processed for near-line archiving and labeling, and provide a page statistics visualization display.

7. A table data lifecycle management device, characterized in that: The table data lifecycle management device includes a processor, a memory, and a table data lifecycle management program stored in the memory and executable by the processor, wherein when the table data lifecycle management program is executed by the processor, the steps of the table data lifecycle management method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a table data lifecycle management program, wherein when the table data lifecycle management program is executed by a processor, the steps of the table data lifecycle management method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method and device for data filing

    CN105653560A

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

    CN116126859A