File encryption method and device, electronic equipment and computer readable medium

By obtaining the detailed information of the files to be encrypted and performing targeted encryption processing, the file key leakage problem caused by a single encryption algorithm is solved, and high security and resource efficiency of file transmission are achieved.

CN119885231AActive Publication Date: 2025-04-25PARK DO CREDIT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411965712.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the prior art, files are encrypted through a single encryption algorithm. If the file key is leaked, all files using the same encryption algorithm have problems of privacy data leakage, resulting in privacy data leakage of internal files of the enterprise and reducing the security of file transmission.

Method used

A file encryption method is used to obtain information about the file to be encrypted, including file history visits, information of the department to which the file belongs, and identity information of the user to which the file belongs. Based on this information, the file priority and re-encryption key are determined, and different types of files (audio and video, images, text) are subject to targeted encryption processing, including audio and video chaos mapping algorithm, mess-dispersive encryption and privacy encryption. Then, the encrypted file is ring-signed and re-encrypted, and the re-encrypted file is compressed and sent to the target terminal.

Benefits of technology

Through the encryption method of one-by-one encryption and compression transmission, the security of file transmission is improved, while reducing the waste of transmission resources and avoiding privacy data leakage caused by file key leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885231A_ABST
    Figure CN119885231A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a file encryption method and device, electronic equipment and a computer readable medium. A specific embodiment of the method comprises the steps of obtaining to-be-encrypted file information; performing data extraction on the audio and video coding information to obtain audio and video extraction information; inputting the audio and video extraction information into an audio and video encryption model to obtain an audio and video encryption file; performing scrambling diffusion encryption processing on the image file to obtain an image encryption file; performing privacy encryption processing on the text document to obtain a text encryption file; determining a file priority; determining a file re-encryption key; performing ring signature processing on the to-be-encrypted file to obtain file signature information; re-encrypting the file signature information and the encrypted file to obtain a re-encrypted file; and sending the re-encrypted file to the target terminal. According to the implementation mode, the file to be encrypted can be sent in a one-text one-password and compressed mode, and waste of transmission resources is reduced while the safety in the file sending and transmission process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a file encryption method, device, electronic device, and computer-readable medium. Background Art

[0002] With the continuous development of mobile communication technology and the increase in business needs of enterprises, private and internal enterprise files need to be frequently transmitted. How to ensure the security of transmitted files and avoid data leakage of private data during transmission, as well as the search and matching of encryption keys during file encryption, are becoming more and more concerned issues. For file encryption, the usual method is to use a single encryption algorithm to generate a file encryption key. Then, the file to be encrypted is encrypted and transmitted using the file encryption key, and the file encryption key is stored.

[0003] However, it is found in practice that when using the above method to encrypt files, the following technical problems often occur: When encrypting files using a single encryption algorithm, if the file key is leaked, all files encrypted using the same encryption algorithm will have the problem of privacy data leakage, resulting in the leakage of privacy data of internal corporate files and reducing the security of file transmission.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose a file encryption method, an apparatus, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a file encryption method, including: obtaining information about a file to be encrypted, wherein the information about the file to be encrypted includes at least one of the following: the number of historical file accesses, information about the department to which the file belongs, and identity information about the user to which the file belongs; in response to determining that there is an audio or video file in the file to be encrypted corresponding to the information about the file to be encrypted, performing data extraction on the audio or video encoding information corresponding to the audio or video file to obtain audio or video extraction information; inputting the audio or video extraction information into an audio or video encryption model to obtain an audio or video encrypted file, wherein the audio or video encryption model includes: an audio or video chaotic mapping algorithm and an audio or video encryption adversarial model; in response to determining that there is an image file in the file to be encrypted, performing scrambling diffusion encryption processing on the image file to obtain an image encrypted file; in response to determining that there is a text document in the file to be encrypted, performing privacy encryption processing on the privacy data included in the text document to obtain a text document. Encrypted file; determining the file priority of the file to be encrypted according to the number of historical accesses to the file, the identity information of the user to which the file belongs, and the department information to which the file belongs; determining the file re-encryption key of the file to be encrypted according to the number of historical accesses to the file, the file priority, and the encrypted file, and storing the file re-encryption key in the key storage service client, wherein the encrypted file may be a file composed of the audio and video encrypted file, the image encrypted file, and the text encrypted file; performing ring signature processing on the file to be encrypted to obtain file signature information; performing re-encryption processing on the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file; compressing the re-encrypted file and sending it to the target terminal, so that the target terminal can perform search and matching based on the user identity information on the key storage service client, obtain the file matching key for decryption processing, and obtain the decrypted file.

[0008] In a second aspect, some embodiments of the present disclosure provide a file encryption device, including: an acquisition unit, configured to acquire information of a file to be encrypted, wherein the information of the file to be encrypted includes at least one of the following: the number of historical file accesses, information of the department to which the file belongs, and identity information of the user to which the file belongs; a data extraction unit, configured to extract data from audio and video encoding information corresponding to the audio and video file in response to determining that there is an audio or video file in the file to be encrypted corresponding to the information of the file to be encrypted, so as to obtain audio and video extraction information; an input unit, configured to input the audio and video extraction information into an audio and video encryption model, so as to obtain an audio and video encrypted file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model; a scrambled diffusion encryption unit, configured to perform scrambled diffusion encryption processing on the image file in response to determining that there is an image file in the file to be encrypted, so as to obtain an image encrypted file; a privacy encryption unit, configured to perform privacy encryption processing on the privacy data included in the text document in response to determining that there is a text document in the file to be encrypted, so as to obtain a text document. The encrypted file; the first determining unit is configured to determine the file priority of the file to be encrypted according to the historical access volume of the file, the user identity information of the file and the department information of the file; the second determining unit is configured to determine the file re-encryption key of the file to be encrypted according to the historical access volume of the file, the file priority and the encrypted file, and store the file re-encryption key in the key storage service client, wherein the encrypted file may be a file composed of the audio and video encrypted file, the image encrypted file and the text encrypted file; the ring signature unit is configured to perform ring signature processing on the file to be encrypted to obtain file signature information; the re-encryption unit is configured to perform re-encryption processing on the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file; the sending unit is configured to compress the re-encrypted file and send it to the target terminal, so that the target terminal can perform search and matching based on the user identity information on the key storage service client to obtain the file matching key for decryption processing to obtain the decrypted file.

[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0010] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.

