Data mounting method and device and electronic equipment

By processing the mount request of the target data set in the external container mount service, the security problem of directly mounting the file system in the container is solved, and higher data set mount control security is achieved.

CN119883499APending Publication Date: 2025-04-25SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411842612.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The direct mount of the file system in the container has the problem of low security in data set mount control.

Method used

Receive the access request from the target client through the container and send the request to the mount service. The target data set is mounted outside the container through the mount service and mapped it into the container, so that the container can receive the mapped data.

Benefits of technology

It avoids storing sensitive information about accessing target data sets in containers, separating the logical address of the data set from the physical storage method, providing a unified, safe and controllable data set mounting method, and improving the security of data set mounting control in programming environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883499A_ABST
    Figure CN119883499A_ABST
Patent Text Reader

Abstract

The invention discloses a data mounting method and device and electronic equipment. The method is applied to a container, and comprises the following steps: acquiring an access request initiated by a target client in the container; sending the access request to a mounting service so as to mount a target data set corresponding to the access request outside the container through the mounting service; receiving mapping data; the mapping data is obtained by mapping the mounted target data set into the container, so that the target data set corresponding to the access request is determined through the mounting service, the target data set is mapped to the container, it is avoided that sensitive information accessed by the target data set is stored in the container, and the safety of data set mounting control in the programming environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a data mounting method, device and electronic device. Background Art

[0002] With the development of science and technology, the application of container technology is becoming more and more extensive. Among them, container technology refers to the technology of effectively dividing the resources of a single operating system into isolated groups in order to balance the conflicting resource usage requirements between isolated groups. In the related technology, in the process of using containers to perform tasks, the file system is usually mounted in the container so that the container can obtain the required data from the file system; however, directly mounting the file system in the container has the problem of low security of data set mounting control. Summary of the invention

[0003] The present application proposes a data mounting method, device and electronic device to improve the above-mentioned problems.

[0004] In a first aspect, an embodiment of the present application provides a data mounting method, which is applied to a container, and the method includes: obtaining an access request, which is initiated by a target client in the container; sending the access request to a mounting service, so as to mount the target data set corresponding to the access request outside the container through the mounting service; receiving mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

[0005] In a second aspect, an embodiment of the present application provides a data mounting method, which is applied to a mounting service, and the method includes: receiving an access request sent by a container, wherein the access request is initiated by a target client in the container; mounting a target data set corresponding to the access request outside the container to map the target data set into the container so that the container obtains the mapping data.

[0006] In a third aspect, an embodiment of the present application provides a data mounting device, which is applied to a container, and the device includes: an access request acquisition module, an access request sending module, and a mapping data receiving module. Among them, the access request acquisition module is used to obtain an access request, and the access request is initiated by a target client in the container; the access request sending module is used to send the access request to the mounting service, so as to mount the target data set corresponding to the access request outside the container through the mounting service; the mapping data receiving module is used to receive mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

[0007] In a fourth aspect, an embodiment of the present application provides a data mounting device, which is applied to a mounting service, and the device includes: an access request receiving module and a data set mounting module. The access request receiving module is used to receive an access request sent by a container, and the access request is initiated by a target client in the container; the data set mounting module is used to mount the target data set corresponding to the access request outside the container, so as to map the target data set into the container, so that the container obtains the mapping data.

[0008] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes the data mounting method provided in the first aspect above.

[0009] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the data mounting method provided in the first aspect or the data mounting method provided in the second aspect.

[0010] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the data mounting method provided in the first aspect or the data mounting method provided in the second aspect.

[0011] The data mounting method, device and electronic device provided by the embodiments of the present application, the container receives an access request sent by a target client in the container, and sends the access request to a mounting service, so that the target data set corresponding to the access request is mounted outside the container through the mounting service, and the target data set is mapped to the container, so that the container receives the mapping data, avoids storing sensitive information of the target data set access in the container, and migrates the mounting service that executes the mounting of the data set outside the container, separates the logical address of the data set from the physical storage method, provides a unified, secure and controllable data set mounting method, and improves the security of data set mounting management in the programming environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.

[0013] Figure 1 A schematic diagram of a data mounting method according to an embodiment of the present application is shown;

