Encryption Method for Logistics Data Recording Carriers Based on Blockchain

By using a blockchain-based encryption method for logistics data record carriers, public-private key pairs are generated through hash operations and asymmetric encryption algorithms. Combined with span factors and field encryption correction values, the problems of complex key management and insufficient data integrity verification in logistics systems are solved, achieving high security and reliable data management.

CN120358092BActive Publication Date: 2026-04-21山东外事职业大学
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
山东外事职业大学
Filing Date
2025-06-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing logistics systems suffer from complex key management, weak identity authentication capabilities, insufficient data integrity verification, and single point of failure risks due to centralized architecture during data transmission and storage, making it difficult to meet the requirements for highly reliable and secure data management.

Method used

A blockchain-based encryption method for logistics data recording carriers is adopted. Data digests are generated through hash operations, and public-private key pairs are generated by combining asymmetric encryption algorithms. The coupling between the key and the data digest is achieved by using span factors and field encryption correction values. The encryption behavior is sensitive to field positions, recorded to blockchain nodes, and the authenticity of the data is verified by decryption using the private key.

Benefits of technology

It has improved key personalization and anti-attack capabilities, simplified key distribution and update processes, enhanced trusted data sharing and tamper-proof records among multiple nodes, improved the compatibility of on-chain data encryption logic and the refinement of permission configuration, and improved data security and privacy protection levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358092B_ABST
    Figure CN120358092B_ABST
Patent Text Reader

Abstract

This invention discloses a blockchain-based encryption method for logistics data recording carriers, relating to the fields of information security and data encryption technology. The method includes: S1, generating a data digest from the logistics data using hash operations to ensure data integrity; S2, generating a corresponding public-private key pair based on the data digest and an asymmetric encryption algorithm for transmission control; S3, encrypting the logistics data digest using the generated public key to form ciphertext and recording it to a blockchain node; and S4, decrypting the ciphertext in the node using the private key to verify data authenticity and protect privacy. This blockchain-based encryption method for logistics data recording carriers significantly improves the data security, privacy protection level, and on-chain trusted processing capabilities of logistics information systems, possessing good technological promotion value and application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security and data encryption technology, specifically to a method for encrypting logistics data record carriers based on blockchain. Background Technology

[0002] With the continuous development of e-commerce and supply chain management, logistics systems face severe privacy and security challenges in data processing and information sharing. Currently, logistics information is frequently transmitted between multiple platforms and nodes, and sensitive data such as user information, transportation routes, and order details are highly susceptible to unauthorized access, tampering, or leakage during transmission or storage.

[0003] Existing solutions largely rely on symmetric encryption, access control, or data anonymization. However, these methods generally suffer from technical flaws such as complex key management, weak authentication capabilities, and insufficient data integrity verification. Furthermore, centralized architectures introduce "single point of failure" risks, failing to meet the high-reliability and high-security data management requirements of modern logistics. Based on these issues, the industry has begun to introduce blockchain technology, leveraging its decentralized, immutable, and traceable characteristics to provide reliable support for logistics information. By combining it with asymmetric encryption algorithms, public-private key mechanisms can be used to achieve precise permission allocation and authentication, thereby protecting privacy and ensuring security during data transmission and recording. However, current blockchain-based logistics systems still have shortcomings in integrating asymmetric encryption mechanisms, primarily manifested in a lack of efficient encryption control processes, insufficient compatibility support for on-chain data structures, and complex permission configuration among multiple users. Summary of the Invention

[0004] The purpose of this invention is to provide a blockchain-based encryption method for logistics data record carriers, which regulates the logistics information transmission process using an asymmetric encryption algorithm to solve the problem of data privacy protection.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a blockchain-based encryption processing method for logistics data record carriers, the method comprising:

[0006] S1. Generate a data digest from logistics data using hash operations to ensure data integrity;

[0007] S2. Generate corresponding public-private key pairs based on data digests and asymmetric encryption algorithms for transmission control, including extracting the first and last fields of the digest, converting them to ASCII codes and calculating the difference between the ASCII codes, calculating the average field length of all digest fields, calculating the span factor, using the span factor as the seed perturbation value of the asymmetric encryption algorithm, and inputting it into RSA or Elliptic Curve Cryptography (ECC) to generate a structured public-private key pair, thereby achieving coupling between the key and the data digest.