[0011] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the file encryption method of some embodiments of the present disclosure can send the encrypted file one by one and compressed, thereby improving the security of the file sending and transmission process while reducing the waste of transmission resources. Specifically, the reason for the leakage of the privacy data of the relevant internal enterprise files and the reduction of the security of file transmission is that: the file is encrypted by a single encryption algorithm. If the file key is leaked, all files encrypted by the same encryption algorithm will have the problem of privacy data leakage, resulting in the leakage of the privacy data of the internal enterprise files and reducing the security of file transmission. Based on this, the file encryption method of some embodiments of the present disclosure can first obtain the information of the file to be encrypted, wherein the above-mentioned file information to be encrypted includes at least one of the following: the number of historical file visits, the department information to which the file belongs, and the identity information of the user to whom the file belongs. Here, the file information to be encrypted is convenient for subsequent file encryption. Secondly, in response to determining that there is an audio and video file in the file to be encrypted corresponding to the above-mentioned file information to be encrypted, the audio and video encoding information corresponding to the above-mentioned audio and video file is extracted to obtain audio and video extraction information. Here, important information in the audio and video can be extracted, and the amount of encrypted data can be reduced. Again, the audio and video extraction information is input into the audio and video encryption model to obtain an audio and video encrypted file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model. Here, the audio and video encryption model can improve the randomness and irregularity of the generated encryption key through a deep learning method, and encrypting the audio and video extraction information with a small amount of data can improve the encryption efficiency, improve the encryption effect, and reduce the system encryption operation load. Then, in response to determining that there is an image file in the above-mentioned file to be encrypted, the above-mentioned image file is subjected to scrambling diffusion encryption processing to obtain an image encrypted file. Here, it can be more in line with the encryption of the image file, improve the encryption effect, and be more targeted. Subsequently, in response to determining that there is a text document in the above-mentioned file to be encrypted, the privacy data included in the above-mentioned text document is subjected to privacy encryption processing to obtain a text encrypted file. Here, it can be more in line with the encryption of the text document, improve the encryption effect, be more targeted, reduce the amount of encrypted data, and improve the encryption efficiency. Subsequently, according to the above-mentioned file history access volume, the user identity information of the above-mentioned file and the department information to which the above-mentioned file belongs, the file priority of the above-mentioned file to be encrypted is determined. Here, the difference between different files can be better distinguished, so as to be more in line with one file and one password, and improve the security of different files to be encrypted. Afterwards, according to the above file history access volume, the above file priority and the encrypted file, the file re-encryption key of the above file to be encrypted is determined, and the above file re-encryption key is stored in the key storage service client, wherein the above encrypted file can be a file composed of the above audio and video encrypted file, the above image encrypted file and the above text encrypted file.Here, the security of the file re-encryption key can be improved, and it is convenient to perform encryption again in the future. Then, the ring signature processing is performed on the above-mentioned file to be encrypted to obtain the file signature information. Here, the integrity of the file can be checked, the security of the file can be further provided, and the situation of the file in the transmission process can be grasped. Then, according to the above-mentioned file re-encryption key, the above-mentioned file signature information and the above-mentioned encrypted file are re-encrypted to obtain the re-encrypted file. Here, double encryption and targeted encryption of different types of files can further improve the security of the file and the security of sending and transmission. Finally, the above-mentioned re-encrypted file is compressed and sent to the target terminal, so that the above-mentioned target terminal can search and match based on the user identity information on the above-mentioned key storage service end, obtain the file matching key for decryption processing, and obtain the decrypted file. Here, compressed sending can reduce the amount of data sent, reduce the waste of transmission resources, and search for access control based on the search and matching of user identity information can improve the security of the file re-encryption key. It can be obtained that the file encryption method can treat the encrypted file as one text and one secret and compressed sending, while improving the security of the file sending and transmission process and reducing the waste of transmission resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0013] Figure 1 is a flow chart of some embodiments of the file encryption method according to the present disclosure;

[0014] Figure 2 is a schematic diagram of the structure of some embodiments of the file encryption device according to the present disclosure;

[0015] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0022] Figure 1 The process 100 of some embodiments of the file encryption method according to the present disclosure is shown. The file encryption method comprises the following steps:

[0023] Step 101, obtaining information of the file to be encrypted.

[0024] In some embodiments, the execution subject of the above-mentioned file encryption method (such as an electronic device) can obtain the file information to be encrypted through a wired connection method or a wireless connection method, wherein the above-mentioned file information to be encrypted includes at least one of the following: the number of historical file accesses, the department information to which the file belongs, and the identity information of the user to which the file belongs. Among them, the above-mentioned file information to be encrypted can be the information of the file waiting for encrypted transmission. The above-mentioned file historical access volume can be the number of times the above-mentioned file to be encrypted has been sent for access before the current time. The above-mentioned department information to which the file belongs can be the information that the network address that sends the above-mentioned file to be encrypted belongs to the department of the enterprise. For example, the above-mentioned department information to which the file belongs can be the development and testing department. The above-mentioned user identity information to which the file belongs can be the information that characterizes the identity of the user who sends the above-mentioned file to be encrypted. For example, the above-mentioned user identity information to which the file belongs can be the employee's work number or the employee's job title.

[0025] Step 102, in response to determining that there is an audio or video file in the file to be encrypted corresponding to the file information to be encrypted, extract data from the audio or video encoding information corresponding to the audio or video file to obtain audio or video extraction information.

[0026] In some embodiments, the execution subject may extract data from the audio and video encoding information corresponding to the audio and video file in response to determining that there is an audio and video file in the file to be encrypted corresponding to the file information to be encrypted, so as to obtain audio and video extraction information. The audio and video encoding information may be information stored in audio and video encoding. For example, if the audio and video file is an MP4 (Moving Picture Experts Group 4) file, the audio and video encoding information may be information in a sample (Sample) stored in a chunk (Chunk) in an MP4 storage format Box. The audio and video extraction information may be privacy information located in the audio and video encoding information and information that needs to be encrypted.

[0027] In some optional implementations of some embodiments, the step of extracting data from the audio and video encoding information corresponding to the audio and video file to obtain the audio and video extraction information may include the following steps:

[0028] The first step is to determine the audio and video coding header information of each audio and video frame included in the audio and video coding information to obtain an audio and video coding header information set. The audio and video coding header information may be information used to determine the importance and type of the audio and video frame. For example, the audio and video coding header information may be a NALU Header.

[0029] In the second step, each audio and video coding header information and the preset coding value in the above-mentioned audio and video coding header information set are bitwise ANDed to obtain the audio and video frame coding type set of the above-mentioned audio and video frames. Among them, the audio and video frame coding type in the above-mentioned audio and video frame coding type set can be a coding method that represents the audio and video in the coding process in a binary manner. The above-mentioned coding method may include: an intra-coded frame based on image intra-coding, a forward prediction frame based on forward coding of an intra-coded frame, and a bidirectional interpolation frame based on front and back coding of an intra-coded frame and a forward prediction coding frame. The above-mentioned preset coding value may be a preset hexadecimal value. For example, the above-mentioned preset coding value may be 0x1F. In practice, the above-mentioned execution subject may perform a bitwise AND operation on the 8-bit binary sequence and the preset coding value included in each audio and video coding header information in the above-mentioned audio and video coding header information set to generate the lower 5 bits of the 8-bit binary information as the audio and video frame coding type to obtain the audio and video frame coding type. Among them, the lower 5 bits of the above-mentioned 8-bit binary can represent the coding method of the audio and video frame and the type of the audio and video frame.

[0030] The third step is to select at least one audio / video coding header information corresponding to the audio / video frame coding type of a key frame from the audio / video coding header information set, wherein the key frame may be an intra-coded frame.

[0031] Step 4: determine the audio and video load information set corresponding to each of the above audio and video frames. The audio and video load information in the above audio and video load information set may be information that is located after the above audio and video coding header information and records the actual data of the audio and video frame. For example, the above audio and video load information may include but is not limited to at least one of the following: prediction residual, transform coefficient, and motion vector difference.

[0032] Step 5: extract the encoding information of each audio and video load information in the audio and video load information set to obtain the audio and video load encoding information set. The audio and video load encoding information in the audio and video load encoding information set may be parameter information located in the audio and video load information, which is indispensable for the encoding and transmission of the audio and video file and does not affect the transmission of the audio and video file. The audio and video load encoding information set may include: motion vector difference, transform coefficient, and non-zero transform coefficient amplitude.

[0033] In a sixth step, the at least one audio and video coding header information and the audio and video payload coding information set are determined as audio and video extraction information.

[0034] Step 103, input the audio and video extraction information into the audio and video encryption model to obtain the audio and video encryption file.

