Logistics data record carrier encryption processing method based on block chain

Public-private key pairs are generated through hashing operations and asymmetric encryption algorithms. Combined with blockchain technology, the encryption control and data structure compatibility problems of logistics data during multi-platform transmission are solved, efficient data security and privacy protection are achieved, and the credibility and management capabilities of the logistics system are improved.

CN120358092AActive Publication Date: 2025-07-22山东外事职业大学
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510843274.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-07-22
Estimated Expiration
2045-06-23

AI Technical Summary

Technical Problem

The existing logistics data has privacy and security challenges in transmission and storage, especially when it is transmitted between multiple platforms and nodes. The existing technology is difficult to achieve efficient encryption control processes, lack of compatibility support for on-chain data structures, and complex permission configuration between multiple users.

Method used

The data digest is generated through hashing operations, combined with the asymmetric encryption algorithm to generate public-private key pairs, and the span factor and field encryption correction value are used to generate structurally responsive key pairs, which realizes the coupling of the key and data digest, and writes the encrypted ciphertext structure into the blockchain node. Combining the field encryption correction value as an audit index, ensuring that the encryption behavior is sensitive to the field location and using the tamper-free characteristics of the blockchain for data verification.

Benefits of technology

It realizes data trusted sharing and anti-tampering recording between multiple nodes and multiple platforms, improves the stability and transparency of data life cycle management, enhances data security, privacy protection level and on-chain trusted processing capabilities, and has a multi-dimensional, adjustable, and sensitive response security mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358092A_ABST
    Figure CN120358092A_ABST
Patent Text Reader

Abstract

The invention discloses a logistics data record carrier encryption processing method based on a block chain, and relates to the technical field of information security and data encryption, the method comprises the following steps: S1, generating a data abstract from logistics data through Hash operation to ensure data integrity, the method comprises the following steps: S1, acquiring a logistics data abstract, S2, generating a corresponding public and private key pair based on the data abstract and an asymmetric encryption algorithm to perform transmission regulation and control, S3, encrypting the logistics data abstract by using the generated public key to form a ciphertext and recording the ciphertext to a block chain node, and S4, decrypting the ciphertext in the node through a private key to verify data authenticity and protect privacy; according to the logistics data recording carrier encryption processing method based on the block chain, the data security, the privacy protection level and the on-chain credible processing capability of a logistics information system are remarkably improved, and the method has good technical popularization value and application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security and data encryption, and particularly to an encryption processing method for a logistics data record carrier based on a blockchain. Background Art

[0002] With the continuous development of e-commerce and supply chain management, the logistics system faces severe privacy and security challenges in data processing and information sharing. Currently, logistics information is frequently transmitted among multiple platforms and nodes, and sensitive data involved, such as user information, transportation routes, order details, etc., is extremely vulnerable to illegal access, tampering, or leakage during transmission or storage.

[0003] Existing solutions mostly rely on methods such as symmetric encryption, access control, or data desensitization. However, these methods generally have technical defects such as complex key management, weak identity authentication capabilities, and insufficient data integrity verification. In addition, the centralized architecture also leads to the risk of "single point of failure" in data security, making it difficult to meet the high-trust and high-security data management requirements of modern logistics. Based on the above problems, the industry has begun to introduce blockchain technology to provide reliable support for logistics information with its characteristics of decentralization, immutability, and traceability. By combining with asymmetric encryption algorithms, the public-private key mechanism can be used to achieve precise permission division and identity authentication, thereby protecting privacy and ensuring security during data transmission and recording. However, the current blockchain-based logistics system still has deficiencies in the integration of the asymmetric encryption mechanism, mainly reflected in the lack of an efficient encryption control process, the lack of compatible support for on-chain data structures, and the complex permission configuration among multiple users. Summary of the Invention

[0004] The purpose of the present invention is to provide an encryption processing method for a logistics data record carrier based on a blockchain, and to regulate the logistics information transmission process according to the asymmetric encryption algorithm to solve the problem of data privacy protection.

