Mounting method and device
By introducing an application grouping management mechanism in the NAS file storage system, the application grouping is determined based on the instance identification of the storage instance and the network identification of the packet client is obtained, which solves the problem of high operation and maintenance costs caused by frequent client IP changes, and realizes efficient and convenient client mounting and access.
Patent Information
- Application Number
- CN202010900303.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2040-08-31
AI Technical Summary
In the existing NAS file storage system, the client's IP changes frequently, resulting in the need to update the client's IP and storage instance configuration each time, which is time-consuming and labor-intensive and increases operation and maintenance costs.
By introducing an application grouping management mechanism on the storage server, the application grouping that is bound to it is determined based on the instance identification of the storage instance, and the network identity of the packet client in the application group is obtained to realize the client mounting and access.
Reduces the operation and maintenance cost of mounting storage instances by client, improves mount efficiency and convenience, and ensures that only grouping clients within the bound configuration application packet can mount access storage instances.
Smart Images

Figure CN112181933B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to a mounting method. One or more embodiments of this specification also relate to a mounting device, a computing device, and a computer-readable storage medium. Background Art
[0002] In NAS (Network Attached Storage) file storage systems, file or directory operations are all based on volumes. A NAS volume is called a file system instance, i.e., a storage instance. To ensure user data security, NAS file storage services currently provide a mount permission management method based on IP (Internet Protocol) granularity, that is, to configure each client's IP and storage instance to enable the client to mount and access the storage instance. However, many current application scenarios use a large number of ECS (Elastic Compute Service, cloud server, abbreviated as ECS) as clients, and ECS resources change frequently. Every time a new machine is added or an old machine is removed, the configuration between the client's IP and the storage instance needs to be updated, which is time-consuming and labor-intensive.
[0003] Therefore, it is necessary to provide a mounting method that can reduce operation and maintenance costs and improve the efficiency and convenience of mounting storage instances by clients. Summary of the invention
[0004] In view of this, the present specification provides a mounting method. One or more embodiments of the present specification also relate to a mounting device, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, a mounting method is provided, including:
[0006] Receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance;
[0007] Determine an application group that has a binding relationship with the storage instance based on the instance identifier, and obtain a network identifier of a group client in the application group;
[0008] In a case where the network identifier of the client matches the network identifier of the grouped client, the client is mounted to the storage instance.
[0009] Optionally, the determining, based on the instance identifier, an application group having a binding relationship with the storage instance includes:
[0010] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from the cache of the storage service client.
[0011] Optionally, the cache of the storage service client caches application groups that are bound to the storage instance within a preset time.
[0012] Correspondingly, determining the application group having a binding relationship with the storage instance from the cache of the storage service side based on the instance identifier includes:
[0013] When the cache time of the application group having a binding relationship with the storage instance in the cache of the storage service side is less than or equal to a preset time, the application group having a binding relationship with the storage instance is determined from the cache of the storage service side based on the instance identifier.
[0014] Optionally, determining, based on the instance identifier, from the cache of the storage service client, an application group having a binding relationship with the storage instance includes:
[0015] In the case where the cache time of the application group in the cache of the storage service client and having a binding relationship with the storage instance is greater than a preset time, the storage service client sends an application group acquisition request to the grouping platform, wherein the acquisition request carries the instance identifier;
[0016] An application grouping returned by the grouping platform and having a binding relationship with the instance identifier is received, and the application grouping is stored in a cache of the storage service client.
[0017] Optionally, before receiving the storage instance mount request from the client, the step further includes:
[0018] The storage service client receives a storage instance binding request from the grouping platform;
[0019] Binding the storage instance to the application group of the grouping platform based on the binding request, and establishing a configuration relationship table,
[0020] The configuration relationship table includes the binding relationship and permission relationship between the storage instance and the application group, and the association relationship between the application group and the group client.
[0021] Optionally, the determining, based on the instance identifier, an application group having a binding relationship with the storage instance includes:
[0022] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from a configuration relationship table of the cache of the storage service end.
[0023] Optionally, before the storage service client receives the storage instance binding request from the grouping platform, the process further includes:
[0024] The grouping platform receives an application grouping creation request from a user, wherein the creation request carries application information of the user and a grouping client corresponding to the application information;
[0025] An application group is created for the user based on the application information, and an association relationship is established between the application group and the group client.
[0026] Optionally, after establishing the association relationship between the application group and the group client, the method further includes:
[0027] An update instruction from the user for the application group is received, and based on the update instruction, adjustments are made to the application group and / or a group client associated with the application group.
[0028] Optionally, after mounting the client to the storage instance, the method further includes:
[0029] receiving an access request from the client to the storage instance;
[0030] In a case where the access request satisfies the permission relationship between the storage instance and the application group, the access request is processed based on the storage instance.
[0031] Optionally, after obtaining the network identifier of the group client in the application group, the method further includes:
[0032] In the case that the network identifier of the client does not match the network identifier of the grouped client, mount rejection information is returned to the client.
[0033] According to a second aspect of an embodiment of this specification, a mounting device is provided, including:
[0034] A first receiving module is configured to receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance;
[0035] A first determining module is configured to determine an application group having a binding relationship with the storage instance based on the instance identifier, and obtain a network identifier of a group client in the application group;
[0036] The mounting module is configured to mount the client to the storage instance when the network identifier of the client matches the network identifier of the grouped client.
[0037] Optionally, the first determining module is further configured to:
[0038] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from the cache of the storage service client.
[0039] Optionally, the cache of the storage service client caches application groups that are bound to the storage instance within a preset time.
[0040] Accordingly, the first determining module is further configured to:
[0041] When the cache time of the application group having a binding relationship with the storage instance in the cache of the storage service side is less than or equal to a preset time, the application group having a binding relationship with the storage instance is determined from the cache of the storage service side based on the instance identifier.
[0042] Optionally, the first determining module is further configured to:
[0043] In the case where the cache time of the application group in the cache of the storage service client and having a binding relationship with the storage instance is greater than a preset time, the storage service client sends an application group acquisition request to the grouping platform, wherein the acquisition request carries the instance identifier;
[0044] An application grouping returned by the grouping platform and having a binding relationship with the instance identifier is received, and the application grouping is stored in a cache of the storage service client.
[0045] Optionally, the device further includes:
[0046] A second receiving module is configured to receive a storage instance binding request from a grouping platform at the storage service end;
[0047] a first binding module, configured to bind the storage instance to the application group of the grouping platform based on the binding request, and to establish a configuration relationship table,
[0048] The configuration relationship table includes the binding relationship and permission relationship between the storage instance and the application group, and the association relationship between the application group and the group client.
[0049] Optionally, the first determining module is further configured to:
[0050] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from a configuration relationship table of the cache of the storage service end.
[0051] Optionally, the device further includes:
[0052] A third receiving module is configured to receive, by the grouping platform, a user's application group creation request, wherein the creation request carries the user's application information and the group client corresponding to the application information;
[0053] The group creation module is configured to create an application group for the user based on the application information and establish an association relationship between the application group and the group client.
[0054] Optionally, the device further includes:
[0055] The updating module is configured to receive an updating instruction from the user for the application grouping, and adjust the application grouping and / or a group client associated with the application grouping based on the updating instruction.
[0056] Optionally, the device further includes:
[0057] A fourth receiving module is configured to receive an access request from the client to the storage instance;
[0058] The processing module is configured to process the access request based on the storage instance if the access request satisfies the permission relationship between the storage instance and the application group.
[0059] Optionally, the device further includes:
[0060] The information return module is configured to return mount rejection information to the client when the network identifier of the client does not match the network identifier of the grouped client.
[0061] According to a third aspect of an embodiment of this specification, a computing device is provided, including:
[0062] Memory and processor;
[0063] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the steps of the mounting method are implemented when the processor executes the computer-executable instructions.
[0064] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the mounting method are implemented.
[0065] An embodiment of the present specification implements a mounting method and device, wherein the mounting method includes receiving a storage instance mounting request from a client, wherein the mounting request carries a network identifier of the client and an instance identifier of the storage instance; determining an application group that has a binding relationship with the storage instance based on the instance identifier, and obtaining a network identifier of a group client in the application group; and mounting the client to the storage instance when the network identifier of the client matches the network identifier of the group client;
[0066] The mounting method is based on a NAS storage instance mounting authentication mechanism at the application group granularity. Only when the client that issues the mounting request matches the group client in the application group bound to the NAS storage instance, the client can be authorized to mount and access the storage instance. When the group client in the application group is updated, the client that can mount and access the storage instance will also be updated accordingly, which greatly reduces the operation and maintenance cost and improves the efficiency and convenience of the client mounting the storage instance. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 is a specific processing flow chart of a mounting method provided by an embodiment of this specification;
[0068] Figure 2 is a flowchart of a mounting method provided by an embodiment of this specification;
[0069] Figure 3 It is a structural schematic diagram of a mounting device provided by an embodiment of this specification;
[0070] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0071] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0072] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0073] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0074] First, the terms involved in one or more embodiments of this specification are explained.
[0075] NAS: Network Attached Storage.
[0076] ECS: Elastic Compute Service, cloud server, referred to as ECS.
[0077] OPenAPI: Open API, also known as open platform, is a common application for service-oriented websites. The website service provider encapsulates its own website services into a series of APIs (Application Programming Interface) and opens them to the public.
[0078] Mount authentication: A mechanism by which the NAS server identifies whether the client is qualified to mount a storage instance.
[0079] Application grouping: A logical grouping of computing resources based on application dimensions, including information such as machine IP.
[0080] In this specification, a mounting method is provided. One or more embodiments of this specification simultaneously relate to a mounting device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0081] See also Figure 1 , Figure 1 A specific processing flow chart of a mounting method provided according to an embodiment of this specification is shown, including:
[0082] Step 1: Client 1, client 2, and client 3 send storage instance mount requests to the instance mount point of the storage service client respectively.
[0083] Among them, each mount request carries the network identifier of the corresponding client and the instance identifier of the storage instance to be mounted, wherein the network identifier of the client can be an IP identifier, for example, the network identifier of client 1 is IP1, the network identifier of client 2 is IP3, and the network identifier of client 3 is IP5.
[0084] In actual applications, the storage service end can be understood as the NAS server end, the storage instance can be understood as the NAS instance, and the NAS instance can be understood as a data disk. The client can read and write data and store data based on the NAS instance.
[0085] Step 2: The instance mount point of the storage service client obtains the application group corresponding to the instance identifier of the storage instance to be mounted and the group client in the application group from the cache of the storage service client based on the instance identifier of the storage instance to be mounted.
[0086] For example, if the instance identifier of the storage instance to be mounted of client 1 is bound to application group 1, then based on the instance identifier, application group 1 and group client 1 and group client 2 in the application group 1 can be obtained, wherein the network identifier of group client 1 is IP1 and the network identifier of group client 2 is IP2; if the instance identifier of the storage instance to be mounted of client 2 is bound to application group 2, then based on the instance identifier, application group 2 and group client 3 and group client 4 in the application group 2 can be obtained, wherein the network identifier of group client 3 is IP3 and the network identifier of group client 4 is IP4; if the instance identifier of the storage instance to be mounted of client 3 is bound to application group 3, then based on the instance identifier, application group 3 and group client 5 in the application group 3 can be obtained, wherein the network identifier of group client 5 is IP List.
[0087] Step 3: Match the network identifiers of client 1, client 2, and client 3 with the network identifiers of the grouped clients in application group 1, application group 2, and application group 3 to determine the mounting relationship between client 1 and the storage instance, and the mounting relationship between client 2 and the storage instance.
[0088] For details, see Figure 1 It can be seen that the network identifier of client 1 matches the network identifier of group client 1 in application group 1, the network identifier of client 2 matches the network identifier of group client 3 in application group 2, and the network identifier of client 3 does not match the network identifier of any group client. Therefore, it can be determined that client 1 and client 2 can both mount the NAS instance, but client 3 cannot mount the NAS instance.
[0089] In specific implementation, before determining the mounting relationship between the client and the NAS instance, it is also necessary to group the clients based on the specific application dimension. For example, user A has 100 clients. In specific applications, the user uses 20 of the clients for model training and the remaining clients for graphic classification. Then, according to these two specific application dimensions, the 100 clients can be divided into two application groups, that is, the first application group includes 20 clients and the second application group includes 80 clients, and each client has a unique IP identifier.
[0090] See also Figure 1 , Figure 1 The users in the application are divided into three application groups according to specific applications: application group 1, application group 2, and application group 3. Application group 1 includes group client 1 and group client 2. These two group clients can implement a specific application in actual applications, such as the above-mentioned model training. Application group 2 includes group client 3 and group client 4. These two group clients can implement another specific application in actual applications, such as the above-mentioned graphic classification. Application group 3 includes group client 5, and group client 5 can implement other specific applications in actual applications, such as query services.
[0091] When implementing it specifically, Figure 1 The mounting method is described in detail by taking a NAS instance as a storage instance. It is assumed that the user has created three application groups on a group platform (such as the Skyline platform): application group 1, application group 2, and application group 3. Application group 1 includes group client 1 and group client 2, application group 2 includes group client 3 and group client 4, and application group 3 includes group client 5. The user can perform operation and maintenance operations such as creation, update, and deletion of these application groups and group clients.
[0092] The user binds the above application groups that need to mount and access the NAS instance to the instance mount point, and configures the permission details for accessing the instance through this mount, such as retaining the native UID (User Identify, indicating the user identity unique identifier) / GID (Group Identify, indicating the group identity unique identifier) / SID (System Identifier, system identification code) permissions and allowing read and write access.
[0093] When multiple clients try to mount this NAS instance, the NAS server will actively obtain the IP information of the grouped clients in these application groups through the list of bound application groups on the instance mount point, and compare it with the IP of the client requesting the mount. If the client belongs to one or more bound application groups, it can successfully mount and access the data in the NAS instance. For example, Figure 1 Otherwise, the client mount request will be rejected, making it impossible for the client to access the data in the NAS instance. Figure 1 Client 3 in the figure; because of the short cache mechanism of the NAS server, when reviewing the client mount request, it will actively query the IP information of the group client in the bound application group. Therefore, even if the group client in the application group changes, that is, when the user updates the group client in the application group, the NAS server can also perceive these changes in real time, thereby realizing the unification of instance mount access management and application group resource management.
[0094] In actual applications, users only need to bind one or more application groups that need to be authorized to mount and access the storage instance to the instance mount point through the console or OPenAPI interface. Conversely, when revoking the mount access permission of a certain application group to the storage instance, you can also directly delete it through the OPenAPI interface.
[0095] The mounting method provided in the embodiments of this specification relies on various application groups to associate specific applications, application groups and NAS storage instances, and unifies the management of group clients within the application group and the clients that can mount and access the NAS instance. Users only need to manage each application group and the group clients in each application group, which greatly improves the efficiency of customers using NAS resources while also ensuring data security.
[0096] In actual applications, each user may have multiple clients, and if each client wants to access the NAS instance, each client needs to establish a binding relationship and a permission relationship with the NAS. When a user adds a new client or deletes a client, it is necessary to establish a binding relationship or unbind the binding relationship with the NAS through OpenAPI or log in to the console to update the configuration. Especially when the number of clients is large and the changes are frequent, the entire operation will be more complicated, the subsequent maintenance burden will be heavy, and the operation and maintenance management cost will be greatly increased. By adopting the mounting method provided in the embodiment of this specification, the user can group the clients according to the application dimension, each application group corresponds to a batch of clients, and then establish a binding relationship between each application group and the NAS instance to achieve mounting and access. Then, when a client needs to mount the NAS instance, the user only needs to add the client to the corresponding application group, and the client can be mounted on the NAS instance without installing additional tools. Similarly, when the user determines that a client can no longer mount the NAS instance, the client can be removed from the corresponding application group, which will not affect the NAS instance mounting of other clients in the application group.
[0097] See also Figure 2 Figure 2 A flowchart of a mounting method provided according to an embodiment of the present specification is shown, comprising the following steps:
[0098] Step 202: Receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance.
[0099] The client includes but is not limited to computers, mobile phones, etc.; the storage instance includes but is not limited to NAS instance. In practical applications, the NAS instance can be understood as a data disk where users store data; and mounting can be understood as establishing a connectivity relationship between the client and the storage instance.
[0100] Specifically, there are one, two or more clients, and the storage instances targeted by each client can be the same or different, which can be set according to actual needs. For example, there are three clients, and the mount request of the first client is for storage instance A, and the mount requests of the second client and the third client are for storage instance B; or the mount requests of these three clients are for different storage instances. For ease of understanding, the following examples are all described in detail by taking a client making a mount request for a storage instance as an example.
[0101] In specific implementation, receiving a storage instance mount request from a client can be understood as the storage service client receiving a mount request from the client for a storage instance, wherein the mount request carries a unique network identifier of the client and a unique instance identifier of the storage instance.
[0102] In actual applications, if the mounting method is applied to a NAS file storage system, the storage service end may be a NAS server end.
[0103] Specifically, the network identifier of the client and the instance identifier of the storage instance may include a unique identifier generated by numbers, words and / or special characters, etc. Each client has a unique network identifier, and each storage instance also has a unique instance identifier.
[0104] In another embodiment of the present specification, before receiving the storage instance mount request from the client, the method further includes:
[0105] The storage service client receives a storage instance binding request from the grouping platform;
[0106] Binding the storage instance to the application group of the grouping platform based on the binding request, and establishing a configuration relationship table,
[0107] The configuration relationship table includes the binding relationship and permission relationship between the storage instance and the application group, and the association relationship between the application group and the group client.
[0108] Specifically, the grouping platform creates application groups for the users based on the application dimensions of the users, and configures a corresponding grouping client for each application group.
[0109] During specific implementation, the storage service client establishes a TCP (TCP, Transmission Control Protocol) connection with the group platform. After the connection is established, the storage service client receives a storage instance binding request from the group platform, wherein the binding request includes the association relationship and permission relationship between the application group of the group platform and the storage instance of the storage service client; the storage service client binds the storage instance to the application group in the group platform based on the binding request, and establishes a configuration relationship table.
[0110] For example, the group platform includes application group A and application group B. The storage instance binding request of the group platform indicates that application group A is bound to storage instance A, and application group A can read and write data to storage instance A, and application group B is bound to storage instance B, and application group B can read and store data to storage instance B. Application group A corresponds to group client A1 and group client A2, and application group B corresponds to group client B1 and group client B2. After the storage instance is bound to the application group of the group platform based on the binding request, the established configuration relationship table is shown in Table 1:
[0111] Table 1
[0112]
[0113] Among them, the storage instances A and B in Table 1 each have a unique instance identifier, the application groups A and B each have a unique group identifier, and the group clients A1, A2, B1, and B2 each have a unique network identifier. Table 1 clearly shows the relationship between storage instances, application groups, mount permissions, and group clients.
[0114] In specific implementation, each storage instance of the storage service client corresponds to an instance mount point, and the binding of the application group and the storage instance can be regarded as the binding of the application group and the instance mount point corresponding to each storage instance.
[0115] In the embodiments of the present specification, the application grouping created by the grouping platform according to the user's application scenario is pre-bound to the storage instance of the storage service side. In the subsequent case where a client needs to mount the storage instance, when it is necessary to determine whether the client is a grouped client in the application group bound to the storage instance, the storage service side can clearly determine whether the client can mount the storage instance, thereby greatly improving the convenience of mounting.
[0116] In another embodiment of the present specification, before the storage service client receives the storage instance binding request from the grouping platform, the further step includes:
[0117] The grouping platform receives an application grouping creation request from a user, wherein the creation request carries application information of the user and a grouping client corresponding to the application information;
[0118] An application group is created for the user based on the application information, and an association relationship is established between the application group and the group client.
[0119] The application information includes but is not limited to application scenarios, such as training scenarios, data processing scenarios, graphic classification scenarios, etc., which are specifically related to the actual scope of the user.
[0120] Specifically, the user sends an application group creation request to the grouping platform, which carries the user's application information and the group client corresponding to each application information; after receiving the above content, the grouping platform creates an application group for the user based on the application information, and then associates the group client corresponding to each application information with the application group.
[0121] For example, if the user's actual application scenarios are training scenarios and data processing scenarios, during the specific implementation, the user allocates 20 group clients for the training scenario for model training, and the user allocates 50 group clients for the data processing scenario for data processing. Then, after receiving the user's application group creation request, the group platform creates two application groups for the user, one for the training application group and the other for the data processing application group, and then associates the 20 group clients allocated to the above training scenario with the training application group, and associates the 50 group clients allocated to the above data processing scenario with the data processing application group.
[0122] In the embodiments of this specification, the grouping platform first creates a coarse-grained application grouping for the user based on the user's application dimension, and then establishes an association between the application grouping and the grouping client. Subsequently, the user only needs to maintain the application grouping and the grouping client in the application grouping based on the grouping platform, which greatly improves the efficiency and convenience of the user in using NAS resources.
[0123] In a specific implementation, after establishing the association relationship between the application group and the group client, the method further includes:
[0124] An update instruction from the user for the application group is received, and based on the update instruction, adjustments are made to the application group and / or a group client associated with the application group.
[0125] Among them, update instructions include but are not limited to modification, deletion, and addition instructions. That is, after the grouping platform creates an application group for the user, it can also modify, delete or add the application group or the group client in the application group after receiving the user's update instruction, which greatly improves the flexibility of maintenance and enhances the user experience.
[0126] Step 204: Determine an application group that has a binding relationship with the storage instance based on the instance identifier, and obtain a network identifier of a group client in the application group.
[0127] Specifically, there is a binding relationship between the storage instance and the application group in advance. After receiving the storage instance mount request from the client, the application group with the binding relationship can be found based on the instance identifier of the storage instance. In actual applications, the binding relationship between the storage instance and the application group can be pre-stored in the cache of the storage service client, so the application group corresponding to the instance identifier of the storage instance can be quickly found from the cache of the storage service client. The specific implementation method is as follows:
[0128] The determining of the application grouping having a binding relationship with the storage instance based on the instance identifier includes:
[0129] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from the cache of the storage service client.
[0130] In specific implementation, in order to realize that when the group client corresponding to the application group is updated, the client that can mount and access the storage instance is also updated accordingly, that is, the storage service end can perceive the changes of the group client in the application group in a relatively real-time manner, the mounting method of the embodiment of this specification adopts a short-time cache plus active query mechanism to realize timely perception of changes in the application group bound to the storage instance, such as the addition, deletion, modification of the application group or the addition, deletion, modification of the group client in the application group, etc. The specific implementation method is as follows:
[0131] The storage service client caches application groups that are bound to the storage instance within a preset time in the cache.
[0132] Correspondingly, determining the application group having a binding relationship with the storage instance from the cache of the storage service side based on the instance identifier includes:
[0133] When the cache time of the application group having a binding relationship with the storage instance in the cache of the storage service side is less than or equal to a preset time, the application group having a binding relationship with the storage instance is determined from the cache of the storage service side based on the instance identifier.
[0134] Among them, the preset time can be understood as a preset time length, such as 20 seconds, 30 seconds, etc., that is, the cache of the storage service side can cache content for up to 20 seconds or 30 seconds. If the preset time is exceeded, the data in the cache will be deleted.
[0135] Taking the preset time as 20 seconds as an example, the cache of the storage service side needs to cache the application groups within 20 seconds that are bound to the storage instance, and the 20 seconds can be counted from the end time of the previous 20 seconds.
[0136] That is to say, the storage service side's cache only caches application groups that are bound to the storage instance within 20 seconds. If the storage service side receives the mount request from the client for the storage instance and determines that the application group that is bound to the storage instance cached in the storage service side's cache is still within the 20-second cache, it means that there are still application groups that are bound to the storage instance in the cache. At this time, the application group that is bound to the storage instance can be directly obtained from the storage service side's cache based on the instance identifier.
[0137] In another embodiment of the present specification, the determining, based on the instance identifier, from the cache of the storage service end, an application group having a binding relationship with the storage instance includes:
[0138] In the case where the cache time of the application group in the cache of the storage service client and having a binding relationship with the storage instance is greater than a preset time, the storage service client sends an application group acquisition request to the grouping platform, wherein the acquisition request carries the instance identifier;
[0139] An application grouping returned by the grouping platform and having a binding relationship with the instance identifier is received, and the application grouping is stored in a cache of the storage service client.
[0140] In specific implementation, when it is determined that the cache time of an application group that is bound to a storage instance in the cache of the storage service side is greater than a preset time, the data in the cache of the storage service side will be deleted. At this time, the storage service side needs to send an application group acquisition request to the group platform. After receiving the acquisition request, the group platform returns the application group corresponding to the instance identifier and the group client corresponding to the application group to the storage service side based on the instance identifier carried in the acquisition request. After receiving the above content, the storage service side still stores it in the cache, and the timing starts at this time until the content is deleted after the preset time.
[0141] In the embodiments of the present specification, a short-time caching mechanism and an active query mechanism are used to ensure the real-time and accuracy of application groups in the cache of the storage service side and that are bound to the storage instance. Since users can update the group clients and application groups in the application groups in real time, it is unsafe if the storage service side always uses the application group bound for the first time as the mounting judgment. Therefore, the above method can greatly ensure the security of the mounting method.
[0142] In actual applications, in order to facilitate management and search for application groups, the cache of the storage service side generally stores a configuration relationship table that can reflect the binding relationship between the storage instance and the application group. For details, please refer to the above Table 1. Through the configuration relationship table 1, the binding relationship between the storage instance and the application group, the permission relationship between the storage instance and the application group, and the association relationship between the application group and the corresponding group client can be quickly determined.
[0143] In a specific implementation, the determining, based on the instance identifier, an application group having a binding relationship with the storage instance includes:
[0144] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from a configuration relationship table of the cache of the storage service end.
[0145] In actual applications, the configuration relationship table between storage instances and application groups is established in advance. Therefore, after receiving the storage instance mount request from the client, the application group that has a binding relationship with the storage instance can be quickly and accurately found from the configuration relationship table based on the instance identifier of the storage instance to improve work efficiency.
[0146] When the cache time of the configuration relationship table in the cache of the storage service client exceeds the preset time, the storage service client will promptly update the configuration relationship table based on the new data obtained the next time it obtains the application grouping corresponding to the storage instance from the grouping platform to ensure the accuracy of the configuration relationship table.
[0147] Step 206: When the network identifier of the client matches the network identifier of the grouped client, mount the client to the storage instance.
[0148] Specifically, first obtain the application group bound to the storage instance through the instance identifier of the storage instance, then obtain the group client corresponding to the application group bound to the storage instance, and finally match the network identifier of the client that issues the mount request with the network identifiers of all group clients corresponding to the application group bound to the storage instance. If they can be matched, it means that the client can mount the storage instance.
[0149] Optionally, after obtaining the network identifier of the group client in the application group, the method further includes:
[0150] In the case that the network identifier of the client does not match the network identifier of the grouped client, mount rejection information is returned to the client.
[0151] In specific implementation, if the network identifier of the client does not match the network identifier of the group client corresponding to the application group to which it is bound, it means that the client cannot mount the storage instance. At this time, the storage service end returns a mount refusal message to the client by email, message or pop-up screen, etc., to prompt the client and enhance the user experience.
[0152] The mounting method provided in the embodiments of this specification eliminates the operation and maintenance costs caused by the fine management granularity in the prior art, and unifies the two types of management costs that users originally need to maintain simultaneously, namely, the group clients of the application group and the clients of the NAS storage instance, into one cost for the management of the application group, thereby greatly improving the efficiency of users in using NAS resources, and the clients granted with mounting access rights are linked in quasi-real time with the changes of the group clients in the application group, ensuring that only the group clients in the bound and configured application group can mount and access the data on the NAS instance (i.e., the storage instance). In addition, the use of the mounting method does not require any additional tool installation and maintenance burden for the user client, and has high security and will not cause any intrusion problems.
[0153] In another embodiment of the present specification, after mounting the client to the storage instance, the process further includes:
[0154] receiving an access request from the client to the storage instance;
[0155] In a case where the access request satisfies the permission relationship between the storage instance and the application group, the access request is processed based on the storage instance.
[0156] The access request includes, but is not limited to, a read request, a write request, or a storage request from a client to a storage instance.
[0157] In specific implementation, due to the access permission restrictions between the client and the storage instance, even if the client can mount the storage instance, it is still necessary to access the data in the storage instance based on the access permission. After receiving the client's access request for the storage instance, it is necessary to first determine whether the client's access request can access the storage instance based on the configuration relationship table in the cache of the storage service side, and whether it has the permission to access. If so, the storage instance can be accessed based on the access request. If not, the storage service side rejects the client's access request.
[0158] In the embodiments of this specification, based on the permission relationship between the storage instance and the application group, the client's access rights to the storage instance are restricted to ensure the security of the storage instance. The mounting method not only reduces the user's maintenance cost, but also ensures the mounting isolation of the storage instance and the security of the data.
[0159] Corresponding to the above method embodiment, this specification also provides a mounting device embodiment, Figure 3 FIG. 1 shows a schematic diagram of the structure of a mounting device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises:
[0160] The first receiving module 302 is configured to receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance;
[0161] A first determining module 304 is configured to determine an application group having a binding relationship with the storage instance based on the instance identifier, and obtain a network identifier of a group client in the application group;
[0162] The mounting module 306 is configured to mount the client to the storage instance when the network identifier of the client matches the network identifier of the grouped client.
[0163] Optionally, the first determining module 304 is further configured to:
[0164] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from the cache of the storage service client.
[0165] Optionally, the cache of the storage service client caches application groups that are bound to the storage instance within a preset time.
[0166] Accordingly, the first determining module 304 is further configured to:
[0167] When the cache time of the application group having a binding relationship with the storage instance in the cache of the storage service side is less than or equal to a preset time, the application group having a binding relationship with the storage instance is determined from the cache of the storage service side based on the instance identifier.
[0168] Optionally, the first determining module 304 is further configured to:
[0169] In the case where the cache time of the application group in the cache of the storage service client and having a binding relationship with the storage instance is greater than a preset time, the storage service client sends an application group acquisition request to the grouping platform, wherein the acquisition request carries the instance identifier;
[0170] An application grouping returned by the grouping platform and having a binding relationship with the instance identifier is received, and the application grouping is stored in a cache of the storage service client.
[0171] Optionally, the device further includes:
[0172] A second receiving module is configured to receive a storage instance binding request from a grouping platform at the storage service end;
[0173] a first binding module, configured to bind the storage instance to the application group of the grouping platform based on the binding request, and to establish a configuration relationship table,
[0174] The configuration relationship table includes the binding relationship and permission relationship between the storage instance and the application group, and the association relationship between the application group and the group client.
[0175] Optionally, the first determining module 304 is further configured to:
[0176] Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from a configuration relationship table of the cache of the storage service end.
[0177] Optionally, the device further includes:
[0178] A third receiving module is configured to receive, by the grouping platform, a user's application group creation request, wherein the creation request carries the user's application information and the group client corresponding to the application information;
[0179] The group creation module is configured to create an application group for the user based on the application information and establish an association relationship between the application group and the group client.
[0180] Optionally, the device further includes:
[0181] The updating module is configured to receive an updating instruction from the user for the application grouping, and adjust the application grouping and / or a group client associated with the application grouping based on the updating instruction.
[0182] Optionally, the device further includes:
[0183] A fourth receiving module is configured to receive an access request from the client to the storage instance;
[0184] The processing module is configured to process the access request based on the storage instance if the access request satisfies the permission relationship between the storage instance and the application group.
[0185] Optionally, the device further includes:
[0186] The information return module is configured to return mount rejection information to the client when the network identifier of the client does not match the network identifier of the grouped client.
[0187] The mounting device provided in the embodiments of this specification eliminates the operation and maintenance costs caused by the fine management granularity in the prior art, and unifies the two types of management costs that users originally need to maintain at the same time, namely, the group clients of the application group and the clients of the NAS storage instance, into one cost for the management of the application group, thereby greatly improving the efficiency of users in using NAS resources, and the clients granted mounting access rights are linked in quasi-real time with the changes of the group clients in the application group, ensuring that only the group clients in the bound and configured application group can mount and access the data on the NAS instance (i.e., the storage instance). In addition, the use of the mounting method does not require any additional tool installation and maintenance burden for the user client, and has high security and will not cause any intrusion problems.
[0188] The above is a schematic scheme of a mounting device of this embodiment. It should be noted that the technical scheme of the mounting device and the technical scheme of the mounting method described above are of the same concept, and the details of the technical scheme of the mounting device that are not described in detail can all be referred to the description of the technical scheme of the mounting method described above.
[0189] Figure 4 The block diagram of a computing device 400 according to an embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0190] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0191] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0192] Computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. Computing device 400 may also be a mobile or stationary server.
[0193] The processor 420 is used to execute the following computer executable instructions, wherein the processor is used to execute the computer executable instructions, wherein the steps of the mounting method are implemented when the processor executes the computer executable instructions.
[0194] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above mounting method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above mounting method.
[0195] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the mounting method when executed by a processor.
[0196] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above mounting method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above mounting method.
[0197] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0198] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0199] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0200] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0201] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. A mounting method, comprising: The grouping platform receives an application group creation request from a user, wherein the creation request carries application information of the user and a group client corresponding to the application information, the application information being an application scenario or an application dimension, creates an application group for the user based on the application information, and establishes an association relationship between the application group and the group client; The storage service client receives a storage instance binding request from the grouping platform, binds the storage instance with the application group of the grouping platform based on the binding request, and establishes a configuration relationship table, wherein the configuration relationship table includes a binding relationship and a permission relationship between the storage instance and the application group, and an association relationship between the application group and the group client; Receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance, determine an application group that has a binding relationship with the storage instance based on the instance identifier, and obtain the network identifier of the group client in the application group, and mount the client to the storage instance when the network identifier of the client matches the network identifier of the group client.
2. According to the mounting method of claim 1, the determining of the application grouping having a binding relationship with the storage instance based on the instance identifier comprises: Based on the instance identifier, an application group that has a binding relationship with the storage instance is determined from the cache of the storage service client.
3. The mounting method according to claim 2, wherein the cache of the storage service client caches application groups that are bound to the storage instance within a preset time. Correspondingly, determining the application group having a binding relationship with the storage instance from the cache of the storage service side based on the instance identifier includes: When the cache time of the application group having a binding relationship with the storage instance in the cache of the storage service side is less than or equal to a preset time, the application group having a binding relationship with the storage instance is determined from the cache of the storage service side based on the instance identifier.
4. According to the mounting method of claim 3, the step of determining the application grouping having a binding relationship with the storage instance from the cache of the storage service client based on the instance identifier comprises: In the case where the cache time of the application group in the cache of the storage service client and having a binding relationship with the storage instance is greater than a preset time, the storage service client sends an application group acquisition request to the grouping platform, wherein the acquisition request carries the instance identifier; An application grouping returned by the grouping platform and having a binding relationship with the instance identifier is received, and the application grouping is stored in a cache of the storage service client.
5. According to the mounting method of claim 1, the determining, based on the instance identifier, the application grouping having a binding relationship with the storage instance comprises: Based on the instance identifier, an application group having a binding relationship with the storage instance is determined from a configuration relationship table of the cache of the storage service client.
6. The mounting method according to claim 1, after establishing the association relationship between the application group and the group client, further comprising: An update instruction from the user for the application group is received, and based on the update instruction, adjustments are made to the application group and / or a group client associated with the application group.
7. The mounting method according to claim 5, after mounting the client to the storage instance, further comprising: receiving an access request from the client to the storage instance; In a case where the access request satisfies the permission relationship between the storage instance and the application group, the access request is processed based on the storage instance.
8. The mounting method according to claim 1, after obtaining the network identifier of the group client in the application group, further comprising: In the case that the network identifier of the client does not match the network identifier of the grouped client, mount rejection information is returned to the client.
9. A mounting device, comprising: A third receiving module is configured to receive, as a grouping platform, a user's application group creation request, wherein the creation request carries the user's application information and the group client corresponding to the application information; A group creation module, configured to create an application group for the user based on the application information, and establish an association relationship between the application group and the group client; A second receiving module is configured to store the storage service end to receive a storage instance binding request from the grouping platform; A first binding module is configured to bind the storage instance with the application group of the grouping platform based on the binding request, and establish a configuration relationship table, wherein the configuration relationship table includes a binding relationship and a permission relationship between the storage instance and the application group, and an association relationship between the application group and the group client; A first receiving module is configured to receive a storage instance mount request from a client, wherein the mount request carries a network identifier of the client and an instance identifier of the storage instance; A first determining module is configured to determine an application group having a binding relationship with the storage instance based on the instance identifier, and obtain a network identifier of a group client in the application group; The mounting module is configured to mount the client to the storage instance when the network identifier of the client matches the network identifier of the grouped client.
10. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the processor implements the steps of the mounting method of claims 1-8 when executing the computer-executable instructions.
11. A computer-readable storage medium storing computer instructions, which implement the steps of the mounting method of claims 1-8 when executed by a processor.
Citation Information
Patent Citations
Method and system for achieving sharing
CN107172061A