File access control method, device and system, medium and program product

By pre-issuing user key and file block information on the user terminal, and using the network cache device to cache multiple file blocks that can be shared by users, the problem of difficulty in both security and speed in file access control is solved, and efficient Secure file access.

CN118900194APending Publication Date: 2024-11-05CHINA UNIONPAY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410933310.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Existing file access control technology is difficult to take into account the security of file access and the speed of users obtaining files, especially in the transmission of big data files, which is difficult to achieve both security and speed.

Method used

By pre-issuing user key and file block information on the user terminal, using the network cache device to cache multiple file blocks that can be shared by users, improve file transfer speed, and encrypt and decrypt file blocks through the user key to ensure file access security.

Benefits of technology

It realizes the security of file access and the speed of users obtaining files. The user keys are different and the disclosure will not affect other users, improving file transfer speed and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900194A_ABST
    Figure CN118900194A_ABST
Patent Text Reader

Abstract

The invention discloses a file access control method, device and system, a medium and a program product, and belongs to the field of data processing. The method comprises the following steps: sequentially sending a plurality of acquisition requests to a network cache device, each acquisition request comprising a user identifier and block information of a file block corresponding to a user key, so that the network cache device searches the cached file block corresponding to the block information in the acquisition request, the file service device is requested for file blocks corresponding to the block information in the uncached acquisition request, the user key comprises data blocks, the data blocks are obtained by dividing the target file, and the file blocks are obtained by dividing the target file according to the user key and comprise the data blocks; receiving a file block which is fed back by the network cache device and corresponds to the block information in the acquisition request; and encrypting and decrypting the file block corresponding to the block information in the acquisition request based on the user key to obtain a target file. According to the embodiment of the invention, the file access security and the file acquisition speed of the user can be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing, and in particular, relates to a file access control method, device, system, medium and program product. Background Art

[0002] With the continuous development of big data technology and privacy computing technology, file access control system (File Access Control System) is becoming more and more important, and file access security has become a focus of attention. Different users have different file access rights, and some files provided by business services can only be obtained by authorized users. For example, some report files can only be accessed by certain users; for another example, copyrighted video files can only be viewed by paying users. Most of the files with access control rights are files with relatively large data volumes. It takes a long time for these files to be transmitted from the server providing the files to the user end, which makes it slower for users to obtain these files. Summary of the invention

[0003] The embodiments of the present application provide a file access control method, device, system, medium and program product, which can take into account both the security of file access and the speed at which users obtain files.

[0004] In a first aspect, an embodiment of the present application provides a file access control method, which is applied to a user terminal, and the method includes: sending multiple acquisition requests for applying for obtaining a target file to a network cache device in sequence, each acquisition request including a user identifier and block information of a file block corresponding to a user key, so that the network cache device searches for a cached file block corresponding to the block information in the acquisition request, and requesting a file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, the user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device, the user key includes at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; receiving a file block corresponding to the block information in the acquisition request fed back by the network cache device; encrypting and decrypting the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0005] In a second aspect, an embodiment of the present application provides a file access control method, which is applied to a network cache device, the method comprising: receiving multiple acquisition requests sent in sequence by a user terminal for applying for obtaining a target file, each acquisition request comprising a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-issued to the user terminal by a file service device, the user key comprises at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block comprises one data block or more than two consecutive data blocks; searching for a cached file block corresponding to the block information in the acquisition request, and requesting the file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device; feeding back the obtained file block corresponding to the block information in the acquisition request to the user terminal, so that the user terminal performs encryption and decryption processing on the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0006] In a third aspect, an embodiment of the present application provides a file access control method, which is applied to a file service device, the method comprising: receiving a request from a network cache device for a file block that is not cached by the network cache device and corresponds to the block information in an acquisition request, the acquisition requests are sent sequentially by a user terminal to the network cache device to apply for acquisition of a target file, each acquisition request comprises a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-issued to the user terminal by the file service device, the user key comprises at least one data block, the user key is used by the user terminal to encrypt and decrypt the file block corresponding to the block information in the acquisition request to obtain the target file, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block comprises one data block or more than two consecutive data blocks; feeding back to the network cache device the file block that is not cached by the network cache device and corresponds to the block information in the acquisition request, so that the network cache device caches the fed-back file block, so that when an acquisition request comprising the fed-back file block information is received, the cached file block is fed back to the user terminal.

[0007] In a fourth aspect, an embodiment of the present application provides a user terminal, comprising: a sending module, used to sequentially send multiple acquisition requests for applying for obtaining a target file to a network cache device, each acquisition request comprising a user identifier and block information of a file block corresponding to a user key, so that the network cache device searches for a cached file block corresponding to the block information in the acquisition request, and requests a file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, the user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device, the user key comprises at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block comprises one data block or more than two consecutive data blocks; a receiving module, used to receive a file block corresponding to the block information in the acquisition request fed back by the network cache device; an encryption / decryption module, used to encrypt and decrypt the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0008] In a fifth aspect, an embodiment of the present application provides a network caching device, comprising: a receiving module, used to receive multiple acquisition requests sent in sequence by a user terminal for applying for obtaining a target file, each acquisition request comprising a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by a file service device, the user key comprises at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block comprises one data block or more than two consecutive data blocks; a query module, used to search for cached file blocks corresponding to the block information in the acquisition request; a sending module, used to request the file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, and used to feed back the obtained file block corresponding to the block information in the acquisition request to the user terminal, so that the user terminal encrypts and decrypts the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0009] In a sixth aspect, an embodiment of the present application provides a file service device, comprising: a receiving module, used to receive a request from a network cache device for a file block corresponding to the block information in an acquisition request that is not cached by the network cache device, the acquisition request is sent sequentially by a user terminal to the network cache device, and is used to apply for acquisition of a target file, each acquisition request includes a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-issued to the user terminal by the file service device, the user key includes at least one data block, the user key is used by the user terminal to encrypt and decrypt the file block corresponding to the block information in the acquisition request to obtain the target file, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; a sending module, used to feedback to the network cache device the file block corresponding to the block information in the acquisition request that is not cached by the network cache device, so that the network cache device caches the fed-back file block, so that when an acquisition request including the fed-back file block information is received, the cached file block is fed back to the user terminal.

[0010] In a seventh aspect, an embodiment of the present application provides a user terminal, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the file access control method of the first aspect is implemented.

[0011] In an eighth aspect, an embodiment of the present application provides a network cache device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the file access control method of the second aspect is implemented.

[0012] In a ninth aspect, an embodiment of the present application provides a file service device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the file access control method of the third aspect is implemented.

[0013] In a tenth aspect, an embodiment of the present application provides a file access control system, comprising: a user terminal in the seventh aspect; a network cache device in the eighth aspect; and a file service device in the ninth aspect.

[0014] In the eleventh aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the file access control method of the first aspect, the file access control method of the second aspect, or the file access control method of the third aspect is implemented.

[0015] In the twelfth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the file access control method of the first aspect, the file access control method of the second aspect, or the file access control method of the third aspect.

[0016] The embodiment of the present application provides a file access control method, device, system, medium and program product. The file service device will pre-send the user key and the block information of the file block corresponding to the user key to the user terminal. The file block is divided according to the user key. At least part of the file blocks cached in the network cache device can be shared by multiple users accessing the same target file. In the case where the user terminal applies to obtain the target file, the user terminal can send acquisition requests to the network cache device in sequence. The acquisition request includes the user identifier and the block information of the file block corresponding to the user key. The network cache device can search for the cached file block corresponding to the block information in the acquisition request, and feed back the cached file block found to the user terminal. The transmission speed of the file block cached in the network cache device is fast, which can improve the speed of the user to obtain the target file. Moreover, different users have different user keys. The target file is obtained by encrypting and decrypting the obtained file block through the user key, which can also ensure the security of the user's access to the file, thereby achieving both the security of file access and the speed of the user obtaining the file. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A schematic diagram of the structure of a file access control system provided by an embodiment of the present application;

