Distributed encryption storage method and device for files, storage medium and program product

By generating multiple encryption keys on the terminal device and splitting the files into sub-files for distributed storage, the problem of poor encryption mode in cloud storage is solved, and higher data security is achieved.

CN120499201APending Publication Date: 2025-08-15PEOPLE'S INSURANCE COMPANY OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510726772.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the prior art, there is a problem of poor security in the encryption method of cloud storage files.

Method used

The target storage file and the user-defined first encryption key are obtained through the terminal device, and the second and third encryption keys are generated based on the file encryption level and user login information. The file is split into N sub-storage files and different encryption algorithms are selected to generate the fourth encryption key, and the target sub-encryption key is generated to encrypt the file, and the encrypted files are distributed and stored in multiple storage areas of the server.

Benefits of technology

It realizes distributed encrypted storage of files, improves file security, and prevents data leakage and unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499201A_ABST
    Figure CN120499201A_ABST
Patent Text Reader

Abstract

The invention provides a file distributed encryption storage method and device, a storage medium and a program product, and is applied to a terminal device, and the method comprises the steps: obtaining a second encryption key according to a file encryption level on the basis of obtaining a target storage file and a first encryption key; obtaining a third encryption key according to the user login information; splitting the target storage file to obtain N target sub-storage files, corresponding sub-storage file identifiers and sub-file storage occupancy, selecting N different encryption algorithms, and generating corresponding N fourth encryption keys according to the sub-storage file identifiers and the sub-file storage occupancy; generating a target sub-encryption key, encrypting the corresponding target sub-storage file, and generating a corresponding sub-encryption file; and sending the N sub-encrypted files to the server so as to store the N sub-encrypted files in the M storage areas in the server, namely, realizing distributed encrypted storage of the files, and solving the problem of poor security of an encryption mode adopted by the existing technical scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a distributed encryption storage method, device, storage medium and program product for files. Background Art

[0002] With the development of cloud storage technology, more and more users will store their files in the cloud to reduce the storage space occupied by local terminal devices.

[0003] In the prior art, when a user stores a file in the cloud, the user encrypts the file by setting a custom password through a terminal device, and then stores the encrypted file in the cloud through the terminal device.

[0004] However, the encryption method adopted by the existing technical solution has the problem of poor security. Summary of the Invention

[0005] The distributed encrypted storage method, device, storage medium and program product of files provided in the embodiments of the present application are used to solve the problem of poor security of the encryption method adopted by the existing technical solutions.

[0006] In a first aspect, an embodiment of the present application provides a distributed encryption storage method for files, using a terminal device, including: obtaining a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key; according to the file encryption level, obtaining a second encryption key; according to the user login information, obtaining a third encryption key; calculating the data volume of the target storage file to obtain the file storage occupancy; according to the file storage occupancy, splitting the target storage file to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2; for the N target sub-storage files, selecting N different encryption algorithms, and generating corresponding N sub-storage file identifiers and sub-file storage occupancy, respectively. a fourth encryption key; for each target sub-storage file, generating a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; for each target sub-storage file, encrypting according to the corresponding target sub-encryption key to generate a corresponding sub-encrypted file; sending the N sub-encrypted files to the server, so that the server stores the N sub-encrypted files in M storage areas in the server respectively, and generates corresponding N storage location identifiers; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

[0007] In one possible implementation, obtaining a third encryption key based on the user login information includes: obtaining login time information and login duration information based on the user login information; converting the login time information into a first time data sequence; converting the login duration information into a second time data sequence; and performing data processing on the first time data sequence and the second time data sequence to obtain the third encryption key.

[0008] In a possible implementation, obtaining the third encryption key based on the user login information includes: obtaining a user identifier based on the user login information; determining a user authority level based on the user identifier; and obtaining the third encryption key based on the user authority level and the user identifier.

[0009] In one possible implementation, the user authority level includes an approval-free level, a first-level approval level, and a second-level approval level; obtaining the third encryption key based on the user authority level and the user identifier includes: obtaining the user's cumulative on-the-job time based on the approval-free level; obtaining the third encryption key based on the user identifier and the user's cumulative on-the-job time; or, obtaining the user's cumulative on-the-job time and a first-level approval identifier based on the first-level approval level; obtaining the third encryption key based on the user identifier, the user's cumulative on-the-job time, and the first-level approval identifier; or, obtaining the user's cumulative on-the-job time, a first-level approval identifier, and a second-level approval identifier based on the second-level approval level; obtaining the third encryption key based on the user identifier, the user's cumulative on-the-job time, the first-level approval identifier, and the second-level approval identifier.

[0010] In a possible implementation, for each target sub-storage file, a target sub-encryption key is generated according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, including: for each target sub-storage file, a check bit encryption key is generated according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; for each target sub-storage file, the target sub-encryption key is generated according to the second encryption key, the third encryption key, the corresponding fourth encryption key and the corresponding check bit encryption key.

[0011] In one possible implementation, before sending the N sub-encrypted files to the server so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and causing the server to generate corresponding N storage location identifiers, the method further includes: determining a business category identifier based on the target storage file; sending the business category identifier to the server so that the server determines the M storage areas from the X storage areas based on the business category identifier; wherein the business category to which the encrypted file stored in each of the M storage areas belongs is the same as the business category to which the target storage file belongs.