[0035] In some embodiments, the execution subject may input the audio and video extraction information into the audio and video encryption model to obtain an audio and video encryption file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model. The audio and video encryption file may be a file obtained by encrypting the audio and video extraction information. The audio and video encryption model may be a model that encrypts the input audio and video extraction information and outputs the encrypted audio and video. The audio and video chaotic mapping algorithm may be a two-dimensional mapping algorithm for generating an encryption key for the audio and video extraction information. For example, the audio and video chaotic mapping algorithm may be a two-dimensional Henon mapping algorithm. The audio and video encryption adversarial model may be a generative adversarial network that removes the periodicity of the encryption key generated by the audio and video chaotic mapping algorithm and improves the randomness of the key. The audio and video encryption adversarial model may include: a chaotic sequence generator and a chaotic sequence judger. The chaotic sequence generator may be a deconvolutional neural network or a transposed convolutional neural network that generates a similar numerical sequence by extracting the characteristic information of the chaotic sequence output by the input audio and video chaotic mapping algorithm and generating a similar numerical sequence by inputting random noise. The above-mentioned chaotic sequence judger can be a convolutional neural network that judges the difference between the numerical sequence output by the chaotic sequence generator and the sequence generated by the audio and video chaotic mapping algorithm.

[0036] In some optional implementations of some embodiments, the step of inputting the audio and video extraction information into an audio and video encryption model to obtain an audio and video encryption file may include the following steps:

[0037] The first step is to input the initial parameter value set into the above-mentioned audio and video chaotic mapping algorithm to obtain an audio and video chaotic sequence, wherein the initial parameter values ​​in the above-mentioned initial parameter value set are randomly determined values. The audio and video chaotic sequence in the above-mentioned audio and video chaotic sequence set can be a sequence composed of multiple periodic, randomly generated integer values. For example, the above-mentioned audio and video chaotic sequence set can be (x1, x2, y1, y2). The above-mentioned initial parameter value set includes: a first initial parameter value and a second initial parameter value. The value range of the above-mentioned first initial parameter value can be [-1.5, 1.5]. The value range of the above-mentioned second initial parameter value can be [-0.4, 0.4]. The above-mentioned audio and video chaotic mapping algorithm can be x n Can represent the first initial parameter value. n It can represent the second initial parameter value. a can represent the numerical value of the nonlinear degree of the audio and video chaotic mapping algorithm, and the value range can be [2.17, 2.36] ∪ [2.38, 3.89] ∪ [3.91, 4.02] ∪ [4.41, ∞]. b can represent the dynamic change degree of the audio and video chaotic mapping algorithm, and the value is 0.3.

[0038] The second step is to input the above audio and video chaotic sequence into the above audio and video encryption adversarial model to obtain an audio and video adversarial sequence set. Among them, the above audio and video encryption adversarial model may include: a generator and a discriminator. The above generator may be a convolutional neural network model that performs feature learning on the input audio and video chaotic sequence and removes the periodicity in the audio and video chaotic sequence. The above generator may include: a two-dimensional convolutional layer, a batch normalization layer, a residual network whose activation function is a leaky rectified linear unit activation function (LeakyReLU), and a convolutional layer whose activation function is a hyperbolic activation function (Tanh). The above discriminator may be used to judge the error between the random sequence of the above generator and the random sequence generated by the above audio and video chaotic mapping algorithm, so as to determine whether the sequence generated by the generator and the sequence generated by the audio and video chaotic mapping algorithm cannot be identified. The above discriminator may be an encoder composed of a variational autoencoder and a maximum mean difference function.

[0039] The third step is to fuse the audio and video adversarial sequence set to obtain a fused audio and video sequence. The fused audio and video sequence may be a sequence obtained by weighted summing the audio and video adversarial sequence set.

[0040] In the fourth step, according to the fused audio and video sequence, each of the at least one audio and video coding header information is encrypted to generate key frame encrypted header information and obtain a key frame encrypted header information set. The key frame encrypted header information in the key frame encrypted header information set may be information obtained by performing bit-level mask replacement on the header information of the audio and video frame as an internal coding frame.

[0041] As an example, the above-mentioned execution entity can perform bit-level mask replacement processing based on DNA (DeoxyriboNucleic Acid) encoding on each audio and video coding header information in the above-mentioned at least one audio and video coding header information according to the above-mentioned fused audio and video sequence to obtain a key frame encrypted header information set.

[0042] Step 5: encrypt the audio and video payload coding information set to obtain the audio and video encrypted payload information set. In practice, the execution subject may first use the K-order Columbus index and TR code to perform binary processing on each audio and video payload coding information in the audio and video payload coding information set to obtain the audio and video payload binary coding information set. Then, perform XOR encryption on the audio and video adversarial sequence set and each audio and video payload binary coding information in the audio and video payload binary coding information set to obtain the audio and video encrypted payload information set.

[0043] Step 6: Replace the corresponding coding information in the audio and video coding information with the audio and video encryption payload information set and the key frame encryption header information set to obtain the replaced audio and video coding information as the audio and video encryption file.

[0044] In some optional implementations of some embodiments, the audio and video confrontation sequence set includes: a first audio and video confrontation sequence, a second audio and video confrontation sequence, a third audio and video confrontation sequence, and a fourth audio and video confrontation sequence. The first audio and video confrontation sequence, the second audio and video confrontation sequence, the third audio and video confrontation sequence, and the fourth audio and video confrontation sequence may be different sequences generated by the audio and video encryption model.

[0045] Optionally, the fusing process of the audio and video adversarial sequence set to obtain a fused audio and video sequence may include the following steps:

[0046] In the first step, for each first audio and video confrontation value in the first audio and video confrontation sequence, the following determination steps are performed:

[0047] Sub-step 1: determine the second audio and video confrontation value, the third audio and video confrontation value and the fourth audio and video confrontation value corresponding to the first audio and video confrontation value in the second audio and video confrontation sequence, the third audio and video confrontation sequence and the fourth audio and video confrontation sequence.

[0048] Sub-step 2: determine the product of the first audio and video confrontation value, the second audio and video confrontation value and the third audio and video confrontation value as the target audio and video confrontation value.

[0049] Sub-step 3, determining the remainder of the difference between the target audio and video confrontation value and the fourth audio and video confrontation value and the preset value as the first audio and video confrontation remainder. The preset value can be a pre-set value. For example, the preset value can be 256.

[0050] Sub-step 4, determining the remainder of the sum of the square of the first audio and video confrontation remainder and the first audio and video confrontation value divided by the preset value as the second audio and video confrontation remainder.

[0051] Sub-step 5, determining the remainder of the sum of the square of the second audio and video confrontation remainder and the second audio and video confrontation value divided by the preset value as the third audio and video confrontation remainder.

[0052] Sub-step 6, determining the remainder of the sum of the square of the third audio and video confrontation remainder and the third audio and video confrontation value divided by the preset value as the fourth audio and video confrontation remainder.

[0053] Sub-step 7, determining the product of the first audio and video confrontation remainder, the second audio and video confrontation remainder and the third audio and video confrontation remainder, the difference between the product and the target audio and video confrontation remainder, and the remainder divided by the preset value as the first audio and video confrontation intermediate value, wherein the target audio and video confrontation remainder may be a value whose order in the fourth audio and video confrontation remainder sequence corresponding to the fourth audio and video confrontation remainder is smaller than the order of the first audio and video confrontation value. Wherein, when the first audio and video confrontation value is located at the initial position in the first audio and video confrontation sequence, the target audio and video confrontation remainder may be a value located at the initial position in the fourth audio and video confrontation remainder sequence.

[0054] Sub-step 8, determining the remainder of the sum of the square of the first audio and video confrontation intermediate value and the first audio and video confrontation remainder divided by the preset value as the second audio and video confrontation intermediate value.

[0055] Sub-step 9, determining the remainder of the sum of the square of the second audio and video confrontation intermediate value and the second audio and video confrontation remainder divided by the preset value as the third audio and video confrontation intermediate value.

