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

By deploying multiple gateways on the same server and selecting the target gateway for object storage, the problem that the server can only deploy one ISCSI gateway in the prior art is solved, and data storage efficiency and server utilization are improved.

CN119496788AActive Publication Date: 2025-02-21CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, only one ISCSI gateway can be deployed by a server, resulting in large data transmission volume and complex network configuration, making it difficult to effectively manage.

Method used

Deploy multiple gateways on the same server, and select the target gateway from at least two deployed candidate gateways through the object storage method to store the stored data.

Benefits of technology

It improves data storage efficiency, reduces server investment, and can respond to object storage for different request senders when object storage needs are large.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496788A_ABST
    Figure CN119496788A_ABST
Patent Text Reader

Abstract

The invention relates to an object storage method, device and equipment, a readable storage medium and a program product. The method comprises the steps of receiving an object storage request; wherein the object storage request carries to-be-stored data; selecting a target gateway from at least two deployed candidate gateways according to the object storage request; performing object storage on the to-be-stored data based on the target gateway; wherein the construction mode of the at least two candidate gateways is as follows: 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 the gateways corresponding to the request senders are respectively used as candidate gateways. By adopting the method, the data storage efficiency can be improved, and meanwhile, a plurality of gateways are deployed on the same server, so that the investment of the server can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to an object storage method, apparatus, device, readable storage medium and program product. Background Art

[0002] With the continuous advancement of cloud computing, big data and the Internet of Things, the importance of data storage and management has become 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 high efficiency.

[0003] However, currently only one ISCSI gateway can be deployed on a server. Therefore, the deployment and management of ISCSI gateways face many challenges, especially the problems of large data transmission volume and complex network configuration, which need to be solved urgently. Summary of the invention

[0004] Based on this, it is necessary to provide an object storage method, device, equipment, readable storage medium and program product to address the above technical problems, which can improve data storage efficiency. At the same time, deploying multiple gateways on the same server can 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 data to be stored;

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

[0008] Based on the target gateway, object storage is performed on the data to be stored;

[0009] Among them, at least two candidate gateways are constructed as follows:

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

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

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

[0013] In one embodiment, deploying a gateway for a request sender according to request content in a request to create a gateway corresponding to the request sender includes:

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

[0015] Start the container and use it as the gateway for the request sender.

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

[0017] In one embodiment, selecting a target gateway from at least two deployed candidate gateways according to an object storage request includes:

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

[0019] According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

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

[0021] Based on the target gateway, the format of the data to be stored is converted;

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

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

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

[0025] Among them, 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;

[0026] Accordingly, object storage is performed on the data to be stored, including:

[0027] Object storage is performed on the target storage data.

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

[0029] A request receiving module, used to receive an object storage request; wherein the object storage request carries data to be stored;

[0030] A gateway selection module, configured to select a target gateway from at least two deployed candidate gateways according to an object storage request;

[0031] The object storage module is used to perform object storage on the data to be stored based on the target gateway;

[0032] Among them, at least two candidate gateways are constructed as follows:

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

[0034] For any request sender, deploy a gateway for the request sender according to the request content in the request 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, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

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

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

[0039] Based on the target gateway, object storage is performed on the data to be stored;

[0040] Among them, at least two candidate gateways are constructed as follows:

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

[0042] For any request sender, deploy a gateway for the request sender according to the request content in the request 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 having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

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

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

[0047] Based on the target gateway, object storage is performed on the data to be stored;

[0048] Among them, at least two candidate gateways are constructed as follows:

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

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

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

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

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

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

[0055] Based on the target gateway, object storage is performed on the data to be stored;

[0056] Among them, at least two candidate gateways are constructed as follows:

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

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

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

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

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

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

[0063] Figure 2 A schematic diagram of a flow chart of an object storage method in one embodiment;

[0064] Figure 3 A schematic diagram of a flow chart of gateway deployment steps in an embodiment;

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

[0066] Figure 5 A schematic diagram of a flow chart of an object storage step in an embodiment;

[0067] Fig. 6A is a flowchart of an object storage method in another embodiment;