[0008] S3. Use the generated public key to encrypt the logistics data digest to form ciphertext and record it to the blockchain node. This includes numbering the digest field, setting the field encryption bit number, calculating the field encryption correction value, using the field encryption correction value to control the round or algorithm mode of the field encryption algorithm, executing encryption sequentially according to the size of the field encryption correction value, ensuring that the encryption behavior responds sensitively to the field position, writing the ciphertext into the blockchain node in a structured way, and retaining the original field encryption correction value of each data segment as an audit index.

[0009] S4. Decrypt the ciphertext in the node using the private key to verify the authenticity of the data and protect privacy.

[0010] Preferably, step S1 includes extracting stream fields, counting the existence time of each field, counting the number of times each field appears in the data, calculating the summary index of each field, arranging the fields in descending order according to the summary index of each field to form a summary sequence, and inputting it into a hash function to generate a summary.

[0011] Preferably, step S4 includes decrypting the ciphertext in the blockchain to obtain a decryption digest, comparing the decryption digest bit by bit with the original digest, counting the number of completely identical bits, obtaining the total number of bits in the original digest, dividing the number of completely identical bits by the total number of bits in the original digest to obtain the data decryption success rate, setting a data decryption success rate threshold, determining that the data is genuine and has not been tampered with if the data decryption success rate is greater than or equal to the data decryption success rate threshold, triggering a data anomaly marker and writing it into the blockchain audit record if the data decryption success rate is less than the data decryption success rate threshold.

[0012] Preferably, the specific steps for calculating the summary index of each field in S1 include dividing the field's existence time by 1 and adding the number of times the field appears in the data to obtain the field summary index.

[0013] Preferably, the specific steps for calculating the span factor in S2 include dividing the ASCII code difference by the average field length of all summary fields to obtain the span factor.

[0014] Preferably, the specific steps for calculating the field encryption correction value in S3 include subtracting the field encryption bit number from the summary field number to obtain the field encryption correction value.

[0015] Preferred options also include:

[0016] Before generating the public-private key pair, first determine the key length K of the asymmetric encryption algorithm to be used, set the minimum key length P, and continue to execute the subsequent steps when K≥P;

[0017] We construct a security parameter λ to measure the relationship between encryption strength and the size of the blockchain network, with the following formula: ;

[0018] Where λ represents the security parameter, K represents the key length, and M represents the number of nodes deployed in the blockchain system;

[0019] Set a security threshold θ. If λ≥θ, the private key will be used to encrypt and control the transmission process, raising the security level of the communication channel to the highest security level supported by the system.

[0020] If λ < θ, regenerate the public / private key pair and recalculate λ until λ ≥ θ.

[0021] Preferably, the logistics data in S1 includes one or more of the following: order number, delivery address, transportation time, cargo type, temperature record, and geographic coordinate information.

[0022] Preferably, S3 further includes recording the original field number, encryption round number, and correction value index for each ciphertext.

[0023] Preferably, in step S2, using the span factor as the seed perturbation value for the asymmetric encryption algorithm further includes using the fractional part of the span factor as a curve selection parameter, displacement offset value, or seed randomization factor for the key generation algorithm.

[0024] As can be seen from the above technical solution, the present invention has the following beneficial effects:

[0025] This blockchain-based encryption method for logistics data records deeply couples logistics data digests with asymmetric key generation, achieving a dynamic key derivation mechanism based on data structures. This not only enhances key personalization and anti-attack capabilities but also simplifies key distribution and update processes. Secondly, leveraging the decentralized and immutable nature of blockchain, it enables trusted data sharing and tamper-proof records across multiple nodes and platforms, avoiding systemic risks caused by single points of failure and enhancing the stability and transparency of data lifecycle management. Furthermore, by combining field encryption correction values ​​with ciphertext structured writing strategies, the encryption behavior possesses field location awareness and auditability, improving the compatibility and traceability of on-chain data to encryption logic and effectively supporting granular permission configuration among multiple users. In addition, by introducing dynamic security control indicators such as security parameter λ and encryption success rate, it achieves encryption adaptation and security level adjustment for different node sizes and data sensitivity levels, constructing a multi-dimensional, adjustable, and responsive security mechanism. This significantly improves the data security, privacy protection level, and on-chain trusted processing capabilities of the logistics information system, demonstrating significant technological promotion value and application prospects. Attached Figure Description

[0026] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

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

[0028] like Figure 1 As shown, the present invention provides a technical solution: a blockchain-based encryption processing method for logistics data record carriers, the method comprising:

[0029] S1. Generate a data digest from logistics data using hash operations to ensure data integrity;