[0019] Figure 2 A flowchart of a file access control method provided in accordance with an embodiment of the first aspect of the present application;

[0020] Figure 3 A schematic diagram of an example of a user key and a file block provided in an embodiment of the present application;

[0021] Figure 4 A flowchart of a file access control method provided by another embodiment of the first aspect of the present application;

[0022] Figure 5 A flowchart of a file access control method provided in accordance with an embodiment of the second aspect of the present application;

[0023] Figure 6A flowchart of a file access control method provided in accordance with an embodiment of the third aspect of the present application;

[0024] Figure 7 A flowchart of a file access control method provided in another embodiment of the third aspect of the present application;

[0025] Figure 8 A schematic diagram of the structure of a user terminal provided in accordance with an embodiment of the fourth aspect of the present application;

[0026] Fig. 9 A schematic diagram of the structure of a network cache device provided in accordance with an embodiment of the fifth aspect of the present application;

[0027] Fig.10 A schematic diagram of the structure of a file service device provided in accordance with an embodiment of the sixth aspect of the present application;

[0028] Fig.11 A schematic diagram of the structure of a user terminal provided for an embodiment of the seventh aspect of the present application. DETAILED DESCRIPTION

[0029] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended only to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application. It should be noted that the acquisition, storage, use, and processing of information and data in the embodiments of the present application are authorized by users or relevant agencies, in compliance with the relevant provisions of national laws and regulations.

[0030] With the continuous development of big data technology and privacy computing technology, file access control systems are becoming more and more important, and file access security has become a focus of attention. Different users have different file access rights, and some files provided by business services can only be obtained by authorized users. For example, some report files can only be accessed by a certain group of users; for another example, copyrighted video files can only be viewed by paying users. Most of the files with access control have a large amount of data. It takes a long time for these files to be transmitted from the server that provides the files to the user end, which makes it slower for users to obtain these files.

[0031] In some related technologies, symmetric keys can be used to encrypt files. Different users with the permission to obtain files can obtain the same encrypted files. The network cache can be used to speed up the transmission speed of encrypted files. Users with the permission to obtain files can use symmetric keys to decrypt encrypted files to obtain the plain text content of the files. However, the symmetric keys of different users with the permission to obtain files are the same. If the symmetric keys are leaked, it will bring a very large security risk to file access. In order to make up for the defects of this security risk, asymmetric keys can be used to encrypt and decrypt files to improve the security of file access control. Asymmetric keys are paired public and private keys. Different users with the permission to obtain files have different paired public and private keys. Correspondingly, different users with the permission to obtain files obtain the same file, but the encrypted files are different. Therefore, it is impossible to use network cache to speed up the transmission speed of encrypted files. From the above content, it can be seen that in the field of file access control technology, it is difficult to have both the security of file access and the speed at which users obtain files.

[0032] The present application provides a file access control method, device, system, medium and program product, wherein a user key for encrypting a file applied for by a user is obtained based on data blocks divided into which the file applied for by the user is obtained, different user keys are allocated to different users, and the file can be divided into multiple file blocks according to the user keys. The file blocks are cached in a network cache device during the process of the user applying for obtaining the target file, and at least part of the file blocks cached in the network cache device can be used as common file blocks for other users to apply for obtaining the file. The common file blocks are transmitted using the network cache, which can improve the speed at which the user obtains the file, and different users have different user keys. The leakage of the user key of one user will not affect the user keys of other users, which can ensure the security of file access, thereby achieving both the security of file access and the speed at which the user obtains the file.

[0033] To facilitate understanding, the file access control system involved in the embodiment of the present application is first described here. Figure 1 A schematic diagram of the structure of a file access control system provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the file access control system includes a user terminal 11 , a network cache device 12 and a file service device 13 .

[0034] The user terminal 11 includes a terminal device used by the user, which can be implemented as a mobile phone, a desktop computer, a tablet computer, a smart watch, a smart bracelet, etc., which is not limited here. The user terminal 11 can be installed with a client for implementing a file access control function. The user terminal 11 can communicate and interact with the network cache device 12, and the user terminal 11 can also communicate and interact with the file service device 13.

[0035] The network cache device 12 is located at the edge of the network, closer to the user, and can quickly transmit data to the user terminal 11 of the user. In some examples, the network cache device 12 can be implemented as a content delivery network (Content Delivery Network, CDN). The network cache device 12 can communicate and interact with the file service device 13. The network cache device 12 can be implemented as a cloud device, which is not limited here.

[0036] The file service device 13 stores files that the user needs to obtain. In the embodiment of the present application, the file service device 13 can generate a user key assigned to the user, and can also store file blocks obtained by dividing the file, user identifiers of registered users, and the corresponding relationship between user identifiers and user keys. The file service device 13 can be implemented as a cloud device, which is not limited here.

[0037] When the user terminal 11 applies to obtain a file, it may first initiate a request to the network cache device 12, and first perform a cache search in the network cache device 12. If the network cache device 12 has the data requested by the user terminal 11, the corresponding data is directly fed back to the user terminal 11; if the network cache device 12 does not have the data requested by the user terminal, the network cache device 12 initiates a request to the file service device 13 to obtain the corresponding data, and after obtaining the corresponding data, the data is cached in the network cache device 12.

[0038] The file access control method, device, system, medium and program product provided by the present application are described below respectively.

[0039] A first aspect of the present application provides a file access control method, which can be applied to a user terminal, that is, the file access control method can be executed by the user terminal. Figure 2 A flowchart of a file access control method provided in an embodiment of the first aspect of the present application is shown in FIG. Figure 2 As shown, the file access control method may include steps S201 to S203.

[0040] In step S201, multiple acquisition requests for applying for obtaining the target file are sent to the network cache device in sequence, so that the network cache device searches for cached file blocks corresponding to the block information in the acquisition request, and requests the file service device for file blocks corresponding to the block information in the acquisition request that are not cached by the network cache device.

[0041] Each acquisition request includes a user identifier and block information of a file block corresponding to a user key. The user identifier is used to identify a user and can be implemented as a user ID or other information that can identify a user. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block, and the data block is obtained by dividing the target file. Specifically, the user key may consist of one data block, or the user key may consist of more than two different data blocks. For example, the target file i may be divided into n data blocks, n is an integer greater than 1, ik represents the kth data block of the target file i, the user key may include one data block, such as the user key may be data block i3, the user key may be i5, which is not limited here; the user key may include more than two different data blocks, such as the user key may include data block i3 and data block i7, the user key may include data block i4, data block i9 and data block i15, which is not limited here. In the case where the target file is divided into n data blocks, any combination of x data blocks in the n data blocks can be determined as a user key. Correspondingly, in theory, the file service device can generate 2 n -2 different user keys. However, in order to generate file blocks cached in the network cache device and accessible to multiple users, user keys that do not include the first data block and / or the last data block may be distributed to the user as much as possible.

