Method for transmitting file between computer and embedded terminal
By scanning files between the computer and the embedded terminal, deleting duplicate data and performing parallel encryption processing, the problems of poor encryption effect and data loss in the prior art are solved, and higher data security and reliability are achieved.
Patent Information
- Application Number
- CN202510137569.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing computers and embedded terminals' file transfer methods are susceptible to the transient characteristics during data transmission iteration, resulting in poor encryption effect, large amount of data information loss, and insufficient security and reliability.
Connect the computer to the embedded terminal through a data cable, scan, identify and deduplication of files, encrypt the files using parallel encryption technology, and restore lost files through comparison to ensure the integrity of the data.
It achieves the improvement of encryption effect, reduces data loss, enhances data security and reliability, and ensures the integrity of file transfer.
Smart Images

Figure CN119996403A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of file transmission, in particular to a method for transmitting files between a computer and an embedded terminal. Background Art
[0002] An embedded terminal, also known as an embedded network terminal, is an independent terminal based on the network. It combines the unique communication technology of embedded network terminals and advanced SOC chip algorithms, allowing multiple users to share the CPU, memory, hard disk, drive and other resources of a host. It has a wide range of applications in various fields. With the continuous advancement of technology and the continuous expansion of application scenarios, embedded terminals will play a greater role.
[0003] The current method of transferring files between computers and embedded terminals is easily affected by the transient characteristics of the data transmission iterative process. The amount of data information lost after encryption is large and the encryption effect is poor. The encryption algorithm itself has limitations in dealing with dynamic changes in the data transmission process. Due to the instability of the data transmission process and the poor encryption effect, the existing method of transferring files between computers and embedded terminals has deficiencies in security and reliability, which may lead to the leakage or loss of sensitive data, causing losses to enterprises and individuals. Summary of the invention
[0004] The object of the present invention is to provide a method for transmitting files between a computer and an embedded terminal, so as to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: A method for transmitting files between a computer and an embedded terminal, comprising the following steps:
[0006] Step S1: directly connecting the computer to the embedded terminal via a data cable, and identifying the embedded terminal;
[0007] Step S2: Scan and identify the files transmitted to the embedded terminal, make judgments on the files, and then delete duplicate data;
[0008] Step S3: transferring the file from the computer to the embedded terminal, performing parallel encryption in the embedded terminal data transmission, and encrypting the layered data;
[0009] Step S4: Compare the transmission file received in the embedded terminal with the database file in the computer, identify the lost file and restore it;
[0010] Step S5: Complete the file transfer.
[0011] Preferably, in step S2, duplicate data at the file level is judged, a file fingerprint is generated, a unique fingerprint is generated for the target file using fingerprint technology, and it is judged whether the fingerprint already exists in the file fingerprint library. For duplicate file judgment, if the corresponding file fingerprint already exists, the file is not stored, and only the corresponding storage location index information needs to be returned from the file fingerprint library without storing the target file. If the corresponding file fingerprint does not exist, the block-level duplicate data judgment is entered, the file is divided into data blocks using the CDC block algorithm, a unique fingerprint is generated for each data block using fingerprint technology, and it is judged whether the fingerprint already exists in the block fingerprint library. If the corresponding block data fingerprint already exists, the block data file is not stored, and only a pointer to the corresponding block data location needs to be stored. If the corresponding block data fingerprint does not exist, the data block is stored and the block data and the file fingerprint library are updated at the same time.
[0012] Preferably, in step S2, the data block content is converted into a more concise and intuitive data fingerprint, the fingerprint value is compared with the stored preset block fingerprint value to see if they are the same, a hash function is used to execute a file similarity-based sampling deletion index algorithm, and a hash table mapping index structure for file data block comparison is constructed to sort the Hash fingerprint values of the data block numbers and perform index duplication checking. The index item corresponding to each data block contains information on the file name, file location, and data offset, thereby completing duplicate data deletion.
[0013] Preferably, in step S3, before performing data parallel encryption, encoding design is performed on the data according to the attribute distribution of the data in the embedded system, all terminal data in the system is collected based on the spatial position of the source node in the system, the transmission data is processed in layers, and the data attribute encoding is determined based on the differential analysis of the transmission data.
[0014] Preferably, in step S3, the transmission file is encrypted in parallel based on the AES algorithm. Under the control of the algorithm, the length of the transmission data cannot exceed 128 bits. The transmitted file is sliced to obtain isomorphic group data of equal length in each group, and the key length is increased step by step to gradually reduce the risk of data transmission. The file is divided into multiple blocks, and the size of each block can be determined according to actual needs and system resources to ensure that the size of each block is an integer multiple of the AES block size.
[0015] Preferably, the parallel encryption step in step S3 includes:
[0016] S3.1, perform row shift operation on the data, based on the data frame replacement result, perform row shift operation on the data;
[0017] S3.2, using the round function to perform round key encryption on the data, using the current round key to perform row shift replacement on the data bytes, and using the round function to perform round key encryption on the data;
[0018] S3.3. Each round key encryption will generate a new set of round keys until 9 round key encryption cycles are completed, and the ciphertext is output after the 10th encryption cycle;
[0019] S3.4, perform round key encryption on the output ciphertext and plaintext at the same time, obtain the round key, use the current round key to perform reverse row and column shift confusion replacement on the data bytes, and complete the encryption process of the file;
[0020] S3.5. Send the encrypted file to the target location through a secure transmission channel.
[0021] Preferably, when encrypting the layered data in step S3, the file is first scrambled to minimize the redundancy in the file message, and then the scrambled data information is diffused to cover up the statistical characteristics of the file data. In combination with the acquired layered transmission differential value, a 64-bit ciphertext is set, and after the file is divided according to the transmission level, it is scrambled using the Feistel network structure, and the last 8 bits of information after the scrambling are used as the parameters of the odd check bit. In the transmission of each layer, the key is shifted and permuted and compressed into a 48-bit key, and the differential value is distributed as a scale in each level of data transmission, and diffusion processing is performed to realize layered encryption processing of embedded terminal data.
[0022] Preferably, in step S4, information of lost files is collected to generate a lost file sequence, and information of unused file information areas and storage spaces that have never been used in the history of the file system is collected at the same time, and unused file information areas in the meta space of the file system and storage spaces that have never been used in the history of the data space are collected, one file node information points to a lost file, wherein the unused file information area is used preferentially, the preset directory of the file system is linked to all newly generated file node information, and the attribute information of the file system is modified accordingly, the preset directory of the file system is output to display the location information of the lost file, and the corresponding file in the computer is retransmitted to the embedded terminal for recovery according to the location information.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] The present invention adopts AES algorithm to encrypt the transmission file, which can provide a safe and stable transmission space for data. The amount of information loss after encryption is very small, and the security of data can be further enhanced by encrypting the layered data. Each layer of data is encrypted using AES algorithm. Even if a layer of data is cracked, the data of other layers still remain safe. Before file transmission, the method can scan and judge the duplicate data and delete it, which can not only reduce the amount of data transmitted and improve the transmission efficiency, but also avoid the storage of duplicate data and save storage space. After the transmission is completed, the method can compare and try to recover, so as to ensure the integrity of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Embodiment 1:
[0028] The present invention provides a method for transmitting files between a computer and an embedded terminal, comprising the following steps:
[0029] Step S1: directly connecting the computer to the embedded terminal via a data cable, and identifying the embedded terminal;
[0030] Step S2: Scan and identify the files transmitted to the embedded terminal and judge the files, judge the file-level duplicate data, generate a file fingerprint, use fingerprint technology to generate a unique fingerprint for the target file, and judge whether the fingerprint already exists in the file fingerprint library, and judge the duplicate files. If the corresponding file fingerprint already exists, the file is not stored. Only the corresponding storage location index information needs to be returned from the file fingerprint library without storing the target file. If the corresponding file fingerprint does not exist, enter the block-level duplicate data judgment, use the CDC block algorithm to divide the file into data blocks, use the fingerprint technology to generate a unique fingerprint for each data block, and judge whether the fingerprint already exists in the block fingerprint library. If the corresponding block already exists, For data fingerprint, the block data file is not stored, only the pointer to the corresponding block data location needs to be stored. If the corresponding block data fingerprint does not exist, the data block is stored and the block data and file fingerprint library are updated at the same time. Then, the duplicate data is deleted, and the data block content is converted into a more concise and intuitive data fingerprint. The fingerprint value is compared with the stored preset block fingerprint value to see if they are the same. The hash function is used to execute the file similarity-based sampling deletion index algorithm. By constructing a hash table mapping index structure for file data block comparison, the hash fingerprint value of the data block number is sorted and the index is checked for duplicates. The index item corresponding to each data block contains information about the file name, file location, and data offset, thus completing the deduplication of data.
[0031] Step S3: transferring the file from the computer to the embedded terminal, performing parallel encryption in the embedded terminal data transmission, before performing parallel encryption of the data, encoding the data is designed according to the attribute distribution of the data in the embedded system, based on the spatial position of the source node in the system, all the terminal data in the system are collected, the transmission data is hierarchically processed, and the data attribute coding is determined according to the differential analysis of the transmission data, and the hierarchical data is encrypted;
[0032] Step S4: compare the transmission file received in the embedded terminal with the database file in the computer, identify the lost file and recover it, collect the information of the lost file to generate a lost file sequence, collect the information of the unused file information area and the storage space that has never been used in the history in the file system, collect the unused file information area in the meta space of the file system and the storage space that has never been used in the history in the data space, one file node information points to a lost file, wherein the unused file information area is used first, link the preset directory of the file system to all the newly generated file node information, and modify the attribute information of the file system accordingly, output the preset directory of the file system to show the location information of the lost file, and retransmit the corresponding file in the computer to the embedded terminal for recovery according to the location information;
[0033] Step S5: Complete the file transfer.
[0034] Embodiment 2:
[0035] The present invention provides a method for transmitting files between a computer and an embedded terminal, comprising the following steps:
[0036] Step S1: directly connecting the computer to the embedded terminal via a data cable, and identifying the embedded terminal;
[0037] Step S2: Scan and identify the files transmitted to the embedded terminal and judge the files, judge the file-level duplicate data, generate a file fingerprint, use fingerprint technology to generate a unique fingerprint for the target file, and judge whether the fingerprint already exists in the file fingerprint library, and judge the duplicate files. If the corresponding file fingerprint already exists, the file is not stored. Only the corresponding storage location index information needs to be returned from the file fingerprint library without storing the target file. If the corresponding file fingerprint does not exist, enter the block-level duplicate data judgment, use the CDC block algorithm to divide the file into data blocks, use the fingerprint technology to generate a unique fingerprint for each data block, and judge whether the fingerprint already exists in the block fingerprint library. If the corresponding block already exists, For data fingerprint, the block data file is not stored, only the pointer to the corresponding block data location needs to be stored. If the corresponding block data fingerprint does not exist, the data block is stored and the block data and file fingerprint library are updated at the same time. Then, the duplicate data is deleted, and the data block content is converted into a more concise and intuitive data fingerprint. The fingerprint value is compared with the stored preset block fingerprint value to see if they are the same. The hash function is used to execute the file similarity-based sampling deletion index algorithm. By constructing a hash table mapping index structure for file data block comparison, the hash fingerprint value of the data block number is sorted and the index is checked for duplicates. The index item corresponding to each data block contains information about the file name, file location, and data offset, thus completing the deduplication of data.
[0038] Step S3: Transfer the file from the computer to the embedded terminal, and perform parallel encryption in the embedded terminal data transmission. Before performing parallel encryption of data, design the encoding according to the attribute distribution of the data in the embedded system. Based on the spatial position of the source node in the system, collect all the terminal data in the system, perform layered processing on the transmission data, determine the data attribute encoding based on the differential analysis of the transmission data, and perform parallel encryption on the transmission file based on the AES algorithm. Under the control of the algorithm, the length of the transmission data cannot exceed 128 bits. The transmission file is sliced to obtain isomorphic group data of equal length, and the key length is increased step by step to gradually reduce the risk of data transmission. Divide the file into multiple blocks. The size of each block can be determined according to actual needs and system resources. Ensure that the size of each block is an integer multiple of the AES block size. Encrypt the hierarchical data. When encrypting the hierarchical data, first scramble the file to minimize the redundancy in the file message. Then diffuse the scrambled data information to cover up the statistical characteristics of the file data. Combined with the obtained hierarchical transmission differential value, set a 64-bit ciphertext. After dividing the file according to the transmission level, use the Feistel network structure to scramble it. Use the last 8 bits of information after scrambling as the odd parity bit parameter. In each layer of transmission, the key is shifted and permuted to compress into a 48-bit key. The differential value is used as a scale to distribute in each layer of data transmission and diffused to achieve hierarchical encryption of embedded terminal data.
[0039] The parallel encryption steps include:
[0040] S3.1, perform row shift operation on the data, based on the data frame replacement result, perform row shift operation on the data;
[0041] S3.2, using the round function to perform round key encryption on the data, using the current round key to perform row shift replacement on the data bytes, and using the round function to perform round key encryption on the data;
[0042] S3.3. Each round key encryption will generate a new set of round keys until 9 round key encryption cycles are completed, and the ciphertext is output after the 10th encryption cycle;
[0043] S3.4, perform round key encryption on the output ciphertext and plaintext at the same time, obtain the round key, use the current round key to perform reverse row and column shift confusion replacement on the data bytes, and complete the encryption process of the file;
[0044] S3.5, sending the encrypted file to the target location through a secure transmission channel;
[0045] Step S4: compare the transmission file received in the embedded terminal with the database file in the computer, identify the lost file and recover it, collect the information of the lost file to generate a lost file sequence, collect the information of the unused file information area and the storage space that has never been used in the history in the file system, collect the unused file information area in the meta space of the file system and the storage space that has never been used in the history in the data space, one file node information points to a lost file, wherein the unused file information area is used first, link the preset directory of the file system to all the newly generated file node information, and modify the attribute information of the file system accordingly, output the preset directory of the file system to show the location information of the lost file, and retransmit the corresponding file in the computer to the embedded terminal for recovery according to the location information;
[0046] Step S5: Complete the file transfer.
[0047] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0048] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for transmitting files between a computer and an embedded terminal, characterized in that: The following steps are involved: Step S1: directly connecting the computer to the embedded terminal via a data cable, and identifying the embedded terminal; Step S2: Scan and identify the files transmitted to the embedded terminal, make judgments on the files, and then delete duplicate data; Step S3: transferring the file from the computer to the embedded terminal, performing parallel encryption in the embedded terminal data transmission, and encrypting the layered data; Step S4: Compare the transmission file received in the embedded terminal with the database file in the computer, identify the lost file and restore it; Step S5: Complete the file transfer.
2. The method for transmitting files between a computer and an embedded terminal according to claim 1, characterized in that: In the step S2, the file-level duplicate data is judged, a file fingerprint is generated, a unique fingerprint is generated for the target file using the fingerprint technology, and it is judged whether the fingerprint already exists in the file fingerprint library. For duplicate file judgment, if the corresponding file fingerprint already exists, the file is not stored, and only the corresponding storage location index information needs to be returned from the file fingerprint library without storing the target file. If the corresponding file fingerprint does not exist, the block-level duplicate data judgment is entered, the file is divided into data blocks using the CDC block algorithm, and a unique fingerprint is generated for each data block using the fingerprint technology. It is also judged whether the fingerprint already exists in the block fingerprint library. If the corresponding block data fingerprint already exists, the block data file is not stored, and only the pointer to the corresponding block data location needs to be stored. If the corresponding block data fingerprint does not exist, the data block is stored and the block data and the file fingerprint library are updated at the same time.
3. The method for transmitting files between a computer and an embedded terminal according to claim 2, characterized in that: In step S2, the data block content is converted into a more concise and intuitive data fingerprint, and the fingerprint value is compared with the stored preset block fingerprint value to see if they are the same. A hash function is used to execute the file similarity-based sampling deletion index algorithm, and a hash table mapping index structure for file data block comparison is constructed to sort the Hash fingerprint values of the data block numbers and perform index duplication checking. The index item corresponding to each data block contains information on the file name, file location, and data offset, thereby completing duplicate data deletion.
4. The method for transmitting files between a computer and an embedded terminal according to claim 1, characterized in that: In the step S3, before performing data parallel encryption, encoding design is performed on the data according to the attribute distribution of the data in the embedded system. Based on the spatial position of the source node in the system, all terminal data in the system is collected, the transmission data is layered, and the data attribute encoding is determined based on the differential analysis of the transmission data.
5. The method for transmitting files between a computer and an embedded terminal according to claim 4, characterized in that: In step S3, the transmission file is encrypted in parallel based on the AES algorithm. Under the control of the algorithm, the length of the transmission data cannot exceed 128 bits. The transmitted file is sliced to obtain isomorphic group data of equal length, and the key length is increased step by step to gradually reduce the risk of data transmission. The file is divided into multiple blocks, and the size of each block can be determined according to actual needs and system resources to ensure that the size of each block is an integer multiple of the AES block size.
6. The method for transmitting files between a computer and an embedded terminal according to claim 5, characterized in that: The parallel encryption step in step S3 includes: S3.1, perform row shift operation on the data, based on the data frame replacement result, perform row shift operation on the data; S3.2, using the round function to perform round key encryption on the data, using the current round key to perform row shift replacement on the data bytes, and using the round function to perform round key encryption on the data; S3.
3. Each round key encryption will generate a new set of round keys until 9 round key encryption cycles are completed, and the ciphertext is output after the 10th encryption cycle; S3.4, perform round key encryption on the output ciphertext and plaintext at the same time to obtain the round key, use the current round key to perform reverse row and column shift confusion replacement on the data bytes, and complete the encryption process of the file; S3.
5. Send the encrypted file to the target location through a secure transmission channel.
7. The method for transmitting files between a computer and an embedded terminal according to claim 6, characterized in that: When encrypting the hierarchical data in step S3, the file is firstly scrambled to minimize the redundancy in the file message, and then the scrambled data information is diffused to cover up the statistical characteristics of the file data. In combination with the acquired hierarchical transmission differential value, a 64-bit ciphertext is set, and after the file is divided according to the transmission level, it is scrambled using the Feistel network structure, and the last 8 bits of information after the scrambling are used as the parameters of the odd check bit. In the transmission of each layer, the key is shifted and permuted and compressed into a 48-bit key, and the differential value is distributed as a scale in each level of data transmission, and diffusion processing is performed to realize hierarchical encryption processing of embedded terminal data.
8. The method for transmitting files between a computer and an embedded terminal according to claim 1, characterized in that: In the step S4, the information of lost files is collected to generate a lost file sequence, and at the same time, the information of unused file information areas and storage spaces that have never been used in the file system is collected, and the unused file information areas in the file system meta space and storage spaces that have never been used in the data space are collected. One file node information points to a lost file, among which the unused file information area is used first, the preset directory of the file system is linked to all newly generated file node information, and the attribute information of the file system is modified accordingly, the preset directory of the file system is output to show the location information of the lost file, and the corresponding file in the computer is retransmitted to the embedded terminal for recovery according to the location information.