[0012] In one possible implementation, the number of the servers is one or more, and M is greater than or equal to 4; a miniIO distributed storage system is deployed in the servers; a storage node of the miniIO distributed storage system is deployed in each storage area; wherein the storage node includes at least two data disks and at least two parity disks; the data disk is used to store the sub-encrypted file, and the parity disk is used to store the erasure code corresponding to the sub-encrypted file.

[0013] In a second aspect, an embodiment of the present application provides a distributed encrypted storage device for files, applied to a terminal device, the device comprising:

[0014] An acquisition module, configured to acquire a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key;

[0015] a processing module configured to obtain a second encryption key based on the file encryption level; obtain a third encryption key based on the user login information; calculate the data volume of the target storage file to obtain a file storage occupancy; split the target storage file based on the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2; select N different encryption algorithms for the N target sub-storage files, and generate corresponding N fourth encryption keys based on the corresponding sub-storage file identifiers and sub-file storage occupancy; for each target sub-storage file, generate a target sub-encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; and encrypt each target sub-storage file based on the corresponding target sub-encryption key to generate a corresponding sub-encrypted file;

[0016] A sending module is used to send the N sub-encrypted files to a server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates N corresponding storage location identifiers; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

[0017] In a possible implementation, when the processing module obtains the third encryption key based on the user login information, it is specifically used to: obtain login time information and login duration information based on the user login information; convert the login time information into a first time data sequence; convert the login duration information into a second time data sequence; and perform data processing on the first time data sequence and the second time data sequence to obtain the third encryption key.

[0018] In a possible implementation, when the processing module obtains the third encryption key based on the user login information, it is specifically used to: obtain a user identifier based on the user login information; determine a user authority level based on the user identifier; and obtain the third encryption key based on the user authority level and the user identifier.

[0019] In a possible implementation, the user authority level includes an approval-free level, a first-level approval level, and a second-level approval level; when the processing module obtains the third encryption key based on the user authority level and the user identifier, it is specifically used to: obtain the user's cumulative employment time based on the approval-free level; obtain the third encryption key based on the user identifier and the user's cumulative employment time; or, obtain the user's cumulative employment time and a first-level approval identifier based on the first-level approval level; obtain the third encryption key based on the user identifier, the user's cumulative employment time, and the first-level approval identifier; or, obtain the user's cumulative employment time, a first-level approval identifier, and a second-level approval identifier based on the second-level approval level; obtain the third encryption key based on the user identifier, the user's cumulative employment time, the first-level approval identifier, and the second-level approval identifier.

[0020] In a possible implementation, when the processing module generates a target sub-encryption key for each target sub-storage file based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, it is specifically used to: for each target sub-storage file, generate a check bit encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; for each target sub-storage file, generate the target sub-encryption key based on the second encryption key, the third encryption key, the corresponding fourth encryption key, and the corresponding check bit encryption key.

[0021] In one possible implementation, before sending the N sub-encrypted files to the server so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generating N corresponding storage location identifiers, the apparatus is further configured to: determine a business category identifier based on the target storage file; and send the business category identifier to the server so that the server determines the M storage areas from the X storage areas based on the business category identifier; wherein the business category to which the encrypted file stored in each of the M storage areas belongs is the same as the business category to which the target storage file belongs.

[0022] In one possible implementation, the number of the servers is one or more, and M is greater than or equal to 4; a miniIO distributed storage system is deployed in the servers; a storage node of the miniIO distributed storage system is deployed in each storage area; wherein the storage node includes at least two data disks and at least two parity disks; the data disk is used to store the sub-encrypted file, and the parity disk is used to store the erasure code corresponding to the sub-encrypted file.

[0023] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0024] The memory stores computer-executable instructions;

[0025] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.

[0027] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0028] The distributed encrypted storage method, device, storage medium and program product of files provided in the embodiments of the present application use a terminal device to obtain a target storage file and a first encryption key, and then obtain a second encryption key according to the file encryption level; obtain a third encryption key according to user login information; split the file according to the file storage occupancy of the target storage file to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy, and further select N different encryption algorithms, and generate corresponding N fourth encryption keys according to the sub-storage file identifiers and sub-file storage occupancy; then, generate a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, and then encrypt the corresponding target sub-storage file to generate a corresponding sub-encrypted file; then, the terminal device sends the N sub-encrypted files to the server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates corresponding N storage location identifiers, thus realizing distributed encrypted storage of files, and solving the problem of poor security of the encryption method adopted in the existing technical solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0030] Figure 1 A schematic diagram of a distributed encrypted storage method for files provided in this application;

[0031] Figure 2 A flowchart of a distributed encrypted storage method for files provided in one embodiment of the present application;

[0032] Figure 3 A flowchart of a distributed encrypted storage method for files provided in another embodiment of the present application;

[0033] Figure 4 A schematic diagram of the structure of a distributed encryption storage device for files provided in one embodiment of the present application;

[0034] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application.