[0042] The file blocks are obtained by dividing the target file according to the user key, and the file blocks include one data block or two or more consecutive data blocks. The file blocks can be divided at the data blocks in the target file that are consistent with the data blocks in the user key, so as to obtain the file blocks, and the data blocks as the block heads and / or the data blocks as the block tails in the file blocks are consistent with the data blocks in the user key. Each data block in the user key appears an even number of times in all file blocks, and each data block in the non-user key appears an odd number of times in all file blocks. For example, Figure 3 A schematic diagram of an example of a user key and a file block provided in an embodiment of the present application, such as Figure 3As shown, the target file i can be divided into n data blocks, ik represents the kth data block of the target file i, and the user key is composed of the 4th data block i4 and the 9th data block i9 of the target file. Correspondingly, the file service device can split the target file from the 4th data block i4 and the 9th data block i9 to obtain file block 1, file block 2 and file block 3. File block 1 includes data blocks i1 to data blocks i4, file block 2 includes data blocks i4 to data blocks i9, and file block 3 includes data blocks i9 to data blocks in; data block i4 is the block end of file block 1 and the block beginning of file block 2, and data block i9 is the block end of file block 2 and the block beginning of file block 3. Data blocks i4 and data blocks i9 appear twice in all file blocks respectively, and other data blocks appear once in all file blocks. Block information can indicate file blocks. In some examples, block information can include but is not limited to file block identifiers. It should be noted that different target files are divided into different data blocks, and the corresponding generated user keys are also different, and the file blocks obtained by dividing different target files are also different.

[0043] In the embodiment of the present application, each acquisition request may be used to request a file block of a target file, and the file blocks corresponding to multiple acquisition requests sent sequentially by the user terminal to the network cache device may be combined into a target file.

[0044] After receiving the acquisition request, the network cache device searches the network cache device for the file blocks indicated by the block information in the acquisition request according to the block information in the acquisition request. If the network cache device has the file blocks indicated by the block information in the acquisition request cached, the network cache device feeds back the found file blocks to the user terminal. If the network cache device does not cache the file blocks indicated by the block information in the acquisition request, the network cache device requests the file service device for the uncached file blocks corresponding to the block information in the acquisition request, and caches the requested file blocks in the network cache device, that is, the uncached file blocks corresponding to the block information in the acquisition request requested from the file service device are cached in the network cache device. Although different users have different user keys, there may be one or more identical data blocks in the user keys of different users. In this case, there may be some identical file blocks in the file blocks corresponding to the user keys of different users. These identical file blocks are cached in the network cache device and can be obtained by multiple users. The transmission speed of these identical file blocks is faster, thereby improving the speed at which users obtain the entire target file.

[0045] For example, target file i can be divided into n data blocks, ik represents the kth data block of target file i, and the user key obtained by user 1 when obtaining target file i includes data block i4 and data block i9. Then, when user 1 applies for target file i, the file blocks cached in the network cache device include file blocks i1i2i3i4, file blocks i4i5i6i7i8i9 and file blocks i9…in, and the user key obtained by user 2 when obtaining target file i includes data block i4, data block i7 and data block i9. The file blocks required to be requested by user 2 include file blocks i1i2i3i4, file blocks i4i5i6i7, file blocks i7i8i9 and file blocks i9…in. When user 2 applies for the above file blocks, file blocks i4i5i6i7 and file blocks i7i8i9 still need to be obtained by the network cache device from the file service device, but file blocks i1i2i3i4 and file blocks i9…in can be directly obtained from the network cache device, which greatly improves the speed at which user 2 obtains target file i. In an embodiment of the present application, file blocks requested by some users are cached in a network cache device to speed up the speed at which other users obtain files.

[0046] In step S202, a file block corresponding to the block information in the acquisition request is received from the network cache device.

[0047] The network cache device may feed back to the user terminal the cached file blocks corresponding to the block information in the acquisition request and / or the file blocks requested from the file service device corresponding to the block information in the acquisition request.

[0048] In step S203, the file block corresponding to the block information in the acquisition request is encrypted and decrypted based on the user key to obtain the target file.

[0049] The user terminal receives scattered file blocks, which have not yet been combined into the target file. The file blocks are divided based on the user key. By encrypting the file blocks according to the user key, the ciphertext of the target file can be obtained on the one hand, and the scattered file blocks can be combined on the other hand. After obtaining the ciphertext of the target file, the ciphertext of the target file can be decrypted using the user key to obtain the target file.

[0050] In an embodiment of the present application, the file service device will pre-send the user key and the block information of the file block corresponding to the user key to the user terminal. The file block is divided according to the user key, and at least part of the file blocks cached in the network cache device can be shared by multiple users who access the same target file. In the case where the user terminal applies to obtain the target file, the user terminal can send acquisition requests to the network cache device in sequence, and the acquisition request includes the user identifier and the block information of the file block corresponding to the user key. The network cache device can search for the cached file blocks corresponding to the block information in the acquisition request, and feed back the cached file blocks found to the user terminal. The transmission speed of the file blocks cached in the network cache device is fast, which can improve the speed of users obtaining target files. Moreover, different users have different user keys. The target file is obtained by encrypting and decrypting the obtained file blocks through the user key, which can also ensure the security of the user's access to the file, thereby achieving both the security of file access and the speed of user acquisition of files.

[0051] In some embodiments, the above step S203 can be specifically refined as follows: encrypting the file block corresponding to the block information in the acquisition request according to the user key to obtain the target ciphertext, where the target ciphertext is the ciphertext of the target file; decrypting the target ciphertext according to the user key to obtain the target file.

[0052] All file blocks related to the target file obtained by the user terminal are encrypted according to the user key, and the file blocks can be combined to obtain the target ciphertext. The specific encryption algorithm is not limited here, and the algorithm that can combine the file blocks together by encryption to obtain the ciphertext of the target file as a whole is within the protection scope of the embodiments of the present application. In some examples, the data block at the beginning of the file block and / or the data block at the end of the file block is consistent with the data block in the user key, and the file block whose end and beginning are the same data block in the user key can be spliced, and the data blocks at the splicing of the file blocks are XORed to obtain the target ciphertext. For example, the target file i is divided into n data blocks, ik represents the kth data block of the target file i, the user key is composed of the 4th data block i4 and the 9th data block i9 of the target file, and the file blocks are divided as follows. Figure 3 As shown, the user terminal receives file block 1, file block 2 and file block 3. The joint of file block 1 and file block 2 includes the block tail of file block 1, i.e., data block i4 in file block 1, and the block head of file block 2, i.e., data block i4 in file block 2. The joint of file block 2 and file block 3 includes the block tail of file block 2, i.e., data block i9 in file block 2, and the block head of file block 3, i.e., data block i9 in file block 3. The target ciphertext can be expressed as i1i2i3(i4⊕i4)i5i6i7i8(i9⊕i9)…in, where ⊕ is the XOR operator symbol. It can be obtained that the XOR operation can not only achieve the encryption effect, but also can splice the file blocks together to form a complete file as a whole (ciphertext form).

[0053] The target file requested by the user needs to be presented in plain text form in the end, and the target ciphertext needs to be decrypted to restore the target original text. The decryption algorithm corresponds to the encryption algorithm and is not limited here. In some examples, the encryption algorithm uses an XOR operation, and the data block at the beginning of the file block and / or the data block at the end of the file block is consistent with the data block in the user key. The data block in the user key can be XORed with the data block at the junction of the corresponding file block to obtain the target file. After the XOR operation, it can be restored to the data itself. For example, as in the previous example, the target file i is divided into n data blocks, ik represents the kth data block of the target file i, and the user key is composed of the 4th data block i4 and the 9th data block i9 of the target file. The division of the file blocks is as follows Figure 3 As shown, the target ciphertext is represented as i1i2i3(i4⊕i4)i5i6i7i8(i9⊕i9)…in. By using the data block i4 and the data block i9 in the user key to perform an XOR operation on the concatenation of the target ciphertext, we can obtain i1i2i3(i4⊕i4⊕i4)i5i6i7i8(i9⊕i9⊕i9)…in=i1i2i3i4i5i6i7i8i9…in, that is, the target file is restored.