[0005] To achieve the above purpose, the present invention provides the following technical solution: An encryption processing method for a logistics data record carrier based on a blockchain, the method comprising: S1. Generate a data digest through a hash operation on the logistics data to ensure data integrity; S2. Generate a corresponding public-private key pair based on the data digest and the asymmetric encryption algorithm for transmission regulation, including extracting the first field and the last field of the digest, converting them into ASCII codes and calculating the ASCII code difference, counting 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 the RSA or elliptic curve encryption algorithm ECC to generate a public-private key pair with structural responsiveness, realizing the coupling of the key and the data digest; S3. Encrypt the logistics data digest using the generated public key to form a ciphertext and record it in the blockchain node, including numbering the digest fields, setting the field encryption bit numbers, calculating the field encryption correction values, using the field encryption correction values to control the number of rounds or algorithm modes of the field encryption algorithm, performing encryption in sequence according to the magnitudes of the field encryption correction values to ensure that the encryption behavior responds sensitively to the field positions, writing the ciphertext into the blockchain node in a structured manner, and retaining the original field encryption correction values of each segment of data as audit indexes; S4. Decrypt the ciphertext in the node using the private key to verify the data authenticity and protect privacy.

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

[0007] Preferably, S4 includes decrypting the ciphertext in the blockchain to obtain the decrypted digest, comparing the decrypted digest with the original digest bit by bit, counting the number of completely identical bits, obtaining the total number of bits of the original digest, dividing the number of completely identical bits by the total number of bits of 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 authentic and not tampered with, if the data decryption success rate is less than the data decryption success rate threshold, triggering a data anomaly mark and writing it into the blockchain audit record.

[0008] Preferably, the specific steps for calculating the digest index of each field in S1 include dividing the existence time of the field by 1 plus the number of times the field appears in the data to obtain the digest index of the field.

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

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

[0011] Preferably, it further includes: Before generating the public-private key pair, first determine the key length K of the asymmetric encryption algorithm used, set the minimum key length P, and when K≥P, continue to execute the subsequent steps; Construct a security parameter λ for measuring the relationship between the encryption strength and the scale of the blockchain network, and the specific formula is: ; where λ represents the security parameter, K represents the key length, and M represents the number of nodes already deployed in the blockchain system; Set a security threshold θ. If λ≥θ, the private key will be used to encrypt and control the transmission process, and the security level of the communication channel will be raised to the highest security level supported by the system. If λ<θ, regenerate the public-private key pair and recalculate λ until λ≥θ.

[0012] Preferably, the logistics data in S1 includes one or more of order number, receiving and sending addresses, transportation time, goods type, temperature record, and geographic coordinate information.

[0013] Preferably, S3 also includes recording the original field number, number of encryption rounds, and correction value index for each ciphertext.

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

[0015] As can be seen from the above technical solutions, the present invention has the following beneficial effects: This encryption processing method for the logistics data record carrier based on blockchain realizes a dynamic key derivation mechanism based on the data structure by deeply coupling the logistics data digest with the generation of asymmetric keys. It not only improves the key personalization and anti-attack ability, but also simplifies the key distribution and update process. Secondly, by utilizing the decentralized and immutable characteristics of blockchain, it realizes the trustworthy sharing and tamper-proof recording of data among multiple nodes and platforms, avoids the systematic risks caused by single-point failures, and enhances the stability and transparency of the full life cycle management of data. Further, by combining the field encryption correction value with the ciphertext structured writing strategy, the encryption behavior has the field position perception ability and auditability, improves the compatibility and traceability of the data on the chain with the encryption logic, and effectively supports the refined configuration of permissions among multiple users. In addition, by introducing dynamic security control indicators such as security parameter λ and encryption success rate, it realizes the encryption adaptation and security level control for different node scales and data sensitivity levels, constructs a multi-dimensional, adjustable, and sensitive-response security mechanism, significantly improves the data security, privacy protection level, and on-chain trustworthy processing ability of the logistics information system, and has good technical popularization value and application prospects. Description of the Drawings

[0016] Figure 1 It is the flowchart of the method of the present invention. Detailed Embodiments