[0014] Figure 2 A schematic diagram of a data mounting method according to an embodiment of the present application is shown;

[0015] Figure 3 A schematic diagram of a data mounting method according to an embodiment of the present application is shown;

[0016] Figure 4 A schematic diagram of a data mounting method according to an embodiment of the present application is shown;

[0017] Figure 5 A schematic diagram of a data mounting method according to an embodiment of the present application is shown;

[0018] Figure 6 A module block diagram of a data mounting device provided by an embodiment of the present application is shown;

[0019] Figure 7 A module block diagram of a data mounting device provided by an embodiment of the present application is shown;

[0020] Figure 8 A block diagram of an electronic device for executing a data mounting method according to an embodiment of the present application is shown;

[0021] Fig. 9 A storage unit for storing or carrying program codes for implementing the data mounting method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0023] With the development of computer technology, artificial intelligence technology has emerged. In the field of artificial intelligence technology, tasks can be performed through containers. Among them, in the process of using containers to perform tasks, the file system is usually mounted in the container, and the container obtains the required data from the file system. However, directly mounting a data set in a user programming environment (such as docker / K8s and other environments) requires saving the private information of the file system (such as the account password of the file system) in the user environment, or requires complex permission settings on the server side. There are problems such as high complexity of container management of data sets, and many file systems are not universal or feasible in containers. In addition, in the process of applying data sets in containers, users need to understand the storage location and storage method of data sets, which restricts the storage method and storage location of data sets, and brings great constraints to the performance and reliability optimization of containers. Therefore, in the related technology, there is a problem of low security in the management and control of container mounted data sets.

[0024] In response to the above problems, the inventors have discovered after long-term research and proposed the data mounting method, device and electronic device provided in the embodiments of the present application. The container receives an access request sent by a target client in the container and sends the access request to a mounting service, so that the target data set corresponding to the access request is mounted outside the container through the mounting service, and the target data set is mapped to the container, so that the container receives the mapping data, avoiding the storage of sensitive information of the target data set access in the container, and migrating the mounting service that executes the mounting of the data set outside the container, separating the logical address of the data set from the physical storage method, providing a unified, secure and controllable data set mounting method, and improving the security of data set mounting management in the programming environment.

[0025] In order to better understand the solutions of the embodiments of the present application, the technical terms used in the embodiments of the present application are explained below.

[0026] Docker is an open source containerization platform that allows developers to package applications and their dependencies into a lightweight, portable container and then run the container on any machine that supports Docker.

[0027] Kubernetes is an open source container orchestration system for automating the deployment, expansion, and management of containerized applications. It provides a framework for running distributed systems that can seamlessly expand and manage container applications across host clusters.

[0028] Pod is a basic concept in Kubernetes cluster. It represents a process running on the cluster and is the smallest deployment unit in Kubernetes. A Pod can encapsulate one or more containers. These containers share network and storage resources and are always scheduled and run together in a shared context.

[0029] A container is a lightweight, portable, self-sufficient software runtime environment. Containers allow software and its dependencies to run on any platform that supports containers, without having to consider the underlying infrastructure. Docker is a popular containerization platform.

[0030] Clients are applications used by users to interact with servers to obtain data or services. For example, email clients, instant messaging software, etc. Clients can run in containers.

[0031] Mount service, the agent program that executes the mount service in the container, is the process of connecting a storage device or a file system to a directory structure of the file system in the operating system.

[0032] Mounting is the process by which the operating system makes computer files and directories on a storage device accessible to users through the computer's file system.

[0033] Mount propagation is a feature in the Linux kernel that defines the relationship between mount objects and determines how mount events are propagated from one mount object to other mount objects. In this embodiment, mount propagation can be understood as mounting a file system or a mount directory outside the container to the application inside the container.

[0034] A mount request refers to an operation in a computer system, especially an operating system, that requests to associate a storage device or a file system with the file directory structure of the system. It is a mechanism for managing storage resources in the operating system, allowing users and applications to access different storage devices and file systems. Among them, the access request in this embodiment can be understood as a file system mount request, that is, the user or application sends a request to the operating system to mount a storage device or a remote file system to a specific directory so that its content can be accessed.

