Method, device and computer program product for handling access management rights
By calculating the current score of a file to determine the probability of access permission conflicts, this method resolves permission conflicts in the network file system, improves server access permission management, and enhances the allocation of access permissions.
Patent Information
- Application Number
- CN202011057356.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-29
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2040-09-29
AI Technical Summary
In network file systems, existing technologies have a high probability of conflict when allocating file access management permissions, which leads to a decrease in server performance. This is especially true when dealing with a large number of files, where existing technologies consume a lot of time and resources through machine learning models.
The current score of a file is calculated to indicate the probability of conflict when assigning file access permissions. When assigning access control permissions to a file, the current score of the file is used to determine whether to assign access management permissions, thus avoiding the assignment of permissions to files with a high probability of conflict and improving server performance.
It improves server performance and user experience, reduces the probability of access conflicts, and enhances the accuracy and scalability of access management permissions.
Smart Images

Figure CN114329503B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of file management systems, and more particularly, to a method, apparatus and computer program product for handling access management rights. BACKGROUND
[0002] A Network File System (NFS) is a system for sharing files across platforms. With the development of technology, the network file system can now support file sharing between different types of systems through a network, for example, allowing sharing of directories and files with others over a network. By using the NFS, users and programs can access files on remote systems as if they were local files.
[0003] The NFS uses a client / server architecture, consisting of a client program and a server program. The server program provides access to the file system to other computers. The NFS client program accesses the shared file system, and obtains the files that need to be shared from the NFS server. However, there are still many problems to be solved in the use of the NFS. SUMMARY
[0004] Embodiments of the present disclosure provide a method, apparatus and computer program product for handling access management rights.
[0005] According to a first aspect of the present disclosure, a method of handling access management rights is provided. The method comprises receiving, from a client, a first request for access management rights to a file. The method further comprises obtaining a current score for the file, the current score indicating a probability of receiving a second request conflicting with the first request after the access management rights are assigned to the client. The method further comprises assigning the access management rights to the client if it is determined that the current score is greater than or equal to a threshold score.
[0006] According to a second aspect of the present disclosure, an electronic device is provided. The electronic device comprises at least one processor; and a memory coupled to the at least one processor and having stored therein instructions that, when executed by the at least one processor, cause the device to perform actions including receiving, from a client, a first request for access management rights to a file; obtaining a current score for the file, the current score indicating a probability of receiving a second request conflicting with the first request after the access management rights are assigned to the client; and assigning the access management rights to the client if it is determined that the current score is greater than or equal to a threshold score.
[0007] According to a third aspect of the present disclosure, there is provided a computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions that, when executed, cause a machine to perform the steps of the method of the first aspect of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0008] The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like parts throughout the figures.
[0009] Figure 1 FIG. 1 illustrates a schematic diagram of an example environment 100 in which devices and / or methods according to embodiments of the present disclosure can be implemented;
[0010] Figure 2 FIG. 2 illustrates a flowchart of a method 200 for processing access management rights according to embodiments of the present disclosure;
[0011] Figure 3 FIG. 3 illustrates a flowchart of a method 300 for determining a current score of a file according to embodiments of the present disclosure;
[0012] Figure 4 FIG. 4 illustrates a flowchart of an example 400 for assigning access management rights according to embodiments of the present disclosure;
[0013] Figure 5 FIG. 5 illustrates a schematic block diagram of an example device 500 suitable for use in implementing embodiments of the present disclosure.
[0014] In the various drawings, like or corresponding reference numbers refer to like or corresponding parts. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the present disclosure are shown. Like or corresponding reference numbers can be used to refer to like or corresponding parts throughout the several views. It should be understood that the drawings are not necessarily to scale, and that, in certain instances, various elements of the drawings can have been exaggerated for the sake of clarity.
[0016] In the description of embodiments of the disclosure, the term "includes" and its derivatives, such as "including" should be understood in an open-ended way, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", and the like can refer to different or the same objects. Other explicit and implicit definitions can also be included below.
[0017] The principles of the present disclosure will be described below with reference to several example embodiments shown in the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the description of these embodiments is only to enable those skilled in the art to better understand and implement the present disclosure, and not to limit the scope of the present disclosure in any way.
[0018] Traditionally, for file sharing, to reduce the interaction between a computing device running NFS and a client, NFS can assign access management rights (e.g., read delegation and / or write delegation) of a file to the client, so that the client can cache the data associated with the target file to reduce the communication and related overhead between the client and the server. But when there is another access to the file that conflicts with the access of the client, the computing device will reclaim the access management rights. Then, the access to the file is handled using normal access mechanisms.
[0019] The above mechanism of assigning access management rights improves the utilization of caching, reduces network traffic, and thus improves the performance of the client and the server. However, after assigning the access management rights of a file, if there is a high probability of conflicting access operations, the server needs to reclaim the access management rights (e.g., reclaiming read delegation or write delegation). Since reclaiming access management rights takes a lot of time, it can cause new requests to be unable to be processed, resulting in a decrease in server performance.
[0020] To improve performance, the server must consider the possibility of conflicting with other access requests when assigning access management rights (e.g., granting delegation) of a file to a client. One approach is to implement machine learning for each file to analyze the access pattern of each file respectively to determine the probability of conflicting access requests for the file. However, when a large number of files (thousands, millions) are configured on the server, this implementation through a machine learning model requires a lot of time and resources.
[0021] To address the above-referenced and other potential problems, the present disclosure provides a method for processing access management permissions. In the method, a computing device receives a first request from a client to acquire an access management permission for a file. The computing device then obtains a current score for the file, the current score indicating a probability of receiving a second request conflicting with the first request after the access management permission is assigned to the client. If it is determined that the current score is greater than or equal to a threshold score, the computing device assigns the access management permission to the client. With the method, the access management permission of a file with a high access conflict probability is avoided from being assigned to the client, the performance of the server is improved, and the user experience is improved. In addition, the method is easy to implement, and is scalable as the number of files and clients are considered when assigning the management permission.
[0022] The following detailed description is presented in connection with Figures 1 to 5 a detailed description of embodiments in accordance with the present disclosure. Figure 1 A schematic diagram illustrating an example environment 100 in which devices and / or methods in accordance with embodiments of the present disclosure can be implemented is shown.
[0023] As Figure 1 shown, the example environment 100 includes a client 102 and a computing device 106. The client 102 is configured to request the computing device 106 to acquire an access management permission 112, such as a write delegation or a read delegation, for a file 110.
[0024] The client 102 can be implemented as any type of computing device, including but not limited to a mobile phone (e.g., a smartphone), a laptop computer, a portable digital assistant (PDA), an electronic book (e-book) reader, a portable game console, a portable media player, a game console, a set-top box (STB), a smart television (TV), a personal computer, a laptop computer, an in-vehicle computer (e.g., a navigation unit), etc.
[0025] The client 102 is configured to generate a request 104 for acquiring the access management permission 112 for the file 110, such as an open request for a delegation to acquire the file 110. In some embodiments, the request 104 includes an identification of the file 110 and an identification for acquiring the access management permission 112. Alternatively or additionally, the request 104 further includes a type of target access operation to be performed by the user, such as an operation mode, such as a write operation mode, a read operation mode, etc. The above examples are merely used to describe the present disclosure, and are not specific limitations of the present disclosure.
[0026] The example environment 100 is shown in Figure 1 to include one client 102, which is merely an example and is not a specific limitation of the present disclosure. Any number of clients can be included in the example environment 100.
[0027] The computing device 106 is configured to manage the file 110 and can assign management rights of the file 110 to the client 102. Upon receiving the request 104 from the client 102, the computing device 106 needs to further determine whether to assign the access management right 112 of the file 110 to the client 102 using the current score 108 of the file, which indicates the probability of receiving a conflicting request after the access management right 112 is assigned to the client 102, when determining whether to assign the access management right 112 of the file 110 to the client 102.
[0028] In some embodiments, upon receiving the request 104 from the client 102, the computing device 106 first determines whether there is a conflicting access operation for the file 110 based on the type of the target access operation in the request 104. If there is a conflicting access operation, the access management right 112 of the file 110 will not be assigned to the client 102. If there is no conflicting access operation, the current score 108 of the file is used to determine whether to assign the access management right 112 to the client 102. Alternatively or additionally, it is also needed to determine whether the client 102 is qualified to obtain the access management right 112 before making the determination using the current score 108 of the file. If the client 102 is qualified to obtain the access management right 112, the determination is made using the current score 108 of the file. If the client 102 is not qualified to obtain the access management right 112, the access management right will not be assigned to the client 102.
[0029] If the computing device 106 determines that the access management right 112 of the file 110 can be assigned to the client 102, the computing device 106 transmits the access management right 112 to the client 102. Then, the client 102 uses the obtained access management right 112 of the file 110 to access the file 110. For example, after the client 102 obtains a write delegation or a read delegation, the client 102 performs a read operation or a write operation on the file 110, etc. At this time, the consistency of the data of the file at the client 102 and the data on the file managed by the computing device 106 is guaranteed.
[0030] The computing device 106 includes, but is not limited to, a personal computer, a server computer, a handheld or laptop device, a mobile device such as a mobile phone, a personal digital assistant (PDA), a media player, etc., a multiprocessor system, a consumer electronic product, a minicomputer, a mainframe computer, a distributed computing environment including any of the above systems or devices, etc.
[0031] In Figure 1 One file 110 and its corresponding current score 108 of the file are shown in FIG. 1. It is only an example and is not a specific limitation of the present disclosure. Any suitable number of files and the corresponding current scores of the files can be managed in the computing device 106.
[0032] By using the above method, we avoid assigning access management permissions for files with a high probability of access conflicts to clients, thereby improving server performance and enhancing the user experience.
[0033] The above combination Figure 1 A schematic diagram of an environment 100 in which the apparatus and / or methods according to embodiments of the present disclosure may be implemented is described below. Figure 2 A flowchart describing a method 200 for processing access management permissions according to embodiments of the present disclosure is provided. Method 200 can be... Figure 1 It is executed at computing device 106 or any other suitable device.
[0034] At box 202, computing device 106 receives a request 104 from client 102 to obtain access management permissions for file 110. For ease of description, request 104 will be referred to as the first request. When client 102 accesses file 110, it may send a request 104 to computing device 106 to obtain access management permissions 112 for file 110. For example, client 102 may send an open request for file 110 to computing device 106, which includes identification information for obtaining a read or write authorization.
[0035] In some embodiments, the request 104 includes at least a file identifier and an identifier for which file access management permissions 112 are required. Alternatively or additionally, the request 104 may also include the type of target access operation that the client 102 wants to perform on the file 110, such as a write operation mode, a read operation mode, etc. The above examples are merely for describing this disclosure and are not intended to specifically limit this disclosure.
[0036] At box 204, computing device 106 obtains the current score 108 of the file, which indicates the probability of receiving a second request that conflicts with the first request after access management rights have been assigned to client 102.
[0037] During the process of computing device 106 assigning access management permission 112 to file 110 to client 102, it is also necessary to use the file's current score 108 to determine whether to assign access management permission 112. This current score 108 indicates the probability of a conflict in access requests for file 110. The process of calculating this score will be explained below. Figure 3 Describe it.
[0038] In some embodiments, computing device 106 obtains a file identifier from a first request. Then, computing device 106 uses the file identifier of file 110 to look up the current score 108 of the file from a pre-determined mapping relationship between file identifiers and scores. This method allows for rapid determination of the current score of the file, improving the efficiency of obtaining the current score.
[0039] In some embodiments, the first request further includes a type of the target access operation to be performed on the file 110, such as a write operation mode or a read operation mode. Upon receiving the first request, the computing device 106 first determines whether there is an access operation on the file that conflicts with the type of the target access operation. For ease of description, the access operation is referred to as a first access operation. If it is determined that there is no first access operation, it indicates that there is no access operation that conflicts with the access operation to be performed by the client 102 on the file 110. Then, the computing device 106 obtains the current score 108 of the file. In this way, the access management privilege is provided only to the request that has no conflict, improving the accuracy of the allocation of the access management privilege.
[0040] Alternatively or additionally, upon determining that there is no first access operation, it is further determined whether the client 102 is qualified to obtain the access management privilege 112 to access the file 110. If the client 102 is qualified to obtain the access management privilege 112 to access the file 110, the current score 108 of the file is obtained. If the client 102 is not qualified, the access management privilege 112 is not allocated to the client 102. For example, if the reverse channel between the client 102 and the computing device 106 cannot be established, the client 102 is not qualified to obtain the access management privilege 112. The above example is only used to describe the present disclosure, and is not a specific limitation of the present disclosure. A person skilled in the art can set the standard for the client 102 not to be qualified to obtain the access management privilege 112 according to the needs.
[0041] In some embodiments, if it is determined that there is a first access operation on the file 110 that conflicts with the type of the target access operation, the computing device 106 further determines whether there is an allocated access management privilege 112 on the file 110. If the computing device 106 determines that there is an allocated access management privilege 112, the allocated access management privilege 112 is revoked. In this way, the allocated access management privilege can be quickly revoked, improving the efficiency of the first request to access the file. If there is no allocated access management privilege or after the allocated access management privilege is revoked, the access management privilege 112 is not allocated to the client 102.
[0042] At block 206, if it is determined that the current score 108 is greater than or equal to the threshold score, the computing device 106 allocates the access management privilege 112 to the client 102. When allocating the access management privilege 112, the access management privilege 112 is allocated to the file 110 only when the current score 108 of the file 110 is greater than or equal to the threshold score. If it is less than the threshold score, the access management privilege 112 is not allocated to the file 110.
[0043] In some embodiments, the threshold score is determined by the computing device 106. The computing device 106 determines a threshold number of files that can be assigned access management permissions in the computing device 106. For example, the computing device 106 can assign access management permissions to at most 50 files at the same time, and the threshold number is 50. The computing device 106 also obtains a number of a set of files that have been assigned access management permissions and a set of scores corresponding to the set of files. Each score indicates a probability of a conflict between a plurality of requests for a corresponding file after the access management permissions for the corresponding file are assigned to a corresponding client 102.
[0044] For example, the number of the set of files that have been assigned access management permissions is N, where N is an integer greater than 0. Each file has a corresponding score dq n , where 1 ≤ n ≤ N. The current scores of the N files form an array DQ = [dq1, dq2, dq3, …, dq4, …, dq N ], where dq n is the current score of the nth file. Then, the computing device 106 uses the threshold number, the number of the set of files, and the set of scores corresponding to the set of files to calculate the threshold score. In this way, a reasonable threshold score can be quickly determined.
[0045] In some embodiments, in the process of using the threshold number, the number of the set of files, and the set of scores corresponding to the set of files to calculate the threshold score, the computing device 106 obtains a predetermined score of a file. For example, the predetermined score can be set to 50 when the range of the current score is between 0-100. This is only for the purpose of describing the present disclosure, and is not a specific limitation of the present disclosure. The predetermined score can be set to any suitable value by a user.
[0046] Then, the computing device 106 determines whether the number of the set of files is greater than or equal to the threshold number. If the number of the set of files is greater than or equal to the threshold number, it indicates that the number of files that have been assigned access permissions is greater than the number of files that can be assigned access management permissions at the same time. At this time, the computing device 106 sorts the set of scores in order of size. Then the computing device 106 determines a first score associated with the threshold number from the sorted set of scores. For example, the number of files that have been assigned access management permissions is 100, and the computing device 106 can assign access management permissions to at most 50 files at the same time. Then, the scores of the 100 files are sorted in size, and the score of the 50th file is taken as the first score.
[0047] The computing device 106 determines a threshold score based on a first score and a predetermined score. In one embodiment, the computing device 106 uses the maximum value of the first score and the predetermined score as the threshold score. In another embodiment, those skilled in the art can use the first score and the predetermined score to determine the threshold score in any suitable manner. The above examples are merely illustrative of the present disclosure and are not intended to limit the scope of the disclosure.
[0048] If the computing device 106 determines that the number is less than the threshold number, it sets the predetermined score as the threshold score. This method allows for a more reasonable determination of the threshold score, enabling the selection of more appropriate file access management permissions.
[0049] In some implementations, when computing device 106 receives an instruction from client 102 to terminate access management permission 110, the allocation of access management permission 110 is terminated. Computing device 106 then updates the file's current score using a first access duration, a first revoke indication value, and a first conflict indication value associated with the first request. The first access duration indicates the length of time the first request has been allocated access management permission; the first revoke indication value indicates the allocation and revoke status of access management permission; and the first conflict indication value indicates whether a second request conflicting with the first request exists when the corresponding first request is executed. In this way, the file's current score can be updated quickly, making the current score more accurate. This update process can be performed as follows: Figure 3 The method described is used to determine the current score of a file.
[0050] By using the above method, we avoid assigning access management permissions for files with a high probability of access conflicts to clients, thereby improving server performance and enhancing the user experience.
[0051] The above combination Figure 2 A method 200 for processing access management permissions according to embodiments of the present disclosure is described below. Figure 3 This describes the method used to determine the current score of a file. Figure 3 A flowchart of a method 300 for determining the current score of a document according to an embodiment of the present disclosure is illustrated. Figure 3 Method 300 in the middle can be derived from Figure 1 The computing device 106 or any other suitable device in the system shall perform the operation.
[0052] At box 302, computing device 106 determines a set of access durations for a set of historical requests for obtaining historical access management permissions for file 110, each access duration indicating the length of time for which historical access management permissions were assigned to the corresponding historical request. Computing device 106 retrieves information related to a set of historical access requests for file 110 from a storage device or memory. For example, information related to the most recent M requests for obtaining access management permissions for file 110, where M is an integer greater than 0.
[0053] In some embodiments, the computing device 106 contains N files for which access management permissions have been assigned, where N is an integer greater than 0, and each file has a corresponding score. File 110 is the nth file among the N files, where 1 ≤ n ≤ N. For the nth file, after obtaining information related to the Mth request for obtaining file access management permissions, the file's score can be recalculated using information related to the most recent M requests for obtaining file access management permissions.
[0054] The current score of the nth file out of N files is dq. n The current score dq n The initial value is set to 100. The file's current score is recalculated after each request to obtain file access management permissions. After obtaining information about the Mth access request, the file's current score dq can be recalculated using information from the most recent M access requests. n .
[0055] The set of access durations for the most recent M requests to obtain access management permissions for the nth file is D. n =[d1,d2,d3,…,d4,…,d M ], M is a positive integer, d m This is the duration of the m-th request, where 1 ≤ m ≤ M. In one example, the duration is in minutes. d m The value ranges from 0 to 100. If the duration is longer than 100 minutes, it will be set to d. m =100. When no access management permissions are assigned to the request, d m =0, which indicates that the request is rejected. The above examples are for illustrative purposes only and are not intended to limit the scope of this disclosure.
[0056] At box 304, computing device 106 acquires a set of revocation indication values for historical access management rights associated with a set of historical requests, each revocation indication value indicating the allocation and revocation status of the corresponding historical access management rights.
[0057] In some embodiments, R is the set of reclaim status indication values of the most recent M requests for access management permissions to the nth file. n= [r1, r2, r3, …, r4, …, r M ], r m represents the allocation and recovery state of the access management right of the mth request, 1≤m≤M. r m represents that the recovery of the access management right due to the access conflict does not occur during the access with the allocated access management right. r m represents that the recovery of the access management right due to the access conflict occurs during the access with the allocated access management right. r m represents that the request is rejected and the access management right is not allocated. The above example is only used to describe the present disclosure, and is not a specific limitation on the present disclosure.
[0058] At block 306, the computing device 106 obtains a set of conflict indication values corresponding to a set of historical requests, each conflict indication value indicating whether there is a second historical request conflicting with a first historical request when the corresponding first historical request is executed.
[0059] In some embodiments, the set of conflict indication values in the last M requests of the access management right for the nth file is C = [c1, c2, c3, …, c4, …, c M ], c m represents whether there is a conflicting request when the mth request is executed, 1≤m≤M. c m represents that there is no conflict during the access with the allocated access management right, otherwise 1 represents that there is a conflict during the access with the allocated access management right.
[0060] At block 308, the computing device 106 determines the current score based on the set of access durations, the set of recovery indication values, and the set of conflict indication values.
[0061] In some embodiments, the adjustment value of the current score of the nth file is calculated using the data related to the last M requests of the access management right for the nth file by using the following formula (1)
[0062]
[0063] wherein dq n represents the current score of the nth file in the N files to which the access management right has been allocated, which is calculated before the Mth request of the access management right for the file; ω m represents the weight of the mth request of the access management right in the last M requests of the access management right for the nth file, 1≤m≤M; represents the rounding up of the calculated value, d m represents the access duration of the mth request; dm 'Indicates the relationship with D n The corresponding adjustment set D n '=[d1',d2',d3',…,d4',…,d M The m-th data item in '] represents the adjusted access duration for the m-th request, d m The range is between 0 and 100. In one example, d m The unit is minutes. The above example is for illustrative purposes only and is not intended to limit the scope of this disclosure.
[0064] In one example, D n '=[d1',d2',d3',…,d4',…,d M Each term of '] is determined in the following way. For any value m in [1,M], if r m =0 and c m =0 then d m =50. If r m =-1, in d m When >50, d m =min(100,d) m +20), min() means taking the minimum value; otherwise d m =max(0, d) m -20), where max() represents taking the maximum value. In r m When d = 1, m '=d m In another example, d can be adjusted as needed. m Set to any suitable value. The above examples are for illustrative purposes only and are not intended to limit the scope of this disclosure.
[0065] In obtaining Then, the recalculation is performed for the nth file. min() means taking the minimum value.
[0066] The above method allows for quick acquisition of the current score of a file, making the score more accurate and effective.
[0067] In some embodiments, when the computing device 106 receives a request for the Mth time to obtain access management permissions for the nth file, it sets [d M ,r M ,c M [0,0,0]. When the result of the Mth access request is that no access management permissions have been assigned, r will be... M Update to 0; if access management rights are assigned to the client after the Mth access request and are not revoked due to conflict, then r will be... Mis updated to 1 ; if the access management right is reclaimed due to conflict after the access management right is assigned after the Mth access request, r M is updated to -1. If it is determined that there is an access operation conflicting with the type of the target access operation in the request, c M is updated to 1 ; if the access management right is terminated or reclaimed, d is updated with the corresponding time length M .
[0068] In some embodiments, the information related to the Mth access management request used to calculate the current score of the nth file and the previously calculated score can be stored in the storage of the computing device 106 to recalculate the current score of the nth file each time the score is obtained.
[0069] In some embodiments, the current score of the nth file can be calculated after the operation of the Mth request for obtaining the access management right of the nth file ends, so that the current score of the nth file is obtained directly by the file identification when the current score of the nth file is obtained. In one example, if the Mth access request obtains the access management right and is not reclaimed, the current score of the file is recalculated when the user does not need the access management right or the access management right is terminated by the server. In another example, the current score of the file is recalculated when the nth file does not obtain the access management right. In this way, a more accurate current score can be obtained.
[0070] The above describes the method 300 for determining the current score of a file according to an embodiment of the present disclosure. The flowchart for assigning an access management right will be described below in conjunction with Figure 3 The method 400 in conjunction with Figure 4 will be described below. Figure 4 The flowchart of an example 400 for assigning an access management right according to an embodiment of the present disclosure is illustrated. Figure 4 The method 400 in conjunction with Figure 1 may be performed by the computing device 106 in conjunction with or any other appropriate device.
[0071] At block 402, the computing device 106 receives a request 104 for obtaining an access management right 112 of a file 110 from the client 102. The request 104 at least includes the identification of the file to be accessed, the identification for obtaining the access management right 112, and the type of the target access operation. For example, an open request of the file 110 at least includes the identification of the file 110 to be accessed, the identification for obtaining a write delegation or a read delegation, and the operation mode, such as a write operation mode or a read operation mode.
[0072] At block 404, the computing device 106 determines whether there is a file access conflict. In one example, it is determined whether there is another access action that conflicts with the type of target access action in the request. The other access action is from another access request for the same file.
[0073] If there is a conflict, then at block 408, the computing device 106 determines whether access management rights 112 for the file have been assigned, e.g., whether a write delegation or a read delegation has been assigned to another access request. If the access management rights 112 have been assigned, then at block 414, the computing device 106 needs to reclaim the access management rights that have been assigned to the file 110. If no access management rights have been assigned or the assigned access management rights have been reclaimed, then at block 418, the computing device 106 determines not to assign the access management rights 112.
[0074] If it is determined at block 404 that there is no file access conflict, then at block 406, the computing device 106 determines whether the client 102 is eligible for the access management rights 112. If the client 102 is eligible for the access management rights 112, then at block 410, the computing device 410 queries the current score of the file 110 by the identity of the file. At block 412, the computing device 106 determines whether the current score is greater than a threshold score. If the current score of the file 110 is greater than the threshold score, then at block 416, the computing device 106 assigns the access management rights 112, e.g., a read delegation or a write delegation, for the file 110 to the client 102.
[0075] If the client 102 is not eligible for the access management rights 112 or the current score of the file 110 is less than the threshold score, then at block 418, the access management rights 112 are not assigned.
[0076] By this method, the access management rights of a file with a high probability of access conflict are avoided from being assigned to a client, the performance of the server is improved, and the user experience is improved.
[0077] Figure 5 A schematic block diagram of an example device 500 that can be used to implement embodiments of the present disclosure is shown. For example, as Figure 1The illustrated clients 102 and computing devices 106 can be implemented by the device 500. As shown, the device 500 includes a central processing unit CPU 501 that can perform various appropriate actions and processes in accordance with computer program instructions stored in a read-only memory ROM 502 or loaded into a random access memory RAM 503 from a storage unit 508. Various programs and data required for operation of the device 500 can also be stored in the RAM 503. The CPU 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input / output I / O interface 505 is also connected to the bus 504.
[0078] A plurality of components in the device 500 are connected to the I / O interface 505, including an input unit 506, such as a keyboard, a mouse, etc., an output unit 507, such as various types of displays, speakers, etc., a storage unit 508, such as a magnetic disk, an optical disk, etc., and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0079] The various processes and processes described above, such as the methods 200, 300, and 400, can be performed by the processing unit 501. For example, in some embodiments, the methods 200, 300, and 400 can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the CPU 501, one or more actions of the methods 200, 300, and 400 described above can be performed.
[0080] Embodiments of the present disclosure relate to methods, electronic devices, and / or computer program products. Embodiments of the present disclosure can also include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the present disclosure.
[0081] Computer readable storage media can be tangible storage media which can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer readable storage media, in non-exhaustive list, include: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched-tape, a
[0082] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0083] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer, for example, through the Internet using an Internet Service Provider. In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0084] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0085] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0086] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0087] The flow diagrams and the block diagrams in the drawings are presented to illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logic functions. In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and
[0088] Embodiments of the present disclosure have been described above, and the description is intended to be illustrative of the embodiments and not restrictive. Many modifications and variations of the described embodiments are possible and are within the scope of the disclosure. The selection of terms is intended to best describe the principles of the embodiments, practical application, or technical improvements over the technology found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method of processing access management permissions, comprising: receiving, from a client, a first request for an access management permission for a file; obtaining a current score of the file, the current score indicating a probability of receiving a second request conflicting with the first request after the access management permission is assigned to the client; and in response to determining that the current score is greater than or equal to a threshold score, assigning the access management permission to the client; wherein the first request comprises a type of a target access operation to be performed on the file; wherein the method further comprises: in response to determining that there exists a first access operation on the file conflicting with the type of the target access operation, determining whether there exists an assigned access management permission on the file; and in response to determining that there exists the assigned access management permission, reclaiming the assigned access management permission. 2.The method of claim 1, wherein the first request comprises an identification of the file, and wherein obtaining the current score comprises: obtaining the current score based on the identification of the file and a pre-determined mapping relationship between an identification of a file and a score of the file associated with the identification of the file. 3.The method of claim 1, wherein obtaining the current score comprises: determining a set of access durations of a set of historical requests for obtaining a historical access management permission of the file, each access duration indicating a length of time for which a corresponding historical request is assigned the historical access management permission; obtaining a set of reclaim indication values for the historical access management permission related to the set of historical requests, each reclaim indication value indicating an assignment and a reclamation state of a corresponding historical access management permission; obtaining a set of conflict indication values corresponding to the set of historical requests, each conflict indication value indicating whether there exists a second historical request conflicting with a first historical request when the first historical request is performed; and determining the current score based on the set of access durations, the set of reclaim indication values, and the set of conflict indication values. 4.The method of claim 1, wherein obtaining the current score of the file further comprises: in response to determining that there does not exist a first access operation on the file conflicting with the type of the target access operation, obtaining the current score of the file. 5.The method of claim 1, further comprising determining a threshold score; wherein determining the threshold score comprises: determining a threshold number of files to which an access management permission can be assigned; obtaining a number of a set of files to which an access management permission has been assigned and a set of scores corresponding to the set of files, each score in the set of scores indicating a probability of a conflict between a plurality of requests for a corresponding file after the access management permission of the corresponding file is assigned to a corresponding client; and calculating the threshold score based on the threshold number, the number, and the set of scores. 6.The method of claim 5, wherein calculating the threshold score comprises: obtaining a predetermined score for the file; in response to determining that the number is greater than or equal to the threshold number, ordering the set of scores in an ascending order, determining a first score associated with the threshold number from the ordered set of scores, and determining the threshold score based on the first score and the predetermined score; and determining the predetermined score as the threshold score in response to determining that the number is less than the threshold number.
7. The method of claim 1, further comprising: in response to determining that an indication from a client to terminate the access management privilege is received, updating a current score of the file based on a first access duration associated with the first request, a first reclaim indication value, and a first conflict indication value, the first access duration indicating a length of time for which the first request was assigned the access management privilege, the first reclaim indication value indicating a state of assignment and reclaim of the access management privilege, and the first conflict indication value indicating whether the second request conflicting with the first request existed when the respective first request was executed.
8. The method of claim 1, wherein receiving the first request comprises: receiving a request to access a shared file in a network file system (NFS) as the first request; and wherein the second request indicates a request to access the shared file.
9. The method of claim 1, further comprising: in response to receiving the first request, confirming that the access management privilege is not currently assigned to another client; and prior to obtaining the current score of the file, confirming that the client is entitled to obtain the access management privilege for the file.
10. An electronic device, the electronic device comprising: at least one processor; and memory coupled to the at least one processor and having stored therein instructions that, when executed by the at least one processor, cause the device to perform actions including: receiving, from a client, a first request to obtain an access management privilege for a file; obtaining a current score for the file, the current score indicating a probability that a second request conflicting with the first request is received after the access management privilege is assigned to the client; and in response to determining that the current score is greater than or equal to a threshold score, assigning the access management privilege to the client; wherein the first request includes a type of target access operation to be performed on the file; wherein the actions further include: in response to determining that a first access operation to the file exists that conflicts with the type of target access operation, determining whether an assigned access management privilege to the file exists; and in response to determining that the assigned access management privilege exists, reclaiming the assigned access management privilege.
11. The electronic device of claim 10, wherein the first request includes an identification of the file, and wherein obtaining the current score comprises: obtaining the current score based on the identification of the file and a pre-determined mapping of file identifications to scores of files associated with the file identifications.
12. The electronic device of claim 10, wherein obtaining the current score comprises: determine a set of access durations of a set of historical requests for acquiring a historical access management privilege of the file, each access duration indicating a length of time that a corresponding historical request is assigned the historical access management privilege; obtain a set of recycle indication values for the historical access management privilege related to the set of historical requests, each recycle indication value indicating an assignment and recycle status of a corresponding historical access management privilege; obtain a set of conflict indication values corresponding to the set of historical requests, each conflict indication value indicating whether there is a second historical request conflicting with a corresponding first historical request when the first historical request is executed; and determine the current score based on the set of access durations, the set of recycle indication values, and the set of conflict indication values.
13. The electronic device of claim 10, wherein obtaining the current score of the file further comprises: in response to determining that there is no first access operation for the file conflicting with a type of the target access operation, obtaining the current score of the file.
14. The electronic device of claim 10, the actions further comprising determining a threshold score; wherein determining the threshold score comprises: determining a threshold number of files to which an access management privilege can be assigned; obtaining a number of a set of files to which an access management privilege has been assigned and a set of scores corresponding to the set of files, each score in the set of scores indicating a probability of a conflict between a plurality of requests for a corresponding file after the access management privilege of the corresponding file is assigned to a corresponding client; and calculating the threshold score based on the threshold number, the number, and the set of scores.
15. The electronic device of claim 14, wherein calculating the threshold score comprises: obtaining a predetermined score for the file; in response to determining that the number is greater than or equal to the threshold number, ordering the set of scores in size order, determining a first score associated with the threshold number from the ordered set of scores, and determining the threshold score based on the first score and the predetermined score; and in response to determining that the number is less than the threshold number, determining the threshold score as the predetermined score.
16. The electronic device of claim 10, the actions further comprising: in response to determining that an indication is received from a client to terminate the access management privilege, updating a current score of the file based on a first access duration, a first recycle indication value, and a first conflict indication value associated with the first request, the first access duration indicating a length of time that the first request is assigned the access management privilege; the first recycle indication value indicating an assignment and recycle status of the access management privilege; and the first conflict indication value indicating whether there is the second request conflicting with the first request when the corresponding first request is executed. 17. A computer program product, the computer program product being tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions that, when executed, cause a machine to perform the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Identity and asset risk score intelligence and threat mitigation
US20140279641A1
File access control based on analysis of user behavior patterns
US20200302074A1