[0030] S2. Generate corresponding public-private key pairs based on data digests and asymmetric encryption algorithms for transmission control, including extracting the first and last fields of the digest, converting them to ASCII codes and calculating the difference between the ASCII codes, calculating the average field length of all digest fields, calculating the span factor, using the span factor as the seed perturbation value of the asymmetric encryption algorithm, and inputting it into RSA or Elliptic Curve Cryptography (ECC) to generate a structured public-private key pair, thereby achieving coupling between the key and the data digest.

[0031] S3. Use the generated public key to encrypt the logistics data digest to form ciphertext and record it to the blockchain node. This includes numbering the digest field, setting the field encryption bit number, calculating the field encryption correction value, using the field encryption correction value to control the round or algorithm mode of the field encryption algorithm, executing encryption sequentially according to the size of the field encryption correction value, ensuring that the encryption behavior responds sensitively to the field position, writing the ciphertext into the blockchain node in a structured way, and retaining the original field encryption correction value of each data segment as an audit index.

[0032] S4. Decrypt the ciphertext in the node using the private key to verify the authenticity of the data and protect privacy.

[0033] This encryption method aims to ensure the integrity, confidentiality, and verifiability of logistics data during transmission and storage. First, step S1 generates a data digest by performing a hash operation on the logistics data, ensuring it remains tamper-proof during transmission and storage, serving as the foundation for subsequent encryption and authentication. Step S2 constructs a public-private key pair for transmission control based on the generated data digest and an asymmetric encryption algorithm. This involves extracting the first and last fields of the data digest, converting them to ASCII codes, calculating their difference, and then calculating the average field length of all fields in the digest to determine the "span factor." This span factor is used as a seed perturbation value input into the RSA algorithm or the Elliptic Curve Cryptography (ECC) algorithm, thereby generating a public-private key pair responsive to structural features. This ensures a high degree of correlation between the key generation process and the data digest, achieving key-data digest coupling. In step S3, the generated public key is used to encrypt the data digest, forming ciphertext which is then recorded on the blockchain node. To improve the accuracy and sensitivity of the encryption structure, the digest fields are first numbered, and corresponding field encryption bit numbers are assigned. Furthermore, a field encryption correction value is calculated for each field. This value is used to control the rounds or algorithm modes of the field encryption algorithm, thereby ensuring differentiated encryption processing for different fields. During encryption, encryption operations are performed sequentially according to the magnitude of the field encryption correction values, making the encryption behavior structurally responsive to field positions. The ciphertext is written to the blockchain nodes in a structured manner, while retaining the original field encryption correction values ​​corresponding to each data segment as an index for future audit verification. Finally, in step S4, the ciphertext in the blockchain nodes is decrypted using a private key to verify the authenticity of the data digest, ensuring that the data has not been tampered with, and effectively protecting privacy. Throughout the process, the blockchain, as an immutable distributed ledger, combined with structurally responsive keys and field-sensitive encryption mechanisms, constructs a highly secure and controllable encrypted record system for logistics data.

[0034] This invention enhances the uniqueness and structural adaptability of encryption by coupling the data digest with the key generation process, thereby improving the key's resistance to attacks. It utilizes a field encryption correction mechanism to achieve fine-grained encryption control based on field location, resulting in a higher level of security sensitivity in the encryption structure. By retaining structured ciphertext records and audit index fields, it ensures data verifiability and traceability. Combined with the immutability of blockchain technology, it effectively safeguards the security, integrity, and privacy of logistics data during transmission and storage, enhancing the data credibility and regulatory capabilities of the logistics system.

[0035] S1 includes extracting stream fields, counting the existence time of each field, counting the number of times each field appears in the data, calculating the summary index for each field, arranging the fields in descending order according to the summary index of each field to form a summary sequence, and inputting it into a hash function to generate a summary.

[0036] This implementation further optimizes and refines step S1 of claim 1, specifically enhancing the semantic structure recognition and information density distribution response capabilities of the data digest through five sub-steps. First, by parsing the logistics data structure, various logistics fields are extracted, including but not limited to timestamps, location information, status identifiers, and operator information. Next, the existence time of each field is statistically analyzed, i.e., the time interval from the first occurrence to the last occurrence of the field, to measure the lifecycle impact range of the field. Further, the total number of times each field appears in the entire set of logistics data is counted, reflecting the importance and frequency of reuse of the field. Subsequently, combining the existence time and frequency of occurrence of each field, a digest index is calculated for each field. The digest index can be expressed in the form of a weighted function, such as Digest Index = Existence Time × Frequency of Occurrence. Based on the calculation results, all fields are sorted from high to low according to their digest index values, forming a structured digest sequence. This digest sequence is used as hash input and fed into a hash function (such as SHA-256 or SM3) to generate the final data digest for subsequent encryption processing, thereby making the digest results more representative and verifiable.