[0035] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0037] In the technical solution of this application, the user personal information involved and the collection, storage, use, processing, transmission, provision and disclosure of data are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0038] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0039] With the development of cloud storage technology, more and more users are storing files in the cloud to reduce the storage space occupied by local terminal devices. In existing technologies, when users store files in the cloud, they encrypt the files by setting a custom password on their terminal devices, and then store the encrypted files in the cloud through the terminal devices. However, the encryption methods used in existing solutions have poor security issues.

[0040] The following explains the application scenarios of the embodiments of the present application:

[0041] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0042] Figure 1 A schematic diagram of a distributed encrypted storage method for files provided in this application, such as Figure 1 As shown, the specific application scenario of the present application is to split and encrypt a file to obtain multiple encrypted sub-files, and then store the above-mentioned multiple encrypted sub-files in multiple storage areas respectively. The execution subject of the method provided in the embodiment of the present application can be an electronic control unit, an electronic device or a terminal device. The terminal device is used as the execution subject for explanation. For example, based on the method provided in the embodiment of the present application, the terminal device splits the file into three sub-files, namely sub-file 1, sub-file 2 and sub-file 3; then the terminal device encrypts sub-file 1 by selecting encryption algorithm 1 to obtain encrypted sub-file 1, selects encryption algorithm 2 to encrypt sub-file 2 to obtain encrypted sub-file 2, and selects encryption algorithm 3 to encrypt sub-file 3 to obtain encrypted sub-file 3; then, the encrypted sub-file 1, encrypted sub-file 2 and encrypted sub-file 3 are sent to the storage area 1, storage area 2 and storage area 3 of the server respectively, thereby completing the distributed encrypted storage of the file.

[0043] Figure 2 A flowchart of a distributed encryption storage method for files provided in one embodiment of the present application is shown as follows: Figure 2 As shown, the distributed encrypted storage method for files provided in this embodiment may be executed by an electronic control unit, an electronic device, or a terminal device. By way of example, this embodiment uses a terminal device as the execution subject of the method of this embodiment. The distributed encrypted storage method for files provided in this embodiment includes the following steps:

[0044] Step S101: Obtain a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key.

[0045] Exemplarily, the terminal device obtains user login information in response to the user's login operation; then, in response to the user operation, determines the file that the user needs to encrypt and store, that is, the target storage file; further, in response to the user's input operation, determines the encryption level of the target storage file, that is, the file encryption level; and also in response to the user's input operation, determines the first encryption key for the target storage file, that is, the first encryption key is a user-defined encryption key.

[0046] Step S102: Obtain a second encryption key according to the file encryption level.

[0047] Exemplarily, the terminal device obtains a device serial number of the terminal device corresponding to the number of characters based on the file encryption level, and then determines the obtained device serial number as the second encryption key. Specifically, for example, the file encryption level includes a first encryption level, a second encryption level, and a third encryption level; then, based on the first encryption level, the terminal device obtains a device serial number seri_1 of the terminal device with a number of characters num_1, and then determines the device serial number seri_1 as the second encryption key; or, based on the first encryption level, the terminal device obtains a device serial number seri_2 of the terminal device with a number of characters num_2, and then determines the device serial number seri_2 as the second encryption key; or, based on the first encryption level, the terminal device obtains a device serial number seri_3 of the terminal device with a number of characters num_3, and then determines the device serial number seri_3 as the second encryption key.

[0048] Step S103: Obtain a third encryption key according to the user login information.

[0049] For example, the terminal device obtains user account information based on the user login information, and then generates a third encryption key based on the user account information. Specifically, for example, if the user account number corresponding to the user account information is A233578, the user account number is truncated to obtain the third encryption key 3578.

[0050] In another possible implementation, the specific implementation of step S103 includes:

[0051] Step S1031: Obtain login time information and login duration information based on user login information.

[0052] Step S1032: Convert the login time information into a first time data sequence.

[0053] Step S1033: Convert the login duration information into a second time data sequence.

[0054] Step S1034: Process the first time data sequence and the second time data sequence to obtain a third encryption key.

[0055] Exemplarily, the terminal device processes the user login information to determine the time and duration of the user's login, that is, obtains the login time information and login duration information, for example, the login time information is 18:22:36, and the login duration information is 21 minutes and 31 seconds; then, the login time information is converted into a first time data sequence, for example, 18:22:36 is converted into 182236, and the login duration information is converted into a second time data sequence, for example, 21 minutes and 31 seconds is converted into 2131; then, the first time data sequence and the second time data sequence are processed, such as splicing processing or superposition processing. Taking superposition processing as an example, according to the first time data sequence 182236 and the second time data sequence 2131, the data sequence 184367 after superposition processing (using addition calculation) is obtained, and then the data sequence 184367 is determined as the third encryption key.

[0056] In the steps of this embodiment, the generation of the third encryption key is determined based on the login time information and login duration information corresponding to the user login information. Since the generation of the login time information and login duration information is random and is not affected by the user's personal behavior habits, it is random. Therefore, the third encryption key determined based on the login time information and login duration information is reliable and secure.

[0057] Step S104: Calculate the data volume of the target storage file to obtain the file storage occupancy.

[0058] Step S105 : split the target storage file according to the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2.

