Object processing method, device and equipment in object storage and storage medium
By pre-determining and storing processing data in the object storage system, and using metadata storage devices and preset time periods to process objects, the problems of wasted hardware resources and low processing efficiency in the object storage system are solved, and timely processing of expired data is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2023-10-24
- Publication Date
- 2026-05-01
AI Technical Summary
Existing object storage systems suffer from wasted hardware resources and low processing efficiency when handling expired data, especially when there are many objects, making it impossible to process expired data in a timely manner.
By calculating the expiration time based on the object tag and processing strategy when the object is written, the object processing data is predetermined and stored in the metadata storage device. The object processing device retrieves and processes this data within a preset time period, avoiding multiple scans.
It saves hardware resources, improves processing efficiency, ensures timely processing of due data, and reduces waste of hardware resources.
Smart Images

Figure CN117435133B_ABST
Abstract
Description
Object processing methods, apparatus, devices and storage media in object storage Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an object processing method, apparatus, device and storage medium in object storage. Background Technology
[0002] Object storage is object-based storage that stores objects in buckets using a flattened storage approach. All objects within a bucket reside at the same logical level, eliminating the multi-level tree-like directory structure of a file system. Because each bucket has its own storage category and access permissions, it can meet diverse user storage needs. Therefore, object storage is commonly used to store unstructured data such as images, audio, documents, and video.
[0003] Object storage requires processing stored objects according to user needs, such as transferring or deleting them upon expiration. Currently, users can assign object tags to stored objects and set different processing strategies for different object tags. Then, all objects are scanned periodically, and objects are processed according to the processing strategies corresponding to their tags. However, the above method requires scanning all objects stored in the object storage system. Objects will be scanned multiple times before they expire, wasting hardware resources. Furthermore, when the number of objects stored in the object storage system is too large, the increased scanning time will lead to a decrease in processing efficiency, making it impossible to process expired objects in a timely manner.
[0004] In summary, existing methods for handling distributed objects suffer from the problems of wasting hardware resources and failing to process expired data in a timely manner. Summary of the Invention
[0005] This application provides an object processing method, apparatus, device, and storage medium in object storage to solve the technical problems of existing methods for processing distributed objects, which waste hardware resources and cannot process expired data in a timely manner.
[0006] In a first aspect, this application provides an object processing method in object storage, for use in an object storage service terminal device, wherein the object storage service terminal device is located in a preset network architecture, and the preset network architecture further includes a data storage device, a metadata storage device, and an object processing device; the method includes:
[0007] Receive an object storage request sent by an object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag;
[0008] Based on the real-time time and the labels of each target object, determine the target processing time and target processing strategy for each target object;
[0009] Based on the target object tags, corresponding target processing times, and target processing strategies of each target object, at least one object processing data is determined; the object processing data includes at least one target object identifier, and the target object tags, corresponding target processing times, and corresponding target processing strategies of each target object identifier are the same.
[0010] For each object processing data, in response to the fact that the target objects to which each target object identifier belongs are stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device can obtain each object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device according to the real-time time and each object processing data.
[0011] Optionally, in the method described above, determining at least one object processing data based on the target object label, corresponding target processing time, and target processing strategy of each target object includes:
[0012] Target objects with the same target object label, corresponding target processing time, and corresponding target processing strategy are grouped into the same target object group to obtain at least one target object group.
[0013] Based on the target objects included in each target object group, determine the object processing data corresponding to each target object group.
[0014] Optionally, in the method described above, the object processing data further includes object processing tags, object processing time, and object processing strategy; the step of determining the object processing data corresponding to each target object group based on the target objects included in each target object group includes:
[0015] For each target object group, the target object label of each target object is determined as the corresponding object processing label, the target processing time of each target object is determined as the corresponding object processing time, the target processing strategy of each target object is determined as the corresponding object processing strategy, and the target object identifier of each target object is determined as the corresponding target object identifier.
[0016] Optionally, in the method described above, determining the target processing time and target processing strategy corresponding to each target object based on the real-time time and the tags of each target object includes:
[0017] Obtain the mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategies include preset storage duration and preset processing strategies;
[0018] From the mapping relationship between the multiple preset object tags and preset storage strategies, determine the target storage strategy corresponding to each target object tag;
[0019] The preset processing strategies included in the target storage strategy corresponding to each target object tag are determined as the target processing strategies corresponding to each target object;
[0020] The target processing time for each target object is calculated based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag.
[0021] Optionally, in the method described above, the step of calculating the target processing time for each target object based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag includes:
[0022] The preset storage duration included in the target storage strategy corresponding to each target object tag is determined as the target storage duration corresponding to each target object;
[0023] The time after the real-time period of each target storage duration is determined as the target processing time for each target object.
[0024] Optionally, in the method described above, after storing the object processing data in the metadata storage device, the method further includes:
[0025] The device receives a storage policy modification request sent by an object storage client device; the storage policy modification request includes an identifier of the policy to be modified, and at least one of the following: the modified storage duration and the modified processing policy of the policy to be modified.
[0026] The object label corresponding to the policy to be modified is determined based on the policy identifier to be modified.
[0027] Obtain the object processing tags for each object processing data from the metadata storage device;
[0028] In response to the fact that the object processing label of the object processing data is the same as the object label corresponding to the policy to be modified, at least one of the first operation and the second operation is performed.
[0029] The first operation includes:
[0030] The storage duration before modification of the policy to be modified is determined based on the policy identifier to be modified;
[0031] The duration modification amount corresponding to the strategy to be modified is determined based on the storage duration before modification and the storage duration after modification.
[0032] Based on the duration modification amount, the object processing time of the object processing data in the metadata storage device is modified;
[0033] The second operation includes:
[0034] Based on the modified strategy, the object processing strategy for the object processing data in the metadata storage device is modified.
[0035] Secondly, this application provides an object processing method in object storage, applied to an object processing device located in a preset network architecture, the preset network architecture further including an object storage service terminal device, a data storage device, and a metadata storage device; the data storage device stores at least one target object, the metadata storage device stores at least one object processing data, the object processing data including at least one target object identifier; the object processing data is determined by the object storage service terminal device and stored in the metadata storage device; the method includes:
[0036] Data processing for each object is retrieved from the metadata storage device according to a preset time period;
[0037] Based on real-time data and processing data for each object, the target objects stored in the data storage device are processed.
[0038] Optionally, in the method described above, the object processing data further includes object processing tags, object processing time, and object processing strategy; the step of processing each target object stored in the data storage device according to the real-time time and each object processing data includes:
[0039] For each object processing data, in response to the object processing time being earlier than the real-time time, the data storage device is controlled to use the object processing strategy to process the target object to which each target object identifier belongs.
[0040] Optionally, in the method described above, the object processing strategy includes deletion; controlling the data storage device to process the target objects to which each target object identifier belongs using the object processing strategy includes:
[0041] The object processing strategy and the identifiers of each target object are sent to the data storage device so that the data storage device can delete the target objects to which each target object identifier belongs.
[0042] Thirdly, this application provides an object processing apparatus in an object storage system, applied to an object storage service terminal device, wherein the object storage service terminal device is located in a preset network architecture, and the preset network architecture further includes a data storage device, a metadata storage device, and an object processing device; the apparatus includes:
[0043] A receiving module is configured to receive an object storage request sent by an object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag;
[0044] The first determination module is used to determine the target processing time and target processing strategy for each target object based on the real-time time and the tags of each target object.
[0045] The second determining module is used to determine at least one object processing data based on the target object tag, the corresponding target processing time, and the target processing strategy of each target object; the object processing data includes at least one target object identifier, and the target object tags, corresponding target processing times, and corresponding target processing strategies of each target object identifier are the same.
[0046] The storage module is used to process data for each object. In response to the fact that all target objects to which the included target object identifiers belong are stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device can obtain the object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device according to the real-time time and the object processing data.
[0047] Fourthly, this application provides an object processing apparatus in an object storage system, applied to an object processing device. The object processing device is located in a preset network architecture, which further includes an object storage service client device, a data storage device, and a metadata storage device. The data storage device stores at least one target object, and the metadata storage device stores at least one object processing data, the object processing data including at least one target object identifier. The apparatus includes:
[0048] The acquisition module is used to acquire processing data of each object from the metadata storage device according to a preset time period;
[0049] The processing module is used to process each target object stored in the data storage device according to the real-time time and the processing data of each object.
[0050] Fifthly, this application provides an object storage service terminal device, which is located in a preset network architecture, the preset network architecture further including a data storage device, a metadata storage device, and an object processing device; the object storage service terminal device includes: a processor, and a memory communicatively connected to the processor;
[0051] The memory stores computer-executed instructions;
[0052] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.
[0053] In a sixth aspect, this application provides an object processing device, which is located in a preset network architecture, the preset network architecture further including an object storage service terminal device, a data storage device, and a metadata storage device; the object processing device includes: a processor, and a memory communicatively connected to the processor;
[0054] The memory stores computer-executed instructions;
[0055] The processor executes computer execution instructions stored in the memory to implement the method as described in the second aspect.
[0056] In a seventh aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method described in the first or second aspect.
[0057] The object processing method, apparatus, device, and storage medium provided in this application for object storage receive object storage requests sent by an object storage client device. The object storage request includes at least one target object. The target object includes a target object identifier and a target object tag. Based on the real-time time and each target object tag, a target processing time and target processing strategy corresponding to each target object are determined. Based on the target object tag, the corresponding target processing time, and the target processing strategy of each target object, at least one object processing data is determined. The object processing data includes at least one target object identifier, and the target object tags, corresponding target processing times, and corresponding target processing strategies of the target object identifiers are the same. For each object processing data, in response to the fact that all target objects to which the included target object identifiers belong are stored in the data storage device, the object processing data is stored in a metadata storage device, so that the object processing device retrieves each object processing data from the metadata storage device according to a preset time period, and processes each target object stored in the data storage device based on the real-time time and each object processing data. Since object processing data includes multiple target object identifiers, the target processing time for each target object identifier is the object processing time of the object processing data, and the target processing strategy for each target object identifier is the object processing strategy of the object processing data. The object storage service client device determines the target processing time of the target object before storing it, and stores the object processing data of the target object in the metadata storage device after storing the target object. Therefore, the object processing device can retrieve each object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device based on the real-time time and each object processing data. Each object will not be scanned multiple times during its lifecycle. The object processing device does not need to scan all objects stored in the data storage device; it only needs to process objects after they expire. Therefore, the solution of this application can solve the technical problems in the prior art, save hardware resources, and process expired data in a timely manner. Attached Figure Description
[0058] 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.
[0059] Figure 1 is a network architecture diagram corresponding to the application scenario of the object processing method in object storage provided in the embodiments of this application;
[0060] Figure 2 is a flowchart illustrating the object processing method in object storage provided in Embodiment 1 of this application;
[0061] Figure 3 is a flowchart illustrating the object processing method in object storage provided in Embodiment 2 of this application;
[0062] Figure 4 is a schematic diagram of the object processing device in the object storage provided in Embodiment 3 of this application;
[0063] Figure 5 is a schematic diagram of the structure of the object processing device in the object storage provided in Embodiment 4 of this application;
[0064] Figure 6 is a schematic diagram of the object storage service terminal device provided in Embodiment 5 of this application;
[0065] Figure 7 is a schematic diagram of the structure of the object processing device provided in Embodiment 6 of this application.
[0066] 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
[0067] 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.
[0068] Distributed object storage systems employ a flat architecture, storing objects in buckets. A bucket is analogous to a directory in a file system, and an object is analogous to a file. Unlike a file system, buckets cannot be nested; new buckets cannot be created within existing ones. Therefore, a single bucket can store hundreds of billions of objects. Unstructured data such as images, audio, documents, and videos are typically stored as objects in distributed object storage systems. When data stored in a distributed object storage system expires, the objects containing that data need to be deleted or transferred.
[0069] Currently, in object storage, object tags can be configured for objects, and different processing strategies can be assigned to different object tags. Then, all objects stored in the object storage system are scanned at preset time intervals, and each object is processed according to the processing strategy corresponding to its object tag. This method requires scanning all objects stored in the object storage system, and a single scan consumes a significant amount of time. If the time taken for a single scan exceeds the preset time interval for scanning all objects, objects may expire without being processed in time. Furthermore, objects are scanned every preset time interval before their expiration, leading to increased processor power consumption and wasted hardware resources.
[0070] In summary, existing methods for handling distributed objects suffer from the problems of wasting hardware resources and failing to process expired data in a timely manner.
[0071] To address the problems in existing technologies, the inventors propose the following inventive concept: Objects do not require multiple scans before their expiration date, but without scanning, it's impossible to determine whether an object needs processing. Therefore, if it's possible to know in advance whether an object needs processing, then processing can proceed accordingly. Thus, the object's expiration time can be calculated based on the object's processing strategy when it's written. Processing the object only when its expiration time arrives can solve the technical problems in existing technologies, save hardware resources, and process expired data promptly.
[0072] Based on the above concept, the inventors have proposed the technical solution of this application, aiming to solve the aforementioned technical problems of the prior art. The technical solution of this application and how it solves the above-mentioned technical problems will be 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 repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0073] Figure 1 is a network architecture diagram corresponding to the application scenario of the object processing method provided in this application embodiment. As shown in Figure 1, the network architecture corresponding to the application scenario of the object processing method provided in this application embodiment includes: an object storage service client device 10, an object storage client device 11, a data storage device 12, a metadata storage device 13, and an object processing device 14. The object storage service client device 10 and the object storage client device 11 are communicatively connected. The object storage client device 11, the data storage device 12, and the metadata storage device 13 are communicatively interconnected. The data storage device 12, the metadata storage device 13, and the object processing device 14 are communicatively interconnected.
[0074] The object storage client device 10 is configured with an object processing service, and the object storage client device 11 is configured with a client for the object processing service, or the object storage client device 11 accesses the URL of the object processing service.
[0075] The user is the user who needs to store data. The user can select or input target data to be stored through the object storage client device 11, in the operation interface of the object processing service client, or on the webpage corresponding to the object processing service's URL. The target data has a data identifier. After selecting or inputting the target data, the user can also select object tags for the target data and trigger the object storage operation through the "Store," "Upload," or "Confirm" components. Upon receiving the object storage operation triggered by the user, the object storage client device 11 can determine the target data entered by the user as object data, the object tags selected by the user for the target data as object tags, and the data identifier of the target data as object identifiers, thereby identifying at least one target object that needs to be stored. Then, the object storage client device 11 can generate an object storage request based on the at least one target object that needs to be stored and send the object storage service client device 10 to the object storage service client device 10.
[0076] The object storage service client device 10 receives an object storage request sent by the object storage client device 11. The object storage request includes at least one target object; the target object includes a target object identifier and a target object tag.
[0077] The object storage service terminal device 10 determines the target processing time and target processing strategy corresponding to each target object based on the real-time time and the target object tag; it determines at least one object processing data based on the target object tag, the corresponding target processing time and the target processing strategy of each target object; the object processing data includes at least one target object identifier, and the target object tags, corresponding target processing times and corresponding target processing strategies of the target object identifiers are the same.
[0078] For each object processing data, the object storage service terminal device 10, in response to the fact that the target objects to which each target object identifier belongs are stored in the data storage device 12, stores the object processing data in the metadata storage device 13, so that the object processing device 14 can obtain each object processing data from the metadata storage device 13 according to a preset time period, and process each target object stored in the data storage device 12 according to the real-time time and each object processing data.
[0079] The object processing device 14 retrieves object processing data from the metadata storage device 13 according to a preset time period, and processes each target object stored in the data storage device 12 based on the real-time time and the object processing data.
[0080] Example 1
[0081] Figure 2 is a flowchart illustrating the object processing method in object storage provided in Embodiment 1 of this application. As shown in Figure 2, the execution entity in this embodiment is an object processing device in object storage. This object processing device in object storage is located in an object storage service client device. The object storage service client device is located in a preset network architecture, which also includes a data storage device, a metadata storage device, and an object processing device. The object processing method in object storage provided in this embodiment includes steps 201 to 204.
[0082] Step 201: Receive an object storage request sent by the object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag.
[0083] In this embodiment, the target object also includes target object data, which is data that needs to be stored, such as audio data, image data, video data, document data, table data, files, etc.
[0084] Step 202: Determine the target processing time and target processing strategy for each target object based on the real-time time and the tags of each target object.
[0085] In this embodiment, the object storage service terminal device can obtain real-time time from the Internet.
[0086] Optionally, step 202 may be further refined to include steps 301 to 304.
[0087] Step 301: Obtain the mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategies include preset storage duration and preset processing strategies.
[0088] In this embodiment, the mapping relationship between multiple preset object tags and preset storage strategies can be pre-stored in the memory of the object storage service client device. The object storage service client device can retrieve the mapping relationship between multiple preset object tags and preset storage strategies from its memory. Each preset object tag and preset processing strategy corresponds one preset object tag to one preset storage strategy. A preset storage strategy includes a preset storage time and a preset processing strategy; the preset storage time and preset processing strategy included in each preset storage strategy can be different. In the mapping relationship between multiple preset object tags and preset storage strategies, different preset object tags can correspond to different preset storage strategies, or they can correspond to the same preset storage strategy.
[0089] Step 302: Determine the target storage strategy corresponding to each target object tag from the mapping relationship between multiple preset object tags and preset storage strategies.
[0090] In this embodiment, the object storage service terminal device queries the preset storage policies that have a mapping relationship with each target object label in the mapping relationship between multiple preset object labels and preset storage policies, and determines the preset storage policies that have a mapping relationship with each target object label as the target storage policies corresponding to each target object label.
[0091] Step 303: The preset processing strategies included in the target storage strategy corresponding to each target object tag are determined as the target processing strategies corresponding to each target object.
[0092] In this embodiment, since the target object tag belongs to the target object, for each target object tag, the object storage service terminal device can determine the preset processing strategy included in the target storage strategy corresponding to the target object to which the target object tag belongs as the target processing strategy.
[0093] For example, label a is the object label for object A, label b is the object label for object B, and label c is the object label for object C. Label a corresponds to storage policy e, label b corresponds to storage policy f, and label c corresponds to storage policy e. Storage policy e includes processing policy x, and storage policy f includes processing policy y. Then, the object storage service client device can determine the processing policy x included in storage policy e corresponding to label a as the target processing policy corresponding to object A to which label a belongs. It can determine the processing policy y included in storage policy f corresponding to label b as the target processing policy corresponding to object B to which label b belongs. It can determine the processing policy x included in storage policy e corresponding to label c as the target processing policy corresponding to object C to which label c belongs. That is, object A corresponds to processing policy x, object B corresponds to processing policy y, and object C corresponds to processing policy x. The symbols a, A, b, B, c, C, e, f, x, and y are used to distinguish object labels, objects, storage policies, and processing policies.
[0094] Step 304: Calculate the target processing time for each target object based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag.
[0095] In this embodiment, the preset storage duration refers to the storage duration of data or objects in the object storage system under the preset storage strategy. For example, the preset storage duration can be 10 days, one month, one year, etc. Data or objects stored in the object storage system often have a storage duration. After the storage duration of data or objects is exhausted, the object storage system needs to process the data or objects, such as deleting the data or objects, extending the storage duration of data or objects, or sending the data or objects to other devices preset by the user. The target processing time refers to the time when the storage duration of data or objects is exhausted, which can also be understood as the expiration time of data or objects, or the time when data or objects need to be processed.
[0096] The object processing method in object storage provided in this embodiment can accurately and quickly determine the target processing time and target processing strategy corresponding to the target object by using real-time time, each target object tag, and the mapping relationship between multiple preset object tags and preset storage strategies. This is beneficial for the object storage service terminal device to quickly determine at least one object processing data.
[0097] Optionally, step 304 may be further refined to include steps 401 to 402.
[0098] Step 401: Determine the preset storage duration included in the target storage strategy corresponding to each target object tag as the target storage duration corresponding to each target object.
[0099] In this embodiment, since the target object tag belongs to the target object, for each target object tag, the preset storage duration included in the target storage strategy corresponding to the target object tag can be determined as the target storage duration corresponding to the target object to which the target object tag belongs.
[0100] Continuing with the example above, label a is the object label for object A, label b is the object label for object B, and label c is the object label for object C. Label a corresponds to storage policy e, label b corresponds to storage policy f, and label c corresponds to storage policy e. Storage policy e includes a storage duration of 10 days and a processing policy x. Storage policy f includes a storage duration of 30 days and a processing policy y. Therefore, the object storage service client device can determine the 10-day storage duration included in storage policy e corresponding to label a as the target storage duration for object A to which label a belongs. It can also determine the 30-day storage duration included in storage policy f corresponding to label b as the target storage duration for object B to which label b belongs. Finally, it can determine the 10-day storage duration included in storage policy e corresponding to label c as the target storage duration for object C to which label c belongs. In other words, object A corresponds to a storage duration of 10 days, object B corresponds to a storage duration of 30 days, and object C corresponds to a storage duration of 10 days.
[0101] Step 402: Determine the target processing time corresponding to each target object by taking the time after the real-time has passed through the storage duration of each target.
[0102] In this embodiment, the time after each target storage duration refers to the time elapsed from the real-time time to the target storage duration. The real-time time and target processing time can be accurate to the month, day, hour, etc., and are not limited here.
[0103] For example, if the real-time is 00:00 of the current day and the target storage duration for the target object is 12 hours, the target processing time for the target object is 12:00 of the current day. If the real-time is 00:00 of the current day and the target storage duration for the target object is 24 hours, the target processing time for the target object is 00:00 of the next day. If the real-time is the 10th of the current month and the target storage duration for the target object is 1 day, the target processing time for the target object can be the 11th of the current month.
[0104] The object processing method in object storage provided in this embodiment determines the target processing time for each target object by taking the time after the real-time has passed through each target storage duration. This allows for accurate calculation of the target processing time for each target object, enabling timely processing of each target object when it expires.
[0105] Step 203: Based on the target object label, the corresponding target processing time, and the target processing strategy of each target object, determine at least one object processing data; the object processing data includes at least one target object identifier, and the target object labels, corresponding target processing times, and corresponding target processing strategies of each target object identifier are the same.
[0106] In this embodiment, the object processing data includes at least one target object identifier, which is used to locate the target object from the object storage service system. When the object processing data includes multiple target object identifiers, the target object tags corresponding to each target object identifier are the same, the corresponding target processing time is the same, and the corresponding target processing strategy is the same. This means that the target objects corresponding to the multiple target object identifiers in the object processing data need to be processed at the same time and with the same processing strategy.
[0107] Optionally, step 203 may be further refined to include steps 501 to 502.
[0108] Step 501: Group target objects with the same target object label, corresponding target processing time, and corresponding target processing strategy into the same target object group to obtain at least one target object group.
[0109] In this embodiment, the object storage request includes target objects that may have different target object tags, and the target object tags determine the target processing strategy and target processing time corresponding to the target object. Since a user may trigger object storage operations multiple times, within a single object storage request, target objects with the same target object tag will have the same target processing strategy and target processing time. However, in multiple object storage requests, because the real-time time at which the object storage service client device receives each object storage request may differ, target objects with the same target object tag may have different target processing strategies and target processing times.
[0110] To ensure that the object processing device can process the target object in a timely and accurate manner, the object storage service terminal device can group target objects with the same target object tag, the same target processing time, and the same target processing strategy in the same object storage request into the same target object group, and determine an object processing data for each target object group.
[0111] Step 502. Determine the object processing data corresponding to each target object group based on the target objects included in each target object group.
[0112] Optionally, the object processing data may also include object processing labels, object processing time, and object processing strategy; and step 502 may be further refined to include step 601.
[0113] Step 601: For each target object group, determine the target object label of each target object as the corresponding object processing label, determine the target processing time of each target object as the corresponding object processing time, determine the target processing strategy of each target object as the corresponding object processing strategy, and determine the target object identifier of each target object as the corresponding target object identifier.
[0114] In this embodiment, object processing tags represent the tags of each target object that needs to be processed in the object processing data, object processing time represents the processing time of each target object that needs to be processed in the object processing data, and object processing strategy represents the processing strategy for each target object that needs to be processed in the object processing data. Processing strategies can include deletion, transfer, renewal, etc.
[0115] Therefore, for each target object group, the object storage service terminal device can determine the target object tag of each target object in the target object group as the object processing tag of the target object group, the target object identifier of each target object as the target object identifier included in the target object group, and the target processing strategy of each target object as the object processing strategy of the target object group.
[0116] The object processing method in object storage provided in this embodiment identifies target objects with the same target object tag, target processing time, and target processing strategy as a target object group, and assigns object processing data to each target object group. This allows the object processing device to process each target object in the object processing data based on its object processing time. Furthermore, when using a preset storage strategy corresponding to a preset tag, the object processing data can be conveniently and quickly modified based on its object processing tag.
[0117] Step 204: For each object processing data, in response to the fact that the target objects to which each target object identifier belongs are stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device can obtain each object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device according to the real-time time and each object processing data.
[0118] In this embodiment, the data storage device is used to store objects. Within the data storage device, objects can be stored in key-value pairs. For example, the key stores the object identifier, and the value stores the object data and object tag. The key-value pair format allows for quick and accurate identification of object data based on the object identifier.
[0119] Metadata storage devices can be used to store object metadata, which can also be stored in key-value pairs. For example, the key stores the object identifier, and the value stores the object's metadata. Metadata storage devices can have higher read and write speeds than data storage devices.
[0120] In this embodiment, the object processing data can be one type of metadata; therefore, the object processing data can be stored in a metadata storage device.
[0121] Data storage devices and metadata storage devices can be independent of each other or combined into one device.
[0122] Object storage service client devices are used to store objects to data storage devices. Object storage service client devices and data storage devices can be independent of each other or combined into a single device.
[0123] Since only objects stored in the object storage system need to be processed, the object storage service client device can store the object processing data to the metadata storage device after all the target objects to which the target object identifiers belong have been stored to the data storage device.
[0124] In this embodiment, since the object storage service terminal device determines the target processing time of the target object and the object processing data, the object processing device can retrieve the object processing data from the metadata storage device according to a preset time period. After each retrieval of object processing data, the device processes each target object stored in the data storage device based on the real-time time and the object processing data. Specifically, when the real-time time has reached the object processing time, the device processes the target objects corresponding to the target object identifiers included in the object processing data according to the object processing strategy. Because the object processing data includes the object processing time, the object processing device only retrieves the object processing data. After the object processing time is reached, the device processes the target objects according to the target object identifiers. For objects stored in the object storage device, they will not be scanned multiple times before their expiration, reducing hardware resource waste. For the object processing device, it only needs to retrieve the object processing data and does not need to scan all objects in the object storage system, allowing for timely processing of expired objects.
[0125] In this embodiment, the object processing device can be independent of the object storage service terminal device, or they can be combined into one device. If the object processing device and the object storage service terminal device are combined into one device, the object storage service terminal device retrieves the processing data of each object from the metadata storage device according to a preset time period, and processes each target object stored in the data storage device based on the real-time time and the processing data of each object. Specifically, the steps of retrieving the processing data of each object from the metadata storage device and processing the data of each object according to the real-time time can be implemented through scheduled tasks or other methods, which will not be elaborated here.
[0126] The object processing method in object storage provided in this embodiment receives an object storage request sent by an object storage client device. The object storage request includes at least one target object. The target object includes a target object identifier and a target object tag. Based on the real-time time and each target object tag, the target processing time and target processing strategy corresponding to each target object are determined. Based on the target object tag, the corresponding target processing time, and the target processing strategy of each target object, at least one object processing data is determined. The object processing data includes at least one target object identifier, and the target object tags, corresponding target processing times, and corresponding target processing strategies of each target object identifier are the same. For each object processing data, in response to the fact that the target objects to which each target object identifier belongs are all stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device obtains each object processing data from the metadata storage device according to a preset time period, and processes each target object stored in the data storage device according to the real-time time and each object processing data. Since object processing data includes multiple target object identifiers, the target processing time for each target object identifier is the object processing time of the object processing data, and the target processing strategy for each target object identifier is the object processing strategy of the object processing data. The object storage service client device determines the target processing time of the target object before storing it, and stores the object processing data of the target object in the metadata storage device after storing the target object. Therefore, the object processing device can retrieve the object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device based on the real-time time and the object processing data. Each object will not be scanned multiple times during its lifecycle. The object processing device does not need to scan all objects stored in the data storage device; it only needs to process objects after they expire. Therefore, the solution of this application can solve the technical problems in the prior art, save hardware resources, and process expired data in a timely manner.
[0127] Optionally, after storing the object processing data in the metadata storage device, steps 701 to 704 are further included.
[0128] Step 701: Receive a storage policy modification request sent by the object storage client device; the storage policy modification request includes an identifier of the policy to be modified, and at least one of the following: the modified storage duration and the modified processing policy of the policy to be modified.
[0129] In this embodiment, the user can trigger a storage policy modification operation on the object storage client device to modify at least one of the preset storage policy, including the preset storage duration and the preset processing policy. For example, the storage duration can be changed from 10 days to 30 days, and the processing policy can be changed from deletion after expiration to restorage after expiration.
[0130] The object storage client device determines a storage policy modification request based on a user-triggered storage policy modification operation. The storage policy modification request includes an identifier of the policy to be modified, and at least one of the following: the post-modification storage duration and the post-modification processing policy of the policy to be modified. The policy to be modified is the storage policy that the user needs to change.
[0131] Step 702: Determine the object label corresponding to the policy to be modified based on the policy identifier.
[0132] In this embodiment, a preset storage policy can correspond to multiple object tags. The object storage service terminal device can determine the object tag corresponding to the policy to be modified based on the mapping relationship between multiple preset object tags and preset storage policies.
[0133] Step 703: Obtain the object processing tags of each object processing data from the metadata storage device.
[0134] Step 704: In response to the object processing label of the object processing data being the same as the object label corresponding to the policy to be modified, at least one of the first operation and the second operation is performed. The first operation includes steps 7041 to 7043. The second operation includes step 7044.
[0135] In this embodiment, since the object processing data is determined when the object is stored, if the user modifies the storage strategy, the object processing data needs to be modified to ensure that the object is stored according to the modified storage strategy. For example, before modifying the storage strategy, the user selected a storage duration of 10 days for the storage strategy corresponding to the object tag. After storing the object, the user modifies the storage duration of the storage strategy corresponding to the object tag to 20 days. The object's expiration time changes, and therefore, the target processing time for the object also changes. Consequently, after the user modifies the storage strategy, the object processing data needs to be modified.
[0136] In this embodiment, if the object processing label of the object processing data is the same as the object label corresponding to the strategy to be modified, it means that the target object corresponding to the target object identifier included in the object processing data needs to be modified in terms of target processing time or target processing strategy.
[0137] Step 7041: Determine the storage duration before modification of the policy to be modified based on the policy identifier.
[0138] Step 7042: Determine the duration modification amount corresponding to the strategy to be modified based on the storage duration before modification and the storage duration after modification.
[0139] In this embodiment, the duration modification amount can be either an extension or a reduction. When the storage duration before the modification of the strategy to be modified is greater than the storage duration after the modification, the duration modification amount is a reduction, and the reduction amount = storage duration before modification - storage duration after modification. When the storage duration before the modification of the strategy to be modified is less than the storage duration after the modification, the duration modification amount is an extension, and the extension amount = storage duration after modification - storage duration before modification.
[0140] Step 7043: Modify the object processing time of the object processing data in the metadata storage device according to the duration modification amount.
[0141] In this embodiment, if the duration modification amount is a duration extension amount, the object processing time for object processing data is delayed; if the duration modification amount is a duration reduction amount, the object processing time for object processing data is extracted.
[0142] Step 7044: Modify the object processing strategy for object processing data in the metadata storage device according to the modified strategy.
[0143] In this embodiment, the object processing strategy for object processing data can be directly replaced with the modified strategy.
[0144] The object processing method in object storage provided in this embodiment executes at least one of the first and second operations in response to the object processing tag of the object processing data being the same as the object tag corresponding to the policy to be modified. When the user modifies the storage policy, the object processing data can be modified accordingly so as to modify the target processing time of the target object and process the target object according to the user's needs.
[0145] Example 2
[0146] Figure 3 is a flowchart illustrating the object processing method in object storage provided in Embodiment 2 of this application. As shown in Figure 3, the execution entity in this embodiment is an object processing device in object storage. This object processing device in object storage is located in an object processing device. The object processing device is located in a preset network architecture, which also includes an object storage service client device, a data storage device, and a metadata storage device; the data storage device stores at least one target object, and the metadata storage device stores at least one object processing data, which includes at least one target object identifier; the object processing data is determined by the object storage service client device and stored in the metadata storage device. The object processing method in object storage provided in this embodiment includes steps 801 to 802.
[0147] Step 801: Obtain the processing data of each object from the metadata storage device according to the preset time period.
[0148] In this embodiment, the preset time period can be set by the user and can be modified. For example, the preset time period can be daily, every 12 hours, etc.
[0149] Step 802: Process each target object stored in the data storage device according to the real-time time and the processing data of each object.
[0150] Optionally, the object processing data may also include object processing labels, object processing time, and object processing strategy; and step 802 may be further refined to include step 901.
[0151] Step 901: For each object processing data, in response to the object processing time being earlier than the real-time time, control the data storage device to use the object processing strategy to process the target object to which each target object identifier belongs.
[0152] In this embodiment, if the object processing time is earlier than the real-time time, it means that all target objects in the object processing data have expired. Therefore, the data storage device can be controlled to use an object processing strategy to process the target objects to which each target object identifier belongs.
[0153] In this embodiment, the object processing device can send data processing instructions to the data storage device. These instructions may include identifiers of each target object in the object processing data, as well as an object processing strategy. Upon receiving the data processing instructions, the data storage device can process the target objects to which each target object identifier belongs, according to the object processing strategy in the instructions. The target object to which each target object identifier belongs is either the target object identified by the target object identifier or the target object corresponding to the target object identifier.
[0154] Optionally, the object processing strategy includes deletion; step 901, "controlling the data storage device to process the target objects to which each target object identifier belongs using the object processing strategy", includes: sending the object processing strategy and each target object identifier to the data storage device so that the data storage device deletes the target objects to which each target object identifier belongs.
[0155] The object processing method in object storage provided in this embodiment retrieves object processing data from a metadata storage device according to a preset time period; and processes each target object stored in the data storage device based on the real-time time and the object processing data. Since the object processing device does not need to scan all objects, but only needs to retrieve object processing data, it can save hardware resources. Furthermore, because the object processing data includes object processing time, the object processing device can process the objects in the data storage device that need processing in a timely manner based on the real-time time and the object processing data.
[0156] Example 3
[0157] Figure 4 is a schematic diagram of the object processing device in the object storage provided in Embodiment 3 of this application. As shown in Figure 4, the object processing device in the object storage provided in this embodiment is applied to an object storage service terminal device. The object storage service terminal device is located in a preset network architecture, which also includes a data storage device, a metadata storage device, and an object processing device. The object processing device 40 includes: a receiving module 41, a first determining module 42, a second determining module 42, and a storage module 44.
[0158] The receiving module 41 is used to receive an object storage request sent by the object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag.
[0159] The first determining module 42 is used to determine the target processing time and target processing strategy corresponding to each target object based on the real-time time and the tags of each target object.
[0160] The second determining module 43 is used to determine at least one object processing data based on the target object label, the corresponding target processing time, and the target processing strategy of each target object; the object processing data includes at least one target object identifier, and the target object labels, corresponding target processing times, and corresponding target processing strategies of each target object identifier are the same.
[0161] The storage module 44 is used to process data for each object. In response to the fact that the target objects to which each target object identifier belongs are stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device can obtain the object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device according to the real time and the object processing data.
[0162] Optionally, the second determining module 43 is specifically used for:
[0163] Target objects with the same target object label, corresponding target processing time, and corresponding target processing strategy are grouped into the same target object group to obtain at least one target object group.
[0164] Based on the target objects included in each target object group, determine the object processing data corresponding to each target object group.
[0165] Optionally, the second determining module 43 is further used for:
[0166] For each target object group, the target object label of each target object is determined as the corresponding object processing label, the target processing time of each target object is determined as the corresponding object processing time, the target processing strategy of each target object is determined as the corresponding object processing strategy, and the target object identifier of each target object is determined as the corresponding target object identifier.
[0167] Optionally, the first determining module 42 is specifically used for:
[0168] Obtain the mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategies include preset storage duration and preset processing strategies;
[0169] From the mapping relationship between multiple preset object tags and preset storage strategies, determine the target storage strategy corresponding to each target object tag;
[0170] The preset processing strategies included in the target storage strategy corresponding to each target object tag are determined as the target processing strategies corresponding to each target object;
[0171] The target processing time for each target object is calculated based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag.
[0172] Optionally, the first determining module 42 is further used for:
[0173] The preset storage duration included in the target storage strategy corresponding to each target object tag is determined as the target storage duration corresponding to each target object;
[0174] The time after the real-time period of each target storage duration is determined as the target processing time for each target object.
[0175] Optionally, the object processing device 40 further includes a modification module, which is used for:
[0176] Receive a storage policy modification request sent by an object storage client device; the storage policy modification request includes an identifier of the policy to be modified, and at least one of the following: the modified storage duration and the modified processing policy of the policy to be modified;
[0177] Determine the object label corresponding to the policy to be modified based on the policy identifier;
[0178] Retrieve object processing tags from the metadata storage device to obtain the object processing data for each object;
[0179] If the object processing label of the object processing data is the same as the object label corresponding to the policy to be modified, at least one of the first operation and the second operation is performed.
[0180] The first operation includes:
[0181] The storage duration before modification of the policy to be modified is determined based on the policy identifier;
[0182] The duration modification amount corresponding to the strategy to be modified is determined based on the storage duration before and after the modification.
[0183] Based on the duration of the modification, modify the object processing time of the object processing data in the metadata storage device;
[0184] The second step includes:
[0185] Based on the revised policy, the object processing policy for object processing data in the metadata storage device is modified.
[0186] The object processing device provided in this embodiment can execute any object processing method as provided in Embodiment 1. The specific implementation method and principle are similar, and will not be described again here.
[0187] Example 4
[0188] Figure 5 is a schematic diagram of the object processing device in the object storage provided in Embodiment 4 of this application. As shown in Figure 5, the object processing device in the object storage provided in this embodiment is applied to an object processing device, which is located in a preset network architecture. The preset network architecture also includes an object storage service terminal device, a data storage device, and a metadata storage device. The data storage device stores at least one target object, and the metadata storage device stores at least one object processing data, which includes at least one target object identifier. The object processing data is determined by the object storage service terminal device and stored in the metadata storage device. The object processing device 50 includes an acquisition module 51 and a processing module 52.
[0189] The acquisition module 51 is used to acquire the processing data of each object from the metadata storage device according to a preset time period.
[0190] The processing module 52 is used to process each target object stored in the data storage device according to the real-time time and the processing data of each object.
[0191] Optionally, the object processing data also includes object processing labels, object processing time, and object processing strategies; the processing module 52 is specifically used for:
[0192] For each object processing data, in response to the object processing time being earlier than the real-time time, the control data storage device adopts the object processing strategy to process the target object to which each target object belongs.
[0193] Optionally, the object handling strategy includes deletion; the handling module 52 is further specifically used for:
[0194] The object processing strategy and the identifiers of each target object are sent to the data storage device so that the data storage device can delete the target objects to which each target object identifier belongs.
[0195] The object processing device provided in this embodiment can execute any object processing method as provided in Embodiment 2. The specific implementation method and principle are similar, and will not be described again here.
[0196] Example 5
[0197] Figure 6 is a schematic diagram of the structure of the object storage service terminal device provided in Embodiment 5 of this application. As shown in Figure 6, the object storage service terminal device provided in this embodiment is located in a preset network architecture, which also includes a data storage device, a metadata storage device, and an object processing device; the object storage service terminal device 60 includes: a processor 62, and a memory 62 communicatively connected to the processor 62.
[0198] Memory 61 stores computer-executed instructions.
[0199] The processor 62 executes the computer execution instructions stored in the memory 61 to implement any of the object processing methods provided in Embodiment 1. The specific implementation method and principle are similar and will not be described in detail here.
[0200] Optionally, the object storage service client device also includes a transceiver that is communicatively connected to the memory and processor for sending and receiving data.
[0201] Example 6
[0202] Figure 7 is a schematic diagram of the structure of the object processing device provided in Embodiment 6 of this application. As shown in Figure 7, the object processing device 70 provided in this embodiment is located in a preset network architecture, which also includes an object storage service terminal device, a data storage device, and a metadata storage device; the object processing device 70 includes: a processor 72, and a memory 71 communicatively connected to the processor 72.
[0203] Memory 71 stores computer-executed instructions.
[0204] The processor 72 executes the computer execution instructions stored in the memory 71 to implement any of the object processing methods provided in Embodiment 2. The specific implementation method and principle are similar and will not be described in detail here.
[0205] Optionally, the object processing device also includes a transceiver that is communicatively connected to the memory and the processor for sending and receiving data.
[0206] In Embodiments 5 and 6, the memory and processor can communicate via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, Figures 6 and 7 use only a single thick line, but this does not imply that there is only one bus or one type of bus.
[0207] In the above embodiments, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, etc.
[0208] In the above embodiments, the object storage service terminal device and the object processing device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above object processing method.
[0209] Embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions. When executed by a processor, these instructions are used to implement the object processing method provided in any of the above embodiments. The specific implementation and principle are similar and will not be repeated here. Exemplarily, the computer-readable storage medium can be a read-only memory, random access memory, magnetic tape, floppy disk, or optical data storage device, etc.
[0210] The embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the object processing method provided in any of the above embodiments. The specific implementation method and principle are similar and will not be described again here.
[0211] 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.
[0212] 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.
[0213] 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 module division 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.
[0214] Furthermore, unless otherwise specified, the functional modules in the various embodiments of this application can be integrated into one module, or each module can exist physically separately, or two or more modules can be integrated together. The integrated modules described above can be implemented in hardware or as software program modules.
[0215] When integrated 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.
[0216] If the integrated 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.
[0217] 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 these combinations of technical features do not contradict each other, they should be considered within the scope of this specification.
[0218] 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 appended claims.
[0219] 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 method for object processing in object storage, characterized in that, An object storage service client device is applied to an object storage service device located in a preset network architecture, which further includes a data storage device, a metadata storage device, and an object processing device. The method includes: receiving an object storage request sent by an object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag; obtaining a mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategy includes a preset storage duration and a preset processing strategy; determining the target storage strategy corresponding to each target object tag from the mapping relationship between the multiple preset object tags and preset storage strategies; determining the preset processing strategy included in the target storage strategy corresponding to each target object tag as the target processing strategy corresponding to each target object; and determining the target processing strategy corresponding to each target object based on the real-time time and the target processing strategy corresponding to each target object tag. The storage strategy includes a preset storage duration and calculation of the target processing time for each target object; the target processing time refers to the time when the storage duration of the target object is exhausted; target objects with the same target object tag, corresponding target processing time, and corresponding target processing strategy are grouped into the same target object group to obtain at least one target object group; based on the target objects included in each target object group, the object processing data corresponding to each target object group is determined; for each object processing data, in response to the fact that the target objects to which each target object identifier belongs are all stored in the data storage device, the object processing data is stored in the metadata storage device, so that the object processing device retrieves each object processing data from the metadata storage device according to a preset time period, and processes each target object stored in the data storage device according to the real-time time and each object processing data.
2. The method according to claim 1, characterized in that, The object processing data also includes object processing tags, object processing time, and object processing strategies; the step of determining the object processing data corresponding to each target object group based on the target objects included in each target object group includes: for each target object group, determining the target object tag of each target object as the corresponding object processing tag, determining the target processing time of each target object as the corresponding object processing time, determining the target processing strategy of each target object as the corresponding object processing strategy, and determining the target object identifier of each target object as the corresponding target object identifier.
3. The method according to claim 1 or 2, characterized in that, The step of calculating the target processing time for each target object based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag includes: determining the preset storage duration included in the target storage strategy corresponding to each target object tag as the target storage duration for each target object; and determining the time after the real-time time has passed through each of the target storage durations as the target processing time for each target object.
4. The method according to claim 1 or 2, characterized in that, After storing the object processing data in the metadata storage device, the method further includes: receiving a storage policy modification request sent by an object storage client device; the storage policy modification request includes a policy identifier to be modified, and at least one of the following: the modified storage duration and the modified processing policy of the policy to be modified; determining the object tag corresponding to the policy to be modified based on the policy identifier to be modified; obtaining the object processing tag of each object processing data from the metadata storage device; in response to the object processing tag of the object processing data being the same as the object tag corresponding to the policy to be modified, performing at least one of the first operation and the second operation; the first operation includes: determining the original storage duration of the policy to be modified based on the policy identifier to be modified; determining the duration modification amount corresponding to the policy to be modified based on the original storage duration and the modified storage duration; modifying the object processing time of the object processing data in the metadata storage device based on the duration modification amount; the second operation includes: modifying the object processing policy of the object processing data in the metadata storage device based on the modified policy.
5. A method for object processing in object storage, characterized in that, The method is applied to an object processing device, which is located in a preset network architecture. The preset network architecture also includes an object storage service terminal device, a data storage device, and a metadata storage device. The data storage device stores at least one target object, and the metadata storage device stores at least one object processing data, which includes at least one target object identifier. The object processing data is determined by the object storage service client device and stored in the metadata storage device; the method includes: retrieving each object processing data from the metadata storage device according to a preset time period; processing each target object stored in the data storage device according to the real-time time and each object processing data; wherein, the object storage service client device is used to receive object storage requests sent by the object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag; obtaining the mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategy includes a preset storage duration and a preset processing strategy; and retrieving the mapping relationship between the multiple preset object tags and the preset storage strategy. In the mapping relationship of storage strategies, the target storage strategy corresponding to each target object tag is determined; the preset processing strategy included in the target storage strategy corresponding to each target object tag is determined as the target processing strategy corresponding to each target object; the target processing time corresponding to each target object is calculated based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag; the target processing time refers to the time when the storage duration of the target object is exhausted; target objects with the same target object tag, the same target processing time, and the same target processing strategy are divided into the same target object group to obtain at least one target object group; the object processing data corresponding to each target object group is determined based on each target object included in each target object group.
6. The method according to claim 5, characterized in that, The object processing data also includes object processing tags, object processing time, and object processing strategy; the step of processing each target object stored in the data storage device according to the real-time time and each object processing data includes: for each object processing data, in response to the object processing time being earlier than the real-time time, controlling the data storage device to use the object processing strategy to process the target object to which each target object identifier belongs.
7. The method according to claim 6, characterized in that, The object processing strategy includes deletion; controlling the data storage device to process the target objects to which each target object identifier belongs using the object processing strategy includes: sending the object processing strategy and each target object identifier to the data storage device so that the data storage device deletes the target objects to which each target object identifier belongs.
8. An object processing apparatus in an object storage, characterized in that, An object storage service client device is applied to an object storage service device located in a preset network architecture, which further includes a data storage device, a metadata storage device, and an object processing device. The device includes: a receiving module for receiving an object storage request sent by an object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag; and a first determining module for obtaining a mapping relationship between multiple preset object tags and preset storage strategies; the preset storage strategy includes a preset storage duration and a preset processing strategy; determining the target storage strategy corresponding to each target object tag from the mapping relationship between the multiple preset object tags and preset storage strategies; determining the preset processing strategy included in the target storage strategy corresponding to each target object tag as the target processing strategy corresponding to each target object; and determining the target processing strategy based on the real-time time and the target storage strategy corresponding to each target object tag. The system includes a preset storage duration, which is used to calculate the target processing time and target processing strategy for each target object; the target processing time refers to the time when the storage duration of the target object is exhausted; a second determining module is used to group target objects with the same target object tag, the same target processing time, and the same target processing strategy into the same target object group to obtain at least one target object group; based on the target objects included in each target object group, the system determines the object processing data corresponding to each target object group; a storage module is used to store the object processing data in a metadata storage device in response to the fact that the target objects to which each target object identifier belongs are stored in the data storage device, so that the object processing device can obtain the object processing data from the metadata storage device according to a preset time period, and process each target object stored in the data storage device according to the real-time time and the object processing data.
9. An object processing apparatus in an object storage, characterized in that, The method is applied to an object processing device, which is located in a preset network architecture. The preset network architecture also includes an object storage service terminal device, a data storage device, and a metadata storage device. The data storage device stores at least one target object, and the metadata storage device stores at least one object processing data, which includes at least one target object identifier. The object processing data is determined by the object storage service terminal device and stored in the metadata storage device; the device includes: an acquisition module, used to acquire each object processing data from the metadata storage device according to a preset time period; a processing module, used to process each target object stored in the data storage device according to the real-time time and each object processing data; wherein, the object storage service terminal device is used to receive object storage requests sent by the object storage client device; the object storage request includes at least one target object; the target object includes a target object identifier and a target object tag; acquire multiple preset object tags and preset storage strategies; the preset storage strategy includes a preset storage duration and a preset processing strategy; acquire the mapping relationship between the multiple preset object tags and preset storage strategies; and acquire the mapping relationship between the preset object tags and preset storage strategies. In the mapping relationship between image tags and preset storage strategies, the target storage strategy corresponding to each target object tag is determined; the preset processing strategy included in the target storage strategy corresponding to each target object tag is determined as the target processing strategy corresponding to each target object; the target processing time corresponding to each target object is calculated based on the real-time time and the preset storage duration included in the target storage strategy corresponding to each target object tag; the target processing time refers to the time when the storage duration of the target object is exhausted; target objects with the same target object tag, the same corresponding target processing time, and the same corresponding target processing strategy are divided into the same target object group to obtain at least one target object group; the object processing data corresponding to each target object group is determined based on the target objects included in each target object group.
10. An object storage service client device, characterized in that, The object storage service terminal device is located in a preset network architecture, which further includes a data storage device, a metadata storage device, and an object processing device; the object storage service terminal device includes: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of claims 1 to 4.
11. An object processing device, characterized in that, The object processing device is located in a preset network architecture, which also includes an object storage service terminal device, a data storage device, and a metadata storage device. The object processing device includes: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of claims 5 to 7.
12. 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 7.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, is used to implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device based on distributed storage system, equipment and medium
CN112835967A