[0068] Figure 6B A schematic diagram of a process of gateway allocation and object storage steps in one embodiment;

[0069] Figure 6C A schematic diagram of format conversion in an embodiment;

[0070] Figure 7 is a structural block diagram of an object storage device in one embodiment;

[0071] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying 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 in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be 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 the target gateway from at least two deployed candidate gateways according to the object storage request; the server 104 performs object storage on the data to be stored based on the target gateway; wherein the construction method of 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; and taking the gateway corresponding to each request sender as a candidate gateway. Among them, the client 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent 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, Figure 2 As shown, an object storage method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate, and the following steps are included:

[0075] S210: Receive an object storage request.

[0076] The object storage request carries data to be stored, which is data that needs to be stored in the object.

[0077] Exemplarily, in this embodiment, when a user has an object storage demand, the user may send an object storage request to the server through the client. At this time, the server may receive the object storage request sent by the user through the client.

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

[0079] The candidate gateways are the gateways that have been deployed on this server. The target gateway is the gateway among the candidate gateways that matches the object storage request and can be used to respond to the object storage request.

[0080] Exemplarily, in this embodiment, there is a correspondence between different object storage requests and target gateways. For example, a correspondence between a reference storage request and a reference gateway is pre-built, and the reference gateway corresponding to the object storage request in the correspondence is used as the target gateway.

[0081] Exemplarily, 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, which is not described in detail here. Further, when the target gateway selection model is trained, the sample storage object can be input into the target gateway selection model to obtain the gateway selection result corresponding to the sample storage object. Further, according to the gateway selection result and the target gateway label corresponding to the corresponding sample storage object, the model parameters of the target gateway selection model are adjusted.

[0082] Among them, 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 using the gateway corresponding to each request sender as a candidate gateway.

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

[0084] It is understandable that when a user performs object storage for the first time, a gateway creation request needs to be sent to the server through the client so as 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 based on the type of the request content, the gateway created for the corresponding request sender is determined. Furthermore, based on a preset method, the gateway is deployed for the request sender.

[0086] Furthermore, the server associates and stores the gateway corresponding to each request sender with the corresponding request sender, and uses the gateway corresponding to each request sender as a candidate gateway.

[0087] S230: Based on the target gateway, object storage is performed on the data to be stored.

[0088] In the above object storage method, at least two candidate gateways are deployed in the same server. After receiving an object storage request, a target gateway is selected from at least two deployed candidate gateways, and object storage is performed on the data to be stored based on the target gateway. Compared with the prior art, in which only one gateway can be deployed on one server, server costs can be saved. Furthermore, each candidate gateway has a corresponding relationship with the corresponding request sender. In the case of a large demand for object storage, this server can perform object storage responses for different request senders based on multiple deployed gateways, thereby improving object storage efficiency.

[0089] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the step of deploying a gateway for the request sender according to the request content in the request sender's corresponding gateway creation request is refined.

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

[0091] S310: Create a container of a preset type in response to a gateway creation request sent by a request sender.

[0092] Wherein, a gateway service is configured in the container. Wherein, the preset type of container may be a Docker container.

[0093] Exemplarily, in this embodiment, a Docker container may be created in response to a gateway creation request sent by a request sender, and the Docker container may be named based on a preset file name, wherein the preset file name may be "iscsigateway".

[0094] Optionally, in order to enable the container to be used as a gateway, in this embodiment, the loading script of the Docker container includes the following steps: installing the s3backer component, the version is a preset version, such as version 2.0.2; installing the nbdkit component, the version is a preset version, such as version 1.29.11, and correspondingly, the relevant nbd, nbd-server, nbd-client and other components need to be installed; installing the tgtd component, the version is a preset version, such as version 1.0.79; deploying the startup script and configuration script of the software. Since the gateway service is configured in the container, that is, in this embodiment, the gateway is deployed in 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 the Docker Engine has been installed.

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

[0097] It should be noted that since the container needs to be imaged before it can be enabled, in this embodiment, before starting the container, the container needs to be imaged to obtain the container image, and the container image is stored.

