File transmission method, terminal, edge server, central node server

By transmitting files in chunks to central node servers and edge servers in parallel, and using keys to separate encrypted and unencrypted data for storage, the problems of low file transmission efficiency and insufficient security are solved, achieving efficient and secure file transmission.

CN116800728BActive Publication Date: 2026-04-21CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2022-08-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, file transfer protocols suffer from low file transfer efficiency and insufficient security, especially when transferring large files, which takes a long time, and most file transfer protocols have limitations on file size.

Method used

By dividing a file into multiple file blocks and transmitting them in parallel between the central node server and the edge server, and using the key provided by the central node server to partially encrypt the file blocks, the terminal and the edge server separately store the key and the file, thus enabling the parallel transmission of encrypted and unencrypted data.

Benefits of technology

It improves the efficiency and security of file transfer, reduces the transfer time of large files, and enhances the privacy and security of files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800728B_ABST
    Figure CN116800728B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a file transmission method, a terminal, an edge server, a center node server and a storage medium, and the method comprises the following steps: sending a file uploading request to the center node server, connecting to a first edge server indicated by the center node server; performing block processing on a first file to obtain a plurality of first file blocks; performing partial data encryption on each first file block in the plurality of first file blocks by using a first key sent by the center node server to obtain a plurality of first encrypted data and a plurality of first unencrypted data; uploading the plurality of first encrypted data to the center node server and uploading the plurality of first unencrypted data to the first edge server. The efficiency and security of file transmission are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of file transfer, and more particularly to a file transfer method, a terminal, an edge server, a central node server, and a computer-readable storage medium. Background Technology

[0002] File transfer is the process of transferring files from one computer system to another via a network. However, since the file systems of different computers on a network are often different, it is necessary to establish a network-wide file transfer rule, which is called a file transfer protocol.

[0003] In related technologies, from file transfer protocols to enhanced file transfer protocols, and then to secure file transfer protocols, file transfer security has increased, but transfer efficiency has decreased. Furthermore, transferring files larger than 1GB currently takes a very long time, so most file transfer protocol services have file size limits, typically limited to 2GB, further reducing file transfer efficiency. Summary of the Invention

[0004] This invention provides a file transfer method, a terminal, an edge server, a central node server, and a computer-readable storage medium, which improves the efficiency and security of file transfer.

[0005] The technical solution of this invention is implemented as follows:

[0006] This invention provides a file transfer method applied to a terminal, wherein the terminal is connected to a central node server, comprising:

[0007] By sending a file upload request to the central node server, a connection is made to the first edge server indicated by the central node server;

[0008] The first file is divided into blocks to obtain multiple first file blocks;

[0009] Using the first key sent by the central node server, each of the plurality of first file blocks is partially encrypted to obtain a plurality of first encrypted data and a plurality of first unencrypted data.

[0010] The plurality of first encrypted data are uploaded to the central node server, and the plurality of first unencrypted data are uploaded to the first edge server.

[0011] This invention provides a file transfer method applied to a terminal, wherein the terminal is connected to a central node server, comprising:

[0012] By sending a file download request to the central node server, a connection is made to the second edge server indicated by the central node server;

[0013] By sending an unencrypted data acquisition request to the second edge server, multiple second unencrypted data are downloaded; the multiple second unencrypted data are the unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks;

[0014] By sending an encrypted data acquisition request to the central node server, multiple second encrypted data are downloaded; the multiple second encrypted data are encrypted portions obtained by the second edge server through partial encryption of the multiple second file blocks, and are sent by the second edge server to the central node server;

[0015] Using the second key sent by the central node server, the plurality of second encrypted data are decrypted, and the resulting plurality of second decrypted data are integrated with the plurality of second unencrypted data to obtain the second file.

[0016] This invention provides a file transfer method applied to an edge server, wherein the edge server is connected to a central node server, comprising:

[0017] Establish a connection with the terminal by receiving a request from the terminal to establish an edge upload channel;

[0018] The terminal receives multiple first unencrypted data uploaded by the terminal; the multiple first unencrypted data correspond to the unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file;

[0019] The terminal obtains multiple first encrypted data corresponding to the multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal by partially encrypting the multiple first file blocks, and are sent by the terminal to the central node server.

[0020] Using the first key sent by the central node server, the plurality of first encrypted data are decrypted, and the resulting plurality of first decrypted data are integrated with the plurality of first unencrypted data to obtain the first file.

[0021] This invention provides a file transfer method applied to an edge server, wherein the edge server is connected to a central node server, comprising:

[0022] By receiving the request to establish an edge download channel sent by the terminal, a connection is established with the terminal, and the second file corresponding to the request to establish an edge download channel is determined;

[0023] The second file is divided into blocks to obtain multiple second file blocks;

[0024] Using the second key sent by the central node server, each of the plurality of second file blocks is partially encrypted to obtain a plurality of second encrypted data and a plurality of second unencrypted data.

[0025] In response to the unencrypted data acquisition request sent by the terminal, the plurality of second unencrypted data are sent to the terminal; and the plurality of second encrypted data are sent to the central node server, so that the terminal downloads the plurality of second encrypted data from the central node server, integrates it with the plurality of second unencrypted data to obtain the second file, and completes the transmission of the second file.

[0026] This invention provides a file transfer method applied to a central node server, wherein the central node server is connected to a terminal and at least one edge server, comprising:

[0027] Based on the file upload request sent by the terminal, a first edge server is designated for the terminal among the at least one edge server; the first edge server is used to receive multiple first unencrypted data sent by the terminal; the multiple first unencrypted data are unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file;

[0028] A first key is generated based on the file upload request, and the first key is sent to the terminal and the first edge server;

[0029] The terminal receives a plurality of first encrypted data; the plurality of first encrypted data are obtained by the terminal partially encrypting the plurality of first file blocks using the first key;

[0030] In response to the encrypted data acquisition request sent by the first edge server, the plurality of first encrypted data are sent to the first edge server; so that the first edge server decrypts the plurality of first encrypted data using the first key, and integrates the obtained plurality of first decrypted data and the plurality of first unencrypted data to complete the transmission of the first file.

[0031] This invention provides a file transfer method applied to a central node server, wherein the central node server is connected to at least one edge server, comprising:

[0032] Based on the file download request sent by the terminal, a second edge server is designated for the terminal among the at least one edge server; the second edge server is used to send multiple second unencrypted data to the terminal; the multiple second unencrypted data are unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks;

[0033] A second key is generated based on the file download request, and the second key is sent to the terminal and the second edge server;

[0034] The system receives multiple sets of second encrypted data sent by the second edge server; the multiple sets of second encrypted data are obtained by the second edge server using the second key to partially encrypt the multiple sets of second file blocks;

[0035] In response to the encrypted data acquisition request sent by the terminal, the plurality of second encrypted data are sent to the terminal so that the terminal can decrypt the plurality of second encrypted data using the second key, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

[0036] This invention provides a terminal, comprising: a first sending unit, a first segmentation unit, and a first encryption unit; wherein,

[0037] The first sending unit is configured to connect to the first edge server indicated by the central node server by sending a file upload request to the central node server;

[0038] The first segmentation unit is used to segment the first file into multiple first file blocks;

[0039] The first encryption unit is used to partially encrypt each of the plurality of first file blocks using the first key sent by the central node server, to obtain a plurality of first encrypted data and a plurality of first unencrypted data;

[0040] The first sending unit is further configured to upload the plurality of first encrypted data to the central node server and upload the plurality of first unencrypted data to the first edge server.

[0041] This invention provides a terminal, comprising: a first sending unit, a downloading unit, and a first integrating unit; wherein,

[0042] The first sending unit is configured to connect to a second edge server indicated by the central node server by sending a file download request to the central node server;

[0043] The download unit is configured to download multiple second unencrypted data by sending an unencrypted data acquisition request to the second edge server; the multiple second unencrypted data are unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks.

[0044] The download unit is further configured to download multiple second encrypted data by sending an encrypted data acquisition request to the central node server; the multiple second encrypted data are encrypted portions obtained by the second edge server partially encrypting the multiple second file blocks, and are sent by the second edge server to the central node server;

[0045] The first integration unit is used to decrypt the plurality of second encrypted data using the second key sent by the central node server, and integrate the resulting plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

[0046] This invention provides an edge server, comprising: a connection unit, a first receiving unit, and a second integration unit; wherein,

[0047] The connection unit is used to establish a connection with the terminal by receiving a request to establish an edge upload channel sent by the terminal.

[0048] The first receiving unit is configured to receive multiple first unencrypted data uploaded by the terminal; the multiple first unencrypted data correspond to the unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file;

[0049] The first receiving unit is further configured to obtain multiple first encrypted data corresponding to the multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal partially encrypting the multiple first file blocks, and are sent by the terminal to the central node server;

[0050] The second integration unit is used to decrypt the plurality of first encrypted data using the first key sent by the central node server, and integrate the resulting plurality of first decrypted data with the plurality of first unencrypted data to obtain the first file.

[0051] This invention provides an edge server, comprising: a connection unit, a second segmentation unit, a second encryption unit, and a second sending unit; wherein,

[0052] The second connection unit is used to establish a connection with the terminal by receiving a request to establish an edge download channel sent by the terminal, and to determine the second file corresponding to the request to establish an edge download channel;

[0053] The second segmentation unit is used to segment the second file into multiple second file blocks;

[0054] The second encryption unit is used to partially encrypt each of the plurality of second file blocks using the second key sent by the central node server, to obtain a plurality of second encrypted data and a plurality of second unencrypted data;

[0055] The second sending unit is configured to respond to the unencrypted data acquisition request sent by the terminal by sending the plurality of second unencrypted data to the terminal; and to send the plurality of second encrypted data to the central node server, so that the terminal downloads the plurality of second encrypted data from the central node server, integrates it with the plurality of second unencrypted data to obtain the second file, and completes the transmission of the second file.

[0056] This invention provides a central node server, comprising: a determining unit, a third sending unit, and a second receiving unit; wherein,

[0057] The first determining unit is configured to specify a first edge server for the terminal in at least one edge server according to the file upload request sent by the terminal; the first edge server is configured to receive a plurality of first unencrypted data sent by the terminal; the plurality of first unencrypted data are unencrypted portions of a plurality of first file blocks; the plurality of first file blocks are obtained by the terminal by performing block processing on a first file;

[0058] The third sending unit is used to generate a first key according to the file upload request, and send the first key to the terminal and the first edge server;

[0059] The second receiving unit is configured to receive a plurality of first encrypted data sent by the terminal; the plurality of first encrypted data is obtained by the terminal using the first key to partially encrypt the plurality of first file blocks;

[0060] The third sending unit is further configured to respond to the encrypted data acquisition request sent by the first edge server and send the plurality of first encrypted data to the first edge server; so that the first edge server can decrypt the plurality of first encrypted data using the first key, and integrate the obtained plurality of first decrypted data and the plurality of first unencrypted data to complete the transmission of the first file.

[0061] This invention provides a central node server, comprising: a determining unit, a third sending unit, and a second receiving unit; wherein,

[0062] The determining unit is configured to assign a second edge server to the terminal in at least one edge server according to the file download request sent by the terminal; the second edge server is configured to send a plurality of second unencrypted data to the terminal; the plurality of second unencrypted data are unencrypted portions of a plurality of second file blocks; the plurality of second file blocks are obtained by the second edge server by performing block processing on the second file corresponding to the file download request;

[0063] The third sending unit is used to generate a second key according to the file download request, and send the second key to the terminal and the second edge server;

[0064] The second receiving unit is configured to receive multiple sets of second encrypted data sent by the second edge server; the multiple sets of second encrypted data are obtained by the second edge server using the second key to partially encrypt the multiple sets of second file blocks;

[0065] The third sending unit is further configured to respond to the encrypted data acquisition request sent by the terminal by sending the plurality of second encrypted data to the terminal, so that the terminal can decrypt the plurality of second encrypted data using the second key, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

