Object storage method, apparatus, device, readable storage medium and program product

By deploying multiple gateways on the server, the problems of complex and costly iSCSI gateway management are solved, achieving efficient object storage, reducing server investment costs and improving storage efficiency.

CN119496788BActive Publication Date: 2026-02-10CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411651702.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2026-02-10
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In existing technologies, the deployment and management of iSCSI gateways face challenges such as large data transmission volumes and complex network configurations. Furthermore, only one gateway can be deployed on a single server, resulting in high server investment costs and low storage efficiency.

Method used

Multiple gateways are deployed on the same server. By receiving object storage requests, a target gateway is selected, and data storage is performed based on the target gateway, including gateway creation, mirroring, format conversion, and the use of storage devices.

Benefits of technology

By deploying multiple gateways on the same server, server costs are reduced and object storage efficiency is improved, especially when object storage demand is high, enabling more efficient response to the storage needs of different request senders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496788B_ABST
    Figure CN119496788B_ABST
Patent Text Reader

Abstract

The application relates to an object storage method, device and equipment, a readable storage medium and a program product. The method comprises the following steps: receiving an object storage request; wherein the object storage request carries to-be-stored data; selecting a target gateway from at least two candidate gateways which have been deployed according to the object storage request; and performing object storage on the to-be-stored data based on the target gateway; wherein the at least two candidate gateways are constructed in the following manner: receiving at least one gateway creation request sent by at least one request sender; deploying a gateway for any request sender according to the request content in the gateway creation request corresponding to the request sender; and taking the gateways corresponding to the respective request senders as the candidate gateways. The method can improve data storage efficiency, and deploying multiple gateways on the same server can reduce the server investment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of storage, in particular to an object storage method and device, equipment, readable storage medium and program product. BACKGROUND

[0002] With the continuous progress of cloud computing, big data and Internet of Things technology, the importance of data storage and management is increasingly prominent. Protocols for block-level data transmission between networks, such as Internet Small Computer Systems Interface (ISCSI), have been widely used in data centers, cloud storage and other fields due to their efficiency.

[0003] However, at present, a server can only deploy one ISCSI gateway, so the deployment and management of ISCSI gateway face many challenges, especially the problems of large data transmission volume and complex network configuration, which need to be solved urgently. SUMMARY

[0004] Therefore, it is necessary to provide an object storage method, device, equipment, readable storage medium and program product to improve data storage efficiency, and deploy multiple gateways on the same server to reduce server investment.

[0005] In a first aspect, the present application provides an object storage method, comprising:

[0006] receiving an object storage request; wherein the object storage request carries to-be-stored data;

[0007] According to the object storage request, a target gateway is selected from at least two candidate gateways deployed;

[0008] Based on the target gateway, the to-be-stored data is stored as an object;

[0009] Wherein, the construction method of the at least two candidate gateways is:

[0010] receiving at least one gateway creation request sent by at least one request sender;

[0011] For any request sender, according to the request content in the gateway creation request corresponding to the request sender, a gateway is deployed for the request sender;

[0012] The gateway corresponding to each request sender is respectively taken as a candidate gateway.

[0013] In one embodiment, according to the request content in the gateway creation request corresponding to the request sender, a gateway is deployed for the request sender, comprising:

[0014] create a container of a preset type in response to a gateway creation request sent by the request sender; wherein the container is configured with a gateway service;

[0015] start the container and use the container as the gateway corresponding to the request sender.

[0016] In one of the embodiments, before starting the container and using the container as the gateway corresponding to the request sender, the method further comprises: performing image processing on the container to obtain a container image, and storing the container image.

[0017] In one of the embodiments, the target gateway is selected from the at least two candidate gateways deployed according to the object storage request, comprising:

[0018] determining a request sender of the object storage request;

[0019] selecting a target gateway matching the request sender from the at least two candidate gateways deployed according to the request sender of the object storage request.

[0020] In one of the embodiments, the object storage is performed on the data to be stored based on the target gateway, comprising:

[0021] format conversion is performed on the data to be stored based on the target gateway;

[0022] the data to be stored after the format conversion is stored in a corresponding storage device.

[0023] In one of the embodiments, the format conversion is performed on the data to be stored based on the target gateway, comprising:

[0024] the data to be stored in a block storage format is converted into target storage data in a file storage format based on the target gateway;

[0025] wherein the storage device cannot be used to store data in a block storage format; and the storage device is used to store data in a file storage format;

