Data adjustment method and device, electronic equipment and storage medium
By determining the data to be executed in the column storage table, updating the data directory and creating the data directory to be deleted and pending data directory, the progress and rollback problems when deleting columns in the column storage table are solved, and the rapid execution and integrity of data deletion are achieved. Supports rollback and exception handling, improving the efficiency and integrity of storage table management.
Patent Information
- Application Number
- CN202411213084.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-08
AI Technical Summary
In the prior art, when deleting columns in the column storage table, it is impossible to determine the processing progress and roll back the deleted column storage files, resulting in incomplete data management.
Ensure the progress and integrity of data deletion by determining the data to be executed in the storage table, updating the data directory, creating and pending data directories, performing data deletion operations, and performing data adjustments in exceptions or rollback requests.
It realizes the rapid execution of data deletion operations in column storage tables, supports rollback and exception handling, and provides a more complete storage table management service to meet users' needs for data storage and management.
Smart Images

Figure CN118916360A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data adjustment method, device, electronic equipment and storage medium. Background Art
[0002] Column storage tables store data in columns, which not only facilitates compressed storage to save space, but also supports scanning only specified columns, improving query efficiency. It has obvious advantages when the amount of data is large and is widely used in data warehouse scenarios such as online analytical processing (OLAP).
[0003] The data of the column storage table is stored in different column storage files by column. In the prior art, when it is necessary to delete a column, the column storage file to be deleted can be directly deleted, and the file name of the subsequent column storage file can be adjusted. However, there are some problems with this method of deleting column storage files. For example, when an exception occurs, it is impossible to determine which stage the column storage file deletion operation is in, and the deleted column storage file cannot be restored during rollback. Therefore, how to determine the processing progress and adjust the data accordingly during the data deletion operation of the column storage table has become a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a data adjustment method, device, electronic device and storage medium to solve the problem in the prior art that deleted column-stored files cannot be restored.
[0005] According to one aspect of the present invention, a data adjustment method is provided, wherein the method comprises:
[0006] Determine the data to be executed in the storage table according to the user's data deletion request;
[0007] Determine a data directory of a storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory;
[0008] Execute the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the to-be-determined data directory;
[0009] When the data deletion operation is abnormal or there is a rollback operation request, data adjustment is performed on the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request.
[0010] According to another aspect of the present invention, a data adjustment device is provided, wherein the device comprises:
[0011] A data determination module, used to determine the data to be executed in the storage table according to the user's data deletion request;
[0012] A directory determination module, used to determine a data directory of a storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory;
[0013] A data deletion module, configured to execute a data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory, and the to-be-determined data directory;
[0014] The data adjustment module is used to adjust the data of the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request when the data deletion operation is abnormal or there is a rollback operation request.
[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data adjustment method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data adjustment method described in any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, an embodiment of the present invention further provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the data adjustment method of any embodiment of the present invention is implemented.
[0021] The technical solution of the embodiment of the present invention determines the to-be-executed data of the storage table according to the data deletion request of the user, determines the data directory of the storage table according to the to-be-executed data, updates the data directory of the storage table to the to-be-deleted data directory, creates a pending data directory according to the data directory, and executes the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the pending data directory, thereby realizing the rapid execution of the data deletion operation; by adjusting the data of the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request when there is an exception in the data deletion operation or there is a rollback operation request, so as to realize support for rollback and exception handling on the basis of ensuring the efficiency of data deletion, provide a more complete storage table management service, and better meet the user's data storage and management requirements for the storage table.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of a data adjustment method provided according to Embodiment 1 of the present invention;
[0025] Figure 2 is a flow chart of another data adjustment method provided according to the second embodiment of the present invention;
[0026] Figure 3 is a flow chart of a data deletion method provided according to Embodiment 3 of the present invention;
[0027] Figure 4 is a flow chart of a data adjustment method provided according to Embodiment 3 of the present invention;
[0028] Figure 5 is a structural schematic diagram of a data adjustment device provided according to a fourth embodiment of the present invention;
[0029] Figure 6 It is a structural schematic diagram of an electronic device for implementing the data adjustment method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 1 is a flow chart of a data adjustment method provided according to the first embodiment of the present invention. This embodiment is applicable to situations where rollback or exception handling is required during the process of deleting a column in a column storage table. The method can be executed by a data adjustment device. The data adjustment device can be implemented in the form of hardware and / or software. The data adjustment device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S110: Determine the data to be executed in the storage table according to the user's data deletion request.
[0035] Among them, the data deletion request can be understood as the user's demand to delete data in the storage table. In the actual operation process, the data deletion request can be an instruction issued by the user to the database or storage table, requesting the deletion of specific data. The data deletion request may include storage table identification information, storage file identification information of the column to be deleted, the total number of columns before deletion, and transaction identification information. The data to be executed can be understood as the data required in the process of executing the data deletion operation corresponding to the data deletion request. Exemplarily, the data to be executed may include storage table identification information, storage file identification information of the column to be deleted, the total number of columns before deletion, and transaction identification information. The storage table is the basic structure used to organize and store data in the database.
[0036] In an embodiment, a data deletion request may be obtained, and data contained in the data deletion request may be extracted as data to be executed. In an actual operation process, in response to a user's data deletion request, storage table identification information, identification information of files stored in the columns to be deleted, the total number of columns before deletion, and transaction identification information, etc., contained in the data deletion request may be extracted, and the storage table identification information, identification information of files stored in the columns to be deleted, the total number of columns before deletion, and transaction identification information, etc., may be used as data to be executed.
[0037] S120: Determine a data directory of the storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory.
[0038] Among them, the data directory can be understood as a structured framework for managing data, which is used to record detailed descriptions of various data resources such as documents in the storage table, such as name, type, size, creation time, etc., and can quickly determine the data resources in the data table. The data directory to be deleted can be understood as a data directory that is about to be deleted; the pending data directory can be understood as a newly created data directory that will be used as a storage table. In one embodiment, the pending data directory can be an empty data directory. Generally speaking, the name or identification information of the data directory to be deleted is different from that of the pending data directory.
[0039] In an embodiment, the storage table identification information in the data to be executed can be extracted to determine the data directory corresponding to the storage table, and the data directory of the storage table can be updated and adjusted to the data directory to be deleted, and the pending data directory can be created according to the data directory of the storage table. In the actual operation process, the name or identification information of the data directory can be changed, and the data directory after the name or identification information is changed can be used as the data directory to be deleted. Create a new data directory as the pending data directory, and modify the name or identification information of the pending data directory to the name or identification information of the original data directory of the storage table. Exemplarily, when the data directory of the storage table is TAB <tabid>In this case, you can use TAB <tabid>Renamed to TAB <tabid>.of the <trxid>, TAB <tabid>.of the <trxid>As the data directory to be deleted, and create a new TAB <tabid>The empty directory is used as the pending data directory.
[0040] S130: Execute a data deletion operation corresponding to the data deletion request according to the data to be executed, the data directory to be deleted, and the data directory to be determined.
[0041] The data deletion operation refers to the process of removing data from the storage table. In the actual operation process, when the storage table is a column storage table, the data deletion operation may be to delete the corresponding column.
[0042] In an embodiment, the column stored file identification information to be deleted in the data to be executed can be extracted, and the column stored file identification information to be deleted can be determined in the data directory to be deleted, and the other column stored file identification information in the data directory to be deleted can be adjusted one by one by renaming, and the other column stored file identification information can be moved to the pending data directory at the same time, so as to complete the data deletion operation corresponding to the data deletion request. In the actual operation process, the number of column stored file identification information to be deleted and column stored file identification information to be deleted can be determined, and other column stored file identification information can be determined in the data directory to be deleted, and the column stored files whose column stored file identification information is less than the column stored file identification information to be deleted can be directly moved to the pending data directory; according to the number of column stored file identification information to be deleted, the new column stored file identification information of the column stored files greater than the column stored file identification information to be deleted can be determined, and the adjusted column stored files can be moved to the pending data directory.
[0043] Exemplarily, taking the case where the number of columns of the to-be-deleted column stored files is 1, the column stored files whose column stored file identification information is less than the to-be-deleted column stored file identification information can be directly moved to the pending data directory; and the column stored file identification information greater than the to-be-deleted column stored file identification information minus 1 is used as the new column stored file identification information of the column stored file, and then the column stored file is moved to the pending data directory. When it is determined that the number of column stored file identification information to be deleted is greater than 1 and continuous, the number of column stored files greater than the to-be-deleted column stored file identification information minus the number of column stored file identification information to be deleted can be determined as the new column stored file identification information, and the adjusted column stored files can be moved to the pending data directory; when it is determined that the number of column stored file identification information to be deleted is greater than 1 and discontinuous, the column stored file identification information greater than the to-be-deleted column stored file identification information can be adjusted according to the position of the to-be-deleted column stored file identification information. In one embodiment, when the to-be-deleted column stored file identification information is 3 and 6, the column stored files with identification information of 1 and 2 can be directly moved to the pending data directory. The identification information of the column storage files with identification information of 4 and 5 is reduced by 1 as the new column storage file identification information. At the same time, the identification information of the column storage files with identification information greater than 6 is reduced by 2 as the new column storage file identification information, and the adjusted column storage files are moved to the pending data directory.
[0044] S140: When there is an exception in the data deletion operation or there is a rollback operation request, adjust the data in the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request.
[0045] The abnormal status of the to-be-deleted data directory and the pending data directory may include that the to-be-deleted data directory does not exist, the pending data directory does not exist, and both the to-be-deleted data directory and the pending data directory exist. The abnormal situation of the data deletion operation may include stopping the data deletion operation or the abnormal situation of the data deletion operation. The rollback operation request can be understood as a request to restore the data to the state before the data was deleted. When there is a rollback operation request, it can be considered that the user actively triggered the rollback task.
[0046] In an embodiment, when there is an abnormality in the data deletion operation, the storage table can be rolled back according to the abnormal status of the data directory to be deleted and the pending data directory; when there is a rollback operation request, the storage table can be rolled back according to the data directory to be deleted and the rollback operation request. In the actual operation process, when it is determined that the data directory to be deleted does not exist, it can be considered that the data deletion operation process has not really started to execute. At this time, the data deletion operation of the storage table can be directly terminated; when it is determined that the pending data directory does not exist or exists and is empty, it can be considered that a new blank pending data directory has not been created and the column storage file has not been moved or a new blank pending directory has been created but the column storage file has not been moved. At this time, the data directory to be deleted is renamed back to the original data directory name, and the data deletion operation of the storage table is terminated. When it is determined that both the data directory to be deleted and the pending data directory exist and the pending data directory is not empty, it can be considered that the data deletion operation has not been fully executed. At this time, the data directory to be deleted can be rolled back. Specifically, it can be determined that the column stored files in the pending data directory whose column stored file identification information is less than the column stored file identification information to be deleted (i.e., the first type of files) keep the column stored file identification information unchanged, and determine the column stored files in the pending data directory whose column stored file identification information is greater than or equal to the column stored file identification information to be deleted (i.e., the second type of files after adjusting the column stored file identification information), plus the number of the to-be-deleted file identification information that is less than or equal to the column stored file identification information as the new column stored file identification information of the column stored files, and at the same time, move the column stored files with the modified column stored file identification information to the data directory to be deleted, and rename the data directory to be deleted to the original data directory name.
[0047] Exemplarily, taking the number of column-stored files to be deleted as 1, the column-stored files in the data directory to be deleted whose column-stored file identification information is less than the column-stored file identification information to be deleted can be kept unchanged; and the column-stored file identification information greater than or equal to the column-stored file identification information to be deleted is increased by 1 as the new column-stored file identification information of the column-stored file, and at the same time, the column-stored files with the modified column-stored file identification information are moved to the data directory to be deleted.
[0048] In an embodiment of the present invention, by determining the to-be-executed data of a storage table according to a data deletion request of a user, determining the data directory of the storage table according to the to-be-executed data, updating the data directory of the storage table to a to-be-deleted data directory, and creating a pending data directory according to the data directory, a data deletion operation corresponding to the data deletion request is executed according to the to-be-executed data, the to-be-deleted data directory, and the pending data directory, the data deletion operation is realized quickly; by adjusting the data of the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request when an exception or a rollback operation request occurs in the data deletion operation, the rollback and exception handling are supported on the basis of ensuring the efficiency of data deletion, and a more complete storage table management service is provided to better meet the data storage and management requirements of the user for the storage table.
[0049] In one embodiment, after executing the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory, and the to-be-determined data directory, the method includes:
[0050] Delete the data directory to be deleted.
[0051] In an embodiment, after the data deletion operation corresponding to the data deletion request is executed according to the to-be-executed data, the to-be-deleted data directory, and the pending data directory, the to-be-deleted data directory may be deleted to release space for the deleted data.
[0052] In one embodiment, before executing the data deletion operation, a rollback log may be recorded, wherein the rollback log may include the identification code (ID) of the storage table, identification information of the storage file of the column to be deleted, the total number of columns before deletion, transaction identification information, etc., so as to facilitate the judgment of the adjustment stage of the deletion column file during rollback. The content in the rollback log is the data to be executed of the storage table, which is determined according to the data deletion request of the user.
[0053] Embodiment 2
[0054] Figure 2 1 is a flow chart of another data adjustment method provided according to Embodiment 2 of the present invention. This embodiment is further optimized and expanded based on the above embodiment and can be combined with various optional technical solutions in the above embodiment. Figure 2 As shown, the method includes:
[0055] S201: Determine storage table identification information, to-be-deleted column storage file identification information, and transaction identification information contained in a data deletion request.
[0056] Among them, the storage table identification information can be understood as a unique identifier indicating the storage table. Exemplarily, the storage table identification information can include but is not limited to the name of the storage table and the storage table ID. The identification information of the column storage file to be deleted can be understood as a unique identifier indicating the column storage file to be deleted. Exemplarily, the identification information of the column storage file to be deleted can include but is not limited to the name of the column storage file to be deleted and the ID of the storage table. In general, the number of column storage files to be deleted can be one or more, and the column storage files to be deleted correspond to the identification information of the column storage files to be deleted one by one. A transaction is an execution unit that accesses (reads) and may update (write) various data items in a storage table, and the transaction identification information can be considered as a unique identifier indicating a transaction. In the actual process, the storage table identification information, the column storage file identification information to be deleted, and the transaction identification information can all be composed of letters, numbers, and strings.
[0057] In an embodiment, a data deletion request may be received, and storage table identification information, to-be-deleted column storage file identification information, and transaction identification information contained in the data deletion request may be extracted.
[0058] S202: Use the storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information as the to-be-executed data of the storage table.
[0059] In an embodiment, after the storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information are determined, the storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information may be used as the to-be-executed data of the storage table.
[0060] S203: Determine the data directory of the storage table according to the storage table identification information in the data to be executed, modify the original directory name of the data directory, and use the modified data directory as the data directory to be deleted.
[0061] The directory name of the data directory to be deleted is composed of the original directory name and the transaction identification information in the data to be executed.
[0062] In an embodiment, the storage table identification information in the data to be executed can be extracted, and the data directory of the storage table can be determined according to the storage table identification information. The original directory name of the data directory is modified, and the modified data directory is used as the data directory to be deleted. Exemplarily, the data directory to be deleted can be composed of the original directory name of the data directory and the transaction identification information arranged in sequence; or, the transaction identification information can be used as the identification information of the original directory name to generate the data directory to be deleted. In one embodiment, when the original directory name of the data directory is TAB <tabid>, When the transaction identification information is trxid, the directory name of the data directory to be deleted can be TAB <tabid>.of the <trxid>.
[0063] S204: Create a pending data directory, and use the original directory name as the directory name of the pending data directory.
[0064] The pending data directory does not contain column storage files.
[0065] In an embodiment, an empty data directory may be created, and the original directory name may be used as the directory name of the pending data directory. <tabid>In this case, the directory name of the pending data directory can be TAB <tabid>.
[0066] S205: Determine the column-stored file identification information of each column in the to-be-deleted data directory, and extract the column-stored file identification information of the to-be-deleted column in the to-be-executed data.
[0067] In an embodiment, the column storage file identification information of each column in the data directory to be deleted can be determined, and the column storage file identification information to be deleted in the data to be executed can be extracted. In the actual operation process, the data directory to be deleted can be identified, and all the column storage file identification information contained in the data directory to be deleted can be queried.
[0068] S206: Determine the column-stored files whose identification information is smaller than the identification information of the column-stored files to be deleted as first-type files, and move the first-type files to the to-be-determined data directory.
[0069] The first type of file may be understood as a column-stored file whose identification information does not need to be changed.
[0070] In an embodiment, the size relationship between the column-stored file identification information and the column-stored file identification information to be deleted can be compared, and the column-stored file whose column-stored file identification information is smaller than the column-stored file identification information to be deleted can be regarded as the first type of file, and the first type of file can be directly moved to the pending data directory.
[0071] S207, determining the column-stored files whose column-stored file identification information is greater than the column-stored file identification information to be deleted as the second type of files, adjusting the column-stored file identification information of the second type of files according to the number of the column-stored file identification information to be deleted, and moving the adjusted second type of files to the pending data directory.
[0072] The second type of file may be understood as a column-stored file whose identification information needs to be changed.
[0073] In an embodiment, when it is determined that the column-stored file identification information is greater than the column-stored file identification information to be deleted, the corresponding column-stored file can be used as a second type file. The number of column-stored file identification information to be deleted can be determined, and the column-stored file identification information of the second type file can be adjusted according to the number of column-stored file identification information to be deleted. Specifically, the column-stored file identification information of the second type file can be determined according to the original column-stored file identification information of the second type file and the number of column-stored file identification information to be deleted, and the adjusted second type file can be moved to the pending data directory.
[0074] Exemplarily, when the number of columns of the to-be-deleted column stored files is 1, the column stored files whose column stored file identification information is less than the to-be-deleted column stored file identification information can be directly moved to the pending data directory; and the column stored file identification information greater than the to-be-deleted column stored file identification information minus 1 is used as the new column stored file identification information of the column stored file, and the column stored file is moved to the pending data directory. When it is determined that the number of the to-be-deleted column stored file identification information is greater than 1 and continuous, the number of the column stored files greater than the to-be-deleted column stored file identification information minus the to-be-deleted column stored file identification information can be determined as the new column stored file identification information, and the adjusted second type of files can be moved to the pending data directory; when it is determined that the number of the to-be-deleted column stored file identification information is greater than 1 and discontinuous, the column stored file identification information greater than the to-be-deleted column stored file identification information can be adjusted according to the position of the to-be-deleted column stored file identification information. In one embodiment, when the to-be-deleted column stored file identification information is 3 and 6, the column stored files with identification information of 1 and 2 can be directly moved to the pending data directory. The identification information of the column-stored files with identification information of 4 and 5 is reduced by 1 as the new column-stored file identification information. At the same time, the identification information of the column-stored files with identification information greater than 6 is reduced by 2 as the new column-stored file identification information, and the adjusted second type of files are moved to the pending data directory.
[0075] Furthermore, adjusting the column-stored file identification information and moving the file to the to-be-deleted directory are completed in the same operation, which can ensure its atomicity and prevent errors from occurring during multiple rollbacks.
[0076] S208. In the case where there is an exception in the data deletion operation, when it is determined that the data directory to be deleted does not exist or the pending data directory does not exist, the data deletion operation corresponding to the data deletion request is terminated.
[0077] In an embodiment, when there is an abnormality in the data deletion operation, the abnormal status of the to-be-deleted data directory and the pending data directory can be determined. When it is determined that the to-be-deleted data directory does not exist or the pending data directory does not exist, it can be considered that the column-stored data has not been moved, and at this time, the data deletion operation corresponding to the data deletion request can be directly terminated.
[0078] S209: When it is determined that both the to-be-deleted data directory and the pending data directory exist, the to-be-deleted data directory is rolled back based on the number of file identification information listed in the pending data directory.
[0079] In an embodiment, when it is determined that both the data directory to be deleted and the pending data directory exist, it can be considered that the data deletion operation corresponding to the data deletion request has begun to be executed. At this time, the data directory to be deleted can be rolled back according to the number of file identification information stored in the pending data directory. In the actual operation process, when it is determined that the number of file identification information stored in the pending data directory is zero, it can be considered that the stored files have not been moved, and the data deletion operation corresponding to the data deletion request is terminated; when it is determined that the number of file identification information stored in the pending data directory is not zero, it can be rolled back according to the file identification information stored in the pending data directory.
[0080] In one embodiment, rolling back the data directory to be deleted based on the number of file identification information listed in the pending data directory includes:
[0081] When it is determined that the number of file identification information stored in the pending data directory is zero, the data deletion operation corresponding to the data deletion request is terminated;
[0082] When it is determined that the number of column-stored file identification information in the pending data directory is not zero, the first type of files in the pending data directory are determined, the first type of files are moved to the data directory to be deleted, and the second type of files after the column-stored file identification information is adjusted in the pending data directory are determined, the column-stored file identification information of the adjusted second type of files is modified according to the number of column-stored file identification information to be deleted, and the modified adjusted second type of files are moved to the data directory to be deleted.
[0083] In an embodiment, when it is determined that the number of column-stored file identification information in the pending data directory is zero, it can be considered that the column-stored files have not been moved, and at this time, the data deletion operation corresponding to the data deletion request can be terminated. When it is determined that the number of column-stored file identification information in the pending data directory is not zero, the first type of files in the pending data directory can be determined, and the first type of files can be directly moved to the data directory to be deleted, and then the second type of files in the pending data directory can be determined. The column-stored file identification information of the second type of files is determined according to the number of column-stored file identification information to be deleted and the column-stored file identification information of each second type of file, and the adjusted second type of files are moved to the data directory to be deleted, and the data directory to be deleted is renamed to the original data directory name, and the data rollback is completed.
[0084] S210: Change the directory name of the data directory to be deleted to the original directory name.
[0085] In an embodiment, when the data deletion operation corresponding to the data deletion request is ended or the rollback of the data directory to be deleted is completed, the directory name of the data directory to be deleted can be modified to the original directory name.
[0086] In an embodiment of the present invention, a data directory of a storage table is determined according to storage table identification information in data to be executed, a directory name of the data directory is modified, and the modified data directory is used as a data directory to be deleted, a pending data directory is created, and the directory name of the data directory is used as the directory name of the pending data directory, so as to complete the preparation work for data deletion, and then the column storage file identification information of each column in the data directory to be deleted is determined, and the column storage file identification information to be deleted in the data to be executed is extracted, and the column storage file whose column storage file identification information is less than the column storage file identification information to be deleted is determined as a first type of file, and the first type of file is moved to the pending data directory, and the column storage file whose column storage file identification information is greater than the column storage file identification information to be deleted is determined as a second type of file, and the column storage file of the second type is adjusted according to the number of the column storage file identification information to be deleted. The file identification information is stored, and the adjusted second type of file is moved to the pending data directory, so that the deletion of the column-stored files can be completed conveniently; when there is an exception in the data deletion operation, when it is determined that the data directory to be deleted does not exist or the pending data directory does not exist, the data deletion operation corresponding to the data deletion request is ended; when it is determined that the data directory to be deleted and the pending data directory both exist, the data directory to be deleted is rolled back based on the number of column-stored file identification information in the pending data directory, and then the directory name of the data directory to be deleted is modified to the original directory name, and the data deletion operation can be manually rolled back when there is an exception or a rollback operation is required. For exceptions generated at any time point before the data deletion operation is submitted, it can be rolled back to the state before the column deletion operation, thereby improving the user experience.
[0087] Embodiment 3
[0088] Figure 3 It is a flowchart of a data deletion method provided according to Example 3 of the present invention. This embodiment is based on the above embodiment, taking the column storage table as the storage table, the table ID as the storage table identification information, the deleted column ID as the column storage file identification information to be deleted, the column ID as the column storage file identification information, the transaction ID as the transaction identification information, and the column storage data directory as the data directory as an example to further illustrate the data deletion method.
[0089] In this embodiment, it is assumed that the ID of the storage table (TEST) of the field to be deleted is tabid, and the column storage data directory of the storage table is TAB <tabid>, the transaction ID of the deleted field is trxid, the original number of columns in the storage table (TEST) is colnum, the ID of each column is colid, the column ID starts from 0, and the maximum column ID is colnum-1. The column ID of the column to be deleted (col_del) is recorded as colid_del.
[0090] The data of the column storage table is stored as column storage files by column, which greatly facilitates the column deletion operation. Since the data of each column is stored separately, when deleting a column, you only need to delete the column storage file of the column col_del. For other columns, you only need to adjust the column storage file name of the subsequent columns after col_del.
[0091] Before executing the data deletion operation, a rollback log can be recorded, wherein the rollback log includes information such as table ID (tabid), deleted column ID (colid_del), total number of columns before deletion (colnum), transaction ID (trxid), etc., so as to facilitate the judgment of the deleted column file adjustment stage during rollback. The content in the rollback log is the data to be executed in the storage table, which is determined according to the user's data deletion request.
[0092] like Figure 3 As shown, the data directory TAB of the column storage table can be <tabid>Renamed to TAB <tabid>.of the <trxid>As the data directory to be deleted, and create a new TAB <tabid>The empty directory is used as the pending data directory, and then the file names of the stored files are adjusted one by one by renaming (Rename) to move them to the newly created pending data directory (TAB <tabid>)middle.
[0093] Specifically, for columns whose column ID is smaller than the column to be deleted colid_del, only the file table directory name is modified, that is:
[0094] TAB <tabid>.of the <trxid>\COL <colid>_xxx.dta is modified to
[0095] TAB <tabid>\COL <colid>_xxx.dta;
[0096] For columns whose column ID is greater than the column to be deleted colid_del, in addition to modifying the table directory name of the file, you also need to modify the column ID, that is:
[0097] TAB <tabid>.of the <trxid>\COL <colid>_xxx.dta is modified to
[0098] TAB <tabid>\COL <colid-1>_xxx.dta;
[0099] Among them, xxx is the file ID, which remains unchanged during the process of deleting columns and adjusting files.
[0100] By renaming the original data directory, creating a new empty directory, and then moving the column storage files one by one, it is possible to support the subsequent judgment of the step of the data file adjustment operation through the column storage file status when the exception occurs, so as to restore the moved files.
[0101] After executing the data deletion operation, you can delete the data directory TAB to be deleted <tabid>.of the <trxid>Generally speaking, it can be deleted during the purge operation. At the same time, this operation also completes the actual deletion of the column storage file of the col_del column. Since purge must occur after the transaction is committed, this operation can ensure that if an exception occurs at any time point before the transaction is committed and a rollback is required, it can be deleted in the data directory TAB to be deleted. <tabid>.of the <trxid>The column storage file of the deleted column col_del can be found in the , and the data can be restored to the state before deletion.
[0102] Since there is still some time between transaction submission and purge to delete the directory, other transactions may delete columns from the table during this period, generating new directories of data to be deleted (.del directories). In order to distinguish the directories of data to be deleted generated by different transactions and prevent the purge operation from being performed concurrently with the operation of deleting columns and adjusting column storage files, and accidentally deleting the directories of data to be deleted that are in use, the table ID (tabid) can be added to the renamed table file directory.
[0103] In one embodiment, Figure 4 FIG. 1 is a flow chart of a data adjustment method provided according to Embodiment 3 of the present invention. Figure 4 As shown, when there is an exception in the data deletion operation, the method for adjusting the data is as follows:
[0104] Step 1: Find the data directory TAB to be deleted <tabid>.of the <trxid>Whether the directory exists.
[0105] Specifically, if TAB <tabid>.of the <trxid>The directory does not exist, indicating that when the exception occurs, only the rollback log is recorded, and the process of deleting columns, adjusting columns and storing files has not really started (if the operation has ended, TAB <tabid>.of the <trxid>The directory will still exist until the transaction is committed and purged. At this time, you can directly end the data deletion operation. <tabid>.of the <trxid>If the directory exists, proceed to step 2.
[0106] Step 2: Find the pending data directory TAB <tabid>exists.
[0107] Specifically, if TAB <tabid>If the directory does not exist, it means that when an exception occurs, the operation only changes the original directory name to TAB <tabid>.of the <trxid>Directory, the pending data directory has not been created and the column storage file has not been moved, jump directly to step 4; if the pending data directory TAB exists <tabid>, but the directory is empty, jump to step 4, otherwise go to step 3.
[0108] Step 3: Adjust the pending data directories TAB one by one by Rename <tabid>The file name of the stored file in the list.
[0109] For columns whose column ID is smaller than the to-be-deleted column colid_del, only the file table directory name is modified, so rollback is performed in the following manner:
[0110] TAB <tabid>\COL <colid>_xxx.dta is modified to
[0111] TAB <tabid>.of the <trxid>\COL <colid>_xxx.dta;
[0112] For columns whose column ID is greater than or equal to the to-be-deleted column colid_del, since the column ID is adjusted when the column is deleted, it needs to be restored to its original state during rollback. In addition to modifying the table directory name of the file, the column ID must also be modified, that is:
[0113] TAB <tabid>\COL <colid>_xxx.dta is modified to
[0114] TAB <tabid>.of the <trxid>\COL<colid+1> _xxx.dta;
[0115] Among them, xxx is the file ID, which remains unchanged during the file adjustment process.
[0116] Step 4. TAB the data directory to be deleted <tabid>.of the <trxid>Rename to the original directory name TAB <tabid>, complete the exception handling and end the rollback process.
[0117] The present invention completes the adjustment of the data file when deleting the column by renaming the column storage file, without reading and writing data line by line, greatly reducing the file input and output volume and improving the efficiency of deleting the column. In addition, the column deletion method in the present invention supports manual rollback. In addition, for the exception generated at any time point before the column deletion operation is submitted, it can be rolled back to the state before the column deletion operation. It is a column deletion method that can ensure data correctness and provides a more complete column storage table management service.
[0118] Embodiment 4
[0119] Figure 5 is a schematic diagram of the structure of a data adjustment device provided according to Embodiment 4 of the present invention. Figure 5 As shown, the device includes: a data determination module 51, a directory determination module 52, a data deletion module 53 and a data adjustment module 54.
[0120] The data determination module 51 is used to determine the data to be executed in the storage table according to the user's data deletion request;
[0121] A directory determination module 52 is used to determine a data directory of a storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory;
[0122] A data deletion module 53, configured to execute a data deletion operation corresponding to a data deletion request according to the data to be executed, the data directory to be deleted, and the data directory to be determined;
[0123] The data adjustment module 54 is used to adjust the data of the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request when there is an abnormality in the data deletion operation or there is a rollback operation request.
[0124] In an embodiment of the present invention, a data determination module determines the to-be-executed data of a storage table according to a data deletion request of a user, a directory determination module determines the data directory of the storage table according to the to-be-executed data, updates the data directory of the storage table to a to-be-deleted data directory, a data deletion module creates a to-be-deleted data directory according to the data directory, and executes a data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the to-be-determined data directory, thereby realizing rapid execution of the data deletion operation; in the case where there is an exception in the data deletion operation or a rollback operation request, a data adjustment module adjusts the data of the storage table based on the abnormal state of the to-be-deleted data directory and the to-be-deleted data directory or the to-be-deleted data directory and the rollback operation request, thereby realizing support for rollback and exception handling on the basis of ensuring the efficiency of data deletion, providing a more complete storage table management service, and better meeting the user's data storage and management requirements for the storage table.
[0125] In one embodiment, the data determination module 51 includes:
[0126] A request identification unit, used to determine the storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information contained in the data deletion request;
[0127] The data determination unit is used to use the storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information as the to-be-executed data of the storage table.
[0128] In one embodiment, the directory determination module 52 includes:
[0129] A to-be-deleted directory determining unit, used to determine the data directory of the storage table according to the storage table identification information in the to-be-executed data, modify the original directory name of the data directory, and use the modified data directory as the to-be-deleted data directory; wherein the directory name of the to-be-deleted data directory is composed of the original directory name and the transaction identification information in the to-be-executed data;
[0130] The pending directory determining unit is used to create a pending data directory and use the original directory name as the directory name of the pending data directory, wherein the pending data directory does not contain column storage files.
[0131] In one embodiment, the data deletion module 53 includes:
[0132] An identification information determination unit, used to determine the column-stored file identification information of each column in the to-be-deleted data directory, and extract the column-stored file identification information to be deleted from the to-be-executed data;
[0133] A first data moving unit, configured to determine a column-stored file whose column-stored file identification information is smaller than the column-stored file identification information to be deleted as a first type of file, and move the first type of file to a pending data directory;
[0134] The second data moving unit is used to determine the column-stored file whose column-stored file identification information is greater than the column-stored file identification information to be deleted as a second type of file, adjust the column-stored file identification information of the second type of file according to the number of column-stored file identification information to be deleted, and move the adjusted second type of file to the pending data directory.
[0135] In one embodiment, the data adjustment module 54 includes:
[0136] A deletion stopping unit, used to terminate the data deletion operation corresponding to the data deletion request when it is determined that the data directory to be deleted does not exist or the pending data directory does not exist;
[0137] A data rollback unit, configured to roll back the data directory to be deleted based on the number of file identification information listed in the pending data directory when it is determined that both the data directory to be deleted and the pending data directory exist;
[0138] The name adjustment unit is used to modify the directory name of the data directory to be deleted to the original directory name.
[0139] In one embodiment, the data rollback unit is specifically used to:
[0140] When it is determined that the number of file identification information stored in the pending data directory is zero, the data deletion operation corresponding to the data deletion request is terminated;
[0141] When it is determined that the number of column-stored file identification information in the pending data directory is not zero, the first type of files in the pending data directory are determined, the first type of files are moved to the data directory to be deleted, and the second type of files after the column-stored file identification information is adjusted in the pending data directory are determined, the column-stored file identification information of the adjusted second type of files is modified according to the number of column-stored file identification information to be deleted, and the modified adjusted second type of files are moved to the data directory to be deleted.
[0142] In one embodiment, the data processing device further includes:
[0143] The directory deletion module is used to delete the data directory to be deleted.
[0144] The data adjustment device provided in the embodiment of the present invention can execute the data adjustment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0145] Embodiment 5
[0146] Figure 6 : is a schematic diagram of the structure of an electronic device that implements the data adjustment method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0147] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0148] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0149] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a data adjustment method.
[0150] In some embodiments, the data adjustment method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data adjustment method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data adjustment method in any other appropriate manner (e.g., by means of firmware).
[0151] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0152] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0153] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0154] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0155] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0156] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0157] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0158] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.< / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / colid> < / tabid> < / colid> < / trxid> < / tabid> < / colid> < / tabid> < / tabid> < / tabid> < / trxid> < / tabid> < / tabid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / tabid> < / colid> < / trxid> < / tabid> < / colid> < / tabid> < / colid> < / trxid> < / tabid> < / tabid> < / tabid> < / trxid> < / tabid> < / tabid> < / tabid> < / tabid> < / tabid> < / trxid> < / tabid> < / tabid> < / tabid> < / trxid> < / tabid> < / trxid> < / tabid> < / tabid> < / tabid>
Claims
1. A data adjustment method, It is characterized in that include: Determine the data to be executed in the storage table according to the user's data deletion request; Determine a data directory of a storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory; Execute the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the to-be-determined data directory; When the data deletion operation is abnormal or there is a rollback operation request, data adjustment is performed on the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request.
2. The method according to claim 1, It is characterized in that The step of determining the to-be-executed data in the storage table according to the user's data deletion request includes: Determine the storage table identification information, the identification information of the column storage file to be deleted, and the transaction identification information contained in the data deletion request; The storage table identification information, the identification information of the file stored in the to-be-deleted column, and the transaction identification information are used as the to-be-executed data of the storage table.
3. The method according to claim 1, It is characterized in that The step of determining a data directory of a storage table according to the data to be executed, updating the data directory of the storage table to a data directory to be deleted, and creating a data directory to be determined according to the data directory includes: Determine the data directory of the storage table according to the storage table identification information in the data to be executed, modify the original directory name of the data directory, and use the modified data directory as the data directory to be deleted; wherein the directory name of the data directory to be deleted is composed of the original directory name and the transaction identification information in the data to be executed; A pending data directory is created, and the original directory name is used as the directory name of the pending data directory, wherein the pending data directory does not contain column storage files.
4. The method according to claim 1, It is characterized in that The performing the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the to-be-determined data directory comprises: Determine the column-stored file identification information of each column in the to-be-deleted data directory, and extract the column-stored file identification information in the to-be-deleted data; Determine the column-stored file whose identification information is smaller than the column-stored file identification information to be deleted as a first type of file, and move the first type of file to the pending data directory; Determine the column-stored file whose column-stored file identification information is greater than the column-stored file identification information to be deleted as a second type of file, adjust the column-stored file identification information of the second type of file according to the number of the column-stored file identification information to be deleted, and move the adjusted second type of file to the pending data directory.
5. The method according to claim 4, It is characterized in that Adjusting data in the storage table based on the abnormal state of the to-be-deleted data directory and the to-be-determined data directory includes: When it is determined that the to-be-deleted data directory does not exist or the pending data directory does not exist, ending the data deletion operation corresponding to the data deletion request; When it is determined that both the to-be-deleted data directory and the pending data directory exist, rolling back the to-be-deleted data directory based on the number of file identification information listed in the pending data directory; The directory name of the data directory to be deleted is modified to the original directory name.
6. The method according to claim 5, It is characterized in that The step of rolling back the to-be-deleted data directory based on the number of file identification information listed in the to-be-deleted data directory comprises: When it is determined that the number of file identification information stored in the pending data directory is zero, ending the data deletion operation corresponding to the data deletion request; When it is determined that the number of column-stored file identification information in the pending data directory is not zero, the first type of files in the pending data directory are determined, and the first type of files are moved to the data directory to be deleted, and the second type of files in the pending data directory are determined, and the column-stored file identification information of the second type of files is adjusted according to the number of column-stored file identification information to be deleted, and the adjusted second type of files are moved to the data directory to be deleted.
7. The method according to claim 1, It is characterized in that After executing the data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory and the to-be-determined data directory, the method further includes: Delete the data directory to be deleted.
8. A data adjustment device, It is characterized in that include: A data determination module, used to determine the data to be executed in the storage table according to the user's data deletion request; A directory determination module, used to determine a data directory of a storage table according to the data to be executed, update the data directory of the storage table to a data directory to be deleted, and create a pending data directory according to the data directory; A data deletion module, configured to execute a data deletion operation corresponding to the data deletion request according to the to-be-executed data, the to-be-deleted data directory, and the to-be-determined data directory; The data adjustment module is used to adjust the data of the storage table based on the abnormal state of the to-be-deleted data directory and the pending data directory or the to-be-deleted data directory and the rollback operation request when the data deletion operation is abnormal or there is a rollback operation request.
9. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the data adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data adjustment method according to any one of claims 1 to 7 when executed.