[0059] Exemplarily, the terminal device can obtain the file storage occupancy by calculating the data volume of the target storage file; and then split the target storage file based on the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2. Specifically, for example, if the file storage occupancy is between 0 and 100MB, the corresponding target storage file is split into 2 target sub-storage files, and the corresponding sub-storage file identifier label_1 and sub-storage file identifier label_2 are obtained. The sub-file storage occupancy of the target sub-storage file label_1 and the sub-file storage occupancy of the target sub-storage file label_2 can be equal, for example, if the file storage occupancy of the target storage file is 80MB, then the sub-file storage occupancy of the two target sub-storage files is 40MB; or, the sub-file storage occupancy of the target sub-storage file label_1 and the sub-file storage occupancy of the target sub-storage file label_2 can be unequal, for example, if the file storage occupancy of the target storage file is 80MB, then the sub-file storage occupancy of the two target sub-storage files is 40MB; or The storage occupancy is 80MB, the sub-file storage occupancy of the target sub-storage file label_1 is 30MB, and the sub-file storage occupancy of the target sub-storage file label_2 is 50MB; further, if the file storage occupancy is between 100 and 1000MB, the corresponding target storage file is split into 3 target sub-storage files, and the corresponding sub-storage file identifiers and sub-file storage occupancy are obtained, wherein the storage occupancy of each sub-file can be unequal or equal; if the file storage occupancy is above 1000MB, the corresponding target storage file is split into 4 target sub-storage files, and the corresponding sub-storage file identifiers and sub-file storage occupancy are obtained, wherein the storage occupancy of each sub-file can be unequal or equal.

[0060] Step S106 : For the N target sub-storage files, select N different encryption algorithms, and generate corresponding N fourth encryption keys according to the corresponding sub-storage file identifiers and the sub-file storage occupancy.

[0061] Exemplarily, the terminal device splits the target storage file into three target sub-storage files based on the file storage occupancy, and then selects three different encryption algorithms to generate three corresponding fourth encryption keys according to the corresponding sub-storage file identifiers and sub-file storage occupancy. For example, the target sub-storage files include target sub-storage file label_1, target sub-storage file label_2, and target sub-storage file label_3. The sub-file storage occupancy of target sub-storage file label_1 is 60MB, the sub-file storage occupancy of target sub-storage file label_2 is 70MB, and the sub-file storage occupancy of target sub-storage file label_3 is 80MB; furthermore, the terminal device uses encryption algorithm encr_1 to generate a fourth encryption key keys_1 corresponding to the target sub-storage file label_1 according to the sub-storage file identifier label_1 and the sub-file storage occupancy of 60MB; uses encryption algorithm encr_2 to generate a fourth encryption key keys_2 corresponding to the target sub-storage file label_2 according to the sub-storage file identifier label_2 and the sub-file storage occupancy of 70MB; uses encryption algorithm encr_3 to generate a fourth encryption key keys_3 corresponding to the target sub-storage file label_3 according to the sub-storage file identifier label_3 and the sub-file storage occupancy of 80MB.

[0062] Exemplarily, the process of generating a fourth encryption key based on the sub-storage file identifier and the sub-file storage occupancy includes: the terminal device uses an encryption algorithm to generate a file identifier encryption key based on the sub-storage file identifier, and generates a storage occupancy encryption key based on the sub-file storage occupancy; and generates a fourth encryption key based on the file identifier encryption key and the storage occupancy encryption key. In one possible implementation, the file identifier encryption key and the storage occupancy encryption key are both binary-coded data sequences, that is, data sequences consisting of "0" and "1", and then each consecutive "1" and consecutive "0" in the data sequence is converted into a base-1 to obtain corresponding multiple "numbers", and then the multiple "numbers" corresponding to "1" are used as the first data sequence, and the multiple "numbers" corresponding to "0" are used as the second data sequence; and then the fourth encryption key is generated based on the first data sequence and the second data sequence corresponding to the file identifier encryption key and the first data sequence and the second data sequence corresponding to the storage occupancy encryption key. Specifically, for example, each consecutive "1" and consecutive "0" in the data sequence is converted into decimal respectively, and then, if the file identification encryption key is "1100111011", the multiple "numbers" corresponding to "1" are "3, 7, 3", and the multiple "numbers" corresponding to "0" are "0, 0", and then the first data sequence corresponding to the file identification encryption key is "373", and the second data sequence corresponding to the file identification encryption key is "00"; if the storage occupancy encryption key is "1110010110", the multiple "numbers" corresponding to "1" are "7, 1, 3", and the multiple "numbers" corresponding to "0" are "0, 0, 0", and then the storage occupancy The first data sequence corresponding to the encryption key is "713", and the second data sequence corresponding to the storage occupancy encryption key is "000"; further, according to the first data sequence "373" and the second data sequence "00" corresponding to the file identification encryption key, and the first data sequence "713" and the second data sequence "000" corresponding to the storage occupancy encryption key, the data sequence "37300713000" is obtained, and then the decimal data sequence "37300713000" is converted into the binary data sequence "100010101111010010111011011000101000", thereby obtaining the fourth encryption key.

[0063] Step S107 : For each target sub-storage file, generate a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key.

[0064] Step S108 : encrypt each target sub-storage file according to the corresponding target sub-encryption key to generate a corresponding sub-encrypted file.

