IP Library Granted Patent US 12,418,515
Granted Patent B2
US 12,418,515 · App. 18/250,210 · Granted Sep 16, 2025

File encryption and transmission method and apparatus

Inventors: Yang Liu (Jiangsu, CN); Zheng Qin (Jiangsu, CN); Tengda Yang (Jiangsu, CN); Jinbiao He (Jiangsu, CN)
Assignee: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
H04L63/0428G06F21/64H04L9/0618H04L9/3239
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,418,515
App. No.
18/250,210
Granted
Sep 16, 2025
Kind
B2
Abstract

A file encryption and transmission method and apparatus are provided. The method includes: acquiring a set of files to be transmitted; generating, for file information of each file in the set of files to be transmitted, a key string by using a first preset algorithm; compressing and encrypting, by using the key string, the set of files to be transmitted to obtain an encrypted file; encrypting the key string by using a prefabricated encryption machine to generate an encrypted string; transmitting, through a network, the encrypted file, the encrypted string and an information file to a destination end; and executing, by the destination end, a decryption operation based on the encrypted string and the encrypted file to acquire a decrypted file, and performing integrity check on the decrypted file based on the file information.

Claims (77)

1. A file encryption and transmission method, comprising:

acquiring a set of files to be transmitted;

generating, for file information of each file in the set of files to be transmitted, a key string by using a first preset algorithm;

compressing and encrypting, by using the key string, the set of files to be transmitted to obtain an encrypted file;

encrypting the key string by using a prefabricated encryption machine to generate an encrypted string; and

transmitting, through a network, the encrypted file, the encrypted string and an information file to a destination end, and executing, by the destination end, a decryption operation based on the encrypted string and the encrypted file to acquire a decrypted file, and performing, by the destination end, integrity check on the decrypted file based on the file information;

wherein executing, by the destination end, the decryption operation based on the encrypted string and the encrypted file to acquire the decrypted file, and performing, by the destination end, the integrity check on the decrypted file based on the file information comprises:

decrypting, by using the encryption machine, the encrypted string at the destination end to obtain the key string;

decrypting and decompressing the corresponding encrypted file by using the key string and by using a Spark technology; and

performing the integrity check on the decrypted file based on the file information in the information file.

2. The file encryption and transmission method according to claim 1 , wherein the file information comprises one or a combination of: a file path, a file size, a last modification time, and a file Message-Digest Algorithm 5 (MD5) check value.

3. The file encryption and transmission method according to claim 1 , wherein compressing and encrypting, by using the key string, the set of files to be transmitted to obtain the encrypted file comprises:

compressing the set of files to be transmitted, and outputting a compressed temporary file tmpFile.zip;

encrypting the compressed temporary file by using the key string and by using a Spark technology to generate the encrypted file encryptFile.zip; and

deleting the compressed temporary file tmpFile.zip.

4. The file encryption and transmission method according to claim 1 , wherein transmitting, through the network, the encrypted file, the encrypted string and the information file to the destination end comprises:

writing, in a JSON format, a file path, a file size, a last modification time, an MD5 check value, and the encrypted string into the information file fileName.xml corresponding to the encrypted file;

transmitting the encrypted file to the destination end first; and

then transmitting the information file fileName.xml to the destination end.

5. The file encryption and transmission method according to claim 1 , wherein decrypting, by using the encryption machine, the encrypted string at the destination end to obtain the key string comprises:

reading the information file fileName.xml to acquire the encrypted string; and

decrypting, by using the encryption machine, the encrypted string to restore the key string.

6. The file encryption and transmission method according to claim 1 , wherein decrypting and decompressing the corresponding encrypted file by using the key string and by using the Spark technology comprises:

decrypting the encrypted file by using an SM4 domestic encryption algorithm to obtain a decrypted temporary file tmpFile.zip;

decompressing, by using the Spark technology, the decrypted temporary file tmpFile.zip to restore the decrypted file targetSourceFile; and

deleting the decrypted temporary file tmpFlile.zip.

7. The file encryption and transmission method according to claim 1 , wherein performing the integrity check on the decrypted file based on the file information in the information file comprises:

reading the information file fileName.xml to acquire a file size, a last modification time, and an MD5 check value;

acquiring a file size and an MD5 check value of the decrypted file targetSourceFile at the destination end; and

performing the integrity check based on the file size and the MD5 check value in the information file and the file size and the MD5 check value of the decrypted file.

8. The file encryption and transmission method according to claim 1 , wherein generating, for the file information of each file in the set of files to be transmitted, the key string by using the first preset algorithm comprises:

traversing the file information of all files in the set of files, and inquiring a preset correspondence table to determine the key string.

9. The file encryption and transmission method according to claim 8 , before performing, by the destination end, the integrity check on the decrypted file based on the file information, further comprising:

directly inferring, by the destination end, the file information of the set of files according to the key string based on the preset correspondence table.

10. The file encryption and transmission method according to claim 1 , wherein decompressing the corresponding encrypted file comprises:

decompressing the corresponding encrypted file by a compression program that is corresponding to a compression mode in which the set of files to be transmitted is compressed.

11. A file encryption and transmission apparatus, comprising a processor configured to execute a file encryption and transmission program to:

acquire a set of files to be transmitted;

generate, for file information of each file in the set of files to be transmitted, a key string by using a first preset algorithm;

compress and encrypt, by using the key string, the set of files to be transmitted to obtain an encrypted file;

encrypt the key string by using a prefabricated encryption machine to generate an encrypted string;

transmit, through a network, the encrypted file, the encrypted string and an information file to a destination end; and

