Format conversion method and device, electronic equipment and storage medium
By integrating multiple adapters in the adapter layer of the container storage interface, the container storage interface combines multiple sets of storage services is achieved, solving the problem of independent deployment and maintenance of CSI, and reducing deployment and maintenance costs.
Patent Information
- Application Number
- CN202411674170.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-04-25
AI Technical Summary
In the container management system, there is no resource or state sharing between multiple sets of CSIs, resulting in independent deployment and maintenance, increasing deployment and maintenance costs.
By integrating multiple adapters in the adapter layer of the container storage interface, receiving service requests from the container management system, determining the target storage service and adapter based on the storage type, and formatting the service requests through the target adapter and sending them to the target storage service.
A set of container storage interfaces are implemented to connect multiple storage services, reducing the deployment and maintenance costs of container storage interfaces.
Smart Images

Figure CN119883494A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and specifically relates to a format conversion method, device, electronic device, and readable storage medium. Background Art
[0002] Cloud vendors provide storage services to container management systems. In container management systems, multiple CSIs (Container Storage Interfaces) are built for different levels of storage services. These CSIs do not share any resources or state. Consequently, independently publishing multiple CSIs results in high deployment and maintenance costs. Summary of the Invention
[0003] In view of the above problems, the present application proposes a format conversion method, device, electronic device and storage medium to improve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a format conversion method, which is applied to a container storage interface, wherein an adapter layer is integrated in the container storage interface, and the method includes: receiving a service request sent by a container management system, wherein the service request includes a storage type; based on the storage type, determining a target storage service from multiple storage services, where different storage types correspond to different storage services; based on the target storage service, determining a target adapter from multiple adapters included in the adapter layer, where different storage services correspond to different adapters; format-converting the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service; sending the target service request to the target storage service so that the target storage service returns a response signal to the container storage interface, where the response signal includes information on the structural composition of the target storage service.
[0005] Furthermore, the container storage interface is also integrated with an underlying module; based on the storage type, a target storage service is determined from multiple storage services, including: initializing the global environment of the underlying module to obtain an initialized underlying module; based on the initialized underlying module, the service request is verified; if the verification passes, the target storage service is determined from the multiple storage services through the initialized underlying module, and the target storage service is determined by the initialized underlying module based on the storage type.
[0006] Furthermore, the global environment of the base module is initialized to obtain the initialized underlying module, including: obtaining the environment configuration and environment variables of the container management system; based on the environment configuration and the environment variables, initializing the global environment of the underlying module to obtain the initialized underlying module.
[0007] Furthermore, after sending the target service request to the target storage service so that the target storage service returns a response signal to the container storage interface, the method further includes: receiving a response signal sent by the target storage service, wherein the response signal is a signal generated by the target storage service in response to the received target service request; performing format conversion on the response signal through the target adapter to obtain a target response signal, wherein the format of the target response signal is a format supported by the container management system; and sending the target response signal to the container management system so that the container management system performs volume processing operations based on the information on the structure of the target storage service included in the target response signal. Performing format conversion on the response signal through the target adapter to obtain a target response signal supported and understood by the container management system allows the container management system to seamlessly use various storage services through the received target response signal without having to consider the specific implementation of the storage service.
[0008] In a second aspect, an embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface, wherein the adapter layer includes multiple adapters, and the method includes: receiving a service request through a target adapter among the multiple adapters, wherein the service request includes a storage type, and the service request is a request sent by a container management system to an underlying module in the container storage interface, and the target adapter is an adapter determined by the underlying module from the multiple adapters according to the storage type; performing format conversion on the service request through the target adapter to obtain a target service request, wherein the format of the target service request is a format supported by a target storage service; and sending the target service request to a target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, wherein the response signal includes information on the structural composition of the target storage service.
[0009] Furthermore, after receiving the service request through a target adapter among the multiple adapters, the method further includes: decrypting the encrypted passcode in the service request to obtain the decrypted passcode, wherein the passcode is a password for accessing the target storage service; and determining a target storage interface associated with the target storage service. By encrypting the passcode of the target storage service, the passcode is prevented from being exposed in plain text in the container management system, and access to the storage service without the passcode is prevented, thereby ensuring the security of the data in the storage service.
[0010] Furthermore, sending the target service request to the target storage service corresponding to the target adapter so that the target storage service returns a response signal to the container storage interface includes: sending the target service request to the target storage service through the target storage interface and the decrypted passcode so that the target storage service returns a response signal to the container storage interface.
[0011] Furthermore, the format conversion of the service request is performed based on the target adapter among the multiple adapters to obtain the target service request, including: obtaining the target conversion format corresponding to the service request, the target conversion format is a format pre-determined from multiple conversion formats supported by the target storage service; based on the target conversion format, the service request is format converted to obtain the target service request.
[0012] In a third aspect, an embodiment of the present application provides a format conversion device that runs on a container storage interface, wherein multiple adapters are integrated in the container storage interface, and the device includes: a request receiving unit for receiving a service request sent by a container management system; a storage service determination unit for determining a target storage service from multiple storage services based on the storage type, where different storage types correspond to different storage services; an adapter selection unit for determining a target adapter from multiple adapters included in the adapter layer based on the target storage service, where different storage services correspond to different adapters; a format conversion unit for performing format conversion on the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service; a request sending unit for sending the target service request to the target storage service so that the target storage service returns a response signal to the container storage interface, where the response signal includes information on the structural composition of the target storage service.
[0013] In a fourth aspect, an embodiment of the present application provides a format conversion device, which runs in an adapter layer in a container storage interface, wherein the adapter layer includes multiple adapters, and the device includes: a service request receiving unit, which is used to receive a service request through a target adapter among the multiple adapters, wherein the service request includes a storage type, and the service request is a request sent by a container management system to an underlying module in the container storage interface, and the target adapter is an adapter determined by the underlying module from the multiple adapters according to the storage type; a format conversion unit, which is used to perform format conversion on the service request through the target adapter to obtain a target service request, wherein the format of the target service request is a format supported by a target storage service; a request sending unit, which is used to send the target service request to a target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, wherein the response signal includes information on the structural composition of the target storage service.
[0014] In a fifth aspect, an embodiment of the present application provides an electronic device comprising one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.
[0015] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which program code is stored, wherein the above method is executed when the program code is run.
[0016] The present invention provides a format conversion method, apparatus, electronic device, and storage medium. This solution integrates multiple adapters within the adapter layer of a container storage interface, converts the format of service requests via a target adapter, and sends the converted service requests to a target storage service. This allows one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A scenario diagram showing a format conversion method proposed in an embodiment of the present application is shown;
[0019] Figure 2A scenario diagram showing a format conversion method proposed in an embodiment of the present application is shown;
[0020] Figure 3 A flowchart of a format conversion method proposed in one embodiment of the present application is shown;
[0021] Figure 4 An architectural diagram of a container storage interface for a format conversion method proposed in one embodiment of the present application is shown;
[0022] Figure 5 A flowchart of a format conversion method proposed in another embodiment of the present application is shown;
[0023] Figure 6 A general architecture diagram of a format conversion method proposed in another embodiment of the present application is shown;
[0024] Figure 7 A flowchart of a format conversion method proposed in another embodiment of the present application is shown;
[0025] Figure 8 A flowchart of a format conversion method proposed in another embodiment of the present application is shown;
[0026] Figure 9 A flowchart of a format conversion method proposed in another embodiment of the present application is shown;
[0027] Figure 10 A flowchart of a format conversion method proposed in another embodiment of the present application is shown;
[0028] Figure 11 A structural block diagram of a format conversion method proposed in another embodiment of the present application is shown;
[0029] Figure 12 A structural block diagram of a format conversion method proposed in another embodiment of the present application is shown;
[0030] Figure 13 A structural block diagram of a vehicle for executing the format conversion method according to an embodiment of the present application is shown in real time in the present application;
[0031] Figure 14 The present invention shows a storage unit in real time for storing or carrying program codes for implementing the format conversion method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, and may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] When using container management systems like Kubernetes, data often needs to be stored. However, Kubernetes's inherent storage capabilities are relatively low, making it difficult to provide sufficient storage capacity. Therefore, external storage services are required to provide storage space for data. In this case, format conversion functionality is pre-configured for each container storage interface. Upon receiving a service request, the container storage interface automatically converts the format of the service request.
[0035] In their research on related format conversion methods, the inventors discovered that, in general, different container storage interfaces in a container management system correspond to different storage services, and a format conversion function is set in each container storage interface. However, when multiple sets of container storage interfaces are published independently, although the format of received service requests can be converted and the converted service requests can be sent to the corresponding storage service, the deployment and maintenance costs of the container storage interfaces will be high.
[0036] Therefore, the inventors proposed a format conversion method, device, electronic device and storage medium. First, a service request sent by a container management system is received. Then, based on the storage type, a target storage service is determined from multiple storage services. Then, based on the target storage service, a target adapter is determined from multiple adapters included in the adapter layer. Then, the service request is format-converted by the target adapter to obtain a target service request. The format of the target service request is a format supported by the target storage service. Finally, the target service request is sent to the target storage service so that the target storage service returns a response signal to the container storage interface. Multiple adapters are integrated in the adapter layer included in the container storage interface. The service request is format-converted by the target adapter. The converted service request is sent to the target storage service, so that one set of container storage interfaces can be connected to multiple storage services, thereby reducing the deployment cost and maintenance cost of the container storage interface.
[0037] See also Figure 1 The format conversion method provided in the embodiment of the present application can be applied to the container management system 100 and the storage service group 200. The container management system 100 is in communication with the storage service group 200, and the container management system 100 may include a container storage interface 110. The container storage interface 110 is used to receive a service request generated by the container management system 100, determine a target storage service based on the storage type included in the service request, perform format conversion on the service request according to the format of the target storage service to obtain a target service request, send the target service request to the target storage service in the storage service group 200, obtain a response signal returned by the target storage service in the storage service group 200, perform format conversion on the received response signal according to a format supported by the container management system 100 to obtain a target response signal, and return the target response signal to the container management system 100; the storage service group 200 is used to receive the target service request sent by the container storage interface 110, and return a response signal to the container storage interface 110 in response to the target service request.
[0038] See also Figure 2The container storage interface 110 may include a bottom layer module 111 and an adapter layer 112. The bottom layer module 111 is a module that encapsulates the general functions of the container storage interface and is configured to receive a service request generated by the container management system 100, determine a target storage service based on the storage type included in the service request, determine a target adapter from a plurality of adapters included in the adapter layer 112 based on the target storage service, and send the service request to the target adapter in the adapter layer 112. The adapter layer 112 is configured to receive the service request sent by the bottom layer module 111 through the target adapter, convert the received service request into a format supported by the target storage service to obtain a target service request, and send the target service request to the target storage service in the storage service group 200. Furthermore, upon receiving a response signal returned by the target storage service in the storage service group 200, the adapter layer 112 converts the response signal into a format supported by the container management system to obtain a target response signal, and returns the target response signal to the bottom layer module 111. The bottom layer module 111 then returns the target response signal to the container management system 100.
[0039] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0040] See also Figure 3 , an embodiment of the present application provides a format conversion method, which is applied to a container storage interface, wherein the container storage interface is integrated with an adapter layer, and the method includes:
[0041] Step S110: receiving a service request sent by a container management system, where the service request includes a storage type.
[0042] In an embodiment of the present application, the service request may include at least one of a volume creation request, a volume deletion request, and a volume expansion request. A container management system is an open source system for automatically deploying, scaling, and managing containerized applications. For example, a container management system may be a system such as Kubernetes or Mesos. For volume creation requests, although the container management system itself has storage capabilities, its storage capabilities are relatively low. When the container management system needs to store data, due to its insufficient storage capacity, it needs to store the data in a storage service outside the container management system. After the user specifies the storage class and the size of the storage space to be created in the storage service, the container management system generates a volume creation request. For volume deletion requests, when the user wants to delete any storage space in a storage service, he specifies the storage class and the location of the storage space to be deleted in the storage service corresponding to the storage class. The container management system generates a volume deletion request, and the container storage interface (CSI) receives the service request sent by the container management system. For volume expansion requests, when the user wants to expand any storage space in a storage service, he specifies the storage class and the location of the storage space to be expanded in the storage service corresponding to the storage service and the amount of storage to be expanded. The container management system generates a volume expansion request. The storage class is a pre-set storage service type. Each storage class records the type of storage service corresponding to the storage class, the version information of the storage service, the IP address of the storage service, etc., which are not specifically limited here.
[0043] Step S120: Based on the storage type, determine a target storage service from a plurality of storage services, where different storage types correspond to different storage services.
[0044] In an embodiment of the present application, the storage service is a service provided by the cloud vendor to the container management system. A first mapping table is pre-created. In this first mapping table, there is a mapping relationship between different storage types and different storage services. Each storage type is equivalent to a structure. In each structure, the type of storage service corresponding to the structure, version information, access point information, etc. are stored. No specific restrictions are made here. For example: the type of the storage service is Cloud, the version information of Cloud, the access point information of Cloud, etc. The access point information of the storage service may include the protocol, domain name, IP (Internet Protocol) and port of the storage service. No specific restrictions are made here. After receiving the service request sent by the container management system, the container interface obtains the storage type from the service request, determines the storage service corresponding to the storage type from multiple storage services by querying the first mapping table, and uses the storage service corresponding to the storage type as the target storage service. Among them, the first mapping table is a mapping table between storage types and storage services.
[0045] Step S130: Based on the target storage service, determine a target adapter from a plurality of adapters included in the adapter layer, where different storage services correspond to different adapters.
[0046] In an embodiment of the present application, a second mapping table is pre-created. In this second mapping table, there are mapping relationships between different storage services and different adapters. In this solution, one adapter is set to correspond to one storage service. This is to facilitate maintenance of the adapter corresponding to the upgraded storage service when the storage service is upgraded. After determining the target storage service, the container storage interface can query the second mapping table to determine the adapter corresponding to the target storage service from multiple adapters and use the adapter corresponding to the target storage service as the target adapter. The second mapping table is a mapping table between storage services and adapters.
[0047] As a method, the target adapter can also be indirectly determined directly through the interface information in the storage type. In the above method, since the storage type includes the type and version information of the storage service, if the storage service is upgraded, the storage type needs to be updated accordingly, which requires a certain amount of human resources. In order to reduce the use of this part of human resources, the type and version information of the storage service can be saved in the storage type instead of the general information and access point information of the storage service. When the container storage interface receives a service request, it checks the access point information included in the service request and uses the storage service corresponding to the access point information as the target storage service, thereby finding the target adapter corresponding to the target storage service. Since the target adapter is determined only through the access point information included in the service request, even when the version information of the storage service changes, there is no need to update the storage type, which reduces the use of human resources.
[0048] As another approach, only one adapter may be provided in the adapter layer of the container storage interface, and the adapter may correspond to all storage services. This approach may reduce the deployment cost of the adapter.
[0049] Step S140: converting the format of the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service.
[0050] In an embodiment of the present application, because the formats supported by the container management system differ from those supported by the storage service, if the service request generated by the container management system is sent directly to the storage service, the storage service may not be able to understand and process the service request. In this solution, one adapter corresponds to one storage service, and each adapter stores the formats supported by the corresponding storage service. Therefore, after determining the target adapter, the target storage service's supported format is determined through the target adapter, and the service request is formatted according to the format supported by the target storage service, and the converted service request is used as the target service request.
[0051] Step S150: Send the target service request to the target storage service, so that the target storage service returns a response signal to the container storage interface, where the response signal includes information about the structure of the target storage service.
[0052] In an embodiment of the present application, after the container storage interface obtains the target service request through the target adapter, the target storage service can understand and process the target service request because the format of the target service request at this time is a format supported by the target storage service. Therefore, after obtaining the target service request, the container storage interface sends the target service request to the corresponding target storage service. When the target storage service receives the target service request, it performs a storage space processing operation according to the target service request. When the target storage service completes the storage space processing operation, it generates a response signal and returns the response signal to the container storage interface. Among them, the information of the structure of the target storage service includes information on the storage location of the storage space in the target storage service and information on the size of the storage space, etc., which are not specifically limited here.
[0053] The storage space processing operation may include at least one of a storage space creation operation, a storage space deletion operation, and a storage space expansion operation. The storage space processing operation corresponds to the service request. If the container management system generates a volume creation request, the target storage service performs the storage space creation operation; if the container management system generates a volume deletion request, the target storage service performs the storage space deletion operation; if the container management system generates a volume expansion request, the target storage service performs the storage space expansion operation. If the target service request received by the target storage service is a volume creation request, the target storage service determines the size of the storage space to be created based on the target service request, thereby creating a storage space, completing the storage space creation operation, and determining the structural composition of the created storage space and the location of the storage space in the target storage service, and returning the structural composition information and location information as return information to the container storage interface. If the target service request received by the target storage service is a volume deletion request, the target storage service determines the location of the storage space to be deleted based on the target service request, finds the storage space corresponding to the location among multiple storage spaces, deletes the storage space, completes the storage space deletion operation, determines the structural composition of the deleted storage space and the location in the target storage service, and returns the structural composition information and location information as return information to the container storage interface.
[0054] For example, the container storage interface can be as follows Figure 4As shown, the container storage interface integrates an underlying module and an adapter layer. The underlying module encapsulates the common functions of the container storage interface. The adapter layer includes multiple adapters, each of which connects to different backend storage services. Each adapter has two functions: format conversion and a functional API (Application Programming Interface). The format conversion function is processed based on the type of service request. For the same storage service, different types of service requests may require different conversion formats. The functional API depends on the specific storage protocol and product. In this solution, password decryption, updating / obtaining ACLs (Access Control Lists), and obtaining storage space information can be performed.
[0055] An embodiment of the present application provides a format conversion method, which is applied to a container storage interface. The container storage interface integrates an adapter layer, and multiple adapters are integrated in the adapter layer included in the container storage interface. The target adapter converts the format of a service request and sends the converted service request to the target storage service. This enables one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface.
[0056] See also Figure 5 , an embodiment of the present application provides a format conversion method, which is applied to a container storage interface, wherein the container storage interface is integrated with an adapter layer, and the method includes:
[0057] Step S201: receiving a service request sent by a container management system, where the service request includes a storage type.
[0058] For details of step S201 , please refer to the detailed explanation in the above embodiment, so it will not be described in detail in this embodiment.
[0059] Step S202: Initialize the global environment of the underlying module to obtain an initialized underlying module.
[0060] In an embodiment of the present application, the global environment of the underlying module includes environment configuration and environment variables. The global environment of the underlying module is initialized by obtaining the environment configuration and environment variables, thereby obtaining the initialized underlying module.
[0061] Specifically, step S202 may be as described in step S2021 and step S2022.
[0062] Step S2021: Obtain the environment configuration and environment variables of the container management system.
[0063] In the embodiments of this application, the environment configuration and environment variables are pre-stored in the container storage interface. The environment configuration includes the storage service's IP, port information, and authentication information, which are not detailed here. The environment variables include the Pod (container group) name, namespace, IP, and computing resource limits of the container, which are not specifically limited here. A pod is the smallest resource management component in a container management system and represents a process in the container management system.
[0064] Step S2022: Based on the environment configuration and the environment variables, the global environment of the underlying module is initialized to obtain the initialized underlying module.
[0065] In the embodiment of the present application, the underlying module can only function normally after initialization is completed. After obtaining the environment configuration and environment variables from the container management system, the global environment of the underlying module is updated using the environment configuration and environment variables, completing the initialization operation of the global environment of the underlying module and obtaining the initialized underlying module.
[0066] Step S203: Based on the initialized underlying module, the service request is verified.
[0067] In an embodiment of the present application, before the container management system sends a service request to the target storage service, it must determine whether the initiation operation of the service request is legal. Therefore, the initialization of the underlying module requires verification of the legality of the service request. When verifying the service request, the service request can be verified based on the requester's username, the requested operation, and the requested object included in the service request. Specifically, the underlying module contains a permission table that records which users can issue what types of requests and which objects can be requested. By comparing the requester's username, the requested operation, and the requested object included in the service request with the permission table, the legality of the service request can be determined. For example, the permission table records that user 1 can issue volume creation requests, volume deletion requests, and volume storage requests, and the requested object can be Cloud; user 2 can issue volume creation requests, volume deletion requests, and volume storage requests, and the requested object can be IAAS (Infrastructure as a Service). If user 1 issues a volume creation request, and the requested object is IAAS, the permission table can determine that the volume creation request issued by user 1 is illegal, and the volume creation request verification fails.
[0068] Step S204: If the verification passes, the initialized underlying module determines a target storage service from the multiple storage services, where the target storage service is determined by the initialized underlying module based on the storage type.
[0069] In an embodiment of the present application, if the verification passes, it indicates that the user has the authority to complete the requested operation. The initialized underlying module can perform the subsequent process of determining the target storage service and determining the target adapter, and allow the initialized underlying module to send the service request to the target adapter.
[0070] As a way, if the verification fails, it means that the user does not have the authority to complete the requested operation. Then the initialized underlying module cannot perform subsequent processing and deletes the service request, or returns a verification failure signal to the container management system, and the container management system notifies the user that the service request has failed to be sent.
[0071] Step S205: Based on the target storage service, determine a target adapter from a plurality of adapters included in the adapter layer, where different storage services correspond to different adapters.
[0072] In the embodiment of the present application, after the verification is passed, the target adapter is determined from multiple adapters according to the target storage service through the initialized underlying module.
[0073] Step S206: converting the format of the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service.
[0074] In the embodiment of the present application, since the underlying module has already determined the target storage service through the storage type included in the service request and has determined the target adapter corresponding to the target storage service, the initialized underlying module can smoothly send the service request to the target adapter. When the target adapter receives the service request, since the service request supports the format of the container management system, and the format of the container management system is not necessarily the same as the format supported by the target storage service, in order to ensure that the target storage service can understand and process the service request, the target adapter needs to convert the service request according to the format supported by the target storage service to obtain the target service request.
[0075] Step S207: Send the target service request to the target storage service, so that the target storage service returns a response signal to the container storage interface, where the response signal includes information about the structure of the target storage service.
[0076] In an embodiment of the present application, after the target storage service completes the storage space processing operation, a volume processing tag will be generated accordingly, and the volume processing tag will be used as part of the response signal. The volume processing tag is used to perform volume processing operations based on the volume processing tag when the container management system receives it. The types of volume processing tags include volume creation tags, volume deletion tags, and volume expansion tags. If the target storage service performs a storage space creation operation, a volume creation tag is generated; if the target storage service performs a storage space deletion operation, a volume deletion tag is generated; if the target storage service performs a storage space expansion operation, a volume expansion tag is generated.
[0077] Step S208: Receive a response signal sent by the target storage service, where the response signal is a signal generated by the target storage service in response to the received target service request.
[0078] In an embodiment of the present application, after receiving a target service request sent by a container storage interface, the target storage service obtains information related to its own structural composition in response to the received target service request, and sends the information related to the structural composition as a response signal to the container storage interface, which receives the response signal.
[0079] Step S209: converting the format of the response signal through the target adapter to obtain a target response signal, where the format of the target response signal is a format supported by the container management system.
[0080] In an embodiment of the present application, after receiving a response signal from a target storage service, the container storage interface must return the response signal to the container management system. However, since the response signal is in a format supported by the target storage service, which may not necessarily be the same as the format supported by the container management system, returning the response signal directly to the container management system may prevent the container management system from understanding and processing the response signal. Therefore, the response signal must be formatted into a format supported by the container management system. Each adapter pre-stores the format supported by the container management system. Upon receiving the response signal from the target storage service, the container management system uses the target adapter to convert the response signal into a format supported by the container management system, thereby obtaining the target response signal.
[0081] Step S210: Send the target response signal to the container management system, so that the container management system performs a volume processing operation based on the information of the structure composition of the target storage service included in the target response signal.
[0082] In an embodiment of the present application, a volume processing operation may include at least one of a volume creation operation, a volume deletion operation, and a volume expansion operation. A volume processing operation corresponds to a storage space processing operation. If the target storage service performs a storage space creation operation, the container management system performs a volume creation operation based on a target response signal. If the target storage service performs a storage space deletion operation, the container management system performs a volume deletion operation based on the target response signal. If the target storage service performs a storage space expansion operation, the container management system performs a volume expansion operation based on the target response signal. After the container storage interface receives the target response signal through the target adapter, the target response signal is in a format supported by the container management system, and the container management system is able to understand and process the target response signal. The container storage interface sends the target response signal to the container management system. After receiving the target response signal, the container management system performs a volume processing operation based on the volume processing tag included in the target response signal and the structural composition information of the target storage service included in the target response signal. If the volume processing tag included in the target response signal is a volume creation tag, the container management system composes a persistent volume (PV) based on the structural composition information of the created storage space included in the target response signal, and completes the volume creation operation; if the volume processing tag included in the target response signal is a volume deletion tag, the container management system deletes the persistent volume based on the structural composition information of the deleted storage space and the location information of the deleted storage space included in the target response signal, and completes the volume deletion operation; if the volume processing tag included in the target response signal is a volume expansion tag, the container management system expands the persistent volume based on the structural composition information of the expanded storage space and the location information of the expanded storage space included in the target response signal, and completes the volume expansion operation. It should be noted that the persistent volume is only a reference of the container management system to the storage space in the storage service. The size of the corresponding storage space and its location in the storage service can be queried through the persistent volume. When data needs to be stored, the container management system cannot store the data in the persistent volume, but needs to store the data in the storage space corresponding to the persistent volume.
[0083] As a way, after performing the volume processing operation, taking data storage as an example, when the user needs to store data, the user determines the demand for storage space, which includes the type of storage service, the size of the storage space, etc. The container management system searches for a persistent volume that meets the demand based on the demand, and determines the location of the storage space corresponding to the persistent volume in the storage service, and stores the data in the storage space corresponding to the persistent volume in the storage service. Of course, data reading, deletion, and modification can also be processed by referring to the above process.
[0084] For example, the interaction between the container management system and the storage service can be as follows: Figure 6As shown, the container management system includes a container storage interface, which includes an underlying module and an adapter layer. The adapter layer includes multiple adapters, and different adapters correspond to different storage services. A cloud vendor provides a storage service group, which includes multiple levels of storage services. The functions of the storage services in the upper layer depend on the storage services in the lower layer. For example, storage service 1 provides storage capabilities, storage service 2 and storage service 3 rely on storage service 1 to provide storage services to the outside world, and the functions of storage service 3 depend on storage service 2.
[0085] For example, steps S201 to S210 may be as follows: Figure 7 As shown, when the container management system generates a service request, the service request is sent to the underlying module in the container storage interface. The underlying module determines the target storage service according to the storage type in the service request, and determines the target adapter among the multiple adapters included in the adapter layer according to the target storage service, and sends the service request to the target adapter in the adapter layer. The target adapter selects the corresponding target storage interface according to the type of the service request and the target adapter, and converts the service request into a format supported by the target storage service to obtain a target service request. The target service request is sent to the target storage service through the determined target storage interface. The target storage service generates a response signal in response to the received service request, and returns the response signal to the target adapter in the adapter layer. After receiving the response signal, the target adapter converts the response signal into a format supported by the container management system to obtain a target response signal, and sends the target response signal to the underlying module. After receiving the target response signal, the underlying module sends the target response signal to the container management system.
[0086] An embodiment of the present application provides a format conversion method, which is applied to a container storage interface. The container storage interface integrates an adapter layer, and multiple adapters are integrated in the adapter layer included in the container storage interface. The target adapter converts the format of a service request and sends the converted service request to the target storage service. This enables one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface.
[0087] See also Figure 8 An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The method includes:
[0088] Step S310: Receive a service request through a target adapter among the multiple adapters, where the service request includes a storage type. The service request is a request sent by a container management system to an underlying module in the container storage interface. The target adapter is an adapter determined by the underlying module from the multiple adapters based on the storage type.
[0089] In an embodiment of the present application, after determining a target adapter from multiple adapters included in the adapter layer, the bottom module in the container storage interface sends a service request to the target adapter, and the target adapter in the adapter layer receives the service request.
[0090] Step S320: The target adapter performs format conversion on the service request to obtain a target service request, where the format of the target service request is a format supported by the target storage service.
[0091] In an embodiment of the present application, after the target adapter in the adapter layer receives a service request, in order to enable the target storage service to understand and process the service request, the target adapter converts the service request into a format according to a pre-saved format supported by the target storage service, thereby obtaining a target service request. At this time, the format of the target service request obtained is the same as the format supported by the target storage service, and the target storage service can understand and process the target service request.
[0092] Step S330: Send the target service request to the target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, and the response signal includes information about the structure of the target storage service.
[0093] In an embodiment of the present application, after receiving the target service request, the target adapter sends the target service request to the corresponding target storage service. When the target storage service receives the target service request, it performs storage space processing operations according to the target service request. After the target service request completes the storage space processing operations, the target storage space generates a response signal and returns the response signal to the container storage interface.
[0094] An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The multiple adapters are integrated in the adapter layer included in the container storage interface. The target adapter converts the format of a service request and sends the converted service request to the target storage service. This enables one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface.
[0095] See also Figure 9An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The method includes:
[0096] Step S410: Receive a service request through a target adapter among the multiple adapters, where the service request includes a storage type. The service request is a request sent by a container management system to an underlying module in the container storage interface. The target adapter is an adapter determined by the underlying module from the multiple adapters based on the storage type.
[0097] For details of step S410, please refer to the detailed explanation in the above embodiment, so it will not be described in detail in this embodiment.
[0098] Step S420: decrypting the encrypted passcode in the service request to obtain a decrypted passcode, where the passcode is a password for accessing the target storage service.
[0099] In an embodiment of the present application, when the storage service itself provides services to the outside through the ISCSI (Internet Small Computer System Interface) protocol, in order to prevent others from accessing the storage service, the user can set a pass password for the storage service in advance and save the pass password in the container management system. In order to prevent the pass password from being exposed in plain text in the container management system, the password is encrypted in advance using a set of encryption algorithms to obtain an encrypted pass password, where the pass password is the password used to access the storage service. Different storage services can set different pass passwords, and each encrypted pass password is saved in the container management system. When the container management system generates a service request, it obtains the encrypted passcode of the storage service corresponding to the storage type, and sends the encrypted passcode as part of the service request to the container storage interface. After determining the target adapter, the underlying module in the container storage interface sends the service request to the target adapter. The target adapter has a decryption algorithm. The target adapter uses the decryption algorithm to decrypt the encrypted passcode received in the service request to obtain the decrypted passcode. It can be known that the decrypted passcode is the passcode corresponding to the target storage service. The decryption operation of the encrypted passcode is completed. At this time, the target adapter obtains the passcode required to access the target storage service, indicating that the target adapter is allowed to access the target storage service.
[0100] As a way, since different encrypted pass passwords correspond to different storage services, and different storage services correspond to different storage types, it can be known that there is a correspondence between the encrypted pass password and the storage type. Therefore, the encrypted pass password can also be saved in the storage type. When the target adapter receives the service request sent by the underlying module, it obtains the encrypted pass password from the storage type included in the service request and decrypts the encrypted pass password.
[0101] Among them, the above decryption operation generally does not fail when the encrypted passcode has not been tampered with. If the encrypted passcode has been tampered with due to a network attack, the decryption operation will fail.
[0102] As a method, in addition to performing decryption operations, the target adapter also updates and obtains ACLs and storage volume information. Updating and obtaining ACLs is necessary when a container management system encounters a network partition. After a network partition, some workloads accessing the storage may be separated from the container management system's control system. The control system then launches new workloads. Concurrent workloads in both regions accessing the same storage space can corrupt the storage space. Therefore, an ACL mechanism is provided. Before a new workload uses the storage space, it updates the ACL, forcibly interrupting access to the old workload and preventing corruption. Obtaining storage space information is necessary to prevent storage resource leaks. If the service request received by the target adapter is a volume creation request, before sending the target service request to the target storage service to create the storage space, the target adapter first obtains storage space information to check whether the storage space corresponding to the volume creation request has already been created. If it has, to prevent the leakage of storage resources in the storage space, the target adapter does not convert the service request format and discards the service request. Of course, the target adapter is not limited to the above operations and can add functionality based on specific application scenarios.
[0103] Step S430: Determine a target storage interface associated with the target storage service.
[0104] In the embodiment of the present application, since the correspondence between different adapters and different storage services is pre-established in this solution, the target adapter can directly determine the corresponding target storage service, and then determine the target storage interface on the target storage service.
[0105] Step S440: converting the format of the service request through the target adapter to obtain the target service request.
[0106] For details of step S440, please refer to the detailed explanation in the above embodiment, so it will not be described in detail in this embodiment.
[0107] Step S450: sending the target service request to the target storage service via the target storage interface and the decrypted passcode, so that the target storage service returns a response signal to the container storage interface.
[0108] In an embodiment of the present application, after the target adapter determines the target storage interface on the target storage service, it sends the decrypted passcode to the target storage service for verification. If the target storage service successfully verifies the decrypted passcode, it indicates that the target adapter has the authority to access the target storage service. The target storage service sends a target service request to the target storage service through the target storage interface, so that the target storage service performs a storage space processing operation based on the received target service request. After the target storage service completes the storage space processing operation, it generates a response signal and returns the corresponding signal to the container storage interface. The process of the storage space processing operation can be referred to step S150, which will not be described in detail here.
[0109] An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The multiple adapters are integrated in the adapter layer included in the container storage interface. The target adapter converts the format of a service request and sends the converted service request to the target storage service. This enables one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface.
[0110] See also Figure 10 An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The method includes:
[0111] Step S510: Receive a service request through a target adapter among the multiple adapters, where the service request includes a storage type. The service request is a request sent by a container management system to an underlying module in the container storage interface. The target adapter is an adapter determined by the underlying module from the multiple adapters based on the storage type.
[0112] For details of step S510, please refer to the detailed explanation in the above embodiment, so it will not be described in detail in this embodiment.
[0113] Step S520: Acquire a target conversion format corresponding to the service request, where the target conversion format is a format pre-determined from a plurality of conversion formats supported by the target storage service.
[0114] In the embodiment of the present application, for any storage service, different service requests correspond to different conversion formats, and the conversion formats of the storage service are pre-stored in the corresponding adapter. When the target adapter receives a service request, it obtains the conversion format corresponding to the service request from the multiple conversion formats supported by the stored target storage service.
[0115] Obviously, since the target storage request has a supported conversion format corresponding to this type of service request, if the service request is format converted using a conversion format that does not correspond to the service request, the converted service request cannot be understood and processed by the target storage service.
[0116] Step S530: Based on the target conversion format, the service request is format-converted to obtain the target service request.
[0117] Step S540: Send the target service request to the target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, and the response signal includes information about the structure of the target storage service.
[0118] For details of step S540, please refer to the detailed explanation in the above embodiment, so it will not be described in detail in this embodiment.
[0119] An embodiment of the present application provides a format conversion method, which is applied to an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The multiple adapters are integrated in the adapter layer included in the container storage interface. The target adapter converts the format of a service request and sends the converted service request to the target storage service. This enables one container storage interface to connect to multiple storage services, thereby reducing the deployment and maintenance costs of the container storage interface.
[0120] See also Figure 11 The embodiment of the present application provides a format conversion device 600, which runs on a container storage interface, wherein the container storage interface is integrated with an adapter layer, and the device 600 includes:
[0121] The request receiving unit 610 is configured to receive a service request sent by the container management system.
[0122] The storage service determining unit 620 is configured to determine a target storage service from a plurality of storage services based on the storage type, where different storage types correspond to different storage services.
[0123] As a method, the storage service determination unit 620 is also used to initialize the global environment of the underlying module to obtain an initialized underlying module; based on the initialized underlying module, the service request is verified; if the verification passes, the target storage service is determined from the multiple storage services through the initialized underlying module, and the target storage service is determined by the initialized underlying module based on the storage type.
[0124] Optionally, the storage service determination unit 620 is further configured to obtain the environment configuration and environment variables of the container management system; and based on the environment configuration and the environment variables, initialize the global environment of the underlying module to obtain the initialized underlying module.
[0125] The adapter selection unit 630 is configured to determine a target adapter from a plurality of adapters included in the adapter layer based on the target storage service, where different storage services correspond to different adapters.
[0126] The format conversion unit 640 is configured to convert the format of the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service.
[0127] The request sending unit 650 is configured to send the target service request to the target storage service, so that the target storage service returns a response signal to the container storage interface, where the response signal includes information about the structure of the target storage service.
[0128] As a method, the request sending unit 650 is also used to receive a response signal sent by the target storage service, where the response signal is a signal generated by the target storage service in response to the received target service request; convert the format of the response signal through the target adapter to obtain a target response signal, where the format of the target response signal is a format supported by the container management system; and send the target response signal to the container management system so that the container management system performs volume processing operations based on the information on the structural composition of the target storage service included in the target response signal.
[0129] See also Figure 12 The embodiment of the present application provides a format conversion device 700, which runs on an adapter layer in a container storage interface. The adapter layer includes multiple adapters. The device 700 includes:
[0130] A request receiving unit 710 is configured to receive a service request through a target adapter among the multiple adapters, where the service request includes a storage type. The service request is a request sent by a container management system to an underlying module in the container storage interface. The target adapter is an adapter determined by the underlying module from among the multiple adapters based on the storage type.
[0131] As a method, the request receiving unit 710 is also used to decrypt the encrypted pass password in the service request to obtain the decrypted pass password, which is the password used to access the target storage service; and determine the target storage interface associated with the target storage service.
[0132] The format conversion unit 720 is configured to convert the format of the service request through the target adapter to obtain a target service request, where the format of the target service request is a format supported by the target storage service.
[0133] As a method, the format conversion unit 720 is further configured to perform format conversion on the decrypted service request through the target adapter to obtain the target service request.
[0134] The request sending unit 730 is configured to send the target service request to the target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, wherein the response signal includes information about the structure of the target storage service.
[0135] As a method, the request sending unit 730 is further configured to send the target service request to the target storage service via the target storage interface and the decrypted passcode, so that the target storage service returns a response signal to the container storage interface.
[0136] It should be noted that the device embodiment in this application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.
[0137] The following will be combined Figure 13 A vehicle provided in this application is described.
[0138] See also Figure 13 Based on the above-mentioned format conversion method and apparatus, the present application also provides another electronic device 800 that can perform the above-mentioned format conversion method. The electronic device 800 includes one or more (only one is shown in the figure) processors 802, a memory 804, and a network module 806 that are coupled to each other. The memory 804 stores a program that can execute the content of the above-mentioned embodiments, and the processor 802 can execute the program stored in the memory 804.
[0139] The processor 802 may include one or more processing cores. The processor 802 utilizes various interfaces and circuits to connect various components within the vehicle 800. It executes instructions, programs, code sets, or instruction sets stored in the memory 804 and accesses data stored in the memory 804 to perform various functions and process data on the server 800. Optionally, the processor 802 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 802 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 802 and may instead be implemented via a separate communications chip.
[0140] The memory 804 may include random access memory (RAM) or read-only memory (ROM). The memory 804 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 804 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the various method embodiments described below, and the like. The data storage area may also store data created by the vehicle 800 during use (such as a phone book, audio and video data, chat history data, etc.).
[0141] The network module 806 is used to receive and transmit electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices, such as communicating with an audio playback device. The network module 806 may include various existing circuit components for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, etc. The network module 806 can communicate with various networks such as the Internet, an enterprise intranet, a wireless network, or communicate with other devices via a wireless network. The above-mentioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 806 can exchange information with a base station.
[0142] Please refer to Figure 14 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 900 stores program code, which can be called by a processor to execute the method described in the above method embodiment.
[0143] The computer-readable storage medium 900 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 for executing any of the method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 910 can be compressed, for example, in a suitable form.
[0144] The embodiments of the present application provide a format conversion method, device, electronic device and storage medium. The method includes: receiving a service request sent by a container management system; determining a target storage service from a plurality of storage services based on the storage type; determining a target adapter from a plurality of adapters included in an adapter layer based on the target storage service; performing format conversion on the service request through the target adapter to obtain a target service request, the format of the target service request being a format supported by the target storage service; sending the target service request to the target storage service so that the target storage service returns a response signal to the container storage interface. Integrating multiple adapters in the adapter layer included in the container storage interface, performing format conversion on the service request through the target adapter, and sending the converted service request to the target storage service enables one set of container storage interfaces to connect to multiple storage services, thereby reducing the deployment cost and maintenance cost of the container storage interface.
[0145] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A format conversion method, characterized in that: Applied to a container storage interface, wherein an adapter layer is integrated in the container storage interface, the method comprises: receiving a service request sent by a container management system, wherein the service request includes a storage type; Based on the storage type, determining a target storage service from a plurality of storage services, where different storage types correspond to different storage services; Based on the target storage service, determining a target adapter from a plurality of adapters included in the adapter layer, wherein different storage services correspond to different adapters; Converting the service request into a format supported by the target storage service by the target adapter to obtain a target service request; The target service request is sent to the target storage service, so that the target storage service returns a response signal to the container storage interface, wherein the response signal includes information on the structure of the target storage service.
2. The method according to claim 1, characterized in that The container storage interface is also integrated with an underlying module; based on the storage type, a target storage service is determined from a plurality of storage services, including: Initializing the global environment of the underlying module to obtain an initialized underlying module; Based on the initialized underlying module, verify the service request; If the verification passes, a target storage service is determined from the multiple storage services by the initialized underlying module, and the target storage service is determined by the initialized underlying module based on the storage type.
3. The method according to claim 2, characterized in that Initializing the global environment of the base module to obtain the initialized bottom layer module includes: Obtaining the environment configuration and environment variables of the container management system; Based on the environment configuration and the environment variables, the global environment of the underlying module is initialized to obtain the initialized underlying module.
4. The method according to claim 1, characterized in that: After sending the target service request to the target storage service so that the target storage service returns a response signal to the container storage interface, the method further includes: Receiving a response signal sent by the target storage service, wherein the response signal is a signal generated by the target storage service in response to the received target service request; Converting the format of the response signal by the target adapter to obtain a target response signal, wherein the format of the target response signal is a format supported by the container management system; The target response signal is sent to the container management system, so that the container management system performs a volume processing operation based on information of a structure composition of the target storage service included in the target response signal.
5. A request format conversion method, characterized in that: An adapter layer applied to a container storage interface, the adapter layer comprising a plurality of adapters, the method comprising: Receiving a service request through a target adapter among the multiple adapters, the service request including a storage type, the service request being a request sent by a container management system to a bottom layer module in the container storage interface, and the target adapter being an adapter determined by the bottom layer module from the multiple adapters according to the storage type; The target adapter converts the service request into a format that is supported by the target storage service. The target service request is sent to the target storage service corresponding to the target adapter, so that the target storage service returns a response signal to the container storage interface, wherein the response signal includes information on the structure of the target storage service.
6. The method according to claim 5, characterized in that After receiving the service request through the target adapter among the plurality of adapters, the method further comprises: Decrypting the encrypted passcode in the service request to obtain a decrypted passcode, where the passcode is a password for accessing the target storage service; Determining a target storage interface associated with the target storage service; The step of sending the target service request to the target storage service corresponding to the target adapter so that the target storage service returns a response signal to the container storage interface includes: The target service request is sent to the target storage service through the target storage interface and the decrypted passcode, so that the target storage service returns a response signal to the container storage interface.
7. The method according to claim 5, characterized in that The step of converting the format of the service request based on the target adapter to obtain the target service request includes: Acquire a target conversion format corresponding to the service request, where the target conversion format is a format pre-determined from a plurality of conversion formats supported by the target storage service; Based on the target conversion format, the service request is format converted to obtain the target service request.
8. A format conversion device, characterized in that: Running on a container storage interface, wherein a plurality of adapters are integrated in the container storage interface, the device comprises: A request receiving unit, used for receiving a service request sent by the container management system; A storage service determining unit, configured to determine a target storage service from a plurality of storage services based on the storage type, wherein different storage types correspond to different storage services; An adapter selection unit, configured to determine a target adapter from a plurality of adapters included in the adapter layer based on the target storage service, wherein different storage services correspond to different adapters; A format conversion unit, configured to convert the format of the service request through the target adapter to obtain a target service request, wherein the format of the target service request is a format supported by the target storage service; The request sending unit is used to send the target service request to the target storage service, so that the target storage service returns a response signal to the container storage interface, and the response signal includes information on the structure of the target storage service.
9. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein one or more programs are stored in the memory and configured to be executed by the one or more processors to execute any one of the methods of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, wherein the program codes include instructions for executing the method according to any one of claims 1 to 7.