[0054] In some embodiments, the file service device generates multiple different user keys and file blocks corresponding to each user key. When the user terminal requests the file service device to obtain the target file, the file service device can send the user key and the block information of the corresponding file block to the user terminal. Figure 4 A flowchart of a file access control method provided by another embodiment of the first aspect of the present application, Figure 4 and Figure 2 The difference is that Figure 4 The file access control method shown may further include step S204 and step S205.

[0055] In step S204, a file acquisition request is sent to the file service device.

[0056] The file acquisition request is used to request to acquire a target file, and the file acquisition request may include a user identifier.

[0057] In step S205, file acquisition response information fed back by the file service device is received.

[0058] The file service device receives the file acquisition request, allocates a user key pre-generated based on the target file and the block information of the file block corresponding to the user key to the user indicated by the user identifier, generates a file acquisition response message and sends it to the user terminal. The file acquisition response message includes the user key corresponding to the user identifier and the block information of the file block corresponding to the user key. After the user terminal obtains the user key of the user and the block information of the file block corresponding to the user key, steps S201 to S203 in the above embodiment can be executed.

[0059] After the file service device allocates a user key to the user, the file service device stores the corresponding relationship between the user identifier and the user key, so that the user and the user key can be traced back in case the user key is leaked.

[0060] The file service device may pre-initialize and generate a user key. For example, the file service device may generate 2 n -2 different user keys form a key set, in which the unassigned user keys are stored. Each time the file service device receives a file acquisition request from a user requesting to acquire target file i, it allocates a user key to the user, deletes the allocated user key from the key set, and records the corresponding relationship between the user identifier and the user key. n -Some user keys out of 2 different user keys are assigned to users, and different users are assigned different user keys. That is to say, the file service device does not distribute all user keys, but reserves a certain amount of user keys. On the one hand, the reserved user keys can be used to update the user's user keys. For example, if a user's user key is leaked and needs to be reallocated, the reserved unallocated user key can be used as the updated user key of the user to ensure the security of the user's access to files. On the other hand, user keys for file blocks that are difficult to generate and can be shared by multiple users can be retained, and user keys for file blocks that are easier to generate and can be shared by multiple users can be issued to users first, further improving the speed at which users obtain files.

[0061] In some embodiments, the corresponding relationship between the user identifier and the user key can be used to trace the leaked user key. In the case where the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, the user key of the original legal user is updated, and the updated user key of the original legal user is a user key that has not been allocated before. The original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0062] The user key corresponding to the user ID and the block information does not have a corresponding relationship, indicating that the user key has not been assigned to the user indicated by the user ID, so that the user indicated by the user ID can be determined as an illegal user, where the illegal user refers to a user who uses the user key of another user. In this case, the file service device can combine the corresponding relationship between the user key and the user ID, determine the original legal user according to the user key, and reallocate the user key to the original legal user to ensure the security of the user's access to the file.

[0063] The file access control method provided in the embodiment of the present application can not only utilize the network cache to cache file blocks common to multiple users to increase the speed at which users obtain files, but also utilize the authorized user's unique user key to ensure the user's access to files, thereby achieving both file access security and file acquisition speed.

[0064] A second aspect of the present application provides a file access control method, which is applied to a network cache device, that is, the file access control method can be executed by the network cache device. Figure 5 A flowchart of a file access control method provided in an embodiment of the second aspect of the present application is as follows: Figure 5 As shown, the file access control method may include steps S301 to S303.

[0065] In step S301, multiple acquisition requests for applying for acquiring a target file are received in sequence from a user terminal.

[0066] Each acquisition request includes a user identifier and block information of a file block corresponding to a user key. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block. The data block is obtained by dividing the target file. The file block is obtained by dividing the target file according to the user key. The file block includes one data block or two or more consecutive data blocks.

[0067] In step S302, cached file blocks corresponding to the block information in the acquisition request are searched, and the file service device is requested for file blocks corresponding to the block information in the acquisition request that are not cached by the network cache device.

[0068] In step S303, the obtained file block corresponding to the block information in the acquisition request is fed back to the user terminal, so that the user terminal encrypts and decrypts the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0069] In an embodiment of the present application, the file service device will pre-send the user key and the block information of the file block corresponding to the user key to the user terminal. The file block is divided according to the user key, and at least part of the file blocks cached in the network cache device can be shared by multiple users who access the same target file. In the case where the user terminal applies to obtain the target file, the user terminal can send acquisition requests to the network cache device in sequence, and the acquisition request includes the user identifier and the block information of the file block corresponding to the user key. The network cache device can search for the cached file blocks corresponding to the block information in the acquisition request, and feed back the cached file blocks found to the user terminal. The transmission speed of the file blocks cached in the network cache device is fast, which can improve the speed of users obtaining target files. Moreover, different users have different user keys. The target file is obtained by encrypting and decrypting the obtained file blocks through the user key, which can also ensure the security of the user's access to the file, thereby achieving both the security of file access and the speed of user acquisition of files.

[0070] In some embodiments, the file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain the target ciphertext, and the target ciphertext is the ciphertext of the target file. The target ciphertext is decrypted according to the user key to obtain the target file.

[0071] In some examples, the target ciphertext is obtained by concatenating the file blocks whose end and beginning are the same data block in the user key and performing an XOR operation on the data blocks at the file concatenation. The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the corresponding file block at the concatenation.

[0072] In some embodiments, the file service device generates a plurality of different user keys and a file block corresponding to each user key. Before receiving a plurality of acquisition requests for applying for obtaining a target file sent in sequence by a user terminal, the user terminal and the file service device use a file acquisition request and a file acquisition response message to enable the user terminal to obtain the user key and the block information of the file block corresponding to the user key. The file acquisition request includes a user identifier. The file acquisition response message includes a user key corresponding to the user identifier and the block information of the file block corresponding to the user key. The file service device stores the correspondence between the user identifier and the user key.

[0073] In some embodiments, the above-mentioned step S302 of requesting the file service device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request can be specifically refined as follows: if there is no file block corresponding to the block information in the acquisition request in the cached file blocks, sending a file block acquisition request to the file service device, the file block acquisition request including uncached block information, the uncached block information corresponding to the file block that is not cached by the network cache device and corresponds to the block information in the acquisition request; receiving the file block corresponding to the uncached block information fed back by the file service device and caching it.

[0074] In some examples, the target file is divided into n data blocks, and the file service device generates 2 n -2 different user keys, where n is an integer greater than 1.

[0075] File server device 2 n -Some user keys among 2 different user keys are allocated to users, and different users are allocated different user keys.

[0076] In some embodiments, when the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, the user key of the original legal user is updated, and the updated user key of the original legal user is a previously unassigned user key. The original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0077] The specific contents in the second aspect embodiment of the present application can refer to the relevant descriptions in the above-mentioned first aspect embodiment, and the same technical effects can be achieved, so they will not be repeated here.