[0098] For example, step 2: save the created "iscsigateway" container (docker commit) to submit a new image layer, then use storage (docker save) to export it as an image, and then load the image to the server through loading (docker load). Then start the Docker container on the server, and use the newly loaded "iscsigateway" as the image to start the container.

[0099] It should be noted that in this embodiment, inside the container, according to the configuration script and configuration file, the s3backer component is used to interact with the object storage (the nbdkit component will be loaded via the call of s3backer), and the object storage is simulated as a block device through the RESTAPI and logical address segmentation, providing the nbdx block device presented on the device. The server side of the iscsi protocol is implemented using tgtd to provide the final service to the user. That is, the gateway is deployed for the object sender in the above manner.

[0100] In the above embodiment, a method is provided in which a gateway is deployed in a container to achieve an effect that a server can deploy multiple gateways.

[0101] Based on the technical solutions of the above embodiments, the present 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 the object storage request is refined.

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

[0103] S410: Determine a request sender of an object storage request.

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

[0105] S420: According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

[0106] In this embodiment, since there is a corresponding relationship between the at least two deployed candidate gateways and the request sender, a target gateway matching the identification information of the request sender can be selected from the at least two deployed candidate gateways according to the identification information of the request sender.

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

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

[0109] S510: Based on the target gateway, format conversion is performed on the data to be stored.

[0110] Exemplarily, since the storage device cannot be used to store data in block storage format, and 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 the data in file storage format.

[0111] Exemplarily, the data to be stored may be format-converted by the s3backer component. Exemplarily, the data to be stored may also be input into the format conversion model to obtain the format-converted data to be stored.

[0112] S520, storing the data to be stored after format conversion in a corresponding storage device.

[0113] Specifically, in this embodiment, object storage is performed on the target storage data.

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

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

[0116] See also Fig. 6A The object storage method shown includes:

[0117] S610A, gateway deployment steps;

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

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

[0120] S610B, receiving an object storage request;

[0121] Among them, the object storage request carries the data to be stored;

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

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

[0124] S630B, according to the request sender of the object storage request, selecting a target gateway that matches the request sender from at least two deployed candidate gateways;

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

[0126] For example, see Figure 6C As shown in the format conversion diagram, during the object storage process, the iscsi component, nbdx, nbd server and REST API can be used to convert the format of the data to be stored, and the data to be stored in the block storage format can be converted into the target storage data in the file storage format. During the object reading process, the RESTAPI, nbd server, nbd_recv, nbdx and iscsi components can be used to convert the data to be read, and the data to be read in the file storage format can be converted into the data in the block storage format;

[0127] Among them, 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;

[0128] S650B, object storage is performed on the target storage data.

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

[0130] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0131] Based on the same inventive concept, the embodiment of the present application also provides an object storage device for implementing the object storage method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more object storage device embodiments provided below can refer to the limitations on the object storage method above, and will not be repeated here.

[0132] In an exemplary embodiment, 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 an object storage request; 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 according to the object storage request;

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

[0136] Among them, at least two candidate gateways are constructed as follows:

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

[0138] For any request sender, deploy a gateway for the request sender according to the request content in the request creation request corresponding to the request sender;

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

[0140] In one embodiment, the object storage device also includes a gateway deployment module, including a container creation unit, which is used to create a container of a preset type in response to a gateway creation request sent by a request sender; wherein a gateway service is configured in the container; and the gateway deployment unit is used to start the container and use the container as the gateway corresponding to the request sender.

[0141] In one embodiment, the gateway deployment module further includes a mirroring unit, which is used to image the container to obtain the container image and store the container image.

[0142] In one embodiment, the gateway selection module 720 includes a first determination unit for determining a request sender of an 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 performing format conversion on the data to be stored based on the target gateway; and a data storage unit for storing the format-converted data to be stored in a corresponding storage device.

[0144] In one embodiment, the format conversion unit is specifically used to convert the 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; accordingly, the data storage unit is specifically used to perform object storage on the target storage data.

[0145] Each module in the above object storage device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0146] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an object storage method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

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

[0148] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

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

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

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