[0056] Sub-step 10, determining the remainder of the sum of the square of the third audio and video confrontation intermediate value and the third audio and video confrontation remainder divided by the preset value as the fourth audio and video confrontation intermediate value.

[0057] Sub-step 11, determining the remainder of the sum of the second audio and video confrontation intermediate value, the third audio and video confrontation intermediate value and the fourth audio and video confrontation intermediate value divided by the preset value as the fused audio and video value.

[0058] In the second step, the obtained fused audio and video values ​​are determined as a fused audio and video sequence.

[0059] Step 104 , in response to determining that there is an image file in the file to be encrypted, perform scrambling diffusion encryption processing on the image file to obtain an encrypted image file.

[0060] In some embodiments, the execution subject may perform scrambling diffusion encryption on the image file in response to determining that the file to be encrypted contains an image file, to obtain an encrypted image file, wherein the encrypted image file may be a file obtained by performing pixel replacement processing on the image file.

[0061] In some optional implementations of some embodiments, performing scrambling diffusion encryption processing on the image file to obtain an encrypted image file may include the following steps:

[0062] In the first step, the privacy image recognition is performed on each image included in the above image file to obtain a privacy image set. The privacy image in the above privacy image set may be a privacy image in which the information contained in the image is privacy information. The above privacy information may include but is not limited to at least one of the following: user identity information, user account information.

[0063] In the second step, for each private image in the above private image set, perform the following image hiding steps:

[0064] Sub-step 1: grayscale the privacy image to obtain a grayscale privacy image. The grayscale privacy image may be an image in which 0 or 255 represents the privacy image.

[0065] Sub-step 2, numerically transforming the row values ​​and column values ​​of the image two-dimensional matrix corresponding to the grayscale privacy image, respectively, to obtain transformed row values ​​and transformed column values ​​as the first chaos initial value and the second chaos initial value.

[0066] As an example, the execution subject may first convert the row value into a binary sequence to obtain a row binary sequence. Secondly, convert the row binary number into a Gray code to obtain a row Gray code. Again, convert the row Gray code into a decimal system to obtain a transformed row value as the first chaotic initial value. Next, convert the column value into a binary sequence to obtain a column binary sequence. Subsequently, insert 1 between the third-to-last digit and the fourth-to-last digit in the column binary sequence to obtain an inserted binary sequence. Then, perform a cyclic right shift on the inserted binary sequence to obtain a right-shifted binary sequence. Finally, convert the cyclic right-shifted binary sequence into a decimal system to obtain a transformed column value.

[0067] Sub-step 3, inputting the first chaos initial value and the second chaos initial value into a one-dimensional image chaos mapping algorithm to obtain an image chaos mapping array, wherein the number of values ​​included in the image chaos mapping array is the same as the number of values ​​included in the two-dimensional matrix of the image. The image chaos mapping array may be a value obtained by multiplying the length and width of the privacy image by the one-dimensional image chaos mapping algorithm. The one-dimensional image chaos mapping algorithm may be an algorithm for generating a one-dimensional random sequence. The one-dimensional image chaos mapping algorithm may be p n+1 =α(μ(1-2p n 2 )+p n-1 -[μ(1-2p n 2 )+p n-1 ]). n+1 It can represent the image chaos mapping array. α can represent the value range of controlling the one-dimensional image chaos mapping algorithm, and the value range can be any non-zero real number. μ can represent the control parameter, and the value range can be any real number. n It can represent the first chaotic initial value. n-1 It can represent the second chaotic initial value. [] can represent the rounding down operation.

[0068] Sub-step 4, performing rounding format conversion processing on the above-mentioned image chaos map array to obtain a converted image chaos two-dimensional matrix. The above-mentioned rounding format conversion processing can be firstly, converting the above-mentioned image chaos map values ​​into a two-dimensional matrix according to the length and width of the above-mentioned privacy image to obtain a chaotic image two-dimensional matrix, and then taking the product of each value in the above-mentioned chaotic image two-dimensional matrix and 10 to the 8th power and dividing it by the remainder of 256 to obtain a conversion processing of the converted image chaos two-dimensional matrix.

[0069] Sub-step 5, performing XOR processing on the converted image chaotic two-dimensional matrix and the image two-dimensional matrix to obtain an image XOR two-dimensional matrix.

[0070] Sub-step 6, performing diffusion processing on the above image XOR two-dimensional matrix to obtain a diffused image two-dimensional matrix. The diffused image two-dimensional matrix can be a two-dimensional matrix obtained by sequentially permuting the image XOR two-dimensional matrix after diffusion.

[0071] As an example, the execution subject can firstly perform the first chaotic initial value iterations of the one-dimensional image chaotic mapping algorithm with the first appearance of the first chaotic initial value in the image chaotic mapping array as an interval to obtain an iterated array. Secondly, multiply each iterated value in the iterated array by 100 and round it down to obtain a rounded array, and use the value in the rounded array as the interval for selecting the scrambling position. Subsequently, convert the image XOR two-dimensional matrix into a one-dimensional array as an image XOR array, and start from the first value of the rounded array, and start selecting the values ​​in the image XOR array with each value of the rounded array as an interval. Before selecting, it is necessary to first determine whether the currently selected value in the image XOR array is selected. If it is selected, jump to the next value to continue selecting, and repeat this cycle. At the same time, determine whether the number of unselected values ​​in the image XOR array is less than the preset selection threshold. If it is less than the preset selection threshold, directly place the unselected values ​​in the image XOR array in order behind the selected values ​​as a selected value array. Then, the position of each value in the selected value array in the image XOR array is determined as the position value array, and each value in the position value array is divided by 256 to obtain a remainder value array. Finally, the selected value array and the remainder value array are converted into a two-dimensional matrix and XORed to obtain a two-dimensional matrix of the diffused image.

[0072] Sub-step 7, hiding the above-mentioned diffused image two-dimensional matrix into a carrier image to obtain an image encryption file, wherein the above-mentioned carrier image is an image with a size greater than or equal to twice that of the private image and does not contain private information.

[0073] Step 105 , in response to determining that there is a text document in the file to be encrypted, privacy encryption processing is performed on the private data included in the text document to obtain a text encrypted file.

[0074] In some embodiments, the execution subject may, in response to determining that there is a text document in the file to be encrypted, perform privacy encryption processing on the private data included in the text document to obtain a text encrypted file. The text encrypted file may be a file obtained by encrypting the private data in the text document.

[0075] In some optional implementations of some embodiments, the privacy encryption processing of the privacy data included in the text document to obtain the encrypted text file may include the following steps:

[0076] The first step is to identify sensitive data in the text document to obtain a text sensitive data set, wherein the text sensitive data set may be data that may cause harm to the enterprise after data leakage.

[0077] As an example, the above-mentioned execution entity can input the above-mentioned text document into a sensitive data recognition model to obtain a text sensitive data set. Among them, the above-mentioned sensitive data recognition model may include: an unsupervised bidirectional language model based on deep learning, a fully connected layer and a CRF (Conditional Random Field) layer. The above-mentioned bidirectional language model can be BERT (Bidirectional Encoder Representation from Transformers, a bidirectional encoding representation model based on Transformers), ELMo (Embedding from Language Model), GPT (Generative Pre-training Transformer, a generative pre-training transformer).

[0078] The second step is to determine the byte set of the text sensitive data set to obtain the text sensitive byte set, wherein the text sensitive byte set may be the total byte set corresponding to each type of data in the text sensitive data set.

[0079] As an example, the execution subject may first perform clustering on the text sensitive data set to obtain text sensitive data sets of various data types. Then, a one-way function is used to determine the byte subsets corresponding to the text sensitive data sets of various data types. Finally, the obtained multiple byte subsets are concatenated to obtain a sensitive byte set.

