Encrypted communication method and device based on microcomputer

By combining the segmentation and random combination of encrypted data, the problem of difficult implementation of encrypted communication in resource-constrained environments such as microcomputers is solved, efficient and secure encrypted communication is achieved, and dependence on hardware resources and computing capabilities is reduced.

CN119996087AActive Publication Date: 2025-05-13SHENZHEN CITY MAIDIJIE ELECTRONICS TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510465938.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-05-13
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

Existing encrypted communication methods are difficult to implement in resource-constrained environments such as microcomputers, and require strong computing power or complex hardware support.

Method used

By treating the segmentation and random combination of encrypted data, large-scale computing complexity and dependence on high-performance hardware are avoided. The specific steps include: dividing the data blocks according to the data length, further dividing them into sub-data blocks, randomly combining and sending them in a random order.

Benefits of technology

Efficient encrypted communication on devices with weak computing power enhances the unpredictability and security of data transmission and reduces dependence on hardware resources and computing power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996087A_ABST
    Figure CN119996087A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data encryption, and provides an encryption communication method and device based on a microcomputer, and the encryption communication method based on the microcomputer comprises the steps: obtaining to-be-encrypted data, carrying out the segmentation processing based on the current data length of the to-be-encrypted data, and obtaining a plurality of ordered to-be-encrypted data blocks; segmenting the Nth character position of each to-be-encrypted data block to obtain a first sub-data block and a second sub-data block corresponding to each to-be-encrypted data block; randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of pieces of target encrypted data; and sequentially sending the multiple pieces of target encrypted data to the target microcomputer according to a random sequence. According to the technical scheme, through an innovative encrypted data segmentation and random combination mode, the security and transmission efficiency of encrypted communication are effectively improved, and meanwhile, the dependence on hardware resources and computing power is also greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data encryption, and in particular relates to an encryption communication method and device based on a microcomputer. Background Art

[0002] With the rapid development of information technology, data security and communication encryption have become important topics in the field of modern communications. Among the numerous encryption communication methods, traditional encryption algorithms often have certain limitations, such as large consumption of computing resources, complex encryption process, and easy cracking of encryption keys. Especially on some devices with limited resources and weak computing power, traditional encryption algorithms often cannot be effectively applied, resulting in threats to the security of data transmission.

[0003] Microcomputers, as a computer system with strong processing power but small size and low power consumption, have been widely used in recent years. Microcomputers are widely used in scenarios such as smart devices, embedded systems, and the Internet of Things. They can perform various data processing tasks, but due to the limitation of hardware resources, microcomputers usually do not have strong computing power. Therefore, how to achieve efficient encrypted communication on microcomputers has become a key issue to improve the security of data transmission.

[0004] Although some existing encryption communication methods can effectively realize data encryption, they often require strong computing power or complex hardware support, which makes them difficult to implement in resource-constrained environments such as microcomputers. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a microcomputer-based encryption communication method and device to solve the technical problem that some existing encryption communication methods can effectively realize data encryption but often require strong computing power or complex hardware support.

[0006] A first aspect of an embodiment of the present invention provides an encryption communication method based on a microcomputer, the encryption communication method based on a microcomputer comprising: Acquire the data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted to obtain multiple ordered data blocks to be encrypted; Perform segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; Randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; Multiple target encrypted data are sent to the target microcomputer in random order.

[0007] Furthermore, the step of obtaining the data to be encrypted and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted includes: Acquire the data to be encrypted, and extract the current data length of the data to be encrypted; Obtaining preset lengths mapped to different data lengths, and matching the target preset lengths corresponding to the data lengths; The data to be encrypted is divided based on the target preset length to obtain a plurality of data blocks to be encrypted.

[0008] Furthermore, the step of randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain the plurality of target encrypted data comprises: Randomly combining the plurality of first sub-data blocks and the plurality of second sub-data blocks to obtain a plurality of combined data blocks; wherein each of the combined data blocks includes a single first sub-data block and a single second sub-data block; Acquire sequence information corresponding to the first sub-data block and the second sub-data block in each of the combined data blocks; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block; Obfuscating the combined data block to obtain initial encrypted data; The initial encrypted data and sequence information corresponding to each combined data block are combined to obtain the target encrypted data.

