Communication data transmission and temporary storage method and device and storage medium
By blocking, weighted sorting and encrypting the data, the security and integrity of large-scale data transmission are ensured, the problems of insufficient security and efficiency in the data transmission process in the prior art are solved, and efficient and reliable Data transmission and storage.
Patent Information
- Application Number
- CN202411437459.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art has insufficient security, transmission efficiency and data integrity in large-scale data transmission, making it difficult to deal with security threats and inefficient data processing in complex network environments, and improper temporary storage management leads to data loss and resource waste.
By receiving and analyzing the initial data, chunking and temporarily storing it in the cache area, calculating the weighting coefficients according to the characteristics of the data blocks for priority sorting, selecting the appropriate encryption algorithm for encryption processing, and transmitting it to the target end through a secure transmission protocol, and decrypting the target end at the target end. And verify the data integrity, and finally reorganize and store it in the original order after the transmission is completed.
Ensures security and integrity during data transmission, improves transmission efficiency and resource management, avoids data loss and resource waste, and is suitable for communication systems with high security and high data integrity.
Smart Images

Figure CN119299393A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a communication data transmission and temporary storage method, device and storage medium. Background Art
[0002] In modern communication systems, efficient transmission and secure storage of data are key to ensuring the normal operation of network applications and services. However, as the scale of data transmission continues to expand and become more complex, traditional communication data processing methods face many challenges. First, when dealing with large-scale data transmission, existing technologies often lack effective protection for the security and integrity of data transmission. Although some methods use basic encryption measures, these measures are often difficult to cope with the increasingly complex network environment and potential security threats, especially the risk of man-in-the-middle attacks, data tampering or loss during data transmission.
[0003] In addition, traditional data transmission methods have deficiencies in the management and processing of data blocks, especially when facing dynamically changing network conditions, which often makes it difficult to effectively cope with them. This leads to problems such as disordered data block transmission order, low processing efficiency, and data loss. At the same time, the existing technology lacks flexibility in the processing of data of different priorities during data transmission, and cannot perform intelligent scheduling based on network conditions and data importance, which in turn affects the overall transmission efficiency and real-time data processing.
[0004] For large-scale data transmission, existing methods also have problems in coordinating temporary storage and final storage. Often due to improper management of temporary storage areas, data blocks are incorrectly processed or cannot be cleaned up in time during transmission, which in turn affects the overall performance of the system. Existing technologies lack dynamic management and real-time verification mechanisms for data blocks, making it difficult to ensure data integrity and consistency during data transmission.
[0005] In summary, the existing technology has obvious deficiencies in security, transmission efficiency and data integrity when processing large-scale data transmission. There is an urgent need for an improved method to overcome these shortcomings and provide a more efficient, secure and reliable communication data transmission and temporary storage solution. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a method, device and storage medium for communication data transmission and temporary storage, which solves the problems of insufficient security, transmission efficiency and data integrity in the existing communication data transmission process.
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: a communication data transmission and temporary storage method, comprising the following steps: Receive and parse the initial data, divide the data into blocks according to a predetermined strategy, and temporarily store the data blocks in a buffer area; Calculate weighted coefficients based on the characteristics of data blocks and prioritize the data blocks; Selecting a suitable data block for encryption processing according to the sorting result, wherein the encryption processing includes encrypting the data block using a symmetric encryption algorithm and encrypting the symmetric key using an asymmetric encryption algorithm; The encrypted data block is transmitted to the target end through the preset secure transmission protocol; Decrypt the received data blocks at the target end and verify the integrity of the data based on the transmission verification information; The successfully decrypted and verified data blocks are temporarily stored in the temporary storage area until all data blocks are transmitted; After the transfer is complete, the data blocks are reassembled in their original order and stored in the target storage device.
[0008] Preferably, the steps of receiving and parsing the initial data, dividing the data into blocks according to a predetermined strategy, and temporarily storing the data blocks in a buffer area include: Receive the initial data stream from the source, parse the data stream using the preset communication protocol, and extract each data unit; Based on the attribute information of the data unit, determine the type and size of the data unit, establish the metadata index of the data unit, and ensure the traceability and integrity of the data in the subsequent processing process; Blocking the parsed data units according to a predetermined block strategy, wherein the block strategy includes but is not limited to dynamic adjustment based on the size, type, priority or load of the transmission path of the data unit; Mark the divided data blocks as pending and store them in the buffer area; When the data block is stored in the cache, the corresponding check code and metadata are generated and stored for subsequent integrity verification and sequence reorganization.
[0009] Preferably, the step of calculating weighted coefficients based on characteristics of the data blocks and prioritizing the data blocks comprises: Extracting key attribute information according to the characteristics of each data block, the key attribute information including but not limited to the size, data type, timestamp, expected delay of the transmission path, and source or destination of the data block; Assign a predetermined weight to each key attribute information, and the weight value is dynamically adjusted according to the current state of the communication network and business needs to ensure flexible adaptability in different scenarios; Calculate the weighted coefficient of each data block, where the weighted coefficient is obtained by multiplying each key attribute information by the corresponding weight and performing weighted average; According to the calculated weighted coefficients, all data blocks to be processed are prioritized from high to low priority, and a corresponding priority list is generated; The sorted data blocks are marked as pending in priority order, ready to enter the subsequent transmission or storage processing stage.
[0010] Preferably, the step of selecting a suitable data block for encryption processing according to the sorting result includes: According to the priority sorting list, the data blocks to be processed are selected in order from high priority to low priority; Determine a suitable encryption algorithm for each selected data block, wherein the encryption algorithm is selected based on the sensitivity of the data block, transmission security requirements, and computing resource conditions, including but not limited to symmetric encryption algorithms and asymmetric encryption algorithms; Perform encryption processing on the selected data block, first encrypt the data block content by using the selected symmetric encryption algorithm to generate a ciphertext data block; For key management, the generated symmetric key is encrypted by an asymmetric encryption algorithm to ensure the security of the key during transmission, and the encrypted key is attached to the corresponding ciphertext data block; The encrypted data blocks and their encryption keys are rearranged in order of priority and marked as encrypted, ready for subsequent transmission or storage.
[0011] Preferably, the encryption process further includes generating a message authentication code for the data block and appending it to the end of the data block to ensure the integrity of the data during transmission, specifically including the following steps: After completing the encryption process of the data block, select a set of applicable message authentication code algorithms for each encrypted data block, wherein the algorithm is selected based on the type of data block and security requirements, including but not limited to HMAC or CMAC; Process the encrypted data block using the selected MAC algorithm to generate a corresponding message authentication code; The generated message authentication code is appended to the end of the corresponding encrypted data block, and the metadata of the data block is updated to record information such as the algorithm type and length of the MAC; The encrypted data block with MAC attached is marked for integrity, and the integrity status of the current data block is recorded in its metadata; The data block with MAC attached is marked as having completed encryption and integrity protection, ready for subsequent transmission processing.
[0012] Preferably, the step of decrypting the received data block at the target end and verifying the integrity of the data based on the transmission verification information includes: After the target end receives the transmitted data block, it first extracts the encrypted symmetric key from the data block and decrypts it using the target end's private key to obtain the original symmetric key; Use the decrypted symmetric key to decrypt the received ciphertext data block and restore the original data block content; Extract the attached message authentication code from the decrypted data block, and regenerate the MAC of the data block using the shared key and the corresponding MAC algorithm stored on the target end for integrity verification; Compare the MAC in the received data block with the MAC regenerated by the target end to verify whether the data block maintains integrity during transmission. If the two are consistent, it is determined that the data block has not been tampered with; Based on the MAC verification result, the data block is marked as passed or failed integrity check. If it passes the check, the data block is marked as successfully decrypted and complete, ready to enter the next storage or processing stage. If it fails, the corresponding error handling mechanism is triggered.
[0013] Preferably, the step of temporarily storing the successfully decrypted and verified data blocks in a temporary storage area until all data blocks are transmitted includes: After the target end successfully decrypts and verifies the data block through integrity verification, a temporary storage area address is allocated for the data block; Write the decrypted and verified data blocks into the temporary storage area in the order of decryption, and record the metadata of each data block, including the data block sequence number, decryption status, verification result and temporary storage area address; After the data blocks are written to the temporary storage area, the progress of data transmission is continuously monitored to determine whether all expected data blocks have been successfully received, decrypted and verified; If there are still data blocks that have not been received or have not passed verification, the stored data blocks are retained in a temporary storage area, waiting for the transmission and processing of subsequent data blocks to ensure the integrity and correct order of the data blocks; After confirming that all data blocks have been successfully received, decrypted and verified, the data reassembly and subsequent processing procedures are triggered to extract the data blocks from the temporary storage area in sequence and reassemble them into a complete data set, ready to enter the final storage or further processing stage.
[0014] Preferably, after the data block transmission is completed, the data blocks in the temporary storage area are automatically cleared to release storage space after being reorganized and stored in the target storage device.
[0015] The present invention also provides a communication data transmission and temporary storage device, comprising: A data receiving module is used to receive and parse the initial data, divide the data into blocks and temporarily store them in a buffer area; A priority sorting module is used to calculate the weight coefficients of data blocks and perform priority sorting; An encryption module, used for encrypting the data blocks selected after the priority sorting, including encrypting the data blocks using a symmetric encryption algorithm and encrypting the symmetric key using an asymmetric encryption algorithm; A transmission module, used for transmitting the encrypted data block to the target end through a secure transmission protocol; A decryption and verification module, used to decrypt the data block at the target end and verify the integrity of the data based on the transmission verification information; A temporary storage module, used for temporarily storing the successfully decrypted and verified data blocks in a temporary storage area; The reorganization and storage module is used to reorganize the data blocks in the original order and store them in the target storage device after the transmission is completed.
[0016] The present invention also provides a computer device, comprising 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 above method is implemented.
[0017] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0018] The present invention provides a communication data transmission and temporary storage method, device and storage medium. It has the following beneficial effects: 1. The present invention ensures the security of data during transmission and the integrity of data after reception by encrypting the transmitted data blocks and decrypting and verifying the integrity of the received data at the target end. This method effectively prevents data from being intercepted and tampered with during transmission, thereby ensuring the reliability and security of data transmission.
[0019] 2. The present invention not only ensures the orderliness of data by temporarily storing data blocks in a temporary storage area and reorganizing them in the original order after all data blocks are transmitted, but also effectively manages storage space and avoids waste of resources by automatically cleaning up the temporary storage area of stored data blocks.
[0020] 3. The present invention can flexibly process data blocks according to network conditions and data types by dynamically adjusting the encryption algorithm and priority sorting of data blocks, thereby improving the efficiency of data processing. At the same time, this method has high scalability, is easy to adjust and optimize according to different application requirements, and is suitable for a variety of data transmission and storage scenarios.
[0021] 4. The present invention effectively improves data security and system efficiency by finely managing the encryption, transmission, verification and storage processes of data blocks, while optimizing the use of resources, making data processing more efficient and secure, and having significant advantages in data transmission security and efficiency. It is particularly suitable for communication systems that require high security and high data integrity. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 It is a schematic diagram of the structure of the device of the present invention; Figure 3 It is a schematic diagram of the computer device structure of the present invention.
[0023] Among them, 100, data receiving module; 200, priority sorting module; 300, encryption module; 400, transmission module; 500, decryption and verification module; 600, temporary storage module; 700, reorganization and storage module; 40, computer equipment; 41, processor; 42, memory; 43, storage medium. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the specification 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.
[0025] Please see attached Figure 1 The embodiment of the present invention provides a communication data transmission and temporary storage method, comprising the following steps: S1, receive and parse the initial data, divide the data into blocks according to the predetermined strategy, and temporarily store the data blocks in the cache For step S1, it is necessary to first receive and parse the initial data transmitted from the source. In order to ensure that the subsequent segmentation, storage and transmission can be carried out efficiently and safely, the system must first accurately parse the initial data and extract the key information in the data. Then, the data is reasonably segmented according to the pre-set strategy to meet the needs of network transmission, and these segmented data blocks are temporarily stored in the buffer area for subsequent processing.
[0026] In this embodiment, the specific implementation of S1 is as follows: 1. Receive the initial data stream from the source. The system receives and initially analyzes the data stream through the defined communication protocol to ensure the accuracy and integrity of data transmission. The communication protocol used can include TCP / IP, UDP or other custom protocols. The most appropriate protocol is selected based on the application scenario and data transmission requirements.
[0027] 2. The system parses the received data stream using the preset communication protocol and extracts the individual data units. These data units can be part of a file, a message fragment, or part of a multimedia data stream. During the parsing process, the system will check the integrity of the data and extract necessary metadata, such as timestamp, data source, destination, data type, etc.
[0028] 3. Based on the attribute information of each data unit (such as size, type, priority, etc.), the system further determines the characteristics of the data unit and creates a metadata index for each data unit. The creation of the metadata index ensures that all data units can be effectively tracked and retrieved during subsequent processing, and ensures the integrity and consistency of the data in the entire processing chain.
[0029] 4. Block the parsed data units according to the predetermined block strategy. The block strategy can be adjusted dynamically, and flexible block operations are performed based on factors such as the size, type, priority, or load of the current transmission path of the data unit. The purpose of block division is to adapt the size of the data block to the bandwidth and delay characteristics of the network transmission, while ensuring that high-priority data can be processed and transmitted in a timely manner.
[0030] 5. Mark the divided data blocks as pending and temporarily store them in the cache. The cache is designed with efficient access requirements in mind, and usually uses high-speed storage devices such as DRAM or SSD to ensure that the data blocks can be quickly accessed by subsequent processing modules.
[0031] 6. When the data block is stored in the cache, the system will also generate and store the corresponding data check code and metadata. The check code is generated based on commonly used check algorithms, such as CRC or MD5, for subsequent data integrity verification. The metadata includes the index of the data block, block strategy information, and sequence information, etc., to ensure that the original data can be accurately restored during the data reorganization phase.
[0032] Through the above steps, the system lays the foundation for the secure and complete transmission of data in the initial stage, and is fully prepared for subsequent encryption, transmission and storage links.
[0033] S2. Calculate the weighted coefficient based on the characteristics of the data block and prioritize the data blocks For step S2, after completing the initial data segmentation and caching, it is necessary to further evaluate the importance and urgency of each data block. The purpose of this step is to optimize the efficiency of data transmission and ensure that high-priority data can be processed and transmitted first. To achieve this goal, the system needs to calculate the weighting coefficient based on the characteristics of each data block and prioritize the data blocks accordingly.
[0034] In this embodiment, the specific implementation of step S2 is as follows: 1. First, extract key attribute information based on the characteristics of each data block. This key attribute information includes but is not limited to the size of the data block, data type, timestamp of generation or reception, expected transmission path delay, and source or destination of the data block. The purpose of extracting this attribute information is to fully understand the characteristics of each data block so that the subsequent weighted calculation is more accurate.
[0035] 2. Next, a predetermined weight is assigned to each key attribute information. The weight setting is dynamically adjusted based on the current state of the communication network (such as network congestion, bandwidth utilization, etc.) and specific business needs. For example, in a real-time video streaming scenario, timestamps and transmission path delays may be given higher weights, while in a file transfer scenario, the size and data type of the data block may be more important. By dynamically adjusting the weight value, the system can adapt to changes in demand in different scenarios and ensure the flexibility and efficiency of data transmission.
[0036] 3. Then, calculate the weighted coefficient of each data block. The weighted coefficient is calculated by multiplying each key attribute information with the corresponding weight and taking the weighted average. The specific calculation formula is:
[0037] in, Indicates The weighting coefficient of each data block, Indicates The first data block attribute values, Indicates The weight of the attribute, is the total number of attributes. This calculation step ensures that the priority of each data block can be comprehensively evaluated based on its multi-dimensional characteristics.
[0038] 4. Then, all the data blocks to be processed are prioritized according to the calculated weighted coefficients. The sorting results are arranged from high to low to generate a priority list. This list will serve as the basis for the subsequent processing stage. High-priority data blocks will be encrypted and transmitted first in the subsequent steps to ensure that important data can reach the target end in time.
[0039] 5. Finally, the sorted data blocks are marked as pending in priority order, ready to enter the subsequent encryption processing or transmission stage. In this way, the system can maximize the efficiency and reliability of data transmission under limited network resources.
[0040] S3. Select appropriate data blocks for encryption based on the sorting results. For step S3, after completing the priority sorting of the data blocks, the next step is to select the appropriate data blocks for encryption processing based on the sorting results. The purpose of encryption processing is to ensure that the data is not stolen or tampered with by unauthorized third parties during transmission. This step not only considers the priority of the data block, but also combines the sensitivity of the data, the transmission security requirements and the current computing resource status to select the most appropriate encryption algorithm to ensure a balance between data security and system performance.
[0041] In this embodiment, the specific implementation of step S3 is as follows: 1. First, according to the priority list, the data blocks to be processed are selected from high priority to low priority. This selection process is strictly carried out according to the priority list to ensure that the most important or urgent data blocks can be processed first, thereby obtaining higher security and transmission priority during the transmission process.
[0042] 2. Next, determine the appropriate encryption algorithm for each selected data block. The selection of encryption algorithms is based on multiple factors, including the sensitivity of the data block (such as whether it contains personal privacy or commercial secrets), transmission security requirements (such as whether it is necessary to prevent man-in-the-middle attacks or replay attacks), and the current system's computing resources (such as processor load and available memory, etc.). Commonly used encryption algorithms include symmetric encryption algorithms (such as AES, DES) and asymmetric encryption algorithms (such as RSA, ECC). In some cases, a hybrid encryption strategy may also be adopted to take full advantage of the advantages of both algorithms.
[0043] 3. Then, the selected data block is encrypted. First, the content of the data block is encrypted by the selected symmetric encryption algorithm to generate a ciphertext data block. Symmetric encryption algorithms are suitable for encrypting the content of most data blocks due to their high efficiency and can process large amounts of data in a short time.
[0044] 4. For key management, the system encrypts the generated symmetric key through an asymmetric encryption algorithm. This is done to ensure the security of the key during transmission, because the public key and private key mechanism of the asymmetric encryption algorithm can effectively prevent key leakage. The encrypted key will be attached to the corresponding ciphertext data block to ensure that the receiver can correctly restore the original key and perform the decryption operation when decrypting the data block.
[0045] 5. Finally, the encrypted data blocks and their encryption keys are rearranged in order of priority and marked as encrypted. The purpose of this step is to prepare for subsequent transmission or storage. The system will complete the transmission of these data blocks as soon as possible based on the priority of the encrypted data blocks, provided that resources permit, to ensure that the data reaches the destination safely in the shortest possible time.
[0046] Through the above steps, the system can not only effectively protect the security of data transmission, but also ensure the best transmission efficiency and security in various scenarios through priority management and flexible encryption algorithm selection.
[0047] In step S3, in addition to selecting the appropriate data block for encryption, it is also necessary to further ensure the integrity and security of the data block during transmission. To this end, after the data block is encrypted, the system will also generate a message authentication code (MAC) for it and append the authentication code to the end of the data block. This process not only enhances the confidentiality of the data, but also prevents the data from being tampered with during transmission through the integrity verification mechanism, thereby further improving the security and reliability of the entire data transmission.
[0048] Combined with the above encryption processing, the specific implementation is as follows: 1. First, after selecting and encrypting data blocks according to priority, select an appropriate message authentication code (MAC) algorithm for each encrypted data block. The selection of MAC algorithm is based on the characteristics of the data block and its security requirements. For example, algorithms such as HMAC or CMAC can be selected to ensure that the encrypted data block has good integrity protection during transmission.
[0049] 2. Then, the encrypted data block is processed using the selected MAC algorithm to generate the corresponding message authentication code (MAC). The generated MAC will be appended to the end of the data block. This operation requires updating the metadata of the data block at the same time, recording the algorithm type, length and other relevant information of the MAC, so that the receiving end can correctly identify and verify the integrity of the data block.
[0050] 3. After attaching the MAC, the system will also mark the data block for integrity and record the integrity status of the current data block in its metadata. This step ensures that the data block is not only encrypted and protected, but can also be verified as not tampered with during transmission.
[0051] 4. Finally, these encrypted data blocks with MAC attached will be marked as having completed encryption and integrity protection, and are ready to enter the subsequent transmission link. This combined processing method not only ensures the encryption security of the data, but also implements data integrity protection through MAC, providing all-round protection for the secure transmission of communication data.
[0052] S4: Transmit the encrypted data block to the target end through the preset secure transmission protocol As for step S4, this step mainly sends the encrypted data block to the target end through a secure transmission protocol. In the above steps, the data block has been encrypted and integrity protected. Therefore, in the data transmission link, it is necessary to ensure that the data can be reliably transmitted through a secure transmission channel to prevent the data from being attacked or lost during the transmission process. To this end, it is crucial to adopt a preset secure transmission protocol that can provide an encryption channel and transmission guarantee for the data.
[0053] In this embodiment, S4 specifically includes the following steps: 1. First, select and configure a suitable secure transmission protocol. The selected transmission protocol should have functions such as data encryption, identity authentication and integrity verification, such as TLS (Transport Layer Security) or IPSec (Internet Protocol Security). These protocols can provide multi-level security for the transmission of data blocks to prevent data from being eavesdropped, tampered with or forged during transmission.
[0054] 2. After the protocol configuration is completed, a secure transmission channel is established. During this process, a series of handshake operations will be performed between the source and target ends to negotiate the encryption algorithm, key exchange method, and data verification mechanism. These handshake operations ensure that the communication identities of both parties are verified and lay the encryption foundation for subsequent data transmission.
[0055] 3. Next, the encrypted and integrity-protected data blocks are transmitted sequentially through the established secure channel. During the transmission process, the transmission protocol is responsible for real-time encryption and decryption of the data blocks, and the message authentication code (MAC) is used to verify the data integrity. Each data block is attached with a corresponding security tag during transmission to ensure that the data can be correctly identified and decrypted at the target end.
[0056] 4. In addition, during the transmission process, the protocol will monitor the transmission status of the data block, record the transmission time, path, and possible packet loss or retransmission of each data block. These records will be used for subsequent data verification and error handling to ensure that all data blocks can safely reach the target end.
[0057] 5. Finally, all encrypted data blocks are transmitted to the target end through a secure transmission channel, completing the secure data transmission process. In this way, the confidentiality, integrity and reliability of the data during transmission are ensured, thereby greatly improving the security level of the overall communication data transmission.
[0058] S5. Decrypt the received data block at the target end and verify the integrity of the data based on the transmission verification information. As for step S5, in this step, the received data block is decrypted at the target end, and the integrity of the data is verified based on the transmission verification information. In the previous steps, the data block is transmitted to the target end after being encrypted and integrity protected. At the target end, the received encrypted data block needs to be decrypted first, and then integrity verification is performed to ensure that the data block has not been tampered with or damaged during the transmission process.
[0059] In this embodiment, S5 specifically includes the following steps: 1. First, after the target end receives the encrypted data block, the encrypted symmetric key in the data block is extracted. The key is encrypted using an asymmetric encryption algorithm at the sender, so it needs to be decrypted using the target end's private key. Through the decryption operation, the original symmetric key is restored.
[0060] 2. Next, the received ciphertext data block is decrypted using the decrypted symmetric key. This step restores the ciphertext data block to its original plaintext content and recovers the data block before transmission.
[0061] 3. Then, the attached message authentication code (MAC) is extracted from the decrypted data block. The message authentication code is generated at the sending end and attached to the end of the data block. The purpose is to ensure the integrity of the data by verifying the message authentication code after the data reaches the destination.
[0062] 4. Next, the target end uses the previously shared key and the corresponding MAC algorithm to regenerate the MAC value of the decrypted data block. This step uses the same algorithm and key as the sender, and the generated MAC value should be the same as the MAC value attached to the received data block.
[0063] 5. After that, the MAC in the received data block is compared with the MAC regenerated by the target end. If the two MAC values are consistent, it means that the data block has not been tampered with or damaged during the transmission process, and the integrity of the data is guaranteed. On the contrary, if the MAC values do not match, it means that the data block may have an error or been tampered with during the transmission process.
[0064] 6. Based on the MAC verification result, each data block is marked. If the data block passes the integrity check, it is marked as "decryption successful and complete", and the data blocks will enter the next storage or processing stage. If the check fails, it is marked as "decryption failed or integrity is compromised" and triggers the corresponding error handling mechanism, such as requesting retransmission or alerting the operator.
[0065] Through these steps, it is ensured that the data blocks received by the target end can be securely decrypted and maintain integrity during the transmission process, avoiding data tampering or loss, and improving the reliability and security of the entire data transmission process.
[0066] S6. The successfully decrypted and verified data blocks are temporarily stored in the temporary storage area until all data blocks are transferred. As for step S6, this step temporarily stores the successfully decrypted and verified data blocks in the temporary storage area until all data blocks are transmitted. This process ensures that all data blocks can be managed in the correct order and state before the final reorganization, preventing data loss or processing order errors, thus laying the foundation for subsequent reorganization and storage operations.
[0067] In this embodiment, step S6 specifically includes the following contents: 1. First, after each data block is successfully decrypted and passed the integrity verification at the target end, a temporary storage area address is assigned to the data block. This address is used to temporarily store the content of the data block before the data block is finally reassembled.
[0068] 2. Next, the decrypted and verified data blocks are written into the temporary storage area in the order of decryption. At this point, it is necessary not only to store the actual content of the data block, but also to record the metadata related to each data block. The metadata includes but is not limited to the sequence number of the data block, the decryption status, the integrity verification result, and the corresponding temporary storage area address. These metadata are used to quickly locate and verify the status and order of the data blocks in the subsequent processing and reorganization stages.
[0069] 3. After each data block is written to the temporary storage area, the system will continue to monitor the progress of data transmission. The focus of this monitoring process is to determine whether all expected data blocks have been successfully received, decrypted, and passed integrity verification. If there are still data blocks that have not been successfully received or have not passed verification, the system will retain the stored data blocks in the temporary storage area while waiting for the arrival and processing of the remaining data blocks to ensure the integrity of the data blocks and the correct order of final reorganization.
[0070] 4. When all data blocks are successfully received, decrypted and integrity verified, the system will trigger the data reorganization and subsequent processing procedures. At this time, the system extracts each data block in sequence from the temporary storage area and accurately reassembles it into a complete data set based on the sequence number and other information in its metadata. The reorganized data set will be further processed or finally stored in the target storage device, completing the entire data transmission and temporary storage process.
[0071] This process ensures that even if there is a transmission delay, disordered order or temporary storage during the transmission of data blocks, the data can still be correctly restored and managed at the target end, thus ensuring the overall reliability of the system and data integrity.
[0072] S7. After the transmission is completed, the data blocks are reorganized in the original order and stored in the target storage device. As for step S7, in this step, all the data blocks that have been transferred are reorganized in the original order and stored in the target storage device. After the reorganization is completed, the data blocks in the temporary storage area will be automatically cleared to release storage space. This process ensures the integrity and orderliness of the data and optimizes the storage management of the system.
[0073] In this embodiment, after the data block transmission is completed, the steps specifically include the following: 1. First, after confirming that all data blocks have been successfully received, decrypted, and passed integrity verification, the system starts the data reassembly process. At this point, the system reads each data block from the temporary storage area and arranges each data block in its original order in the initial data stream based on the sequence number and other identification information recorded in the metadata.
[0074] 2. Next, the system logically reorganizes the arranged data blocks. Specifically, it stitches these data blocks together into a complete continuous data set. During this process, the system will also perform necessary data verification to ensure that the reorganized data set is consistent with the original data to avoid data loss or errors.
[0075] 3. After the reorganization is completed and passes the verification, the system writes the reorganized complete data set to the predetermined target storage device. The target storage device can be a disk storage, database or other permanent storage medium. The write operation will be optimized according to the characteristics of the target storage device to ensure efficient storage of data and fast response of subsequent reads.
[0076] 4. After the data is written, the system will automatically start the cleaning process of the temporary storage area. Specifically, the system will clear the successfully stored data blocks in the temporary storage area one by one. The cleaning process includes deleting the data block content and its related metadata to release the occupied storage space.
[0077] 5. To ensure the effective use of storage space, the system will monitor the release of storage space in real time during the clearing process to prevent insufficient space from affecting subsequent storage operations. At the same time, the system may also perform defragmentation or other storage optimization operations to maintain the efficiency and continuous availability of the storage area.
[0078] This step not only achieves effective reorganization and safe storage of data blocks, but also further optimizes the management of system resources by automatically cleaning up temporary storage areas, ensuring that the system always maintains efficient and stable operation when processing large-scale data transmission.
[0079] The communication data transmission and temporary storage method provided by the embodiment of the present invention ensures the security, integrity and transmission efficiency of data during network transmission by dividing data into blocks, prioritizing, encrypting and transmitting, and decrypting and reassembling data.
[0080] The communication data transmission and temporary storage device described below and the communication data transmission and temporary storage method described above can be referred to each other.
[0081] Please see attached Figure 2 The present invention also provides a communication data transmission and temporary storage device, comprising: The data receiving module 100 is used to receive and parse the initial data, divide the data into blocks and temporarily store them in the buffer area; A priority sorting module 200, used to calculate weighted coefficients of data blocks and perform priority sorting; The encryption module 300 is used to encrypt the data blocks selected after the priority sorting, including encrypting the data blocks using a symmetric encryption algorithm and encrypting the symmetric key using an asymmetric encryption algorithm; The transmission module 400 is used to transmit the encrypted data block to the target end through a secure transmission protocol; A decryption and verification module 500, for decrypting a data block at a target end and verifying the integrity of the data based on transmission verification information; A temporary storage module 600 is used to temporarily store the successfully decrypted and verified data blocks in a temporary storage area; The reorganization and storage module 700 is used to reorganize the data blocks according to the original order and store them in the target storage device after the transmission is completed.
[0082] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, which will not be repeated here.
[0083] Please see attached Figure 3 The present invention further provides a computer device 40, comprising: a processor 41 and a memory 42, wherein the memory 42 stores a computer program executable by the processor, and when the computer program is executed by the processor, the above method is executed.
[0084] The present invention further provides a storage medium 43 on which a computer program is stored. When the computer program is run by the processor 41, the above method is executed.
[0085] Among them, the storage medium 43 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0086] 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 communication data transmission and temporary storage method, characterized in that: The following steps are involved: Receive and parse the initial data, divide the data into blocks according to a predetermined strategy, and temporarily store the data blocks in a buffer area; Calculate weighted coefficients based on the characteristics of data blocks and prioritize the data blocks; Selecting a suitable data block for encryption processing according to the sorting result, wherein the encryption processing includes encrypting the data block using a symmetric encryption algorithm and encrypting the symmetric key using an asymmetric encryption algorithm; The encrypted data block is transmitted to the target end through the preset secure transmission protocol; Decrypt the received data blocks at the target end and verify the integrity of the data based on the transmission verification information; The successfully decrypted and verified data blocks are temporarily stored in the temporary storage area until all data blocks are transmitted; After the transfer is complete, the data blocks are reassembled in their original order and stored in the target storage device.
2. The communication data transmission and temporary storage method according to claim 1, characterized in that: The steps of receiving and parsing the initial data, dividing the data into blocks according to a predetermined strategy, and temporarily storing the data blocks in the buffer area include: Receive the initial data stream from the source, parse the data stream using the preset communication protocol, and extract each data unit; Based on the attribute information of the data unit, determine the type and size of the data unit, establish the metadata index of the data unit, and ensure the traceability and integrity of the data in the subsequent processing process; Blocking the parsed data units according to a predetermined block strategy, wherein the block strategy includes but is not limited to dynamic adjustment based on the size, type, priority or load of the transmission path of the data unit; Mark the divided data blocks as pending and store them in the buffer area; When the data block is stored in the cache, the corresponding check code and metadata are generated and stored for subsequent integrity verification and sequence reorganization.
3. The communication data transmission and temporary storage method according to claim 1, characterized in that: The step of calculating weighted coefficients based on the characteristics of the data blocks and prioritizing the data blocks comprises: Extracting key attribute information according to the characteristics of each data block, the key attribute information including but not limited to the size, data type, timestamp, expected delay of the transmission path, and source or destination of the data block; Assign a predetermined weight to each key attribute information, and the weight value is dynamically adjusted according to the current state of the communication network and business needs to ensure flexible adaptability in different scenarios; Calculate the weighted coefficient of each data block, where the weighted coefficient is obtained by multiplying each key attribute information by the corresponding weight and performing weighted average; According to the calculated weighted coefficients, all data blocks to be processed are prioritized from high to low priority, and a corresponding priority list is generated; The sorted data blocks are marked as pending in priority order, ready to enter the subsequent transmission or storage processing stage.
4. The communication data transmission and temporary storage method according to claim 1, characterized in that: The step of selecting a suitable data block for encryption processing according to the sorting result comprises: According to the priority sorting list, the data blocks to be processed are selected in order from high priority to low priority; Determine a suitable encryption algorithm for each selected data block, wherein the encryption algorithm is selected based on the sensitivity of the data block, transmission security requirements, and computing resource conditions, including but not limited to symmetric encryption algorithms and asymmetric encryption algorithms; Perform encryption processing on the selected data block, first encrypt the data block content by using the selected symmetric encryption algorithm to generate a ciphertext data block; For key management, the generated symmetric key is encrypted by an asymmetric encryption algorithm to ensure the security of the key during transmission, and the encrypted key is attached to the corresponding ciphertext data block; The encrypted data blocks and their encryption keys are rearranged in order of priority and marked as encrypted, ready for subsequent transmission or storage.
5. The communication data transmission and temporary storage method according to claim 4, characterized in that: The encryption process further includes generating a message authentication code for the data block and appending it to the end of the data block to ensure the integrity of the data during transmission, specifically including the following steps: After completing the encryption process of the data block, select a set of applicable message authentication code algorithms for each encrypted data block, wherein the algorithm is selected based on the type of data block and security requirements, including but not limited to HMAC or CMAC; Process the encrypted data block using the selected MAC algorithm to generate a corresponding message authentication code; The generated message authentication code is appended to the end of the corresponding encrypted data block, and the metadata of the data block is updated to record information such as the algorithm type and length of the MAC; The encrypted data block with MAC attached is marked for integrity, and the integrity status of the current data block is recorded in its metadata; The data block with MAC attached is marked as having completed encryption and integrity protection, ready for subsequent transmission processing.
6. The communication data transmission and temporary storage method according to claim 1, characterized in that: The step of decrypting the received data block at the target end and verifying the integrity of the data based on the transmission verification information includes: After the target end receives the transmitted data block, it first extracts the encrypted symmetric key from the data block and decrypts it using the target end's private key to obtain the original symmetric key; Use the decrypted symmetric key to decrypt the received ciphertext data block and restore the original data block content; Extract the attached message authentication code from the decrypted data block, and regenerate the MAC of the data block using the shared key and the corresponding MAC algorithm stored on the target end for integrity verification; Compare the MAC in the received data block with the MAC regenerated by the target end to verify whether the data block maintains integrity during transmission. If the two are consistent, it is determined that the data block has not been tampered with; Based on the MAC verification result, the data block is marked as passed or failed integrity check. If it passes the check, the data block is marked as successfully decrypted and complete, ready to enter the next storage or processing stage. If it fails, the corresponding error handling mechanism is triggered.
7. The communication data transmission and temporary storage method according to claim 1, characterized in that: The step of temporarily storing the successfully decrypted and verified data blocks in a temporary storage area until all data blocks are transmitted comprises: After the target end successfully decrypts and verifies the data block through integrity verification, a temporary storage area address is allocated for the data block; Write the decrypted and verified data blocks into the temporary storage area in the order of decryption, and record the metadata of each data block, including the data block sequence number, decryption status, verification result and temporary storage area address; After the data blocks are written to the temporary storage area, the progress of data transmission is continuously monitored to determine whether all expected data blocks have been successfully received, decrypted and verified; If there are still data blocks that have not been received or have not passed verification, the stored data blocks are retained in a temporary storage area, waiting for the transmission and processing of subsequent data blocks to ensure the integrity and correct order of the data blocks; After confirming that all data blocks have been successfully received, decrypted and verified, the data reassembly and subsequent processing procedures are triggered to extract the data blocks from the temporary storage area in sequence and reassemble them into a complete data set, ready to enter the final storage or further processing stage.
8. The communication data transmission and temporary storage method according to claim 1, characterized in that: After the data block transmission is completed, the data blocks in the temporary storage area are automatically cleared to release storage space after being reorganized and stored in the target storage device.
9. A communication data transmission and temporary storage device, used to implement the method according to any one of claims 1 to 8, characterized in that: include: A data receiving module is used to receive and parse the initial data, divide the data into blocks and temporarily store them in a buffer area; A priority sorting module is used to calculate the weight coefficients of data blocks and perform priority sorting; An encryption module, used for encrypting the data blocks selected after the priority sorting, including encrypting the data blocks using a symmetric encryption algorithm and encrypting the symmetric key using an asymmetric encryption algorithm; A transmission module, used for transmitting the encrypted data block to the target end through a secure transmission protocol; A decryption and verification module, used to decrypt the data block at the target end and verify the integrity of the data based on the transmission verification information; A temporary storage module, used for temporarily storing the successfully decrypted and verified data blocks in a temporary storage area; The reorganization and storage module is used to reorganize the data blocks in the original order and store them in the target storage device after the transmission is completed.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Satellite data packet analysis method and system
CN119854396A
Internet of Things card security access and data transmission encryption method
CN120296805A
Enterprise information security management system and method based on artificial intelligence
CN120567494A
Artificial intelligence-based enterprise information security management system and method
CN120567494B
Data storage method and device, storage medium and program product
CN120596035A