[0026] correspondingly, the object storage is performed on the data to be stored, comprising:

[0027] the target storage data is subjected to the object storage.

[0028] In a second aspect, the application further provides an object storage device, comprising:

[0029] a request receiving module configured to receive an object storage request; wherein the object storage request carries data to be stored;

[0030] a gateway selecting module configured to select a target gateway from at least two candidate gateways deployed according to the object storage request;

[0031] An object storage module is configured to store the to-be-stored data based on the target gateway.

[0032] The at least two candidate gateways are constructed in the following manner:

[0033] The at least one gateway creation request is received from at least one request sender.

[0034] For any request sender, a gateway is deployed for the request sender according to the request content in the gateway creation request corresponding to the request sender.

[0035] The gateway corresponding to each request sender is taken as a candidate gateway.

[0036] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0037] An object storage request is received, wherein the object storage request carries to-be-stored data.

[0038] A target gateway is selected from the at least two deployed candidate gateways according to the object storage request.

[0039] The to-be-stored data is stored based on the target gateway.

[0040] The at least two candidate gateways are constructed in the following manner:

[0041] The at least one gateway creation request is received from at least one request sender.

[0042] For any request sender, a gateway is deployed for the request sender according to the request content in the gateway creation request corresponding to the request sender.

[0043] The gateway corresponding to each request sender is taken as a candidate gateway.

[0044] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0045] An object storage request is received, wherein the object storage request carries to-be-stored data.

[0046] A target gateway is selected from the at least two deployed candidate gateways according to the object storage request.

[0047] The to-be-stored data is stored based on the target gateway.

[0048] The at least two candidate gateways are constructed in the following manner:

[0049] receiving at least one gateway creation request sent by at least one request sender;

[0050] deploying a gateway for any request sender according to the request content in the gateway creation request corresponding to the request sender;

[0051] respectively taking the gateways corresponding to the request senders as candidate gateways.

[0052] In a fifth aspect, the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the following steps:

[0053] receiving an object storage request; wherein the object storage request carries to-be-stored data;

[0054] selecting a target gateway from the deployed at least two candidate gateways according to the object storage request;

[0055] performing object storage on the to-be-stored data based on the target gateway;

[0056] wherein the at least two candidate gateways are constructed in the following manner:

[0057] receiving at least one gateway creation request sent by at least one request sender;

[0058] deploying a gateway for any request sender according to the request content in the gateway creation request corresponding to the request sender;

[0059] respectively taking the gateways corresponding to the request senders as candidate gateways.

[0060] The above object storage method, device, equipment, readable storage medium and program product deploy at least two candidate gateways in the same server, select a target gateway from the deployed at least two candidate gateways after receiving an object storage request, and perform object storage on to-be-stored data based on the target gateway. Compared with the prior art in which only one gateway can be deployed in one server, the server cost can be saved. Further, each candidate gateway has a corresponding relationship with a corresponding request sender, and in the case of large object storage demand, the server can perform object storage response for different request senders based on the deployed multiple gateways, thereby improving the object storage efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can be obtained based on these drawings without any creative effort.

[0062] Figure 1 An application environment diagram of the object storage method in one embodiment;

[0063] Figure 2 A flowchart of the object storage method in one embodiment;

[0064] Figure 3 A flowchart of the gateway deployment step in one embodiment;

[0065] Figure 4 A flowchart of the target gateway selection step in one embodiment;

[0066] Figure 5 A flowchart of the object storage step in one embodiment;

[0067] Figure 6A A flowchart of the object storage method in another embodiment;

[0068] Figure 6B A flowchart of the gateway allocation and object storage step in one embodiment;

[0069] Figure 6C A format conversion diagram in one embodiment;

[0070] Figure 7 A structural block diagram of the object storage device in one embodiment;

[0071] Figure 8 An internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION

[0072] In order to make the purposes, technical solutions and advantages of the present application clearer, the following will further describe the present application with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0073] The object storage method provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment shown. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. Specifically, the server 104 receives the object storage request sent by the client 102; wherein the object storage request carries the data to be stored; the server 104 selects a target gateway from at least two candidate gateways deployed according to the object storage request; the server 104 stores the data to be stored based on the target gateway; wherein the construction method of the at least two candidate gateways is: receiving at least one gateway creation request sent by at least one request sender; for any request sender, according to the request content in the gateway creation request corresponding to the request sender, deploying a gateway for the request sender; the gateway corresponding to each request sender is respectively taken as a candidate gateway. Among them, the client 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, Internet of Things devices can be smart speakers, smart televisions, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0074] In an exemplary embodiment, as Figure 2 shown, an object storage method is provided, and the method is applied to Figure 1 the server 104 in the application environment as an example for illustration, including the following steps:

[0075] S210, receiving an object storage request.

[0076] Among them, the object storage request carries the data to be stored. Among them, the data to be stored is the data that needs to be stored.

[0077] Exemplarily, in the case where the user has an object storage requirement, the client can send an object storage request to the server, at which time the server can receive the object storage request sent by the user through the client.

[0078] S220, according to the object storage request, selecting a target gateway from at least two candidate gateways deployed.

[0079] The candidate gateway is a gateway deployed by the server. The target gateway is a gateway that matches the object storage request and can be used to respond to the object storage request among the candidate gateways.

[0080] In this embodiment, there is a corresponding relationship between different object storage requests and target gateways. For example, a corresponding relationship between a reference storage request and a reference gateway is constructed in advance, and the reference gateway corresponding to the object storage request in the corresponding relationship is taken as the target gateway.

[0081] In this embodiment, the object storage request and at least two candidate gateways can also be input into a pre-trained target gateway selection model to obtain the target gateway corresponding to the object storage request. The target gateway selection model can be constructed based on a common neural network, and details are not described herein. Further, when the target gateway selection model is trained, a sample storage object can be input into the target gateway selection model to obtain a gateway selection result corresponding to the sample storage object. Further, the model parameters of the target gateway selection model are adjusted according to the gateway selection result and the target gateway label corresponding to the corresponding sample storage object.

[0082] The at least two candidate gateways are constructed in the following manner: receiving at least one gateway creation request sent by at least one request sender; for any request sender, deploying a gateway for the request sender according to the request content in the gateway creation request corresponding to the request sender; and taking the gateway corresponding to each request sender as a candidate gateway.

[0083] The request sender is a user who has an object storage demand. The gateway creation request is used to request the server to deploy a gateway.

[0084] It can be understood that in the process of the user initially performing object storage, the client needs to send a gateway creation request to the server to perform object storage based on the gateway deployed by the server.

[0085] Optionally, different request contents correspond to different gateways. In this embodiment, the gateway creation request can be parsed to determine the request content in the gateway creation request, and the gateway created for the corresponding request sender is determined based on the type of the request content. Further, the gateway is deployed for the request sender based on a preset manner.

[0086] Further, the server stores the gateway corresponding to each request sender in association with the corresponding request sender, and takes the gateway corresponding to each request sender as a candidate gateway.

[0087] S230, performing object storage on the to-be-stored data based on the target gateway.

[0088] In the object storage method described above, at least two candidate gateways are deployed on the same server. Upon receiving an object storage request, a target gateway is selected from the two deployed candidate gateways, and the data to be stored is stored based on the target gateway. Compared to existing technologies where only one gateway can be deployed per server, this method saves server costs. Furthermore, each candidate gateway corresponds to a specific request sender. When object storage demand is high, the server can respond to different request senders based on multiple deployed gateways, improving object storage efficiency.

[0089] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the steps of deploying a gateway for the request sender according to the request content in the request to create a gateway corresponding to the request sender are refined.

[0090] See Figure 3 The gateway deployment steps shown include:

[0091] S310, in response to a gateway creation request sent by the request sender, creates a container of a preset type.

[0092] The container is configured with a gateway service. The default container type can be a Docker container.

[0093] For example, in this embodiment, a Docker container can be created in response to a gateway creation request sent by the request sender, and the Docker container can be named based on a preset filename. The preset filename can be "iscsigateway".

[0094] Optionally, to enable the container to function as a gateway, in this embodiment, the Docker container's loading script includes the following steps: installing the s3backer component (a preset version, such as version 2.0.2); installing the nbdkit component (a preset version, such as version 1.29.11), and correspondingly installing related nbd, nbd-server, nbd-client, and other components; installing the tgtd component (a preset version, such as version 1.0.79); and deploying the software's startup and configuration scripts. Since the container is configured with a gateway service, in this embodiment, the gateway is deployed within the container.

[0095] It should be noted that the server provided in this application is a server configured with a Docker environment, such as an Ubuntu 20.04 system, and Docker Engine has been installed.

[0096] S320, start the container and set the container as the gateway corresponding to the request sender.