[0078] A third aspect of the present application provides a file access control method that can be applied to a file service device, that is, the file access control method can be executed by a file service device. Figure 6 A flowchart of a file access control method provided in an embodiment of the third aspect of the present application is as follows: Figure 6 As shown, the file access control method may include step S401 and step S402.

[0079] In step S401, a request is received from a network cache device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request.

[0080] The acquisition request is sent sequentially by the user terminal to the network cache device to apply for the acquisition of the target file. Each acquisition request includes a user identifier and block information of the file block corresponding to the user key. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block. The user key is used by the user terminal to encrypt and decrypt the file block corresponding to the block information in the acquisition request to obtain the target file. The data block is obtained by dividing the target file. The file block is obtained by dividing the target file according to the user key. The file block includes one data block or more than two consecutive data blocks.

[0081] In step S402, the file blocks that are not cached by the network cache device and correspond to the block information in the acquisition request are fed back to the network cache device, so that the network cache device caches the fed-back file blocks, so that when the acquisition request including the block information of the fed-back file blocks is received, the cached file blocks are fed back to the user terminal.

[0082] In an embodiment of the present application, the file service device will pre-send the user key and the block information of the file block corresponding to the user key to the user terminal. The file block is divided according to the user key, and at least part of the file blocks cached in the network cache device can be shared by multiple users who access the same target file. In the case where the user terminal applies to obtain the target file, the user terminal can send acquisition requests to the network cache device in sequence, and the acquisition request includes the user identifier and the block information of the file block corresponding to the user key. The network cache device can search for the cached file blocks corresponding to the block information in the acquisition request, and feed back the cached file blocks found to the user terminal. The transmission speed of the file blocks cached in the network cache device is fast, which can improve the speed of users obtaining target files. Moreover, different users have different user keys. The target file is obtained by encrypting and decrypting the obtained file blocks through the user key, which can also ensure the security of the user's access to the file, thereby achieving both the security of file access and the speed of user acquisition of files.

[0083] In some embodiments, the file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain the target ciphertext, and the target ciphertext is the ciphertext of the target file. The target ciphertext is decrypted according to the user key to obtain the target file.

[0084] In some examples, the target ciphertext is obtained by concatenating the file blocks whose end and beginning are the same data block in the user key and performing an XOR operation on the data blocks at the file concatenation. The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the corresponding file block at the concatenation.

[0085] In some embodiments, the file service device generates a plurality of different user keys and a file block corresponding to each user key, and the file service device stores the correspondence between the user identifier and the user key. Figure 7 A flowchart of a file access control method provided by another embodiment of the third aspect of the present application, Figure 7 and Figure 6 The difference is that Figure 7 The file access control method shown may further include steps S403 to S405.

[0086] In step S403, a file acquisition request sent by a user terminal is received.

[0087] The file retrieval request includes a user identifier.

[0088] In step S404, according to the correspondence between the user identifier and the user key, the user key corresponding to the user identifier in the file acquisition request and the block information of the file block corresponding to the user key are determined;

[0089] In step S405, file acquisition response information is fed back to the file service device.

[0090] The file acquisition response information includes a user key corresponding to the user identifier in the file acquisition request and block information of the file block corresponding to the user key.

[0091] In some examples, the target file is divided into n data blocks, and 2 n -2 different user keys, where n is an integer greater than 1. n -Some of the two different user keys are allocated to the user who applied for the user key, and different users are allocated different user keys.

[0092] In some embodiments, when the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the file service device determines that the user indicated by the user identifier is an illegal user; the file service device updates the user key of the original legal user with the user key that was not previously assigned. The updated user key of the original legal user is one of the user keys that were not previously assigned. The original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0093] The specific contents in the embodiments of the third aspect of the present application can refer to the relevant descriptions in the embodiments of the first aspect mentioned above, and the same technical effects can be achieved, so they will not be repeated here.

[0094] For ease of understanding, here are examples of the registration scenario involved in the file access control method of the embodiment of the present application, the scenario in which the file block requested by the user does not hit the file block cached by the network cache device, the scenario in which the file block requested by the user does not hit the file block cached by the network cache device, and the file block encryption and decryption scenario.

[0095] (1) Registration scenario

[0096] This scenario may include step a1 and step a2.

[0097] In step a1, the user terminal sends a registration message to the file service device, where the registration message includes a user identifier.

[0098] In step a2, the file service device saves the user identification in the registered user information table to complete the user registration.

[0099] (2) Scenario where the file block requested by the user does not hit the file block cached by the network cache device

[0100] This scenario may include steps b1 to b6.

[0101] In step b1, the user terminal sends a file acquisition request to the file service device.

[0102] In step b2, the file service device allocates a pre-generated user key and block information of the file block corresponding to the user key to the user indicated by the user identifier in the file acquisition request, and feeds the above information back to the user terminal.

[0103] In step b3, the user terminal sends an acquisition request to the network cache device.

[0104] In step b4, if the network cache device does not cache the file block corresponding to the block information in the acquisition request, the network cache device sends a file block acquisition request to the file service device.

[0105] In step b5, the file service device feeds back the file block corresponding to the uncached block information in the file block acquisition request to the network cache device.

[0106] In step b6, the network cache device caches the file blocks fed back by the file service device, and feeds the file blocks back to the user terminal.

[0107] (3) Scenario where the file block requested by the user does not hit the file block cached by the network cache device

[0108] This scenario may include steps c1 to c4.

[0109] In step c1, the user terminal sends a file acquisition request to the file service device.

[0110] In step c2, the file service device allocates a pre-generated user key and block information of the file block corresponding to the user key to the user indicated by the user identifier in the file acquisition request, and feeds the above information back to the user terminal.

[0111] In step c3, the user terminal sends an acquisition request to the network cache device.

[0112] In step c4, if the network cache device caches the file block corresponding to the block information in the acquisition request, the network cache device feeds the file block back to the user terminal.

[0113] It should be noted that if some of the file blocks corresponding to the block information in the multiple acquisition information sent by the user terminal are cached in the network cache device and some are not cached in the network cache device, the file blocks cached in the network cache device can be processed according to steps b4 to b6, and the file blocks not cached in the network cache device can be processed according to step c4.

[0114] (4) File block encryption and decryption scenarios

[0115] The file block encryption and decryption scenario may include steps d1 to d3.

[0116] In step d1, the user terminal obtains multiple file blocks of the target file.

[0117] In step d2, the file blocks whose block tails and block heads are the same data block in the user key are concatenated, and an XOR operation is performed on the data blocks at the concatenation of the file blocks to obtain the target ciphertext.

[0118] In step d3, an XOR operation is performed on the data block in the user key and the data block at the joint of the corresponding file block to obtain the target file.

[0119] The specific contents of the above steps a1 to a2, b1 to b6, c1 to c4, and d1 to d3 can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.

[0120] A fourth aspect of the present application provides a user terminal. Figure 8 A schematic diagram of the structure of a user terminal provided in an embodiment of the fourth aspect of the present application, such as Figure 8 As shown, the user terminal 500 may include a sending module 501 , a receiving module 502 , and an encryption and decryption module 503 .

[0121] The sending module 501 can be used to send multiple acquisition requests for applying for obtaining the target file to the network cache device in sequence, so that the network cache device searches for the cached file blocks corresponding to the block information in the acquisition request, and requests the file service device to request the file blocks corresponding to the block information in the acquisition request that are not cached by the network cache device.

[0122] Each acquisition request includes a user identifier and block information of a file block corresponding to a user key. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block. The data block is obtained by dividing the target file. The file block is obtained by dividing the target file according to the user key. The file block includes one data block or two or more consecutive data blocks.

