A method, device and equipment for aggregating multiple versions of small objects

By marking and aggregating multi-version small objects in a distributed object storage system, the problem of too many small objects in the storage system is solved, and more efficient storage speed and compatibility are achieved.

CN113821166BActive Publication Date: 2024-09-20JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110962671.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-20
Publication Date
2024-09-20
Estimated Expiration
2041-08-20

AI Technical Summary

Technical Problem

When the existing distributed object storage system implements the aggregation function of small objects, it is not compatible with the multi-version function. As a result, the number of small objects in the storage system after aggregation is still large and the storage speed is slow. How to implement multi-version small objects in a distributed object storage system? The aggregation of objects to reduce the amount of storage and increase storage speed is an urgent problem that needs to be solved.

Method used

By obtaining multi-version small objects to be aggregated, marking and recording them in a storage pool, they are aggregated and stored when they reach a preset number or size, and their respective aggregate attribute information is recorded in large objects to reduce the number of small objects and improve storage. speed.

Benefits of technology

It effectively reduces the number of small objects stored in the distributed object storage system, improves the reconstruction speed and compatibility, and thus improves the storage speed of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821166B
    Figure CN113821166B
Patent Text Reader

Abstract

The present application discloses a method, device and equipment for aggregating multi-version small objects, the method comprising: first obtaining at least one target multi-version small object to be aggregated, then marking at least one target multi-version small object, and recording the mark in a storage pool, then, when the number of acquired target multi-version small objects reaches a preset number, aggregating the target multi-version small objects according to the mark, and storing the obtained large object; or, when the large object obtained by aggregating the target multi-version small objects according to the mark reaches a preset value, stopping the aggregation, and storing the obtained large object. This can reduce the number of small objects stored in a distributed object storage system, improve the reconstruction speed and compatibility, and thus improve the storage speed of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and equipment for aggregating multiple versions of small objects. Background Art

[0002] Distributed object storage system refers to a distributed storage system for unstructured data. At present, more and more business scenarios require the use of distributed object storage systems.

[0003] In the current distributed object storage system, the function of small object aggregation has been implemented for ordinary massive small objects, that is, multiple small objects are aggregated into a large object, which reduces the number of Rados objects, thereby speeding up the reconstruction of the cluster and improving the performance of the system. However, each small object often corresponds to multiple versions, that is, there is a multi-version function to implement multiple versions of objects. In this way, users can record different versions of each object in the bucket so that they can download objects of a specified version when downloading. However, the current small object aggregation function is not compatible with the multi-version function, which will result in a large number of small objects in the storage system after aggregation, resulting in a slow storage speed of the system. Therefore, how to implement the aggregation of multi-version small objects in a distributed object storage system to reduce the storage number of small objects and improve the system storage speed is currently a problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to provide a method, device and equipment for aggregating multi-version small objects, which can reduce the storage quantity of small objects in a distributed object storage system, improve the reconstruction speed and compatibility, and thus improve the storage speed of the system.

[0005] In a first aspect, an embodiment of the present application provides a method for aggregating multi-version small objects, including:

[0006] Obtain at least one target multi-version small object to be aggregated;

[0007] Marking the at least one target multi-version small object, and recording the mark in the storage pool;

[0008] When the number of the target multi-version small objects obtained reaches a preset number, the target multi-version small objects are aggregated according to the mark, and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, aggregation is stopped and the obtained large objects are stored.

[0009] Optionally, each version of the target multi-version small object corresponds to a tag.

[0010] Optionally, the preset number is 400; the preset value is 4 megabytes.

[0011] Optionally, the method further includes:

[0012] The corresponding aggregation attribute information is recorded on each small object in the large object.

[0013] In a second aspect, an embodiment of the present application further provides a device for aggregating multi-version small objects, including:

[0014] An acquisition unit, used to acquire at least one target multi-version small object to be aggregated;

[0015] A marking unit, configured to mark the at least one target multi-version small object and record the mark in a storage pool;

[0016] An aggregation unit is used to aggregate the target multi-version small objects according to the mark and store the obtained large objects when the number of the target multi-version small objects obtained reaches a preset number; or to stop aggregating and store the obtained large objects when the number of large objects obtained by aggregating the target multi-version small objects according to the mark reaches a preset value.

[0017] Optionally, each version of the target multi-version small object corresponds to a tag.

[0018] Optionally, the preset number is 400; the preset value is 4 megabytes.

[0019] Optionally, the device further comprises:

[0020] The recording unit is used to record the corresponding aggregation attribute information on each small object in the large object.

[0021] The embodiment of the present application also provides a device for aggregating multi-version small objects, including: a processor, a memory, and a system bus;

[0022] The processor and the memory are connected via the system bus;

[0023] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementations of the method for aggregating multi-version small objects.

[0024] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes any one of the implementations of the above-mentioned method for aggregating multi-version small objects.

[0025] The embodiment of the present application provides a method, device and equipment for aggregating multi-version small objects. First, at least one target multi-version small object to be aggregated is obtained. Then, at least one target multi-version small object is marked and the mark is recorded in a storage pool. Then, when the number of acquired target multi-version small objects reaches a preset number, the target multi-version small objects are aggregated according to the mark and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, the aggregation is stopped and the obtained large objects are stored. This can reduce the number of small objects stored in the distributed object storage system, improve the reconstruction speed and compatibility, and thus improve the storage speed of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 A flowchart of a method for aggregating multiple versions of small objects provided in an embodiment of the present application;

[0028] Figure 2 An overall flow chart of a method for aggregating multi-version small objects in a distributed object storage system provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of the composition of a device for aggregating multi-version small objects provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the current distributed object storage system, the function of small object aggregation has been implemented for ordinary massive small objects, that is, aggregating multiple small objects into a large object, reducing the number of Rados objects, thereby speeding up the reconstruction of the cluster and improving the performance of the system.

[0031] Specifically, in the distributed storage system, the current aggregation function needs to be performed on the basis of enabling grading. Aggregate objects less than or equal to 512KB into a large object, migrate data from the hot pool to the cold pool, flush the aggregated large object to the rados storage pool, and record the first-level bitmap and the second-level bitmap in the storage pool. The first-level bitmap records the information required to find the second-level bitmap, such as bucket id, stripe length, configuration rules, etc. The second-level bitmap records the offset, length, validity, etc. of each small object. Then delete the data in the small object, write the aggregation attributes to the small object meta-attribute information, which is used to index the actual storage location of the data and read the data.

[0032] However, each small object often corresponds to multiple versions, that is, there is a multi-version function to realize multiple versions of objects. Specifically, in a distributed storage system, after turning on multi-version, when a user uploads an object, the server will generate a random version number, and each upload corresponds to a version, so that an object can have multiple versions. Users can specify the version number when uploading, downloading, and deleting objects, and operate the corresponding version of the object. However, the current small object aggregation function is not compatible with the multi-version function, which will result in a large number of small objects in the storage system after aggregation, so that the storage speed of the system is slow. Therefore, how to realize the aggregation of multi-version small objects in a distributed object storage system to reduce the storage quantity of small objects and improve the system storage speed is a problem that needs to be solved urgently.

[0033] To solve the above defects, the embodiment of the present application provides a method for aggregating multi-version small objects, firstly obtaining at least one target multi-version small object to be aggregated, then marking at least one target multi-version small object and recording the mark in the storage pool, then, when the number of acquired target multi-version small objects reaches a preset number, the target multi-version small objects are aggregated according to the mark, and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, the aggregation is stopped and the obtained large objects are stored. This can reduce the number of small objects stored in the distributed object storage system, improve the reconstruction speed and compatibility, and thus improve the storage speed of the system.

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0035] First embodiment

[0036] See also Figure 1 , is a flow chart of a method for aggregating multi-version small objects provided in this embodiment, the method comprising the following steps:

[0037] S101: Acquire at least one target multi-version small object to be aggregated.

[0038] It should be noted that in the current distributed object storage system, the aggregation function for ordinary massive small objects is to aggregate multiple small objects into a large object, reduce the number of Rados objects, speed up the reconstruction of the cluster, and improve the performance of the system. However, since each small object often corresponds to multiple versions, that is, there is a multi-version function to implement multiple versions of objects. The current small object aggregation function is not compatible with the multi-version function, which may result in a large number of small objects in the storage system after aggregation, resulting in a slow storage speed of the system.

[0039] Therefore, in this embodiment, in order to reduce the number of small objects stored in the distributed object storage system to improve the reconstruction speed and compatibility, and then improve the storage speed of the system, first, at least one target multi-version small object to be aggregated is obtained to continue to execute the subsequent step S102.