[0065] Exemplarily, the first encryption key, the second encryption key, and the third encryption key are encryption keys shared by each target sub-storage file, and the fourth encryption key corresponds one-to-one to the target sub-storage file; furthermore, for each target sub-storage file, the terminal device can generate a corresponding target sub-encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; further, the terminal device encrypts the corresponding target sub-storage file according to the target sub-encryption key to generate a corresponding sub-encrypted file.

[0066] Specifically, for example, the first encryption key is K_1, the second encryption key is K_2, the third encryption key is K_3, the fourth encryption key includes keys_1, keys_2 and keys_3, the fourth encryption key keys_1 corresponds to the target sub-storage file label_1, the fourth encryption key keys_2 corresponds to the target sub-storage file label_2, and the fourth encryption key keys_3 corresponds to the target sub-storage file label_3; then, for the target sub-storage file label_1, the terminal device generates a target sub-storage file label_1 according to the first encryption key K_1, the second encryption key K_2, the third encryption key K_3 and the fourth encryption key keys_1. Sub-encryption key GK_1. Similarly, for the target sub-storage file label_2, the terminal device generates a target sub-encryption key GK_2, and for the target sub-storage file label_3, the terminal device generates a target sub-encryption key GK_3. Furthermore, the terminal device encrypts the target sub-storage file label_1 according to the target sub-encryption key GK_1 to generate the sub-encrypted file file_1, encrypts the target sub-storage file label_2 according to the target sub-encryption key GK_2 to generate the sub-encrypted file file_2, and encrypts the target sub-storage file label_3 according to the target sub-encryption key GK_3 to generate the sub-encrypted file file_3.

[0067] In another possible implementation, the specific implementation steps of step S107 include:

[0068] Step S1071 : For each target sub-storage file, generate a check digit encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key.

[0069] Step S1072: For each target sub-storage file, generate a target sub-encryption key according to the second encryption key, the third encryption key, the corresponding fourth encryption key and the corresponding check bit encryption key.

[0070] Exemplarily, the first encryption key, the second encryption key, and the third encryption key are encryption keys shared by each target sub-storage file, and the fourth encryption key corresponds one-to-one to the target sub-storage file; further, for each target sub-storage file, the terminal device processes the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, such as splicing processing or superposition processing, to generate a corresponding check bit encryption key; further, for each target sub-storage file, the terminal device processes the second encryption key, the third encryption key, the corresponding fourth encryption key and the corresponding check bit encryption key, such as splicing processing or superposition processing, to generate a target sub-encryption key.

[0071] In the steps of this embodiment, a corresponding check bit encryption key is generated based on the user-defined first encryption key; further, a target sub-encryption key of the corresponding target sub-storage file is generated based on the check bit encryption key, the second encryption key, the third encryption key, and the fourth encryption key; because the generated target sub-encryption key does not have the explicit user's personal behavior habits or cryptographic logic, the target sub-encryption key is reliable and secure.

[0072] Step S109: sending the N sub-encrypted files to the server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates corresponding N storage location identifiers.

[0073] Exemplarily, after encrypting N target sub-storage files to generate N sub-encrypted files, the terminal device can send the above N sub-encrypted files to the server, thereby enabling the server to store the N sub-encrypted files in M storage areas in the server respectively, and generate corresponding N storage location identifiers, thereby realizing distributed encrypted storage of files; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, and the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

[0074] It can be understood that for the storage location identifier, since the storage location identifier indicates the association relationship between the target storage file, the sub-encrypted file and the storage area, the user can access the server through the terminal device based on the storage location identifier, and then download the sub-encrypted file indicated by the storage location identifier in the corresponding storage area.

[0075] Furthermore, in one possible implementation, before sending the N sub-encrypted files to the server so that the server stores the N sub-encrypted files in M storage areas of the server respectively and generating N corresponding storage location identifiers, the method provided in the embodiment of the present application further includes the following steps:

[0076] Step S100A: Determine the service category identifier according to the target storage file.

[0077] Step S100B, sending the business category identifier to the server, so that the server determines M storage areas from the X storage areas according to the business category identifier; wherein the business category of the encrypted file stored in each of the M storage areas is the same as the business category of the target storage file.

[0078] Exemplarily, the terminal device processes the target storage file to determine the business category to which the target storage file belongs, thereby determining a business category identifier; then, the terminal device sends the business category identifier to the server, and the server determines M storage areas from X storage areas based on the business category identifier, so that the business category to which the encrypted file stored in each of the M storage areas belongs is the same as the business category to which the target storage file belongs, thereby achieving data isolation based on different business categories, thereby improving the secure storage of sub-encrypted files.

[0079] Furthermore, in one possible implementation, the number of servers is one or more, M is greater than or equal to 4; a miniO distributed storage system is deployed in the servers; a storage node of the miniO distributed storage system is deployed in each storage area; wherein the storage node includes at least two data disks and at least two parity disks; the data disk is used to store sub-encrypted files, and the parity disk is used to store the erasure codes corresponding to the sub-encrypted files. Specifically, for example, the number of servers is two, namely a first server and a second server, the first server includes a first storage area and a second storage area, and the second server includes a third storage area and a fourth storage area; then, based on the first server and the second server, the miniO distributed storage system is deployed, and a storage node of the miniO distributed storage system is deployed in each storage area; wherein the storage node includes at least two data disks and at least two parity disks; the data disk is used to store sub-encrypted files, and the parity disk is used to store the erasure codes corresponding to the sub-encrypted files. Through the method of the steps of this embodiment, the stored target storage file is not subject to data loss due to hardware failure.