[0066] This invention provides a terminal, the terminal comprising:

[0067] The first memory is used to store executable instructions;

[0068] A first processor, when executing executable instructions stored in the first memory, implements the method according to any one of claims 1-6 or 7-10.

[0069] This invention provides an edge server, the edge server comprising:

[0070] The second memory is used to store executable instructions;

[0071] The second processor, when executing executable instructions stored in the second memory, implements the method according to any one of claims 11-13 or 14-17.

[0072] This invention provides a central node server, comprising:

[0073] The third memory is used to store executable instructions;

[0074] A third processor, when executing executable instructions stored in the third memory, implements the method according to any one of claims 18-21 or 22-24.

[0075] This invention provides a storage medium storing executable instructions, which, when executed, cause a first processor; or a second processor; or a third processor to execute the file transfer method as described in this invention.

[0076] This invention provides a file transfer method, a terminal, an edge server, a central node server, and a computer storage medium. In this method, the terminal, the edge server, and the central node server interact. The terminal divides the file to be uploaded into blocks, resulting in multiple file blocks, and uploads the files in parallel to the central node server and the designated edge server, making full use of bandwidth and improving file transfer efficiency. During the file upload process, the terminal encrypts part of the data in each file block, increasing encryption efficiency. Furthermore, since the key and the file are not located in the same place, it increases the difficulty of cracking the file and enhances security and privacy. Attached Figure Description

[0077] Figure 1 An optional process for a file transfer method applied to a terminal, provided by an embodiment of the present invention. Figure 1 ;

[0078] Figure 2 A schematic diagram illustrating the working principle of a file transfer protocol provided in an embodiment of the present invention;

[0079] Figure 3 A file upload architecture for a file transfer method provided in this embodiment of the invention. Figure 1 ;

[0080] Figure 4 An optional process for a file transfer method applied to a terminal, provided by an embodiment of the present invention. Figure 2 ;

[0081] Figure 5 A file upload architecture for a file transfer method provided in this embodiment of the invention. Figure 2 ;

[0082] Figure 6 An optional process for a file transfer method applied to an edge server, provided in an embodiment of the present invention. Figure 1 ;

[0083] Figure 7 An optional process for a file transfer method applied to an edge server, provided in an embodiment of the present invention. Figure 2 ;

[0084] Figure 8 An optional process for a file transfer method applied to a central node server, provided in an embodiment of the present invention. Figure 1 ;

[0085] Figure 9 An optional process for a file transfer method applied to a central node server, provided in an embodiment of the present invention. Figure 2 ;

[0086] Figure 10 An optional process for a file transfer method provided in an embodiment of the present invention Figure 1 ;

[0087] Figure 11 An optional process for a file transfer method provided in an embodiment of the present invention Figure 2 ;

[0088] Figure 12 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 1 ;

[0089] Figure 13 A schematic diagram of the structure of an edge server provided in an embodiment of the present invention. Figure 1 ;

[0090] Figure 14 A schematic diagram of the structure of a central node server provided in an embodiment of the present invention. Figure 1 ;

[0091] Figure 15 A schematic diagram of the structure of a terminal provided in this embodiment of the invention. Figure 2 ;

[0092] Figure 16 A schematic diagram of the structure of an edge server provided in this embodiment of the invention. Figure 2 ;

[0093] Figure 17 A schematic diagram of the structure of a central node server provided in this embodiment of the invention. Figure 2 . Detailed Implementation

[0094] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0095] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 An optional process for a file transfer method applied to a terminal, provided as an embodiment of the invention. Figure 1 The following steps will provide a detailed explanation.

[0096] S101. Connect to the first edge server indicated by the node server by sending a file upload request to the central node server.

[0097] In an embodiment of the present invention, the terminal requests to upload a file to the central node server. The central node server responds to the file upload request, determines the edge server closest to the terminal, and instructs the terminal to connect. The terminal connects to the edge server according to the instruction.

[0098] S102. Divide the first file into blocks to obtain multiple first file blocks.

[0099] In an embodiment of the present invention, in order to improve file upload performance and success rate, the terminal can divide the uploaded file, i.e. the first file, into blocks to obtain multiple first file blocks.

[0100] S103. Using the first key sent by the central node server, partially encrypt each of the multiple first file blocks to obtain multiple first encrypted data and multiple first unencrypted data.

[0101] In an embodiment of the present invention, after the terminal divides the first file into blocks, if the file is large, even if it is divided into blocks, the space occupied by each block is large, and the overall encryption efficiency is not high. Therefore, the terminal uses the first key sent by the central node server to partially encrypt the data of each of the multiple first file blocks, thereby obtaining multiple first encrypted data and multiple first unencrypted data.

[0102] S104. Upload multiple first encrypted data to the central node server, and upload multiple first unencrypted data to the first edge server.

[0103] In an embodiment of the present invention, the terminal sends multiple first encrypted data to the central node server and multiple first unencrypted data to the first edge server to complete the transmission of the target uploaded file.

[0104] In an embodiment of the present invention, Figure 2This is a schematic diagram illustrating the working principle of a file transfer protocol provided in an embodiment of the present invention. FTP, short for File Transfer Protocol, provides an efficient way to upload and download files between a client and a server. It is based on TCP transmission and uses a dual TCP connection method. Sequence number: Seq, occupying 32 bits, is used to identify the byte stream sent from the TCP source to the destination. The initiator marks this when sending data. Acknowledgment number: ack, occupying 32 bits, is only valid when the ack flag is 1, ack = Seq + 1; ACK: Acknowledgment number is valid. The terminal sets the SYN flag to 1, randomly generates a value seq = J, and sends this data packet to the server. The terminal enters the SYN_SENT state, waiting for server confirmation. After receiving the data packet, the server knows from the SYN = 1 flag that the terminal is requesting to establish a connection that it sets both the SYN and ACK flags to 1, ack = J + 1, randomly generates a value seq = K, and sends this data packet to the terminal to confirm the connection request. The server enters the SYN_RCVD state. After receiving the confirmation, the terminal checks whether ack is J+1 and ACK is 1. If they are correct, it sets the ACK flag to 1, ack = K+1, and sends the data packet to the server. The server checks whether ack is K+1 and ACK is 1. If they are correct, the connection is successfully established, the terminal and the server enter the ESTABLISHED state, complete the three-way handshake, and then the terminal and the server can start transmitting data. Figure 2 Since this is existing technology, it will not be described in detail here.

[0105] In an embodiment of the present invention, Figure 3 A file upload architecture for a file transfer method provided in this embodiment of the invention. Figure 1 .exist Figure 3In this process, the terminal, central node server, and edge servers interact primarily for file uploads. Step 1 involves the terminal sending a file upload request to the central node server. Based on the request, the central node server generates a file index, public key, and private key. Step 2 involves the central node server sending the public key to the terminal. The terminal then divides the file into chunks, encrypts the header information using the received public key, and sends the header information of each chunk to the central node server (step 3). The central node server stores the received encrypted data and simultaneously sends it to the edge servers (step 5). The terminal then sends the unencrypted chunked data to the edge servers (step 4). The edge servers decrypt the received file header information, integrate it with the unencrypted data received from the terminal, store the file, and simultaneously synchronize the file to the central node server for storage (step 6).

[0106] In this embodiment of the invention, Table 1 shows the fields sent by the terminal to the central node server; Table 2 shows the fields sent by the terminal to the edge server.

[0107] Table 1

[0108] Fields type illustrate md5 String MD5 value of the file size Int File size name String File Name username String username password String password location String Location information

[0109] Table 2

[0110] Fields type illustrate md5 String MD5 value of the file size Int File size

[0111] It is understood that, in the embodiments of the present invention, the terminal divides the file to be uploaded into blocks to obtain multiple file blocks, and uploads the file in parallel to the central node server and the designated edge server, making full use of bandwidth and improving file transmission efficiency; during the file upload process, the terminal encrypts part of the data in each file block to increase encryption efficiency, and the key and the file are not in the same place, which increases the difficulty of the file being cracked and enhances security and privacy.

[0112] In some embodiments of the present invention, S101 can be implemented by S1011 to S1014, which will be described in detail in conjunction with the following steps.

[0113] S1011. Send a file upload request to the central node server.

[0114] In some embodiments of the present invention, the file upload request carries location information, and the terminal sends a file upload request carrying location information to the central node server.

[0115] S1012, Receive the first edge server information sent by the central node server.

[0116] In some embodiments of the present invention, the first edge server information is that the central node server is in at least one edge server, and the terminal is assigned an edge server for uploading files based on location information.

[0117] In some embodiments of the present invention, the file upload request sent by the terminal to the central node server includes user location information. Based on the location information, the central node server designates an edge server for the user to use for file upload among at least one edge server. Then, the terminal receives the first edge server information sent by the central node server.

[0118] S1013. Send a request to the first edge server to establish an edge upload channel.

[0119] In some embodiments of the present invention, after receiving the first edge server information, the terminal sends a request to the first edge server to establish an edge upload channel for file upload.

[0120] S1014. Upon receiving a communication confirmation message from the first edge server, determine that the connection to the first edge server has been established.

[0121] In some embodiments of the present invention, the communication confirmation character is generated by the first edge server in response to the request to establish an edge upload channel. After the terminal sends the request to establish an edge upload channel to the first edge server, it indicates that a connection has been established with the first edge server upon receiving the communication confirmation information sent by the first edge server.

[0122] It is understood that, in some embodiments of the present invention, the terminal receives the central node server and selects the nearest designated edge server for file upload based on the terminal's location information, and the terminal uploads the file after receiving the communication confirmation information sent by the edge server, thereby improving the efficiency of file upload.

[0123] In some embodiments of the present invention, S103 is implemented by S1031 to S1033, which will be described in detail in conjunction with the following steps.

[0124] S1031. Separate the payload information and header information from each first file block.

[0125] In some embodiments of the present invention, the file is divided into blocks and uploaded to the edge server in parallel. If the file is large, even if it is divided into blocks, the space occupied by each block is large, and the overall encryption efficiency is not high. However, partial encryption of the header information in each block of the file stream can also ensure security. Therefore, the payload information and header information are separated from each first file block and partially encrypted.

[0126] S1032. Take the payload information of each first file block as the first unencrypted data to obtain multiple first unencrypted data.

[0127] In some embodiments of the present invention, after the terminal obtains the payload information and header information, it uses the payload information of each first file block as the first unencrypted data, thereby obtaining multiple first unencrypted data.

[0128] S1033. Using the first public key, encrypt the header information of each first file block to obtain multiple first encrypted data.

[0129] In some embodiments of the present invention, the terminal uses the first public key from the first public key received from the central node server to encrypt the header information of each first file block, thereby obtaining multiple first encrypted data.

[0130] In some embodiments of the present invention, the first 32 bits of header information in each file stream can be encrypted, and the present invention does not impose any limitations.

[0131] It is understood that, in some embodiments of the present invention, when uploading a file, the terminal separates the payload information and header information from multiple file blocks, and uses the received public key to encrypt only the header information, resulting in multiple encrypted data and multiple unencrypted data. In this method, each part of the multiple file blocks is asymmetrically encrypted, and the key and the file are not in the same location, which increases the difficulty of cracking the file and enhances the security and privacy of file upload.

[0132] In some embodiments of the present invention, the file upload request sent by the terminal to the central node server also includes first metadata information. Therefore, the present invention also includes S201, which will be described in detail in conjunction with the following steps.

[0133] S201. Receive the first public key generated by the central node server based on the first metadata information.

[0134] In some embodiments of the present invention, the terminal receives a first public key generated by the central node server based on the first metadata information, so that the header information of the first file block can be encrypted using the first public key.

[0135] In some embodiments of the present invention, the first metadata information sent by the terminal to the central node server further includes at least one of the following: first file size, first file name, message digest algorithm, and account information, wherein the account information includes username and password.