[0097] It should be noted that since containers need to be imaged before they can be started, in this embodiment, the container needs to be imaged before starting the container to obtain a container image, and the container image needs to be stored.

[0098] For example, in step two: The created "iscsigateway" container is committed as a new image layer using `docker commit`, then exported as an image using `docker save`, and finally loaded onto the server using `docker load`. Next, a Docker container is started on the server, using the newly loaded "iscsigateway" image as the starting image.

[0099] It should be noted that in this embodiment, within the container, the s3backer component interacts with the object storage based on the configuration script and configuration file (the nbdkit component is loaded via calls to s3backer). Through REST API and logical address segmentation, the object storage is simulated as a block device, providing an nbdx block device presented on the device. A server-side implementation using tgtd is used to implement the iSCSI protocol, ultimately providing the service to the user. In other words, a gateway is deployed for the object sender in the above manner.

[0100] The above embodiments demonstrate how deploying gateways in containers enables a single server to deploy multiple gateways.

[0101] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the process of selecting a target gateway from at least two deployed candidate gateways according to an object storage request is refined.

[0102] See Figure 4 The target gateway selection steps shown include:

[0103] S410, determine the sender of the object storage request.

[0104] For example, in this embodiment, the object storage request may carry the identification information of the request sender.

[0105] S420: Based on the requester of the object storage request, select the target gateway that matches the requester from at least two deployed candidate gateways.

[0106] In this embodiment, since there is a correspondence between the at least two deployed candidate gateways and the request sender, the target gateway that matches the identifier information of the request sender can be selected from the at least two deployed candidate gateways based on the identifier information of the request sender.

[0107] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the process of performing object storage on the data to be stored based on the target gateway is refined.

[0108] See Figure 5 The object storage steps shown include:

[0109] The S510 performs format conversion on the data to be stored, based on the target gateway.

[0110] For example, since the storage device cannot be used to store data in block storage format; the storage device is used to store data in file storage format, in this embodiment, in order to complete the object storage task, the data to be stored in block storage format can be converted into target storage data in file storage format based on the target gateway. The target storage data is, in this case, data in file storage format.

[0111] For example, the s3backer component can be used to convert the format of the data to be stored. Alternatively, the data to be stored can be input into a format conversion model to obtain the converted data.

[0112] S520 stores the converted data to the corresponding storage device.

[0113] Specifically, in this embodiment, the target storage data is stored as an object.

[0114] In the above embodiments, in order to facilitate the storage device in storing the data to be stored, the data to be stored is converted in format before storage.

[0115] Based on the technical solutions of the above embodiments, this application also provides an optional embodiment. In this optional embodiment, the above object storage method is described in detail.

[0116] See Figure 6A The object storage methods shown include:

[0117] S610A, gateway deployment steps;

[0118] S620A, gateway allocation and object storage steps.

[0119] See Figure 6BThe gateway allocation and object storage steps shown above provide a detailed description of the S620A, including:

[0120] S610B receives object storage requests;

[0121] The object storage request contains the data to be stored.

[0122] It should be noted that in this embodiment, the user can install an iSCSI client, such as the iSCSI initiator under Linux, on the client side, and then connect to the iSCSI gateway created earlier via the network to directly read and write the disk and complete the data transmission and storage.

[0123] S620B, determine the sender of the object storage request;

[0124] S630B selects a target gateway that matches the request sender from at least two deployed candidate gateways, based on the request sender of the object storage request.

[0125] The S640B, based on the target gateway, converts data to be stored in block storage format into target storage data in file storage format.

[0126] For example, see Figure 6C The format conversion diagram illustrates that during object storage, the iSCSI component, NBDX, NBD server, and REST API can be used to convert the data to be stored from block storage format to file storage format. Similarly, during object reading, the REST API, NBD server, NBD_recv, NBDX, and iSCSI components can be used to convert the data to be read from file storage format to block storage format.

[0127] Among them, storage devices cannot be used to store data in block storage format; storage devices are used to store data in file storage format.

[0128] S650B performs object storage on target stored data.

[0129] It is understandable that although this application provides an object storage method, object reading can also be performed based on the gateway construction method provided in this application. The difference lies only in the data format conversion process. During object storage, the data to be stored in block storage format is converted into target storage data in file storage format. During object reading, the data to be read in file storage format is converted into data in block storage format. Therefore, this application will not elaborate further on the object reading process.