[0037] By introducing statistical methods for field existence time and occurrence frequency, the importance of each field to the overall logistics data can be quantified. Based on this, a summarization index is established to evaluate orderliness, ensuring that the generated summaries not only possess structural integrity but also highlight core data characteristics. Compared to traditional summarization methods that rely on field order or content hashing, this approach generates summaries with a more logical and sensitive structure, more effectively responding to data disturbances and tampering detection. Furthermore, the summarization index sorting further enhances the randomness and information entropy of the hash input, improving the security and uniqueness of the data summaries from the source, providing a more robust foundation of data input for subsequent public and private key generation.

[0038] S4 includes decrypting the ciphertext in the blockchain to obtain a decryption digest, comparing the decryption digest bit by bit with the original digest, counting the number of completely identical bits, obtaining the total number of bits in the original digest, dividing the number of completely identical bits by the total number of bits in the original digest to obtain the data decryption success rate, setting a data decryption success rate threshold, if the data decryption success rate is greater than or equal to the data decryption success rate threshold, the data is determined to be genuine and has not been tampered with, if the data decryption success rate is less than the data decryption success rate threshold, triggering a data anomaly marker and writing it into the blockchain audit record.

[0039] This implementation extends step S4, enhancing the accuracy and automation of the decryption verification process. First, the ciphertext recorded in the blockchain node is decrypted using the private key to recover the corresponding decryption digest. Next, the system compares this decryption digest bit-by-bit with the original generated data digest, checking if each bit in the two digest strings matches, and accumulating the number of completely identical bits. Then, the total number of bits in the original digest is obtained, and a division operation is performed using this value as the denominator and the number of completely identical bits as the numerator to calculate the data decryption success rate, quantifying the degree of consistency between the decrypted data and the original digest. To determine if the data has been tampered with, the system presets a decryption success rate threshold as a baseline for trust. If the currently calculated decryption success rate is greater than or equal to this threshold, the data is considered authentic, complete, and untampered, and the verification process passes; conversely, if it is lower than the threshold, the system automatically triggers an anomaly marking logic, marking the data as an anomaly and writing its related records (including timestamps, comparison results, ciphertext indexes, etc.) into the blockchain audit log for future querying, analysis, and risk tracking.

[0040] Introducing the data decryption success rate as a quantitative metric effectively enables refined judgment of data integrity, offering stronger fault tolerance and responsiveness compared to the traditional binary results of hash comparison (success / failure). By comparing bits one by one, it can not only identify data tampering but also measure the degree of tampering, supporting intelligent auditing and dynamic risk assessment. Furthermore, by setting flexible success rate thresholds, the system can adjust verification sensitivity according to the security level of the application scenario, improving the method's adaptability. The combination of anomaly marking and audit writing also ensures the traceability and compliance of the logistics data system, enhancing the overall system's security and transparency.

[0041] The specific steps for calculating the summary index for each field in S1 include dividing the field's existence time by 1 and adding the number of times the field appears in the data to obtain the field summary index. This embodiment further refines the process of "calculating the summary index for each field" in step S1 of claim 2, proposing a calculation formula with more logical control. Based on the existence time of extracted stream fields and statistical fields and the number of times the field appears in the data, the formula "Field summary index = Field existence time ÷ (1 + Number of times the field appears in the data)" is adopted. By introducing "1 + Number of occurrences" as the denominator, the problem of high-frequency fields dominating the summary ranking is effectively avoided. This design suppresses fields with high frequency but short lifespan, while low-frequency fields with longer lifespans can obtain higher summary indices, thus being given higher ranking priority in the subsequent summary sequence generation. This structural adjustment reflects a non-linear weighting mechanism of field importance, that is, by weakening the processing of frequent but highly volatile fields, the sensitivity of the summary to stability information is improved. After completing the calculation of the summary index for each field, the system sorts the fields in descending order according to the index value to obtain the summary sequence, and inputs it into the hash function to generate the final summary.