[0080] The third step is to generate a key vector matrix for the text sensitive byte set by using a preset key generation function. The preset key generation function may be the Weierstrass equation. The key vector matrix may be a parameter matrix for converting text sensitive data into ciphertext.

[0081] The fourth step is to encrypt the key vector matrix to obtain a communication data key for the text sensitive byte set. The communication data key may be a disordered checksum used to ensure that the text sensitive data is not stolen during the transmission process.

[0082] As an example, the execution entity may utilize an encryption algorithm based on an elliptic equation curve to encrypt the key vector matrix to obtain a communication data key for a text sensitive byte set.

[0083] The fifth step is to perform hash value mapping processing on the communication data key to obtain a text-encoded hash value for the text-sensitive data set. The text-encoded hash value can represent the hash value of the encoding position information of the encrypted text-sensitive data during the transmission process, and the execution subject can use a logistic map to perform hash value mapping processing on the communication data key to obtain a text-encoded hash value for the text-sensitive data set.

[0084] Step 6: Generate a text transmission key arrangement diagram for the text sensitive byte set through the text encoding hash value, wherein the text transmission key arrangement diagram may be a two-dimensional arrangement diagram for representing the transmission order of the text sensitive data set.

[0085] As an example, the execution subject can determine the text encoding position corresponding to each text sensitive data after encoding through the text encoding hash value to obtain a text encoding position set. Then, through the text encoding position set, a text transmission key arrangement diagram for the text sensitive byte set is generated.

[0086] The seventh step is to reorder the above-mentioned text sensitive data set and the remaining text data set through the above-mentioned text transmission key arrangement diagram to obtain a reordered file as a text encryption file, wherein the above-mentioned remaining text data set is a data set obtained by removing the above-mentioned text sensitive data set from the above-mentioned text document.

[0087] In the process of adopting technical solutions to solve the above-mentioned technical problem one, the following technical problem two is often accompanied: how to accurately identify private data in text documents to improve the security of private data and reduce the amount of encrypted data, thereby reducing the waste of transmission resources. For the above-mentioned technical problem two, the conventional solution is generally: to identify the private data of the above-mentioned text documents through the private data identification rules stipulated by expert experience. However, the above-mentioned conventional solution still has the following technical problems: due to the limitations of the privacy field names determined by expert experience, the coverage is not comprehensive enough, and the expert experience has a certain degree of subjectivity, it is easy to miss and misidentify, resulting in low accuracy of privacy data identification, reducing the security of privacy data, increasing the risk of privacy data leakage, and increasing the waste of transmission resources and the computational load of decryption of the target terminal. The inventor, taking into account the shortcomings of the conventional solution and combining the advantages / technical status of the privacy number identification owned by the inventor, can decide to adopt the following solution:

[0088] In some optional implementations of some embodiments, the above-mentioned performing sensitive data identification on the above-mentioned text document to obtain a text sensitive data set may also include the following steps:

[0089] The first step is to filter out at least one text data of a structured type from the above text documents to obtain a structured text data set.

[0090] The second step is to determine the business information entropy of each structured text data in the structured text data set to obtain a business information entropy set, wherein the business information entropy may be the source entropy of the structured text data.

[0091] The third step is to determine the maximum discrete entropy of each structured text data in the structured text data set to obtain a maximum discrete entropy set, wherein the maximum discrete entropy may be a discrete entropy determined by the maximum discrete entropy determination.

[0092] The fourth step is to generate a data sensitivity value for each structured text data in the structured text data set according to the business information entropy set and the maximum discrete entropy set, and obtain a data sensitivity value set. The data sensitivity value can represent the probability value that the structured text data is private data. The data sensitivity value can be an indicator for measuring the degree of disorder of the structured text data in the structured text data set. The smaller the data sensitivity value is, the greater the probability that the structured text data is private data.

[0093] As an example, the execution subject may perform the following determination steps for each structured text data in the structured text data set: first, determine the difference between the maximum discrete entropy of the structured text data and the business information entropy to obtain difference data. Then, determine the ratio of the difference data to the maximum discrete entropy as the data sensitivity value.

[0094] The fifth step is to determine the number of business clusters of the structured text dataset. The number of business clusters may be the number of clusters into which the structured text dataset is clustered. In practice, the execution subject may use the elbow method to determine the number of business clusters of the structured text dataset.

[0095] In step 6, clustering is performed on the structured text data set according to the business cluster quantity and the data sensitivity value set to obtain initial sensitive text data clusters and initial non-sensitive text data clusters. The clustering process may be performed using a k-means clustering algorithm.

[0096] The seventh step is to determine the data association relationship information set between the above-mentioned initial sensitive text data cluster and the above-mentioned initial non-sensitive text data cluster. The data association relationship information in the above-mentioned data association relationship information set may be the association relationship information of inferring the private data through the non-private data. In practice, the above-mentioned execution subject may use the Apriori algorithm to determine the data association relationship information set between the above-mentioned initial sensitive text data cluster and the above-mentioned initial non-sensitive text data cluster.

[0097] In the eighth step, the data association relationship information set is screened to obtain a screened data association relationship information set, wherein the screening process may be to screen out data association information sets whose association confidence is greater than or equal to 0.7.

[0098] In step 9, in response to determining that the ratio of the post-screening quantity to the associated quantity is greater than or equal to a preset ratio threshold, the initial sensitive text data cluster and the initial non-sensitive text data cluster are updated according to the data association relationship information set to obtain updated sensitive text data clusters and updated non-sensitive text data clusters. The post-screening quantity may be the number of post-screening data association relationship information included in the post-screening data association relationship information set. The associated quantity may be the number of data association relationship information included in the data association relationship information set. The preset ratio threshold may be a pre-set value. For example, the preset ratio threshold may be one third.

[0099] As an example, the execution subject may perform the following average value determination step for each structured text data in the structured text data set: first, determine the structured text data having data association information with the structured text data as the associated structured text data, and obtain the associated structured text data set. Secondly, determine the business condition entropy of the structured text data under the association conditions of each associated structured data in the associated structured text data set, and obtain the business condition entropy set. Then, determine the ratio of the maximum discrete entropy of the structured text data and the difference between each business condition entropy in the business condition entropy set and the maximum discrete entropy as the updated data sensitivity value, and obtain the updated data sensitivity value set. Finally, determine the average value of the updated data sensitivity value set, and obtain the updated data sensitivity value of the structured text data. In the second step, cluster the obtained updated data sensitivity value set to obtain updated sensitive text data clusters and updated non-sensitive text data clusters.

[0100] In the tenth step, the updated sensitive text data cluster and the unstructured privacy data set are determined as business privacy data sets.