execute, by the destination end, a decryption operation based on the encrypted string and the encrypted file to acquire a decrypted file, and perform, by the destination end, integrity check on the decrypted file based on the file information;

wherein the processor is configured to execute the file encryption a transmission program to execute, by the destination end, a decryption operation based on the encrypted string and the encrypted file to acquire a decrypted file, and perform, by the destination end, integrity check on the decrypted file based on the file information by following operations;

decrypting, by using the encryption machine, the encrypted string at the destination end to obtain the key string;

decrypting and decompressing the corresponding encrypted file by using the key string and by using a Spark technology; and

performing the integrity check on the decrypted file based on the file information in the information file.

12. The file encryption and transmission apparatus according to claim 11 , wherein the file information comprises one or a combination of: a file path, a file size, a last modification time, and a file Message-Digest Algorithm 5 (MD5) check value.

13. The file encryption and transmission apparatus according to claim 11 , wherein the processor, when being configured to execute the file encryption and transmission program to compress and encrypt, by using the key string, the set of files to be transmitted to obtain the encrypted file, is configured to:

compress the set of files to be transmitted, and output a compressed temporary file tmpFile.zip;

encrypt the compressed temporary file by using the key string and by using a Spark technology to generate the encrypted file encryptFile.zip; and

delete the compressed temporary file tmpFile.zip.

14. The file encryption and transmission apparatus according to claim 11 , wherein the processor, when being configured to execute the file encryption and transmission program to transmit, through the network, the encrypted file, the encrypted string and the information file to the destination end, is configured to:

write, in a JSON format, a file path, a file size, a last modification time, an MD5 check value, and the encrypted string into the information file fileName.xml corresponding to the encrypted file;

transmit the encrypted file to the destination end first; and

then transmit the information file fileName.xml to the destination end.

15. The file encryption and transmission apparatus according to claim 11 , wherein the processor, when being configured to execute the file encryption and transmission program to decrypt, by using the encryption machine, the encrypted string at the destination end to obtain the key string, is configured to:

read the information file fileName.xml to acquire the encrypted string; and

decrypt, by using the encryption machine, the encrypted string to restore the key string.

16. The file encryption and transmission apparatus according to claim 11 , wherein the processor, when being configured to execute the file encryption and transmission program to decrypt and decompress the corresponding encrypted file by using the key string and by using the Spark technology, is configured to:

decrypt the encrypted file by using an SM4 domestic encryption algorithm to obtain a decrypted temporary file tmpFile.zip;

decompress, by using the Spark technology, the decrypted temporary file tmpFile.zip to restore the decrypted file targetSourceFile; and

delete the decrypted temporary file tmpFlile.zip.

17. The file encryption and transmission apparatus according to claim 11 , wherein the processor, when being configured to execute the file encryption and transmission program to perform the integrity check on the decrypted file based on the file information in the information file, is configured to:

read the information file fileName.xml to acquire a file size, a last modification time, and an MD5 check value;

acquire a file size and an MD5 check value of the decrypted file targetSourceFile at the destination end; and

perform the integrity check based on the file size and the MD5 check value in the information file and the file size and the MD5 check value of the decrypted file.

18. A non-transitory computer-readable storage medium, storing a file encryption and transmission program, wherein the file encryption and transmission program, when being executed by a processor, causes the processor to implement following operations:

acquiring a set of files to be transmitted;

generating, for file information of each file in the set of files to be transmitted, a key string by using a first preset algorithm;

compressing and encrypting, by using the key string, the set of files to be transmitted to obtain an encrypted file;

encrypting the key string by using a prefabricated encryption machine to generate an encrypted string; and

transmitting, through a network, the encrypted file, the encrypted string and an information file to a destination end, and executing, by the destination end, a decryption operation based on the encrypted string and the encrypted file to acquire a decrypted file, and performing, by the destination end, integrity check on the decrypted file based on the file information;

wherein executing, by the destination end, the decryption operation based on the encrypted string and the encrypted file to acquire the decrypted file, and performing, by the destination end, the integrity check on the decrypted file based on the file information comprises:

decrypting by using the encryption machine, the encrypted string at the destination end to obtain the key string;

decrypting and decompressing the corresponding encrypted file by using the key string and by using a Spark technology; and

performing the integrity check on the decrypted file based on the file information in the information file.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 15, 2025
From: LIU, YANG; QIN, ZHENG; YANG, TENGDA; HE, JINBIAO
To: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 072030/0664 →
Priority Claims (1)
CN 202011148386.2 · Oct 23, 2020 · national
Continuity (1)
Related Publication 20230396594A1 · Dec 7, 2023
References Cited (16)
US 9483477B2 · Francis · 2016 [cited by examiner]
US 9830233B2 · Binford · 2017 [cited by examiner]
US 11100225B2 · Devane · 2021 [cited by examiner]
US 11461487B2 · Peterson · 2022 [cited by examiner]
US 12248607B2 · Turney · 2025 [cited by examiner]
US 20170364450A1 · Struttmann · 2017 [cited by examiner]
US 20190073486A1 · Peterson · 2019 [cited by applicant]
CN 104732159A · 2015 [cited by applicant]
CN 106254336A · 2016 [cited by applicant]
CN 109547215A · 2019 [cited by applicant]
CN 110099064A · 2019 [cited by applicant]
CN 110191136A · 2019 [cited by applicant]
CN 111709038A · 2020 [cited by applicant]
CN 112311865A · 2021 [cited by applicant]
Search report for international Application No. PCT/CN2021/109219 mailed on Oct. 29, 2021. [cited by applicant]
Search report for Chinese application 202011148386.2, filed Oct. 23, 2020. [cited by applicant]