[0035] Physical systems refer to hardware devices used to store large amounts of data and the systems they constitute, which can be simple hard drives or complex data centers. In this application, physical systems can be understood as physical systems that store data sets.

[0036] MountProxy is a proxy server or service used to mount or connect to remote file systems or storage resources.

[0037] Local FS (Local File System) refers to the local file system, which is a file system stored on the local disk of the computer and can be directly accessed and managed by the operating system.

[0038] NFS (Network File System) is a distributed file system protocol that allows different computer systems to share files over the network.

[0039] S3 (Simple Storage Service) is an object storage service that provides high scalability, data availability, security, and performance. S3 allows users to store and retrieve any amount of data through a Web service interface. It is suitable for a variety of scenarios such as data lakes, websites, mobile applications, backup and recovery, archiving, enterprise applications, IoT devices, and big data analysis.

[0040] The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0041] See also Figure 1 , Figure 1 The flowchart of the data mounting method provided by an embodiment of the present application is shown. The data mounting method container migrates the mounting service for executing the mounting data set outside the container, separates the logical address of the data set from the physical storage method, avoids storing sensitive information accessed by the target data set in the container, provides a unified and flexible data set mounting method, and improves the security of data set mounting management in the programming environment. In a specific embodiment, the data mounting method can be applied to Figure 6 The data mounting device 200 and the electronic device 100 equipped with the data mounting device 200 are shown. Figure 8 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment may include a server, a computer, a tablet computer and other devices, which are not limited here; wherein, the electronic device can be understood as a platform supporting a container, wherein the data mounting method provided in this embodiment can be applied to the electronic device supporting the container, wherein the container may include one or more clients, and a mounting service may be set outside the container. Figure 1 The process shown is described in detail, and the data mounting method may specifically include the following steps:

[0042] Step S110: obtaining an access request, where the access request is initiated by a target client in the container.

[0043] In some embodiments, the electronic device is a platform supporting a container, wherein the container may include one or more running clients, and a mount service is provided outside the container. The client running in the container may send an access request to the container, and the access request may be used to indicate the client's intention to access data in the data set corresponding to the access request, or may instruct the container to mount a file system or a mount directory for the client through a mount service provided outside the container; wherein, in this embodiment, the access request may be understood as a mount request.

[0044] The container may obtain an access request sent by a target client. The target client may be any one of one or more clients running in the container. The target client may send an access request to the container to request the container to mount a data set.

[0045] The access request may carry the name of the dataset requested to be mounted, the logical address of the dataset requested to be mounted, the dataset operation permissions of the target client, and the usage agreement for the target client to use the data, etc., which are not limited here.

[0046] Optionally, the target client can generate an access request when it is started and send it to the container, so that the target client can automatically mount the data set when it is turned on, thereby improving the user experience. The target client can also receive a mount instruction input by the user. Accordingly, the target client can generate an access request in response to the mount instruction and send it to the container, so as to mount the data set according to the user's needs, thereby improving the accuracy and flexibility of data set mounting. The business in the target client can also generate an access request and send it to the container, so as to improve the flexibility of data set mounting.

[0047] The services in the target client may include applications or front-end pages. The application in the target client may send an access request to the container when it is turned on, or may generate and send an access request to the container in response to a mount instruction input by the user when receiving the mount instruction. The front-end page in the target client may also send an access request to the container when the browser corresponding to the front-end page is turned on, so as to mount the data set in advance on the front-end page, facilitate the user's access to the data set, improve the efficiency of the user's access to the data set, and improve the user's experience.

[0048] Step S120: Send the access request to the mounting service, so that the target data set corresponding to the access request is mounted outside the container through the mounting service.

[0049] In some implementations, after receiving the access request sent by the target client, the container may send the access request to the mounting service, so that the target data set corresponding to the access request is mounted outside the container through the mounting service.

[0050] The access request may include the logical address of the target data set. Accordingly, the mount service may obtain the logical address of the target data set carried in the access request, and may check whether there is a data set in the physical system storing the data set according to the logical address. If there is, the data set may be determined as the target data set. The target data set may include LocalFS, NFS, S3, etc., which are not limited here.