[0136] It is understood that, in some embodiments of the present invention, the terminal uses a public key received from the central node server to partially encrypt the uploaded file. In this method, the public key is obtained by the terminal from the central node server, and then the uploaded file is encrypted. The key and the file are not located in the same place, which increases the difficulty of the file being cracked and enhances security and privacy.

[0137] In some embodiments of the present invention, S301 to S302 are included before S1013, which will be described in detail in conjunction with the following steps.

[0138] S301. Receive the first authentication token information generated by the central node server based on the first metadata information.

[0139] In some embodiments of the present invention, the terminal receives first authentication token information generated by the central node server based on first metadata information.

[0140] S302. Based on the first authentication token information, generate a request to establish an edge upload channel; the first authentication token information is used by the first edge server to authenticate the terminal and send communication confirmation information to the terminal if the authentication is successful.

[0141] In some embodiments of the present invention, after receiving the first authentication token information, the terminal requests the establishment of an edge upload channel from the first edge server, the edge upload channel carrying the first authentication token information. The first edge server uses the first authentication token information to authenticate the terminal, and sends communication confirmation information to the terminal if the authentication is successful.

[0142] In some embodiments of this invention, authentication tokens (JSON Web Tokens, JWT) are used to transmit authenticated user identity information between the identity provider and the service provider. JWT authentication involves encrypting user information to generate a token. Each time the server requests a user, it only needs to use a stored key to verify the token's correctness, without needing to store any session data. Specifically, JWT usage is as follows: 1. The server encrypts user information into a token based on the user's login status and returns it to the client; 2. The client receives the token returned by the server and stores it in a cookie; 3. The client and server include the token in every communication, which can be placed in the HTTP request header, such as the Authorization field; 4. The server decrypts the token, verifies the content, and completes the corresponding logic.

[0143] In some embodiments of the present invention, the terminal also receives a file index generated by the central node server based on the first metadata, and a synchronization sequence authentication code for generating file upload. The file index can be sent by the terminal to the central node server, or it can be generated by the central node server based on the first metadata information sent by the terminal.

[0144] It is understood that, in some embodiments of the present invention, the terminal receives authentication token information sent by the central node server and sends a request to the edge server to establish an edge upload channel carrying authentication token information. After the edge server authenticates the terminal, the file is uploaded. This method improves the security of file upload.

[0145] In some embodiments of the present invention, the file transfer method of the present invention further includes S401 to S403, which will be described in detail in conjunction with the following steps.

[0146] S401. By receiving the encrypted data transmission completion information returned by the central node server, determine that the first encrypted data in each first file block has been uploaded.

[0147] In some embodiments of the present invention, the terminal sends encrypted data to the central node server. After sending the encrypted data, the terminal receives encrypted data transmission completion information sent by the central node server, and determines that the first encrypted data in each first file block has been uploaded.

[0148] S402. By receiving the unencrypted data transmission completion information returned by the first edge server, determine that the first unencrypted data in each first file block has been uploaded.

[0149] In some embodiments of the present invention, the terminal sends unencrypted data to the first edge server. After sending the unencrypted data, the terminal receives unencrypted data transmission completion information sent by the first edge server and determines that the first unencrypted data in each first file block has been uploaded.

[0150] S403. If, in multiple first file blocks, both the first encrypted data and the first unencrypted data of each first file block have been uploaded, then the upload of the first file is determined to be complete.

[0151] In some embodiments of the present invention, in a plurality of first file blocks, the first file upload is characterized as complete when all the first encrypted data and the first unencrypted data in each first file block have been uploaded.

[0152] In some embodiments of the present invention, there is no specific order between S401 and S402.

[0153] In some embodiments of the present invention Figure 4An optional process for a file transfer method applied to a terminal, provided by an embodiment of the present invention. Figure 2 The following steps will provide a detailed explanation.

[0154] S501. Connect to the second edge server indicated by the central node server by sending a file download request to the central node server.

[0155] In some embodiments of the present invention, the terminal connects to a second edge server indicated by the central node server to download the file by sending a file download request to the central node server.

[0156] In some embodiments of the present invention, the first edge server and the second edge server may be the same or different.

[0157] S502. By sending an unencrypted data acquisition request to the second edge server, multiple second unencrypted data are downloaded; the multiple second unencrypted data are the unencrypted parts of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks.

[0158] In some embodiments of the present invention, the terminal downloads multiple second unencrypted data by sending an unencrypted data acquisition request to a second edge server. The downloaded multiple second unencrypted data are unencrypted portions of multiple second file blocks, which are obtained by the second edge server performing block processing on the second file corresponding to the file download request.

[0159] In some embodiments of the present invention, the second file is a file that has already been uploaded, and it may be the same as or different from the first file.

[0160] S503. Download multiple second encrypted data by sending an encrypted data acquisition request to the central node server; the multiple second encrypted data are encrypted portions obtained by the second edge server through partial encryption of multiple second file blocks, and are sent to the central node server by the second edge server.

[0161] In some embodiments of the present invention, the terminal downloads multiple sets of second encrypted data sent from the second edge server to the central node server by sending an encrypted data acquisition request to the central node server; the second encrypted data is an encrypted portion obtained by the second edge server partially encrypting multiple second file blocks.

[0162] S504. Using the second key sent by the central node server, decrypt multiple second encrypted data, and integrate the obtained multiple second decrypted data with multiple second unencrypted data to obtain a second file.

[0163] In some embodiments of the present invention, after the terminal obtains multiple second encrypted data from the central node server, it uses the second key sent by the central node server to decrypt the multiple second encrypted data to obtain multiple second decrypted data, and integrates the multiple second decrypted data and multiple second unencrypted data to obtain a second file.

[0164] In an embodiment of the present invention, Figure 5 A file upload architecture for a file transfer method provided in this embodiment of the invention. Figure 2 .exist Figure 5 In this process, the terminal, the central node server, and the edge servers interact primarily for file downloading. Step 1 involves the terminal sending a file download request to the central node server. The central node server, based on the request, matches the file storage location, public key, and private key using the file index. Step 2 involves the central node server sending the public key to the terminal and the private key to the edge server, enabling the edge server to encrypt the downloaded file using the private key (step 4). The edge server then divides the downloaded file into blocks, encrypts the header information separately, and sends the encrypted data to the central node server (step 3). Simultaneously, it sends the unencrypted data to the terminal (step 5). The central node server then sends the received file block header information to the terminal (step 6). The terminal decrypts the received file block header information and integrates it with the unencrypted data to obtain the downloaded file.

[0165] Understandably, in some embodiments of the present invention, when a terminal downloads a file, it first connects to the nearest edge server indicated by the central node server, then obtains unencrypted data from the indicated edge server, decrypts the encrypted data received from the central node using the key received from the central node, and integrates the decrypted data with the unencrypted data to obtain the downloaded file. In this method, two parts of data are obtained from two different devices, reducing the risk of file leakage; furthermore, the obtained encrypted data and the corresponding decryption key are not stored in the same location, increasing the difficulty of cracking the file and enhancing the security of file downloads.

[0166] In some embodiments of the present invention, S501 can be implemented by S5011 to S5014, which will be described in detail in conjunction with the following steps.

[0167] S5011, Send a file download request to the central node server; the file download request carries location information.

[0168] In some embodiments of the present invention, the terminal sends a file download request carrying location information to the central node server.

[0169] S5012, Receive second edge server information sent by the central node server; the second edge server information is that the central node server, based on location information, designates an edge server for the terminal to download files among at least one edge server.

[0170] In some embodiments of the present invention, the central node server receives a file download request carrying location information, designates a second edge server for the terminal to download the file based on the location information in at least one edge server, and sends the second edge server information to the terminal, and the terminal receives the second edge server information sent by the central node server.

[0171] S5013, Send a request to the second edge server to establish an edge download channel.

[0172] In some embodiments of the present invention, the terminal sends a request to the second edge server to establish an edge download channel to download files.

[0173] S5014. Upon receiving communication confirmation information sent by the second edge server, determine to connect to the second edge server; the communication confirmation information is generated by the second edge server in response to the request to establish an edge download channel.

[0174] In some embodiments of the present invention, the second edge server generates communication confirmation information based on the edge download channel request sent by the terminal, and sends the communication confirmation information to the terminal. The terminal receives the communication confirmation information sent by the second edge server and determines that it has connected to the second edge server.

[0175] It is understood that, in some embodiments of the present invention, the terminal receives authentication token information sent by the central node server and sends a request to the edge server to establish an edge download channel carrying authentication token information. After the edge server authenticates the terminal, the file is downloaded. This method improves the security of file download.

[0176] In some embodiments of the present invention, S504 can be implemented by S5041 to S5043, which will be described in detail in conjunction with the following steps.

[0177] S5041. Using the second public key, decrypt each of the multiple second encrypted data to obtain multiple second decrypted data.

[0178] In some embodiments of the present invention, the terminal decrypts each of the multiple second encrypted data according to the second public key obtained from the central node server, thereby obtaining multiple second decrypted data.

[0179] S5042. Multiple second decrypted data are used as multiple header information, and multiple second unencrypted data are used as multiple payload information. By integrating the header information and payload information corresponding to the file blocks, multiple second file blocks are obtained.

[0180] In some embodiments of the present invention, the terminal uses multiple second decrypted data as header information of multiple file blocks, uses multiple unencrypted data as payload information of multiple file blocks, and integrates the payload information and header information of multiple file blocks to obtain multiple second file blocks.

[0181] S5043. Integrate multiple second file blocks to obtain a second file.

[0182] In some embodiments of the present invention, the terminal integrates the obtained multiple second file blocks to obtain a second file.

[0183] It is understood that, in some embodiments of the present invention, the terminal uses a public key to decrypt the received encrypted data and integrates the decrypted data with the unencrypted data to obtain the downloaded file. Using the public key to decrypt only a portion of the file's data increases the difficulty of cracking the file.

[0184] In some embodiments of the present invention, the file transfer method further includes step S601, which will be described in detail in conjunction with the following steps.

[0185] S601. Receive the second public key generated by the central node server based on the second metadata information.

[0186] In some embodiments of the present invention, the terminal also receives a second public key generated by the central node server based on the second metadata information, so that the terminal can process the downloaded file accordingly based on the second public key.

[0187] In some embodiments of the present invention, the second metadata information includes at least one of the following: second file size, second file name, message digest algorithm, and account information.

[0188] In embodiments of the present invention, such as Figure 6 As shown, Figure 6 An optional process for a file transfer method applied to an edge server, provided in an embodiment of the present invention. Figure 1 The following steps will provide a detailed explanation.

[0189] S701. Establish a connection with the terminal by receiving the request to establish an edge upload channel sent by the terminal.

[0190] In some embodiments of the present invention, the terminal sends a request to the edge server to establish an edge upload channel, and the edge server establishes a request with the terminal by receiving the request to establish an edge upload channel.

[0191] S702, Receive multiple first unencrypted data uploaded by the terminal; the multiple first unencrypted data correspond to the unencrypted parts in multiple first file blocks; the multiple first file blocks are obtained by the terminal by dividing the first file into blocks.

[0192] In some embodiments of the present invention, the edge server receives multiple first unencrypted data uploaded by the terminal. The multiple first encrypted data are the unencrypted portions of the first file blocks, and the multiple first file blocks are obtained by the terminal performing block processing on the first file.

[0193] S703. Obtain multiple first encrypted data corresponding to multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal partially encrypting the multiple first file blocks and then sent by the terminal to the central node server.

[0194] In some embodiments of the present invention, the edge server obtains multiple first encrypted data corresponding to multiple first file blocks sent by the terminal from the central node server. The multiple first encrypted data are obtained by the terminal partially encrypting the multiple first file blocks.

[0195] S704. Using the first key sent by the central node server, decrypt multiple first encrypted data, and integrate the obtained multiple first decrypted data with multiple first unencrypted data to obtain the first file.