[0009] Furthermore, the step of performing obfuscation processing on the combined data block to obtain initial encrypted data includes: Obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into an obfuscation function to obtain the initial encrypted data; The confusion function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the exclusive OR operation, Represents the modulo operation.

[0010] Furthermore, the step of sending the plurality of target encrypted data to the target microcomputer in a random order comprises: Combine multiple target encrypted data and random order to obtain data to be sent; Set a random order for multiple data to be sent; Based on the random order, the data to be sent are sent to the target microcomputer in descending order.

[0011] Furthermore, after the step of sending the plurality of target encrypted data to the target microcomputer in a random order, the method further includes: The target microcomputer receives the plurality of target encrypted data and determines the integrity of the plurality of target encrypted data according to the random sequence; The target microcomputer divides the target encrypted data into initial encrypted data and sequence information; The target microcomputer performs a deobfuscation process on the initial encrypted data to obtain a combined data block; The target microcomputer divides the combined data block into a first sub-data block and a second sub-data block; The target microcomputer combines the first data block and the second data block with the same sequence information according to the sequence information corresponding to the first data block and the second sub-data block, so as to obtain a data block to be encrypted; The target microcomputer combines the plurality of data blocks to be encrypted in sequence according to the sequence information of the first data block in each of the data blocks to be encrypted to obtain the data to be encrypted.

[0012] Furthermore, the step of performing a deobfuscation process on the initial encrypted data in the target microcomputer to obtain a combined data block includes: Obtaining a pre-stored encryption key, and inputting the initial encrypted data and the encryption key into a reverse obfuscation function to obtain the combined data block; The reverse obfuscation function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the exclusive OR operation, Represents the modulo operation.

[0013] A second aspect of an embodiment of the present invention provides an encryption communication device based on a microcomputer, comprising: An acquisition unit, used for acquiring the data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; A segmentation unit, used for performing segmentation processing at the Nth character position of each data block to be encrypted, to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; A combining unit, used for randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; The communication unit is used to send multiple target encrypted data to the target microcomputer in a random order.

[0014] The third aspect of an embodiment of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the microcomputer-based encryption communication method described in the first aspect are implemented.

[0015] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in the microcomputer-based encryption communication method described in the first aspect.

[0016] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: traditional encryption communication methods usually require strong computing power or complex hardware support, especially in low-power devices such as microcomputers, and the implementation of these methods is often limited by performance and hardware resources. However, this solution avoids the reliance on large-scale computing complexity and high-performance hardware by segmenting and randomly combining the data to be encrypted, and can achieve efficient encryption communication on devices with weak computing power. The technical solution first segments the data to be encrypted based on the current data length to obtain multiple ordered data blocks, and then further segments each data block to generate multiple sub-data blocks. By randomly combining multiple first data blocks and second data blocks and sending them in a random order, the unpredictability and security of data transmission are enhanced. This data scrambling and random combination method effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of multiple target encrypted data blocks and transmitted in a random order, this method has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness and segmentation method of the data blocks, it is difficult for the attacker to recover the original data, thereby improving the overall communication security. This technical solution is particularly suitable for low-power devices such as microcomputers. When the resources of a microcomputer are limited, the computing burden can be effectively dispersed by cutting and randomly combining data in blocks, so that the consumption of computing resources in the encryption communication process is kept within a reasonable range, thereby not affecting the overall performance of the device. The segmentation and combination method in this solution is modular, and the granularity of data segmentation and the encryption combination method can be adjusted according to the needs of actual application scenarios. This flexible design enables the solution to be widely used in various microcomputer network environments that require encrypted communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. In general, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication through innovative encrypted data segmentation and random combination methods, but also greatly reduces the dependence on hardware resources and computing power, enabling microcomputers to efficiently and securely perform encrypted data transmission in complex communication environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A schematic flow chart of a microcomputer-based encryption communication method provided by the present invention is shown; Figure 2 A schematic diagram of an encryption communication device based on a microcomputer provided by an embodiment of the present invention is shown; Figure 3 A schematic diagram of a terminal device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0020] The embodiment of the present invention provides a microcomputer-based encryption communication method and device to solve the technical problem that some existing encryption communication methods can effectively realize data encryption but often require strong computing power or complex hardware support.

