Object management operation execution method and device, equipment and storage medium
By determining the storage type and initial index position of objects in a distributed object storage system, and optimizing the storage and enumeration order of object indexes, the problem of low execution efficiency of object management operations is solved, and more efficient object operations and better user experience is achieved.
Patent Information
- Application Number
- CN202510105074.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-04-18
AI Technical Summary
In distributed object storage systems, the execution efficiency of object management operations is low, resulting in too much verification of irrelevant objects and is time-consuming.
By determining the storage type of the object to be executed and the storage location of the initial object index, the upload time is written to the key value of the object index to obtain the target object index. Then, the target object index is stored in sequence from behind to front according to the upload time, and the target object index is listed based on the target action type, the object to be executed is filtered out, and the action execution center is called to perform the operation.
Reduce verification work on irrelevant objects, improve the speed and quality of object operations, and enhance user experience.
Smart Images

Figure CN119848047A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an object management operation execution method, device, equipment and storage medium. Background Art
[0002] With the development of the Internet, the amount of data on the Internet is increasing, and distributed object storage has emerged. As a network storage architecture, distributed object storage is suitable for the storage of unstructured data such as pictures and videos. It has the characteristics of high-speed direct access to disks for block storage and distributed sharing of file storage, and has been widely developed and applied in the Internet.
[0003] At present, the bucket lifecycle function is provided in the distributed object storage system. Among them, in the lifecycle management of object storage, users are allowed to configure a series of rules to automatically perform predefined operations when the object meets specific conditions. Among them, the above operations include converting the data level of the object from the source storage type to the destination storage type, such as converting from standard storage to low-frequency storage, archive storage, from archive storage to low-frequency storage, or deleting the object after a certain storage time. That is, for buckets with configured lifecycle rules, a single-threaded method is used to check and verify all objects in sequence starting from the 0th index shard. In this way, for a single bucket with hundreds of millions of objects, only a few thousand or hundreds of objects need to be deleted or converted. However, since a full enumeration check is required, the overall time consumption is very huge.
[0004] In addition, another reason why the lifecycle operation of storage type conversion is processed slowly is that the indexes of all storage type data are stored together, and each execution requires a list operation on all objects in the bucket and verification of whether conversion is required, which causes the lifecycle function of the object storage gateway to do a lot of useless work and fail to act on the target object quickly.
[0005] As can be seen from the above, how to improve the efficiency of object operations during the execution of object management operations is a problem that needs to be solved urgently. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for executing object management operations, which can reduce the verification work of irrelevant objects and thus improve the speed and quality of operations on objects. The specific scheme is as follows:
[0007] In a first aspect, the present application provides a method for executing an object management operation, comprising:
[0008] Determine a storage type corresponding to the object to be executed, and determine a storage location corresponding to an initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain a target object index;
[0009] Store the target object indexes in the to-be-listed index database corresponding to the storage location in order from the last upload time; the to-be-listed index database corresponds to the storage type one by one;
[0010] Determine a target index database from each of the to-be-listed index databases based on the target action type, and then list the target object indexes in the target index database in sequence from front to back to obtain a to-be-processed listing result;
[0011] The to-be-processed enumeration results are screened according to preset screening rules, and then the to-be-executed objects are determined based on the obtained screening results, and a preset action execution center is called to perform execution operations on each of the to-be-executed objects based on the target action type.
[0012] Optionally, determining a storage type corresponding to the object to be executed, and determining a storage location corresponding to an initial object index corresponding to the object to be executed based on the storage type, includes:
[0013] Calling a preset classification sub-center in a preset index classification center to determine a storage type corresponding to the object to be executed, and determining a storage location corresponding to an initial object index corresponding to the object to be executed based on the storage type;
[0014] Among them, the storage types include standard storage type, low-frequency storage type and archive storage type; the upload time corresponding to the object to be executed whose storage type is the standard storage type is later than the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type; the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type is later than the upload time corresponding to the object to be executed whose storage type is the archive storage type.
[0015] Optionally, writing the upload time of the initial object index into the key value of the initial object index to obtain the target object index includes:
[0016] The preset index write sub-center in the preset index classification center is called to convert the upload time corresponding to the initial object index into an upload timestamp, and then a key value construction rule is used to construct a target key value based on the upload timestamp and the object name corresponding to the initial object index, and then the target object index is determined based on the target key value and the initial object index.
[0017] Optionally, determining a target index database from each of the to-be-listed index databases based on the target action type, and then sequentially listing the target object indexes in the target index databases in order from front to back to obtain a to-be-processed listing result, includes:
[0018] Using the preset action classification subcenter in the preset object enumeration center to determine the action type corresponding to the target object, obtain the target action type, and determine the target index database from each of the to-be-enumerated index databases based on the target action type;
[0019] If the target action type is characterized as a deletion action type, determining a first enumeration rule based on the deletion action type, so as to call a preset enumeration center and enumerate the target object index in the target index database using the first enumeration rule;
[0020] If the target action type is characterized as a type conversion action type, a second enumeration rule is determined based on the type conversion action type to call the preset enumeration center and enumerate the target object index in the target index database using the second enumeration rule.
[0021] Optionally, determining a target index database from each of the to-be-listed index databases based on the target action type, and then sequentially listing the target object indexes in the target index databases in order from front to back to obtain a to-be-processed listing result, includes:
[0022] Using the preset action classification subcenter in the preset object enumeration center to determine the action type corresponding to the target object, and obtain the target action type;
[0023] If the target action type is characterized as a deletion action type, the index databases of the low-frequency storage type and the archive storage type in each of the index databases to be listed are set as the first target index database, so as to call the preset enumeration center, and enumerate the target object indexes in each of the first target index databases in a front-to-back order to obtain a corresponding first enumeration result;
[0024] If the target action type is characterized as a type conversion action type, the second target index database is determined based on the storage type corresponding to the target object and each of the index databases to be listed, and then the preset enumeration center is called, and the target object indexes in the second target index database are listed in sequence from front to back to obtain the corresponding second enumeration result.
[0025] Optionally, filtering the to-be-processed enumeration results according to a preset filtering rule, then determining the to-be-executed objects based on the obtained filtering results, and calling a preset action execution center to perform an execution operation on each of the to-be-executed objects based on the target action type, including:
[0026] Calling a preset screening center and screening the first enumerated results using preset screening rules to obtain first screening results, so as to determine the corresponding objects to be executed based on each of the first screening results;
[0027] The objects to be executed are stored in a preset object deletion queue, so as to call several threads in the preset action execution center to obtain the objects to be executed from the preset object deletion queue, and perform execution operations on the objects to be executed;
[0028] calling a preset screening center and screening the second enumerated results using the preset screening rule to obtain second screening results, so as to determine the corresponding to-be-executed object based on each of the second screening results;
[0029] Each of the objects to be executed is stored in a preset type conversion queue, so as to call several threads in the preset action execution center to obtain each of the objects to be executed from the preset type conversion queue, and perform execution operations on each of the objects to be executed.
[0030] Optionally, the target object indexes in the target index database are listed in sequence from front to back to obtain the listing results to be processed, including:
[0031] The target object indexes in the target index database are listed in sequence from front to back, and it is determined whether the upload time corresponding to the obtained to-be-processed enumeration results is greater than a preset time threshold;
[0032] If the upload time corresponding to the to-be-processed enumeration result is not greater than the preset time threshold, triggering the step of sequentially enumerating the target object indexes in the target index database in order from front to back;
[0033] If the upload time corresponding to the pending enumeration results is greater than the preset time threshold, the step of screening the pending enumeration results according to the preset screening rules is triggered.
[0034] In a second aspect, the present application provides an object management operation execution device, including:
[0035] A target object index determination module is used to determine the storage type corresponding to the object to be executed, and based on the storage type, determine the storage location corresponding to the initial object index corresponding to the object to be executed, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index;
[0036] An index database determination module, used to store the indexes of the target objects in the to-be-listed index database corresponding to the storage location in order from the last upload time; the to-be-listed index database corresponds to the storage type one by one;
[0037] An enumeration result acquisition module is used to determine a target index database from each of the to-be-enumerated index databases based on the target action type, and then enumerate the target object indexes in the target index database in order from front to back to obtain an enumeration result to be processed;
[0038] The object execution module is used to filter the pending enumeration results according to preset filtering rules, then determine the pending objects based on the obtained filtering results, and call the preset action execution center to perform execution operations on each pending object based on the target action type.
[0039] In a third aspect, the present application provides an electronic device, including:
[0040] Memory, used to store computer programs;
[0041] The processor is used to execute the computer program to implement the aforementioned object management operation execution method.
[0042] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned object management operation execution method when executed by a processor.
[0043] As can be seen from the above, before executing the object management operation, the present application needs to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index; store each of the target object indexes in the to-be-listed index database corresponding to the storage location in order from back to front according to the upload time; the to-be-listed index database corresponds one-to-one to the storage type; determine the target index database from each of the to-be-listed index databases based on the target action type, and then list the target object indexes in the target index database in order from front to back to obtain the to-be-processed listing results; filter the to-be-processed listing results according to preset filtering rules, and then determine the to-be-executed object based on the obtained filtering results, and call the preset action execution center and perform execution operations on each of the to-be-executed objects based on the target action type.
[0044] It can be seen that the present application first needs to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index; then, store each target object index in the to-be-listed index database corresponding to the storage location in the order of the upload time from back to front; the to-be-listed index database corresponds to the storage type one by one; then, determine the target index database from each to-be-listed index database based on the target action type, and then list the target object indexes in the target index database in turn from front to back to obtain the to-be-processed listing result; finally, filter the to-be-processed listing result according to the preset screening rule, and then determine the to-be-executed object based on the obtained screening result, and call the preset action execution center and perform the execution operation on each to-be-executed object based on the target action type. In this way, the speed and quality of operating on the object are improved, the verification work of irrelevant objects is reduced, and the user experience is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0046] Figure 1 A flow chart of an object management operation execution method disclosed in this application;
[0047] Figure 2 A schematic diagram of the structure of an object management operation execution device disclosed in this application;
[0048] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] At present, in the lifecycle management of object storage, for buckets with configured lifecycle rules, a single-threaded method is used to check and verify all objects in sequence starting from the index shard 0. In this way, for a single bucket with hundreds of millions of objects, only a few thousand or hundreds of objects need to be deleted or converted. However, since a full enumeration check is required, the overall time consumption is very huge. In addition, since the indexes of all storage type data are stored together, each execution requires a list operation on all objects in the bucket and verification of whether conversion is required, resulting in a lot of useless work for the lifecycle function of the object storage gateway, which cannot act on the target object quickly. To this end, the present application provides an object management operation execution method that can improve the speed and quality of operations on objects and reduce the verification of irrelevant objects.
[0051] See also Figure 1 As shown, an embodiment of the present invention discloses a method for executing an object management operation, including:
[0052] Step S11, determine the storage type corresponding to the object to be executed, and based on the storage type, determine the storage location corresponding to the initial object index corresponding to the object to be executed, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index.
[0053] In this embodiment, the object index information needs to be classified and stored according to the storage type, wherein the object index information includes the object upload time, etag and user information. In a specific implementation, the object index information is stored in the form of a key-value pair. In addition, the storage type includes a standard storage type, a low-frequency storage type and an archive storage type, and the storage type of the object can be set according to user needs. Specifically, determining the storage type corresponding to the object to be executed, and determining the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, may include: calling a preset classification sub-center in a preset index classification center to determine the storage type corresponding to the object to be executed, and determining the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type; wherein the storage type includes a standard storage type, a low-frequency storage type and an archive storage type; the upload time corresponding to the object to be executed with a storage type of the standard storage type is later than the upload time corresponding to the object to be executed with a storage type of the low-frequency storage type; the upload time corresponding to the object to be executed with a storage type of the low-frequency storage type is later than the upload time corresponding to the object to be executed with a storage type of the archive storage type.
[0054] Furthermore, the embodiment of the present application needs to add the creation time of the object to the key value of the object index information, and the key value after adding the creation time of the object is in the form of "upload timestamp_object name", wherein the upload timestamp is the last modification time of the object, generally the upload time of the object, that is, when the metadata of the object changes, the upload timestamp will also change with the change of the object metadata. Specifically, writing the upload time of the initial object index into the key value of the initial object index to obtain the target object index may include: calling the preset index writing sub-center in the preset index classification center to convert the upload time corresponding to the initial object index into an upload timestamp, and then using the key value to build rules and build a target key value based on the upload timestamp and the object name corresponding to the initial object index, and then determining the target object index based on the target key value and the initial object index.
[0055] Step S12: store the target object indexes in the to-be-listed index database corresponding to the storage location in order from the last upload time; the to-be-listed index database corresponds to the storage type one by one.
[0056] In this embodiment, after determining the target object index based on the target key value and the initial object index, the embodiment of the present application needs to store each target object index in the order of upload time from back to front in the to-be-listed index database corresponding to the storage location based on the time corresponding to the upload timestamp in the target object index. It is worth mentioning that when storing each target object index in the to-be-listed index database corresponding to the storage location, the embodiment of the present application also needs to store it in the corresponding type of to-be-listed index database based on the storage type corresponding to each target object index.
[0057] Step S13: determine a target index database from each of the to-be-listed index databases based on the target action type, and then list the target object indexes in the target index database in sequence from front to back to obtain a to-be-processed listing result.
[0058] In this embodiment, it is necessary to determine the target index database based on the storage method and execution action type corresponding to the target object, and then, the embodiment of the present application needs to perform action execution based on the execution action type corresponding to the target object. Specifically, the target index database is determined from each to-be-listed index database based on the target action type, and then the target object indexes in the target index database are listed in sequence from front to back to obtain the to-be-processed listing results, which may include: using the preset action classification sub-center in the preset object listing center to determine the action type corresponding to the target object, obtain the target action type, and determine the target index database from each to-be-listed index database based on the target action type; if the target action type is characterized as a deletion action type, then based on the deletion action type, a first listing rule is determined to call the preset listing center and use the first listing rule to list the target object index in the target index database; if the target action type is characterized as a type conversion action type, then based on the type conversion action type, a second listing rule is determined to call the preset listing center and use the second listing rule to list the target object index in the target index database.
[0059] In a specific implementation, when the execution action type corresponding to the target object is a deletion action, the target index information of the target index database must be listed first. Specifically, the target index database is determined from each index database to be listed based on the target action type, and then the target object indexes in the target index database are listed in sequence from front to back to obtain the pending enumeration result, which may include: using the preset action classification subcenter in the preset object enumeration center to determine the action type corresponding to the target object to obtain the target action type; if the target action type is characterized as a deletion action type, then the index databases with storage types of low-frequency storage types and archive storage types in each index database to be listed are set as the first target index database, so as to call the preset enumeration center, and the target object indexes in each first target index database are listed in order from front to back to obtain the corresponding first enumeration result.
[0060] It is worth mentioning that, since the upload timestamp is added to the key value of the index information, and the order in which the index information is saved in the database is sorted from back to front according to the upload time in the key value, the listed index information is the index information with the longest upload time among all the index information. Subsequently, each time an index information is listed, the embodiment of the present application needs to promptly check whether the index information is greater than the preset expiration time. If the index information is greater than the preset expiration time, the index information is checked, and then the object corresponding to the index information that meets the conditions is deleted. It is worth mentioning that when the upload timestamp is not greater than the preset expiration time, the enumeration operation on the target index database is terminated immediately. Finally, after completing the above operations for lists of different storage types, the embodiment of the present application needs to terminate the execution of the above operations and execute the next rule instead.
[0061] In another specific implementation, when the execution action type corresponding to the target object is a type conversion action, the embodiment of the present application first needs to determine the source type based on the storage type corresponding to the target object, and then set all index databases whose storage type is the source type in all index databases as target index databases, and then list the objects corresponding to the index information in each target index database in sequence. Specifically, based on the target action type, the target index database is determined from each index database to be listed, and then the target object indexes in the target index database are listed in sequence from front to back to obtain the pending enumeration result, which may include: using the preset action classification sub-center in the preset object enumeration center to determine the action type corresponding to the target object to obtain the target action type; if the target action type is characterized as a type conversion action type, then based on the storage type corresponding to the target object and each index database to be listed, the second target index database is determined, and then the preset enumeration center is called, and the target object indexes in the second target index database are listed in sequence from front to back to obtain the corresponding second enumeration result.
[0062] Furthermore, since the embodiment of the present application adds an upload timestamp to the key value of each index information, and the order in which the index information is saved in the database is sorted from back to front according to the upload timestamp in the key value, the index information listed in the embodiment of the present application is the index information with the longest upload time. Subsequently, each time an index information is listed, the embodiment of the present application needs to determine whether the upload timestamp corresponding to the index information is greater than the preset expiration time. If the upload timestamp corresponding to the index information is not greater than the preset expiration time, the listed index information is checked, and the data storage type corresponding to the qualified object is converted to an object whose data storage type is the target storage type. When the upload timestamp of the listed index information is greater than the preset expiration time, the operation of converting the data storage type of the object corresponding to the index information is terminated. It is worth mentioning that in the process of converting the data storage type of the object, the embodiment of the present application can migrate the data part of the object to the data pool corresponding to the target storage type.
[0063] It is worth mentioning that after enumerating the target object indexes in the target index database in order from front to back and obtaining the pending enumeration results, the embodiment of the present application needs to determine the upload time corresponding to each listed target object index, so as to use the determination result to perform corresponding operations on the target object index. Specifically, enumerating the target object indexes in the target index database in order from front to back and obtaining the pending enumeration results may include: enumerating the target object indexes in the target index database in order from front to back, and determining whether the upload time corresponding to the pending enumeration results is greater than a preset time threshold; if the upload time corresponding to the pending enumeration results is not greater than the preset time threshold, then triggering the step of enumerating the target object indexes in the target index database in order from front to back; if the upload time corresponding to the pending enumeration results is greater than the preset time threshold, then triggering the step of filtering the pending enumeration results according to preset filtering rules.
[0064] Step S14: filter the pending enumeration results according to preset filtering rules, then determine the pending objects based on the obtained filtering results, call a preset action execution center and perform execution operations on each pending object based on the target action type.
[0065] In this embodiment, after the enumeration results to be processed are listed, the embodiment of the present application needs to filter the enumeration results to be processed according to the preset filtering rules to obtain the filtering results, and then determine the corresponding objects to be executed based on the target object index in the filtering results, and finally call the preset action execution center and execute the operations on each object to be executed based on the action type corresponding to the target object. Specifically, the enumeration results to be processed are filtered according to preset filtering rules, and then the objects to be executed are determined based on the obtained filtering results, and the preset action execution center is called to perform execution operations on each object to be executed based on the target action type. This may include: calling the preset filtering center and using the preset filtering rules to filter the first enumeration results to obtain the first filtering results, so as to determine the corresponding objects to be executed based on each first filtering result; storing each object to be executed in a preset object deletion queue to call several threads in the preset action execution center to obtain each object to be executed from the preset object deletion queue, and performing execution operations on each object to be executed; calling the preset filtering center and using the preset filtering rules to filter the second enumeration results to obtain the second filtering results, so as to determine the corresponding object to be executed based on each second filtering result; storing each object to be executed in a preset type conversion queue to call several threads in the preset action execution center to obtain each object to be executed from the preset type conversion queue, and performing execution operations on each object to be executed.
[0066] Furthermore, in order to further illustrate the operation steps of the object management operation, in a specific implementation, if there are 100 million objects in the bucket, and the number of objects uploaded by the object upload system is 100,000. Therefore, in order to reduce the cost and space for storing objects, the embodiment of the present application chooses to convert the data storage type corresponding to objects stored for more than one year into low-frequency storage, and delete objects stored for more than two years. That is, in an index database whose data storage type is standard storage, the objects corresponding to the listed index information are object data stored for nearly one year, while in an index database whose data storage type is low-frequency storage, the objects listed are data stored for nearly two years.
[0067] Furthermore, when the action execution type corresponding to the object executed by the embodiment of the present application is a type conversion operation, if the storage type corresponding to the target object executed at this time is standard storage, it is necessary to list the object index information in the index database corresponding to the standard storage type. In addition, since the arrangement order of each object index information is arranged from back to front according to the upload timestamp in the key value, the listed objects are all objects with the longest storage time in the bucket, so the target object can be directly located, and then the type conversion operation is performed on the target object. It is worth mentioning that when the enumeration is not greater than the preset expiration time, due to the sorting function of the database, the subsequent objects will inevitably not meet the conversion requirements, so the enumeration operation is terminated immediately.
[0068] Correspondingly, when the action execution type corresponding to the object executed by the embodiment of the present application is a deletion operation, since the information stored in the index list storing standard objects is an object index with upload information within one year, there is no need to delete the object corresponding to the object index in the above index list, and the database can be directly jumped to the index database whose storage type is to store low-frequency objects. Moreover, since the arrangement order of the index information of each object is arranged from back to front according to the upload timestamp in the key value, the listed objects are all objects with the longest storage time in the bucket. Therefore, the object to be deleted can be directly located, and then the deletion operation can be performed. When the upload timestamp is not greater than the preset expiration time, due to the sorting function of the database, the objects corresponding to the subsequent index information will inevitably not meet the deletion requirements, so the enumeration operation on the database is terminated immediately.
[0069] It can be seen that the embodiment of the present application first needs to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index; then, store each target object index in the to-be-listed index database corresponding to the storage location in the order of upload time from back to front; the to-be-listed index database corresponds to the storage type one by one; then, determine the target index database from each to-be-listed index database based on the target action type, and then list the target object indexes in the target index database in order from front to back to obtain the to-be-processed listing result; finally, filter the to-be-processed listing result according to the preset screening rules, and then determine the to-be-executed object based on the obtained screening result, and call the preset action execution center and perform execution operations on each to-be-executed object based on the target action type. In this way, the speed and quality of operating on the object are improved, and the verification work of irrelevant objects is reduced.
[0070] Accordingly, see Figure 2 As shown, the present application also provides an object management operation execution device, including:
[0071] The target object index determination module 11 is used to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index;
[0072] An index database determination module 12 is used to store the indexes of the target objects in the to-be-listed index database corresponding to the storage location in order from the last upload time; the to-be-listed index database corresponds to the storage type one by one;
[0073] The enumeration result acquisition module 13 is used to determine the target index database from each of the to-be-enumerated index databases based on the target action type, and then enumerate the target object indexes in the target index database in order from front to back to obtain the to-be-processed enumeration result;
[0074] The object execution module 14 is used to filter the pending enumeration results according to preset filtering rules, and then determine the pending objects based on the obtained filtering results, and call a preset action execution center to perform execution operations on each pending object based on the target action type.
[0075] As can be seen from the above, before the object management operation is performed in the embodiment of the present application, it is first necessary to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index; then, store each of the target object indexes in the to-be-listed index database corresponding to the storage location in the order from back to front of the upload time; the to-be-listed index database corresponds to the storage type one by one; then, determine the target index database from each of the to-be-listed index databases based on the target action type, and then list the target object indexes in the target index database in turn in the order from front to back to obtain the to-be-processed listing result; finally, filter the to-be-processed listing result according to the preset screening rule, and then determine the to-be-executed object based on the obtained screening result, and call the preset action execution center and perform the execution operation on each of the to-be-executed objects based on the target action type. In this way, the verification work of irrelevant objects is reduced, thereby improving the speed and quality of object operations.
[0076] In some specific implementations, the target object index determination module 11 may specifically include:
[0077] A storage location determination unit is used to call a preset classification sub-center in a preset index classification center to determine the storage type corresponding to the object to be executed, and determine the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type; wherein the storage type includes a standard storage type, a low-frequency storage type and an archive storage type; the upload time corresponding to the object to be executed whose storage type is the standard storage type is later than the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type; the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type is later than the upload time corresponding to the object to be executed whose storage type is the archive storage type.
[0078] In some specific implementations, the target object index determination module 11 may specifically include:
[0079] An upload timestamp determination unit is used to call the preset index writing sub-center in the preset index classification center to convert the upload time corresponding to the initial object index into an upload timestamp, and then use the key value construction rule to build a target key value based on the upload timestamp and the object name corresponding to the initial object index, and then determine the target object index based on the target key value and the initial object index.
[0080] In some specific implementations, the enumeration result acquisition module 13 may specifically include:
[0081] A first action type determination unit, configured to determine an action type corresponding to a target object by using a preset action classification subcenter in a preset object enumeration center, obtain a target action type, and determine a target index database from each of the to-be-enumerated index databases based on the target action type;
[0082] a first enumeration rule determining unit, configured to determine a first enumeration rule based on the deletion action type if the target action type is characterized as a deletion action type, so as to call a preset enumeration center and enumerate the target object index in the target index database using the first enumeration rule;
[0083] The second enumeration rule determination unit is used to determine a second enumeration rule based on the type conversion action type if the target action type is characterized as a type conversion action type, so as to call the preset enumeration center and use the second enumeration rule to enumerate the target object index in the target index database.
[0084] In some specific implementations, the enumeration result acquisition module 13 may specifically include:
[0085] A second action type determination unit is used to determine the action type corresponding to the target object by using the preset action classification subcenter in the preset object enumeration center to obtain the target action type;
[0086] A first target index database determining unit is used for setting the index databases of the low-frequency storage type and the archive storage type in each of the index databases to be listed as the first target index database if the target action type is characterized as a deletion action type, so as to call the preset enumeration center, and enumerate the target object indexes in each of the first target index databases in a sequence from front to back to obtain a corresponding first enumeration result;
[0087] A second target index database determination unit is used to determine the second target index database based on the storage type corresponding to the target object and each index database to be listed if the target action type is characterized as a type conversion action type, and then call the preset enumeration center and enumerate the target object indexes in the second target index database in sequence from front to back to obtain a corresponding second enumeration result.
[0088] In some specific implementations, the object execution module 14 may specifically include:
[0089] a first screening result determining unit, configured to call a preset screening center and use preset screening rules to screen the first enumerated results to obtain first screening results, so as to determine the corresponding objects to be executed based on each of the first screening results;
[0090] A first to-be-executed object storage unit is used to store each of the to-be-executed objects in a preset object deletion queue, so as to call a number of threads in the preset action execution center to obtain each of the to-be-executed objects from the preset object deletion queue, and perform execution operations on each of the to-be-executed objects;
[0091] A second screening result determining unit, configured to call a preset screening center and use the preset screening rule to screen the second enumerated results to obtain second screening results, so as to determine the corresponding to-be-executed object based on each of the second screening results;
[0092] The second object storage unit is used to store each object to be executed in a preset type conversion queue, so as to call several threads in the preset action execution center to obtain each object to be executed from the preset type conversion queue, and perform execution operations on each object to be executed.
[0093] In some specific implementations, the enumeration result acquisition module 13 may specifically include:
[0094] An upload time judgment unit, used to enumerate the target object indexes in the target index database in order from front to back, and judge whether the upload time corresponding to the obtained enumeration result to be processed is greater than a preset time threshold;
[0095] An object index enumeration unit, configured to trigger the step of enumerating the target object indexes in the target index database in sequence from front to back if the upload time corresponding to the to-be-processed enumeration result is not greater than the preset time threshold;
[0096] The enumeration result screening unit is used to trigger the step of screening the enumeration results to be processed according to the preset screening rules if the upload time corresponding to the enumeration results to be processed is greater than the preset time threshold.
[0097] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the object management operation execution method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0098] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0099] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0100] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the object management operation execution method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0101] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the object management operation execution method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0102] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0103] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0104] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0105] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0106] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for executing an object management operation, characterized in that: include: Determine a storage type corresponding to the object to be executed, and determine a storage location corresponding to an initial object index corresponding to the object to be executed based on the storage type, and then write the upload time of the initial object index into the key value of the initial object index to obtain a target object index; Store the target object indexes in the to-be-listed index database corresponding to the storage location in order from the last upload time to the first upload time; The index databases to be listed correspond to the storage types one by one; Determine a target index database from each of the to-be-listed index databases based on the target action type, and then list the target object indexes in the target index database in sequence from front to back to obtain a to-be-processed listing result; The to-be-processed enumeration results are screened according to preset screening rules, and then the to-be-executed objects are determined based on the obtained screening results, and a preset action execution center is called to perform execution operations on each of the to-be-executed objects based on the target action type.
2. The object management operation execution method according to claim 1, characterized in that: The determining of the storage type corresponding to the object to be executed, and determining the storage location corresponding to the initial object index corresponding to the object to be executed based on the storage type, includes: Calling a preset classification sub-center in a preset index classification center to determine a storage type corresponding to the object to be executed, and determining a storage location corresponding to an initial object index corresponding to the object to be executed based on the storage type; Among them, the storage types include standard storage type, low-frequency storage type and archive storage type; the upload time corresponding to the object to be executed whose storage type is the standard storage type is later than the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type; the upload time corresponding to the object to be executed whose storage type is the low-frequency storage type is later than the upload time corresponding to the object to be executed whose storage type is the archive storage type.
3. The object management operation execution method according to claim 1, characterized in that: The step of writing the upload time of the initial object index into the key value of the initial object index to obtain the target object index includes: The preset index write sub-center in the preset index classification center is called to convert the upload time corresponding to the initial object index into an upload timestamp, and then a key value construction rule is used to construct a target key value based on the upload timestamp and the object name corresponding to the initial object index, and then the target object index is determined based on the target key value and the initial object index.
4. The object management operation execution method according to claim 1, characterized in that: The target index database is determined from each of the to-be-listed index databases based on the target action type, and then the target object indexes in the target index database are listed in sequence from front to back to obtain the to-be-processed listing result, including: Using the preset action classification subcenter in the preset object enumeration center to determine the action type corresponding to the target object, obtain the target action type, and determine the target index database from each of the to-be-enumerated index databases based on the target action type; If the target action type is characterized as a deletion action type, determining a first enumeration rule based on the deletion action type, so as to call a preset enumeration center and enumerate the target object index in the target index database using the first enumeration rule; If the target action type is characterized as a type conversion action type, a second enumeration rule is determined based on the type conversion action type to call the preset enumeration center and enumerate the target object index in the target index database using the second enumeration rule.
5. The object management operation execution method according to claim 4, characterized in that: The target index database is determined from each of the to-be-listed index databases based on the target action type, and then the target object indexes in the target index database are listed in sequence from front to back to obtain the to-be-processed listing result, including: Using the preset action classification subcenter in the preset object enumeration center to determine the action type corresponding to the target object, and obtain the target action type; If the target action type is characterized as a deletion action type, the index databases of the low-frequency storage type and the archive storage type in each of the index databases to be listed are set as the first target index database, so as to call the preset enumeration center, and enumerate the target object indexes in each of the first target index databases in a front-to-back order to obtain a corresponding first enumeration result; If the target action type is characterized as a type conversion action type, the second target index database is determined based on the storage type corresponding to the target object and each of the index databases to be listed, and then the preset enumeration center is called, and the target object indexes in the second target index database are listed in sequence from front to back to obtain the corresponding second enumeration result.
6. The object management operation execution method according to claim 5, characterized in that: The to-be-processed enumeration results are screened according to preset screening rules, and then the to-be-executed objects are determined based on the obtained screening results, and a preset action execution center is called to perform an execution operation on each of the to-be-executed objects based on the target action type, including: Calling a preset screening center and screening the first enumerated results using preset screening rules to obtain first screening results, so as to determine the corresponding objects to be executed based on each of the first screening results; The objects to be executed are stored in a preset object deletion queue, so as to call several threads in the preset action execution center to obtain the objects to be executed from the preset object deletion queue, and perform execution operations on the objects to be executed; calling a preset screening center and screening the second enumerated results using the preset screening rule to obtain second screening results, so as to determine the corresponding to-be-executed object based on each of the second screening results; Each of the objects to be executed is stored in a preset type conversion queue, so as to call several threads in the preset action execution center to obtain each of the objects to be executed from the preset type conversion queue, and perform execution operations on each of the objects to be executed.
7. The object management operation execution method according to any one of claims 1 to 6, characterized in that: The target object indexes in the target index database are listed in sequence from front to back to obtain the listing results to be processed, including: The target object indexes in the target index database are listed in sequence from front to back, and it is determined whether the upload time corresponding to the obtained to-be-processed enumeration results is greater than a preset time threshold; If the upload time corresponding to the to-be-processed enumeration result is not greater than the preset time threshold, triggering the step of sequentially enumerating the target object indexes in the target index database in order from front to back; If the upload time corresponding to the pending enumeration results is greater than the preset time threshold, the step of screening the pending enumeration results according to the preset screening rules is triggered.
8. An object management operation execution device, characterized in that: include: A target object index determination module is used to determine the storage type corresponding to the object to be executed, and based on the storage type, determine the storage location corresponding to the initial object index corresponding to the object to be executed, and then write the upload time of the initial object index into the key value of the initial object index to obtain the target object index; An index database determination module, used to store the indexes of the target objects in the to-be-listed index database corresponding to the storage location in order from the latest upload time; The index databases to be listed correspond to the storage types one by one; An enumeration result acquisition module is used to determine a target index database from each of the to-be-enumerated index databases based on the target action type, and then enumerate the target object indexes in the target index database in order from front to back to obtain an enumeration result to be processed; The object execution module is used to filter the pending enumeration results according to preset filtering rules, then determine the pending objects based on the obtained filtering results, and call the preset action execution center to perform execution operations on each pending object based on the target action type.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the object management operation execution method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the steps of the object management operation execution method according to any one of claims 1 to 7 are implemented.