[0196] In some embodiments of the present invention, the edge server decrypts multiple first encrypted data according to the first key sent by the central node server to obtain multiple first decrypted data, and integrates the multiple first decrypted data with multiple first unencrypted data obtained by the terminal to obtain a first file.

[0197] Understandably, in the embodiments of the present invention, after the edge server establishes a connection with the terminal, it receives multiple first unencrypted data uploaded from the terminal and obtains multiple first encrypted data from the central node server. The edge server obtains the uploaded file from both the terminal and the central node server, reducing the risk of leakage during file upload. The edge server uses the key received from the central node server to decrypt the encrypted file and integrates it with the unencrypted file to obtain the uploaded file, increasing the difficulty of cracking the file and enhancing security and privacy.

[0198] In some embodiments of the present invention, S701 can be implemented by S7011 to S7013, which will be described in detail in conjunction with the following steps.

[0199] S7011, Receive terminal's request to establish an edge upload channel; the request to establish an edge upload channel includes first authentication token information.

[0200] In some embodiments of the present invention, the edge server receives a request from the terminal to establish an edge upload channel containing first authentication token information, thereby establishing a connection with the terminal.

[0201] S7012. Based on the first authentication token information, the terminal is authenticated, and if the authentication is successful, communication confirmation information is generated.

[0202] In some embodiments of the present invention, the edge server authenticates the identity of the terminal based on the received first authentication token information, and generates confirmation information after successful authentication.

[0203] S7013. Send communication confirmation information to the terminal to establish a connection with the terminal.

[0204] In some embodiments of the present invention, the edge server sends the generated communication confirmation information to the terminal, thereby establishing a connection with the terminal.

[0205] It is understood that, in some embodiments of the present invention, the edge server receives a request from the terminal to establish an edge upload channel containing authentication token information, uses the authentication token information to authenticate the terminal, and establishes a connection with the terminal after successful authentication. This method improves the security of file uploads.

[0206] In some embodiments of the present invention, S801 to S802 are included before S704, which will be described in detail in conjunction with the following steps.

[0207] S801, Send a key acquisition request to the central node server.

[0208] In some embodiments of the present invention, the edge server sends a key request to the central node server.

[0209] S802, Receive the first private key sent by the central node server in response to the key acquisition request; the first private key is generated by the central node server based on the file upload request sent by the terminal.

[0210] In some embodiments of the present invention, the central node server generates a first private key based on a file upload request sent by a terminal and sends it to an edge server. The edge server receives the first private key sent by the central node server in response to a key acquisition request.

[0211] In some embodiments of the present invention, after the edge server obtains the first file through integration, it synchronizes the first file to the central node server, so that the central node server schedules the first file to the edge node server that is closer to the user. After the synchronization is completed, the central node server returns synchronization completion information to the edge server.

[0212] It is understood that, in some embodiments of the present invention, the edge central node server uses a key received from the central node server to decrypt encrypted data. This method ensures that the key and the file are not stored in the same location, increasing the difficulty of cracking the file and enhancing the security and privacy of file uploads.

[0213] In embodiments of the present invention, such as Figure 7 As shown, Figure 7 An optional process for a file transfer method applied to an edge server, provided in an embodiment of the present invention. Figure 2 The following steps will provide a detailed explanation.

[0214] S901. By receiving the request to establish an edge download channel sent by the terminal, establish a connection with the terminal and determine the second file corresponding to the request to establish an edge download channel.

[0215] In this embodiment of the invention, the edge server establishes a connection with the terminal by receiving a request to establish an edge download channel sent by the terminal, and determines the file that the terminal wants to download from the request.

[0216] S902. Divide the second file into blocks to obtain multiple second file blocks.

[0217] In some embodiments of the present invention, the edge server divides the second file, i.e. the file that the terminal wants to download, into blocks to obtain multiple second file blocks.

[0218] S903. Using the second key sent by the central node server, partially encrypt each of the multiple second file blocks to obtain multiple encrypted second data and multiple unencrypted second data.

[0219] In some embodiments of the present invention, the edge node server uses a second key received from the central node server to partially encrypt data in each of the multiple file blocks, resulting in multiple second encrypted data and multiple second unencrypted data.

[0220] S904. In response to the unencrypted data acquisition request sent by the terminal, multiple second unencrypted data are sent to the terminal; and multiple second encrypted data are sent to the central node server so that the terminal can download multiple second encrypted data from the central node server, integrate them with multiple second unencrypted data to obtain a second file, and complete the transmission of the second file.

[0221] In some embodiments of the present invention, in response to an unencrypted data acquisition request sent by a terminal, the edge server sends multiple unencrypted second data obtained by segmentation to the terminal, and sends multiple encrypted second data obtained by segmentation to the central node server, so that the terminal integrates the multiple unencrypted second data and the multiple encrypted second data obtained from the central node server to obtain a second file and completes the transmission of the second file.

[0222] In some embodiments of the present invention, after the edge server sends multiple sets of second encrypted data to the central node server, it receives a transmission completion message returned by the central node server.

[0223] As is understood, in the embodiments of the present invention, after the edge server establishes a connection with the terminal, it divides the file to be downloaded by the terminal into blocks, resulting in multiple file blocks. Using the key sent by the central node server, the multiple file blocks are partially encrypted, resulting in multiple unencrypted and encrypted data, which are then sent to the terminal and the central node server respectively. This method divides the downloaded file into blocks and performs asymmetric encryption on each block, and the key and file are not located in the same place, increasing the difficulty of cracking the file and enhancing security and privacy.

[0224] In some embodiments of the present invention, S901 can be implemented by S9011 to S9013, which will be described in detail in conjunction with the following steps.

[0225] S9011, Receive a request from the terminal to establish an edge download channel; the request to establish an edge download channel includes second authentication token information.

[0226] In some embodiments of the present invention, the edge server receives a request from the terminal to establish an edge download channel, which includes second authentication token information.

[0227] S9012. Based on the second authentication token information, the terminal is authenticated, and if the authentication is successful, communication confirmation information is generated.

[0228] In some embodiments of the present invention, the edge server authenticates the identity of the terminal based on the second authentication token information in the request to establish an edge download channel, and generates communication confirmation information after successful authentication.

[0229] S9013. Send communication confirmation information to the terminal to establish a connection with the terminal.

[0230] In some embodiments of the present invention, the edge server sends the generated communication confirmation information to the terminal, thereby establishing a connection with the terminal.

[0231] It is understood that, in some embodiments of the present invention, the edge server receives a request from the terminal to establish an edge download channel containing authentication token information, uses the authentication token information to authenticate the terminal, and establishes a connection with the terminal after successful authentication. This method improves the security of file downloads.

[0232] In some embodiments of the present invention, S1001 to S1002 are included before S903, which will be described in detail in conjunction with the following steps.

[0233] S1001, Send a key acquisition request to the central node server.

[0234] In some embodiments of the present invention, the edge server sends a key acquisition request to the central node server.

[0235] S1002, Receive the second private key sent by the central node server in response to the key acquisition request; the second private key is generated by the central node server based on the file download request sent by the terminal.

[0236] In some embodiments of the present invention, the edge server receives a second private key sent by the central node server in response to a key acquisition request, which is used to encrypt data; the second private key is generated by the central node server based on a file download request sent by the terminal.

[0237] In some embodiments of the present invention, S903 can be implemented by S9031 to S9033, which will be described in detail in conjunction with the following steps.

[0238] S9031. Separate the payload information and header information from each second file block;

[0239] In some embodiments of the present invention, the edge server separates payload information and header information from each second file block.

[0240] S9032. The payload information of each second file block is used as the second unencrypted data to obtain multiple second unencrypted data.

[0241] In some embodiments of the present invention, the edge server uses the payload information of each second file block as second unencrypted information, thereby obtaining multiple second unencrypted data.

[0242] S9033. Using the second private key, encrypt the header information in each second file block to obtain multiple second encrypted data.

[0243] In some embodiments of the present invention, the edge server uses a second private key obtained from the central node server to encrypt the header information in each second file block to obtain multiple second encrypted data.

[0244] It is understood that, in some embodiments of the present invention, the edge server divides the file that the terminal needs to download into blocks to obtain multiple file blocks; using the key sent by the central node server, the multiple file blocks are partially encrypted to obtain multiple unencrypted data and encrypted data, which increases the difficulty of cracking the file and enhances security and privacy.

[0245] In embodiments of the present invention, such as Figure 8 As shown, Figure 8 An optional process for a file transfer method applied to a central node server, provided in an embodiment of the present invention. Figure 1 The following steps will provide a detailed explanation.

[0246] S1101. Based on the file upload request sent by the terminal, designate a first edge server for the terminal in at least one edge server; the first edge server is used to receive multiple first unencrypted data sent by the terminal; the multiple first unencrypted data are the unencrypted parts of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file.

[0247] In some embodiments of the present invention, the central node server receives a file upload request sent by the terminal, and determines a first edge server among at least one edge server according to the file upload request. The first edge server is used to receive multiple first unencrypted data sent by the terminal. The multiple first unencrypted data are divided into blocks by the terminal to divide the first file, and after the blocks are divided, they are the unencrypted parts of the multiple first file blocks.

[0248] S1102. Generate a first key based on the file upload request, and send the first key to the terminal and the first edge server.

[0249] In some embodiments of the present invention, the central node server generates a first key based on the file upload request and sends the first key to the terminal and the first edge server, so that the terminal and the first edge server can encrypt and decrypt the file data accordingly based on the first key.

[0250] S1103. Receive multiple first encrypted data sent by the terminal; the multiple first encrypted data are obtained by the terminal using a first key to partially encrypt the multiple first file blocks.

[0251] In some embodiments of the present invention, when a terminal uploads a file, the central node server receives data sent by the terminal, which uses a first key to partially encrypt the plurality of first file blocks to obtain a plurality of first encrypted data.

[0252] S1104. In response to the encrypted data acquisition request sent by the first edge server, send multiple first encrypted data to the first edge server; so that the first edge server can decrypt the multiple first encrypted data using the first key, and integrate the obtained multiple first decrypted data and multiple first unencrypted data to complete the transmission of the first file.

[0253] In some embodiments of the present invention, after receiving encrypted data sent by the terminal, the central node server responds to the encrypted data acquisition request sent by the first edge server by sending multiple first encrypted data to the first edge server, so that the first edge server can decrypt the multiple first encrypted data using the received first key, and integrate the multiple first decrypted data and multiple first unencrypted data to complete the transmission of the first file.

[0254] Understandably, in the embodiments of this invention, the central node server assigns a nearby edge server to the terminal based on the file upload request sent by the terminal, thereby improving the efficiency of file transfer; it generates a key and sends it to the edge server and the terminal, and sends the encrypted data received from the terminal to the edge server. This method keeps the key and the file in different locations, increasing the difficulty of cracking the file and enhancing security and privacy.

[0255] In some embodiments of the present invention, S1101 can be implemented by S1101-1, which will be described in detail in conjunction with the following steps.

[0256] S1101-1. Based on the location information, designate a first edge server for the terminal among at least one edge server.

[0257] In some embodiments of the present invention, the file upload request sent by the terminal to the central node server carries user location information. Based on the location information, the central node server designates a first edge server for the terminal among at least one edge server.

[0258] In some embodiments of the present invention, the central node server may also designate the first edge server based on the load and operating status of the edge server, and the present invention does not impose any limitations.

[0259] In some embodiments of the present invention, S1102 can be implemented by S1102-1 to S1102-3, which will be described in detail in conjunction with the following steps.

[0260] S1102-1. Generate a first public key and a first private key based on the first metadata information.

[0261] In some embodiments of the present invention, the file upload request sent by the terminal to the central node server carries first metadata information, and the central node server generates a first public key and a first private key based on the first metadata information.

[0262] In some embodiments of the present invention, the first metadata information includes at least one of the following: first file size, first file name, message digest algorithm, and account information.