[0051] After the mount service determines the target data set, it can determine whether the target client corresponding to the access request has the operation permission for the target data set according to the access request. If so, it can map the target data set to the container according to the storage protocol and location adopted by the target data set in the physical system, so that the target client in the container has the access permission for the target data set. The container can propagate the data in the target data set to the container through the mount propagation method based on the external mount service, or it can propagate the directory of the target data set to the target data set through the mount propagation method based on the external mount service.

[0052] In some embodiments, after receiving the access request sent by the target client, the container may generate a proxy request corresponding to the access request. The container may determine the logical address of the data set requested by the target client based on the received access request, and may generate a proxy request corresponding to the access request based on the logical address, so as to instruct the mount service set outside the container to determine the data set based on the logical address through the proxy request, and map the data set to the container, so as to allow the target client to access the data set.

[0053] In some embodiments, after the container generates a proxy request corresponding to an access request, the proxy request can be sent to a mounting service set outside the container to determine the target data set corresponding to the access request through the mounting service, and map the target data set to the container to avoid storing sensitive information accessed by the target data set in the container.

[0054] For example, see Figure 2 , which shows a flow chart of a data mounting method provided by an embodiment of the present application. Among them, the target client running in the container can send an access request to the container. Among them, the business in the target client can send an access request to the container; among them, the business in the target client can include an application program and can also include a front-end page, so that the container can mount multiple data sets to the container based on a unified data set mounting method, thereby improving the flexibility and scalability of data set mounting.

[0055] Accordingly, the container can generate a proxy request corresponding to the access request based on the received access request and send it to the mounting service. Accordingly, the mounting service can respond to the proxy request, determine the target data set corresponding to the access request, and map the target data set to the container to avoid storing sensitive information about the target data set access in the container, thereby improving the security and controllability of data set mounting management, so that users can use the target data set in the container, improving the user experience.

[0056] In this embodiment, the user can use the services included in the container. When the user needs to access an inaccessible data set in the container during the service, the data set can be mounted on the container to enable the user to access the data set. During the process of mounting the data set in the container, the container can receive an access request sent by the service used by the user, generate a proxy request corresponding to the access request, and send the proxy request to the mounting service set outside the container. The access request can carry the logical address of the data set accessed by the service request used by the user; accordingly, the mounting service can execute the proxy request, determine the data set corresponding to the access request, and determine the data set as the target data set. The mounting service can also determine whether the target data set exists in the physical system storing the data set based on the logical address carried in the access request; the mounting service can also determine whether the service used by the user has the authority to operate the target data set based on the mounting service. When the mounting service determines that the target data set exists in the physical system and the service used by the user has the authority to operate the target data set, the target data set can be mounted outside the container according to the storage protocol and storage location adopted by the target data set in the physical system to avoid storing sensitive information accessed by the target data set in the container. Accordingly, the mount service can propagate the target data set to the container through the mount propagation method, so that the business used by the user in the container has the access right to the target data set. Accordingly, the container can be understood as the place where the business uses the target data set, so that the data set is mounted through the mount service, and the logical address of the data set is decoupled from the storage method and storage location of the specific file system, so that the data set can be migrated and optimized without changing the user access method, thereby improving the user experience.

[0057] Step S130: receiving mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

[0058] In some implementations, after the mount service mounts the target data set outside the container, the mounted target data set may be mapped into the container, and accordingly, the container may receive mapping data. The mapping data may be obtained by mapping the mounted target data set into the container; the mapping data may be understood as the content in the target data set. Accordingly, the container may read the data corresponding to the access request in the mapping data.

[0059] In a data mounting method provided by an embodiment of the present application, a container receives an access request sent by a target client in the container, and sends the access request to a mounting service, so that a target data set corresponding to the access request is mounted outside the container through the mounting service, and the target data set is mapped to the container, so that the container receives the mapping data, thereby avoiding storing sensitive information of the target data set access in the container, and migrating the mounting service that executes the mounting of the data set outside the container, separating the logical address of the data set from the physical storage method, providing a unified, secure and controllable data set mounting method, and improving the security of data set mounting management in the programming environment.