[0021] First, the present invention provides an encryption communication method based on a microcomputer. Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of a microcomputer-based encryption communication method provided by the present invention. Figure 1 As shown, the microcomputer-based encryption communication method may include the following steps: Step 101: obtaining data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; The system obtains the data to be encrypted, including but not limited to files, messages, or any other type of data. Next, the system divides the data into fixed-size blocks according to the length of the data. These divided data blocks are kept in order so that the order of the data can be maintained in subsequent steps. The size of the data block can be adjusted according to specific design requirements. Among them, the specific division logic of the data to be encrypted is as follows: Specifically, step 101 specifically includes steps 1011 to 1013: Step 1011: Acquire the data to be encrypted, and extract the current data length of the data to be encrypted; In this step, the system first obtains the data to be encrypted, which can be any type of data (such as files, messages, transmission streams, etc.). Then, the system extracts the length of the data, that is, the total number of bytes of the data. This length is the basis for the subsequent segmentation process, because the system needs to know how to decide how to segment the data based on the length.

[0022] Step 1012: Obtain preset lengths mapped to different data lengths, and match the target preset lengths corresponding to the data lengths; The key to this stage is the introduction of preset length mapping, which means that different lengths of data to be encrypted will have different segmentation strategies. The system maintains a preset length mapping table (which may be hard-coded or information in the configuration file), and it will select a corresponding "target preset length" as the segmentation standard based on the length of the current data.

[0023] The target preset length is a preset constant used to determine the size of the data block. The selection of the preset length may be based on multiple factors, such as the requirements of the encryption algorithm, the transmission bandwidth limitation, the type of data content, etc.

[0024] For example: Suppose a mapping rule is set: "The data length is between 0 and 1000 bytes, and the target preset length is 100 bytes; The data length is between 1001-5000 bytes, and the target preset length is 500 bytes; If the data length is greater than 5000 bytes, select the target preset length as 1000 bytes; If the length of the data to be encrypted is 500 bytes, the system will select the target preset length as 100 bytes; If it is 2000 bytes, select the target preset length as 500 bytes" Step 1013: Divide the data to be encrypted based on the target preset length to obtain a plurality of data blocks to be encrypted.

[0025] According to the target preset length matched in the previous step, the system divides the data to be encrypted into multiple data blocks according to the length. The length of each data block will correspond to the target preset length. If the length of the data to be encrypted cannot completely divide the target preset length, the last data block may contain the remaining part.

[0026] For example: if the target preset length is 100 bytes, and the length of the data to be encrypted is 500 bytes, the system will split the data into 5 100-byte blocks. If the length of the data is 550 bytes, the system will split it into 5 100-byte blocks, and the remaining 50 bytes will be used as the last block.

[0027] In the embodiment corresponding to step 1011 to step 1013, during the data segmentation process, by matching the target preset length, the structure of each data block to be encrypted is ensured to be unified, and the redundancy or deviation in the length of the data block is reduced. This precise segmentation method increases the complexity of the encryption algorithm and enhances the randomness of the data block, thereby effectively improving the overall encryption security. Even if the attacker attempts to analyze or recover the data, the randomness of the data segmentation and the application of the preset length greatly increase the difficulty of cracking it. By mapping different data lengths with preset lengths, the technical solution can adapt to the encryption requirements in a variety of different scenarios. No matter how long the data to be encrypted is, the system can reasonably segment according to the preset mapping rules. This flexibility is particularly suitable for various types of devices or network environments, and can be widely used in communication requirements of various data volumes, ensuring that encrypted communication can remain efficient and stable under various conditions. Unlike the traditional fixed-length segmentation method, the technical solution dynamically adjusts the segmentation strategy according to the actual length of the data to be encrypted. By matching with the target preset length, excessive calculation and memory consumption can be avoided, making the data segmentation process more efficient. In addition, this dynamic segmentation method can also better adapt to data of different lengths, further improving the speed of the encryption and decryption process. In the segmented data blocks, since the size of each data block is optimized according to the target preset length, the storage and transmission efficiency of the data blocks is improved. A more uniform block size helps to improve the transmission efficiency of data in the network, reduce transmission delays or bandwidth waste caused by uneven or incompatible data transmission, and optimize the performance of the entire encrypted communication. In summary, this technical solution solves the security and performance problems caused by inconsistent data length in traditional encrypted communications by accurately mapping and segmenting the encrypted data, significantly improving the encryption efficiency, security and scope of application, especially in microcomputers and low-power devices in complex environments, and can provide a more stable and secure encryption communication solution.