[0263] In some embodiments of the present invention, the account information includes a username and a password.

[0264] S1102-2, Send the first public key to the terminal.

[0265] In some embodiments of the present invention, the central node server sends the generated first public key to the terminal.

[0266] S1102-3. In response to the key acquisition request sent by the first edge server, the first private key is sent to the first edge server.

[0267] In some embodiments of the present invention, the central node server responds to a key acquisition request sent by the first edge server and sends the generated first private key to the first edge server.

[0268] In some embodiments of the present invention, the file transfer method further includes S1201, which will be described in detail in conjunction with the following steps.

[0269] S1201. Based on the first metadata information in the file upload request, generate first authentication token information and send it to the terminal, so that the terminal generates an edge upload channel establishment request based on the first authentication token information and sends it to the first edge server, and establishes a connection with the first edge server when the first authentication token identity authentication is successful.

[0270] In some embodiments of the present invention, the central node server generates first authentication token information based on the first metadata information in the file upload request sent by the terminal and sends it to the terminal, so that the terminal, upon receiving it, sends a request to the first edge server to establish an edge upload channel carrying the first authentication token information, and establishes a connection with the first edge server if the first authentication token authentication is successful.

[0271] In embodiments of the present invention, such as Figure 9 As shown, Figure 9 An optional process for a file transfer method applied to a central node server, provided in an embodiment of the present invention. Figure 2 The following examples will be used to illustrate this in detail.

[0272] S1301. Based on the file download request sent by the terminal, designate a second edge server for the terminal in at least one edge server; the second edge server is used to send multiple second unencrypted data to the terminal; the multiple second unencrypted data are the unencrypted parts of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks.

[0273] In some embodiments of the present invention, the terminal sends a file download request to the central node server. Based on the file download request sent by the terminal, the central node server designates a second edge server for the terminal from at least one edge server. This second edge server is primarily used to send multiple sets of second unencrypted data to the terminal. These multiple sets of second unencrypted data represent the unencrypted portions of the second file corresponding to the file download request, as determined by the edge server's segmentation of the file into blocks.

[0274] S1302. Generate a second key based on the file download request, and send the second key to the terminal and the second edge server.

[0275] In some embodiments of the present invention, the central node server generates a second key based on the file download request sent by the terminal, and sends the second key to the terminal and the second edge server.

[0276] S1303, Receive multiple second encrypted data sent by the second edge server; the multiple second encrypted data are obtained by the second edge server using a second key to partially encrypt multiple second file blocks.

[0277] In some embodiments of the present invention, after the central node server sends the second key to the edge server, it receives multiple second encrypted data obtained by partially encrypting multiple second file blocks using the second key sent by the edge server.

[0278] S1304. In response to the encrypted data acquisition request sent by the terminal, multiple second encrypted data are sent to the terminal so that the terminal can decrypt the multiple second encrypted data using the second key, and integrate the obtained multiple second decrypted data with multiple second unencrypted data to obtain a second file.

[0279] In some embodiments of the present invention, in response to a terminal's request to obtain encrypted data, the central node server retrieves multiple sets of second encrypted data from the edge server and sends them to the terminal, enabling the terminal to decrypt the multiple sets of second encrypted data using a received second key, thereby obtaining multiple sets of second decrypted data. The obtained sets of second decrypted data are then integrated with multiple sets of second unencrypted data retrieved from the edge server to obtain a second file.

[0280] Understandably, in the embodiments of this invention, the central node server assigns a nearby edge server to the terminal based on the file download request sent by the terminal, thereby improving the efficiency of file download; the generated key is sent to both the terminal and the edge server, and the encrypted data obtained from the edge server is sent to the terminal. This method ensures that the key and the file are not located in the same place, increasing the difficulty of cracking the file and enhancing security and privacy.

[0281] In some embodiments of the present invention, S1302 can be implemented by S13021 to S13023, which will be described in detail in conjunction with the following steps.

[0282] S13021. Generate a second public key and a second private key based on the second metadata information.

[0283] In some embodiments of the present invention, the central node server generates a second public key and a second private key based on the second metadata request carried in the file download request sent by the terminal.

[0284] In some embodiments of the present invention, the second metadata information further includes at least one of the following: second file size, message digest algorithm, second file name, and account information.

[0285] In some embodiments of the present invention, the account information includes a username and a password.

[0286] S13022, Send the second public key to the terminal.

[0287] In some embodiments of the present invention, the central node server sends the generated second public key to the terminal so that the terminal can use the second public key to decrypt the downloaded file data accordingly.

[0288] S13023. In response to the key acquisition request sent by the second edge server, the second private key is sent to the second edge server.

[0289] In some embodiments of the present invention, the central node server responds to a key acquisition request sent by the second edge server by sending a second private key to the second edge server, so that the second edge server can use the second private key to encrypt the downloaded file data accordingly.

[0290] In some embodiments of the present invention, the file transfer method of the present invention further includes S1401-S1403, which will be specifically described through the following steps.

[0291] S1401, Receive file download request sent by terminal.

[0292] In some embodiments of the present invention, the central node server receives file download requests sent by the terminal.

[0293] S1402. Generate second authentication token information based on the second metadata information in the file download request.

[0294] In some embodiments of the present invention, the central node server generates second authentication token information based on the second metadata information carried in the file download request sent by the terminal.

[0295] S1403. Send the second authentication token information to the terminal so that the terminal generates a request to establish an edge download channel based on the second authentication token information and sends it to the second edge server. If the second authentication token authentication is successful, establish a connection with the second edge server.

[0296] In some embodiments of the present invention, the central node server sends the generated second authentication token information to the terminal, so that the terminal generates an edge download channel establishment request based on the received second authentication token information and sends it to the second edge server. If the second edge server successfully authenticates the identity of the second authentication token, a connection is established with the second edge server.

[0297] In embodiments of the present invention, such as Figure 10 As shown, Figure 10 An optional process for a file transfer method provided in an embodiment of the present invention Figure 1 The following steps will provide a detailed explanation.

[0298] Sa: The terminal sends a file upload request to the central node server, along with metadata information.

[0299] In some embodiments of the present invention, the terminal requests to upload a file from the central node server, carrying metadata information, which includes: MD5 message-digest algorithm, file size, file name, username, password and location information, etc.

[0300] Based on metadata information, the central node server generates authentication tokens, file indexes, public keys, and private keys.

[0301] In some embodiments of the present invention, after receiving the information, the central node server generates a token-based authentication JWT, generates a globally unique file index, and generates a public / private key for encrypting / decrypting file transfers.

[0302] Sc, the central node server returns to the terminal information of the nearest edge server, the encrypted public key, and the authentication token.

[0303] Sd, the terminal sends a request to the edge server to establish an edge upload channel.

[0304] In an embodiment of the present invention, the terminal requests the establishment of an edge upload channel from the edge server, carrying the Synchronize Sequence Numbers (SYN), JWT verification code, and index.

[0305] The edge server sends a communication confirmation message to the terminal to confirm the connection.

[0306] In an embodiment of the present invention, after the edge server verifies via JWT, it returns an Acknowledge character (ACK) to confirm the terminal communication.

[0307] The edge server sends a request to the central node server to obtain the decryption private key (asynchronously).

[0308] In an embodiment of the present invention, when performing JWT verification, the edge server obtains the private key for file decryption from the central node server in parallel (asynchronously) for decryption after receiving the file.

[0309] Sg, the central node server responds to the request and sends private key information to the edge server.

[0310] Sh, the terminal will split the uploaded file into chunks and upload the payload information of the chunks to the edge server.

[0311] In an embodiment of the present invention, after receiving the ACK confirmation, the terminal divides the file into blocks and uploads the file to the edge server in parallel. If the file is large, even if it is divided into blocks, the space occupied by each block is large, and the overall encryption efficiency is not high. However, partial RSA encryption of the 32-bit header information in each block of the file stream can also ensure security. That is, each file block is regarded as a header information + payload information. The header information is extracted and only the payload information is uploaded to the edge server.

[0312] Si, the terminal encrypts the header information after segmentation using a public key and sends it to the central node server.

[0313] Sj, the central node server returns header information to the terminal indicating that the transmission is complete.

[0314] In an embodiment of the present invention, step Sj corresponds to the request of step Si.

[0315] Sk and the edge server return information indicating that the file block upload is complete to the terminal.

[0316] In embodiments of the present invention, the Sk step corresponds to the request of the Sh step.

[0317] Sl, the edge server sends a request to the central node to obtain the file block header information.

[0318] The central node server responds to the request and returns header information to the edge server.

[0319] The Sn and edge servers decrypt the header information and integrate it with the unencrypted information to obtain the uploaded file.

[0320] In an embodiment of the present invention, the edge server decrypts the file block header information with a private key and restores it into a header information + payload information format, and finally integrates all file blocks into a complete file.

[0321] So, the edge server synchronizes the uploaded files to the central node server.

[0322] In the embodiments of the present invention, after the above steps, the file upload process has been completed. Next, as shown by the dotted line in the figure, the step of synchronizing the file from the edge server to the central server is a recommended process that can be omitted. The purpose of synchronizing the file is to facilitate the central node server to schedule the file to the edge server that is closer to the user.

[0323] Sp, the central node server returns synchronization completion information to the edge server.

[0324] It is understood that in the embodiments of the present invention, the terminal, the central node server, and the edge server interact. The terminal divides the file to be uploaded into blocks, resulting in multiple file blocks, and uploads the file in parallel to the central node server and the designated edge server, making full use of bandwidth to improve file transmission efficiency. During the file upload process, the terminal encrypts part of the data in each file block to increase encryption efficiency. Furthermore, since the key and the file are not in the same place, it increases the difficulty of cracking the file and enhances security and privacy.

[0325] In embodiments of the present invention, such as Figure 11 As shown, Figure 11 An optional process for a file transfer method provided in an embodiment of the present invention Figure 2 The following steps will provide a detailed explanation.

[0326] SA and the terminal send a file download request to the central node server, along with metadata information.

[0327] In some embodiments of the present invention, the terminal requests a file to be downloaded from the central node server, and carries metadata information, which includes: MD5, file size, file name, username, password and location information, etc.

[0328] The SB and central node servers generate authentication tokens, matching file indexes, and matching public and private keys based on metadata information.

[0329] In an embodiment of the present invention, after receiving the information, the central node server generates a token-based authentication JWT, matches the file index to find the file location, and matches the public / private key of the response.

[0330] The SC and central node servers return information about the nearest edge server, the decryption public key, and the authentication token to the terminal.

[0331] In an embodiment of the present invention, the central node server returns to the terminal information such as the edge server where the file is located, the public key for file decryption, JWT, and file index.

[0332] The SD card and the terminal send a request to the edge server to establish an edge download channel.

[0333] In an embodiment of the present invention, the terminal requests the establishment of an edge download channel from the edge server, carrying the SYN code, JWT verification code, and index.

[0334] SE and edge server send communication confirmation information to the terminal for confirmation.

[0335] In an embodiment of the present invention, the edge server returns an ACK to the terminal after verification via JWT.

[0336] SF and edge servers send a request to the central node server to obtain the decryption private key (asynchronously).

[0337] In an embodiment of the present invention, when performing JWT verification, the edge server obtains the private key for file decryption from the central node server in parallel (asynchronously) for encryption after receiving the file.

[0338] The central node server responds to the request and sends private key information to the edge server.

[0339] The SH and edge servers divide the file to be downloaded into blocks and obtain header and payload information.

[0340] SI and edge servers encrypt the header information and send it to the central node server.

[0341] SJ, the central node server returns encrypted header information to the edge server to indicate that the transmission is complete.

[0342] SK: The terminal sends a file chunk parallel download request to the edge server.

[0343] In an embodiment of the present invention, after receiving the ACK confirmation, the terminal requests the download from the edge server in parallel according to the file block information. At this time, the downloaded file block is the payload information after the header information is separated in the SH step.