[0042] This calculation formula introduces "1 + the number of times the field appears in the data" as the denominator, achieving an effective balance between the frequency of a field and its temporal influence while ensuring a non-zero divisor. Compared to traditional models that only multiply or weight, this fractional structure significantly enhances the ability of the summary structure to discriminate field behavioral characteristics. Its summary results more reasonably reflect the relative importance of fields in the data lifecycle, helping to improve the identification rate of anomalous or low-frequency, long-lasting fields in the data summary, and enhancing the integrity and security of the data representation before encryption. Furthermore, the summary sequence formed based on this index has higher information entropy, and the generated hash value is more collision-resistant, providing stronger support for subsequent encrypted structural matching.

[0043] The specific steps in S2 for calculating the span factor include dividing the ASCII code difference by the average field length of all digest fields to obtain the span factor. This embodiment further refines step S2 in claim 1, clarifying the calculation path for generating the span factor. Specifically, after generating the data digest through hashing, the first and last fields are extracted from the digest and converted into ASCII codes. The difference between the two ASCII codes is calculated, representing the initial value of the structural span of the characters at both ends of the digest. Next, all digest fields are statistically analyzed, the character length of each field is calculated, and its average field length is further determined. Finally, the obtained ASCII code difference is divided by the average field length to obtain the "span factor". This span factor serves as the seed perturbation input for asymmetric encryption algorithms (such as RSA or ECC), making the key generation process in the encryption algorithm highly coupled with the data digest structure. The introduction of the span factor, by adjusting the degree of seed perturbation, realizes a structurally responsive public-private key pair construction mechanism, enhancing the matching and specificity of key pairs for specific data digests.

[0044] By calculating the span factor as "ASCII code difference ÷ average field length," the structural variation features in the data digest can be quantified as a floating parameter, making the key generation process sensitive to changes in the digest boundaries. Compared to traditional random or fixed seed methods, this method significantly improves the mapping ability of the key generation process to the original data structure, thereby building a tighter data-key coupling relationship. This mechanism enhances the unpredictability of the encryption process, improving the security, personalization, and anti-cracking capabilities of the overall data encryption system.

[0045] The specific steps in S3 for calculating the field encryption correction value include subtracting the field encryption bit number from the digest field number to obtain the field encryption correction value. This embodiment refines step S3 in claim 1, clarifying the calculation method for the field encryption correction value. In specific operation, the digest fields of the logistics data are first numbered to form a sequence of digest field numbers, representing the logical position of the field in the digest. Simultaneously, to control the changes in encryption operations across different fields, a field encryption bit number is assigned to each field, typically based on the encryption key features of the field in the data structure or a custom rule definition. Subsequently, the field encryption correction value for each field is calculated, i.e., obtained by subtracting the corresponding field encryption bit number from its digest field number. This field encryption correction value is used to adjust the rounds or algorithm modes of the encryption operation corresponding to that field. Specifically, the encryption depth of the encryption algorithm (e.g., the number of AES rounds) or different encryption strategies (e.g., switching encryption subkeys) are selected based on the magnitude of the field encryption correction value. During encryption execution, the system sorts the field encryption correction values ​​from smallest to largest and performs encryption processing sequentially to enhance the responsiveness of encryption to field position and features, enabling structural sensitivity. After encryption is completed, the structured ciphertext is written to the blockchain node, while the original encrypted correction values ​​of each field are retained for use as an audit index.

[0046] By calculating the field encryption correction value through the difference between the digest field number and the field encryption bit number, a dynamic encryption mechanism driven by field position and structural information is realized, effectively improving the encryption algorithm's customization and responsiveness to data fields. This method makes the encryption behavior of each field directly related to its logical position in the digest structure and the encryption strategy design, thus forming a structure-sensitive, fine-grained encryption sequence. This mechanism not only improves the unpredictability and security of data encryption but also provides strong data identification support for the structured auditing and tracking of ciphertext content.

[0047] It also includes determining the key length K of the asymmetric encryption algorithm to be used before generating the public-private key pair, setting a minimum key length P, and continuing to execute subsequent steps when K≥P;

[0048] We construct a security parameter λ to measure the relationship between encryption strength and the size of the blockchain network, with the following formula: ;

[0049] Where λ represents the security parameter, K represents the key length, and M represents the number of nodes deployed in the blockchain system;

[0050] Set a security threshold θ. If λ≥θ, the private key will be used to encrypt and control the transmission process, raising the security level of the communication channel to the highest security level supported by the system.

[0051] If λ < θ, regenerate the public / private key pair and recalculate λ until λ ≥ θ.