[0028] Step 102: performing segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; Each data block to be encrypted will be divided into two sub-data blocks, respectively referred to as a "first sub-data block" and a "second sub-data block".

[0029] Step 103: randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; The purpose of this stage is to enhance security by obfuscating the original data. The system will randomly combine all the "first sub-data blocks" with all the "second sub-data blocks". The core of this process is to disrupt the structure of the data so that each "target encrypted data" is not directly derived from a certain original data block. The random combination process of the first data block and the second data block is as follows: Specifically, step 103 includes steps 1031 to 1034: Step 1031: randomly combining a plurality of first sub-data blocks and a plurality of second sub-data blocks to obtain a plurality of combined data blocks; wherein each of the combined data blocks includes a single first sub-data block and a single second sub-data block; The system will store the first sub-data block and the second sub-data block that were previously split separately. Then, the system will randomly combine these sub-data blocks to ensure that each combined data block consists of a first sub-data block and a second sub-data block. Through this random combination, the direct relationship between the original data can be disrupted, thereby increasing the unpredictability of the data.

[0030] For example, suppose there are three first sub-data blocks (such as ab, cd, ef) and three second sub-data blocks (such as gh, ij, kl). Through random combination, the following combined data blocks may be obtained: ab+gh; cd+ij; ef+kl. The combination process is random, so the content of each data block is disrupted, and the order of the original data cannot be directly inferred.

[0031] Step 1032: Obtaining sequence information corresponding to the first sub-data block and the second sub-data block in each of the combined data blocks; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block; In this step, the system adds sequence information to each sub-data block in the combined data block. The sequence information refers to the order of each sub-data block in the original data. For example, a first sub-data block may come from the first part of the original data, and a second sub-data block may come from the fifth part of the original data.

[0032] This order information is very important for the subsequent decryption process. The decryptor needs to know the position of each sub-block in the original data in order to restore it to the original data. The order information itself can also be part of the encryption to prevent the eavesdropper from inferring the order of the data.

[0033] Step 1033: Obfuscating the combined data block to obtain initial encrypted data; The system will perform obfuscation on each combined data block. The purpose of obfuscation is to further increase the complexity of the data so that even if an attacker obtains multiple combined data blocks, it is difficult to restore the original data. The specific logic of obfuscation is as follows: Specifically, step 1033 specifically includes: obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into an obfuscation function, and obtaining the initial encrypted data; The confusion function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the exclusive OR operation, Represents the modulo operation.

[0034] The obfuscation function confuses the combined data block through a preset XOR operation and a modulus operation, and further increases the obfuscation dimension through the first parameter and the second parameter, so that the obfuscated combined data block is difficult to crack. The above obfuscation function is an internal calculation logic, so it is difficult for an attacker to crack.

[0035] The pre-stored encryption key is an encryption key pre-stored between two microcomputers (set by the user or by communication interaction).

[0036] Step 1034: Combine the initial encrypted data and sequence information corresponding to each combined data block to obtain target encrypted data.

[0037] In this step, the system combines the initial encrypted data of each combined data block with its corresponding sequence information. This is done to ensure that when decrypted, the receiver can correctly restore the position of the data block based on the sequence information and restore it to the correct original order.

[0038] The final target encrypted data is a composite data composed of encrypted data and sequence information. When decrypting, the receiver will first extract the sequence information, then reconstruct the order of the data according to the information, and finally restore the original data.

[0039] In the embodiment corresponding to step 1031 to step 1034, by randomly combining multiple first sub-data blocks and multiple second sub-data blocks, the fixed structure and order of the original data are broken, and the randomness of the encrypted data is significantly enhanced. Each combined data block is composed of a single first sub-data block and a single second sub-data block, and its sequence information is extracted and processed separately, which further increases the complexity and unpredictability of the data. Even if the attacker has mastered part of the encrypted data, it is difficult to restore the original data through pattern recognition or other common attack methods, thereby greatly improving the security of the data. In the process of generating a combined data block, each data block corresponds to the sequence information of the first sub-data block and the second sub-data block. These sequence information identifies the position information of each sub-data block in the original data to be encrypted, ensuring that the original order of the data block can be accurately restored in the subsequent decryption process, avoiding information loss or confusion. This management of sequence information not only ensures the reversibility of the encryption and decryption process, but also improves the precise control of the order during data transmission. The initial encrypted data corresponding to each combined data block is combined with its sequence information to generate the final target encrypted data. This encryption method combined with sequential information allows the integrity of the original data to be restored based on the sequential information during the decryption process, even if the data is transmitted in a dispersed manner. This design not only ensures the security of encrypted communications, but also improves the accuracy of decryption, avoiding decryption failures caused by lost or disordered data blocks. In summary, this technical solution effectively improves the encryption strength, security, and anti-attack capabilities of data through random combination of data blocks, sequential information management, and obfuscation processing, while ensuring the accuracy and reliability of the decryption process.