[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0018] As Figure 1 shown, the present invention provides a technical solution: a method for encrypting a logistics data record carrier based on a blockchain. The method includes: S1. Generate a data digest through hash operation on the logistics data to ensure data integrity; S2. Generate a corresponding public-private key pair based on the data digest and an asymmetric encryption algorithm for transmission control, including extracting the first and last fields of the digest, converting them to ASCII codes and calculating the ASCII code difference, counting 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 the RSA or Elliptic Curve Cryptography (ECC) algorithm to generate a public-private key pair with structural responsiveness, realizing the coupling of the key and the data digest; S3. Encrypt the logistics data digest with the generated public key to form a ciphertext and record it in the blockchain node, including numbering the digest fields, setting the field encryption bit number, calculating the field encryption correction value, using the field encryption correction value to control the number of rounds or algorithm mode of the field encryption algorithm, performing encryption in sequence according to the size of the field encryption correction value to ensure that the encryption behavior is sensitive to the field position, writing the ciphertext into the blockchain node in a structured manner, and retaining the original field encryption correction value of each segment of data as an audit index; S4. Decrypt the ciphertext in the node with the private key to verify data authenticity and protect privacy.

[0019] The encryption processing method aims to ensure the integrity, confidentiality, and verifiability of logistics data during transmission and storage. First, in step S1, a data digest is generated by performing a hash operation on the logistics data to ensure that it is not tampered with during data transmission and storage, serving as the basic input for subsequent encryption and authentication. In step S2, a public-private key pair for transmission control is constructed based on the generated data digest and an asymmetric encryption algorithm. Specifically, the first and last fields of the data digest are extracted, converted to ASCII codes, and the difference between them is calculated. Then, the average field length of all fields in the digest is statistically calculated to obtain the "span factor". This span factor is used as a seed perturbation value and input into the RSA algorithm or the Elliptic Curve Cryptography (ECC) algorithm to generate a public-private key pair in response to the structural characteristics, ensuring a high correlation between the key generation process and the data digest and realizing the coupling of the key and the data digest. In step S3, the generated public key is used to encrypt the data digest, and the ciphertext is recorded in the blockchain node after being formed. To improve the accuracy and sensitivity of the encryption structure, the digest fields are first numbered, and corresponding field encryption bit numbers are set. Further, the field encryption correction value for each field is calculated, which is used to control the number of rounds or the algorithm mode of the field encryption algorithm, thereby ensuring differential encryption processing for different fields. During the encryption process, the encryption operations are sequentially performed in the order of the magnitude of the field encryption correction values, making the encryption behavior structurally responsive to the field positions. The ciphertext is written into the blockchain node in a structured manner, and at the same time, the original field encryption correction value corresponding to each piece of data is retained as an index basis for future audit verification. Finally, in step S4, the ciphertext in the blockchain node is decrypted using the private key to verify the authenticity of the data digest, ensure that the data has not been tampered with, and at the same time effectively protect privacy. Throughout the process, the blockchain, as an immutable distributed ledger, cooperates with the structurally responsive key and the field-sensitive encryption mechanism to build a highly secure and highly controllable logistics data encryption record system.

[0020] The method of the present invention strengthens the uniqueness and structural adaptability of encryption by coupling the data digest with the key generation process, improving the ability of the key to resist attacks. The use of the field encryption correction mechanism realizes refined encryption control based on field positions, making the encryption structure have higher security sensitivity. Through the structured ciphertext record and the retention of the audit index field, the verifiability and traceability of the data are realized. Combining the immutable characteristics of blockchain technology effectively guarantees the security, integrity, and privacy of logistics data during transmission and storage, and improves the data credibility and regulatory ability of the logistics system.

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

[0022] This embodiment further optimizes and refines step S1 in 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, each logistics field is extracted, including but not limited to timestamp, location information, status identifier, operator information, etc. Next, the existence time of each field is statistically analyzed, that is, the time interval from the first occurrence to the last occurrence of the field, which is used to measure the influence range of the field's life cycle. Further, the total number of times each field appears in the entire set of logistics data is statistically analyzed, reflecting the importance and reuse frequency of the field. Subsequently, combining the field existence time and the number of occurrences, the digest index of each field is calculated. The digest index can be expressed in the form of a weighted function, such as digest index = existence time × number of occurrences. According to the calculation results, all fields are sorted from high to low according to the digest index value to form a structured digest sequence. This digest sequence is used as the hash input and is fed into a hash function (such as SHA-256 or SM3) to generate the final data digest for subsequent encryption processing, so that the digest result is more representative and verifiable of the data.