[0123] The receiving module 502 may be configured to receive a file block fed back by a network cache device and corresponding to the block information in the acquisition request.

[0124] The encryption and decryption module 503 may be used to perform encryption and decryption processing on the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0125] In some embodiments, the encryption and decryption module 503 can be used to: encrypt the file block corresponding to the block information in the acquisition request according to the user key to obtain the target ciphertext, where the target ciphertext is the ciphertext of the target file; decrypt the target ciphertext according to the user key to obtain the target file.

[0126] In some examples, the data block at the beginning of the file block and / or the data block at the end of the file block is consistent with the data block in the user key. The encryption and decryption module 503 can be specifically used to: splice the file blocks whose end and beginning are the same data block in the user key, and perform an XOR operation on the data blocks at the splicing of the file blocks to obtain the target ciphertext. The encryption and decryption module 503 can be specifically used to: perform an XOR operation on the data blocks in the user key and the corresponding data blocks at the splicing of the file blocks to obtain the target file.

[0127] In some embodiments, the file service device generates a plurality of different user keys and a file block corresponding to each user key.

[0128] The sending module 501 may also be used to send a file acquisition request to the file service device, where the file acquisition request includes a user identifier.

[0129] The receiving module 502 can also be used to: receive file acquisition response information fed back by the file service device, the file acquisition response information includes a user key corresponding to the user identifier and block information of the file block corresponding to the user key, and the file service device stores the correspondence between the user identifier and the user key.

[0130] In some embodiments, the uncached file blocks requested from the file service device and corresponding to the block information in the acquisition request are cached in the network cache device.

[0131] In some examples, the target file is divided into n data blocks, and the file service device generates 2 n -2 different user keys, n is an integer greater than 1. n -Some user keys among 2 different user keys are allocated to users, and different users are allocated different user keys.

[0132] In some embodiments, when the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, and the user key of the original legal user is updated. The updated user key of the original legal user is a user key that was not previously assigned. The original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0133] It should be noted that the user terminal 500 is a device corresponding to the file access control method in the above-mentioned first aspect embodiment. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0134] A fifth aspect of the present application provides a network cache device. Fig. 9 A schematic diagram of the structure of a network cache device provided in an embodiment of the fifth aspect of the present application is shown in FIG. Fig. 9 As shown, the network cache device 600 may include a receiving module 601 , a query module 602 and a sending module 603 .

[0135] The receiving module 601 may be configured to receive multiple acquisition requests sent sequentially by a user terminal for applying to acquire a target file.

[0136] Each acquisition request includes a user identifier and block information of a file block corresponding to a user key. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block. The data block is obtained by dividing the target file. The file block is obtained by dividing the target file according to the user key. The file block includes one data block or two or more consecutive data blocks.

[0137] The query module 602 may be used to search for cached file blocks corresponding to the block information in the acquisition request.

[0138] The sending module 603 can be used to request the file service device for the file block corresponding to the block information in the acquisition request that is not cached by the network cache device, and to feed back the obtained file block corresponding to the block information in the acquisition request to the user terminal, so that the user terminal encrypts and decrypts the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

[0139] In some embodiments, the file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain the target ciphertext, and the target ciphertext is the ciphertext of the target file. The target ciphertext is decrypted according to the user key to obtain the target file.

[0140] In some examples, the target ciphertext is obtained by concatenating the file blocks whose end and beginning are the same data block in the user key and performing an XOR operation on the data blocks at the file concatenation. The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the corresponding file block at the concatenation.

[0141] In some embodiments, the file service device generates a plurality of different user keys and a file block corresponding to each user key. Before receiving a plurality of acquisition requests for applying for obtaining a target file sent in sequence by a user terminal, the user terminal and the file service device use a file acquisition request and a file acquisition response message to enable the user terminal to obtain the user key and the block information of the file block corresponding to the user key. The file acquisition request includes a user identifier. The file acquisition response message includes a user key corresponding to the user identifier and the block information of the file block corresponding to the user key. The file service device stores the correspondence between the user identifier and the user key.

[0142] In some embodiments, the sending module 603 may be used to: if there is no file block corresponding to the block information in the acquisition request in the cached file blocks, send a file block acquisition request to the file service device. The file block acquisition request includes uncached block information. The uncached block information corresponds to the file block corresponding to the block information in the acquisition request that is not cached by the network cache device.

[0143] The receiving module 601 may be used to receive and cache file blocks corresponding to the uncached block information fed back by the file service device.

[0144] In some examples, the target file is divided into n data blocks, and the file service device generates 2 n -2 different user keys, n is an integer greater than 1. n -Some user keys among 2 different user keys are allocated to users, and different users are allocated different user keys.

[0145] In some embodiments, when the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, and the user key of the original legal user is updated. The updated user key of the original legal user is a user key that was not previously assigned. The original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0146] It should be noted that the network cache device 600 is a device corresponding to the file access control method in the above-mentioned second aspect embodiment. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0147] A sixth aspect of the present application provides a file service device. Fig.10A structural diagram of a file service device provided in an embodiment of the sixth aspect of the present application is shown in FIG. Fig.10 As shown, the file service device 700 may include a receiving module 701 and a sending module 702 .

[0148] The receiving module 701 may be configured to receive a request from a network cache device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request.

[0149] The acquisition request is sent sequentially by the user terminal to the network cache device to apply for the acquisition of the target file. Each acquisition request includes a user identifier and block information of the file block corresponding to the user key. The user key and the block information of the file block corresponding to the user key are pre-sent to the user terminal by the file service device. The user key includes at least one data block. The user key is used by the user terminal to encrypt and decrypt the file block corresponding to the block information in the acquisition request to obtain the target file. The data block is obtained by dividing the target file. The file block is obtained by dividing the target file according to the user key. The file block includes one data block or more than two consecutive data blocks.

[0150] The sending module 702 can be used to feed back to the network cache device the file blocks that are not cached by the network cache device and correspond to the block information in the acquisition request, so that the network cache device caches the fed-back file blocks, so that when receiving the acquisition request including the block information of the fed-back file blocks, the cached file blocks are fed back to the user terminal.

[0151] In some embodiments, the file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain the target ciphertext, and the target ciphertext is the ciphertext of the target file. The target ciphertext is decrypted according to the user key to obtain the target file.

[0152] In some examples, the target ciphertext is obtained by concatenating the file blocks whose end and beginning are the same data block in the user key and performing an XOR operation on the data blocks at the file concatenation. The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the corresponding file block at the concatenation.

[0153] In some embodiments, the file service device generates a plurality of different user keys and a file block corresponding to each user key, and the file service device stores the corresponding relationship between the user identifier and the user key. The file service device 700 may further include an information determination module.

[0154] The receiving module 701 may be used to: receive a file acquisition request sent by a user terminal, where the file acquisition request includes a user identifier.

[0155] The information determination module can be used to determine the user key corresponding to the user identifier in the file acquisition request and the block information of the file block corresponding to the user key according to the corresponding relationship between the user identifier and the user key.

[0156] The sending module 702 may be used to feed back file acquisition response information to the file service device, where the file acquisition response information includes a user key corresponding to the user identifier in the file acquisition request and block information of the file block corresponding to the user key.

[0157] In some embodiments, the file service device 700 may further include a key generation module and a key distribution module.

[0158] The key generation module can be used to: divide the target file into n data blocks, generate 2 n -2 different user keys, where n is an integer greater than 1.