[0080] The method provided in this embodiment is applied to a terminal device. Based on obtaining a target storage file and a first encryption key, a second encryption key is obtained according to the file encryption level; a third encryption key is obtained according to user login information; the file is split according to the file storage occupancy of the target storage file to obtain N target sub-storage files, as well as corresponding sub-storage file identifiers and sub-file storage occupancy, and N different encryption algorithms are further selected to generate corresponding N fourth encryption keys according to the sub-storage file identifiers and sub-file storage occupancy; then, a target sub-encryption key is generated according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, and the corresponding target sub-storage file is encrypted to generate a corresponding sub-encrypted file; then, the terminal device sends the N sub-encrypted files to the server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates corresponding N storage location identifiers, thereby realizing distributed encrypted storage of files and solving the problem of poor security of the encryption method adopted in the existing technical solution.

[0081] Figure 3 A flowchart of a distributed encryption storage method for files provided in another embodiment of the present application is shown as follows: Figure 3 As shown, the distributed encryption storage method of files provided by this embodiment is Figure 2 Based on the distributed encryption storage method for files provided in the embodiment shown, step S103 is further refined. The distributed encryption storage method for files provided in this embodiment includes the following steps:

[0082] Step S201: Obtain a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key.

[0083] Step S202: Obtain a second encryption key according to the file encryption level.

[0084] Step S203: Obtain a user ID based on the user login information.

[0085] Step S204: Determine the user authority level according to the user identifier.

[0086] Step S205: Obtain a third encryption key according to the user authority level and the user identifier.

[0087] Exemplarily, the terminal device obtains user account information based on the user login information, and then generates a corresponding user identifier based on the user account information. For example, if the user account number corresponding to the user account information is A233578, then the corresponding user identifier is A; if the user account number corresponding to the user account information is B689781, then the corresponding user identifier is B. Furthermore, based on the user identifier, the corresponding user authority level is determined. For example, if the user identifier is A, then the user authority level is low-level authority; if the user identifier is B, then the user authority level is high-level authority. Furthermore, based on the user authority level and the user identifier, the terminal device generates a third encryption key corresponding to the user authority level. For example, if the user authority level is low-level authority, then the third encryption key is A233; if the user authority level is high-level authority, then the third encryption key is B68.

[0088] In another possible implementation, the user authority levels include an approval-free level, a first-level approval level, and a second-level approval level. The specific implementation steps of step S205 include:

[0089] Step S2050: determine whether the user authority level is the approval-free level, the first-level approval level, or the second-level approval level.

[0090] Step S2051: If the user authority level is the approval-free level, the user's accumulated working hours are obtained according to the approval-free level.

[0091] Step S2052: Obtain a third encryption key based on the user identifier and the user's accumulated working hours.

[0092] Step S2053: If the user authority level is the first-level approval level, the user's accumulated working hours and the first-level approval identifier are obtained according to the first-level approval level.

[0093] Step S2054: Obtain a third encryption key based on the user ID, the user's accumulated working hours, and the first-level approval ID.

[0094] Step S2055: If the user authority level is the second-level approval level, the user's cumulative working hours, first-level approval identification, and second-level approval identification are obtained according to the second-level approval level.

[0095] Step S2056: Obtain a third encryption key based on the user ID, the user's accumulated working hours, the first-level approval ID, and the second-level approval ID.

[0096] Exemplarily, the user authority level is judged, and then the corresponding data processing process is determined according to the specific level of the user authority level to obtain the third encryption key. Specifically:

[0097] If the user authority level is the approval-free level, the user's cumulative service time is obtained. For example, if the user's cumulative service time is 3 years and 10 months and the user ID is A, then based on the user ID A and the user's cumulative service time of 3 years and 10 months, the third encryption key obtained is A310.

[0098] If the user authority level is the first-level approval level, the user's cumulative service time and first-level approval identification are obtained. For example, the user's cumulative service time is 3 years and 10 months, the first-level approval identification is 11, and the user identification is A. Then, based on the user identification A, the user's cumulative service time of 3 years and 10 months, and the first-level approval identification 11, the third encryption key A31011 is obtained.

[0099] If the user authority level is the second-level approval level, the user's cumulative service time, first-level approval ID and second-level approval ID are obtained. For example, the user's cumulative service time is 3 years and 10 months, the first-level approval ID is 11, the second-level approval ID is 22, and the user ID is A. Then, based on the user ID A, the user's cumulative service time of 3 years and 10 months, the first-level approval ID 11 and the second-level approval ID 22, the third encryption key A3101122 is obtained.

[0100] In the steps of the embodiment of the present application, by judging the user's user authority level and generating a third encryption key based on the user's accumulated working hours, the third encryption key does not have explicit personal user behavior habits or password logic, thereby making the third encryption key reliable and secure.