[0040] Among them, the target multi-version small object refers to a small object less than or equal to the preset capacity under the same bucket. The value of the preset capacity can be set according to the actual situation, and the embodiment of the present application does not limit this. For example, the value can be 512K. On this basis, the aggregation of the target multi-version small object refers to aggregating small objects less than or equal to 512K under the same bucket into a large data object and storing it in the rados resource pool.

[0041] The multi-version function of small objects is achieved by enabling the multi-version function of the bucket. In this way, users can record the different versions of each object in the bucket and download the small objects of the specified version when downloading.

[0042] S102: Mark the at least one target multi-version small object, and record the mark in a storage pool.

[0043] In this embodiment, after obtaining at least one target multi-version small object to be aggregated through step S101, the obtained at least one target multi-version small object can be further marked and the mark can be recorded in a storage pool (such as an index storage pool) to execute subsequent step S103.

[0044] An optional implementation method is to record a tag for each version of the target multi-version small object.

[0045] S103: When the number of acquired target multi-version small objects reaches a preset number, the target multi-version small objects are aggregated according to the marks, and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the marks reach a preset value, the aggregation is stopped, and the obtained large objects are stored.

[0046] In this embodiment, at least one target multi-version small object to be aggregated is obtained through step S101, and at least one target multi-version small object obtained is marked through step S102, and the mark is recorded in the storage pool. Further, when the number of obtained target multi-version small objects reaches a preset number, the target multi-version small objects can be aggregated according to the mark and the identifier of the bucket to which they belong (such as an id value), and the obtained large object can be stored; or, when the large object obtained by aggregating the target multi-version small objects according to the mark reaches a preset value, aggregation can be stopped and the obtained large object can be stored.

[0047] Among them, an optional implementation method is that the preset number is 400; the preset value is 4 megabytes.

[0048] Furthermore, an optional implementation method is that when the aggregated large object is obtained, the corresponding aggregate attribute information can be recorded on each small object in the large object. The aggregate attribute information may include the position of the corresponding small object in the large object to which it belongs, the length of the small object, and the name of the large object. In this way, when the user downloads a specific version of an aggregated small object through the client, he can first query the corresponding small object according to the version number, and then query the aggregate attribute information recorded by the small object, and then query the actual storage location of the small object data in the large object to which it belongs according to the aggregate attribute information, and then obtain the object data and return it.

[0049] To facilitate understanding of the method for aggregating multi-version small objects provided by this application, Figure 2 The overall process of the method for aggregating multi-version small objects in a distributed object storage system provided in an embodiment of the present application is introduced:

[0050] like Figure 2As shown, the method for aggregating multi-version small objects in a distributed object storage system provided by an embodiment of the present application is specifically as follows: first, the object record (or mark) of the hot pool is obtained through a scanning thread, and is saved in memory (such as in a map), and it is determined whether the water level (i.e., a preset threshold, such as occupying 30% of the total storage volume, etc.) is reached. If so, the scanned record (or mark) is sent to the aggregation cache thread to aggregate multi-version small objects. Then, the aggregation cache thread traverses the scanned object record (or mark) to determine whether it is a multi-version small object. If so, the object oid of the corresponding version is obtained. If not, each small object data is obtained asynchronously, and cached through the cache module, and then a first-level bitmap is created and written into the storage pool. Next, determine whether the scanned small objects reach the set value (such as 400). If so, add the obtained large object to the queue for storage, and notify the flushing thread to flush it to the rados storage pool. If not, during the aggregation process, determine whether the size of the large object obtained after aggregation reaches the set value (such as 4 megabytes), and if it does not reach the set value, add the small object data information to the cache record, and if it reaches the set value, add the obtained large object to the queue for storage, and notify the flushing thread to flush it to the rados storage pool. Finally, write the secondary bitmap location information to the storage pool, record the small object related information, and then write the large object data to the storage pool, record the small object metadata attributes, and record the multi-version information on the corresponding version of the small object.

[0051] In summary, the present embodiment provides a method for aggregating multi-version small objects, firstly obtaining at least one target multi-version small object to be aggregated, then marking at least one target multi-version small object and recording the mark in a storage pool, then, when the number of acquired target multi-version small objects reaches a preset number, the target multi-version small objects are aggregated according to the mark, and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, the aggregation is stopped and the obtained large objects are stored. This can reduce the number of small objects stored in the distributed object storage system, improve the reconstruction speed and compatibility, and thus improve the storage speed of the system.

[0052] Second embodiment

[0053] This embodiment will introduce a device for aggregating multiple versions of small objects. For related content, please refer to the above method embodiment.