[0159] The key distribution module can be used to: n -Some of the two different user keys are allocated to the user who applied for the user key, and different users are allocated different user keys.

[0160] In some embodiments, the file service device 700 may further include an illegal user determination module and a key update module.

[0161] The illegal user determination module may be used to determine that the user indicated by the user identifier is an illegal user when there is no corresponding relationship between the user identifier in the acquisition request and the user key corresponding to the block information.

[0162] The key update module can be used to update the user key of the original legal user with the previously unallocated user key. The updated user key of the original legal user is one of the previously unallocated user keys. The original legal user includes the user indicated by the user identifier having a corresponding relationship with the user key corresponding to the block information in the acquisition request.

[0163] It should be noted that the file service device 700 is a device corresponding to the file access control method in the above-mentioned third aspect embodiment. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0164] The seventh aspect of the present application also provides a user terminal. Fig.11 A schematic diagram of the structure of a user terminal provided in an embodiment of the seventh aspect of the present application, such as Fig.11 As shown, the user terminal 800 includes a memory 801 , a processor 802 , and a computer program stored in the memory 801 and executable on the processor 802 .

[0165] In some examples, the processor 802 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0166] The memory 801 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the file access control method in the embodiment of the first aspect of the present application.

[0167] The processor 802 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 801, so as to implement the file access control method in the above-mentioned first aspect embodiment.

[0168] In some examples, the user terminal 800 may further include a communication interface 803 and a bus 804. Fig.11 As shown, the memory 801, the processor 802, and the communication interface 803 are connected via a bus 804 and communicate with each other.

[0169] The communication interface 803 is mainly used to realize the communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication interface 803 can also be used to access input devices and / or output devices.

[0170] The bus 804 includes hardware, software, or both, coupling the components of the user terminal 800 to each other. By way of example and not limitation, the bus 804 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 804 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0171] An eighth aspect of the present application provides a network cache device, which may include a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0172] The memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the file access control method in the embodiment of the second aspect of the present application.

[0173] The processor runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the file access control method in the above-mentioned second aspect embodiment.

[0174] In some examples, the network cache device may also include a communication interface and a bus, and the memory, processor, and communication interface are connected through the bus to communicate with each other.

[0175] The connection between the memory, processor, communication interface, and bus in the network cache device and the specific implementation method can be found in the relevant description of the embodiment of the user terminal in the seventh aspect above, and will not be repeated here.

[0176] A ninth aspect of the present application provides a file service device, which may include a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0177] The memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the file access control method in the embodiment of the third aspect of the present application.

[0178] The processor runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the file access control method in the above-mentioned third aspect embodiment.

[0179] In some examples, the file service device may also include a communication interface and a bus, and the memory, processor, and communication interface are connected through the bus to communicate with each other.

[0180] The connection between the memory, processor, communication interface, and bus in the network cache device and the specific implementation method can be found in the relevant description of the embodiment of the user terminal in the seventh aspect above, and will not be repeated here.

[0181] The tenth aspect of the present application provides a file access control system, which includes a user terminal, a network cache device and a file service device in the above embodiment. The specific contents can be found in the relevant descriptions in the above embodiment, which will not be repeated here.

[0182] In the eleventh aspect of the present application, a computer-readable storage medium is provided, on which a computer program instruction is stored. When the computer program instruction is executed by a processor, the file access control method in the first aspect embodiment, the file access control method in the second aspect embodiment, or the file access control method in the third aspect embodiment can be implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (RandomAccess Memory, referred to as RAM), a disk or an optical disk, etc., which is not limited here.

[0183] The twelfth aspect of the present application provides a computer program product, which may include a computer program. When the computer program is executed by a processor, it implements the file access control method in the first aspect embodiment, the file access control method in the second aspect embodiment, or the file access control method in the third aspect embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0184] It should be clear that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. For user terminal embodiments, network cache device embodiments, file service device embodiments, system embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can refer to the description part of the method embodiment. The present application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.

[0185] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0186] Those skilled in the art should understand that the above embodiments are exemplary rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on the study of the drawings, the specification and the claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "one" does not exclude multiple; the terms "first" and "second" are used to indicate names rather than to indicate any specific order. Any figure marks in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.

Claims

1. A file access control method, characterized in that: Applied to a user terminal, the method comprises: Sending multiple acquisition requests for applying for obtaining a target file to a network cache device in sequence, each acquisition request including a user identifier and block information of a file block corresponding to a user key, so that the network cache device searches for a cached file block corresponding to the block information in the acquisition request, and requests a file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, the user key and the block information of the file block corresponding to the user key are pre-sent by the file service device to the user terminal, the user key includes at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; Receiving a file block fed back by the network cache device and corresponding to the block information in the acquisition request; The file block corresponding to the block information in the acquisition request is encrypted and decrypted based on the user key to obtain the target file.

2. The method according to claim 1, characterized in that The encrypting and decrypting the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file includes: Encrypting the file block corresponding to the block information in the acquisition request according to the user key to obtain a target ciphertext, where the target ciphertext is the ciphertext of the target file; The target ciphertext is decrypted according to the user key to obtain the target file.

3. The method according to claim 2, characterized in that The data block at the beginning of the file block and / or the data block at the end of the file block is consistent with the data block in the user key; The step of encrypting the file block corresponding to the block information in the acquisition request according to the user key to obtain the target ciphertext includes: splicing the file blocks whose block tails and block heads are the same data block in the user key, and performing an XOR operation on the data blocks at the splicing of the file blocks to obtain the target ciphertext; The step of decrypting the target ciphertext according to the user key to obtain the target file includes: The target file is obtained by performing an XOR operation on the data block in the user key and the data block at the joint of the corresponding file block.

4. The method according to claim 1, characterized in that: The file service device generates a plurality of different user keys and a file block corresponding to each user key; Before the multiple acquisition requests for applying for acquiring the target file are sequentially sent to the network cache device, the method further includes: Sending a file acquisition request to the file service device, wherein the file acquisition request includes the user identifier; The file acquisition response information fed back by the file service device is received, the file acquisition response information including the user key corresponding to the user identifier and block information of the file block corresponding to the user key, and the file service device stores the corresponding relationship between the user identifier and the user key.

5. The method according to claim 1, characterized in that The uncached file blocks requested from the file service device and corresponding to the block information in the acquisition request are cached in the network cache device.

6. The method according to claim 1, characterized in that The target file is divided into n data blocks, and the file service device generates 2 n -2 different user keys, where n is an integer greater than 1; 2 of the file service device n - Some of the two different user keys are allocated to users, and different users are allocated different user keys.

7. The method according to claim 1, characterized in that In the case where the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, the user key of the original legal user is updated, the updated user key of the original legal user is the user key that has not been allocated before, and the original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

8. A file access control method, characterized in that: Applied to a network cache device, the method comprises: Receiving multiple acquisition requests for applying for acquiring a target file sent in sequence by a user terminal, each acquisition request including a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-issued to the user terminal by a file service device, the user key includes at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; Searching for cached file blocks corresponding to the block information in the acquisition request, and requesting the file service device for file blocks corresponding to the block information in the acquisition request that are not cached by the network cache device; The obtained file block corresponding to the block information in the acquisition request is fed back to the user terminal, so that the user terminal performs encryption and decryption processing on the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

9. The method according to claim 8, characterized in that The file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain a target ciphertext, where the target ciphertext is the ciphertext of the target file; The target ciphertext is decrypted according to the user key to obtain the target file.