[0101] The above technical solution and its related contents, combined with step "step 110", as an inventive point of the embodiment of the present disclosure, solves the technical problem 2 mentioned in the background technology "due to the limitations of the privacy field names determined by expert experience, the coverage is not comprehensive, and the expert experience has a certain subjectivity, it is easy to miss and misidentify, resulting in low accuracy of privacy data identification, reduced privacy data security, increased risk of privacy data leakage, increased waste of transmission resources, and increased computing load of encryption and decryption of the target terminal and the file sender". The factors that lead to low accuracy of privacy data identification, reduced privacy data security, increased risk of privacy data leakage, increased waste of transmission resources, and increased computing load of encryption and decryption of the target terminal and the file sender are often as follows: due to the limitations of the privacy field names determined by expert experience, the coverage is not comprehensive, and the expert experience has a certain subjectivity, it is easy to miss and misidentify. If the above factors are solved, the accuracy of privacy data identification and the security of privacy data can be improved, the risk of privacy data leakage can be reduced, the waste of transmission resources can be reduced, and the computing load of encryption and decryption of the target terminal and the file sender can be reduced. In order to achieve this effect, the present disclosure first determines the business information entropy and maximum discrete entropy of each structured text data, generates a data sensitivity value, and quantifies the sensitivity of the structured text data. Secondly, the structured text data set is clustered by the data sensitivity value to obtain the initial privacy text data cluster and the initial non-privacy text data cluster. The automatic initial division is performed by the data sensitivity value set, which can avoid the recognition of human experience to a certain extent and increase the objectivity of privacy data recognition. Then, the data association relationship information of the initial privacy text data cluster and the initial non-privacy text data cluster is determined, and the initial privacy text data cluster and the initial non-privacy text data cluster are updated by the data association relationship information to obtain the business privacy data set. The correlation between the data is added on the basis of the data set distance measurement to identify the privacy data. The privacy data is determined by multi-dimensional analysis, which can further improve the accuracy of privacy data recognition, reduce the situation of misidentification and missed recognition, thereby improving the security of text documents, reducing the amount of data transmitted to the target terminal, reducing the waste of transmission resources, and reducing the encryption and decryption load of the encrypted text document by the file sender and the target terminal.

[0102] Step 106, determining the file priority of the file to be encrypted according to the number of historical file accesses, the identity information of the user to which the file belongs, and the information of the department to which the file belongs.

[0103] In some embodiments, the execution subject may determine the file priority of the file to be encrypted based on the number of historical accesses to the file, the identity information of the user to whom the file belongs, and the information of the department to which the file belongs. The file priority may represent the importance of the file to be encrypted.

[0104] As an example, the execution subject may first determine the user identity priority and department priority of the user identity information and department information of the file, and then perform weighted sum processing on the file history access volume, the user identity priority and the department priority to obtain the file priority of the file to be encrypted.

[0105] Step 107: Determine the file re-encryption key of the file to be encrypted according to the file history access volume, the file priority and the encrypted file, and store the file re-encryption key in the key storage service client.

[0106] In some embodiments, the execution entity may determine the file re-encryption key of the file to be encrypted based on the file history access volume, the file priority and the encrypted file, and store the file re-encryption key in the key storage service client, wherein the encrypted file may be a file composed of the audio and video encryption file, the image encryption file and the text encryption file. The file re-encryption key may be a numerical sequence for encryption. The key storage service client may be a server for storing keys. The encrypted file may be a file composed of one or more of the audio and video encryption file, the image encryption file and the text encryption file.

[0107] As an example, the execution subject may first perform numerical encoding processing on the file history access volume and the file priority to obtain a coding feature vector. Then, the coding feature vector is input into the audio and video encryption model to obtain a file chaotic sequence. The chaotic sequence of the file and the numerical sequence corresponding to the encrypted file have the same number of numerical values. Finally, the difference between the encrypted file and the chaotic sequence of the file is determined as the file re-encryption key.

[0108] Step 108: Perform ring signature processing on the file to be encrypted to obtain file signature information.

[0109] In some embodiments, the execution subject may perform ring signature processing on the to-be-encrypted file to obtain file signature information, wherein the file signature information may be information used to verify whether the file is the same after it is sent as before it is sent.

[0110] As an example, the execution entity may use a ring signature algorithm to perform ring signature processing on the file to be encrypted to obtain file signature information.

[0111] Step 109: re-encrypt the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file.

[0112] In some embodiments, the execution entity may re-encrypt the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file.

[0113] As an example, the execution entity may utilize a symmetric encryption algorithm to re-encrypt the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file.

[0114] Step 110, compress the re-encrypted file and send it to the target terminal, so that the target terminal can search and match the file based on the user identity information on the key storage service client, obtain the file matching key for decryption processing, and obtain the decrypted file.

[0115] In some embodiments, the execution entity may compress the re-encrypted file and send it to the target terminal, so that the target terminal can perform search and matching based on the user identity information on the key storage service client, obtain a file matching key for decryption processing, and obtain a decrypted file. The target terminal may be a user terminal or server for receiving re-encrypted files. The file matching key may be a key corresponding to the re-encrypted file and used to decrypt the re-encrypted file. The compressed sending may be a compression of the re-encrypted file using a compression algorithm. In practice, the file matching key may be a search access algorithm based on user identity information, which performs an access matching search on the key set included in the key storage service client to obtain a key corresponding to the re-encrypted file.

[0116] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the file encryption method of some embodiments of the present disclosure can send the encrypted file one by one and compressed, thereby improving the security of the file sending and transmission process while reducing the waste of transmission resources. Specifically, the reason for the leakage of the privacy data of the relevant internal enterprise files and the reduction of the security of file transmission is that: the file is encrypted by a single encryption algorithm. If the file key is leaked, all files encrypted by the same encryption algorithm will have the problem of privacy data leakage, resulting in the leakage of the privacy data of the internal enterprise files and reducing the security of file transmission. Based on this, the file encryption method of some embodiments of the present disclosure can first obtain the information of the file to be encrypted, wherein the above-mentioned file information to be encrypted includes at least one of the following: the number of historical file visits, the department information to which the file belongs, and the identity information of the user to whom the file belongs. Here, the file information to be encrypted is convenient for subsequent file encryption. Secondly, in response to determining that there is an audio and video file in the file to be encrypted corresponding to the above-mentioned file information to be encrypted, the audio and video encoding information corresponding to the above-mentioned audio and video file is extracted to obtain audio and video extraction information. Here, important information in the audio and video can be extracted, and the amount of encrypted data can be reduced. Again, the audio and video extraction information is input into the audio and video encryption model to obtain an audio and video encrypted file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model. Here, the audio and video encryption model can improve the randomness and irregularity of the generated encryption key through a deep learning method, and encrypting the audio and video extraction information with a small amount of data can improve the encryption efficiency, improve the encryption effect, and reduce the system encryption operation load. Then, in response to determining that there is an image file in the above-mentioned file to be encrypted, the above-mentioned image file is subjected to scrambling diffusion encryption processing to obtain an image encrypted file. Here, it can be more in line with the encryption of the image file, improve the encryption effect, and be more targeted. Subsequently, in response to determining that there is a text document in the above-mentioned file to be encrypted, the privacy data included in the above-mentioned text document is subjected to privacy encryption processing to obtain a text encrypted file. Here, it can be more in line with the encryption of the text document, improve the encryption effect, be more targeted, reduce the amount of encrypted data, and improve the encryption efficiency. Subsequently, according to the above-mentioned file history access volume, the user identity information of the above-mentioned file and the department information to which the above-mentioned file belongs, the file priority of the above-mentioned file to be encrypted is determined. Here, the difference between different files can be better distinguished, so as to be more in line with one file and one password, and improve the security of different files to be encrypted. Afterwards, according to the above file history access volume, the above file priority and the encrypted file, the file re-encryption key of the above file to be encrypted is determined, and the above file re-encryption key is stored in the key storage service client, wherein the above encrypted file can be a file composed of the above audio and video encrypted file, the above image encrypted file and the above text encrypted file.Here, the security of the file re-encryption key can be improved, and it is convenient to perform encryption again in the future. Then, the ring signature processing is performed on the above-mentioned file to be encrypted to obtain the file signature information. Here, the integrity of the file can be checked, the security of the file can be further provided, and the situation of the file in the transmission process can be grasped. Then, according to the above-mentioned file re-encryption key, the above-mentioned file signature information and the above-mentioned encrypted file are re-encrypted to obtain the re-encrypted file. Here, double encryption and targeted encryption of different types of files can further improve the security of the file and the security of sending and transmission. Finally, the above-mentioned re-encrypted file is compressed and sent to the target terminal, so that the above-mentioned target terminal can search and match based on the user identity information on the above-mentioned key storage service end, obtain the file matching key for decryption processing, and obtain the decrypted file. Here, compressed sending can reduce the amount of data sent, reduce the waste of transmission resources, and search for access control based on the search and matching of user identity information can improve the security of the file re-encryption key. It can be obtained that the file encryption method can treat the encrypted file as one text and one secret and compressed sending, while improving the security of the file sending and transmission process and reducing the waste of transmission resources.