[0344] The SL (Side Server) and edge server respond to requests sent by the terminal and send payload information to the terminal.

[0345] The SM and the terminal send a request to the central node server to obtain the file block header information.

[0346] The SN and central node server respond to the request sent by the terminal by returning file block header information.

[0347] SO, the terminal decrypts the obtained header information and integrates it with the payload information to download the file.

[0348] In an embodiment of the present invention, after receiving the file blocks, the terminal decrypts the encrypted header information using the public key and integrates all the file blocks into a complete file.

[0349] Understandably, in the embodiments of this invention, when a terminal downloads a file, it first connects to the nearest edge server indicated by the central node server, then obtains unencrypted data from the indicated edge server, decrypts the encrypted data received from the central node using the key received from the central node, and integrates the decrypted data with the unencrypted data to obtain the downloaded file. In this method, two parts of data are obtained from two different devices, reducing the risk of file leakage; furthermore, the obtained encrypted data and the corresponding decryption key are not stored in the same location, increasing the difficulty of cracking the file and enhancing the security of file downloads.

[0350] This invention provides a schematic diagram of the structure of a terminal, as shown in the embodiment of the invention. Figure 12 As shown, Figure 12 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Figure 1 The terminal 12 includes: a first sending unit 1201, a first segmentation unit 1202, a first encryption unit 1203, a download unit 1204, and a first integration unit 1205; wherein:

[0351] The first sending unit 1201 is used to connect to the first edge server indicated by the central node server by sending a file upload request to the central node server;

[0352] The first segmentation unit 1202 is used to segment the first file into multiple first file blocks;

[0353] The first encryption unit 1203 is used to partially encrypt each of the plurality of first file blocks using the first key sent by the central node server, to obtain a plurality of first encrypted data and a plurality of first unencrypted data;

[0354] The first sending unit 1201 is further configured to upload the plurality of first encrypted data to the central node server, and upload the plurality of first unencrypted data to the first edge server.

[0355] In an embodiment of the present invention, the first sending unit 1201 is further configured to connect to a second edge server indicated by the central node server by sending a file download request to the central node server;

[0356] The download unit 1204 is used to download multiple second unencrypted data by sending an unencrypted data acquisition request to the second edge server; the multiple second unencrypted data are unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks.

[0357] The download unit 1204 is further configured to download multiple second encrypted data by sending an encrypted data acquisition request to the central node server; the multiple second encrypted data are encrypted portions obtained by the second edge server partially encrypting the multiple second file blocks, and are sent by the second edge server to the central node server;

[0358] The first integration unit 1205 is used to decrypt the plurality of second encrypted data using the second key sent by the central node server, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

[0359] In some embodiments of the present invention, the first sending unit 1201 is further configured to send a file upload request to the central node server; the file upload request carries location information; and receive first edge server information sent by the central node server; the first edge server information is an edge server designated by the central node server for the terminal to upload files based on the location information among at least one edge server; and send a request to establish an edge upload channel to the first edge server; and, upon receiving communication confirmation information sent by the first edge server, determine to connect to the first edge server; the communication confirmation character is generated by the first edge server in response to the request to establish an edge upload channel.

[0360] In some embodiments of the present invention, the first key includes a first public key; the first encryption unit 1203 is further configured to separate payload information and header information from each first file block; and to use the payload information of each first file block as first unencrypted data to obtain the plurality of first unencrypted data; and to use the first public key to encrypt the header information of each first file block to obtain the plurality of first encrypted data.

[0361] In some embodiments of the present invention, the first key includes a first public key; the file upload request includes first metadata information; the terminal further includes a third receiving unit 1206, which is also used to receive the first public key generated by the central node server based on the first metadata information; wherein, the first metadata information includes at least one of a first file size, a first file name, a message digest algorithm, and account information.

[0362] In some embodiments of the present invention, the third receiving unit 1206 is further configured to receive the first authentication token information generated by the central node server based on the first metadata information; the first sending unit 1201 is further configured to generate the request to establish an edge upload channel based on the first authentication token information; the first authentication token information is used by the first edge server to authenticate the terminal and send the communication confirmation information to the terminal if the authentication is successful.

[0363] In some embodiments of the present invention, the terminal further includes a first completion unit 1207, which is configured to determine that the first encrypted data in each first file block has been uploaded successfully by receiving encrypted data transmission completion information returned by the central node server; and to determine that the first unencrypted data in each first file block has been uploaded successfully by receiving unencrypted data transmission completion information returned by the first edge server; and to determine that the first file upload is complete when both the first encrypted data and the first unencrypted data in each of the plurality of first file blocks have been uploaded successfully.

[0364] In some embodiments of the present invention, the terminal is connected to the central node server; the first sending unit 1201 is further configured to send a file download request to the central node server; the file download request carries location information; receive second edge server information sent by the central node server; the second edge server information is that the central node server, based on the location information, designates an edge server for the terminal to download files among at least one edge server; send a request to establish an edge download channel to the second edge server; and, upon receiving communication confirmation information sent by the second edge server, determine to connect to the second edge server; the communication confirmation information is generated by the second edge server in response to the request to establish an edge download channel.

[0365] In some embodiments of the present invention, the second key includes a second public key; the first encryption unit 1203 is further configured to use the second public key to decrypt each of the plurality of second encrypted data to obtain a plurality of second decrypted data; use the plurality of second decrypted data as a plurality of header information and use the plurality of second unencrypted data as a plurality of payload information, and obtain the plurality of second file blocks by integrating the header information and payload information corresponding to the file blocks; integrate the plurality of second file blocks to obtain the second file.

[0366] In some embodiments of the present invention, the third receiving unit 1206 is further configured to receive the second public key generated by the central node server based on the second metadata information; wherein the second metadata information includes at least one of the following: second file size, second file name, message digest algorithm, and account information.

[0367] Understandably, in the embodiments of the present invention, on the one hand, the terminal divides the file to be uploaded into multiple file blocks, and uploads the file in parallel to the central node server and the designated edge server, making full use of bandwidth to improve file transmission efficiency; during the file upload process, the terminal encrypts part of the data in each file block to increase encryption efficiency, and since the key and the file are not in the same location, it increases the difficulty of cracking the file and enhances security and privacy. On the other hand, the terminal receives authentication token information sent by the central node server and sends a request to the edge server to establish an edge download channel carrying authentication token information. After the edge server authenticates the terminal's identity, the file is downloaded. This method improves the security of file download.

[0368] This invention provides a schematic diagram of the structure of an edge server, as shown in the embodiment of the invention. Figure 13 As shown, Figure 13 A schematic diagram of the structure of an edge server provided in an embodiment of the present invention. Figure 1The edge server 13 includes: a connection unit 1301, a first receiving unit 1302, a second integration unit 1303, a second segmentation unit 1304, a second encryption unit 1305, and a second sending unit 1306; wherein,

[0369] The connection unit 1301 is used to establish a connection with the terminal by receiving a request to establish an edge upload channel sent by the terminal.

[0370] The first receiving unit 1302 is used to receive multiple first unencrypted data uploaded by the terminal; the multiple first unencrypted data correspond to the unencrypted parts in multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file;

[0371] The first receiving unit 1302 is further configured to obtain multiple first encrypted data corresponding to the multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal partially encrypting the multiple first file blocks and sent by the terminal to the central node server;

[0372] The second integration unit 1303 is used to decrypt the plurality of first encrypted data using the first key sent by the central node server, and integrate the obtained plurality of first decrypted data with the plurality of first unencrypted data to obtain the first file.

[0373] The connection unit 1301 is further configured to establish a connection with the terminal by receiving the request to establish an edge download channel sent by the terminal, and to determine the second file corresponding to the request to establish an edge download channel;

[0374] The second segmentation unit 1304 is used to segment the second file into multiple second file blocks;

[0375] The second encryption unit 1305 is used to partially encrypt each of the plurality of second file blocks using the second key sent by the central node server, to obtain a plurality of second encrypted data and a plurality of second unencrypted data;

[0376] The second sending unit 1306 is configured to respond to the unencrypted data acquisition request sent by the terminal by sending the plurality of second unencrypted data to the terminal; and to send the plurality of second encrypted data to the central node server, so that the terminal downloads the plurality of second encrypted data from the central node server, integrates it with the plurality of second unencrypted data to obtain the second file, and completes the transmission of the second file.

[0377] In some embodiments of the present invention, the first receiving unit 1302 is further configured to receive the request to establish an edge upload channel sent by the terminal; the request to establish an edge upload channel includes first authentication token information; based on the first authentication token information, the terminal is authenticated, and if the authentication is successful, communication confirmation information is generated; the communication confirmation information is sent to the terminal, thereby establishing a connection with the terminal.

[0378] In some embodiments of the present invention, the first key includes: a first private key; the second sending unit 1306 is further configured to send a key acquisition request to the central node server; the first receiving unit 1302 is further configured to receive the first private key sent by the central node server in response to the key acquisition request; the first private key is generated by the central node server according to the file upload request sent by the terminal.

[0379] In some embodiments of the present invention, the first receiving unit 1302 is further configured to receive the request to establish an edge download channel sent by the terminal; the request to establish an edge download channel includes second authentication token information; based on the second authentication token information, the terminal is authenticated, and if the authentication is successful, communication confirmation information is generated; the communication confirmation information is sent to the terminal, thereby establishing a connection with the terminal.

[0380] In some embodiments of the present invention, the second key includes a second private key; the second sending unit 1306 is further configured to send a key acquisition request to the central node server; the first receiving unit 1302 is further configured to receive the second private key sent by the central node server in response to the key acquisition request; the second private key is generated by the central node server according to the file download request sent by the terminal.

[0381] In some embodiments of the present invention, the second key includes a second private key; the second encryption unit 1305 is further configured to separate payload information and header information from each second file block; use the payload information of each second file block as second unencrypted data to obtain the plurality of second unencrypted data; and use the second private key to encrypt the header information in each second file block to obtain the plurality of second encrypted data.

[0382] Understandably, in the embodiments of the present invention, on the one hand, after the edge server establishes a connection with the terminal, it receives multiple first unencrypted data uploaded from the terminal and obtains multiple first encrypted data from the central node server. The edge server obtains the uploaded file from both the terminal and the central node server, reducing the risk of leakage during file upload. The edge server uses the key received from the central node server to decrypt the encrypted file and integrates it with the unencrypted file to obtain the uploaded file, increasing the difficulty of file cracking and enhancing security and privacy. On the other hand, after the edge server establishes a connection with the terminal, it divides the file to be downloaded by the terminal into blocks, obtaining multiple file blocks; using the key sent by the central node server, it partially encrypts the multiple file blocks, obtaining multiple unencrypted data and encrypted data, and sends both to the terminal and the central node server respectively. This method divides the downloaded file into blocks and performs asymmetric encryption on each block, and the key and the file are not in the same location, increasing the difficulty of file cracking and enhancing security and privacy.

[0383] This invention provides a schematic diagram of the structure of a central node server, as shown in the embodiment of the invention. Figure 14 As shown, Figure 14 A schematic diagram of the structure of a central node server provided in an embodiment of the present invention. Figure 1 The central node server 14 includes: a determining unit 1401, a third sending unit 1402, and a second receiving unit 1403; wherein,

[0384] The determining unit 1401 is configured to specify a first edge server for the terminal among the at least one edge servers according to the file upload request sent by the terminal; the first edge server is configured to receive a plurality of first unencrypted data sent by the terminal; the plurality of first unencrypted data are unencrypted portions of a plurality of first file blocks; the plurality of first file blocks are obtained by the terminal by performing block processing on a first file;

[0385] The third sending unit 1402 is used to generate a first key according to the file upload request, and send the first key to the terminal and the first edge server;

[0386] The second receiving unit 1403 is used to receive a plurality of first encrypted data sent by the terminal; the plurality of first encrypted data is obtained by the terminal using the first key to partially encrypt the plurality of first file blocks;