10. The method according to claim 9, characterized in that The target ciphertext is obtained by splicing the file blocks whose block tails and block heads are the same data block in the user key and performing an XOR operation on the data blocks at the file splicing; The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the data block at the joint of the corresponding file block.

11. The method according to claim 8, characterized in that The file service device generates a plurality of different user keys and a file block corresponding to each user key; Before the receiving user terminal sequentially sends a plurality of acquisition requests for applying for obtaining a target file, the user terminal and the file service device enable the user terminal to obtain the user key and the block information of the file block corresponding to the user key through a file acquisition request and a file acquisition response message, wherein the file acquisition request includes the user identifier, the file acquisition response message includes the user key corresponding to the user identifier and the block information of the file block corresponding to the user key, and the file service device stores the corresponding relationship between the user identifier and the user key.

12. The method according to claim 8, characterized in that The requesting the file service device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request includes: If there is no file block corresponding to the block information in the acquisition request in the cached file blocks, sending a file block acquisition request to the file service device, the file block acquisition request including uncached block information, the uncached block information corresponding to the file block corresponding to the block information in the acquisition request that is not cached by the network cache device; The file blocks corresponding to the uncached block information fed back by the file service device are received and cached.

13. The method according to claim 8, characterized in that The target file is divided into n data blocks, and the file service device generates 2 n -2 different user keys, where n is an integer greater than 1; 2 of the file service device n - Some of the two different user keys are allocated to users, and different users are allocated different user keys.

14. The method according to claim 8, characterized in that In the case where the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, the user indicated by the user identifier is an illegal user, the user key of the original legal user is updated, the updated user key of the original legal user is the user key that has not been allocated before, and the original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

15. A file access control method, characterized in that: Applied to a file service device, the method comprises: Receiving a request from a network cache device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request, the acquisition requests are sequentially sent by a user terminal to the network cache device to apply for obtaining a target file, each acquisition request includes a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-sent by the file service device to the user terminal, the user key includes at least one data block, the user key is used by the user terminal to perform encryption and decryption processing on the file block corresponding to the block information in the acquisition request to obtain the target file, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; Feedback the file blocks that are not cached by the network cache device and correspond to the block information in the acquisition request to the network cache device, so that the network cache device caches the fed-back file blocks, and feeds back the cached file blocks to the user terminal when receiving the acquisition request including the block information of the fed-back file blocks.

16. The method according to claim 15, characterized in that The file block corresponding to the block information in the acquisition request is encrypted according to the user key to obtain a target ciphertext, where the target ciphertext is the ciphertext of the target file; The target ciphertext is decrypted according to the user key to obtain the target file.

17. The method according to claim 16, characterized in that The target ciphertext is obtained by splicing the file blocks whose block tails and block heads are the same data block in the user key and performing an XOR operation on the data blocks at the file splicing; The target ciphertext is obtained by performing an XOR operation on the data block in the user key and the data block at the joint of the corresponding file block.

18. The method according to claim 15, characterized in that The file service device generates a plurality of different user keys and a file block corresponding to each user key, and the file service device stores a correspondence between the user identifier and the user key; Before the user terminal sequentially sends a plurality of acquisition requests for applying to acquire the target file to the network cache device, the method further includes: receiving a file acquisition request sent by the user terminal, wherein the file acquisition request includes the user identifier; Determine, according to the correspondence between the user identifier and the user key, the user key corresponding to the user identifier in the file acquisition request, and block information of the file block corresponding to the user key; Feedback file acquisition response information to the file service device, wherein the file acquisition response information includes the user key corresponding to the user identifier in the file acquisition request and block information of the file block corresponding to the user key.

19. The method according to claim 15, characterized in that Also includes: Divide the target file into n data blocks, and generate 2 n -2 different user keys, where n is an integer greater than 1; 2 n - Some of the two different user keys are allocated to users who apply for the user keys, and different users are allocated different user keys.

20. The method according to claim 15, characterized in that Also includes: In the case where the user identifier in the acquisition request and the user key corresponding to the block information do not have a corresponding relationship, determining that the user indicated by the user identifier is an illegal user; The user key of the original legal user is updated by using the user key that was not previously allocated, wherein the updated user key of the original legal user is one of the user keys that were not previously allocated, and the original legal user includes the user indicated by the user identifier that has a corresponding relationship with the user key corresponding to the block information in the acquisition request.

21. A user terminal, characterized in that: include: A sending module, used to sequentially send multiple acquisition requests for applying for acquiring a target file to a network cache device, each acquisition request including a user identifier and block information of a file block corresponding to a user key, so that the network cache device searches for a cached file block corresponding to the block information in the acquisition request, and requests a file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, the user key and the block information of the file block corresponding to the user key are pre-sent by the file service device to the user terminal, the user key includes at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; A receiving module, configured to receive a file block fed back by the network cache device and corresponding to the block information in the acquisition request; The encryption and decryption module is used to perform encryption and decryption processing on the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

22. A network cache device, characterized in that: include: A receiving module, used to receive multiple acquisition requests for applying for acquiring a target file sent in sequence by a user terminal, each acquisition request including a user identifier and block information of a file block corresponding to a user key, the user key and the block information of the file block corresponding to the user key are pre-issued to the user terminal by a file service device, the user key includes at least one data block, the data block is obtained by dividing the target file, the file block is obtained by dividing the target file according to the user key, and the file block includes one data block or more than two consecutive data blocks; A query module, used to search for cached file blocks corresponding to the block information in the acquisition request; a sending module, configured to request the file service device for a file block corresponding to the block information in the acquisition request that is not cached by the network cache device, and to feed back the obtained file block corresponding to the block information in the acquisition request to the user terminal, so that the user terminal performs encryption and decryption processing on the file block corresponding to the block information in the acquisition request based on the user key to obtain the target file.

23. A file service device, characterized in that: include: a receiving module, configured to receive a request from a network cache device for a file block that is not cached by the network cache device and corresponds to the block information in the acquisition request, wherein the acquisition request is sequentially sent by a user terminal to the network cache device to apply for acquiring a target file, wherein each acquisition request includes a user identifier and block information of a file block corresponding to a user key, wherein the user key and the block information of the file block corresponding to the user key are pre-sent by the file service device to the user terminal, wherein the user key includes at least one data block, wherein the user key is used by the user terminal to perform encryption and decryption processing on the file block corresponding to the block information in the acquisition request to obtain the target file, wherein the data block is obtained by dividing the target file, wherein the file block is obtained by dividing the target file according to the user key, and wherein the file block includes one data block or two or more consecutive data blocks; The sending module is used to feed back to the network cache device the file blocks that are not cached by the network cache device and correspond to the block information in the acquisition request, so that the network cache device caches the fed-back file blocks, so as to feed back the cached file blocks to the user terminal when receiving the acquisition request including the block information of the fed-back file blocks.

24. A user terminal, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the file access control method according to any one of claims 1 to 7 is implemented.

25. A network cache device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the file access control method according to any one of claims 8 to 14 is implemented.

26. A file service device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the file access control method according to any one of claims 15 to 20 is implemented.

27. A file access control system, characterized in that: include: The user terminal as claimed in claim 24; The network cache device as claimed in claim 25; The file serving device as claimed in claim 26.

28. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the file access control method according to any one of claims 1 to 20 is implemented.

29. A computer program product, characterized in that It comprises a computer program, which implements the file access control method described in any one of claims 1 to 20 when executed by a processor.

Citation Information

Cited By

  • File access control method and system, apparatus, medium, and program product

    WO2026011698A1