[0023] By introducing statistical means of field existence time and number of occurrences, the importance of each field to the overall logistics data can be quantified. Based on this, the digest index establishes an order evaluation criterion, making the generated digest not only have structural integrity but also highlight the core data features. Compared with traditional digest methods that order by field or hash by content, the digest structure generated by this method is more logical and sensitive, and can more effectively handle data perturbation and tampering detection. At the same time, by sorting the digest index, the randomness and information entropy of the hash input are further enhanced, improving the security and uniqueness of the data digest from the source, and providing a more robust basic data input for subsequent public-private key generation.

[0024] S4 includes decrypting the ciphertext in the blockchain to obtain the decrypted digest, comparing the decrypted digest with the original digest bit by bit, counting the number of bits that are exactly the same, obtaining the total number of bits of the original digest, dividing the number of bits that are exactly the same by the total number of bits of 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, it is determined that the data is real and not tampered with. If the data decryption success rate is less than the data decryption success rate threshold, a data anomaly flag is triggered and written into the blockchain audit record.

[0025] This implementation mode expands on step S4, enhancing the accuracy and automation of the decryption verification process. First, the private key is used to decrypt the ciphertext recorded in the blockchain node to recover the corresponding decryption digest. Then, the system compares this decryption digest bit by bit with the originally generated data digest, that is, checks whether each bit in the two digest bit strings is the same, and accumulatively counts the total number of bits that are exactly the same. Next, the total number of bits of the original digest is obtained, and a division operation is performed with this value as the denominator and the number of identical bits as the numerator to obtain the data decryption success rate, which quantitatively represents the degree of consistency between the decrypted data and the original digest. To determine whether the data has been tampered with, the system presets a decryption success rate threshold as the baseline for the trust standard. If the currently calculated decryption success rate is greater than or equal to this threshold, it can be considered that the data is authentic, complete, and not tampered with, and the verification process passes; otherwise, if it is lower than the threshold, the system automatically triggers the abnormal marking logic, marks the data as abnormal, and writes its relevant records (including timestamp, comparison result, ciphertext index, etc.) into the blockchain audit record for future query, analysis, and risk tracking.

[0026] Introducing the quantitative indicator of data decryption success rate effectively realizes the refined determination of data integrity. Compared with the traditional hash comparison success / failure binary result, it has stronger fault tolerance and response capabilities. Through the bit-by-bit comparison method, it can not only identify data tampering behaviors but also measure the degree of tampering, providing support for intelligent auditing and dynamic risk assessment. In addition, by setting a flexible success rate threshold, the system can adjust the verification sensitivity according to the security level of the application scenario, improving the adaptability of the method. The combination of abnormal marking and audit writing also ensures the traceability and compliance of the logistics data system, enhancing the security and transparency of the overall system.

[0027] The specific steps for calculating the summary index of each field in S1 include dividing the field existence time by 1 plus 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 of each field" in step S1 of claim 2, and proposes a calculation formula with stronger logical control ability. Based on extracting logistics fields, counting the field existence time and the number of times the field appears in the data, the formula "field summary index = field existence time ÷ (1 + the number of times the field appears in the data)" is adopted. By introducing "1 + the number of appearances" as the denominator term, the problem that high-frequency fields dominate the summary sorting is effectively avoided. This design suppresses fields with high frequencies but short life cycles, while low-frequency fields with longer life cycles can obtain higher summary indexes, so they are given higher sorting priorities in the subsequent summary sequence generation. This structural adjustment reflects the non-linear weighting mechanism of field importance, that is, by weakening the processing of frequent but volatile fields, the sensitivity of the summary to stable information is enhanced. After calculating the summary index of each field, the system sorts the fields in descending order according to the index value to obtain a summary sequence, and inputs it into the hash function to generate the final summary.

