Data processing method and device, electronic equipment, storage medium and program product
By configuring index information for deletion time and identifiers for the recycle bin, metadata that meets the conditions can be filtered and deleted, thus solving the problem of low recycle bin management efficiency and achieving efficient recycle bin management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGKE TENGLONG INFORMATION TECH CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-30
Smart Images

Figure CN122308725A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed storage technology, and in particular to a data processing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] With the explosive growth of unstructured data, object storage systems have become the mainstream storage architecture due to their high scalability and low cost, and recycle bin technology has become an important data protection solution for object storage systems.
[0003] In related technologies, when managing recycling bins, a sequential scanning method can be used to identify expired unstructured data and delete it.
[0004] However, the above methods are less efficient in managing recycle bins when there are many recycle bins or a lot of unstructured data in the recycle bins. Summary of the Invention
[0005] This application provides a data processing method, apparatus, electronic device, storage medium, and program product to solve the technical problem of low efficiency in managing recycling stations.
[0006] Firstly, this application provides a data processing method, including:
[0007] Receive a deletion operation for the first object in the storage space, and obtain the first metadata of the first object, the identifier of the first object, and the deletion time of the first object;
[0008] The first index information and the first metadata are stored in the recycle bin corresponding to the storage space. The first index information includes the deletion time of the first object and the identifier of the first object.
[0009] Based on the first index information, the second metadata is determined in the first metadata, and the deletion time of the first object corresponding to the second metadata meets the preset conditions;
[0010] The system retrieves the number of second metadata entries and deletes them from the recycle bin when the number of second metadata entries is greater than or equal to a first threshold.
[0011] In this embodiment, second metadata can be determined from the first metadata based on the first index information, and the second metadata in the recycle bin can be deleted based on the number of second metadata obtained, thus solving the problem of low efficiency in traditional recycle bin management.
[0012] Optionally, as described above, the recycle bin includes multiple first index information; based on the first index information, second metadata is determined from the first metadata, including:
[0013] Determine the first index identifier that each coroutine needs to process;
[0014] Based on multiple first index information and first index identifiers in the recycle bin, multiple coroutines corresponding to the recycle bin are determined;
[0015] Multiple coroutines are used to process multiple first index information to identify second metadata in the first metadata.
[0016] In this embodiment, the unique identification of index information and the accurate division of coroutine tasks are achieved by combining the first index identifier, so that each coroutine only processes its own index task, realizing the concurrency of index processing in the recycle bin, improving the identification efficiency of the second metadata, and at the same time, accurate identifier matching can avoid task conflicts and data omissions, ensuring the accuracy and stability of expired metadata screening.
[0017] Optionally, the method described above determines multiple coroutines corresponding to the recycle bin based on multiple first index information and first index identifiers in the recycle bin, including:
[0018] The second index identifier is determined based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin;
[0019] Based on the first index identifier and the second index identifier, multiple coroutines corresponding to the recycle bin are determined.
[0020] In this embodiment, by combining the space identifier of the storage space with the first index identifier to determine the second index identifier, and then determining the coroutine corresponding to the recycle bin, the scanning tasks of different recycle bins can be broken up, ensuring that the recycle bins corresponding to single storage space and multiple storage spaces can achieve coroutine-level concurrent scanning, improving scanning efficiency, while avoiding task allocation conflicts and omissions, and optimizing the overall processing performance of the recycle bin.
[0021] Optionally, the method described above processes multiple first index information to identify second metadata within the first metadata, including:
[0022] Among the multiple deletion times of the first index information, the target deletion time is obtained, and the time difference between the target deletion time and the current time is greater than or equal to the second threshold.
[0023] Obtain the identifier of the first object corresponding to the target deletion time, and based on the identifier of the first object corresponding to the target deletion time, determine the first metadata of the first object corresponding to the target deletion time as the second metadata.
[0024] In this embodiment, by using the first index information stored in an ordered manner according to the deletion time, the target deletion time is filtered by the second threshold, and then the first object is associated with the first metadata through the identifier. This not only avoids invalid scanning and improves filtering efficiency by leveraging the time order, but also ensures the accuracy of metadata matching through the unique identifier. This allows for the rapid and accurate identification of the second metadata that needs to be cleaned up from the recycle bin.
[0025] Alternatively, the method described above may also include:
[0026] Get the name of the first object;
[0027] The second index information is stored in the recycle bin corresponding to the storage space. The second index information includes the name of the first object, the identifier of the first object, and the deletion time.
[0028] In this embodiment, by obtaining the name of the first object and storing second index information containing the name of the first object, the identifier of the first object, and the deletion time in the corresponding recycle bin, and the second index information being sorted based on the name of the first object, the recycle bin metadata can be stored in a structured manner by name. This allows users to quickly locate the target when they need to query the metadata in the recycle bin that starts with a certain prefix, thus improving query efficiency.
[0029] Alternatively, the method described above may also include:
[0030] Receive query operations for third-party metadata in the recycle bin and obtain the first name corresponding to the third-party metadata;
[0031] Based on the second index information and the first name, determine the name of the first object that matches the first name;
[0032] Retrieve third metadata based on the name of the first object that matches the first name.
[0033] In this embodiment, by combining the second index information with the characteristic of the first object being stored in an orderly manner according to its name, the complete name of the object in the recycle bin can be accurately matched according to the first name queried by the user. This can quickly locate the target metadata location, achieve efficient retrieval of object name prefix or complete name, avoid invalid scanning, improve the query efficiency of third metadata, and at the same time, accurate name matching can ensure the accuracy of query results, providing users with a convenient recycle bin metadata retrieval experience.
[0034] Secondly, this application provides a data processing apparatus, comprising:
[0035] The acquisition module is used to receive a deletion operation for the first object in the storage space, and to acquire the first metadata of the first object, the identifier of the first object, and the deletion time of the first object.
[0036] The storage module is used to store first index information and first metadata in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object.
[0037] The determination module is used to determine the second metadata based on the first index information in the first metadata, wherein the deletion time of the first object corresponding to the second metadata meets the preset conditions;
[0038] The deletion module is used to obtain the number of second metadata and delete the second metadata in the recycle bin when the number of second metadata is greater than or equal to a first threshold.
[0039] Optionally, the above-described device determines the specific use of the module.
[0040] Determine the first index identifier that each coroutine needs to process;
[0041] Based on multiple first index information and first index identifiers in the recycle bin, multiple coroutines corresponding to the recycle bin are determined;
[0042] Multiple coroutines are used to process multiple first index information to identify second metadata in the first metadata.
[0043] Optionally, the above-described device determines the specific use of the module.
[0044] The second index identifier is determined based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin;
[0045] Based on the first index identifier and the second index identifier, multiple coroutines corresponding to the recycle bin are determined.
[0046] Optionally, the above-described device determines the specific use of the module.
[0047] Among the multiple deletion times of the first index information, the target deletion time is obtained, and the time difference between the target deletion time and the current time is greater than or equal to the second threshold.
[0048] Obtain the identifier of the first object corresponding to the target deletion time, and based on the identifier of the first object corresponding to the target deletion time, determine the first metadata of the first object corresponding to the target deletion time as the second metadata.
[0049] Optionally, the above-described apparatus further includes a first processing module, the first processing module being used for,
[0050] Get the name of the first object;
[0051] The second index information is stored in the recycle bin corresponding to the storage space. The second index information includes the name of the first object, the identifier of the first object, and the deletion time.
[0052] Optionally, the above-described apparatus further includes a second processing module, the second processing module being used for,
[0053] Receive query operations for third-party metadata in the recycle bin and obtain the first name corresponding to the third-party metadata;
[0054] Based on the second index information and the first name, determine the name of the first object that matches the first name;
[0055] Retrieve third metadata based on the name of the first object that matches the first name.
[0056] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0057] The memory stores the instructions that the computer executes;
[0058] The processor executes computer-executable instructions stored in memory to implement the method as described in the first aspect.
[0059] The electronic device provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0060] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a computer, are used to implement the method as described in the first aspect.
[0061] The computer-readable storage medium provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0062] Fifthly, this application provides a computer program product, including a computer program, which, when executed by a computer, is used to implement the method of the first aspect.
[0063] The computer program product provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0064] The data processing method, apparatus, electronic device, storage medium, and program product provided in this application, when the storage space has its recycle bin function enabled, can receive a deletion operation on a first object in the storage space, obtain the first metadata of the first object, the identifier of the first object, and the deletion time of the first object. The first metadata may refer to a set of attribute information used to describe the first object. The identifier of the first object may refer to a unique combination of numbers and / or characters assigned by the object storage system to each created object. The deletion time of the first object may refer to the timestamp of the deletion operation performed on the first object. First index information and first metadata are stored in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object. The first index information may refer to structured index data configured for the recycle bin. Based on the first index information, second metadata is determined from the first metadata. The second metadata may refer to the metadata of objects in the recycle bin that have reached their maximum storage time and need to be completely deleted. The deletion time of the first object corresponding to the second metadata meets a preset condition. The quantity of the second metadata is obtained, and when the quantity of the second metadata is greater than or equal to a first threshold, the second metadata in the recycle bin is deleted. In this way, the above method can determine the second metadata from the first metadata based on the first index information, and delete the second metadata in the recycle bin based on the number of second metadata obtained, thus solving the problem of low efficiency in traditional recycle bin management. Attached Figure Description
[0065] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0066] Figure 1 A schematic diagram illustrating the process of deleting unstructured data provided in an embodiment of this application;
[0067] Figure 2 This is a schematic diagram illustrating one application scenario of this application;
[0068] Figure 3 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0069] Figure 4 A schematic diagram illustrating the metadata scanning and deletion process provided in this application embodiment;
[0070] Figure 5 A schematic diagram illustrating the process of determining the second metadata provided in this application embodiment;
[0071] Figure 6 A schematic diagram of the rules provided for an embodiment of this application;
[0072] Figure 7A schematic diagram illustrating the metadata query process provided in this application embodiment;
[0073] Figure 8 A flowchart illustrating the complete data processing method provided in the application embodiment;
[0074] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0075] Figure 10 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application;
[0076] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0077] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0078] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0079] With object storage systems becoming the mainstream storage architecture for unstructured data, recycle bin technology is widely used as a data protection solution. When deleting unstructured data, the unstructured data can be left in the recycle bin. After the unstructured data expires, it can be completely deleted, thus balancing the needs of data protection and storage resource release.
[0080] In the above scenario, the method for deleting unstructured data in the recycle bin is a sequential scan. This means that the recycle bins are scanned one by one according to the order in which they were opened. After the expired unstructured data in a single storage space is scanned and deleted, the process moves on to the next storage space's recycle bin. Alternatively, for a single recycle bin, the unstructured data within it can be scanned sequentially according to its order to identify and delete expired unstructured data. However, managing a large number of recycle bins or a large amount of unstructured data within them results in low efficiency.
[0081] Next, below, in combination Figure 1 This paper explains the process of deleting unstructured data in related technologies.
[0082] Figure 1 This is a schematic diagram illustrating the process of deleting unstructured data provided in an embodiment of this application, as shown below. Figure 1 As shown, the recycle bin contains the following unstructured data: 1_1_seq1, 1_2_seq2, ..., 1_10_seq10. All of these unstructured data are expired. First, these unstructured data are scanned sequentially until a preset number (e.g., 5) of unstructured data to be deleted (1_1_seq1, 1_2_seq2, ..., 1_5_seq5) are found in the recycle bin. Then, the preset number of unstructured data to be deleted (1_1_seq1, 1_2_seq2, ..., 1_5_seq5) are deleted. After the deletion is completed, the remaining unstructured data is scanned sequentially starting from 1_6_seq6 until the next preset number of unstructured data to be deleted (1_5_seq5, 1_6_seq6, ..., 1_10_seq10) are found. Then, the deletion continues until all expired unstructured data in the recycle bin is deleted. Therefore, deleting items only after scanning is less efficient for managing the recycle bin.
[0083] Therefore, this application provides a data processing method that configures a first index information containing the deletion time and identifier of a first object in the recycle bin of the storage space, and filters out second metadata whose deletion time meets preset conditions based on the first index information. At the same time, a first threshold is set and a deletion operation is performed when the number of second metadata reaches the first threshold. This method can quickly locate expired metadata directly through the first index information in the recycle bin without scanning the metadata in a single recycle bin one by one. This reduces the time for managing a single recycle bin, thereby reducing the time for managing multiple recycle bins, and thus improving the efficiency of recycle bin management when there are many recycle bins or a lot of unstructured data in the recycle bins.
[0084] To facilitate understanding, the following will be combined with... Figure 2 The application scenarios applicable to the embodiments of this application will be described.
[0085] Figure 2 This is a schematic diagram illustrating one application scenario of this application, such as... Figure 1As shown, the electronic device can be used to manage storage space. The electronic device includes storage space 201, which includes first unstructured data 202 and second unstructured data 203. The recycle bin corresponding to storage space 201 is recycle bin 204. Users can delete data in storage space 201, and the data in storage space 201 can be stored in recycle bin 204. Specifically, if a user deletes the first unstructured data 202 in storage space 201, the electronic device can store the metadata corresponding to the first unstructured data 202 in recycle bin 204. In this way, the user cannot access object A in storage space A.
[0086] The first unstructured data 202 refers to any type of unstructured data in the storage space 201 that has been deleted by the user, including but not limited to documents, images, videos, audio, and raw sensor data. The metadata corresponding to the first unstructured data 202 refers to the data that describes the attributes of the first unstructured data 202, such as the name of the first unstructured data 202, the deletion time of the first unstructured data 202, and the storage path of the first unstructured data 202.
[0087] For example, in a distributed storage system, there are multiple electronic devices, each of which includes multiple storage spaces. At the same time, multiple metadata in the recycle bins corresponding to the multiple storage spaces may expire. The management efficiency of the recycle bins depends on the determination and deletion time of the multiple expired metadata in the recycle bins.
[0088] It should be noted that electronic devices may include multiple storage spaces. Figure 1 The embodiment is illustrated by taking an electronic device including a storage space as an example. In addition, the storage space may or may not have a corresponding recycle bin. Users can preset whether the storage space has a corresponding recycle bin.
[0089] Specifically, when a user deems the data stored in a certain storage space important and wants to recover accidentally deleted data after deletion to prevent permanent data loss, a recycle bin function can be enabled for that storage space. In this case, a corresponding recycle bin can exist within the storage space. When the recycle bin function is enabled, the user can set the maximum storage time for object metadata in the recycle bin. Metadata will be permanently deleted after the storage time in the recycle bin is greater than or equal to this maximum storage time, thus releasing the space occupied by the metadata in the recycle bin. For example, the maximum storage time can be 30 days or 60 days.
[0090] In one possible implementation, the specific application scenarios of this application may include enterprise massive document archiving management scenarios, cloud-native multimedia resource storage scenarios, IoT terminal sensor data acquisition scenarios, and government and enterprise office data compliance governance scenarios.
[0091] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0092] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The method can be executed by a data processing device, which can be implemented using a computer program; it can also be implemented using a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; or it can be implemented using a physical device integrating or installing the relevant computer program, such as a chip and electronic devices. The electronic device can be a server, server cluster, or computer, etc. The following description uses a server as an example. Figure 3 As shown, the method may include the following steps.
[0093] S301, Receive a deletion operation for the first object in the storage space, and obtain the first metadata of the first object, the identifier of the first object, and the deletion time of the first object.
[0094] Storage space can be a bucket in an object storage system. It is the basic logical storage unit used to store unstructured data in an object storage system. It is a globally unique namespace and can be configured with independent permissions and enabled with features such as recycle bin and multiple versions.
[0095] The first object can refer to any unstructured data object in the storage space that has been deleted by the user. It is the smallest unit of data storage in the object storage system. Each object consists of the object data itself and metadata describing the object's attributes.
[0096] The first metadata can be a collection of attribute information used to describe the first object, including the identifier of the first object, the deletion time of the first object, the storage path of the first object, etc.
[0097] The identifier of the first object, that is, the globally unique identifier of the first object, is a unique combination of numbers and / or characters assigned by the object storage system to each created object. It is used to uniquely distinguish different objects in the object storage system and avoid management confusion caused by duplicate object names.
[0098] The deletion time of the first object can refer to the timestamp of the deletion operation performed by the user on the first object in the object storage system. It can be accurate to the second or millisecond level and is automatically recorded by the object storage system. It cannot be manually modified. The format of the deletion time of the first object can be YYYY-MM-DD HH:MM:SS, where YYYY represents the year of deletion of the first object, MM represents the month of deletion of the first object, DD represents the date of deletion of the first object, HH represents the hour of deletion of the first object, MM represents the minute of deletion of the first object, and SS represents the number of seconds of deletion of the first object.
[0099] In one possible implementation, when the recycle bin function is enabled in the storage space, the user can select the first object and initiate a deletion operation. When the electronic device receives the deletion operation for the first object in the storage space, the time of this deletion operation can be recorded as the deletion time of the first object. In addition, the first metadata of the first object can be extracted in the object storage system, and the identifier of the first object can be extracted from the metadata of the first object.
[0100] S302. Store the first index information and the first metadata in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object.
[0101] A recycle bin can refer to an area configured for the storage space (bucket) of an object storage system. After the recycle bin function is enabled in the storage space, the metadata of the first deleted object can be migrated from the storage space to the recycle bin for independent storage, and the user cannot directly access the first object.
[0102] The first index information can refer to structured index data configured for the recycle bin, including the deletion time of the first object and the identifier of the first object. Specifically, the first index information can include the deletion times of the first objects and the identifiers of the first objects arranged in sequence.
[0103] The first index information may further include the identifier of the storage space, the deletion time of the first object, the identifier of the first object, and the first extension bit. Specifically, the first index information may further include the identifiers of the storage spaces, the deletion time of the first object, the identifier of the first object, and the first extension bit arranged in sequence. The identifier of the storage space may refer to a feature value used to uniquely identify each storage space. The identifier of the storage space is a fixed identifier assigned by the object storage system. The first extension bit may refer to a dedicated bit reserved for subsequent functional iterations and field expansions of the first index information.
[0104] For example, the structure of the first index information can be as shown in Table 1.
[0105] Table 1
[0106]
[0107] In Table 1, the length of the identifier of the storage space can be 64 bits, the length of the deletion time of the first object can be unlimited, the length of the deletion time of the first object in Table 1 is N bits, the length of the identifier of the first object can be 64 bits, and the length of the first extension bit can be 64 bits.
[0108] In one possible implementation, the deletion time corresponding to the first object and the identifier of the first object can be concatenated in sequence to obtain the key of the first index information. The value of the first index information may include the first metadata, which is not limited to the name of the first object, the object storage layout of the first object, etc. Furthermore, the metadata management module in the recycle bin of the electronic device can store the first index information in the recycle bin according to the order of the keys of the first index information. At the same time, the first metadata can be migrated from the storage space to the metadata management module of the recycle bin corresponding to the storage space, and the integrity of the first metadata is maintained during the migration process.
[0109] The metadata management module within the recycle bin stores the metadata of deleted objects, provides users with the ability to retrieve metadata from the recycle bin, and enables the scanning module to locate metadata whose storage time is greater than or equal to the maximum storage time. Detailed descriptions of the scanning module are provided in subsequent embodiments and will not be repeated here.
[0110] In one possible implementation, the first index information can be stored in the recycle bin according to the chronological order of the deletion time of the first object as follows: if the recycle bin of the storage space does not include index information of the deletion time and object identifier arranged in sequence, the first index information can be directly stored in the recycle bin; if the recycle bin of the storage space includes index information of the deletion time and object identifier arranged in sequence, the first index information can be inserted into the corresponding position in the recycle bin according to the deletion time of the first object, so as to realize the sequential storage of the first index information based on the chronological order from late to early or from early to late, avoiding unordered storage.
[0111] If the recycle bin of the storage space includes index information of deletion time and object identifier arranged in sequence, it can be sorted first based on the identifier of the storage space. If the identifiers of the storage spaces are the same, it can be sorted by deletion time. In this way, each first index information in the recycle bin is stored in sorted order according to the deletion time.
[0112] S303. Based on the first index information, determine the second metadata in the first metadata, and the deletion time of the first object corresponding to the second metadata meets the preset conditions.
[0113] The second metadata can refer to the set of metadata that meets the preset conditions for deletion time, selected from all the first metadata in the recycle bin based on the first index information. That is, the metadata of objects in the recycle bin that have reached the maximum storage time and need to be completely deleted.
[0114] The preset condition can refer to the rules for judging the expiration of metadata set for the recycle bin. For example, the preset condition is that the time difference between the deletion time and the current time is greater than or equal to a second threshold. The explanation of the second threshold is given in the following embodiments and will not be repeated here.
[0115] In one possible implementation, the scanning module within the electronic device can determine the second metadata based on the first index information and the first metadata.
[0116] In one possible implementation, after the scanning module determines the second metadata, the second metadata can be placed in the deletion queue, and a metadata deletion request can be submitted through the deletion submission module. The metadata deletion request is used to indicate that the second metadata in the deletion queue is selected for deletion according to a preset first ratio (e.g., 10%).
[0117] In one possible implementation, when multiple storage spaces exist, the scanning module only needs to determine whether the first first index information has expired. If the deletion time of the first metadata corresponding to the first first index information does not meet the preset conditions, the scanning of that storage space will end directly, and the scanning of the next storage space will begin. If the deletion time of the first metadata corresponding to the first first index information meets the preset conditions, the scanning will continue until the first index information corresponding to the first metadata corresponding to the deletion time that does not meet the preset conditions is found.
[0118] S304. Obtain the quantity of the second metadata, and delete the second metadata in the recycle bin when the quantity of the second metadata is greater than or equal to the first threshold.
[0119] The first threshold can refer to the quantity trigger threshold set for the batch deletion operation of the recycle bin. That is, when the number of secondary metadata filtered in the recycle bin reaches or exceeds the first threshold, the system will trigger the batch deletion operation of the secondary metadata. The first threshold can be flexibly set by the user according to factors such as the performance of the object storage system, the concurrent processing capability, and the amount of business data.
[0120] In one possible implementation, after the scanning module submits a request to delete metadata through the deletion module, the quantity of second metadata can be obtained from the queue to be deleted. When the quantity of second metadata is greater than or equal to a first threshold, the scanning module continues to submit a metadata deletion request to the metadata management module through the deletion module. When the metadata management module receives the request, it deletes the second metadata in the queue to be deleted according to a preset first ratio. When the quantity of second metadata is less than the first threshold, it continuously determines the second metadata from the first metadata and obtains the quantity of second metadata. When the quantity of second metadata is greater than or equal to the first threshold, it deletes the second metadata in the queue to be deleted.
[0121] In another possible implementation, after the scanning module submits a request to delete metadata through the deletion module, it can obtain the number of second metadata in the queue to be deleted, determine the ratio of the number of second metadata to the total length of the queue to be deleted, and then delete the second metadata in the queue to be deleted according to the ratio. The ratio is used to indicate whether there is enough metadata to be deleted in the queue to be deleted.
[0122] Specifically, when the ratio is greater than or equal to the preset second ratio (e.g., 30%), the scanning module continues to submit a metadata deletion request to the metadata management module through the deletion submission module. When the metadata management module receives the request, it deletes the second metadata in the deletion queue according to the preset first ratio.
[0123] When the ratio is less than the preset second ratio, the second metadata is continuously determined from the first metadata, and the number of the second metadata is obtained and the ratio of the number of the second metadata to the total length of the queue to be deleted is determined. When the ratio is greater than or equal to the preset second ratio, the second metadata in the queue to be deleted is deleted.
[0124] Below, in conjunction with Figure 4 The ratio-based scanning and deletion process is explained.
[0125] Figure 4 A schematic diagram illustrating the metadata scanning and deletion process provided in the embodiments of this application, as shown below. Figure 4As shown, the first index information includes: 1_11_seq11, 1_12_seq12, ..., 1_20_seq20. These first index information are stored in sorted order based on the deletion time and are all expired. First, these records are scanned. After the expired first index information is detected, the corresponding metadata is stored in the deletion queue. Then, a metadata deletion request is submitted through the deletion submission module. After that, the ratio of the number of existing metadata in the deletion queue to the total length of the deletion queue is determined. When the ratio is greater than or equal to a preset second ratio, a timer is set for 1 millisecond, and then the metadata deletion request is sent to the metadata management module through the deletion submission module again. When the ratio is less than the preset second ratio, the first index information is continuously scanned.
[0126] In this way, by keeping the queue to be deleted in a state where the second metadata exists, while the metadata management module deletes some of the second metadata in the queue to be deleted, the scanning module can determine new second metadata to supplement the queue to be deleted. In the above method, instead of adding new coroutines or threads, the efficiency of deleting expired metadata is improved by forming a pipeline concurrency between the metadata management module and the scanning module.
[0127] In addition, by timing for 1 millisecond when the ratio is greater than or equal to the preset second ratio, and then continuing to send metadata deletion requests to the metadata management module through the submission deletion module instead of sending requests continuously, the rate limiting caused by too many requests sent per unit time can be avoided, thereby avoiding unnecessary large numbers of failure or retry requests.
[0128] In this embodiment, when the storage space has its recycle bin function enabled, it can receive a deletion operation on a first object in the storage space, and obtain the first metadata, the identifier of the first object, and the deletion time of the first object. The first metadata may refer to a set of attribute information describing the first object, the identifier of the first object may refer to a unique combination of numbers and / or characters assigned by the object storage system to each created object, and the deletion time of the first object may refer to the timestamp of the deletion operation performed on the first object. First index information and first metadata are stored in the recycle bin corresponding to the storage space. The first index information includes the deletion time and the identifier of the first object, and may refer to structured index data configured for the recycle bin. Based on the first index information, second metadata is determined from the first metadata. The second metadata may refer to the metadata of objects in the recycle bin that have reached their maximum storage time and need to be completely deleted, and the deletion time of the first object corresponding to the second metadata meets a preset condition. The quantity of the second metadata is obtained, and when the quantity of the second metadata is greater than or equal to a first threshold, the second metadata in the recycle bin is deleted. In this way, the above method can determine the second metadata from the first metadata based on the first index information, and delete the second metadata in the recycle bin based on the number of second metadata obtained, thus solving the problem of low efficiency in traditional recycle bin management.
[0129] Furthermore, based on the received deletion operation for the first object in the storage space, the first object's first metadata, the first object's identifier, and the first object's deletion time can be obtained. By storing the first object's first metadata in the recycle bin, constructing first index information based on the first object's deletion time and the first object's identifier, and storing the first index information in the recycle bin, physical isolation between the recycle bin and the storage space can be achieved. Users cannot directly access or operate the metadata and index information in the recycle bin, thus solving the problem of data being permanently lost due to accidental secondary deletion in traditional recycle bins.
[0130] Below, in conjunction with Figure 5 The process of determining the second metadata is explained.
[0131] Figure 5 This is a schematic diagram illustrating the process of determining the second metadata provided in an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 5 The method includes:
[0132] S501. Determine the first index identifier that each coroutine needs to process.
[0133] The first index identifier is used to uniquely identify the first index information in different storage spaces, and the first index identifier is a positive integer.
[0134] A coroutine can be a pointer to multiple lightweight threads started on a physical node to process multiple index information. A physical node can include one thread, and one thread can include multiple coroutines (lightweight threads).
[0135] A physical node may include four logical nodes, each of which contains different first index information.
[0136] In one possible implementation, the scanning module can determine the first index identifier that each coroutine needs to process based on preset rules. For example, Figure 6 The rule diagram provided for the embodiments of this application is as follows: Figure 6 As shown, a physical node includes 8 coroutines and 64 first index identifiers. The 8 coroutines are: co1, co2, ..., co8. The 64 first index identifiers are: 1, 2, 3, ..., 64. co1 needs to process the first index information with first index identifiers of 1, 9, 17, ..., 57. co2 needs to process the first index information with first index identifiers of 2, 10, 18, ..., 59. co3 needs to process the first index information with first index identifiers of 3, 11, 19, ..., 60, and so on. This will not be elaborated here.
[0137] S502. Based on multiple first index information in the recycle bin and the first index identifier, determine multiple coroutines corresponding to the recycle bin.
[0138] In one possible implementation, multiple coroutines corresponding to the recycle bin can be determined as follows: a second index identifier is determined based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin; multiple coroutines corresponding to the recycle bin are determined based on the first index identifier and the second index identifier.
[0139] The second index identifier is used to uniquely identify the first index information in different storage spaces. The second index identifier is a positive integer.
[0140] For example, the second index identifier can be represented as: tar_id=(bucket_id+inode_id)%64+1, where tar_id represents the second index identifier, bucket_id represents the identifier of the storage space corresponding to the recycle bin, and inode_id represents the first index identifier.
[0141] In one possible implementation, after determining the second index identifier of each of the multiple logical nodes, the multiple coroutines corresponding to the recycle bin are determined according to the first index identifier that each coroutine needs to process.
[0142] For example, if the second index identifier is 1 and the first index identifier to be processed by coroutine 1 is 1, then coroutine 1 can process the first index information with the second index identifier 1; if the second index identifier is 2 and the first index identifier to be processed by coroutine 2 is 2, then coroutine 2 can process the first index information with the second index identifier 2; if the second index identifier is 3 and the first index identifier to be processed by coroutine 3 is 3, then coroutine 3 can process the first index information with the second index identifier 3; if the second index identifier is 4 and the first index identifier to be processed by coroutine 4 is 4, then coroutine 4 can process the first index information with the second index identifier 4; if the recycle bin includes first index information with the second index identifiers 1, 2, 3 and 4, then the multiple coroutines corresponding to the recycle bin include coroutine 1, coroutine 2, coroutine 3 and coroutine 4, then coroutine 1, coroutine 2, coroutine 3 and coroutine 4 can scan the recycle bin simultaneously. If multiple storage spaces have the recycle bin function enabled, then multiple coroutines can simultaneously and concurrently determine expired metadata.
[0143] In this way, by combining the space identifier of the storage space with the first index identifier to determine the second index identifier, and then determining the coroutine corresponding to the recycle bin, the scanning tasks of different recycle bins can be broken up, ensuring that both single storage space and recycle bins corresponding to multiple storage spaces can achieve coroutine-level concurrent scanning, improving scanning efficiency, while avoiding task allocation conflicts and omissions, and optimizing the overall processing performance of the recycle bin.
[0144] S503. Based on multiple coroutines, process multiple first index information to identify second metadata in the first metadata.
[0145] In one possible implementation, the second metadata can be identified as follows: among multiple deletion times of the first index information, the target deletion time is obtained, and the time difference between the target deletion time and the current time is greater than or equal to a second threshold; the identifier of the first object corresponding to the target deletion time is obtained, and based on the identifier of the first object corresponding to the target deletion time, the first metadata of the first object corresponding to the target deletion time is determined as the second metadata.
[0146] The second threshold can refer to the maximum storage time of metadata in the recycle bin, which can be in days or hours and is preset by the user when the recycle bin function is enabled.
[0147] The target deletion time can refer to the deletion time in the first index information that satisfies the time difference with the current time being greater than or equal to the second threshold (the preset maximum storage time).
[0148] In this way, by using the first index information to store the deletion time in an orderly manner, the target deletion time is filtered by the second threshold, and the first object is associated with the first metadata through its identifier. This not only avoids invalid scanning and improves filtering efficiency by leveraging the time order, but also ensures the accuracy of metadata matching through the unique identifier. This allows for the rapid and accurate identification of the second metadata that needs to be cleaned up from the recycle bin.
[0149] Based on the above embodiments, when a user needs to query metadata in the recycle bin for a certain time period, since the first index information has been sorted according to the deletion time, the metadata within that time period can be quickly located in the recycle bin through the first index information, thereby enabling the user to query the metadata in the recycle bin according to the time period.
[0150] exist Figure 5 In the illustrated embodiment, a first index identifier to be processed by each coroutine can be determined. A coroutine can refer to multiple lightweight threads started for processing multiple index information on a single physical node. The first index identifier uniquely identifies the first index information in different storage spaces. Based on multiple first index information in the recycle bin and the first index identifier, multiple coroutines corresponding to the recycle bin are determined. Multiple first index information is processed according to the multiple coroutines to identify second metadata within the first metadata. Thus, by combining the first index identifier with the unique identification of index information and the accurate division of coroutine tasks, each coroutine processes only its own index task, achieving concurrency in index processing in the recycle bin, improving the efficiency of second metadata identification, and ensuring accurate identifier matching to avoid task conflicts and data omissions, guaranteeing the accuracy and stability of expired metadata filtering.
[0151] Based on the above embodiments, receiving a deletion operation on a first object in the storage space can also store second index information so that users can query metadata in the recycle bin.
[0152] In one possible implementation, the second index information can be stored as follows: obtain the name of the first object; store the second index information in the recycle bin corresponding to the storage space, the second index information including the name of the first object, the identifier of the first object, and the deletion time.
[0153] The second index information may refer to the structured index data configured for querying the recycle bin, including the name of the first object, the identifier of the first object, and the deletion time. Specifically, the second index information may include the name of the first object, the identifier of the first object, and the deletion time in sequence, wherein the name of the first object may refer to the original complete object name of the deleted first object in the storage space.
[0154] The second index information may also include the identifier of the storage space, the name of the first object, the identifier of the first object, the deletion time, and the second extension bit. Specifically, the second index information may include the identifier of the storage space, the name of the first object, the identifier of the first object, the deletion time, and the second extension bit arranged in sequence, wherein the second extension bit may refer to a dedicated bit reserved for subsequent functional iterations and field expansion of the second index information.
[0155] For example, the structure of the second index information can be as shown in Table 2.
[0156] Table 2
[0157]
[0158] In Table 2, the length of the storage space identifier can be 64 bits, the length of the first object's name can be unlimited, the length of the first object's name is N bits, the length of the first object's identifier can be 64 bits, the length of the first object's deletion time can be 64 bits, and the length of the second extension bit can be 64 bits.
[0159] In one possible implementation, the identifier of the storage space, the name of the first object, the identifier of the first object, the deletion time, and the second extension bit can be concatenated in sequence to obtain the key of the second index information. The value of the second index information can be null. Furthermore, the metadata management module in the recycle bin of the electronic device can store the second index information in the recycle bin according to the order of the keys of the second index information.
[0160] In one possible implementation, the second index information can be stored in the recycle bin according to the order of the keys of the second index information as follows: if the recycle bin of the storage space does not include the names, identifiers, and deletion times of the first objects arranged in sequence, the second index information can be directly stored in the recycle bin; if the recycle bin of the storage space includes the names, identifiers, and deletion times of the first objects arranged in sequence, the second index information can be inserted into the corresponding position in the recycle bin according to the names of the first objects, so as to realize the storage of the second index information based on the order of the names of the first objects and avoid unordered storage.
[0161] If the recycle bin of the storage space includes the name of the first object, the identifier of the first object, and the deletion time in sequence, it can be sorted first based on the identifier of the storage space. If the identifiers of the storage spaces are the same, it can be sorted by the name of the first object. In this way, each second index information in the recycle bin is stored in sorted order according to the name of the first object.
[0162] It should be noted that the logical nodes mentioned above include not only the first index information but also the second index information.
[0163] In this way, by obtaining the name of the first object and storing a second index information containing the name of the first object, the identifier of the first object, and the time of deletion in the corresponding recycle bin, and sorting the second index information based on the name of the first object, the recycle bin metadata can be stored in a structured manner by name. This allows users to quickly locate the target when they need to query the metadata in the recycle bin that starts with a certain prefix, thus improving query efficiency.
[0164] Below, in conjunction with Figure 7 This section explains the process of querying metadata.
[0165] Figure 7 This is a schematic diagram illustrating the metadata query process provided in an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 7 The method includes:
[0166] S701: Receive a query operation for third-party metadata in the recycle bin and obtain the first name corresponding to the third-party metadata.
[0167] Third-party metadata can refer to the target metadata that a user wants to obtain by initiating a query operation in the recycle bin.
[0168] A query operation refers to a user's request to retrieve metadata in the recycle bin through the operation interface / interface of the object storage system. It can be initiated by the object name or a prefix of the object name.
[0169] The first name can refer to the name of the object entered by the user when initiating a query, or a prefix of the object's name.
[0170] In one possible implementation, the metadata management module can receive query operations and obtain the first name corresponding to the third metadata.
[0171] S702. Based on the second index information and the first name, determine the name of the first object that matches the first name.
[0172] The name of the first object that matches the first name can refer to the full name of the object in the recycle bin whose deleted metadata matches the first name entered by the user, and can achieve a full match or a prefix match of the first name.
[0173] In one possible implementation, the metadata management module can determine the name of the first object that matches the first name based on the second index information and the first name.
[0174] For example, if the first name corresponding to the third metadata is "app", then the starting position of the second index information whose first object name is "app" or whose first object name is prefixed with "app" can be found in the names of each first object in the second index information. Then, the scan starts from the starting position. When the first object name is "app" or whose first object name is prefixed with "app", the scan ends and the position of the second index information is recorded as the ending position. The names of the first objects corresponding to each second index information between the starting position and the ending position (including the starting position but excluding the ending position) are determined as the first name corresponding to the third metadata.
[0175] S703. Obtain third metadata based on the name of the first object that matches the first name.
[0176] In one possible implementation, the identifier of the first object corresponding to the name of the first object can be determined based on the second index information, and the value of the first index information corresponding to the identifier of the first object can be obtained based on the second index information, which is the third metadata.
[0177] exist Figure 7 In the illustrated embodiment, a query operation targeting third-party metadata in the recycle bin can be received to obtain the first name corresponding to the third-party metadata. The third-party metadata can refer to the target metadata that the user wants to obtain by initiating a query operation in the recycle bin. Based on the second index information and the first name, the name of the first object matching the first name is determined. The name of the first object matching the first name can refer to the full name of the object in the recycle bin whose deleted metadata matches the first name entered by the user, achieving either a full match or a prefix match with the first name. Based on the name of the first object matching the first name, the third-party metadata is obtained. In this way, by combining the second index information with the characteristic of orderly storage based on the name of the first object, and accurately matching the full name of the object in the recycle bin based on the first name queried by the user, the location of the target metadata can be quickly located, achieving efficient retrieval of object name prefixes or full names, avoiding invalid scans, improving the query efficiency of third-party metadata, and ensuring the accuracy of the query results through accurate name matching, providing users with a convenient recycle bin metadata retrieval experience.
[0178] To facilitate understanding, the following will be explained... Figure 8 The complete data processing flow is described. Figure 8 A flowchart illustrating the complete data processing method provided in the application embodiments, as shown below. Figure 8 As shown, the method includes:
[0179] S801, Receive a deletion operation for a first object in the storage space, and obtain the first metadata of the first object, the identifier of the first object, and the deletion time of the first object.
[0180] S802. Store the first index information and the first metadata in the recycle bin corresponding to the storage space.
[0181] S803, Determine the first index identifier that each coroutine needs to process.
[0182] S804. Determine the second index identifier based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin.
[0183] S805. Based on the first index identifier and the second index identifier, determine the multiple coroutines corresponding to the recycle bin.
[0184] S806. Based on multiple coroutines, obtain the target deletion time from multiple deletion times of the first index information.
[0185] S807. Based on multiple coroutines, obtain the identifier of the first object corresponding to the target deletion time, and based on the identifier of the first object corresponding to the target deletion time, determine the first metadata of the first object corresponding to the target deletion time as the second metadata.
[0186] S808: Obtain the quantity of the second metadata, and delete the second metadata in the recycle bin when the quantity of the second metadata is greater than or equal to the first threshold.
[0187] The specific implementation method and technical effects in this embodiment are similar to those in the above embodiments, and will not be repeated here.
[0188] Figure 9 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application, as shown below. Figure 9 As shown, the device 90 includes: an acquisition module 901, a storage module 902, a determination module 903, and a deletion module 904.
[0189] The acquisition module 901 is used to receive a deletion operation for the first object in the storage space and acquire the first metadata of the first object, the identifier of the first object and the deletion time of the first object.
[0190] Storage module 902 is used to store first index information and first metadata in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object.
[0191] The determination module 903 is used to determine the second metadata in the first metadata based on the first index information, wherein the deletion time of the first object corresponding to the second metadata meets the preset conditions;
[0192] The deletion module 904 is used to obtain the number of second metadata and delete the second metadata in the recycle bin when the number of second metadata is greater than or equal to a first threshold.
[0193] The apparatus in this embodiment can be used to execute the technical solutions of the above method embodiments. The specific implementation methods and technical effects are similar, and will not be described again here.
[0194] Optionally, in the above-described apparatus, the determining module 903 is specifically used for,
[0195] Determine the first index identifier that each coroutine needs to process;
[0196] Based on multiple first index information and first index identifiers in the recycle bin, multiple coroutines corresponding to the recycle bin are determined;
[0197] Multiple coroutines are used to process multiple first index information to identify second metadata in the first metadata.
[0198] Optionally, in the above-described apparatus, the determining module 903 is specifically used for,
[0199] The second index identifier is determined based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin;
[0200] Based on the first index identifier and the second index identifier, multiple coroutines corresponding to the recycle bin are determined.
[0201] Optionally, in the above-described apparatus, the determining module 903 is specifically used for,
[0202] Among the multiple deletion times of the first index information, the target deletion time is obtained, and the time difference between the target deletion time and the current time is greater than or equal to the second threshold.
[0203] Obtain the identifier of the first object corresponding to the target deletion time, and based on the identifier of the first object corresponding to the target deletion time, determine the first metadata of the first object corresponding to the target deletion time as the second metadata.
[0204] The apparatus in this embodiment can be used to execute the technical solutions of the above method embodiments. The specific implementation methods and technical effects are similar, and will not be described again here.
[0205] Figure 10 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application. Figure 9 Based on what is shown, as Figure 10 As shown, the device also includes a first processing module 905 and a second processing module 906.
[0206] Optionally, in the above apparatus, the first processing module 905 is used for,
[0207] Get the name of the first object;
[0208] The second index information is stored in the recycle bin corresponding to the storage space. The second index information includes the name of the first object, the identifier of the first object, and the deletion time.
[0209] Optionally, in the above apparatus, the second processing module 906 is used for,
[0210] Receive query operations for third-party metadata in the recycle bin and obtain the first name corresponding to the third-party metadata;
[0211] Based on the second index information and the first name, determine the name of the first object that matches the first name;
[0212] Retrieve third metadata based on the name of the first object that matches the first name.
[0213] The apparatus in this embodiment can be used to execute the technical solutions of the above method embodiments. The specific implementation methods and technical effects are similar, and will not be described again here.
[0214] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 11 As shown, the electronic device 110 may include at least one processor 1101 and a memory 1102.
[0215] The memory 1102 is used to store programs. Specifically, the program may include program code, which includes computer-executable instructions.
[0216] The memory 1102 may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage.
[0217] The processor 1101 is used to execute computer execution instructions stored in the memory 1102 to implement the method described in the foregoing method embodiments. The processor 1101 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0218] Optionally, the electronic device 110 may also include a communication interface 1103. In specific implementations, if the communication interface 1103, memory 1102, and processor 1101 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an industry-standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0219] Optionally, in a specific implementation, if the communication interface 1103, memory 1102 and processor 1101 are integrated on a single chip, then the communication interface 1103, memory 1102 and processor 1101 can communicate through an internal interface.
[0220] Electronic device 110 can be a server, etc.
[0221] The electronic device in this embodiment can be used to execute the technical solutions of the above method embodiments. The specific implementation methods and technical effects are similar, and will not be repeated here.
[0222] This application provides a computer-readable storage medium, which may include various media capable of storing computer-executable instructions, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), RAM, a disk, or an optical disk. Specifically, the computer-readable storage medium stores computer-executable instructions, which, when executed by a computer, cause the technical solution shown in the above method embodiment to be executed. The specific implementation and technical effects are similar and will not be repeated here.
[0223] This application provides a computer program product, including a computer program. When the computer program is executed by a computer, the technical solution shown in the above method embodiment is executed. The specific implementation method and technical effect are similar, and will not be repeated here.
[0224] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0225] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0226] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0227] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0228] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0229] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0230] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0231] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0232] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A data processing method, characterized by, include: Receive a deletion operation for a first object in the storage space, and obtain the first metadata of the first object, the identifier of the first object, and the deletion time of the first object; The first index information and the first metadata are stored in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object. Based on the first index information, the second metadata is determined in the first metadata, and the deletion time of the first object corresponding to the second metadata meets the preset conditions; The quantity of the second metadata is obtained, and when the quantity of the second metadata is greater than or equal to a first threshold, the second metadata in the recycle bin is deleted.
2. The method of claim 1, wherein, The recycling bin includes multiple first index information; the step of determining second metadata based on the first index information and the first metadata includes: Determine the first index identifier that each coroutine needs to process; Based on multiple first index information in the recycle bin and the first index identifier, multiple coroutines corresponding to the recycle bin are determined; The plurality of first index information is processed according to the plurality of coroutines to identify the second metadata in the first metadata.
3. The method according to claim 2, characterized in that, The step of determining multiple coroutines corresponding to the recycle bin based on multiple first index information in the recycle bin and the first index identifier includes: Based on the identifier of the storage space corresponding to the recycle bin and multiple first index identifiers in the recycle bin, a second index identifier is determined; Based on the first index identifier and the second index identifier, multiple coroutines corresponding to the recycle bin are determined.
4. The method according to claim 2, characterized in that, The process of processing the plurality of first index information to identify the second metadata in the first metadata includes: Among the multiple deletion times of the first index information, the target deletion time is obtained, and the time difference between the target deletion time and the current time is greater than or equal to a second threshold. Obtain the identifier of the first object corresponding to the target deletion time, and based on the identifier of the first object corresponding to the target deletion time, determine the first metadata of the first object corresponding to the target deletion time as the second metadata.
5. The method according to claim 1, characterized in that, The method further includes: Get the name of the first object; The second index information is stored in the recycle bin corresponding to the storage space. The second index information includes the name of the first object, the identifier of the first object, and the deletion time.
6. The method according to claim 5, characterized in that, The method further includes: Receive a query operation for third-party metadata in the recycle bin, and obtain the first name corresponding to the third-party metadata; Based on the second index information and the first name, determine the name of the first object that matches the first name; The third metadata is obtained based on the name of the first object that matches the first name.
7. A data processing apparatus, characterized in that, include: The acquisition module is used to receive a deletion operation for a first object in the storage space, and to acquire the first metadata of the first object, the identifier of the first object, and the deletion time of the first object; The storage module is used to store first index information and first metadata in the recycle bin corresponding to the storage space. The first index information includes the deletion time corresponding to the first object and the identifier of the first object. The determining module is used to determine, based on the first index information, the second metadata in the first metadata, wherein the deletion time of the first object corresponding to the second metadata meets a preset condition; The deletion module is used to obtain the quantity of the second metadata and delete the second metadata in the recycle bin when the quantity of the second metadata is greater than or equal to a first threshold.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.