[0130] It should be understood that although the steps in the flowcharts of the embodiments described above 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 flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0131] Based on the same inventive concept, this application also provides an object storage device for implementing the object storage method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more object storage device embodiments provided below can be found in the limitations of the object storage method described above, and will not be repeated here.

[0132] In one exemplary embodiment, such as Figure 7 As shown, an object storage device is provided, including: a request receiving module 710, a gateway selection module 720, and an object storage module 730, wherein:

[0133] The request receiving module 710 is used to receive object storage requests; wherein the object storage request carries data to be stored.

[0134] The gateway selection module 720 is used to select a target gateway from at least two deployed candidate gateways based on the object storage request.

[0135] Object storage module 730 is used to perform object storage on data to be stored based on the target gateway;

[0136] Among them, at least two candidate gateways are constructed in the following ways:

[0137] Receive at least one gateway creation request from at least one request sender;

[0138] For any request sender, create the request content in the request based on the gateway corresponding to the request sender, and deploy the gateway for the request sender;

[0139] The gateway corresponding to each request sender is selected as a candidate gateway.

[0140] In one embodiment, the object storage device further includes a gateway deployment module, comprising a container creation unit for creating a container of a preset type in response to a gateway creation request sent by a request sender; wherein the container is configured with a gateway service; and a gateway deployment unit for starting the container and using the container as the gateway corresponding to the request sender.

[0141] In one embodiment, the gateway deployment module further includes an image unit for image processing of containers to obtain container images and storing the container images.

[0142] In one embodiment, the gateway selection module 720 includes a first determining unit for determining the request sender of the object storage request; and a gateway selection unit for selecting a target gateway that matches the request sender from at least two deployed candidate gateways, based on the request sender of the object storage request.

[0143] In one embodiment, the object storage module 730 includes a format conversion unit for converting the format of the data to be stored based on the target gateway; and a data storage unit for storing the converted data to be stored in the corresponding storage device.

[0144] In one embodiment, the format conversion unit is specifically used to convert data to be stored in block storage format into target storage data in file storage format based on the target gateway; wherein, the storage device cannot be used to store data in block storage format; the storage device is used to store data in file storage format; correspondingly, the data storage unit is specifically used to perform object storage on the target storage data.

[0145] Each module in the aforementioned object storage device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0146] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an object storage method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0147] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0148] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0149] Receive an object storage request; the object storage request carries the data to be stored.

[0150] Based on the object storage request, select the target gateway from at least two deployed candidate gateways;

[0151] Based on the target gateway, perform object storage on the data to be stored;

[0152] Among them, at least two candidate gateways are constructed in the following ways:

[0153] Receive at least one gateway creation request from at least one request sender;

[0154] For any request sender, create the request content in the request based on the gateway corresponding to the request sender, and deploy the gateway for the request sender;

[0155] The gateway corresponding to each request sender is selected as a candidate gateway.

[0156] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0157] In response to a gateway creation request sent by the requester, a container of a preset type is created; the container is configured with a gateway service.

[0158] Start the container and set it as the gateway for the request sender.

[0159] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0160] The container is imaged to obtain a container image, and then the container image is stored.

[0161] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0162] Determine the sender of the object storage request;

[0163] Based on the sender of the object storage request, select the target gateway that matches the sender from at least two deployed candidate gateways.

[0164] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0165] Based on the target gateway, perform format conversion on the data to be stored;

[0166] The converted data is then stored in the appropriate storage device.

[0167] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0168] Based on the target gateway, the data to be stored in block storage format is converted into target storage data in file storage format;

[0169] Among them, storage devices cannot be used to store data in block storage format; storage devices are used to store data in file storage format.

[0170] Perform object storage on the target data.

[0171] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0172] Receive an object storage request; the object storage request carries the data to be stored.

[0173] Based on the object storage request, select the target gateway from at least two deployed candidate gateways;

[0174] Based on the target gateway, perform object storage on the data to be stored;

[0175] Among them, at least two candidate gateways are constructed in the following ways:

[0176] Receive at least one gateway creation request from at least one request sender;

[0177] For any request sender, create the request content in the request based on the gateway corresponding to the request sender, and deploy the gateway for the request sender;

[0178] The gateway corresponding to each request sender is selected as a candidate gateway.

[0179] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0180] In response to a gateway creation request sent by the requester, a container of a preset type is created; the container is configured with a gateway service.

[0181] Start the container and set it as the gateway for the request sender.

[0182] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0183] The container is imaged to obtain a container image, and then the container image is stored.