[0101] Furthermore, in a possible implementation, the method provided by the embodiment of the present application also includes: after obtaining the third encryption key based on the user identification, the user's cumulative working hours and the first-level approval identification, generating a user storage record; sending the user storage record to the first-level terminal device corresponding to the first-level approval identification to inform the first-level approver corresponding to the first-level terminal device of the operation record of the user storage file; or, after obtaining the third encryption key based on the user identification, the user's cumulative working hours, the first-level approval identification and the second-level approval identification, generating a user storage record; sending the user storage record to the first-level terminal device corresponding to the first-level approval identification, and the second-level terminal device corresponding to the second-level approval identification to inform the first-level approver corresponding to the first-level terminal device, and the second-level approver corresponding to the second-level terminal device, of the operation record of the user storage file.

[0102] Step S206: Calculate the data volume of the target storage file to obtain the file storage occupancy.

[0103] Step S207: split the target storage file according to the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2.

[0104] Step S208 : For the N target sub-storage files, select N different encryption algorithms, and generate corresponding N fourth encryption keys according to the corresponding sub-storage file identifiers and the sub-file storage occupancy.

[0105] Step S209 : For each target sub-storage file, generate a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key.

[0106] Step S210 , encrypting each target sub-storage file according to the corresponding target sub-encryption key to generate a corresponding sub-encrypted file.

[0107] In step S211 , the N sub-encrypted files are sent to the server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates corresponding N storage location identifiers.

[0108] In this embodiment, the implementation of steps S201-S202 is the same as that of the present application. Figure 2 The implementation of steps S101-S102 in the embodiment shown is the same, and the implementation of steps S206-S211 is the same as that of the present application. Figure 2 Steps S104 to S109 in the illustrated embodiment are performed in the same manner and are not described in detail here.

[0109] Figure 4 A schematic diagram of the structure of a distributed encryption storage device for files provided in one embodiment of the present application is shown as follows: Figure 4 As shown, the distributed encryption storage device 3 for files provided in this embodiment is applied to a terminal device and includes:

[0110] The acquisition module 31 is used to obtain the target storage file, the first encryption key, the user login information and the file encryption level; wherein the first encryption key is a user-defined encryption key;

[0111] The processing module 32 is configured to obtain a second encryption key based on the file encryption level; obtain a third encryption key based on the user login information; calculate the data volume of the target storage file to obtain the file storage occupancy; split the target storage file based on the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2; select N different encryption algorithms for the N target sub-storage files, and generate corresponding N fourth encryption keys based on the corresponding sub-storage file identifiers and sub-file storage occupancy; for each target sub-storage file, generate a target sub-encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; and encrypt each target sub-storage file based on the corresponding target sub-encryption key to generate a corresponding sub-encrypted file;

[0112] The sending module 33 is used to send N sub-encrypted files to the server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates N corresponding storage location identifiers; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, and the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

[0113] In one possible implementation, when the processing module 32 obtains the third encryption key based on the user login information, it is specifically used to: obtain the login time information and login duration information based on the user login information; convert the login time information into a first time data sequence; convert the login duration information into a second time data sequence; and perform data processing on the first time data sequence and the second time data sequence to obtain the third encryption key.

[0114] In a possible implementation, when the processing module 32 obtains the third encryption key based on the user login information, it is specifically used to: obtain the user identification based on the user login information; determine the user authority level based on the user identification; and obtain the third encryption key based on the user authority level and the user identification.

[0115] In one possible implementation, the user authority level includes an approval-free level, a first-level approval level, and a second-level approval level; when the processing module 32 obtains the third encryption key based on the user authority level and the user identifier, it is specifically used to: obtain the user's cumulative on-the-job time based on the approval-free level; obtain the third encryption key based on the user identifier and the user's cumulative on-the-job time; or, obtain the user's cumulative on-the-job time and the first-level approval identifier based on the first-level approval level; obtain the third encryption key based on the user identifier, the user's cumulative on-the-job time, and the first-level approval identifier; or, obtain the user's cumulative on-the-job time, the first-level approval identifier, and the second-level approval identifier based on the second-level approval level; obtain the third encryption key based on the user identifier, the user's cumulative on-the-job time, the first-level approval identifier, and the second-level approval identifier.

[0116] In a possible implementation, when the processing module 32 generates a target sub-encryption key for each target sub-storage file based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key, it is specifically used to: for each target sub-storage file, generate a check bit encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; for each target sub-storage file, generate a target sub-encryption key based on the second encryption key, the third encryption key, the corresponding fourth encryption key and the corresponding check bit encryption key.

[0117] In one possible embodiment, before sending N sub-encrypted files to the server so that the server stores the N sub-encrypted files respectively in M storage areas of the server and generating corresponding N storage location identifiers, the distributed encryption storage device 3 of the file is further used to: determine a business category identifier based on the target storage file; send the business category identifier to the server so that the server determines M storage areas from X storage areas based on the business category identifier; wherein the business category to which the encrypted file stored in each storage area in the M storage areas belongs is the same as the business category to which the target storage file belongs.

[0118] In one possible implementation, there are one or more servers, M is greater than or equal to 4; a miniIO distributed storage system is deployed in the servers; each storage area is deployed with a storage node of the miniIO distributed storage system; wherein the storage node includes at least two data disks and at least two parity disks; the data disks are used to store sub-encrypted files, and the parity disks are used to store erasure codes corresponding to the sub-encrypted files.