[0028] This calculation formula introduces "1 + the number of times the field appears in the data" as the denominator. While ensuring a non-zero divisor, it effectively balances the field frequency and time influence. Compared with traditional models that only perform multiplication or weighted processing, this fractional structure can significantly enhance the discriminant ability of the summary structure for field behavior characteristics. Its summary result can more reasonably reflect the relative importance of fields in the data life cycle, which helps to improve the recognition rate of the data summary for abnormal fields or low-frequency long-existing fields, and improve the integrity and security foundation of the data representation before encryption. In addition, the summary sequence formed based on this index has a higher information entropy, and the generated hash value also has stronger anti-collision ability, providing stronger support for subsequent encrypted structural matching.

[0029] 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. This embodiment further refines the S2 step in claim 1, clarifying the calculation path for generating the span factor. Specifically, after generating the data summary through hash operation, the first field and the last field are extracted from the summary and converted into ASCII codes, and the ASCII code difference between the two is calculated, representing the initial value of the structural span of the characters at both ends of the summary. Then, all summary fields are counted, the character length of each field is calculated, and further the average field length is obtained. Finally, the obtained ASCII code difference is divided by the average field length to obtain the "span factor". This span factor is input as the seed perturbation value of an asymmetric encryption algorithm (such as RSA or ECC), making the key generation process in the encryption algorithm highly coupled with the data summary structure. The introduction of the span factor realizes the construction mechanism of the public-private key pair with structural responsiveness by adjusting the degree of seed perturbation, enhancing the matching and exclusivity of the key pair for specific data summaries.

[0030] By calculating the span factor as "ASCII code difference ÷ average field length", the structural change characteristics in the data summary can be quantified into a floating parameter, enabling the key generation link to be sensitive to the boundary changes of the summary. Compared with the traditional random or fixed seed method, this method significantly improves the mapping ability of the key generation process to the original data structure, thus constructing a closer data-key coupling relationship. This mechanism enhances the unpredictability of the encryption process and improves the security, personalization, and anti-cracking ability of the overall data encryption system.

[0031] The specific steps for calculating the field encryption correction value in S3 include subtracting the field encryption bit number from the digest field number to obtain the field encryption correction value. This implementation details the S3 step in claim 1 and clarifies the calculation method of the field encryption correction value. In specific operations, first, number the digest fields of the logistics data to form a digest field number sequence, which represents the logical position of the fields in the digest. At the same time, to control the variation of the encryption operation among different fields, set a field encryption bit number for each field, usually defined based on the encryption key bit characteristics or custom rules of the field in the data structure. Subsequently, calculate the field encryption correction value for each field, that is, by subtracting its corresponding field encryption bit number from the digest field number. This field encryption correction value is used to regulate the number of rounds or algorithm mode of the encryption operation corresponding to this field. Specifically, adjust the encryption depth of the encryption algorithm (such as the number of AES rounds) or select different encryption strategies (such as switching encryption sub-keys) according to the numerical value of the field encryption correction value. During the encryption execution process, the system sorts the field encryption correction values from small to large and performs encryption processing in sequence to enhance the responsiveness of encryption to the field position and characteristics, thereby realizing structure sensitivity. After encryption is completed, the structured ciphertext is written into the blockchain node, and at the same time, the original field encryption correction values of each field are retained for use as an audit index.

[0032] Calculating the field encryption correction value through the difference between the digest field number and the field encryption bit number realizes a dynamic encryption mechanism driven by field position and structure information, effectively enhancing the customization ability and responsiveness of the encryption algorithm 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 an encryption sequence with structure sensitivity and fine-grained control. This mechanism not only improves the unpredictability and security of data encryption but also provides strong data identification support for the structured audit and tracking of ciphertext content.

[0033] It also includes that before generating the public-private key pair, first determine the key length K of the asymmetric encryption algorithm used, set the minimum key length P, and when K≥P, continue to execute the subsequent steps; Construct a security parameter λ for measuring the relationship between encryption strength and the scale of the blockchain network. The specific formula is: ; where λ represents the security parameter, K represents the key length, and M represents the number of nodes already deployed in the blockchain system; Set a security threshold θ. If λ≥θ, use the private key to encrypt and regulate the transmission process, and raise 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 λ≥θ.

