Data processing method and device, computer equipment, storage medium and program product
By setting the duration threshold in the data management platform to rename and automatically delete business data, combined with the instant messaging reminder function, the problems of invalid data occupation and error deletion in data management are solved, and the efficiency and accuracy of data management are improved.
Patent Information
- Application Number
- CN202411139911.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, data management platforms are difficult to effectively manage business data, and are prone to invalid data occupies database storage space, and may mistakenly delete valid data, affecting the efficiency and accuracy of data management.
In the data management platform, business data is renamed by setting the duration threshold, and it is not deleted until the second duration threshold is reached, ensuring automatic cleaning of data, and reminding the data owner to restore the false deleted data through instant messaging to reduce false deletes Condition.
It achieves the efficiency and accuracy of data management, avoids invalid data occupies database space, and ensures effective data recovery, improving the accuracy and efficiency of data management.
Smart Images

Figure CN119046504A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data management technology, and in particular to a data processing method, apparatus, computer equipment, storage medium and program product. Background Art
[0002] With the continuous development of computer technology, big data technology has also been widely used in network business. In the application process of business, data management issues are also particularly important.
[0003] In related technologies, data owners can store business data in a database of a data management platform. In order to reduce the situation where invalid data occupies storage space in the database, the data management platform can remind the data owner to manually delete invalid business data.
[0004] The above solution may result in the data owner missing out on deleting invalid data or mistakenly deleting valid data, which will affect the efficiency and accuracy of data management. Summary of the invention
[0005] The embodiments of the present application provide a data processing method, apparatus, computer equipment, storage medium and program product, which can improve the efficiency and accuracy of data management. The technical solution is as follows:
[0006] In one aspect, a data processing method is provided, the method comprising:
[0007] When the existence time of the business data in the data management platform reaches a first time threshold, a renaming operation is performed on the business data to obtain renamed data; the existence time is the time the data exists in the data management platform; the business data is data accessed by the data name during the execution of the business;
[0008] When a request to restore the service data is received and the existence time of the renamed data does not reach a second time threshold, restore the service data according to the renamed data;
[0009] When the existence time of the renamed data reaches the second time threshold, the renamed data is deleted.
[0010] In another aspect, a data processing device is provided, the device comprising:
[0011] A renaming operation execution module, configured to execute a renaming operation on the business data in the data management platform to obtain renamed data when the existence time of the business data in the data management platform reaches a first time threshold; the existence time is the time the data exists in the data management platform; the business data is data accessed by the data name during the execution of the business;
[0012] A business data recovery module, configured to recover the business data according to the rename data when a request to recover the business data is received and the existence time of the rename data does not reach a second time threshold;
[0013] The rename data deletion module is used to delete the rename data when the existence time of the rename data reaches a second time threshold.
[0014] In some embodiments, the apparatus further comprises:
[0015] a time information extraction module, configured to extract time information from the rename data before deleting the rename data when the existence duration of the rename data reaches the second duration threshold, wherein the time information is used to indicate a time point when the rename data is renamed;
[0016] The existence duration acquisition module is used to obtain the duration between the time point indicated by the time information and the current time point as the existence duration of the rename data before deleting the rename data when the existence duration of the rename data reaches the second duration threshold.
[0017] In some embodiments, the time information extraction module is used to extract the renaming time field in the data name of the renaming data to obtain the time information.
[0018] In some embodiments, the apparatus further comprises:
[0019] A data type acquisition module, configured to acquire a data type of the business data corresponding to the rename data before deleting the rename data when the existence time of the rename data reaches a second time threshold;
[0020] The second duration threshold acquisition module is used to acquire the second duration threshold according to the data type of the business data corresponding to the rename data before deleting the rename data when the existence duration of the rename data reaches the second duration threshold.
[0021] In some embodiments, the data type includes registered data or unregistered data; the registered data is data with life cycle information set by the data owner, and the unregistered data is data without life cycle information set by the data owner, and the life cycle information is used to indicate the upper limit of the time period for which the data exists in the data management platform;
[0022] In the case where the data type of the service data is registration data, the second duration threshold acquisition module is used to read the second duration threshold from the life cycle information of the registration data;
[0023] In the case that the data type of the service data is non-registration data, the second time threshold acquisition module is used to acquire the second time threshold set by the system.
[0024] In some embodiments, the second duration threshold acquisition module is used to extract the original data name field in the data name of the renamed data to obtain the data name of the business data when the data type of the business data is registration data; query the life cycle information corresponding to the data name of the business data; and read the second duration threshold from the queried life cycle information.
[0025] In some embodiments, the data name of the renamed data includes a data type field;
[0026] The data type acquisition module is used to extract the data type field in the data name of the renamed data; and acquire the data type indicated by the extracted data type field as the data type of the business data.
[0027] In some embodiments, the apparatus further comprises:
[0028] A business data type acquisition module, used to perform a renaming operation on the business data in the data management platform when the existence time of the business data reaches a first time threshold, and obtain the data type of the business data before obtaining the renamed data;
[0029] The first duration threshold acquisition module is used to perform a renaming operation on the business data in the data management platform when the existence duration of the business data reaches the first duration threshold, and obtain the first duration threshold according to the data type of the business data before obtaining the renamed data.
[0030] In some embodiments, the data name of the renamed data includes an original data name field, and the original data name field includes the data name of the business data; the business data recovery module is used to receive a data recovery request triggered by a data owner of the business data, and the data recovery request includes the data name of the business data; when the renamed data is queried through the data name of the business data, the data name of the renamed data is modified to the data name of the business data; and the existence duration of the business data is reset.
[0031] In some embodiments, the apparatus further comprises:
[0032] an error notification receiving module, configured to receive an error notification sent by a service corresponding to the service data before the data recovery request receiving module receives a data recovery request triggered by a data owner of the service data, wherein the error notification is sent by the service when access to the service data fails, and the error notification includes a data name of the service data;
[0033] A recovery reminder sending module, used for sending a recovery reminder to the data owner of the business data by instant messaging when the renamed data is found by searching the data name of the business data, wherein the recovery reminder is used for reminding the data owner to determine whether to restore the business data;
[0034] The data recovery request is triggered by the data owner of the business data based on the recovery reminder.
[0035] In some embodiments, the apparatus further comprises:
[0036] A rename data deletion module, used to delete the rename data when receiving a data deletion request;
[0037] The data deletion request is triggered by the data owner of the business data based on the recovery reminder.
[0038] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data processing method as described above.
[0039] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the data processing method as described above.
[0040] In another aspect, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the data processing method provided in the above-mentioned various optional implementations.
[0041] The technical solution provided by the present application may include the following beneficial effects: for business data in the data management platform that is accessed by the business through the data name, if the business data expires, the computer device will not directly delete the business data in the data management platform, but will perform a renaming operation on it to obtain the renamed data, and will only delete the renamed data after the renamed data expires; through the above solution, on the one hand, the computer device can realize automatic deletion of invalid business data according to the existence time of the data, thereby improving the efficiency of data management; on the other hand, since the business data cannot be accessed by the business after being renamed, but its data content still exists in the data management platform, if the business data is valid data, business execution errors will occur, thereby reminding the data owner to restore the business data in time. At this time, the computer device can easily restore the business data according to the renamed data, reducing the situation where valid business data is accidentally deleted, and the above business data renaming and recovery process can be achieved by simply modifying the data name, without occupying too many computing resources of the computer device, which can also improve the efficiency of data management; it can be seen that the above solution of the present application can take into account both the accuracy and efficiency of data management.
[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] Figure 1 is a system configuration diagram of a data processing method involved in one embodiment of the present application;
[0045] Figure 2 is a flow chart of a data processing method provided by an embodiment of the present application;
[0046] Figure 3 is a flow chart of a data processing method provided by an embodiment of the present application;
[0047] Figure 4 is a flow chart of a data processing method provided by an embodiment of the present application;
[0048] Figure 5 is a flow chart of a data processing method provided by an embodiment of the present application;
[0049] Figure 6 is a flow chart of a data processing method provided by an embodiment of the present application;
[0050] Figure 7This is a flow chart of a business data space management method provided by an embodiment of the present application;
[0051] Figure 8 This is a flow chart of a business data space management method provided by an embodiment of the present application;
[0052] Fig. 9 This is a schematic diagram of the front-end interface of a data table management system provided by an embodiment of the present application;
[0053] Fig.10 It is a flow chart of the overall solution provided by an embodiment of the present application;
[0054] Fig.11 It is a schematic diagram of a cleanup process without a rename mechanism provided by an embodiment of the present application;
[0055] Fig.12 This is a schematic diagram of a cleaning process solution for adding a rename mechanism provided by an embodiment of the present application;
[0056] Fig.13 It is a flowchart of renaming registration data provided by an embodiment of the present application;
[0057] Fig.14 is a block diagram of a data processing device provided by an exemplary embodiment of the present application;
[0058] Fig.15 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0059] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0060] Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.
[0061] The present application proposes a data processing solution that can, with minimal computing resources, avoid accidental deletion of data while reducing the occupancy of database space by invalid data, thereby improving data processing efficiency. For ease of understanding, some concepts involved in the present application are explained below.
[0062] 1) The rename buffer mechanism is used to optimize the performance of renaming files or directories in a computer system. When a user or program initiates a request to rename data, the operating system renames the data and caches the corresponding data content, leaving the data content unchanged.
[0063] 2) Hive metadata refers to the collection of information used to describe and manage data in Apache Hive.
[0064] 3) Data owner (owner) refers to the owner of the data, the person in charge of the database or table, and one of the users of the data. The data owner has the authority to manage the database and data tables, and must also ensure the quality of the data.
[0065] 4) Low-value data can refer to data with low usage rate. Some meaningless data that cannot provide effective information are also regarded as low-value data, such as intermediate temporary tables.
[0066] It should be noted that before collecting relevant user data (such as business information of the data owner) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window, otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0067] Figure 1 1 is a system configuration diagram of a data processing method according to an embodiment of the present application. Figure 1 As shown, the system includes a requesting device 120 and a serving device 130 for data processing.
[0068] The requester device 120 may be a personal computer device such as a desktop computer, a laptop computer, a personal workstation, or the like.
[0069] The service device 130 may be a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center.
[0070] The requesting device 120 and the serving device 130 may be connected via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0071] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, private network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.
[0072] exist Figure 1 In the system shown, the requesting device 120 can provide business data to the service device 130. When the existence time of the business data in the database of the service device 130 meets the first time threshold, the service device 130 performs a renaming operation on the business data to obtain the renamed data. When the existence time of the renamed data meets the second time threshold, the service device 130 deletes the renaming operation.
[0073] During the business execution process, when business data access fails, the service-side device 130 sends a recovery reminder to the data owner of the business data through the requesting device 120. The data owner of the business data can issue a business data recovery request based on the recovery reminder in the requesting device 120, or rename the data deletion operation; after receiving the relevant request, the service-side device 130 performs relevant operations on the request.
[0074] It should be noted that, in the embodiments of the present application, the above scheme is implemented by the interaction of devices on both sides as an example. Optionally, the above scheme can also be implemented independently by a single-side device.
[0075] Figure 2: is a flow chart of a data processing method provided by an embodiment of the present application. The data processing method can be executed by a computer device, or in other words, by a computer device corresponding to a data management platform. For example, the computer device can be the above-mentioned Figure 1 The service device 130 shown, or the computer device mentioned above, may also be other computer devices, such as a server, or a personal computer, etc. The data processing method mentioned above may include the following steps.
[0076] Step 210: When the existence duration of the business data in the data management platform reaches a first duration threshold, a renaming operation is performed on the business data to obtain renamed data; the existence duration is the length of time the data exists in the data management platform; the business data is data accessed by the data name during the execution of the business.
[0077] Among them, the above-mentioned database can be a database contained in the data management platform; or, the database can also be a database in the server corresponding to the data management platform. When the computer device receives business data or renamed data, the computer device can save the received business data or renamed data to the database in the server.
[0078] In an exemplary embodiment, the above-mentioned data management platform may include one or more databases, each database may include one or more data tables, each data table may include one or more business data, and each database or each data table may be used to store a specific type of business data; the business data may be uploaded by the data owner, or automatically downloaded / pulled / received from the network by the data management platform, or the business data may also be uploaded by the administrator of the data management platform.
[0079] Among them, the above-mentioned data management platform can be an integrated system (that is, a system integrating multiple functional modules) that can perform specific operations on data (such as adding, deleting, checking and modifying), and the above-mentioned data management platform is an online data management platform.
[0080] The above-mentioned business data is data required by the business platform in the process of executing designated businesses. The business platform is an online platform capable of executing different businesses, and the business platform can perform specific operations on the business data.
[0081] In the embodiment of the present application, the above-mentioned business data may be data uploaded by the data owner to the data management platform and authorized to be acquired by the data management platform.
[0082] When the business platform is executing business, it needs to obtain business-related data, that is, business data. At this time, the business platform can access the data management platform and then obtain the business data from the database of the data management platform.
[0083] The above existence duration refers to the duration from the start time of data storage on the data management platform to the current time.
[0084] The first duration threshold indicates the longest duration that business data can exist in the data management platform.
[0085] The first duration threshold may be set by the data owner / platform manager, or may be preset by the developer of the data management platform when developing the system.
[0086] In one possible implementation, whether the existence duration of the above-mentioned business data reaches the first duration threshold can be determined by the valid deadline (a time point) corresponding to the business data. For example, the computer device detects whether the existence duration of the business data reaches the first duration threshold at time A. If time A does not reach the above-mentioned valid deadline, the computer device determines that the existence duration of the business data does not reach the first duration threshold. Conversely, if time A has reached or exceeded the above-mentioned valid deadline, the computer device determines that the existence duration of the business data reaches the first duration threshold.
[0087] In another possible implementation, whether the existence duration of the above-mentioned business data reaches the first duration threshold can be determined by the time when the business data is uploaded / stored on the data management platform and a pre-set specified time (i.e., the above-mentioned first duration threshold). For example, the computer device detects whether the existence duration of the business data reaches the first duration threshold at time A. If the duration from the time when the business data is uploaded / stored on the data management platform to time A is equal to or exceeds the above-mentioned specified time, it is determined that the existence duration of the business data reaches the first duration threshold. Conversely, if the duration from the time when the business data exists on the data management platform to time A is less than the above-mentioned specified time, it is determined that the existence duration of the business data does not reach the first duration threshold.
[0088] In the embodiment of the present application, the data name is an identifier used to indicate different data. Each of the above-mentioned business data and each renamed data has a data name, and the data name of each business data and the data name of the renamed data are different.
[0089] Computer devices can obtain corresponding data through data names. Specifically, for example, when a piece of data is stored by a data management platform, an entry containing a data name field will be written into the database of the data management platform. The entry contains attribute information of the data, and the data name of the data will be recorded in the data name field. After the data management platform receives an access request containing a data name, it will first parse and obtain the data name and other information related to the data in the request, and then query the database for an entry containing the data name. When the data name in the data name field in the entry matches the data name in the access request, the corresponding data is obtained. The data in this instance can be business data or renamed data.
[0090] In an embodiment of the present application, during the process of executing the business, the business platform can access the business data in the data management platform through the access interface, and then call the business data required in the business execution process from the data management platform; during the access process, the business platform can send an access request to the data management platform, and the access request includes the data name corresponding to the business data, so as to automatically access the business data required in the business execution process through the data name.
[0091] Among them, the above-mentioned renaming operation is performed by a computer device. Specifically, for example, the data management platform performs a renaming operation on the data name of the business data. Specifically, when performing a renaming operation on a business data, the data management platform first obtains the data name of the business data, and then renames the data name, and uses the renamed business data as the renamed data corresponding to the business data. Except that the data name of the renamed data is inconsistent with the data name of the business data, the data content of the renamed data itself is consistent with the data content before the renaming operation is performed on the business data.
[0092] For example, when the data management platform performs a renaming operation on business data, the data name field in the business data entry in the database is written with a new data name, that is, the data name of the renamed data, and the content written in other fields in the entry is consistent with the content written in the entry before the business data is renamed.
[0093] Alternatively, when the data management platform performs a renaming operation on business data, it can create a new entry in the database to store the renamed data, and the data name field in the entry is written with the new data name obtained after the business data is renamed. The content written in other fields in the entry is consistent with the content written in other fields in the business data entry in the database. The business data entry in the database can be deleted by the data management platform, or the data management platform writes a deletion marker in a designated field in the entry corresponding to the business data to indicate that the current entry has been deleted.
[0094] Step 220: When a request to restore the business data is received and the existence time of the renamed data does not reach the second time threshold, restore the business data according to the renamed data.
[0095] The request to restore the business data may be issued by the owner of the business data.
[0096] The existence time of the renamed data is the time from the moment when the business data is renamed to the current moment.
[0097] In an embodiment of the present application, the computer device can obtain from the database the time point when the business data corresponding to the renamed data is renamed, and simultaneously obtain the current time point, and calculate the existence duration of the renamed data through the two time points.
[0098] The second duration threshold indicates the maximum duration that the renamed data can exist in the data management platform.
[0099] The second duration threshold may be set by the data owner / platform manager, or may be preset by the developer of the data management platform when developing the system.
[0100] In one possible implementation, whether the existence duration of the above-mentioned renamed data reaches the second duration threshold can be determined by the valid deadline (a time point) corresponding to the renamed data. For example, the data management platform detects whether the existence duration of the renamed data reaches the second duration threshold at time B. If time B does not reach the above-mentioned valid deadline, the data management platform determines that the existence duration of the renamed data does not reach the second duration threshold. Conversely, if time B has reached or exceeded the above-mentioned valid deadline, the data management platform determines that the existence duration of the renamed data reaches the second duration threshold.
[0101] In another possible implementation, whether the existence duration of the above-mentioned renamed data reaches the second duration threshold can be determined by the moment when the business data is renamed to the above-mentioned renamed data and a pre-set specified duration (i.e., the above-mentioned second duration threshold). For example, the data management platform detects whether the existence duration of the renamed data reaches the second duration threshold at moment B. If the duration between the moment when the business data is renamed to the above-mentioned renamed data and moment B is equal to or exceeds the above-mentioned specified duration, the data management platform determines that the existence duration of the renamed data reaches the second duration threshold. Conversely, if the duration between the moment when the business data is renamed to the above-mentioned renamed data and moment B is less than the above-mentioned specified duration, the data management platform determines that the existence duration of the renamed data does not reach the second duration threshold.
[0102] In an embodiment of the present application, when the computer device receives a request to restore the business data from the owner of the business data and the existence duration of the renamed data does not reach a second duration threshold, the computer device restores the business data based on the renamed data.
[0103] Step 230: When the existence duration of the renamed data reaches a second duration threshold, delete the renamed data.
[0104] The deletion operation and renaming operation in the embodiments of the present application are all performed by the data management platform. For example, the above-mentioned deletion operation / renaming operation can be automatically performed by the data management platform, or it can be performed after the data management platform receives a request triggered by the data owner / platform administrator.
[0105] In an embodiment of the present application, for business data in the data management platform that is accessed by the business through the data name, when the existence time of the business data reaches a certain threshold (i.e., the first time threshold), the computer device does not directly delete the business data in the data management platform, but performs a renaming operation on it to obtain the renamed data, and deletes the renamed data only after the renamed data expires; through the above scheme, on the one hand, the computer device can realize automatic deletion of invalid business data through the existence time of the data, thereby improving the efficiency of data management; on the other hand, since the business data cannot be accessed by the business after being renamed, but its data content still exists in the data management platform, if the business data is valid data, a business execution error will occur, thereby reminding the data owner to restore the business data in time, at this time, the computer device can easily restore the business data according to the renamed data, reducing the situation where valid business data is accidentally deleted, and the above business data renaming and recovery process can be achieved by simply modifying the data name, without occupying too many computing resources of the computer device, and can also improve the efficiency of data management; it can be seen that the above scheme of the present application can take into account both the accuracy and efficiency of data management.
[0106] based on Figure 2 , please refer to Figure 3 , Figure 3 It is a flow chart of a data processing method provided by an embodiment of the present application. Figure 2 The step 230 in the method also includes step 222 and step 224, which are as follows:
[0107] Step 222: extracting time information from the renamed data, where the time information is used to indicate the time point when the renamed data is renamed.
[0108] Among them, the above-mentioned time information is used to indicate the specific time point when the business data corresponding to the renamed data is renamed by the data management platform. For example, when the business data is renamed by the data management platform, a new entry will be created in the database to store the relevant information of the renamed data. The moment the entry is created is the time point when the renamed data is renamed.
[0109] In an embodiment of the present application, the entry in the database corresponding to the renamed data may include a rename time field, which records the time point when the renamed data is renamed. The computer device can obtain the time point when the renamed data is renamed by reading the content in the rename time field.
[0110] Step 224: The duration between the time point indicated by the time information and the current time point is obtained as the existence duration of the renamed data.
[0111] The duration may be a time length in units of years, months, days, hours, minutes and seconds.
[0112] In the embodiment of the present application, after the data management platform obtains the time point at which the renamed data is renamed, the length of time from the time point to the current moment is used as the existence duration of the renamed data.
[0113] Optionally, the time information can also be stored outside the renamed data. For example, the data management platform also includes a time data table, which is used to store the time information of each renamed data in the data management platform. When the business data is renamed, the time point of the renaming operation will be recorded in the time data table, and the data management platform can query the time information of the renamed data from the time record table. Alternatively, the time information can also be stored in the metadata of the renamed data.
[0114] In the embodiment of the present application, the data management platform can directly obtain the time point when the renaming operation is performed on the renaming data from the renaming data, which can improve the efficiency of obtaining the time point.
[0115] In some embodiments, the above step 222 may be implemented as: extracting the renaming time field in the data name of the renamed data to obtain the time information.
[0116] Among them, the data name of the above-mentioned renamed data contains one or more fields, each field is used to store specified information, and the specified information is the attributes related to the renamed data (such as information related to the data name, information related to the data type, information related to the creation / upload time, etc.), and the attributes indicated by the information stored in different fields may be different.
[0117] In the embodiment of the present application, the data name of the renamed data includes a rename time field, and the rename time field stores time information indicating the time point when the renamed data is renamed. When the data management platform needs to extract the time information of the renamed data, it can first obtain the data name of the renamed data, then extract the rename time field from the data name, and then obtain the time information from the rename time field.
[0118] In an embodiment of the present application, the renaming time field is directly included in the data name of the renamed data. The data management platform can obtain the time information by directly reading the data name of the renamed data, which can effectively improve the efficiency of obtaining the time information.
[0119] In a possible implementation, the renaming time of the renamed data may also be stored in the data content of the renamed data, and the data management platform may directly extract the time information from the data content of the renamed data. Specifically, for example, the end of the data content of the renamed data contains a renaming time field, and the renaming time field indicates the time point when the renamed data is renamed, and the data management platform may extract the time point information from the renaming time field at the end of the renamed data.
[0120] based on Figure 2 , please refer to Figure 4 , Figure 4 is a flow chart of a data processing method provided by an embodiment of the present application. Figure 2 The step 230 in the method also includes step 226 and step 228, which are as follows:
[0121] Step 226: Obtain the data type of the business data corresponding to the renamed data.
[0122] In the embodiment of the present application, different business data may correspond to different data types.
[0123] Optionally, the data management platform may obtain the data type of the business data corresponding to the renamed data by querying a specified field in an entry corresponding to the renamed data in a database of the data management platform.
[0124] For example, the entry corresponding to the above-mentioned renamed data can be the entry where the business data corresponding to the renamed data is located, or it can be the entry where the renamed data is located. The entry at least contains a data type field, and the data type field records the data type corresponding to the business data, and the data type can be in the form of numbers or text; the data management platform can obtain the data type of the business data corresponding to the renamed data by querying the data type field in the above-mentioned entry.
[0125] Alternatively, the data management platform may also read the data name of the renamed data and extract the data type of the business data corresponding to the renamed data from the data name.
[0126] For example, the data name of the above-mentioned renamed data contains at least one field, one of which is used to indicate the data type of the business data corresponding to the renamed data, and the field content can be in the form of a number or text; the data management platform can extract the data name of the renamed data, and extract the data type of the business data corresponding to the renamed data from the data name.
[0127] For another example, the data name of the business data corresponding to the renamed data contains at least one field, one of which is used to indicate the data type of the business data. The data management platform can extract the data name of the business data and extract the data type of the business data corresponding to the renamed data from the data name.
[0128] Alternatively, the data management platform may also obtain the data type of the business data corresponding to the renamed data by reading a specified field in the business data corresponding to the renamed data.
[0129] For example, the above data type may exist in a specified position in the data content of the business data corresponding to the renamed data (such as the end or beginning of the data content), and the data type may exist in the data content of the business data in the form of text or numbers; the data management platform may obtain the above data type by reading the content at a specified position in the business data content.
[0130] Alternatively, the data management platform may also obtain the data type of the business data corresponding to the renamed data by reading a specified field in the business data corresponding to the renamed data.
[0131] For example, the above data type may exist at a specified position in the data content of the renamed data (such as the end or beginning of the data content), and the data management platform may obtain the above data type by reading the content at the specified position in the data content of the renamed data.
[0132] In the embodiment of the present application, when the data type exists in digital form, different numbers can represent different data types; when the data type exists in text form, the text can directly represent the data type.
[0133] It should be noted that the renamed data is the data obtained after the corresponding business data is renamed. Therefore, the data type of the renamed data and the data type of the corresponding business data are the same by default in the absence of interference from other external factors (such as the data owner or platform administrator actively modifying the data type).
[0134] Step 228: Obtain a second duration threshold according to the data type of the business data corresponding to the renamed data.
[0135] In the embodiment of the present application, different data types may correspond to respective methods of obtaining the second duration threshold, and the methods of obtaining the second duration threshold corresponding to different data types may be the same or different.
[0136] Alternatively, different data types may correspond to their own second duration thresholds, and the second duration thresholds corresponding to different data types may be the same or different. Optionally, the second duration threshold is stored in a data type list of the data management platform, and the data type list contains different data types and the second duration threshold corresponding to each data type; after the data management platform obtains the data type, it traverses the data types in the data type list, and obtains from the data type list the second duration threshold corresponding to the data type of the business data corresponding to the renamed data.
[0137] In an embodiment of the present application, the data management platform can obtain the second time threshold corresponding to the renamed data according to the data type. When the data type is different, the obtained second time threshold is also different. The effective storage time corresponding to different types of data can be flexibly set, thereby improving the data management effect of the data management platform.
[0138] In some embodiments, the data type includes registered data or unregistered data; registered data is data with life cycle information set by the data owner, and unregistered data is data without life cycle information set by the data owner, and the life cycle information is used to indicate the upper limit of the length of time that the data exists in the data management platform.
[0139] Among them, the above-mentioned life cycle information can be used to indicate the upper limit of the storage time of business data / renamed data. For example, the upper limit of the time can be one of the upper limit of the storage time of business data / renamed data in the data management platform, the upper limit of the storage time of business data / renamed data in the data management platform after the business data / renamed data is subjected to a specified operation, and the upper limit of the effective time of business data / renamed data in the data management platform.
[0140] In some embodiments, in addition to the above-mentioned upper limit on time, the above-mentioned lifecycle information may also indicate other information related to the business data / renamed data, such as the database name and data table name where the business data / renamed data is located, the partitioning method corresponding to the business data / renamed data in the data management platform, the deadline until which the business data / renamed data can be effectively used, whether the business data / renamed data retains the end-of-month slice, remarks, etc.
[0141] In an embodiment of the present application, the data owner can set the life cycle information of the business data / renamed data in the data management platform. After the life cycle information is set by the data owner, the business data / renamed data becomes registered data.
[0142] Correspondingly, business data / renamed data for which lifecycle information has not been set by the data owner is considered unregistered data.
[0143] Optionally, when the data owner uploads business data / renaming data to the data management platform, a lifecycle information setting interface pops up on the data management platform interface, allowing the data owner to choose whether to set the lifecycle information.
[0144] In the embodiment of the present application, the data owner's setting method for lifecycle information is not limited to any one of selection, typing, and voice input.
[0145] When the data type of the business data is registration data, the above step 226 can be implemented by reading the second duration threshold from the life cycle information of the registration data; when the data type of the business data is non-registration data, obtaining the second duration threshold set by the system.
[0146] In an embodiment of the present application, each business data has a second duration threshold. When the business data belongs to registration data, the second duration threshold is obtained by setting the life cycle information of the business data by the data owner. The set second duration threshold can be stored in a registration data table corresponding to the registration data of the data management platform. The registration data table contains at least two pieces of information of the registration data, including the data name of the registration data and the second duration threshold of the registration data. When the business data belongs to non-registered data, the second duration threshold is preset by a system developer. The preset second duration threshold information can be stored in a preset time information data table of the data management platform. The preset time information data table contains at least two pieces of information of the non-registered data, including the data name of the non-registered information and the second duration threshold of the non-registered information.
[0147] Optionally, in this instance, after the non-registered data is set with a second time threshold by the data owner, the non-registered data can become registered data, and the data management platform deletes the record of the business data in the preset time information data table, and stores the life cycle information of the business data after being set in the registration data data table.
[0148] In an embodiment of the present application, the life cycle information includes a second duration threshold. When the data management platform needs to obtain the second duration threshold of business data, the data management platform first obtains the data type of the business data and determines whether the business data belongs to registration data. When the business data belongs to registration data, the data management platform extracts the second duration threshold from the life cycle information by querying the life cycle information corresponding to the business data in the registration data table; when the business data belongs to unregistered data, the data management platform queries the second duration threshold information corresponding to the unregistered data from the preset time information data table, and extracts the second duration threshold from the second duration threshold information.
[0149] In an embodiment of the present application, different types of business data may have different ways of obtaining the second time threshold. Specifically, for registered data, the data owner may set a personalized second time threshold to improve the flexibility of setting the second time threshold. For unregistered data, the system preset second time threshold may be used to ensure that the renamed data can be deleted after a period of time, thereby ensuring that invalid data does not occupy space resources for a long time.
[0150] In some embodiments, when the data type of the business data is registration data, the data management platform extracts the original data name field in the data name of the renamed data to obtain the data name of the business data; queries the life cycle information corresponding to the data name of the business data; and reads the second duration threshold from the queried life cycle information.
[0151] Among them, the above-mentioned original data name field contains the data name of the business data corresponding to the renamed data before the renaming operation is performed. During the renaming operation of the business data, other fields will be added to the data name of the business data to form a new data name as the data name of the renamed data. The data name of the renamed data contains at least two different fields, and different fields indicate different information. One of the fields is the original data name field, which is used to indicate the data name of the business data.
[0152] In an embodiment of the present application, after obtaining the data name of the renamed data, the data management platform can remove other fields added to the data name during the renaming operation, retain the original data name field, and obtain the data name of the original business data.
[0153] Optionally, after obtaining the data name of the business data, the data management platform can directly query the lifecycle list. The lifecycle list stores the data names of different business data and the second duration threshold corresponding to each data name. After the data management platform queries the lifecycle list for a record that is consistent with the data name of the obtained business data, the data management platform obtains the second duration threshold from the record.
[0154] Optionally, after obtaining the data name of the business data, the data management platform can directly query the registration data table, which stores the data names of different registration data and the second duration threshold corresponding to each data name. After the data management platform queries the registration data table for a record that is consistent with the data name of the obtained business data, the data management platform obtains the second duration threshold from the record.
[0155] Exemplarily, there is business data A in the data management platform. When the business data A is renamed, the data name of the business data will be added with the renaming time point "240728" and the data type identifier "reg_rename_data" to form a new data name "reg_rename_dataA 240728" as the data name of the renamed data. The data name of the renamed data contains three fields, namely the time field "240728", the data type field "reg_rename_data" and the original data name field "A". The data management platform can obtain the original data name field by removing the time field and the data type field, and extract the data name "A" of the business data in the original data name field. After obtaining the data name of the business data, the data management platform queries the life cycle information list in the database, queries the record with the data name "A" from the life cycle information list, and reads the second time threshold corresponding to the business data with the data name "A" from the record, indicating that the business data with the data name "A" can exist in the data management platform for the longest time after the renaming operation is executed.
[0156] In an embodiment of the present application, the data management platform can directly extract the original data name from the data name of the renamed data, and subsequently query the life cycle information and the second duration threshold corresponding to the data name based on the data name, thereby improving the efficiency of obtaining the second duration threshold and improving the data management efficiency of the data management platform.
[0157] In some embodiments, the data name of the renamed data includes a data type field.
[0158] In the embodiment of the present application, the data name of the renamed data includes at least two fields, one of which is a data type field, and the data type field is used to indicate the data type of the renamed data, and the data type can be one of registered data or unregistered data. The data type can exist in the form of text or numbers.
[0159] Optionally, when the data type exists in the form of text, the text content can directly indicate the data type. For example, when the data type is registered data, the text content of the data type field is "registered"; when the data type is unregistered data, the text content of the data type field is "unregistered".
[0160] Optionally, when the data type field exists in the form of a number, the number is an identifier of the data type, and different numbers represent different data types. For example, the number is "1", indicating that the data type is registered data; the number can also be "0", indicating that the data type is unregistered data.
[0161] The above step 224 can be implemented by extracting the data type field in the data name of the renamed data; and obtaining the data type indicated by the extracted data type field as the data type of the business data.
[0162] In an embodiment of the present application, the data management platform may first obtain the data name of the renamed data, then remove other fields in the data name, obtain the data type field, and finally read the data type field to extract the data type as the data type of the business data.
[0163] Exemplarily, the data name of the renamed data is "1data01 240728", which contains three fields, namely the data type field "1", the original data name field "data01" and the date field "240728". The data management platform first removes the original data name field and the date field to obtain the data type field, and then reads the information "1" in the data type field, 1 indicates that the data type is registration data, and finally the registration data is used as the data type of the business data.
[0164] In an embodiment of the present application, the data management platform can quickly extract the data type from the data name of the renamed data, thereby improving the efficiency of obtaining the data type of the business data. Since the data name of the renamed data is a new data name constructed based on the business data-related information after the business data is renamed, the data management platform extracts the data type from the data name of the renamed data as the data type of the business data, thereby improving the accuracy of the data type of the business data and thus improving the data management efficiency of the data management platform.
[0165] based on Figure 2 , please refer to Figure 5 , Figure 5 is a flow chart of a data processing method provided by an embodiment of the present application. Figure 2 The step 210 in the method also includes step 204 and step 206, which are as follows:
[0166] Step 204: Obtain the data type of the business data.
[0167] The above data types can be set by the data owner or by the platform administrator in the data management platform. Alternatively, the above data types can also be automatically set by the data management platform according to the data owner's setting operations on the business data; for example, the data management platform divides the business data into registered data or unregistered data according to whether the data owner actively configures the life cycle information for the business data.
[0168] Optionally, the data management platform may obtain the data type of the business data by querying a specified field in an entry corresponding to the business data in a database of the data management platform.
[0169] For example, the entry corresponding to the above business data includes at least a data type field, which records the data type corresponding to the business data, and the data type can be in the form of numbers or text; the data management platform can obtain the data type corresponding to the business data by querying the data type field in the above entry.
[0170] Alternatively, the data management platform may also read the data name of the business data and extract the data type of the business data from the data name.
[0171] For example, the data name of the above-mentioned business data contains at least one field, one of which is used to indicate the data type corresponding to the business data, and the field content can be in the form of a number or text; the data management platform can extract the data name of the business data and extract the data type corresponding to the business data from the data name.
[0172] Alternatively, the data management platform may also obtain the data type of the business data by reading a specified field in the business data.
[0173] For example, the above data type may exist in a specified position in the data content of the business data (such as the end or beginning of the data content), and the data type may exist in the data content of the business data in the form of text or numbers; the data management platform may obtain the above data type by reading the content at a specified position in the business data content.
[0174] In the embodiment of the present application, when the data type exists in digital form, different numbers can represent different data types; when the data type exists in text form, the text can directly represent the data type.
[0175] Step 206: Obtain a first duration threshold according to the data type of the service data.
[0176] In the embodiment of the present application, different data types may correspond to respective methods of obtaining the first duration threshold, and the methods of obtaining the first duration threshold corresponding to different data types may be the same or different.
[0177] Alternatively, different data types may correspond to respective first duration thresholds, and the first duration thresholds corresponding to different data types may be the same or different.
[0178] Optionally, the first duration threshold is stored in a data type list of the data management platform, which contains different data types and the first duration threshold corresponding to each data type; after the data management platform obtains the data type, it traverses the data types in the data type list and obtains the first duration threshold corresponding to the data type of the business data from the data type list.
[0179] In an embodiment of the present application, when the data type of the business data belongs to registration data, the first duration threshold can be obtained after the data owner sets the life cycle information of the business data. Optionally, the set first duration threshold can be saved in the registration data table corresponding to the registration data of the data management platform, and the registration data table contains at least two pieces of information of the registration data, including the first duration threshold of the registration data; when the data type of the business data belongs to non-registered data, the first duration threshold can be preset by the system developer, and the preset first duration threshold can be stored in the preset time information data table of the data management platform, and the preset time information data table contains at least two pieces of information of the non-registered data, including the first duration threshold of the non-registered data. In this example, after the first duration threshold in the life cycle information is set by the data owner for the non-registered data, the non-registered data becomes the registered data, and the data management platform deletes the record of the business data in the preset time information data table, and stores the life cycle information of the business data after being set in the registration data data table.
[0180] In an embodiment of the present application, a computer device can obtain a first duration threshold corresponding to business data based on the data type. When the data type is different, the obtained first duration threshold may also be different. The effective storage duration corresponding to different types of data can be flexibly set, thereby improving the data management effect of the data management platform during the business execution process.
[0181] In some embodiments, the data name of the renamed data includes an original data name field, and the original data name field includes the data name of the business data.
[0182] In the embodiment of the present application, the data name of the renamed data includes the data name before the renaming operation is performed on the renamed data.
[0183] based on Figure 2 , please refer to Figure 6 , Figure 6 It is a flow chart of a data processing method provided by an embodiment of the present application. Figure 2Step 220 in the data processing method can be implemented as step 220a, step 220b and step 220c, as follows:
[0184] Step 220a: Receive a data recovery request triggered by a data owner of the business data, where the data recovery request includes the data name of the business data.
[0185] In an embodiment of the present application, the data owner can trigger a request to restore business data through a specified operation. For example, after the data management platform renames the business data to the above-mentioned renamed data, it can send a reminder message to the data owner of the business data to remind the data owner whether to restore the business data. At this time, the data owner can perform a confirmation operation on the reminder message in the data management platform, actively initiate a data recovery request, and request to restore the business data with the specified data name.
[0186] Step 220b: when the renamed data is found through the data name of the business data, the data name of the renamed data is modified to the data name of the business data.
[0187] After receiving the data recovery request, the computer device responds to the data recovery request and queries the database for the renamed data corresponding to the data name based on the data name of the business data in the data recovery request; for example, the data name of the renamed data includes the data name of the business data, and after querying that the data name of the corresponding renamed data includes the data name of the above business data, the data management platform automatically modifies the data name of the renamed data to the data name of the corresponding business data, that is, restores the data name of the renamed data to the original data name.
[0188] In some embodiments, after a computer device queries the renamed data through the data name of the business data, a data name modification interface can be displayed in the data management platform. The data owner can perform specified operations in the data name modification interface to trigger a data name recovery request. After receiving the data name recovery request, the data management platform will modify the data name of the renamed data to the data name of the corresponding business data.
[0189] In the embodiment of the present application, the computer device can modify the data name of the renamed data to the data name of the business data by splitting the data name of the renamed data, or directly overwrite the data name of the renamed data with the data name of the business data carried in the data recovery request. The overwriting operation can be specifically implemented by deleting the value of the data name field in the corresponding entry of the renamed data in the database and writing the data name of the business data.
[0190] In the embodiment of the present application, after the computer device modifies the data name of the renamed data into the data name of the business data, the business can restore access to the business data through the data name of the business data.
[0191] Step 220c: Reset the existence time of the service data.
[0192] After the computer device changes the data name of the renamed data to the data name of the business data, the existence duration of the business data can be reset by the data owner; it can also be automatically reset to the default duration by the data management platform.
[0193] In a possible implementation, the computer device may also reset other attribute information of the business data, including but not limited to any one of partition information and data type.
[0194] In an embodiment of the present application, after the business data is renamed, before the renamed data expires and is deleted, the data owner can issue a data recovery request to the computer device. Based on the data name of the business data carried in the data recovery request, the computer device can quickly recover the business data with extremely small computing resources, thereby improving data recovery efficiency. It can also reset the existence time of the recovered business data to meet the time requirements in the business execution process, effectively ensuring business execution efficiency. The above solution can effectively improve the efficiency of data management.
[0195] In a possible implementation, before the above step 220a, the data processing method also includes: receiving an error notification sent by the business corresponding to the business data, the error notification is sent by the business when access to the business data fails, and the error notification contains the data name of the business data; when the renamed data is queried through the data name of the business data, a recovery reminder is sent to the data owner of the business data through instant messaging, and the recovery reminder is used to remind the data owner to determine whether to restore the business data; wherein the data recovery request is triggered by the data owner of the business data based on the recovery reminder.
[0196] In an embodiment of the present application, during the execution of business, the business platform needs to access the business data in the computer device by calling the interface. During the access process, there may be a problem that the business data cannot be accessed by the business platform, such as data access failure or data corruption. At this time, the business platform will generate an error notification and send it to the computer device to indicate that the business platform cannot access the business data.
[0197] The above error notification at least includes relevant information of the business data that needs to be accessed, such as the data name or identifier of the business data.
[0198] In an embodiment of the present application, after receiving an error notification, the computer device first obtains the data name of the business data in the error notification, or queries the data name of the business data based on the above-mentioned identifier (the computer device needs to store the correspondence between the identifier and the data name of the business data), and then queries the database for the renamed data corresponding to the business data based on the data name of the business data, and finally determines whether to send a recovery reminder to the data owner of the business data based on the query situation.
[0199] When a computer device queries the renamed data corresponding to the business data, it means that the business data has been renamed after its expiration and the renamed data has not been deleted. At this time, a recovery reminder can be sent to the data owner of the business data via instant messaging. The recovery reminder contains the data name of the business data and other reminder information. For example, the above reminder information may include content for indicating that matching renamed data has been found, as well as reminding the data owner to confirm whether the business data needs to be restored. The data owner can perform specified operations on the recovery reminder to trigger a data recovery request.
[0200] Among them, in addition to the instant messaging method, the above-mentioned recovery reminder can also be sent through a terminal pop-up window, email, text message and other methods.
[0201] Optionally, when the renamed data is queried through the data name of the business data, the computer device can send a pop-up window containing a recovery reminder to the data owner of the business data on the terminal interface. The pop-up window contains at least two options, one of which is "Data Recovery". The data owner of the business data can trigger a data recovery request by performing a selected operation on the "Data Recovery" option.
[0202] Optionally, when the renamed data is queried through the data name of the business data, the computer device can send an email containing a recovery reminder to the data owner of the business data. The email contains a network link. The data owner of the business data can click on the network link to jump to the data management platform and trigger a data recovery request in the data management platform.
[0203] Optionally, when the renamed data is queried through the data name of the business data, the computer device sends a text message containing a recovery reminder to the data owner of the business data. The text message contains at least two options, one of which is "data recovery". The data owner of the business data can perform a selected operation on the "data recovery" option, and the terminal device automatically jumps to the mobile application corresponding to the data management platform, triggering a data recovery request in the application.
[0204] In an embodiment of the present application, during the execution of a business, an error notification indicating a failure to access business data can enable a computer device to quickly locate the renamed data corresponding to the lost business data, and after querying the corresponding renamed data, a recovery reminder is sent to the data owner of the business data via instant messaging, so that the data owner of the business data can promptly discover the problem of business data loss, and the data owner can quickly trigger a data recovery request based on the recovery reminder, so that the computer device can quickly respond to the recovery request and repair the business data, and also enable the business platform to access data more efficiently. The above scheme can ensure the efficiency of the business during execution, while improving the efficiency of data management by the computer device.
[0205] In some embodiments, when a computer device receives a data deletion request, the renamed data is deleted; wherein the data deletion request is triggered by a data owner of the business data based on a recovery reminder.
[0206] In an embodiment of the present application, the recovery reminder also includes an option for triggering the computer device to perform a deletion operation on the renamed data. The data owner of the business data can trigger a request to delete the renamed data corresponding to the business data in the data management platform by performing a specified operation on the recovery request.
[0207] Optionally, in the case where the above-mentioned recovery reminder is sent via instant messaging, the instant messaging message (i.e., the recovery reminder) contains at least two options, one of which is "Delete Rename Data". The data owner of the business data can perform a selected operation on the "Delete Rename Data" option to trigger a data deletion request.
[0208] Optionally, the computer device sends a pop-up interface containing a recovery reminder to the data owner of the business data on the terminal interface. The pop-up interface contains at least two options, one of which is "Delete Rename Data". The data owner of the business data can perform a selected operation on the "Delete Rename Data" option to trigger a data deletion request.
[0209] Optionally, the computer device sends an email containing a recovery reminder to the data owner of the business data. The email contains a web link. The data owner of the business data can click on the web link to jump to the data management platform and trigger a data deletion request in the data management platform.
[0210] Optionally, the computer device sends a text message containing a recovery reminder to the data owner of the business data. The text message contains at least two options, one of which is "Delete Rename Data". The data owner of the business data can perform a selected operation on the "Delete Rename Data" option, and the terminal device will automatically jump to the mobile application corresponding to the data management platform, triggering a data deletion request in the application.
[0211] In an embodiment of the present application, the data owner of the business data can not only receive an immediate reminder of data loss through the recovery reminder, but can also independently choose whether to delete and rename the data. During the business execution process, with minimal computing resources, it is possible to achieve the effect of avoiding accidental deletion of data while reducing the occupancy of database space by invalid data.
[0212] The solutions shown in the above embodiments can be applied in the scenario of storage space management. In this application scenario, the solutions of the above embodiments are executed by a computer device, such as a business data management system (equivalent to the data management platform in the above embodiments). The rename data in the above solution corresponds to the rename data table in this application scenario, and the business data corresponds to the business data table in this application scenario; that is, the above rename data and business data are stored in the business data management system in the form of data tables, each data table can contain one or more data entries, and the business data management system performs management operations on the data table as an object, including rename operations, delete operations, etc.
[0213] Please refer to Figure 7 , Figure 7 This is a flow chart of a business data space management method provided by an embodiment of the present application. The above data processing method may include the following steps.
[0214] Step 710: When the existence duration of the business data table in the business data management system reaches a first duration threshold, a rename operation is performed on the business data table to obtain a renamed data table; the existence duration is the length of time the data table exists in the business data management system; the business data table is a data table accessed by the data table name during the execution of the business.
[0215] Step 720: When a request to restore the business data table is received and the existence time of the renamed data table does not reach the second time threshold, restore the business data table according to the renamed data table.
[0216] Step 730: When the existence time of the renamed data table reaches the second time threshold, delete the renamed data table.
[0217] In some embodiments, before the above step 730, the computer device may also extract time information from the rename data table, where the time information is used to indicate the time point when the rename data table is renamed; and obtain the duration between the time point indicated by the time information and the current time point as the existence duration of the rename data table.
[0218] In some embodiments, the computer device extracts the renaming time field in the data table name of the renamed data table to obtain the time information.
[0219] In some embodiments, before the above step 730, the computer device may also obtain the data table type of the business data table corresponding to the renamed data table; and obtain the second duration threshold according to the data table type of the business data table corresponding to the renamed data table.
[0220] In some embodiments, the data table type includes a registered data table or an unregistered data table; a registered data table is a data table that has life cycle information set by the data table owner, and an unregistered data table is a data table that does not have life cycle information set by the data table owner, and the life cycle information is used to indicate the upper limit of the duration of the data table's existence in the data management platform; when the data table type of the business data table is a registered data table, the second duration threshold is read from the life cycle information of the registration data table; when the data table type of the business data table is a unregistered data table, the second duration threshold set by the system is obtained.
[0221] In some embodiments, when the data table type of the business data table is a registration data table, the original data table name field in the data table name of the renamed data table is extracted to obtain the data table name of the business data table; the life cycle information corresponding to the data table name of the business data table is queried; and the second duration threshold is read from the queried life cycle information.
[0222] In some embodiments, the data table name of the renamed data table includes a data table type field; the computer device extracts the data table type field in the data table name of the renamed data table; and the data table type indicated by the extracted data table type field is obtained as the data table type of the business data table.
[0223] In some embodiments, before the above step 710, the computer device may also obtain a data table type of the business data table; and obtain the first duration threshold value according to the data table type of the business data table.
[0224] In some embodiments, the data table name of the renamed data table includes the original data table name field, and the original data table name field includes the data table name of the business data table; the above step 720 can be implemented by receiving a data table recovery request triggered by the data table owner of the business data table, and the data table recovery request includes the data table name of the business data table; when the renamed data table is queried through the data table name of the business data table, the data table name of the renamed data table is modified to the data table name of the business data table; and the existence duration of the business data table is reset.
[0225] In some embodiments, before receiving a data recovery request triggered by a data owner of business data, a computer device receives an error notification sent by the business corresponding to the business data table, where the error notification is sent by the business when access to the business data table fails, and the error notification contains the data table name of the business data table; when a renamed data table is found through the data table name of the business data table, a recovery reminder is sent to the data table owner of the business data table through instant messaging, where the recovery reminder is used to remind the data table owner to determine whether to restore the business data table; wherein the data table recovery request is triggered by the data table owner of the business data table based on the recovery reminder.
[0226] In some embodiments, upon receiving a data table deletion request, the computer device deletes and renames the data table; wherein the data table deletion request is triggered by a data table owner of the business data table based on a recovery reminder.
[0227] Please refer to Figure 8 , Figure 8 It is a flowchart of a business data space management method provided by an embodiment of the present application.
[0228] Figure 8 Part (a) shows the process of the business data management system 81 obtaining the rename data table 02 according to the business data table 01. The specific process is as follows:
[0229] The data table owner 83 uploads the business data table 01 to the business data management system 81 (step S1 ).
[0230] Among them, in the process of the data table owner 83 uploading the business data table 01 to the business data management system 81, if the data table owner 83 registers the life cycle information of the business data table 01, then the data type of the business data table 01 is registered data; conversely, if the data table owner 83 does not register the life cycle information of the business data table 01, then the data type of the business data table 01 is unregistered data.
[0231] The business data management system 81 obtains the existence time of the business data table 01 in the business data management system 81 (step S2 ).
[0232] For example, at a certain time 1 after step S1 is executed, the business data management system 81 can obtain the time 0 when the business data table 01 is uploaded, and obtain the duration between time 0 and time 1 as the existence duration of the business data table 01 in the business data management system 81 .
[0233] The business data management system 81 may obtain the data type (registered data or unregistered data) from the business data table 01, and obtain the first duration threshold according to the data type of the business data table.
[0234] Among them, if the data type of the business data table 01 is registration data, the business data management system 81 can obtain the above-mentioned first duration threshold from the life cycle information; conversely, if the data type of the business data table 01 is non-registration data, the business data management system 81 can obtain the default setting of the first duration threshold, and the default setting of the first duration threshold can be set by the developer or manager of the business data management system 81.
[0235] When the existence time of the business data table 01 in the business data management system 81 reaches the first time threshold, the business data management system 81 performs a renaming operation on the business data table 01 to obtain a renamed data table 02 (step S3).
[0236] The format of the data name of the above-mentioned renamed data table 02 may be as shown in the following Table 1.
[0237] Table 1
[0238] Data table type field Rename time fields Original data table name field
[0239] The data table type field in the above Table 1 can indicate the data type of the business data table 01 corresponding to the renamed data table 02. Optionally, the data table type field can also indicate that the data table is a data table obtained by the renaming operation. For example, when the data type of the business data table 01 is registered data, the value of the data table type field is "reg_rename_table", and when the data type of the business data table 01 is non-registered data, the value of the data table type field is "not_reg_rename_table". Regardless of whether the value of the data table type field is "reg_rename_table" or "not_reg_rename_table", it indicates that the data table is a data table obtained by the renaming operation.
[0240] The renaming time field in the above Table 1 can indicate the time point when the business data management system 81 performs the renaming operation on the business data; for example, assuming that the value of the renaming time field is "20240829", it means that the time point when the business data management system 81 performs the renaming operation on the business data is August 29, 2024.
[0241] The value of the original data table name field in the above Table 1 is the data table name of the business data table 01.
[0242] Among them, the business data management system 81 can compare the existence duration of the business data table 01 with the first duration threshold. If the existence duration of the business data table 01 is greater than or equal to the first duration threshold, it is considered that the existence duration of the business data table 01 has reached the first duration threshold; conversely, if the existence duration of the business data table 01 is less than the first duration threshold, it is considered that the existence duration of the business data table 01 has not reached the first duration threshold.
[0243] Figure 8 Part (b) shows the process of deleting the rename data table 02 after the business data management system 81 obtains the existence time of the rename data table 02 and when the existence time of the rename data table 02 reaches the second time threshold. The specific process is as follows:
[0244] The business data management system 81 extracts the renaming time field from the data table name of the renaming data table 02 (step S4), obtains the renaming time information, and obtains the renaming time point according to the renaming time information (step S5), that is, the time point when the business data management system 81 performs the renaming operation on the business data. At the same time, the business data management system 81 obtains the current time point; the business data management system 81 obtains the duration between the renaming time point and the current time point as the existence duration of the renaming data table 02 (step S6).
[0245] At the same time, the business data management system 81 extracts the data table type field from the data table name (step S7), and obtains the data type of the business data table 01 corresponding to the currently renamed data table 02 (ie, registered data and unregistered data in the figure).
[0246] When the data type of the business data table 01 is registered data, extract the original data table name field in the data table name of the renamed data table 02 (step S8), obtain the data table name of the business data table 01 based on the original data table name field, query the life cycle information corresponding to the data table name of the business data table 01 (step S9), and read the second duration threshold from the queried life cycle information (step S10), the second duration threshold is set by the data table owner; when the data type of the business data table 01 is non-registered data, obtain the second duration threshold set by the business data management system 81 (step S11).
[0247] Finally, when the existence time of the rename data table 02 reaches the second time threshold, the rename data table 02 is deleted (step S12).
[0248] Figure 8 Part (c) shows that when the existence time of the renamed data table 02 does not reach the second time threshold, the data table owner can trigger different requests to the business data management system 81 to implement the recovery operation of the business data table 01 / deletion operation of the renamed data table 02. The specific process is as follows:
[0249] When the business execution system 82 is executing business, if there is a failure in accessing the business data table 01, it will send an error notification 03 to the business data management system 81 (step S13). After the business data management system 81 receives the error notification 03 sent by the business execution system 82 corresponding to the business data table 01, it first obtains the data table name of the business data table 01 from the error notification 03 (step S14). If the existence duration of the renamed data table 02 does not reach the second duration threshold at this time, the business data management system 81 queries the renamed data table 02 through the data table name of the business data table 01. At this time, it can send a recovery reminder to the data table owner 83 of the business data table 01 through instant messaging (step S15).
[0250] After receiving the recovery reminder, the data table owner 83 may trigger a data table recovery request or a data table deletion request based on the recovery reminder (step S16 ); the data table recovery request / data table deletion request will be sent to the business data management system 81 .
[0251] After receiving the data table recovery request, the business data management system 81 obtains the data table name of the business data table 01 from the data table recovery request, then changes the data table name of the renamed data table 02 to the data table name of the business data table 01, and finally resets the existence duration of the business data table 01 (step S17).
[0252] After receiving the data table deletion request, the business data management system 81 deletes and renames the data table 02 (step S18).
[0253] Based on the above Figures 2 to 6 The steps in the embodiments of the present application illustrate a big data space governance solution based on data life cycle and rename buffer mechanism.
[0254] The above solution proposes a big data space governance solution based on data life cycle and rename buffer mechanism. Users can register through the front end and store the life cycle information of the data table in the database of the data table management platform. The data table management platform can realize the space resource management of big data by reading the life cycle information of the database and hive metadata, and solve the problems of data unregistered, data deleted by mistake, and data expired and deleted and cannot be restored through the rename buffer mechanism. Please refer to Fig. 9 , Fig. 9 It is a schematic diagram of the front-end interface of a data table management system provided by an embodiment of the present application.
[0255] The data owner can log in to the data table management platform 910 through an account, configure the data life cycle rules in the data table management platform 910, and the data life cycle information will be stored in the database. The life cycle information includes the database name, data table name, data table partitioning method, data retention days, data deadline, whether to retain the end-of-month slice, remarks, etc. The background script clears the data according to the front-end configuration information. If the data is not registered, the unregistered data will be deleted after the expiration threshold rule is triggered. Therefore, in theory, all data within the management scope should be registered for the life cycle.
[0256] In some embodiments, the administrator of the data table management platform can set an early warning threshold in the data table management platform, and the early warning threshold is used to indicate the upper limit of the number of early warnings issued in the data table management platform every day; in response to the number of resources in the data table management platform meeting the specified conditions, the data table management platform pushes an early warning to the data table owner. The number of resources can be any one of the number of data tables, the size of the space of the data table management platform, and the size of the space occupied by the data table; the specified conditions can be a specified number of data tables, a specified size of storage space, and the size of the space that the data table can occupy.
[0257] For example, please refer to Fig.10 , Fig.10 This is a flow chart of the overall solution provided by an embodiment of the present application. This solution includes the following steps:
[0258] Step S1001: Inventory the resources in the data table management platform through three dimensions
[0259] In an embodiment of the present application, the system administrator in the above-mentioned data table management platform can take inventory from three dimensions based on the resource situation in the data table management platform, and display the relevant information of the data in a large disk; wherein the above-mentioned large disk can be a display interface in the data table management platform, used to display the data table management platform to the data owner, and the above-mentioned resource situation refers to the data size in the data table management platform, or the storage space size in the data table management platform.
[0260] Among them, the first dimension of the above three dimensions can be the overall summary of resources in the data table management platform, including statistics on the total effective resources, resource usage, resource utilization rate and its trend chart (the trend chart can predict the future resource usage to a certain extent); the second dimension can be the database / data table situation, including the trend chart of the resources used by each database, the number of databases, the number of data tables, the number of partition tables and their trend charts, and statistics on the top 10 resource occupancy and the top 10 daily growth of statistical tables by day; the third dimension is the data owner situation, including the resource usage of each data owner, the over-limit situation, the top 10 occupied resources, and the top 10 daily growth.
[0261] Step S1002: Inventory space warning frequency
[0262] In an embodiment of the present application, after the data table management platform has taken inventory of the resource status in the data table management platform from three dimensions, if the inventory resource status meets the warning threshold, the data owner is pushed a space warning. The space warning is used to remind the data owner that the current data volume exceeds the specified data volume and needs to be deleted; wherein the warning threshold can be set by the administrator of the data table management platform.
[0263] In some embodiments, the above-mentioned space warning can be pushed automatically, for example, at a specified time every day.
[0264] In some embodiments, the data table management platform can obtain historical space warning situations through its own database, and take stock of the relevant situations of historical space warnings, and display the relevant situations in the dashboard. The relevant situations include but are not limited to: the total number of historical space warnings, the warning frequency within a specified time period, and the indication content of historical space warnings. Historical space warnings are space warnings pushed before the current space warning.
[0265] Step S1003: Incorporate into life cycle management
[0266] In an embodiment of the present application, when the data owner uploads but does not register the life cycle of the data table, the data table management platform reasonably configures the life cycle information of each business data table; after the data owner completes the registration of the data table life cycle on the front-end page, the data table management platform saves the data table with the registration and configured life cycle information into the database, and incorporates it into the life cycle management for management, wherein the life cycle information is used to indicate the upper limit time of the data table in the data table management platform, and the life cycle information includes but is not limited to the data table name, partition method, number of days for data retention, deadline, whether to retain the end-of-month slice, and remarks.
[0267] After the data owner submits the configuration information on the data table management platform, the administrator of the data table management platform will review and approve it to determine whether the life cycle setting of the business data table is reasonable. The basis for judgment can be whether the retention time of the data table is too long or too short.
[0268] Step S1004: Space warning notification
[0269] The data table management platform is equipped with an automatic push function for space warnings, which is used to push relevant content of the space warning frequency after taking inventory of the space warning frequency. The push methods include but are not limited to automatic push by robots within the work group, push of home page warnings on the large-scale platform, and email push, etc.
[0270] The total space warning of the data table management platform can be automatically pushed to the manager, and the database warning can be automatically pushed to the person in charge of the database. The relevant content of the space warning frequency can be pushed to the data owners corresponding to the relevant content according to the daily resource occupation TOP10 and daily growth TOP10. It can also be pushed to the corresponding data owners according to the resource usage, over-limit situation, resource occupation TOP10, and daily growth TOP10 of each data owner.
[0271] Step S1005: Daily cleaning and maintenance of space
[0272] In an embodiment of the present application, a data table management platform based on a rename buffer mechanism has an automatic cleanup script for cleaning up renamed data tables in the data table management platform whose duration has reached a specified duration threshold. The automatic cleanup script runs automatically at T+1 time.
[0273] In the above automatic cleanup script, the specific script settings are as follows:
[0274] Set the number of days to keep unregistered tables DEFAULT_RESERVE_DAYS, the number of days to provide buffer reminders after unregistered tables expire DEFAULT_PROTECT_DAYS, the number of days to provide continuous reminders before deleting a table DEFAULT_NOTIFY_AGO, the number of days to keep a registry table after renaming DEFAULT_REG_RENAME_RESERVE_DAYS, and the number of days to keep a non-registered table after renaming DEFAULT_REG_RENAME_RESERVE_DAYS.
[0275] In an embodiment of the present application, the data table management platform obtains the registered lifecycle information and hive metadata information in the database, and based on the registered lifecycle information and hive metadata information, obtains the data tables whose lifecycle information has been registered and whose lifecycle has expired and the data tables whose lifecycle information has not been registered and whose protection period has expired, and deletes them, that is, performs a cleanup operation (the protection period of unregistered data is DEFAULT_RESERVE_DAYS+DEFAULT_PROTECT_DAYS).
[0276] In some embodiments, after obtaining the lifecycle information registered in the database and the hive metadata information, the data table management platform sends the expiring data table to the data owner corresponding to the data table via email to remind the data owner that the data table is about to expire.
[0277] In some embodiments, based on the rename buffer mechanism, there is a buffer period in the data table management platform, namely, a protection period. When a business data table that is cleared during the protection period needs to be restored, the data table management platform will restore the business data table by renaming.
[0278] When the big data space governance solution runs for a long time or the space resource warnings on the data table management platform are frequent, the unreasonable life cycle information can be changed in time through the stock life cycle transformation. At the same time, the space management scope can be expanded, and the data that has not been cleared after multiple warnings can be manually cleared.
[0279] For example, please refer to Fig.11 , Fig.11 This is a schematic diagram of a cleanup process without a rename mechanism provided by an embodiment of the present application. The specific process is as follows:
[0280] Step S10: traverse all tables in the library.
[0281] In an embodiment of the present application, the data table management platform traverses all data tables in the database to obtain information on whether the data tables have been registered.
[0282] Step S11: extracting a data table type field in the data table name of the data table, and acquiring the data table type indicated by the extracted data table type field as the data table type of the data table.
[0283] Get the valid registry information and unregistered registry information respectively.
[0284] In some embodiments, the data table management platform queries the data table name in the database and extracts the data table type field in the data table name of the data table; the data table type indicated by the extracted data table type field is obtained as the data table type of the data table, and the data table type includes registered data tables and unregistered data tables.
[0285] 1) Obtaining valid registry information: In an embodiment of the present application, the data table management platform queries the life cycle information corresponding to the registry, obtains the existence time threshold in the life cycle information, and the existence time threshold is used to indicate the upper limit of the length of time that the data table can exist in the database. The registry whose existence time does not exceed the life cycle is obtained as a valid registry.
[0286] 2) Obtaining unregistered table information: In an embodiment of the present application, the data table management platform queries for data tables that do not have lifecycle information set by the data owner as unregistered tables, and obtains the existence time threshold of the unregistered table. The existence time threshold of the unregistered table is preset by the administrator of the data table management platform.
[0287] Step S12 - 1 : In response to the existence time of the registration table satisfying the existence time threshold, deleting the valid registration table and the corresponding registration information.
[0288] In an embodiment of the present application, when the data type of the data table is a registration data table, an existence duration threshold is obtained from the life cycle information of the registration data table, and the existence duration threshold is used to indicate the upper limit of the time that the registration data table can exist in the database; in response to the existence duration of the registration table satisfying the existence duration threshold, the data table management platform deletes the valid registration table and the corresponding registration information.
[0289] Step S12-1: In response to the existence time of the unregistered records in the data table management platform meeting the existence time threshold, the unregistered expiration table is deleted.
[0290] In an embodiment of the present application, the data table management platform obtains a registration time threshold preset by an administrator of the data table management platform, and deletes the unregistered expiration table in response to the existence time of the unregistered table in the data table management platform satisfying the existence time threshold.
[0291] Step S13-1: reminding the registered table that is about to expire.
[0292] In an embodiment of the present application, the data table management platform sends a reminder message to the data owner corresponding to the registry when the existence time of the registry table differs from the existence time threshold by a specified time and the existence time does not exceed the existence time threshold. The reminder message is used to remind the data owner that the current data table is about to expire.
[0293] Step S13-2: reminding the unregistered tables that are about to expire.
[0294] In an embodiment of the present application, the data table management platform sends a reminder message to the data owner corresponding to the unregistered table when the existence time of the unregistered table differs from the existence time threshold by a specified time and the existence time does not exceed the existence time threshold. The reminder message is used to remind the data owner that the current unregistered table is about to expire.
[0295] Step S14: write back to the database and mark the table as deleted.
[0296] In the embodiments of the present application, Fig.11 The method shown cleans and deletes valid registered data tables and unregistered data tables respectively, obtains registered data table information through the database, and obtains unregistered data table information through hive metadata, which can realize regular data cleaning, release data table management platform space, and reduce manpower burden; however, the data cannot be restored after being cleaned, the following problems will occur:
[0297] (1) After the data owner creates a hive table, if he forgets to register the life cycle of the data table, the data in the data table can be easily cleared.
[0298] (2) After the data owner sets the life cycle of a data table, if the data in the data table still needs to be used after the expiration date but the data owner forgets to extend the life cycle, the data will be deleted.
[0299] (3) The data volume of the full partition table is large. If the data owner does not set the life cycle, all partition data will be deleted. Setting the life cycle will occupy too much space resources.
[0300] In order to solve the problem of accidental data deletion, a rename mechanism and a multi-layer reminder mechanism are added on the basis of automated space management based on the data life cycle. On the basis of the automated management method that frees up space and reduces the manpower burden, the risks brought by automated data deletion are reduced.
[0301] based on Fig.11 , please refer to Fig.12 , Fig.12 It is a schematic diagram of a cleanup process solution for adding a rename mechanism provided in an embodiment of the present application.
[0302] This program includes the following steps:
[0303] Step 121: traverse the non-rename table and the rename table in the library.
[0304] In an embodiment of the present application, the data table management platform traverses the database X included in the lifecycle management, obtains the list of all non-rename table names not_rename_tables and the list of all rename table names rename_tables in the database X, so as to obtain all non-rename tables and renamed tables.
[0305] Step 122: Delete the expired rename table.
[0306] The data table management platform extracts time information from the renamed data table, where the time information is used to indicate the time point when the renamed data table is renamed; the duration between the time point indicated by the time information and the current time point is obtained as the existence duration of the renamed data table; and when the existence duration of the renamed data table reaches a duration threshold, the renamed data table is deleted, where the duration threshold is used to indicate the upper limit of the existence duration of the renamed data table in the data table management platform.
[0307] In an embodiment of the present application, the data table management platform deletes the expired rename table in the database, and returns the deleted registered table name to traverse rename_tables. If the table name starts with "reg_rename_table" or "not_reg_rename_table", it is split (see the subsequent rename rules for the splitting rules), and the YYYYMMDD format time at the time of rename is obtained through splitting, and it is determined whether the renaming operation time of the current rename table exceeds the set buffer time. If it exceeds, the rename data table is deleted, and a list of deleted registered table original information is returned.
[0308] Step 123: Write back to the database and mark the table as deleted.
[0309] The registered original information list returned in step 122 is written back to the database table, and a deletion due mark is added.
[0310] Step 124: Obtain valid registration information.
[0311] Gets the effective registry lifecycle information in the database.
[0312] In an embodiment of the present application, the data table management platform can query valid registration information through the database table and hive metadata to obtain the data table information reg_tables_dict_valid in the database table, including the library name, partition name, partition type, retention days, data deadline and other registered data life cycle information.
[0313] Step 124-1: Expiration table rename operation.
[0314] In an embodiment of the present application, when the existence time of the registration data table in the data management platform reaches a specified time threshold, a renaming operation is performed on the registration data table.
[0315] Please refer to Fig.13 , Fig.13 It is a flowchart of renaming registration data provided by an embodiment of the present application.
[0316] Step S131: Determine whether the validity period has expired.
[0317] After the registration table information is obtained, it is determined whether the existence time of the valid registration table in the data management system exceeds the validity time.
[0318] Step S131 - 1 : Rename.
[0319] Based on step S131, when the existence time of the registration data table in the data management platform reaches the effective time threshold, the registration data table is renamed.
[0320] Step S132: Determine whether a reminder is triggered.
[0321] Based on step S131, when the existence time of the registration data table in the data management platform does not reach the effective time threshold, it is determined whether the existence time reaches the reminder time.
[0322] Step S132-1: Email reminder.
[0323] When the existence time of the registration data table in the data management platform has not reached the effective time, and when the existence time has reached the reminder time, an email is sent to the data owner to remind him / her.
[0324] Step S133: Determine whether it is a partition table.
[0325] When the existence time of the registration data table in the data management platform does not reach the effective time, and when the existence time does not reach the reminder time, it is determined whether the registration table is a partition table.
[0326] Step S133-1: Enter the partition cleaning program.
[0327] Based on step S133, when the registry table belongs to a partition table, the data management system enters the partition cleaning program to clean up the partition corresponding to the registry table.
[0328] Based on step S133, when the registration table does not belong to the partition table, the process returns to the start step.
[0329] Get reg_tables_dict_valid obtained in step 124, and determine whether the registration data table has expired based on the data deadline. If it has expired, enter the renaming phase and execute step 124-1.
[0330] Step 124-2: Remind the registered tables that are about to expire.
[0331] When the existence time of the registration data table in the data management platform does not reach the specified time, it is determined whether the current date meets the date for triggering the reminder. If so, the data management platform activates email reminders and work group robot reminders.
[0332] Step 124-3: Clean up expired partitions.
[0333] Determine whether the registration data table is a partition table. If it is a partition table, clear outdated partitions according to the registration information.
[0334] In the embodiment of the present application, after entering the renaming program, the data management platform formulates the table name according to the registry renaming rules, adds the prefix "reg_rename_table_", and adds the system's current date in the format of YYYYMMDD, followed by the original table name. All partitions of the data table are obtained through hive, and the partition format part_way is matched by regular expressions. The corresponding mode is set according to the four partition types of hours, days, months, and years. All partitions are traversed. If the partition can match the corresponding mode and is outside the validity period protect_date (protect_date = date of operation today - valid number of days registered), the partition data is deleted.
[0335] Please refer to Table 2, which shows the modes corresponding to different partition types.
[0336] Table 2
[0337] Partition Type Regular expression matching model The partition where the protection period starts Hour \w*_20\d* part_way_20\d{8}$ protect_date+00 sky \w*_20\d* part_way_20\d{6}$ protect_date moon \w*_20\d* part_way_20\d{4}$ protect_date[0:6] Year \w*_20\d* part_way_20\d{2}$ protect_date[0:4]
[0338] Step 125: Obtain unregistered data information.
[0339] By combining the registry information obtained in step 124 with the hive metadata, the unregistered table is obtained by excluding the registry in step 124. In the embodiment of the present application, the data management platform queries the hive metadata for data not included in the registry, obtains the data as the unregistered table, and obtains the registry information corresponding to the unregistered table.
[0340] Step 125-1: Remind the unregistered tables that are about to expire.
[0341] In an embodiment of the present application, after obtaining the unregistered table, the data management platform obtains its existence time and determines whether the existence time meets the effective time. The effective time is used to indicate the upper limit of the time that the unregistered table can exist. When the existence time of the unregistered table exceeds the effective time, the renaming procedure is entered; when the existence time of the unregistered table does not exceed the effective time, it is determined whether to trigger a reminder; if the reminder is triggered, the data management platform starts email reminders and work group robot reminders, and the unregistered table will not perform partition granularity management and rename expired unregistered data. After entering the renaming stage, the table name is formulated according to the unregistered table renaming rules, with the prefix "not_reg_rename_table_", and the system's today's date in the format of YYYYMMDD is added, followed by the original table name.
[0342] Step 125-2: Clean up the unregistered expiration table.
[0343] This solution can achieve the following beneficial effects:
[0344] 1) This solution stores data lifecycle information in the database through front-end registration, and realizes the automation of spatial resource management of big data by reading the database lifecycle information and hive metadata information, which can release a lot of manpower and facilitate unified management of all resources.
[0345] 2) This solution establishes a resource usage dashboard and a data status dashboard at the same time, which displays data analysis from multiple dimensions, such as resources, data owners, database / data table resource usage, daily additions, etc., and implements early warning push and daily ranking push by setting thresholds, so that data space managers and data owners can better understand the data space situation.
[0346] 3) This solution automatically deletes expired data through lifecycle information and solves the problem of accidental deletion of important data based on the rename buffer mechanism. It does not occupy backup resources. The data owner can restore the accidentally deleted data within the set cache date range. And because the data in all spaces is uniformly managed and automatically cleared, there will be no omission of expired data.
[0347] In summary, this solution realizes automatic maintenance of space resources and optimizes space resources of big data through data life cycle and hive metadata; it solves the problem of accidental data deletion through rename buffer mechanism and multi-layer reminder mechanism, greatly reducing the risk of data management.
[0348] The above is only an embodiment of the present application and should not be regarded as limiting the present application. Professionals should understand that various deformations and modifications can be made to the embodiments to adapt to different application requirements. Therefore, the scope of the present application should be limited by the claims attached to the claims.
[0349] Please refer to Fig.14 , which shows a block diagram of a data processing device provided by an exemplary embodiment of the present application, the data processing device can be implemented as all or part of a computer device by hardware or a combination of hardware and software to achieve the above Figures 2 to 6 All or part of the steps in the illustrated embodiments.
[0350] like Fig.14 As shown, the data processing device includes:
[0351] The renaming operation execution module 1401 is used to perform a renaming operation on the business data to obtain renamed data when the existence time of the business data in the data management platform reaches a first time threshold; the existence time is the time the data exists in the data management platform; the business data is the data accessed by the data name during the execution of the business;
[0352] The service data recovery module 1402 is used to recover the service data according to the renamed data when a request for recovering the service data is received and the existence time of the renamed data does not reach a second time threshold;
[0353] The rename data deletion module 1403 is configured to delete the rename data when the existence duration of the rename data reaches a second duration threshold.
[0354] In some embodiments, the apparatus further comprises:
[0355] a time information extraction module, used to extract time information from the renamed data before deleting the renamed data when the existence time of the renamed data reaches a second time threshold, the time information being used to indicate a time point when the renamed data is renamed;
[0356] The existence duration acquisition module is used to acquire the duration between the time point indicated by the time information and the current time point as the existence duration of the renamed data before deleting the renamed data when the existence duration of the renamed data reaches a second duration threshold.
[0357] In some embodiments, the time information extraction module is used to extract the renaming time field in the data name of the renamed data to obtain the time information.
[0358] In some embodiments, the apparatus further comprises:
[0359] A data type acquisition module, used to acquire the data type of the business data corresponding to the renamed data before deleting the renamed data when the existence time of the renamed data reaches a second time threshold;
[0360] The second duration threshold acquisition module is used to acquire the second duration threshold according to the data type of the business data corresponding to the renamed data before deleting the renamed data when the existence duration of the renamed data reaches the second duration threshold.
[0361] In some embodiments, the data type includes registered data or unregistered data; registered data is data with life cycle information set by the data owner, and unregistered data is data without life cycle information set by the data owner, and the life cycle information is used to indicate the upper limit of the time period that the data exists in the data management platform;
[0362] In the case where the data type of the service data is registration data, a second duration threshold acquisition module is used to read the second duration threshold from the life cycle information of the registration data;
[0363] In the case that the data type of the service data is non-registration data, the second duration threshold acquisition module is used to acquire a second duration threshold set by the system.
[0364] In some embodiments, the second duration threshold acquisition module is used to extract the original data name field in the data name of the renamed data to obtain the data name of the business data when the data type of the business data is registration data; query the life cycle information corresponding to the data name of the business data; and read the second duration threshold from the queried life cycle information.
[0365] In some embodiments, the data name of the renamed data includes a data type field;
[0366] The data type acquisition module is used to extract the data type field in the data name of the renamed data; and obtain the data type indicated by the extracted data type field as the data type of the business data.
[0367] In some embodiments, the apparatus further comprises:
[0368] A business data type acquisition module, used to perform a renaming operation on the business data when the existence time of the business data in the data management platform reaches a first time threshold, and obtain the data type of the business data before obtaining the renamed data;
[0369] The first duration threshold acquisition module is used to perform a renaming operation on the business data when the existence duration of the business data in the data management platform reaches the first duration threshold, and obtain the first duration threshold according to the data type of the business data before obtaining the renamed data.
[0370] In some embodiments, the data name of the renamed data includes the original data name field, and the original data name field includes the data name of the business data; the business data recovery module 1402 is used to receive a data recovery request triggered by the data owner of the business data, and the data recovery request includes the data name of the business data; when the renamed data is queried through the data name of the business data, the data name of the renamed data is modified to the data name of the business data; and the existence duration of the business data is reset.
[0371] In some embodiments, the apparatus further comprises:
[0372] An error notification receiving module is used to receive an error notification sent by a business corresponding to the business data before the data recovery request receiving module receives a data recovery request triggered by the data owner of the business data. The error notification is sent by the business when access to the business data fails, and the error notification contains the data name of the business data;
[0373] A recovery reminder sending module is used to send a recovery reminder to the data owner of the business data through instant messaging when the renamed data is queried through the data name of the business data. The recovery reminder is used to remind the data owner to determine whether to restore the business data;
[0374] The data recovery request is triggered by the data owner of the business data based on the recovery reminder.
[0375] In some embodiments, the apparatus further comprises:
[0376] The rename data deletion module 1403 is used to delete the rename data when receiving a data deletion request;
[0377] The data deletion request is triggered by the data owner of the business data based on a recovery reminder.
[0378] Please refer to Fig.15 , Fig.1515 is a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. The computer device 1500 includes a central processing unit (CPU) 1501, a system memory 1504 including a random access memory (RAM) 1502 and a read-only memory (ROM) 1503, and a system bus 1505 connecting the system memory 1504 and the central processing unit 1501. The computer device 1500 also includes a basic input / output system (I / O system) 1506 that helps transmit information between various devices in the computer, and a large-capacity storage device 1507 for storing an operating system 1513, application programs 1514 and other program modules 1515.
[0379] The basic input / output system 1506 includes a display 1508 for displaying information and an input device 1509 such as a mouse and a keyboard for user inputting information. The display 1508 and the input device 1509 are connected to the central processing unit 1501 through an input / output controller 1510 connected to the system bus 1505. The basic input / output system 1506 may also include an input / output controller 1510 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1510 also provides output to a display screen, a printer, or other types of output devices.
[0380] The mass storage device 1507 is connected to the central processing unit 1501 through a mass storage controller (not shown) connected to the system bus 1505. The mass storage device 1507 and its associated computer readable medium provide non-volatile storage for the computer device 1500. That is, the mass storage device 1507 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0381] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM (Random Access Memory), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory 1504 and mass storage device 1507 can be collectively referred to as memory.
[0382] The computer device 1500 can be connected to the Internet or other network devices through a network interface unit 1511 connected to the system bus 1505 .
[0383] The memory also includes one or more programs, which are stored in the memory. The central processing unit 1501 implements the one or more programs by executing the one or more programs. Figures 2 to 6 All or part of the steps in the method shown.
[0384] In an exemplary embodiment, a chip is also provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement all or part of the steps of the method shown in the above embodiments of the present application.
[0385] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement all or part of the steps of the method shown in the above-mentioned various embodiments of the present application.
[0386] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement all or part of the steps of the method shown in the above-mentioned embodiments of the present application.
[0387] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0388] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0389] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: When the existence time of the business data in the data management platform reaches a first time threshold, a renaming operation is performed on the business data to obtain renamed data; the existence time is the time the data exists in the data management platform; the business data is data accessed by the data name during the execution of the business; When a request to restore the service data is received and the existence time of the renamed data does not reach a second time threshold, restore the service data according to the renamed data; When the existence time of the renamed data reaches the second time threshold, the renamed data is deleted.
2. The method according to claim 1, characterized in that When the existence time of the rename data reaches the second time threshold, before deleting the rename data, the method further includes: Extracting time information from the rename data, the time information being used to indicate a time point when the rename data is renamed; The duration between the time point indicated by the time information and the current time point is acquired as the existence duration of the renamed data.
3. The method according to claim 2, characterized in that The extracting time information from the renaming data comprises: The renaming time field in the data name of the renaming data is extracted to obtain the time information.
4. The method according to any one of claims 1 to 3, characterized in that: When the existence time of the rename data reaches a second time threshold, before deleting the rename data, the method further includes: Obtain the data type of the business data corresponding to the rename data; The second duration threshold is acquired according to the data type of the business data corresponding to the renaming data.
5. The method according to claim 4, characterized in that The data type includes registered data or unregistered data; the registered data is data with life cycle information set by the data owner, and the unregistered data is data without life cycle information set by the data owner, and the life cycle information is used to indicate the upper limit of the time period for which the data exists in the data management platform; The acquiring the second duration threshold according to the data type of the business data corresponding to the rename data includes: In a case where the data type of the service data is registration data, reading the second duration threshold from the life cycle information of the registration data; When the data type of the service data is non-registration data, the second duration threshold set by the system is obtained.
6. The method according to claim 5, characterized in that When the data type of the service data is registration data, reading the second duration threshold from the life cycle information of the registration data includes: In the case where the data type of the business data is registration data, extracting the original data name field in the data name of the renamed data to obtain the data name of the business data; Querying the life cycle information corresponding to the data name of the business data; The second duration threshold is read from the queried life cycle information.
7. The method according to claim 4, characterized in that The data name of the renamed data includes a data type field; The acquiring the data type of the business data corresponding to the renaming data includes: Extracting a data type field in the data name of the renamed data; The data type indicated by the extracted data type field is obtained as the data type of the business data.
8. The method according to any one of claims 1 to 7, characterized in that: When the existence time of the business data in the data management platform reaches the first time threshold, performing a renaming operation on the business data, before obtaining the renamed data, further comprising: Acquire the data type of the business data; The first duration threshold is obtained according to the data type of the service data.
9. The method according to any one of claims 1 to 8, characterized in that: The data name of the renamed data includes an original data name field, and the original data name field includes the data name of the business data; when a request to restore the business data is received and the existence time of the renamed data does not reach a second time threshold, restoring the business data according to the renamed data, comprises: Receiving a data recovery request triggered by a data owner of the business data, wherein the data recovery request includes a data name of the business data; In the case where the renamed data is found through the data name of the business data, the data name of the renamed data is modified to the data name of the business data; Reset the existence time of the service data.
10. The method according to claim 9, characterized in that Before receiving the data recovery request triggered by the data owner of the business data, the method further includes: receiving an error notification sent by a service corresponding to the service data, wherein the error notification is sent by the service when access to the service data fails, and the error notification includes a data name of the service data; In the case where the renamed data is found through the data name of the business data, a restoration reminder is sent to the data owner of the business data through instant messaging, wherein the restoration reminder is used to remind the data owner to determine whether to restore the business data; The data recovery request is triggered by the data owner of the business data based on the recovery reminder.
11. The method according to claim 10, characterized in that The method further comprises: Upon receiving a data deletion request, deleting the renamed data; The data deletion request is triggered by the data owner of the business data based on the recovery reminder.
12. A data processing device, characterized in that: The device comprises: A renaming operation execution module, configured to execute a renaming operation on the business data in the data management platform to obtain renamed data when the existence time of the business data in the data management platform reaches a first time threshold; the existence time is the time the data exists in the data management platform; the business data is data accessed by the data name during the execution of the business; A business data recovery module, configured to recover the business data according to the rename data when a request to recover the business data is received and the existence time of the rename data does not reach a second time threshold; The rename data deletion module is used to delete the rename data when the existence time of the rename data reaches the second time threshold.
13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the computer program is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the data processing method according to any one of claims 1 to 11.