[0052] This implementation extends the security protection logic in the public-private key generation mechanism by introducing a multi-dimensional security assessment model before the asymmetric encryption algorithm is initiated. First, before generating the public-private key pair, the system confirms the key length K of the selected algorithm (such as RSA or ECC) and sets a minimum key length P to ensure that the basic encryption strength is not lower than the security threshold. When K ≥ P, the encryption initialization process continues. At this point, to adapt the key generation to the actual operating environment of the blockchain system, a security parameter λ is introduced as a control indicator, expressed as λ = f(K, M), where M is the number of valid nodes in the current blockchain system. This security parameter λ measures the degree of matching between the key length K and the number of system nodes M, thereby reflecting the attack resistance of the key pair in the actual distributed structure. The system presets a security threshold θ as a judgment benchmark: if the current λ value is greater than or equal to θ, it is considered that the current key strength is sufficient to cover the security requirements of the entire network scale. Subsequently, the private key is used to encrypt and control the transmission process, and the security level of the communication channel is upgraded to the highest level supported by the system. If λ is less than θ, the system will regenerate a new key pair and re-evaluate λ until the security standard is met before entering the normal data encryption process.

[0053] This implementation extends the security protection logic in the public-private key generation mechanism by introducing a multi-dimensional security assessment model before the asymmetric encryption algorithm is activated. First, before generating the public-private key pair, the system confirms the key length K of the selected algorithm (such as RSA or ECC). This value can be set by the system administrator according to industry encryption standards, such as RSA should be no less than 2048 bits and ECC no less than 256 bits, or it can be dynamically set based on recommended values ​​returned by the currently used encryption library. Then, a minimum key length P is set to establish the system's basic security threshold. A typical value is P = 2048 (bits). If K ≥ P, the subsequent steps continue. To ensure the key strength matches the actual scale of the blockchain operation, a security parameter λ is introduced, typically defined as λ = K / log2(M), where M represents the number of currently active nodes in the blockchain system. This value can be obtained in real-time through the network state synchronization module. This formula reflects the logarithmic strength ratio of the encryption strength K to the number of vulnerable paths M in the network, ensuring that the key length increases synchronously with the network size, thereby avoiding the "weak key in a large network" problem. The system presets a security threshold θ as a judgment standard, with a typical value such as θ=300 (which can be adjusted appropriately according to security policies). If the calculated λ≥θ, the system determines that the current key security level meets the requirements, and will use the private key to encrypt and control the logistics data transmission process, and upgrade the communication channel to the highest security level supported by the system. If λ<θ, it indicates that the current key strength is insufficient, and the system automatically triggers the key pair regeneration logic and recalculates λ until the threshold condition is met before entering the main process. This mechanism not only strengthens the security assessment capability before key generation, but also ensures through a dynamic iteration mechanism that each generated key pair meets the minimum encryption security standard required by the current blockchain system topology.

[0054] This mechanism establishes a security parameter λ to dynamically adapt encryption strength to the blockchain network topology, effectively avoiding key strength imbalance caused by node expansion. Compared to traditional fixed-key strategies, this method offers stronger system adaptability and security resilience, making it particularly suitable for consortium or private blockchain scenarios with dynamically changing node numbers. Furthermore, by introducing key length verification and automatic key regeneration mechanisms, it ensures that key pairs entering the network at any given time meet the current system's minimum security standards, reducing security risks caused by key inconsistencies. In addition, the dynamic security assessment mechanism provides a higher level of encryption for smart contract scheduling and high-frequency inter-node communication, enhancing data transmission's resistance to eavesdropping and interference.

[0055] The logistics data in S1 includes one or more of the following: order number, sender / receiver address, transportation time, cargo type, temperature record, and geographic coordinate information. This embodiment provides a specific data structure description for step S1 in claim 1, clarifying the types of logistics data that can be used for generating encrypted digests. When executing step S1, the system first extracts the original data fields for encryption processing from the logistics information platform or sensor acquisition system. These fields may include, but are not limited to: order number: a primary key number used to uniquely identify the logistics task; sender / receiver address: including the shipper's address and the consignee's address, identifying the spatial path; transportation time: recording the logistics departure time and expected / actual arrival time; cargo type: such as pharmaceuticals, electronic products, cold chain food, etc., indicating the attributes of the transported content; temperature record: mainly used in cold chain logistics scenarios, recording the temperature of the cargo; geographic coordinate information: collected by GPS or Beidou equipment, recording the location of the transportation trajectory. The system extracts an initial set of logistics data fields based on the above field content, serving as the input source for subsequent hash digest operations. To improve the digest information entropy and anti-tampering capabilities, multiple pieces of information from the above fields can be combined for joint digests. The field selection strategy can be set according to business importance, compliance requirements, or user-defined configurations. In the process of constructing the summary, each field is treated as an independent summary sub-unit, participating in field existence time statistics, occurrence frequency analysis, summary index calculation, and finally synthesizing the summary sequence and inputting it into a hash function to generate the summary.