[0034] This embodiment extends the security guarantee logic in the public-private key generation mechanism and introduces a multi-dimensional security evaluation model before starting the asymmetric encryption algorithm. First, before preparing to generate a 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 system continues to enter the encryption initialization process. At this time, to adapt the key generation to the actual operating environment of the blockchain system, a security parameter λ is introduced as a regulatory indicator, and its functional relationship is expressed as λ = f(K, M), where M is the number of valid nodes in the current blockchain system. This security parameter λ is used to measure the matching degree between the key length K and the number of system nodes M, thereby reflecting the anti-attack ability 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 regulate the transmission process, and the security level of the communication channel is raised to the highest level supported by the system; if λ is less than θ, the system will regenerate a new key pair and evaluate λ again until the security standard is met before entering the normal data encryption process.

[0035] This embodiment extends the security guarantee logic in the public-private key generation mechanism and introduces a multi-dimensional security assessment model before the asymmetric encryption algorithm is started. First, before preparing to generate a 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. For example, RSA should be no less than 2048 bits, and ECC should be no less than 256 bits. It can also be dynamically set according to the recommended value returned by the currently used encryption library. Subsequently, a minimum key length P is set to establish the basic security threshold of the system. A typical value is, for example, P = 2048 (bits). If K≥P, the subsequent steps are continued. To match the key strength with the actual running scale of the blockchain, a security parameter λ is introduced, usually defined in the form of λ = K / log2(M), where M represents the number of currently active nodes in the blockchain system, and this value can be obtained in real time through the network status synchronization module. This formula reflects the logarithmic strength ratio of the encryption strength K to the number of paths M through which the network can be broken, ensuring that the key length increases synchronously with the expansion of the network scale, thus avoiding the problem of "weak keys in a large network". The system presets a security threshold θ as a judgment criterion. A typical value is, for example, θ = 300 (which can be appropriately adjusted according to security policies). If the calculated λ≥θ, the system determines that the current key security level meets the requirements, and will use this 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 means 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 ability before key generation, but also ensures that each generated key pair meets the minimum encryption security standard required by the current blockchain system topology through a dynamic iteration mechanism.

[0036] This mechanism realizes the dynamic adaptation between the encryption strength and the blockchain network topology by establishing the security parameter λ, effectively avoiding the problem of key strength imbalance caused by node expansion. Compared with the traditional fixed key strategy, this method has stronger system adaptability and security elasticity, especially suitable for the scenarios of consortium chains or private chains with dynamically changing node numbers. At the same time, by introducing the key length verification and automatic key regeneration mechanism, it ensures that any key pair entering the network at any time meets the current system minimum security standard, reducing the security risks caused by inconsistent keys. In addition, the dynamic security assessment mechanism can also provide a higher level of encryption guarantee for smart contract scheduling and high-frequency communication between nodes, enhancing the anti-listening and anti-interference capabilities of data transmission.

[0037] The logistics data in S1 includes one or more of the order number, shipping and receiving addresses, transportation time, goods type, temperature record, and geographic coordinate information. This embodiment provides a specific data structure description for the S1 step in claim 1, clarifying the types of logistics data that can be used for generating the encrypted digest. When executing the S1 step, the system first extracts the original data fields for encryption processing from the logistics information platform or the sensing and acquisition system. These fields may include, but are not limited to: Order number: The primary key number used to uniquely identify the logistics task; Shipping and receiving addresses: Including the shipper's address and the consignee's address, identifying the spatial path; Transportation time: Recording the departure time of the logistics and the expected / actual arrival time; Goods type: Such as medicine, electronic products, cold chain food, etc., indicating the attributes of the transported content; Temperature record: Mainly used in the cold chain logistics scenario to record the temperature of the goods; Geographic coordinate information: Collected by GPS or Beidou devices, recording the location of the transportation track. The system extracts and forms an initial set of logistics data fields based on the above field contents, serving as the input source for subsequent hash digest operations. To improve the entropy of the digest information and the anti-tampering ability, multiple types of information from the above fields can be combined and selected for joint digest. The field selection strategy can be set according to business importance, compliance requirements, or user-defined configurations. During the construction of the digest, each field is regarded as an independent digest sub-unit, participating in the statistics of the field existence time, the analysis of the occurrence times, the calculation of the digest index, and finally synthesizing the digest sequence to input into the hash function to generate the digest.