[0040] Step 104: Send multiple target encrypted data to the target microcomputer in random order.

[0041] After the encrypted data is generated, the system will send multiple target encrypted data blocks to the target microcomputer in a certain random order. This operation further improves the security of the data transmission process, because the receiver cannot infer the content of the original data based on the order of the data. The specific sending process is as follows: Specifically, step 104 includes steps 1041 to 1043: Step 1041: setting a random order for a plurality of data to be sent; The system first sets a random order for the multiple encrypted data to be sent. This random order refers to the order in which the data blocks are sent during the transmission process. By randomizing the order in which these data are sent, attackers are prevented from inferring the content or structure of the data by analyzing the transmission order. The order of each transmission is different, which increases the unpredictability of the data. For example, if there are 5 target encrypted data (such as D1, D2, D3, D4, D5), the system will generate a random order, such as: [D3, D1, D5, D2, D4], which may be different each time it is sent.

[0042] Step 1042: Combine multiple target encrypted data and random order to obtain data to be sent; In this step, the system will combine the set random order with the target encrypted data to generate a complete set of data to be sent. Specifically, the system will combine each target encrypted data with its corresponding sequence information to form a new data structure. This ensures that the receiver can restore the correct order of the data based on the sequence information, and during the receiving process, the order in which the data is sent is controlled by the system instead of being exposed to the outside. Then, the system can prepare to send these target encrypted data in the random order just generated.

[0043] Step 1043: Based on the random order, the data to be sent are sent to the target microcomputer in descending order.

[0044] The purpose of sending the data to the target microcomputer in descending order is that the target microcomputer can know how much data to be sent is left to be received according to the descending order, so as to ensure the integrity of the data.

[0045] In the embodiment corresponding to step 1041 to step 1043, by setting a random order for multiple data to be sent, the potential security risks caused by a fixed order in data transmission are effectively avoided. Even if an attacker can intercept the encrypted data, since the order in which the data is sent is completely random, the attacker cannot rely on a known order to attack or reorganize the data. The application of this random order greatly improves the unpredictability and anti-attack ability of the data, and prevents common cracking methods such as sequential attacks and pattern recognition attacks. The data is sent to the target microcomputer in a random order, ensuring that any tampering during the data transmission process can be discovered in time. Because there is no fixed order for the data blocks during the transmission process, if the attacker attempts to tamper with the data or change the order, the original information cannot be effectively restored. This anti-tampering mechanism ensures that the integrity of the data can be effectively guaranteed even if some data packets are lost or attacked during the transmission process. After combining multiple target encrypted data with the random order, the data to be sent is generated and sent in order from large to small. This design avoids the risk of transmission attacks or data leakage caused by a fixed order during data transmission. This optimized sending order ensures the independence of each data block in network transmission, making it impossible for attackers to guess the content of the data or subsequent transmission behavior by analyzing the sending rules of the data packets, further improving the security and stability of the communication. This technical solution significantly improves the security, stability and anti-interference ability of data transmission by setting a random order for the data to be sent and sending it in an orderly manner based on the order. The random transmission of data not only increases the ability to prevent potential attacks, but also optimizes the resource consumption and efficiency during the transmission process. It is especially suitable for microcomputers and low-power device environments that require high security and high reliability.