[0060] In some embodiments, the mounting service can map the mounted target data set into the container so that the container obtains the mapping data. Accordingly, the container can read the data corresponding to the access request in the mapping data. Optionally, the container can receive a data read instruction sent by a business in the target client, and can respond to the instruction to read the data corresponding to the data read instruction in the mapping data; and can send the data to the business to avoid setting read and write permissions in the target data set, so as to enable the business to read the data in the mounted target data set, thereby ensuring the feasibility of the user reading the data in the target data set and improving the user experience.

[0061] Exemplarily, the access request received by the container may be sent to the container by the business in the target client. Accordingly, the container executes the access request based on the access request through the mounting service set outside the container, and after mounting the target data set corresponding to the access request outside the container, the container may also receive the data reading instruction sent by the business. Among them, the data reading instruction may be used to represent that the business reads data from the target data set, and the data reading instruction may also be used to instruct the container to obtain the data in the target data set and send the data to the business. Optionally, the data reading instruction may carry the data storage address and may also include the data reading amount. Accordingly, the container may obtain the data corresponding to the data storage address from the target data set based on the data storage address carried in the data reading instruction, and use the data as the first data; the container may also determine to obtain the data corresponding to the data reading amount from the target data set based on the data reading amount carried in the data reading instruction, and use the data as the first data; the container may also obtain the data corresponding to the data storage address and the data reading amount from the target data set based on the data storage address and the data reading amount carried in the data reading instruction, and use the data as the first data.

[0062] After the container obtains the first data corresponding to the data reading instruction from the target data set, the container can send the first data to the business corresponding to the data reading instruction. Figure 3, which shows a flow chart of the data mounting method provided by an embodiment of the present application. Among them, the business in the target client in the container can send an access request to the container, the container can accept the access request and generate a proxy request corresponding to the access request, and send the proxy request to the mounting service set outside the container, and the mounting service executes the access request, and mounts the target data set corresponding to the access request outside the container through the mounting service, and maps the target data set to the container to obtain the mapping data. Correspondingly, after the target data set is mounted outside the container, the container can also receive the data reading instruction sent by the business, and can obtain the first data corresponding to the data reading instruction from the target data set, and can send the first data to the business, so as to realize the business to read the data in the mounted target data set, thereby ensuring the feasibility of the user to read the data of the target data set and improving the user experience.

[0063] In some implementations, the access request received by the container may be sent to the container by a service in the target client. Accordingly, the container executes the access request based on the access request through a mount service set outside the container, and after mounting the target data set corresponding to the access request outside the container, the container may also receive a data write instruction sent by the service.

[0064] The data write instruction can be used to represent the purpose of the business to write data to the target data set, and the data write instruction can also be used to instruct the container to write data to the target data set. The data write instruction can carry the second data and can also include a data storage address. Optionally, the container can parse the received data write instruction, obtain the second data carried in the data write instruction, and write the second data to the target data set; the container can also parse the data write instruction, obtain the second data and the data storage address carried in the data write instruction, and write the second data to the location corresponding to the data storage address in the target data set.

[0065] For example, see Figure 4, which shows a flow chart of the data mounting method provided by an embodiment of the present application. Among them, the business in the target client in the container can send an access request to the container, the container can receive the access request and generate a proxy request corresponding to the access request, and send the proxy request to the mounting service set outside the container, and the mounting service executes the access request, and mounts the target data set corresponding to the access request outside the container through the mounting service, and maps the target data set to the container to obtain the mapping data. Correspondingly, after the target data set is mounted outside the container, the container can also receive the data write instruction sent by the business, and can obtain the second data according to the data write instruction, and write the second data to the target data set, so as to realize the business to write data to the target data set mounted on the container, which ensures the feasibility of the user to write data to the target data set and improves the user experience.

[0066] See also Figure 5 , Figure 5 FIG. 1 is a flow chart of a data mounting method provided by an embodiment of the present application. In a specific embodiment, the data mounting method can be applied to Figure 7 The data mounting device 300 and the electronic device 100 equipped with the data mounting device 300 are shown. Figure 8 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment may include a server, a computer, a tablet computer and other devices, which are not limited here; wherein, the electronic device may support a mounting service, and the data mounting method provided in this embodiment is applied to an electronic device that supports the mounting service. The mounting service may be set outside a container, and the container may include one or more clients. Figure 5 The process shown is described in detail, and the data mounting method may specifically include the following steps:

[0067] Step S210: receiving an access request sent by a container, where the access request is initiated by a target client in the container.

[0068] In some implementations, an electronic device supporting a mount service may be understood as a mount server, wherein the mount service is provided outside a container; the container may include one or more running clients; the mount service may be used to receive an access request sent by the container. The access request may be initiated by a target client in the container, and the target client may be any one of the one or more clients.

[0069] In some embodiments, after receiving the access request sent by the target client, the container can generate a proxy request corresponding to the access request based on the access request, and can send the proxy request to the mounting service; accordingly, the mounting service can receive the proxy request and execute the access request. Among them, the mounting service can determine the target data set according to the access request and mount the target data set outside the container. Optionally, the access request can carry the name of the target data set, the logical address of the target data set, and the operation permission information of the target client.

[0070] As an implementable manner, the mounting service can parse the access request, obtain the name of the target data set carried in the access request, and determine, based on the name, a data set corresponding to the name from the physical system storing the data set as the target data set; wherein, if the mounting service does not detect the existence of data corresponding to the name in the physical system storing the data set, it can be determined that the target data set does not exist in the physical system storing the data set.

[0071] As another practicable method, the mount service may also parse the access request, obtain the logical address of the target data set carried in the access request, and determine the data set corresponding to the logical address from the physical system storing the data set as the target data set according to the logical address; wherein, if the mount service does not detect that the physical system storing the data set has a data set corresponding to the logical address, it can be determined that the physical system storing the data set does not have the target data set. Optionally, the mount service may also determine the location of the target data set according to the logical address of the target data set carried in the access request, and mount the target data set corresponding to the location outside the container.

[0072] Among them, the physical system storing the data set may include one or more storage clusters. Accordingly, the target data set corresponding to the access request may exist in the physical system storing the data set, or may not exist. In this embodiment, the mount service determines the target data set in the physical system based on the name or logical address of the target data set carried in the access request to mount the data set, thereby decoupling the logical address of the data set from the storage method and storage location of the specific file system. Under the premise of keeping the user access method unchanged, the data set can be migrated, optimized, etc., thereby improving the versatility of the mounted data set.

[0073] In some implementations, the target data set may include at least one of a local file system LocalFS, a network file system NFS, and a simple storage service system S3. Different target data sets can be mapped outside the container through a mount service, so that users can access the target data sets through a unified access policy, thereby improving the scalability and flexibility of the data sets mounted to the container.

[0074] Step S220: Mount the target data set corresponding to the access request outside the container to map the target data set into the container, so that the container obtains the mapping data.

[0075] In some embodiments, after the mount service determines the target data set corresponding to the access request, the target data set can be mounted outside the container to avoid storing sensitive information accessed by the target data set in the container. Exemplarily, the mount service mounts a data set (such as LocalFS, NFS, S3, etc.) for the container outside the container (such as docker, POD, etc.) based on the mount propagation method, avoiding the storage of sensitive information (such as S3 account password) in the container, avoiding the security risks caused by the sensitive information accessed by the data set stored in the container, and improving the security and reliability of data set mounting. Among them, the mount service can map the target data set to the container in the process of mounting the target data set corresponding to the access request outside the container, so that the container obtains the mapped data.

[0076] In some embodiments, in the process of mounting a target data set outside a container, the target data set can be mounted outside the container according to the storage protocol and storage location adopted by the target data set in the physical system, and then propagated into the container by means of mounting propagation, thereby mapping the target data set to the container so that the container obtains the mapping data, thereby avoiding storing sensitive information accessed by the target data set in the container, and enabling the container to have access rights to the target data set, thereby avoiding setting permission control in the target data set, and thus achieving control over the operation permissions of the target data set, thereby improving the flexibility and versatility of data set mounting.

[0077] Among them, after the target data set is mounted outside the container, the business of the target client in the container can read data from or write data to the target data set, thereby improving the user experience.