[0152] Among them, at least two candidate gateways are constructed as follows:

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

[0154] For any request sender, deploy a gateway for the request sender according to the request content in the request creation request corresponding to the request sender;

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

[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0157] In response to a gateway creation request sent by a request sender, a container of a preset type is created; wherein a gateway service is configured in the container;

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

[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

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

[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

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

[0163] According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0165] Based on the target gateway, the format of the data to be stored is converted;

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

[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

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

[0169] Among them, 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;

[0170] Object storage is performed on the target storage data.

[0171] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

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

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

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

[0175] Among them, at least two candidate gateways are constructed as follows:

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

[0177] For any request sender, deploy a gateway for the request sender according to the request content in the request creation request corresponding to the request sender;

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

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

[0180] In response to a gateway creation request sent by a request sender, a container of a preset type is created; wherein a gateway service is configured in the container;

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

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

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

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

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

[0186] According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

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

[0188] Based on the target gateway, the format of the data to be stored is converted;

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

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

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

[0192] Among them, 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;

[0193] Object storage is performed on the target storage data.

[0194] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

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

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

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

[0198] Among them, at least two candidate gateways are constructed as follows:

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

[0200] For any request sender, deploy a gateway for the request sender according to the request content in the request creation request corresponding to the request sender;

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

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

[0203] In response to a gateway creation request sent by a request sender, a container of a preset type is created; wherein a gateway service is configured in the container;

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

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

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

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

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

[0209] According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

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

[0211] Based on the target gateway, the format of the data to be stored is converted;

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

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

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

[0215] Among them, 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;

[0216] Object storage is performed on the target storage data.

[0217] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0218] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An object storage method, characterized in that: Applied to a server, the method comprises: Receiving an object storage request; wherein the object storage request carries data to be stored; Selecting a target gateway from at least two deployed candidate gateways according to the object storage request; Based on the target gateway, object storing is performed on the data to be stored; The at least two candidate gateways are constructed as follows: receiving at least one gateway creation request sent by at least one request sender; For any request sender, deploy a gateway for the request sender according to the request content in the gateway creation request corresponding to the request sender; The gateways corresponding to the request senders are respectively used as candidate gateways.

2. The method according to claim 1, characterized in that The step of deploying a gateway for the request sender according to the request content in the request for the corresponding gateway creation request of the request sender includes: In response to the gateway creation request sent by the request sender, create a container of a preset type; wherein the container is configured with a gateway service; The container is started, and the container is used as a gateway corresponding to the request sender.

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

4. The method according to claim 1, characterized in that The selecting, according to the object storage request, a target gateway from at least two deployed candidate gateways includes: Determining a request sender of the object storage request; According to the request sender of the object storage request, a target gateway matching the request sender is selected from at least two deployed candidate gateways.

5. The method according to claim 1, characterized in that The object storing the data to be stored based on the target gateway includes: Based on the target gateway, converting the format of the data to be stored; The data to be stored after format conversion is stored in the corresponding storage device.

6. The method according to claim 5, characterized in that The converting the format of the data to be stored based on the target gateway includes: Based on the target gateway, converting the data to be stored in the block storage format into the target storage data in the file storage format; Wherein, 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: Object storage is performed on the target storage data.

7. An object storage device, characterized in that: The device comprises: A request receiving module, used to receive an object storage request; wherein the object storage request carries data to be stored; A gateway selection module, configured to select a target gateway from at least two deployed candidate gateways according to the object storage request; An object storage module, used for performing object storage on the data to be stored based on the target gateway; The at least two candidate gateways are constructed as follows: receiving at least one gateway creation request sent by at least one request sender; For any request sender, deploy a gateway for the request sender according to the request content in the gateway creation request corresponding to the request sender; The gateways corresponding to the request senders are respectively used as candidate gateways.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • multi-gateway system of Internet of Things

    CN106713084A

  • Micro-service gateway management method, system and device, readable storage medium and product

    CN113572689A

  • Object storage file gateway device based on Docker and construction method

    CN115630039A

  • Communication method and device, equipment and storage medium

    CN116389601A

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

    CN116760847A