[0184] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0185] Determine the sender of the object storage request;

[0186] Based on the sender of the object storage request, select the target gateway that matches the sender from at least two deployed candidate gateways.

[0187] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0188] Based on the target gateway, perform format conversion on the data to be stored;

[0189] The converted data is then stored in the appropriate storage device.

[0190] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0191] Based on the target gateway, the data to be stored in block storage format is converted into target storage data in file storage format;

[0192] Among them, storage devices cannot be used to store data in block storage format; storage devices are used to store data in file storage format.

[0193] Perform object storage on the target data.

[0194] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0195] Receive an object storage request; the object storage request carries the data to be stored.

[0196] Based on the object storage request, select the target gateway from at least two deployed candidate gateways;

[0197] Based on the target gateway, perform object storage on the data to be stored;

[0198] Among them, at least two candidate gateways are constructed in the following ways:

[0199] Receive at least one gateway creation request from at least one request sender;

[0200] For any request sender, create the request content in the request based on the gateway corresponding to the request sender, and deploy the gateway for the request sender;

[0201] The gateway corresponding to each request sender is selected as a candidate gateway.

[0202] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0203] In response to a gateway creation request sent by the requester, a container of a preset type is created; the container is configured with a gateway service.

[0204] Start the container and set it as the gateway for the request sender.

[0205] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0206] The container is imaged to obtain a container image, and then the container image is stored.

[0207] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0208] Determine the sender of the object storage request;

[0209] Based on the sender of the object storage request, select the target gateway that matches the sender from at least two deployed candidate gateways.

[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0211] Based on the target gateway, perform format conversion on the data to be stored;

[0212] The converted data is then stored in the appropriate storage device.

[0213] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0214] Based on the target gateway, the data to be stored in block storage format is converted into target storage data in file storage format;

[0215] Among them, storage devices cannot be used to store data in block storage format; storage devices are used to store data in file storage format.

[0216] Perform object storage on the target data.

[0217] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0218] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0219] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An object storage method, characterized in that, Applied to a server, the method includes: Receive an object storage request; wherein the object storage request carries data to be stored; Determine the sender of the object storage request; based on the sender of the object storage request, select a target gateway that matches the sender from at least two deployed candidate gateways; Based on the target gateway, the data to be stored is stored as an object; The at least two candidate gateways are constructed in the following manner: Receive at least one gateway creation request from at least one request sender; For any request sender, in response to the gateway creation request sent by the request sender, a container of a preset type is created; wherein, the container is configured with a gateway service; the container is started and used as the gateway corresponding to the request sender; The gateways corresponding to each of the request senders are selected as candidate gateways.

2. The method according to claim 1, characterized in that, Before starting the container and setting it as the gateway corresponding to the request sender, the method further includes: The container is mirrored to obtain a container image, and the container image is stored.

3. The method according to claim 1, characterized in that, The step of performing object storage on the data to be stored based on the target gateway includes: Based on the target gateway, the data to be stored is converted into a different format; The converted data is then stored in the appropriate storage device.

4. The method according to claim 3, characterized in that, The step of converting the format of the data to be stored based on the target gateway includes: Based on the target gateway, the data to be stored in block storage format is converted into target storage data in file storage format; The storage device cannot be used to store data in the block storage format; the storage device is used to store data in the file storage format. Accordingly, the object storage of the data to be stored includes: The target storage data is stored as an object.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: an object reading process: converting the data to be read into a format, converting the data to be read from a file storage format into data in a block storage format.

6. An object storage device, characterized in that, The device includes: A request receiving module is used to receive object storage requests; wherein the object storage request carries data to be stored. The gateway selection module is used to determine the sender of the object storage request; Based on the requester of the object storage request, select a target gateway that matches the requester from at least two deployed candidate gateways; An object storage module is used to perform object storage on the data to be stored based on the target gateway; The at least two candidate gateways are constructed in the following manner: Receive at least one gateway creation request from at least one request sender; For any request sender, in response to the gateway creation request sent by the request sender, a container of a preset type is created; wherein, the container is configured with a gateway service; Start the container and use it as the gateway corresponding to the request sender; The gateways corresponding to each of the request senders are selected as candidate gateways.

7. The apparatus according to claim 6, characterized in that, The device includes: The image unit is used to image a container to obtain a container image and store the container image.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • NFS gateway, distributed file storage method and device, equipment and storage medium

    CN116760847A