[0078] In a data mounting method provided by an embodiment of the present application, a mounting service receives an access request sent by a container, wherein the access request is initiated by a target client in the container, and mounts a target data set corresponding to the access request outside the container to map the target data set into the container so that the container obtains the mapping data, thereby migrating the mounting service for executing the mounted data set outside the container, avoiding the storage of sensitive information of the target data set access in the container, and separating the logical address of the data set from the physical storage method, thereby providing a unified, secure, and controllable data set mounting method, and improving the security of data set mounting management in a programming environment.

[0079] In some implementations, an access request may be sent by a service in a target client to a container; accordingly, the access request may carry the operation authority corresponding to the service, or may carry the resource consumption corresponding to the service. In the process of mounting the target data set outside the container, the mounting service may parse the access request to obtain the operation authority corresponding to the service that sent the access request, or may parse the access request to obtain the resource consumption of the service that sent the access request.

[0080] Among them, if the mounting service detects that the operation permissions corresponding to the business include permissions to operate the target data set, the target data set can be mounted outside the container, thereby detecting the fine-grained permissions of the business to access the data set before mounting the data set, thereby improving the flexibility, controllability and security of data set mounting management.

[0081] The mounting service may obtain the protocol for use of the data corresponding to the business according to the operation authority corresponding to the business, and may obtain the protocol for use of the data corresponding to the target data set. Accordingly, if the mounting service determines that the protocol for use of the data set corresponding to the business includes the protocol for use of the data corresponding to the target data set, it may be determined that the operation authority corresponding to the business includes the authority to operate the target data set.

[0082] The mounting service can obtain the historical records of the business accessing the data set according to the operation permissions corresponding to the business. Accordingly, if the mounting service determines that the historical records contain the business accessing the target data set, it can determine that the operation permissions corresponding to the business include the permissions to operate the target data set.

[0083] Among them, if the mounting service detects that the resource consumption of the business is less than or equal to the preset resource consumption, the target data set can be mounted outside the container, thereby detecting the resource consumption of the business before mounting the data set, thereby improving the flexibility, controllability and security of data set mounting management.

[0084] Among them, the preset resource consumption can be pre-set in the mounting service, or it can be obtained by the mounting service from the associated cloud or electronic device; exemplarily, the preset resource consumption is 20G, 25G, etc., which is not limited here. Among them, if the mounting service detects that the resource consumption of the business is greater than the preset resource consumption, it can be determined that the business does not have the ability to use the target data set. Correspondingly, the mounting service can generate a prompt message to the container, and the container sends the prompt message to the business; wherein, the prompt message can be used to prompt the business resource consumption to exceed the preset resource consumption, and can also be used to prompt the user to clean up the content of the business. Correspondingly, the mounting service can also mount the target data set outside the container when it detects that the resource consumption of the business is less than or equal to the preset resource consumption. Among them, the business resource consumption exceeding the preset resource consumption can be understood as the business resource consumption is too large, and it does not have the ability to read the data of the data set or write data to the data set, thereby improving the feasibility of data set mounting.

[0085] See also Figure 6 , Figure 6 The module block diagram of the data mounting device provided by an embodiment of the present application is shown. The module 200 of the data mounting device can be applied to the electronic device supporting the container mentioned above, and the data mounting device 200 includes: an access request acquisition module 210, an access request sending module 220 and a mapping data receiving module 230, wherein:

[0086] The access request acquisition module 210 is used to acquire an access request, where the access request is initiated by a target client in the container.

[0087] The access request sending module 220 is used to send the access request to the mounting service, so as to mount the target data set corresponding to the access request outside the container through the mounting service.

[0088] The mapping data receiving module 230 is used to receive mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

[0089] Furthermore, the data mounting device 200 may also include: a data reading unit, wherein:

[0090] A data reading unit is used to read data corresponding to the access request in the mapping data.

[0091] See also Figure 7 , Figure 7The module block diagram of the data mounting device provided by an embodiment of the present application is shown. The module 300 of the data mounting device can be applied to the electronic device supporting the mounting service, and the data mounting device 300 includes: an access request receiving module 310 and a data set mounting module 320, wherein:

[0092] The access request receiving module 310 is used to receive an access request sent by a container, where the access request is initiated by a target client in the container.

[0093] The data set mounting module 320 is used to mount the target data set corresponding to the access request outside the container to map the target data set into the container so that the container obtains the mapping data.

[0094] Further, the access request is initiated by a service in the target client, and the data set mounting module 320 may include: an operation authority acquisition unit and a first mounting unit, wherein:

[0095] The operation authority obtaining unit is used to obtain the operation authority corresponding to the business.

[0096] The first mapping unit is configured to mount the target data set corresponding to the access request outside the container if the operation permission includes permission to operate the target data set.

[0097] Furthermore, the access request is initiated by a service in the target client, and the data set mounting module 320 may include: a resource consumption acquisition unit and a second mounting unit, wherein:

[0098] The resource consumption acquisition unit is used to acquire the resource consumption of the service.

[0099] The second mounting unit is used to mount the target data set corresponding to the access request outside the container if the resource consumption is less than or equal to a preset resource consumption.

[0100] Furthermore, the access request includes the logical address of the target data set, and the data set mounting module 320 may include: a location determination unit and a third mounting unit, wherein:

[0101] A location determination unit is used to determine the location of the target data set according to the logical address.

[0102] The third mounting unit is used to mount the target data set corresponding to the position outside the container.

[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0104] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0105] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0106] See also Figure 8 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device with processing capabilities such as a router, a tablet computer, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a processor 120, and one or more applications, wherein one or more applications may be stored in the processor 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the method described in the aforementioned method embodiment.

[0107] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the processor 120, and calling data stored in the processor 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0108] The processor 120 may include a random access memory (RAM) or a read-only memory (ROM). The processor 120 may be used to store instructions, programs, codes, code sets or instruction sets. The processor 120 may include a program storage area and a data storage area, wherein 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 following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.

[0109] See also Fig. 9 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 400 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0110] The computer readable storage medium 400 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. Optionally, the computer readable storage medium 400 includes a non-transitory computer-readable storage medium. The computer readable storage medium 400 has storage space for program code 410 that performs any 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 410 can be compressed, for example, in an appropriate form.

[0111] In some implementations, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the data mounting method in the embodiment of the present application is implemented.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data mounting method, characterized in that: Applied to a container, the method comprises: Obtaining an access request, where the access request is initiated by a target client in the container; Sending the access request to the mounting service, so as to mount the target data set corresponding to the access request outside the container through the mounting service; Receive mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

2. The method according to claim 1, characterized in that The method further comprises: The data corresponding to the access request in the mapping data is read.

3. A data mounting method, characterized in that: Applied to the mounting service, the method includes: receiving an access request sent by a container, where the access request is initiated by a target client in the container; The target data set corresponding to the access request is mounted outside the container to map the target data set into the container, so that the container obtains the mapping data.

4. The method according to claim 3, characterized in that The access request is initiated by a service in the target client, and mounting the target data set corresponding to the access request outside the container includes: Obtaining the operation authority corresponding to the business; If the operation permission includes permission to operate the target data set, the target data set corresponding to the access request is mounted outside the container.

5. The method according to claim 3, characterized in that: The access request is initiated by a service in the target client, and mounting the target data set corresponding to the access request outside the container includes: Obtaining resource consumption of the service; If the resource consumption is less than or equal to the preset resource consumption, the target data set corresponding to the access request is mounted outside the container.

6. A data mounting device, characterized in that: Applied to a container, the device comprises: An access request acquisition module, used to acquire an access request, wherein the access request is initiated by a target client in the container; An access request sending module, used to send the access request to a mounting service, so as to mount a target data set corresponding to the access request outside a container through the mounting service; The mapping data receiving module is used to receive mapping data; the mapping data is obtained by mapping the mounted target data set into the container.

7. A data mounting device, characterized in that: Applied to the mounting service, the device comprises: An access request receiving module, configured to receive an access request sent by a container, wherein the access request is initiated by a target client in the container; The data set mounting module is used to mount the target data set corresponding to the access request outside the container to map the target data set into the container so that the container obtains the mapping data.

8. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application 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 method according to any one of claims 1-5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 5.

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