[0046] In the embodiment corresponding to step 101 to step 104, by segmenting and randomly combining the data to be encrypted, the reliance on large-scale computational complexity and high-performance hardware is avoided, and efficient encrypted communication can be achieved on devices with weak computing power. The technical solution first segments the data to be encrypted based on the current data length to obtain multiple ordered data blocks, and then further segments each data block to generate multiple sub-data blocks. By randomly combining multiple first data blocks and second data blocks and sending them in a random order, the unpredictability and security in data transmission are enhanced. This data scrambling and random combination method effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of multiple target encrypted data blocks and transmitted in a random order, this method has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness and segmentation method of the data blocks, it is difficult for the attacker to recover the original data, thereby improving the overall communication security. The technical solution is particularly suitable for low-power devices such as microcomputers. In the case of limited resources of microcomputers, the computing burden can be effectively dispersed by cutting and randomly combining data in blocks, so that the consumption of computing resources in the encryption communication process is kept within a reasonable range, thereby not affecting the overall performance of the device. The segmentation and combination method in this scheme is modular, and the granularity of data segmentation and the encryption combination method can be adjusted according to the needs of actual application scenarios. This flexible design enables the scheme to be widely used in various microcomputer network environments that require encrypted communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. In general, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication through innovative encrypted data segmentation and random combination methods, but also greatly reduces the dependence on hardware resources and computing power, enabling microcomputers to efficiently and securely perform encrypted data transmission in complex communication environments.

[0047] As an optional embodiment of the present invention, after step 104, steps 105 to 110 are also included: Step 105: The target microcomputer receives a plurality of target encrypted data, and determines the integrity of the plurality of target encrypted data according to the random order; When receiving data, the target microcomputer first receives multiple target encrypted data. The order of these data is randomized when they are sent, so the receiver needs to confirm the integrity and order of these data. The target microcomputer reads the order information from large to small contained in these encrypted data (that is, the order in which the data is sent) to ensure that the data blocks can be decrypted and processed in the correct order.

[0048] Step 106: The target microcomputer divides the target encrypted data into initial encrypted data and sequence information; Step 107: the target microcomputer performs a deobfuscation process on the initial encrypted data to obtain a combined data block; Specifically, step 107 specifically includes: obtaining a pre-stored encryption key; Inputting the initial encrypted data into a reverse obfuscation function to obtain the combined data block; The reverse obfuscation function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the exclusive OR operation, Represents the modulo operation.

[0049] The reverse obfuscation function is the reverse process of the above obfuscation function, which will not be described here.

[0050] Step 108: The target microcomputer divides the combined data block into a first sub-data block and a second sub-data block; Step 109: The target microcomputer combines the first data block and the second data block with the same sequence information according to the sequence information corresponding to the first data block and the second sub-data block, to obtain a data block to be encrypted; Step 110: The target microcomputer combines the multiple data blocks to be encrypted in sequence according to the sequence information of the first data block in each of the data blocks to be encrypted to obtain the data to be encrypted.

[0051] In the embodiment corresponding to step 105 to step 110, the target microcomputer first sorts the received multiple target encrypted data according to a random order to ensure the integrity of the data. Since the data is sent in a random order during the transmission process, this step can effectively restore the original order of the data and detect whether there are any lost or tampered data packets. In this way, the target microcomputer can accurately verify the integrity of the data and provide a reliable basis for the subsequent decryption process. After receiving the target encrypted data, the target microcomputer divides it into initial encrypted data and sequence information, and then performs anti-obfuscation processing on the initial encrypted data. This processing step utilizes the obfuscation algorithm applied in the encryption process to successfully reverse the obfuscation effect of the data and restore the original combined data block. This process not only ensures that there is no loss of information during the transmission of the data, but also greatly improves the accuracy and effectiveness of the decryption process through effective anti-obfuscation operations. The target microcomputer divides the restored combined data block and extracts the first sub-data block and the second sub-data block therein. In addition, the target microcomputer correctly combines the first data block and the second data block of the same sequence information according to the sequence information, further ensuring the sequence and structural integrity of the data. This step enables the encrypted data to be completely and accurately restored to the data blocks to be encrypted. Using the sequence information obtained after segmentation, the target microcomputer can accurately combine the first sub-data block and the second sub-data block in each data block to be encrypted in the correct order. By combining multiple data blocks to be encrypted in sequence according to the sequence information, the target microcomputer can finally restore the original data to be encrypted. This process solves the problem of disordered order that may be faced in traditional decryption methods, ensures the accuracy of data recovery, and does not rely on a fixed order or structure. Since the sequence information of each data block is stored independently, and the target microcomputer can restore the correct order of the data blocks according to these sequence information, the entire decryption process is not affected by random disturbances or data packet loss in network transmission. Even in an unstable communication environment, the integrity and accuracy of the data can still be guaranteed. This method not only improves the robustness of the decryption process, but also enhances the flexibility and fault tolerance of the decryption system. The target microcomputer avoids the need for large-scale calculations in traditional decryption methods by first segmenting the target encrypted data into initial encrypted data and sequence information, and then deobfuscating the initial encrypted data and restoring the sequence information. This step-by-step approach effectively reduces the demand for computing resources, making the decryption process more efficient and suitable for resource-constrained scenarios such as microcomputers and low-power devices.