[0038] By clarifying the source and field types of the logistics data, the system has configurability and domain adaptability in the digest generation stage, which is conducive to strengthening security control as needed. Introducing dynamic perception information such as temperature records and geographic coordinates into the digest calculation significantly enhances the verifiability of the data in the time and space dimensions, and is applicable to highly sensitive industry scenarios such as cold chain security and drug transportation. The diversity and selectivity of the field structure also improve the flexibility of the system, enabling different business systems to build customized encrypted digest processes according to their respective data characteristics, enhancing the modularity and scalability of the system.

[0039] S3 also includes recording the original field number, encryption round number, and correction value index for each ciphertext. This embodiment supplements the S3 step in claim 1 and enhances the binding and recording capability between the ciphertext and the field metadata. In the process of encrypting the logistics data summary to generate the ciphertext, in addition to completing the encryption operation, the system also attaches and records the encryption metadata for each ciphertext field, including: the original field number: that is, the number position of the logistics data field corresponding to the ciphertext in the summary; the number of encryption rounds: indicates the algorithm rounds executed by the field during the encryption process, which is usually related to the field encryption correction value; the correction value index: the index position of the field in the field encryption correction value set, which is used to identify its priority in the overall encryption control sequence. The above information is structured and written into the blockchain node together with the ciphertext in the encryption stage, so that each ciphertext data not only has content encryption protection, but also comes with the corresponding encryption parameter record. This record can be used as an audit basis, and can also be used for data tracking, decryption restoration and abnormal traceability analysis. All metadata and ciphertext are bound through data structures to ensure that the ciphertext parsing and decryption process has contextual integrity.

[0040] By recording the original field number, encryption round number and correction value index for each ciphertext, the data structure transparency and ciphertext traceability of the system are significantly enhanced. This mechanism can be used to achieve fast mapping and field restoration during decryption verification, and is also convenient for reconstructing key usage trajectories and encryption logic judgments during security audits. At the same time, based on the encryption round number and correction value index information, the encryption strength of the ciphertext field can also be dynamically evaluated to achieve classified protection and security grading of sensitive data fields. In addition, this structured recording scheme improves the organization of ciphertext data, which helps support future data governance, smart contract constraint execution and multi-source data reconciliation.

[0041] In S2, using the span factor as the seed perturbation value of the asymmetric encryption algorithm further includes using the fractional part of the span factor as the curve selection parameter, displacement offset value, or seed randomization factor of the key generation algorithm. Based on the S2 step in Claim 1, this embodiment further deepens the action mechanism of the span factor in the key generation process. Specifically, after calculating the span factor through 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 respectively used for different encryption parameter configurations. In particular, due to its narrow range of variation and high sensitivity, the fractional part is suitable as a perturbation factor for controlling the internal details of the asymmetric encryption algorithm. The specific application methods include the following: Curve selection parameter: When using the Elliptic Curve Cryptography (ECC) algorithm, the fractional part can be used as the selection weight or index in the candidate elliptic curve family for dynamically selecting the optimal elliptic curve to achieve the diversity of the key curve structure; Displacement offset value: In key generation, the fractional part can be introduced into the modulo operation or displacement function as an offset to control the position perturbation of the random number seed or the key stream generation logic, improving the non-repetitiveness of the key; Seed randomization factor: It is used to affect the initial seed perturbation of key generation, enhancing the unpredictability of the key seed and making the key generation process highly sensitive to the changes in the details of the input data. Seed randomization factor: It is used to affect the initial seed perturbation of key generation, enhancing the unpredictability of the key seed and making the key generation process highly sensitive to the changes in the details of the input data. By introducing the perturbation ability of the fractional part, the system can further improve the complexity and personalization level of key generation on the original basis, and construct a public-private key pair that is dynamically linked to the digest structure.