[0056] By clearly defining the sources and field types of logistics data, the system achieves configurability and domain adaptability during the summary generation stage, facilitating enhanced security controls as needed. Introducing dynamically sensed information such as temperature records and geographic coordinates into summary calculation significantly enhances the verifiability of data in both time and space dimensions, making it suitable for highly sensitive industry scenarios such as cold chain security and pharmaceutical transportation. The diversity and selectivity of field structures also improve the system's flexibility, allowing different business systems to build customized encrypted summary processes based on their respective data characteristics, enhancing the system's modularity and scalability.

[0057] S3 further includes recording the original field number, encryption round number, and correction value index for each ciphertext. This embodiment supplements step S3 in claim 1, enhancing the binding and recording capabilities between ciphertext and field metadata. During the process of encrypting the logistics data digest to generate ciphertext, in addition to performing the encryption operation, the system also attaches and records the encryption metadata for each ciphertext field, including: Original field number: the position of the logistics data field corresponding to the ciphertext in the digest; Encryption round number: the number of algorithm rounds executed during the encryption process, usually related to the field's encryption correction value; Correction value index: the index position of the field in the set of field encryption correction values, used to identify its priority in the overall encryption control sequence. The above information is structured and written to the blockchain node along with the ciphertext during the encryption phase, ensuring that each piece of ciphertext data not only has content encryption protection but also includes corresponding encryption parameter records. This record can serve as an audit basis and can also be used for data tracking, decryption and restoration, and anomaly tracing analysis. All metadata is bound to the ciphertext through a data structure, ensuring the contextual integrity of the ciphertext parsing and decryption process.

[0058] By recording the original field number, encryption round number, and correction value index for each piece of ciphertext, the system's data structure transparency and ciphertext traceability are significantly enhanced. This mechanism can be used for rapid mapping and field restoration during decryption verification, and also facilitates the reconstruction of key usage traces and encryption logic judgments during security audits. Furthermore, based on the encryption round number and correction value index information, the encryption strength of ciphertext fields can be dynamically assessed, enabling the classification and protection of sensitive data fields and security grading. In addition, this structured recording scheme improves the organization capabilities of ciphertext data, helping to support future data governance, smart contract constraint execution, and multi-source data reconciliation.

[0059] S2, using the span factor as the seed perturbation value for the asymmetric encryption algorithm, also includes using the fractional part of the span factor as a curve selection parameter, shift offset value, or seed randomization factor for the key generation algorithm. This embodiment, based on step S2 in claim 1, further deepens the mechanism by which the span factor plays a role in the key generation process. Specifically, after calculating the span factor using the ASCII code difference and the average field length of the digest field, it is split into an integer part and a fractional part, which are used for different encryption parameter configurations. In particular, the fractional part, due to its fine range of variation and high sensitivity, is suitable as a perturbation factor to control the internal details of asymmetric encryption algorithms. Specifically, its applications include: Curve selection parameters: When using Elliptic Curve Cryptography (ECC), the fractional part can serve as a selection weight or index within a family of candidate elliptic curves, dynamically selecting the optimal elliptic curve and achieving diversity in key curve structures; Shift offset values: In key generation, the fractional part can be introduced into modulo operations or shift functions as an offset to control the positional perturbation of the random number seed or keystream generation logic, improving key non-repetition; Seed randomization factor: Used to influence the initial seed perturbation in key generation, increasing the unpredictability of the key seed and making the key generation process highly sensitive to changes in the details of the input data. By introducing the perturbation capability of the fractional part, the system can further enhance the complexity and personalization of key generation, constructing a public-private key pair that dynamically links with the digest structure.

[0060] This mechanism effectively incorporates the fractional part of the span factor into the underlying perturbation logic of the asymmetric encryption algorithm, enabling the key generation process to respond not only to the overall characteristics of the digest but also to differentiated responses to micro-level changes in the fields. Compared to a single integer perturbation value control method, the fractional perturbation mechanism significantly enhances the nonlinearity and diversity of the key generation path, thereby improving the system's resistance to brute-force attacks and key prediction attacks. By controlling multiple encryption parameters such as curve selection, offset displacement, and seed random factor, this invention achieves a refined, multi-dimensional key construction scheme, enhancing the overall security strength and flexible configuration capability of the encryption system.