[0052] like Figure 2 The present invention provides an encryption communication device based on a microcomputer, see Figure 2 , Figure 2A schematic diagram of a microcomputer-based encryption communication device provided by the present invention is shown, Figure 2 The microcomputer-based encryption communication device includes: The acquisition unit 21 is used to acquire the data to be encrypted, and to perform segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; A segmentation unit 22, configured to perform segmentation processing at the Nth character position of each data block to be encrypted, to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; A combining unit 23, used for randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; The communication unit 24 is used to send a plurality of target encrypted data to the target microcomputer in sequence according to a random order.

[0053] The present invention provides an encryption communication device based on a microcomputer, which avoids the reliance on large-scale computing complexity and high-performance hardware by segmenting and randomly combining data to be encrypted, and can realize efficient encryption communication on devices with weak computing power. The technical solution first segments the data to be encrypted based on the current data length to obtain multiple ordered data blocks, and then further segments each data block to generate multiple sub-data blocks. By randomly combining multiple first data blocks and second data blocks and sending them in a random order, the unpredictability and security in data transmission are enhanced. This data scrambling and random combination method effectively prevents conventional encryption algorithm cracking methods, such as pattern recognition attacks. Since the encrypted data is sent in the form of multiple target encrypted data blocks and transmitted in a random order, this method has obvious advantages in resisting network interference and improving the reliability of data transmission. Even if some data packets are lost or attacked during transmission, due to the randomness and segmentation method of the data blocks, it is difficult for the attacker to recover the original data, thereby improving the overall communication security. The technical solution is particularly suitable for low-power devices such as microcomputers. In the case of limited resources of microcomputers, the computing burden can be effectively dispersed by cutting and randomly combining data in blocks, so that the consumption of computing resources in the encryption communication process is kept within a reasonable range, thereby not affecting the overall performance of the device. The segmentation and combination method in this scheme is modular, and the granularity of data segmentation and the encryption combination method can be adjusted according to the needs of actual application scenarios. This flexible design enables the scheme to be widely used in various microcomputer network environments that require encrypted communication, including Internet of Things devices, smart hardware, and other low-power computing platforms. In general, this technical solution not only effectively improves the security and transmission efficiency of encrypted communication through innovative encrypted data segmentation and random combination methods, but also greatly reduces the dependence on hardware resources and computing power, enabling microcomputers to efficiently and securely perform encrypted data transmission in complex communication environments.

[0054] Figure 3 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 3 As shown, a terminal device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as an encryption communication program based on a microcomputer. When the processor 30 executes the computer program 32, the steps in the above-mentioned embodiments of the encryption communication method based on a microcomputer are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each unit in the above-mentioned device embodiments are realized, for example, Figure 2 Function of the unit shown.

[0055] Exemplarily, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to complete the present invention. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the computer program 32 may be divided into the following specific functions of each unit: An acquisition unit, used for acquiring the data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; A segmentation unit, used for performing segmentation processing at the Nth character position of each data block to be encrypted, to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; A combining unit, used for randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; The communication unit is used to send multiple target encrypted data to the target microcomputer in a random order.

[0056] The terminal device includes but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of a terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0057] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0058] The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 31 is used to store the computer program and other programs and data required by the roaming control device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0059] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0060] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0061] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0062] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0063] An embodiment of the present invention provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0064] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0065] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0066] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0067] In the embodiments provided by the present invention, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed over multiple network units.

[0069] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0070] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0071] As used in the present specification and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to monitoring, depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is monitored" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is monitored" or "in response to monitoring [described condition or event]", depending on the context.

[0072] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0073] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0074] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A microcomputer-based encryption communication method, characterized in that: The microcomputer-based encryption communication method comprises: Acquire the data to be encrypted, and perform segmentation processing based on the current data length of the data to be encrypted to obtain multiple ordered data blocks to be encrypted; Perform segmentation processing at the Nth character position of each data block to be encrypted to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; Randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; Multiple target encrypted data are sent to the target microcomputer in random order.