[0119] The acquisition module 31, the processing module 32 and the sending module 33 are connected in sequence. The distributed encryption storage device 3 of the file provided in this embodiment can be executed as follows: Figure 2-Figure 3 The technical solutions of any of the method embodiments shown have similar implementation principles and technical effects, which will not be described in detail here.

[0120] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 further includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.

[0121] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that the at least one processor 501 performs the above method.

[0122] The specific implementation process of the processor 501 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0123] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0124] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0125] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0126] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0127] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0128] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0129] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0130] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.

[0131] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0132] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0133] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0134] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0135] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.

Claims

1. A distributed encryption storage method for files, characterized in that: Applied to a terminal device, the method includes: Obtaining a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key; Obtaining a second encryption key according to the file encryption level; Obtaining a third encryption key according to the user login information; Calculating the data volume of the target storage file to obtain the file storage occupancy; Splitting the target storage file according to the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2; For the N target sub-storage files, select N different encryption algorithms, and generate corresponding N fourth encryption keys according to the corresponding sub-storage file identifiers and the storage occupancy of the sub-files; For each target sub-storage file, generate a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; For each target sub-storage file, encrypt it according to the corresponding target sub-encryption key to generate a corresponding sub-encrypted file; The N sub-encrypted files are sent to a server so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates N corresponding storage location identifiers; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

2. The method according to claim 1, characterized in that Obtaining a third encryption key according to the user login information includes: According to the user login information, obtain the login time information and login duration information; Converting the login time information into a first time data sequence; Converting the login duration information into a second time data sequence; Data processing is performed on the first time data series and the second time data series to obtain the third encryption key.

3. The method according to claim 1, characterized in that Obtaining a third encryption key according to the user login information includes: Obtaining a user ID according to the user login information; Determining the user authority level according to the user identifier; The third encryption key is obtained according to the user authority level and the user identifier.

4. The method according to claim 3, characterized in that The user authority levels include approval-free level, first-level approval level and second-level approval level; Obtaining the third encryption key according to the user authority level and the user identifier includes: Obtain the user's cumulative employment time based on the approval-free level; Obtaining the third encryption key according to the user identifier and the accumulated service time of the user; Alternatively, according to the first-level approval level, the user's cumulative working hours and first-level approval identification are obtained; Obtaining the third encryption key according to the user identifier, the user's accumulated service time, and the first-level approval identifier; Alternatively, according to the secondary approval level, the user's cumulative service time, the primary approval identifier, and the secondary approval identifier are obtained; The third encryption key is obtained according to the user identifier, the accumulated working time of the user, the first-level approval identifier and the second-level approval identifier.

5. The method according to claim 1, wherein The step of generating, for each target sub-storage file, a target sub-encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key includes: For each target sub-storage file, generate a check bit encryption key according to the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; For each target sub-storage file, the target sub-encryption key is generated according to the second encryption key, the third encryption key, the corresponding fourth encryption key and the corresponding check bit encryption key.

6. The method according to claim 5, characterized in that Before sending the N sub-encrypted files to the server so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generating N corresponding storage location identifiers, the method further includes: Determining a service category identifier according to the target storage file; The business category identifier is sent to the server, so that the server determines the M storage areas from the X storage areas according to the business category identifier; wherein the business category to which the encrypted file stored in each of the M storage areas belongs is the same as the business category to which the target storage file belongs.

7. The method according to any one of claims 1 to 6, characterized in that The number of the servers is one or more, and M is greater than or equal to 4; The server is deployed with a minIO distributed storage system; Each storage area is deployed with a storage node of the miniO distributed storage system; wherein, the storage node includes at least two data disks and at least two parity disks; the data disk is used to store the sub-encrypted file, and the parity disk is used to store the erasure code corresponding to the sub-encrypted file.

8. A distributed encrypted storage device for files, characterized in that: Applied to a terminal device, the device includes: An acquisition module, configured to acquire a target storage file, a first encryption key, user login information, and a file encryption level; wherein the first encryption key is a user-defined encryption key; a processing module configured to obtain a second encryption key based on the file encryption level; obtain a third encryption key based on the user login information; calculate the data volume of the target storage file to obtain a file storage occupancy; split the target storage file based on the file storage occupancy to obtain N target sub-storage files, and corresponding sub-storage file identifiers and sub-file storage occupancy; wherein N is an integer greater than or equal to 2; select N different encryption algorithms for the N target sub-storage files, and generate corresponding N fourth encryption keys based on the corresponding sub-storage file identifiers and sub-file storage occupancy; for each target sub-storage file, generate a target sub-encryption key based on the first encryption key, the second encryption key, the third encryption key, and the corresponding fourth encryption key; and encrypt each target sub-storage file based on the corresponding target sub-encryption key to generate a corresponding sub-encrypted file; A sending module is used to send the N sub-encrypted files to a server, so that the server stores the N sub-encrypted files in M storage areas of the server respectively, and generates N corresponding storage location identifiers; wherein M is a positive integer less than or equal to N; the storage location identifier is used to indicate the association relationship between the target storage file, the sub-encrypted file and the storage area, the association relationship is used to instruct the user to download the corresponding sub-encrypted file through the terminal device, and the target sub-encryption key is used to decrypt the corresponding sub-encrypted file.

9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.