[0387] The third sending unit 1402 is further configured to respond to the encrypted data acquisition request sent by the first edge server and send the plurality of first encrypted data to the first edge server; so that the first edge server can decrypt the plurality of first encrypted data using the first key, and integrate the obtained plurality of first decrypted data and the plurality of first unencrypted data to complete the transmission of the first file.

[0388] In some embodiments of the present invention, the determining unit 1401 is further configured to specify a second edge server for the terminal among the at least one edge server according to the file download request sent by the terminal; the second edge server is configured to send a plurality of second unencrypted data to the terminal; the plurality of second unencrypted data are unencrypted portions of a plurality of second file blocks; the plurality of second file blocks are obtained by the second edge server by performing block processing on the second file corresponding to the file download request;

[0389] The third sending unit 1402 is further configured to generate a second key according to the file download request, and send the second key to the terminal and the second edge server;

[0390] The second receiving unit 1403 is further configured to receive a plurality of second encrypted data sent by the second edge server; the plurality of second encrypted data is obtained by the second edge server using the second key to partially encrypt the plurality of second file blocks;

[0391] The third sending unit 1402 is further configured to respond to the encrypted data acquisition request sent by the terminal, send the plurality of second encrypted data to the terminal, so that the terminal can decrypt the plurality of second encrypted data using the second key, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

[0392] In some embodiments of the present invention, the file upload request carries location information; the determining unit 1401 is further configured to specify the first edge server for the terminal among the at least one edge server based on the location information.

[0393] In some embodiments of the present invention, the file upload request includes: first metadata information; the first key includes: a first public key and a first private key; the third sending unit 1402 is further configured to generate the first public key and the first private key according to the first metadata information; send the first public key to the terminal; and send the first private key to the first edge server in response to a key acquisition request sent by the first edge server; wherein the first metadata information includes at least one of a first file size, a first file name, a message digest algorithm, and account information.

[0394] In some embodiments of the present invention, the third sending unit 1402 is further configured to generate first authentication token information based on the first metadata information in the file upload request and send it to the terminal, so that the terminal generates an edge upload channel establishment request based on the first authentication token information and sends it to the first edge server, and establishes a connection with the first edge server when the first authentication token identity authentication is successful.

[0395] In some embodiments of the present invention, the file download request includes: second metadata information; the second key includes: a second public key and a second private key; the third sending unit 1402 is further configured to generate the second public key and the second private key according to the second metadata information; send the second public key to the terminal; and send the second private key to the second edge server in response to a key acquisition request sent by the second edge server; wherein the second metadata information includes at least one of a second file size, a message digest algorithm, a second file name, and account information.

[0396] In some embodiments of the present invention, the second receiving unit 1403 is further configured to receive a file download request sent by the terminal; and generate second authentication token information based on the second metadata information in the file download request.

[0397] In some embodiments of the present invention, the third sending unit 1402 is further configured to send the second authentication token information to the terminal, so that the terminal generates an edge download channel establishment request based on the second authentication token information and sends it to the second edge server, and establishes a connection with the second edge server when the first authentication token identity authentication is successful.

[0398] Understandably, in the embodiments of the present invention, on the one hand, the central node server assigns a nearby edge server to the terminal based on the file upload request sent by the terminal, improving the efficiency of file transfer; it generates a key and sends it to both the edge server and the terminal, and sends encrypted data received from the terminal to the edge server. This method ensures that the key and the file are not located in the same place, increasing the difficulty of file cracking and enhancing security and privacy. On the other hand, the central node server assigns a nearby edge server to the terminal based on the file download request sent by the terminal, improving the efficiency of file download; it generates a key and sends it to both the terminal and the edge server, and sends encrypted data obtained from the edge server to the terminal. This method also ensures that the key and the file are not located in the same place, increasing the difficulty of file cracking and enhancing security and privacy.

[0399] Based on the methods described in the above embodiments, this invention provides a schematic diagram of the structure of a terminal. Figure 2 ,like Figure 15 As shown, Figure 15 A schematic diagram of the structure of a terminal provided in this embodiment of the invention. Figure 2 The terminal includes a first processor 1501 and a first memory 1502; the first memory 1502 stores one or more programs executable by the first processor 1501, and when one or more programs are executed, the file transfer method as described in the embodiments of the present invention is executed by the first processor 1501.

[0400] Based on the methods described in the above embodiments, this invention provides a schematic diagram of the structure of an edge server. Figure 2 ,like Figure 16 As shown, Figure 16 A schematic diagram of the structure of an edge server provided in this embodiment of the invention. Figure 2 The edge server includes a second processor 1601 and a second memory 1602; the second memory 1602 stores one or more programs executable by the second processor 1601, and when one or more programs are executed, the file transfer method as described in the embodiments of the present invention is executed by the second processor 1601.

[0401] Based on the methods described in the above embodiments, this invention provides a schematic diagram of the structure of a central node server. Figure 2 ,like Figure 17 As shown, Figure 17 A schematic diagram of the structure of a central node server provided in this embodiment of the invention. Figure 2 The central node server includes a third processor 1701 and a third memory 1702; the third memory 1702 stores one or more programs executable by the third processor 1701, and when one or more programs are executed, the file transfer method as described in the embodiments of the present invention is executed by the third processor 1701.

[0402] This invention provides a computer-readable storage medium for use in a terminal. The computer storage medium stores executable instructions, which, when executed, cause a first processor to perform the file transfer method as described in this invention.

[0403] This invention provides a computer-readable storage medium for use in an edge server. The computer storage medium stores executable instructions, which, when executed, cause a second processor to perform the file transfer method as described in this invention.

[0404] This invention provides a computer-readable storage medium applied to a central node server. The computer storage medium stores executable instructions, which, when executed, cause a third processor to perform the file transfer method as described in this invention.

[0405] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0406] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0407] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0408] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0409] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.

Claims

1. A file transfer method, characterized in that, Applied to a terminal, wherein the terminal is connected to a central node server, the method includes: By sending a file upload request to the central node server, a connection is made to the first edge server indicated by the central node server; The first file is divided into blocks to obtain multiple first file blocks; Using the first key sent by the central node server, each of the plurality of first file blocks is partially encrypted to obtain a plurality of first encrypted data and a plurality of first unencrypted data. The plurality of first encrypted data are uploaded to the central node server, and the plurality of first unencrypted data are uploaded to the first edge server.

2. The method according to claim 1, characterized in that, The step of connecting to the first edge server indicated by the central node server by sending a file upload request to the central node server includes: A file upload request is sent to the central node server; the file upload request carries location information; the location information is the user's location information; The central node server receives first edge server information sent by the central node server; the first edge server information indicates that the central node server, based on the location information, designates an edge server for the terminal to upload files in at least one edge server. Send a request to establish an edge upload channel to the first edge server; Upon receiving a communication confirmation message from the first edge server, a connection to the first edge server is established; the communication confirmation character is generated by the first edge server in response to the request to establish an edge upload channel.

3. The method according to claim 1 or 2, characterized in that, The first key includes the first public key; The step of using the first key sent by the central node server to partially encrypt each of the plurality of first file blocks to obtain a plurality of first encrypted data and a plurality of first unencrypted data includes: The payload information and header information are separated from each of the first file blocks; The payload information of each first file block is used as the first unencrypted data to obtain the plurality of first unencrypted data; Using the first public key, the header information of each first file block is encrypted to obtain the plurality of first encrypted data.

4. The method according to claim 1 or 2, characterized in that, The first key includes the first public key; The file upload request includes: first metadata information; the method further includes: The central node server receives the first public key generated based on the first metadata information; wherein the first metadata information includes at least one of the following: first file size, first file name, message digest algorithm, and account information.

5. The method according to claim 2, characterized in that, Before sending the request to establish an edge upload channel to the first edge server, the method further includes: Receive the first authentication token information generated by the central node server based on the first metadata information; Based on the first authentication token information, the request to establish an edge upload channel is generated; the first authentication token information is used by the first edge server to authenticate the terminal, and to send the communication confirmation information to the terminal if the authentication is successful.

6. The method according to any one of claims 1, 2, and 5, characterized in that, The method further includes: By receiving the encrypted data transmission completion information returned by the central node server, it is determined that the first encrypted data in each first file block has been uploaded. By receiving the unencrypted data transmission completion information returned by the first edge server, it is determined that the first unencrypted data in each first file block has been uploaded. If, in each of the plurality of first file blocks, both the first encrypted data and the first unencrypted data of each first file block have been uploaded, then the first file upload is determined to be complete.

7. A file transfer method, characterized in that, Applied to a terminal, the terminal being connected to a central node server, including: By sending a file download request to the central node server, a connection is made to the second edge server indicated by the central node server; By sending an unencrypted data acquisition request to the second edge server, multiple second unencrypted data are downloaded; the multiple second unencrypted data are the unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks; By sending an encrypted data acquisition request to the central node server, multiple second encrypted data are downloaded; the multiple second encrypted data are encrypted portions obtained by the second edge server through partial encryption of the multiple second file blocks, and are sent by the second edge server to the central node server; Using the second key sent by the central node server, the plurality of second encrypted data are decrypted, and the resulting plurality of second decrypted data are integrated with the plurality of second unencrypted data to obtain the second file.

8. The method according to claim 7, characterized in that, The step of connecting to the second edge server indicated by the central node server by sending a file download request to the central node server includes: A file download request is sent to the central node server; the file download request carries location information; the location information is the user's location information; The central node server receives second edge server information sent by the central node server; the second edge server information indicates that the central node server, based on the location information, designates an edge server for the terminal to download files in at least one edge server. Send a request to establish an edge download channel to the second edge server; Upon receiving a communication confirmation message from the second edge server, a connection to the second edge server is established; the communication confirmation message is generated by the second edge server in response to the request to establish an edge download channel.

9. The method according to claim 7 or 8, characterized in that, The second key includes a second public key; the second key sent by the central node server is used to decrypt the plurality of second encrypted data, and the resulting plurality of decrypted second data is integrated with the plurality of unencrypted second data to obtain the second file, which includes: Using the second public key, each of the plurality of second encrypted data is decrypted to obtain a plurality of second decrypted data. The multiple second decrypted data are used as multiple header information, and the multiple second unencrypted data are used as multiple payload information. By integrating the header information and payload information corresponding to the file blocks, the multiple second file blocks are obtained. The multiple second file blocks are integrated to obtain the second file.

10. The method according to claim 7 or 8, characterized in that, The second key includes the second public key; The file download request includes: second metadata information; the method further includes: Receive the second public key generated by the central node server based on the second metadata information; The second metadata information includes at least one of the following: second file size, second file name, message digest algorithm, and account information.

11. A file transfer method, characterized in that, Applied to edge servers, which are connected to central node servers, including: Establish a connection with the terminal by receiving a request from the terminal to establish an edge upload channel; The terminal receives multiple first unencrypted data; the multiple first unencrypted data correspond to the unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file; The terminal obtains multiple first encrypted data corresponding to the multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal by partially encrypting the multiple first file blocks, and are sent by the terminal to the central node server. Using the first key sent by the central node server, the plurality of first encrypted data are decrypted, and the resulting plurality of first decrypted data are integrated with the plurality of first unencrypted data to obtain the first file.

12. The method according to claim 11, characterized in that, The receiving terminal sends a request to establish an edge upload channel, and establishes a connection with the terminal, including: The terminal sends a request to establish an edge upload channel; the request to establish an edge upload channel includes first authentication token information. Based on the first authentication token information, the terminal is authenticated, and if the authentication is successful, communication confirmation information is generated. The communication confirmation information is sent to the terminal, thereby establishing a connection with the terminal.

13. The method according to claim 11 or 12, characterized in that, The first key includes: a first private key; before decrypting the plurality of first encrypted data using the first key sent by the central node server, the method further includes: Send a key acquisition request to the central node server; The central node server receives the first private key sent in response to the key acquisition request; the first private key is generated by the central node server based on the file upload request sent by the terminal.