2. The microcomputer-based encryption communication method according to claim 1, characterized in that: The step of obtaining the data to be encrypted and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted includes: Acquire the data to be encrypted, and extract the current data length of the data to be encrypted; Obtaining preset lengths mapped to different data lengths, and matching the target preset lengths corresponding to the data lengths; The data to be encrypted is divided based on the target preset length to obtain a plurality of data blocks to be encrypted.

3. The microcomputer-based encryption communication method according to claim 1, characterized in that: The step of randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain the plurality of target encrypted data comprises: Randomly combining the plurality of first sub-data blocks and the plurality of second sub-data blocks to obtain a plurality of combined data blocks; wherein each of the combined data blocks includes a single first sub-data block and a single second sub-data block; Acquire sequence information corresponding to the first sub-data block and the second sub-data block in each of the combined data blocks; the sequence information refers to the sequence of the data to be encrypted corresponding to the first sub-data block or the second sub-data block; Obfuscating the combined data block to obtain initial encrypted data; The initial encrypted data and sequence information corresponding to each combined data block are combined to obtain the target encrypted data.

4. The microcomputer-based encryption communication method according to claim 3, characterized in that: The step of performing obfuscation processing on the combined data block to obtain initial encrypted data comprises: Obtaining a pre-stored encryption key, inputting the combined data block and the encryption key into an obfuscation function to obtain the initial encrypted data; The confusion function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the XOR operation, Represents the modulo operation.

5. The microcomputer-based encryption communication method according to claim 1, characterized in that: The step of sending the plurality of target encrypted data to the target microcomputer in random order comprises: Set a random order for multiple data to be sent; Combine multiple target encrypted data and random order to obtain data to be sent; Based on the random order, the data to be sent are sent to the target microcomputer in descending order.

6. The microcomputer-based encryption communication method according to claim 5, characterized in that: After the step of sending the plurality of target encrypted data to the target microcomputer in random order, the method further comprises: The target microcomputer receives the plurality of target encrypted data and determines the integrity of the plurality of target encrypted data according to the random sequence; The target microcomputer divides the target encrypted data into initial encrypted data and sequence information; The target microcomputer performs a deobfuscation process on the initial encrypted data to obtain a combined data block; The target microcomputer divides the combined data block into a first sub-data block and a second sub-data block; The target microcomputer combines the first data block and the second data block with the same sequence information according to the sequence information corresponding to the first data block and the second sub-data block, so as to obtain a data block to be encrypted; The target microcomputer combines the plurality of data blocks to be encrypted in sequence according to the sequence information of the first data block in each of the data blocks to be encrypted to obtain the data to be encrypted.

7. The microcomputer-based encryption communication method according to claim 6, characterized in that: The step of performing a deobfuscation process on the target microcomputer to obtain a combined data block comprises: Obtaining a pre-stored encryption key, and inputting the initial encrypted data and the encryption key into a reverse obfuscation function to obtain the combined data block; The reverse obfuscation function is: , in, Represents the initial encrypted data, Represents a combined data block, Represents the encryption key, Represents the first parameter, Represents the second parameter, represents the XOR operation, Represents the modulo operation.

8. A microcomputer-based encryption communication device, characterized in that: The microcomputer-based encryption communication device comprises: An acquisition unit, used for acquiring the data to be encrypted, and performing segmentation processing based on the current data length of the data to be encrypted to obtain a plurality of ordered data blocks to be encrypted; A segmentation unit, used for performing segmentation processing at the Nth character position of each data block to be encrypted, to obtain a first sub-data block and a second sub-data block corresponding to each data block to be encrypted; A combining unit, used for randomly combining the plurality of first data blocks and the plurality of second data blocks to obtain a plurality of target encrypted data; The communication unit is used to send multiple target encrypted data to the target microcomputer in a random order.

9. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a microcomputer-based encryption communication program stored in the memory and executable on the processor, wherein the microcomputer-based encryption communication program is configured to implement the steps in the microcomputer-based encryption communication method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the microcomputer-based encryption communication method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Network security protection method for converged media platform

    CN116318889A

  • Information security management and control method and device based on wireless network equipment

    CN117221878A

  • Data privacy security encryption method and system for communication operator

    CN119052783A

  • Calculation method and system for information security

    CN119691780A

  • Data encryption and decryption method, device and equipment

    CN119728273A