[0117] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a file encryption device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the file encryption device can be specifically applied to various electronic devices.

[0118] like Figure 2As shown, a file encryption device 200 includes: an acquisition unit 201, a data extraction unit 202, an input unit 203, a scrambled diffusion encryption unit 204, a privacy encryption unit 205, a first determination unit 206, a second determination unit 207, a ring signature unit 208, a re-encryption unit 209 and a sending unit 210. The acquisition unit 201 is configured to: acquire the file information to be encrypted, wherein the file information to be encrypted includes at least one of the following: the number of historical file accesses, the department information to which the file belongs, and the identity information of the user to which the file belongs. The data extraction unit 202 is configured to: in response to determining that there is an audio and video file in the file to be encrypted corresponding to the file information to be encrypted, extract data from the audio and video encoding information corresponding to the audio and video file to obtain audio and video extraction information. The input unit 203 is configured to: input the audio and video extraction information into the audio and video encryption model to obtain an audio and video encrypted file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model. The scrambled diffusion encryption unit 204 is configured to: in response to determining that there is an image file in the above-mentioned file to be encrypted, perform scrambled diffusion encryption processing on the above-mentioned image file to obtain an image encrypted file. The privacy encryption unit 205 is configured to: in response to determining that there is a text document in the above-mentioned file to be encrypted, perform privacy encryption processing on the privacy data included in the above-mentioned text document to obtain a text encrypted file. The first determination unit 206 is configured to: determine the file priority of the above-mentioned file to be encrypted according to the above-mentioned file historical access volume, the user identity information of the above-mentioned file and the department information to which the above-mentioned file belongs. The second determination unit 207 is configured to: determine the file re-encryption key of the above-mentioned file to be encrypted according to the above-mentioned file historical access volume, the above-mentioned file priority and the encrypted file, and store the above-mentioned file re-encryption key in the key storage service client, wherein the above-mentioned encrypted file may be a file composed of the above-mentioned audio and video encrypted file, the above-mentioned image encrypted file and the above-mentioned text encrypted file. The ring signature unit 208 is configured to: perform ring signature processing on the above-mentioned file to be encrypted to obtain file signature information. The re-encryption unit 209 is configured to: re-encrypt the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file. The sending unit 210 is configured to: compress the re-encrypted file and send it to the target terminal, so that the target terminal can search and match based on the user identity information on the key storage service terminal to obtain the file matching key for decryption processing and obtain the decrypted file.

[0119] It is understandable that the units recorded in the file encryption device 200 and the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the file encryption device 200 and the units included therein, and will not be described in detail here.

[0120] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device (eg, an electronic device) 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0122] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0123] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0124] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0125] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0126] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently and not be assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the file information to be encrypted, wherein the above-mentioned file information to be encrypted includes at least one of the following: the number of historical file accesses, the information of the department to which the file belongs, and the identity information of the user to which the file belongs; in response to determining that there is an audio or video file in the file to be encrypted corresponding to the above-mentioned file information to be encrypted, extracts data from the audio and video encoding information corresponding to the above-mentioned audio and video file to obtain audio and video extraction information; inputs the above-mentioned audio and video extraction information into the audio and video encryption model to obtain an audio and video encrypted file, wherein the above-mentioned audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model; in response to determining that there is an image file in the above-mentioned file to be encrypted, performs scrambling diffusion encryption processing on the above-mentioned image file to obtain an image encrypted file; in response to determining that there is a text document in the above-mentioned file to be encrypted, performs scrambling diffusion encryption processing on the privacy data included in the above-mentioned text document. Privacy encryption processing is performed to obtain a text encrypted file; the file priority of the file to be encrypted is determined according to the historical access volume of the file, the user identity information of the file and the department information of the file; the file re-encryption key of the file to be encrypted is determined according to the historical access volume of the file, the file priority and the encrypted file, and the file re-encryption key is stored in the key storage service client, wherein the encrypted file may be a file composed of the audio and video encrypted file, the image encrypted file and the text encrypted file; ring signature processing is performed on the file to be encrypted to obtain file signature information; according to the file re-encryption key, the file signature information and the encrypted file are re-encrypted to obtain a re-encrypted file; the re-encrypted file is compressed and sent to the target terminal, so that the target terminal can perform search and matching based on the user identity information on the key storage service client, obtain the file matching key for decryption processing, and obtain the decrypted file.

[0127] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a data extraction unit, an input unit, a scrambled diffusion encryption unit, a privacy encryption unit, a first determination unit, a second determination unit, a ring signature unit, a re-encryption unit, and a sending unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the acquisition unit may also be described as a "unit for acquiring file information to be encrypted".

[0130] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0131] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A file encryption method, comprising: Acquire information of the file to be encrypted, wherein the information of the file to be encrypted includes at least one of the following: the number of historical accesses to the file, information of the department to which the file belongs, and identity information of the user to whom the file belongs; In response to determining that there is an audio or video file in the file to be encrypted corresponding to the file information to be encrypted, extracting data from the audio or video encoding information corresponding to the audio or video file to obtain audio or video extraction information; Inputting the audio and video extraction information into an audio and video encryption model to obtain an audio and video encryption file, wherein the audio and video encryption model includes: an audio and video chaos mapping algorithm and an audio and video encryption adversarial model; In response to determining that there is an image file in the file to be encrypted, performing scrambling diffusion encryption processing on the image file to obtain an image encrypted file; In response to determining that there is a text document in the file to be encrypted, performing privacy encryption processing on the private data included in the text document to obtain a text encrypted file; Determine the file priority of the file to be encrypted according to the number of historical accesses to the file, the identity information of the user to which the file belongs, and the information of the department to which the file belongs; Determine a file re-encryption key of the file to be encrypted according to the file history access volume, the file priority and the encrypted file, and store the file re-encryption key in a key storage service client, wherein the encrypted file is a file composed of the audio and video encrypted file, the image encrypted file and the text encrypted file; Performing ring signature processing on the file to be encrypted to obtain file signature information; Re-encrypting the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file; The re-encrypted file is compressed and sent to the target terminal, so that the target terminal can search and match based on the user identity information on the key storage service client, obtain the file matching key for decryption processing, and obtain the decrypted file.

2. The method according to claim 1, wherein: The step of extracting data from the audio and video encoding information corresponding to the audio and video file to obtain audio and video extraction information includes: Determine the audio and video coding header information of each audio and video frame included in the audio and video coding information to obtain an audio and video coding header information set; Performing bitwise AND processing on each audio and video coding header information and a preset coding value in the audio and video coding header information set to obtain an audio and video frame coding type set of each audio and video frame; Filter out at least one audio and video encoding header information corresponding to the audio and video frame encoding type of a key frame from the audio and video encoding header information set; Determine the audio and video load information set corresponding to each audio and video frame; Extracting encoding information from each audio and video load information in the audio and video load information set to obtain an audio and video load encoding information set; The at least one audio and video coding header information and the audio and video payload coding information set are determined as audio and video extraction information.