[0054] See also Figure 3 , is a schematic diagram of the composition of a device for aggregating multi-version small objects provided in this embodiment, the device comprising:

[0055] An acquisition unit 301 is used to acquire at least one target multi-version small object to be aggregated;

[0056] A marking unit 302, configured to mark the at least one target multi-version small object and record the mark in a storage pool;

[0057] The aggregation unit 303 is used to aggregate the target multi-version small objects according to the mark and store the obtained large objects when the number of the target multi-version small objects obtained reaches a preset number; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, stop aggregating and store the obtained large objects.

[0058] In an implementation of this embodiment, each version of the target multi-version small object corresponds to a tag.

[0059] In one implementation of this embodiment, the preset number is 400; the preset value is 4 megabytes.

[0060] In an implementation of this embodiment, the device further includes:

[0061] The recording unit is used to record the corresponding aggregation attribute information on each small object in the large object.

[0062] In summary, the present embodiment provides a device for aggregating multi-version small objects, which first obtains at least one target multi-version small object to be aggregated, then marks at least one target multi-version small object and records the mark in a storage pool, and then, when the number of acquired target multi-version small objects reaches a preset number, aggregates the target multi-version small objects according to the mark and stores the obtained large object; or, when the large object obtained by aggregating the target multi-version small objects according to the mark reaches a preset value, stops aggregating and stores the obtained large object. This can reduce the number of small objects stored in a distributed object storage system, improve reconstruction speed and compatibility, and thus improve the storage speed of the system.

[0063] Furthermore, an embodiment of the present application also provides a device for aggregating multi-version small objects, including: a processor, a memory, and a system bus;

[0064] The processor and the memory are connected via the system bus;

[0065] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the method for aggregating multi-version small objects.

[0066] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes any one of the implementation methods of the above-mentioned method of aggregating multi-version small objects.

[0067] It can be known from the description of the above implementation mode that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0068] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0069] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0070] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for aggregating multi-version small objects, characterized in that: include: Enable the multi-version feature for small objects by enabling the multi-version feature for buckets. Obtain at least one target multi-version small object to be aggregated; Marking the at least one target multi-version small object, and recording the mark in a storage pool; wherein each version of the target multi-version small object corresponds to a mark; When the number of the target multi-version small objects obtained reaches a preset number, the target multi-version small objects are aggregated according to the mark, and the obtained large objects are stored; or, when the large objects obtained by aggregating the target multi-version small objects according to the mark reach a preset value, the aggregation is stopped, and the obtained large objects are stored; wherein the preset number is 400; the preset value is 4 megabytes; Wherein, the method further comprises: Recording corresponding aggregate attribute information on each small object in the large object; wherein the aggregate attribute information includes the position of the corresponding small object in the large object to which it belongs, the length of the small object, and the name of the large object; When downloading a specific version of an aggregated small object through the client, the corresponding small object is queried based on the version number, the aggregate attribute information recorded in the small object is queried, and the actual storage location of the small object data in the large object to which it belongs is queried based on the aggregate attribute information, and the object data is obtained and returned.

2. A device for aggregating multiple versions of small objects, characterized in that: include: A unit for enabling the multi-versioning feature of small objects by enabling the multi-versioning feature of buckets; An acquisition unit, used to acquire at least one target multi-version small object to be aggregated; A marking unit, used to mark the at least one target multi-version small object and record the mark in a storage pool; wherein each version of the target multi-version small object corresponds to a mark; an aggregation unit, configured to aggregate the target multi-version small objects according to the tag and store the obtained large objects when the number of the obtained target multi-version small objects reaches a preset number; or to stop aggregating and store the obtained large objects when the number of large objects obtained by aggregating the target multi-version small objects according to the tag reaches a preset value; wherein the preset number is 400; and the preset value is 4 megabytes; Wherein, the device further comprises: A recording unit, configured to record corresponding aggregate attribute information on each small object in the large object; wherein the aggregate attribute information includes the position of the corresponding small object in the large object to which it belongs, the length of the small object, and the name of the large object; A unit used to query the corresponding small object according to the version number when downloading a specific version of an aggregated small object through the client, query the aggregate attribute information recorded in the small object, query the actual storage location of the small object data in the large object to which it belongs according to the aggregate attribute information, obtain the object data and return it.

3. A device for aggregating multiple versions of small objects, characterized in that: include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor is caused to perform the method of claim 1.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to claim 1.