14. A file transfer method, characterized in that, Applied to edge servers, which are connected to central node servers, including: By receiving a request to establish an edge download channel from the terminal, a connection is established with the terminal, and the second file corresponding to the request to establish an edge download channel is determined; The second file is divided into blocks to obtain multiple second file blocks; Using the second key sent by the central node server, each of the plurality of second file blocks is partially encrypted to obtain a plurality of second encrypted data and a plurality of second unencrypted data; In response to the unencrypted data acquisition request sent by the terminal, the plurality of second unencrypted data are sent to the terminal; and the plurality of second encrypted data are sent to the central node server, so that the terminal downloads the plurality of second encrypted data from the central node server, integrates it with the plurality of second unencrypted data to obtain the second file, and completes the transmission of the second file.

15. The method according to claim 14, characterized in that, The step of establishing a connection with the terminal by receiving the request to establish an edge download channel sent by the terminal includes: The terminal sends a request to establish an edge download channel; the request to establish an edge download channel includes second authentication token information. Based on the second authentication token information, the terminal is authenticated, and if the authentication is successful, a communication confirmation message is generated. The communication confirmation information is sent to the terminal, thereby establishing a connection with the terminal.

16. The method according to claim 14 or 15, characterized in that, The second key includes a second private key; before using the second key sent by the central node server to partially encrypt each of the plurality of second file blocks to obtain a plurality of second encrypted data and a plurality of second unencrypted data, the method further includes: Send a key acquisition request to the central node server; The central node server receives the second private key in response to the key acquisition request; the second private key is generated by the central node server based on the file download request sent by the terminal.

17. The method according to claim 14 or 15, characterized in that, The second key includes a second private key; the step of using the second key sent by the central node server to partially encrypt each of the plurality of second file blocks to obtain a plurality of second encrypted data and a plurality of second unencrypted data includes: The payload information and header information are separated from each of the second file blocks; The payload information of each second file block is used as the second unencrypted data to obtain the plurality of second unencrypted data; Using the second private key, the header information in each second file block is encrypted to obtain the plurality of second encrypted data.

18. A file transfer method, characterized in that, Applied to a central node server, which is connected to terminals and at least one edge server, including: Based on the file upload request sent by the terminal, a first edge server is designated for the terminal among the at least one edge server; the first edge server is used to receive multiple first unencrypted data sent by the terminal; the multiple first unencrypted data are unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file; A first key is generated based on the file upload request, and the first key is sent to the terminal and the first edge server; The terminal receives a plurality of first encrypted data; the plurality of first encrypted data are obtained by the terminal partially encrypting the plurality of first file blocks using the first key; In response to the encrypted data acquisition request sent by the first edge server, the plurality of first encrypted data are sent to the first edge server; so that the first edge server decrypts the plurality of first encrypted data using the first key, and integrates the obtained plurality of first decrypted data and the plurality of first unencrypted data to complete the transmission of the first file.

19. The method according to claim 18, characterized in that, The file upload request carries location information; the location information is the user's location information. The step of specifying a first edge server for the terminal among the at least one edge servers based on the file upload request sent by the terminal includes: Based on the location information, the first edge server is designated for the terminal among the at least one edge server.

20. The method according to claim 18, characterized in that, The file upload request includes: first metadata information; the first key includes: a first public key and a first private key; generating the first key according to the file upload request and sending the first key to the terminal and the first edge server includes: Based on the first metadata information, generate the first public key and the first private key; Send the first public key to the terminal; In response to the key acquisition request sent by the first edge server, the first private key is sent to the first edge server; The first metadata information includes at least one of the following: first file size, first file name, message digest algorithm, and account information.

21. The method according to claim 19 or 20, characterized in that, The method further includes: Based on the first metadata information in the file upload request, a first authentication token is generated and sent to the terminal, so that the terminal generates an edge upload channel establishment request based on the first authentication token and sends it to the first edge server, and establishes a connection with the first edge server if the identity authentication of the first authentication token is successful.

22. A file transfer method, characterized in that, Applied to a central node server, which is connected to at least one edge server, including: Based on the file download request sent by the terminal, a second edge server is designated for the terminal among the at least one edge server; the second edge server is used to send multiple second unencrypted data to the terminal; the multiple second unencrypted data are unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks; A second key is generated based on the file download request, and the second key is sent to the terminal and the second edge server; The system receives multiple sets of second encrypted data sent by the second edge server; the multiple sets of second encrypted data are obtained by the second edge server using the second key to partially encrypt the multiple sets of second file blocks; In response to the encrypted data acquisition request sent by the terminal, the plurality of second encrypted data are sent to the terminal so that the terminal can decrypt the plurality of second encrypted data using the second key, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

23. The method according to claim 22, characterized in that, The file download request includes: second metadata information; the second key includes: a second public key and a second private key; the step of generating the second key according to the file download request and sending the second key to the terminal and the second edge server includes: Based on the second metadata information, generate the second public key and the second private key; Send the second public key to the terminal; In response to the key acquisition request sent by the second edge server, the second private key is sent to the second edge server; The second metadata information includes at least one of the following: second file size, message digest algorithm, second file name, and account information.

24. The method according to claim 22 or 23, characterized in that, The method further includes: Receive a file download request sent by the terminal; Generate a second authentication token based on the second metadata information in the file download request; The second authentication token information is sent to the terminal, so that the terminal generates a request to establish an edge download channel based on the second authentication token information and sends it to the second edge server. If the identity authentication of the second authentication token is successful, a connection is established with the second edge server.

25. A terminal, characterized in that, include: The system comprises a first sending unit, a first block unit, and a first encryption unit; wherein... The first sending unit is configured to connect to the first edge server indicated by the central node server by sending a file upload request to the central node server; The first segmentation unit is used to segment the first file into multiple first file blocks; The first encryption unit is used to partially encrypt each of the plurality of first file blocks using the first key sent by the central node server, to obtain a plurality of first encrypted data and a plurality of first unencrypted data; The first sending unit is further configured to upload the plurality of first encrypted data to the central node server and upload the plurality of first unencrypted data to the first edge server.

26. A terminal, characterized in that, include: The system comprises a first sending unit, a downloading unit, and a first integrating unit; wherein... The first sending unit is configured to connect to the second edge server indicated by the central node server by sending a file download request to the central node server; The download unit is configured to download multiple second unencrypted data by sending an unencrypted data acquisition request to the second edge server; the multiple second unencrypted data are unencrypted portions of multiple second file blocks; the multiple second file blocks are obtained by the second edge server by dividing the second file corresponding to the file download request into blocks. The download unit is further configured to download multiple second encrypted data by sending an encrypted data acquisition request to the central node server; the multiple second encrypted data are encrypted portions obtained by the second edge server partially encrypting the multiple second file blocks, and are sent by the second edge server to the central node server; The first integration unit is used to decrypt the plurality of second encrypted data using the second key sent by the central node server, and integrate the resulting plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

27. An edge server, characterized in that, include: A connection unit, a first receiving unit, and a second integration unit; wherein, The connection unit is used to establish a connection with the terminal by receiving a request to establish an edge upload channel sent by the terminal. The first receiving unit is configured to receive multiple first unencrypted data uploaded by the terminal; the multiple first unencrypted data correspond to the unencrypted portions of multiple first file blocks; the multiple first file blocks are obtained by the terminal performing block processing on the first file; The first receiving unit is further configured to obtain multiple first encrypted data corresponding to the multiple first file blocks from the central node server; the multiple first encrypted data are obtained by the terminal partially encrypting the multiple first file blocks, and are sent by the terminal to the central node server; The second integration unit is used to decrypt the plurality of first encrypted data using the first key sent by the central node server, and integrate the resulting plurality of first decrypted data with the plurality of first unencrypted data to obtain the first file.

28. An edge server, characterized in that, include: The system comprises a connection unit, a second block unit, a second encryption unit, and a second sending unit; wherein, The connection unit is used to establish a connection with the terminal by receiving a request to establish an edge download channel sent by the terminal, and to determine the second file corresponding to the request to establish an edge download channel; The second segmentation unit is used to segment the second file into multiple second file blocks; The second encryption unit is used to partially encrypt each of the plurality of second file blocks using the second key sent by the central node server, to obtain a plurality of second encrypted data and a plurality of second unencrypted data; The second sending unit is configured to respond to the unencrypted data acquisition request sent by the terminal by sending the plurality of second unencrypted data to the terminal; and to send the plurality of second encrypted data to the central node server, so that the terminal downloads the plurality of second encrypted data from the central node server, integrates it with the plurality of second unencrypted data to obtain the second file, and completes the transmission of the second file.

29. A central node server, characterized in that, include: The system comprises a determining unit, a third transmitting unit, and a second receiving unit; wherein, The determining unit is configured to assign a first edge server to the terminal in at least one edge server according to the file upload request sent by the terminal; the first edge server is configured to receive a plurality of first unencrypted data sent by the terminal; the plurality of first unencrypted data are unencrypted portions of a plurality of first file blocks; the plurality of first file blocks are obtained by the terminal by performing block processing on a first file; The third sending unit is used to generate a first key according to the file upload request, and send the first key to the terminal and the first edge server; The second receiving unit is configured to receive a plurality of first encrypted data sent by the terminal; the plurality of first encrypted data is obtained by the terminal using the first key to partially encrypt the plurality of first file blocks; The third sending unit is further configured to respond to the encrypted data acquisition request sent by the first edge server and send the plurality of first encrypted data to the first edge server; so that the first edge server can decrypt the plurality of first encrypted data using the first key, and integrate the obtained plurality of first decrypted data and the plurality of first unencrypted data to complete the transmission of the first file.

30. A central node server, characterized in that, include: The system comprises a determining unit, a third transmitting unit, and a second receiving unit; wherein, The determining unit is configured to assign a second edge server to the terminal in at least one edge server according to the file download request sent by the terminal; the second edge server is configured to send a plurality of second unencrypted data to the terminal; the plurality of second unencrypted data are unencrypted portions of a plurality of second file blocks; the plurality of second file blocks are obtained by the second edge server by performing block processing on the second file corresponding to the file download request; The third sending unit is used to generate a second key according to the file download request, and send the second key to the terminal and the second edge server; The second receiving unit is configured to receive multiple sets of second encrypted data sent by the second edge server; the multiple sets of second encrypted data are obtained by the second edge server using the second key to partially encrypt the multiple sets of second file blocks; The third sending unit is further configured to respond to the encrypted data acquisition request sent by the terminal by sending the plurality of second encrypted data to the terminal, so that the terminal can decrypt the plurality of second encrypted data using the second key, and integrate the obtained plurality of second decrypted data with the plurality of second unencrypted data to obtain the second file.

31. A terminal, characterized in that, The terminal includes: The first memory is used to store executable instructions; A first processor, when executing executable instructions stored in the first memory, implements the method according to any one of claims 1-6 or 7-10.

32. An edge server, characterized in that, The edge server includes: The second memory is used to store executable instructions; The second processor, when executing executable instructions stored in the second memory, implements the method according to any one of claims 11-13 or 14-17.

33. A central node server, characterized in that, The central node server includes: The third memory is used to store executable instructions; A third processor, when executing executable instructions stored in the third memory, implements the method according to any one of claims 18-21 or 22-24.

34. A storage medium, characterized in that, The storage medium stores executable instructions, which, when executed, cause a first processor to perform the file transfer method as described in any one of claims 1-6 or 7-10; or cause a second processor to perform the file transfer method as described in any one of claims 11-13 or 14-17; or cause a third processor to perform the file transfer method as described in any one of claims 18-21 or 22-24.

Citation Information

Patent Citations

  • Safe and low-cost storage method for sensing cloud data based on edge computing

    CN110300159A

  • File encryption transmission method, device and equipment and computer readable storage medium

    CN113315844A