3. The method according to claim 2, wherein: The step of inputting the audio and video extraction information into an audio and video encryption model to obtain an audio and video encryption file includes: Inputting an initial parameter value set into the audio and video chaotic mapping algorithm to obtain an audio and video chaotic sequence, wherein the initial parameter values ​​in the initial parameter value set are randomly determined values; Inputting the audio and video chaotic sequence into the audio and video encryption adversarial model to obtain an audio and video adversarial sequence set; Performing fusion processing on the audio and video adversarial sequence set to obtain a fused audio and video sequence; According to the fused audio and video sequence, encrypt each audio and video encoding header information in the at least one audio and video encoding header information to generate key frame encrypted header information, and obtain a key frame encrypted header information set; Encrypting the audio and video payload encoding information set to obtain an audio and video encrypted payload information set; The audio and video encryption payload information set and the key frame encryption header information set replace the corresponding encoding information in the audio and video encoding information to obtain the replaced audio and video encoding information as an audio and video encryption file.

4. The method according to claim 3, wherein: The audio and video confrontation sequence set includes: a first audio and video confrontation sequence, a second audio and video confrontation sequence, a third audio and video confrontation sequence and a fourth audio and video confrontation sequence; and The step of fusing the audio and video adversarial sequence set to obtain a fused audio and video sequence includes: For each first audio and video confrontation value in the first audio and video confrontation sequence, the following determination steps are performed: Determine a second audio and video confrontation value, a third audio and video confrontation value, and a fourth audio and video confrontation value corresponding to the first audio and video confrontation value in the second audio and video confrontation sequence, the third audio and video confrontation sequence, and the fourth audio and video confrontation sequence; Determine the product of the first audio and video confrontation value, the second audio and video confrontation value, and the third audio and video confrontation value as a target audio and video confrontation value; Determine a remainder of a difference between the target audio and video confrontation value and the fourth audio and video confrontation value and a preset value as a first audio and video confrontation remainder; Determine a remainder obtained by dividing the sum of the square of the first audio and video confrontation remainder and the first audio and video confrontation value by the preset value as a second audio and video confrontation remainder; Determine a remainder obtained by dividing the sum of the square of the second audio and video confrontation remainder and the second audio and video confrontation value by the preset value as a third audio and video confrontation remainder; Determine a remainder obtained by dividing the sum of the square of the third audio and video confrontation remainder and the third audio and video confrontation value by the preset value as a fourth audio and video confrontation remainder; Determine the product of the first audio and video confrontation remainder, the second audio and video confrontation remainder and the third audio and video confrontation remainder, the difference between the product and the target audio and video confrontation remainder, and the remainder divided by the preset value as the first audio and video confrontation intermediate value, wherein the target audio and video confrontation remainder is a value whose order in the fourth audio and video confrontation remainder sequence corresponding to the fourth audio and video confrontation remainder is smaller than the order of the first audio and video confrontation value; Determine a remainder of the sum of the square of the first audio and video confrontation intermediate value and the first audio and video confrontation remainder divided by the preset value as the second audio and video confrontation intermediate value; Determine a remainder of the sum of the square of the second audio and video confrontation intermediate value and the second audio and video confrontation remainder divided by the preset value as the third audio and video confrontation intermediate value; Determine a remainder of the sum of the third audio and video confrontation intermediate value and the square of the third audio and video confrontation remainder and the preset value as the fourth audio and video confrontation intermediate value; Determine a remainder of the sum of the second audio and video confrontation intermediate value, the third audio and video confrontation intermediate value, and the fourth audio and video confrontation intermediate value and the preset value as the fused audio and video value; The obtained fused audio and video values ​​are determined as a fused audio and video sequence.

5. The method according to claim 1, wherein: The step of performing scrambling diffusion encryption processing on the image file to obtain an encrypted image file includes: Performing privacy image recognition on each image included in the image file to obtain a privacy image set; For each private image in the private image set, the following image hiding steps are performed: grayscale the privacy image to obtain a grayscale privacy image; Performing numerical transformation on the row values ​​and column values ​​of the image two-dimensional matrix corresponding to the grayscale privacy image, respectively, to obtain transformed row values ​​and transformed column values ​​as the first chaos initial value and the second chaos initial value; Inputting the first chaos initial value and the second chaos initial value into a one-dimensional image chaos mapping algorithm to obtain an image chaos mapping array, wherein the number of values ​​included in the image chaos mapping array is the same as the number of values ​​included in the image two-dimensional matrix; Performing integer format conversion processing on the image chaos map array to obtain a converted image chaos two-dimensional matrix; Performing XOR processing on the converted image chaotic two-dimensional matrix and the image two-dimensional matrix to obtain an image XOR two-dimensional matrix; Performing diffusion processing on the image XOR two-dimensional matrix to obtain a diffused image two-dimensional matrix; The diffused image two-dimensional matrix is ​​hidden in a carrier image to obtain an image encryption file, wherein the carrier image is an image with a size greater than or equal to twice that of the privacy image and does not contain privacy information.

6. The method according to claim 1, wherein: The step of performing privacy encryption processing on the private data included in the text document to obtain a text encrypted file includes: Performing sensitive data identification on the text document to obtain a text sensitive data set; Determine a byte set of the text sensitive data set to obtain a text sensitive byte set; Generate a key vector matrix for the text sensitive byte set by using a preset key generation function; Encrypting the key vector matrix to obtain a communication data key for a text sensitive byte set; Performing hash value mapping processing on the communication data key to obtain a text-encoded hash value for the text-sensitive data set; Generate a text transmission key arrangement diagram for a text sensitive byte set through the text encoding hash value; The text sensitive data set and the remaining text data set are reordered through the text transmission key arrangement diagram to obtain a reordered file as a text encryption file, wherein the remaining text data set is a data set obtained by removing the text sensitive data set from the text document.

7. A file encryption device, comprising: The acquisition unit is configured to acquire information of the file to be encrypted, wherein the information of the file to be encrypted includes at least one of the following: the number of historical accesses to the file, information of the department to which the file belongs, and identity information of the user to whom the file belongs; A data extraction unit is configured to extract data from the audio and video encoding information corresponding to the audio and video file in response to determining that there is an audio and video file in the file to be encrypted corresponding to the file information to be encrypted, so as to obtain audio and video extraction information; An input unit is configured to input the audio and video extraction information into an audio and video encryption model to obtain an audio and video encryption file, wherein the audio and video encryption model includes: an audio and video chaotic mapping algorithm and an audio and video encryption adversarial model; a scrambling diffusion encryption unit, configured to, in response to determining that an image file exists in the file to be encrypted, perform scrambling diffusion encryption processing on the image file to obtain an encrypted image file; a privacy encryption unit, configured to, in response to determining that a text document exists in the file to be encrypted, perform privacy encryption processing on the privacy data included in the text document to obtain a text encrypted file; A first determining unit is configured to determine the file priority of the to-be-encrypted file according to the number of historical accesses to the file, the identity information of the user to which the file belongs, and the information of the department to which the file belongs; A second determining unit is configured to determine a file re-encryption key of the file to be encrypted according to the file history access volume, the file priority and the encrypted file, and store the file re-encryption key in a key storage service client, wherein the encrypted file is a file composed of the audio and video encrypted file, the image encrypted file and the text encrypted file; A ring signature unit is configured to perform a ring signature process on the file to be encrypted to obtain file signature information; a re-encryption unit, configured to re-encrypt the file signature information and the encrypted file according to the file re-encryption key to obtain a re-encrypted file; The sending unit is configured to compress and send the re-encrypted file to the target terminal, so that the target terminal can search and match the file based on the user identity information on the key storage service end, obtain the file matching key for decryption processing, and obtain the decrypted file.

8. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data processing method and device, storage medium and electronic equipment

    CN113329239A

  • File encryption method and system

    CN115758422A

  • Image encryption method and device, electronic equipment and storage medium

    CN117714613A

  • File encryption method, terminal, apparatus, device, and medium

    WO2022048315A1