[0042] This mechanism effectively introduces the fractional part of the span factor into the underlying perturbation logic of the asymmetric encryption algorithm, enabling the key generation process to not only respond to the overall characteristics of the digest but also produce different responses to the microscopic changes in the fields. Compared with the single integer perturbation value control method, the fractional perturbation mechanism can significantly enhance the nonlinearity and diversity of the key generation path, thereby improving the system's ability to resist brute-force cracking and key prediction attacks. By controlling multiple encryption parameters such as curve selection, offset displacement, and seed random factor, the present invention realizes a refined and multi-dimensional key construction scheme, enhancing the security strength and flexible configuration ability of the overall encryption system.

[0043] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for encrypting a logistics data recording carrier based on a blockchain, characterized in that The method includes: S1. Generate a data digest through hash operation on the logistics data to ensure data integrity; S2. Generate corresponding public and private key pairs based on the data digest and the asymmetric encryption algorithm for transmission control, including extracting the first field and the last field of the digest, converting them into ASCII codes and calculating the ASCII code difference, counting 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 the RSA or Elliptic Curve Cryptography (ECC) algorithm to generate public and private key pairs with structural responsiveness, thus realizing the coupling of the key and the data digest; S3. Encrypt the logistics data digest using the generated public key to form ciphertext and record it in the blockchain node, including numbering the digest fields, setting the field encryption bit number, calculating the field encryption correction value, using the field encryption correction value to control the number of rounds or the algorithm mode of the field encryption algorithm, performing encryption in sequence according to the size of the field encryption correction value to ensure that the encryption behavior is sensitive to the field position, writing the ciphertext into the blockchain node in a structured manner, and retaining the original field encryption correction value of each segment of data as the audit index; S4. Decrypt the ciphertext in the node using the private key to verify data authenticity and protect privacy.

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

3. The encryption processing method for the logistics data recording carrier based on blockchain according to claim 1, wherein: The S4 includes decrypting the ciphertext in the blockchain to obtain the decrypted digest, comparing the decrypted digest with the original digest bit by bit, counting the number of completely identical bits, obtaining the total number of bits of the original digest, dividing the number of completely identical bits by the total number of bits of 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, it is determined that the data is authentic and has not been tampered with. If the data decryption success rate is less than the data decryption success rate threshold, trigger a data anomaly flag and write it into the blockchain audit record.

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

5. The encryption processing method for the logistics data record carrier based on blockchain according to claim 1, characterized in that: The specific steps for calculating the span factor in S2 include dividing the ASCII code difference by the average field length of all digest fields to obtain the span factor.

6. The encryption processing method for the logistics data record carrier based on blockchain according to claim 1, wherein: The specific steps for calculating the field encryption correction value in S3 include subtracting the field encryption bit number from the digest field number to obtain the field encryption correction value.

7. The encryption processing method for the logistics data record carrier based on blockchain according to claim 1, wherein, It also includes: Before generating the public and private key pairs, first determine the key length K of the asymmetric encryption algorithm used, set the minimum key length P, and when K≥P, continue to execute the subsequent steps; Construct a security parameter λ for measuring the relationship between encryption strength and the scale of the blockchain network, with the specific formula being: ; where λ represents the security parameter, K represents the key length, and M represents the number of nodes already deployed in the blockchain system; Set a security threshold θ. If λ≥θ, use the private key to encrypt and control the transmission process, and raise the security level of the communication channel to the highest security level supported by the system; If λ<θ, regenerate the public and private key pairs and recalculate λ until λ≥θ.

8. The encryption processing method for the logistics data recording carrier based on blockchain according to claim 1, characterized in that: The logistics data in S1 includes one or more of order number, receiving and sending addresses, transportation time, goods type, temperature record, and geographic coordinate information.

9. The encryption processing method for the logistics data record carrier based on blockchain according to claim 1, characterized in that: S3 further includes recording the original field number, number of encryption rounds, and correction value index for each ciphertext.

10. The method for encrypting and processing a logistics data recording carrier based on blockchain according to claim 1, wherein: Using the span factor as the seed perturbation value of the asymmetric encryption algorithm in S2 further includes using the fractional part of the span factor as the curve selection parameter, displacement offset value, or seed randomization factor of 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

  • Semi-homomorphic encryption Internet of Things privacy protection scheme based on block chain

    CN118473635A

  • Encryption method, device and equipment for industrial internet data exchange and medium

    CN119520022A

  • Distributed storage method and system for data security

    CN119720256A