[0061] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A blockchain-based encryption method for logistics data recording carriers, characterized in that, The method includes: S1. Generate a data digest from logistics data using hash operations to ensure data integrity; S2. Generate corresponding public-private key pairs based on data digests and asymmetric encryption algorithms for transmission control, including extracting the first and last fields of the digest, converting them to ASCII codes and calculating the difference between the ASCII codes, calculating the average field length of all digest fields, calculating the span factor, using the span factor as the seed perturbation value of the asymmetric encryption algorithm, and inputting it into RSA or Elliptic Curve Cryptography (ECC) to generate a structured public-private key pair, thereby achieving coupling between the key and the data digest. S3. Use the generated public key to encrypt the logistics data digest to form ciphertext and record it to the blockchain node. This includes numbering the digest field, setting the field encryption bit number, calculating the field encryption correction value, using the field encryption correction value to control the round or algorithm mode of the field encryption algorithm, executing encryption sequentially according to the size of the field encryption correction value, ensuring that the encryption behavior responds sensitively to the field position, writing the ciphertext into the blockchain node in a structured way, and retaining the original field encryption correction value of each data segment as an audit index. S4. Decrypt the ciphertext in the node using the private key to verify the authenticity of the data and protect privacy; The specific steps for calculating the span factor in S2 include dividing the ASCII code difference by the average field length of all summary fields to obtain the span factor; The specific steps for calculating the field encryption correction value in S3 include subtracting the field encryption bit number from the summary field number to obtain the field encryption correction value.

2. The encryption processing method for logistics data recording carrier based on blockchain according to claim 1, characterized in that: S1 includes extracting stream fields, counting the existence time of each field, counting the number of times each field appears in the data, calculating the summary index of each field, arranging the fields in descending order according to the summary index of each field to form a summary sequence, and inputting it into a hash function to generate a summary.

3. The encryption processing method for logistics data recording carriers based on blockchain according to claim 1, characterized in that: S4 includes decrypting the ciphertext in the blockchain to obtain a decryption digest, comparing the decryption digest with the original digest bit by bit, counting the number of completely identical bits, obtaining the total number of bits in the original digest, dividing the number of completely identical bits by the total number of bits in the original digest to obtain the data decryption success rate, setting a data decryption success rate threshold, if the data decryption success rate is greater than or equal to the data decryption success rate threshold, determining that the data is genuine and has not been tampered with, if the data decryption success rate is less than the data decryption success rate threshold, triggering a data anomaly marker and writing it into the blockchain audit record.

4. The encryption processing method for logistics data recording carrier based on blockchain according to claim 2, characterized in that: The specific steps for calculating the summary index of each field in S1 include dividing the field's existence time by 1 and adding the number of times the field appears in the data to obtain the field summary index.

5. The method for encrypting logistics data recording carriers based on blockchain according to claim 1, characterized in that, Also includes: Before generating the public-private key pair, first determine the key length K of the asymmetric encryption algorithm to be used, set the minimum key length P, and continue to execute the subsequent steps when K≥P; We construct a security parameter λ to measure the relationship between encryption strength and the size of the blockchain network, with the following formula: ; Where λ represents the security parameter, K represents the key length, and M represents the number of nodes deployed in the blockchain system; Set a security threshold θ. If λ≥θ, the private key will be used to encrypt and control the transmission process, raising the security level of the communication channel to the highest security level supported by the system. If λ < θ, regenerate the public / private key pair and recalculate λ until λ ≥ θ.

6. The method for encrypting logistics data recording carriers based on blockchain according to claim 1, characterized in that: The logistics data in S1 includes one or more of the following: order number, delivery and receipt address, transportation time, cargo type, temperature record, and geographic coordinate information.

7. The method for encrypting logistics data recording carriers based on blockchain according to claim 1, characterized in that: S3 also includes recording the original field number, encryption round number, and correction value index for each ciphertext.

8. The method for encrypting logistics data recording carriers based on blockchain according to claim 1, characterized in that: The use of the span factor as a seed perturbation value for the asymmetric encryption algorithm in S2 also includes using the fractional part of the span factor as a curve selection parameter, displacement offset value, or seed randomization factor for the key generation algorithm.

Citation Information

Patent Citations

  • Distributed data security sharing method and system based on block chain, and computer readable medium

    CN113595971A

  • Express data cross-border sharing method based on block chain and proxy re-encryption

    CN118377762A