Blockchain-based intelligent tracking and anti-counterfeiting system for cross-border logistics
By using blockchain technology and segmented encrypted digital anti-counterfeiting codes, combined with package feature recognition and environmental monitoring, the problems of information sharing difficulties and low anti-counterfeiting efficiency in cross-border logistics have been solved, realizing reliable sharing of logistics information and full-process tracking, and improving the security and reliability of cross-border logistics.
Patent Information
- Application Number
- CN202511266299.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Cross-border logistics tracking systems suffer from data silos and difficulties in information exchange. Traditional anti-counterfeiting technologies are inefficient and prone to oversights, and environmental monitoring strategies cannot be dynamically adjusted, making it difficult to meet the security requirements of cross-border logistics.
By using blockchain technology to achieve trusted recording and sharing of logistics information, combined with package feature recognition and environmental monitoring, and through segmented encrypted digital anti-counterfeiting codes and real-time feature comparison, the environmental monitoring threshold is dynamically adjusted, and the anti-counterfeiting verification results and environmental adjustment results are integrated to plan the optimal logistics route and generate node proof.
It improves the credibility and tracking efficiency of cross-border logistics information, ensures the accuracy and timeliness of anti-counterfeiting verification, enables a comprehensive assessment of logistics risks, establishes a complete logistics trajectory tracking chain, and ensures the authenticity and continuity of tracking information.
Smart Images

Figure CN120806802B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cross-border logistics intelligent tracking and anti-counterfeiting, in particular to a cross-border logistics intelligent tracking and anti-counterfeiting system based on a blockchain. BACKGROUND
[0002] With the rapid development of cross-border e-commerce, the tracking and anti-counterfeiting demand of cross-border logistics is increasingly prominent. The existing cross-border logistics tracking scheme mainly relies on the code scanning records of logistics nodes, which is prone to information lag, track disconnection and other problems. At the same time, the traditional anti-counterfeiting technology mainly relies on manual inspection, which is low in efficiency and prone to omissions, and is difficult to meet the security demand in the cross-border logistics scenario.
[0003] The current logistics tracking system generally has the problem of data island, and the information collected by each logistics node is difficult to realize interconnection and sharing, resulting in insufficient completeness and credibility of the tracking information. In addition, due to the lack of unified verification standards and credible record mechanism, the logistics package is prone to security risks such as cargo switching and information tampering during cross-border transportation.
[0004] The existing logistics environment monitoring scheme mainly uses fixed threshold for judgment, which cannot dynamically adjust the monitoring strategy according to the characteristics of different packages, resulting in unsatisfactory environmental protection effect. At the same time, there is a lack of correlation analysis between environmental abnormal conditions and anti-counterfeiting verification results, making it difficult to comprehensively evaluate the logistics risk and timely adjust the transportation scheme. SUMMARY
[0005] The purpose of the present application is to provide a cross-border logistics intelligent tracking and anti-counterfeiting system based on a blockchain, which realizes the credible record and sharing of logistics information through blockchain technology, combines package feature recognition and environment monitoring technology, and establishes an intelligent tracking and anti-counterfeiting mechanism to solve the technical problems of poor information credibility, low tracking efficiency and weak anti-counterfeiting capability in cross-border logistics.
[0006] In the first aspect, the cross-border logistics intelligent tracking and anti-counterfeiting method based on a blockchain provided in the embodiments of the present application includes the following steps:
[0007] Collecting feature information of a logistics package to obtain a package feature identifier, submitting the package feature identifier to a blockchain network and generating a smart contract;
[0008] Segmenting and encrypting the package feature identifier to obtain a digital anti-counterfeiting code, re-collecting the package feature information during the logistics transportation process and generating a verification identifier, comparing the verification identifier with the decrypted feature identifier of the digital anti-counterfeiting code, and generating an anti-counterfeiting verification result;
[0009] Collecting environment data of a logistics package in transit, determining an environment monitoring threshold according to a package characteristic identifier, executing an environment adjustment strategy when the environment data in transit exceeds the environment monitoring threshold and recording the adjustment result, updating the environment monitoring threshold based on the adjustment result;
[0010] Determining a logistics risk level according to the anti-fake verification result and the environment adjustment result, and determining an optimal logistics path from a preset path library according to the logistics risk level;
[0011] Planning a verification strategy for a logistics node according to the optimal logistics path, generating a node proof, updating a logistics track in a smart contract according to the node proof, tracking and verifying the package characteristic identifier based on the logistics track.
[0012] Further,
[0013] Collecting characteristic information of a logistics package to obtain a package characteristic identifier, submitting the package characteristic identifier to a blockchain network and generating a smart contract, including:
[0014] Collecting surface images of a logistics package to obtain appearance characteristic information, extracting weight distribution of the logistics package to obtain structural characteristic information, and segmenting and encoding the appearance characteristic information and the structural characteristic information to obtain the package characteristic identifier;
[0015] Dividing a package level based on the package characteristic identifier, determining a differentiated detection time interval according to the package level, and re-collecting package characteristics at each detection time point to generate a detection characteristic identifier;
[0016] Comparing the detection characteristic identifier with the original package characteristic identifier, confirming the package integrity when the comparison result is within a preset error range, and triggering an abnormal marker when the comparison result exceeds the preset error range, the abnormal marker including abnormal characteristic position information;
[0017] Determining a package damage risk level according to the abnormal marker, adjusting a subsequent detection time interval based on the risk level, submitting the adjusted detection strategy and the package characteristic identifier to a blockchain network, and the blockchain network generating a smart contract according to the package characteristic identifier and the detection strategy.
[0018] Further,
[0019] Segmenting and encrypting the package characteristic identifier to obtain a digital anti-fake code, re-collecting package characteristic information during the logistics transportation process and generating a verification identifier, comparing the verification identifier with the characteristic identifier decrypted from the digital anti-fake code, and generating an anti-fake verification result, including:
[0020] The parcel feature identification is segmented, the appearance feature information is divided into color segments and texture segments, the structure feature information is divided into gravity center segments and quality segments, and the correlation mapping between the segments is established through the feature index;
[0021] The color segments and the texture segments are reversibly encrypted according to the segmented feature types, the gravity center segments and the quality segments are homomorphically encrypted, the encrypted segments are combined according to the correlation of the feature index to obtain a digital anti-counterfeiting code;
[0022] In the logistics transportation process, the parcel feature information is re-collected, the collected parcel feature information is segmented according to the correlation mapping of the feature index, and a verification identification with the same segmented structure as the digital anti-counterfeiting code is generated;
[0023] The digital anti-counterfeiting code is decrypted using the correlation mapping of the feature index, the original feature identification obtained by decryption is matched with the verification identification in segments, and an anti-counterfeiting verification result is generated.
[0024] Further,
[0025] The in-transit environment data of the logistics parcel is collected, the environment monitoring threshold is determined according to the parcel feature identification, the environment adjustment strategy is executed and the adjustment result is recorded when the in-transit environment data exceeds the environment monitoring threshold, and the environment monitoring threshold is updated based on the adjustment result, comprising:
[0026] The initial environment sensitive value is determined from the appearance feature information and the structure feature information in the parcel feature identification, the environment sensitive value is accumulated and superimposed according to the logistics transportation time, and the superimposed environment sensitive value is converted into the environment monitoring threshold;
[0027] The in-transit environment data of the logistics parcel is collected, the real-time change and the cumulative change of the in-transit environment data are calculated, and the environment is determined to be abnormal when any change exceeds the environment monitoring threshold;
[0028] The parameter combination with the best adjustment effect is selected from the historical adjustment record to execute the environment adjustment strategy, and the change trend of the in-transit environment data during strategy execution is recorded to obtain the adjustment result;
[0029] The environment sensitive value is recalculated according to the change trend of the environment data in the adjustment result, the environment monitoring threshold is updated based on the new environment sensitive value, and the updated threshold and the adjustment effect are recorded in the historical adjustment record.
[0030] Further,
[0031] The logistics risk level is determined according to the anti-counterfeiting verification result and the environment adjustment result, and the optimal logistics path is determined from the preset path library according to the logistics risk level, comprising:
[0032] Obtaining an anti-counterfeit identification state in an anti-counterfeit verification result, calculating an identification integrity coefficient, obtaining a time attenuation coefficient based on a verification time interval, and taking the product of the integrity coefficient and the time attenuation coefficient as an anti-counterfeit risk score;
[0033] Obtaining environmental parameter data in an environmental adjustment result, taking the anti-counterfeit risk score as a reference value, adjusting the reference value according to a continuous change amount of the environmental parameter, and obtaining a comprehensive risk score;
[0034] Comparing the comprehensive risk score with a preset risk interval to obtain a logistics risk level, predicting a change direction of the logistics risk level based on a historical change sequence of the comprehensive risk score, and obtaining a logistics risk prediction result;
[0035] Extracting a candidate logistics path from a preset path library, calculating a matching degree of the candidate logistics path according to the logistics risk prediction result, and determining the candidate logistics path with the highest matching degree as an optimal logistics path.
[0036] Further,
[0037] Comparing the comprehensive risk score with a preset risk interval to obtain a logistics risk level, predicting a change direction of the logistics risk level based on a historical change sequence of the comprehensive risk score, and obtaining a logistics risk prediction result including:
[0038] Obtaining a historical change sequence of the comprehensive risk score, calculating a comprehensive risk score difference value of adjacent time points to obtain a fluctuation sequence, identifying a risk turning point based on the fluctuation sequence, and obtaining a fluctuation feature of the comprehensive risk score;
[0039] Analyzing the fluctuation feature, obtaining a periodic change feature based on a frequency domain, obtaining a trend change feature based on a time domain, and combining the periodic change feature and the trend change feature to obtain a risk evolution feature;
[0040] Analyzing a distribution rule of the comprehensive risk score based on the risk evolution feature, determining a demarcation value of a preset risk interval, and mapping the comprehensive risk score to a logistics risk level according to the demarcation value;
[0041] Analyzing the logistics risk level, calculating a stability feature of the logistics risk level by calculating a residence time length, calculating a conversion feature by calculating a conversion relationship between adjacent levels, and combining the stability feature and the conversion feature to obtain a risk prediction basis;
[0042] Comparing a deviation degree of the comprehensive risk score and the demarcation value with a preset deviation threshold, determining a change direction of the logistics risk level based on the risk prediction basis when a warning condition is met, and obtaining a logistics risk prediction result.
[0043] Further,
[0044] A verification strategy of a logistics node is planned according to an optimal logistics path, and a node certificate is generated, and a logistics track in a smart contract is updated according to the node certificate, and tracking verification of a package characteristic identifier includes:
[0045] Logistics node information in the optimal logistics path is acquired, a verification time interval is determined based on a distance between adjacent logistics nodes, a verification weight is calculated according to a risk level of the logistics node, and a verification strategy of the logistics node is generated;
[0046] The collection dimension of the verification data is determined according to the verification weight, the verification data is collected at the logistics node according to the verification time interval, and logistics node data meeting the verification strategy is generated;
[0047] The logistics node data is processed in layers, the data integrity feature and the verification determination result are combined to generate a basic certificate, the device signature and the timestamp are added to the basic certificate, and the logistics node certificate is constructed;
[0048] The logistics node certificate is submitted to a blockchain network, a consensus node verifies the logistics node certificate according to the verification strategy, and a verification result is generated;
[0049] The verification result is submitted to a smart contract, and when the verification is passed, the logistics node certificate is written into a block, the logistics track in the smart contract is updated according to the time sequence of the logistics node certificate, and the package characteristic identifier is tracked and verified based on the updated logistics track.
[0050] In a second aspect, the cross-border logistics intelligent tracking and anti-fake system based on a blockchain provided in the embodiments of the present application includes:
[0051] A feature collection module is configured to collect feature information of a logistics package to obtain a package characteristic identifier, and submit the package characteristic identifier to a blockchain network and generate a smart contract;
[0052] An anti-fake verification module is configured to perform segmented encryption processing on the package characteristic identifier to obtain a digital anti-fake code, re-collect feature information of the package during logistics transportation and generate a verification identifier, compare the verification identifier with the decrypted feature identifier of the digital anti-fake code, and generate an anti-fake verification result;
[0053] An environment monitoring module is configured to collect in-transit environment data of the logistics package, determine an environment monitoring threshold according to the package characteristic identifier, execute an environment adjustment strategy when the in-transit environment data exceeds the environment monitoring threshold, and record an adjustment result, and update the environment monitoring threshold based on the adjustment result;
[0054] A path planning module is configured to determine a logistics risk level according to the anti-fake verification result and the environment adjustment result, and determine an optimal logistics path from a preset path library according to the logistics risk level;
[0055] The trajectory verification module is configured to plan a verification strategy of the logistics node according to the optimal logistics path, and generate a node certificate, and update the logistics trajectory in the smart contract according to the node certificate, and track and verify the package characteristic identifier.
[0056] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in any of the preceding methods when executing the computer program.
[0057] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the processor implements the steps in any of the preceding methods when executing the computer program.
[0058] Advantages of the present application:
[0059] The present application realizes tamper-proof storage and trusted sharing of logistics information by submitting the package characteristic identifier to the blockchain network and generating a smart contract. The accuracy and timeliness of the anti-counterfeiting verification are improved by using the segmented encryption digital anti-counterfeiting code combined with real-time feature comparison. The environmental monitoring threshold is dynamically adjusted based on the package characteristic identifier, so that the environmental protection strategy is more targeted. The anti-counterfeiting verification result and the environmental adjustment result are fused and analyzed to realize comprehensive evaluation of the logistics risk and provide a reliable basis for path optimization. By collecting multi-dimensional verification data at the logistics node and generating a node certificate, a complete logistics trajectory tracking chain is established. The node certificate updates the logistics trajectory in the smart contract after being verified by the blockchain network, ensuring the authenticity and continuity of the tracking information. The present application solves the technical problems of low information credibility, broken tracking chain and poor anti-counterfeiting verification efficiency in cross-border logistics, and improves the tracking and anti-counterfeiting capability of cross-border logistics.
[0060] The above summary of the application is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the contents of the specification can be implemented, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0061] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not considered as limiting the present application. Moreover, the same reference symbols are used to denote the same components throughout the drawings.
[0062] Figure 1A flowchart of the blockchain-based cross-border logistics intelligent tracking and anti-counterfeiting method provided for the embodiment of the present application is shown in the figure.
[0063] Figure 2 A structural schematic diagram of the blockchain-based cross-border logistics intelligent tracking and anti-counterfeiting system provided for the embodiment of the present application is shown in the figure.
[0064] Figure 3 A structural schematic diagram of the electronic device provided for the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0065] To make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments, and it should be understood that the specific embodiments described herein are only the best mode of the present application, which are used to explain the present application and do not limit the protection scope of the present application, and all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0066] Before discussing the example embodiments in more detail, it should be mentioned that some of the example embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict the operations (or steps) as sequential processes, many of the operations (or steps) can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The processes can be terminated when their operations are completed, but can also have additional steps not included in the drawings; the processes can correspond to methods, functions, procedures, subroutines, etc.
[0067] The terms "first", "second", "third", "fourth" and the like (if any) in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. It should also be understood that in various embodiments of the present application, the size of the serial number of the processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0068] It should be understood that in this invention, "multiple" refers to two or more. "And / or" is merely a variable relationship describing the related objects, indicating that three relationships can exist. For example, "and / or B" can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "Contains A, B, and C", "Contains A, B, and C" means that all three A, B, and C are contained; "Contains A, B, or C" means that one of A, B, and C is contained; "Contains A, B, and / or C" means that any one, two, or three of A, B, and C are contained.
[0069] It should be understood that in this invention, "B corresponding to A", "B corresponding to A", "A and B correspond", or "B and A correspond" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. Matching A and B is defined as a similarity between A and B that is greater than or equal to a preset threshold.
[0070] Example 1
[0071] like Figure 1 As shown, Figure 1 A flowchart illustrating a blockchain-based intelligent tracking and anti-counterfeiting method for cross-border logistics provided in this invention. The method includes the following steps:
[0072] Collect the feature information of logistics packages to obtain package feature identifiers, submit the package feature identifiers to the blockchain network and generate smart contracts;
[0073] The package feature identifier is segmented and encrypted to obtain a digital anti-counterfeiting code. Package feature information is re-collected during logistics transportation and a verification identifier is generated. The verification identifier is compared with the feature identifier after the digital anti-counterfeiting code is decrypted to generate an anti-counterfeiting verification result.
[0074] Collect environmental data of logistics parcels in transit, determine environmental monitoring thresholds based on parcel feature identifiers, execute environmental adjustment strategies and record adjustment results when in-transit environmental data exceeds environmental monitoring thresholds, and update environmental monitoring thresholds based on the adjustment results.
[0075] The logistics risk level is determined based on the anti-counterfeiting verification results and environmental adjustment results, and the optimal logistics route is determined from the preset route library based on the logistics risk level.
[0076] The verification strategy for logistics nodes is planned according to the optimal logistics route, and node proofs are generated. The logistics trajectory in the smart contract is updated according to the node proofs, and the package feature identifiers are tracked and verified based on the logistics trajectory.
[0077] Furthermore,
[0078] The step of collecting feature information of the logistics package to obtain a package feature identifier, submitting the package feature identifier to a blockchain network, and generating a smart contract includes:
[0079] Collecting surface images of the logistics package to obtain appearance feature information, extracting weight distribution of the logistics package to obtain structural feature information, and segmenting and encoding the appearance feature information and the structural feature information to obtain a package feature identifier;
[0080] Based on the package feature identifier, the package level is divided, and the differentiated detection time interval is determined according to the package level. The package features are re-collected at each detection time point to generate a detection feature identifier;
[0081] The detection feature identifier is compared with the original package feature identifier. When the comparison result is within a preset error range, the package integrity is confirmed. When the comparison result exceeds the preset error range, an abnormal mark is triggered. The abnormal mark includes abnormal feature position information.
[0082] According to the abnormal mark, the package damage risk level is determined, and the subsequent detection time interval is adjusted based on the risk level. The adjusted detection strategy is submitted to the blockchain network together with the package feature identifier. The blockchain network generates a smart contract according to the package feature identifier and the detection strategy.
[0083] In this embodiment, first, feature information of the logistics package is collected to generate a package feature identifier. The feature collection process uses a high-definition camera device to take pictures of the package surface from multiple angles to obtain appearance feature information of the package, including texture features, color distribution, label position, and possible special marks on the package surface. The resolution of the collection device is not less than 12 million pixels, ensuring the capture of small details on the package surface. Image enhancement techniques are applied to the collected images to improve contrast and clarity, and then key visual feature points are extracted using a feature extraction algorithm. This algorithm is based on edge detection and texture analysis techniques and can identify unique texture patterns on the package surface. The number of extracted feature points is usually between 300-500.
[0084] At the same time, the package is weighed and analyzed using a weight sensing array to obtain weight distribution data as structural feature information. The sensing array is composed of 16x16 high-precision pressure sensors with an accuracy of ±0.5 grams, which can capture the spatial distribution of the items inside the package. By analyzing the pressure distribution of the package at different positions, a three-dimensional weight distribution map of the package is generated, which can reflect the internal structural characteristics of the package.
[0085] The collected appearance feature information and structural feature information are segmented and encoded to obtain a package feature identifier. During the encoding process, the appearance feature information is encoded using 64 bits, of which the first 32 bits represent the main visual features and the last 32 bits represent the secondary visual features; the structural feature information is encoded using 32 bits, representing the weight distribution features. Finally, a 96-bit package feature identifier code is formed, which has uniqueness and tamper resistance.
[0086] Based on the package feature identifier, the package level is divided, and the package is divided into three levels A, B and C according to the value, risk level and logistics requirements of the package. The A-level package is high-value or fragile goods, the B-level package is medium-value goods, and the C-level package is regular goods. Different levels of packages set different detection time intervals: A-level package is detected every 4 hours, B-level package is detected every 8 hours, and C-level package is detected every 24 hours. At each detection time point, the package features are re-collected and the detection feature identifier is generated.
[0087] During the detection process, the detection feature identifier is compared and analyzed with the original package feature identifier. The comparison uses a feature similarity calculation method to calculate the Hamming distance between the two feature identifiers. When the Hamming distance is less than the preset threshold (usually set to 5% of the total number of bits, i.e. 5 bits), the package integrity is confirmed; when the Hamming distance is greater than the preset threshold, an abnormality flag is triggered. The abnormality flag contains abnormal feature position information, which accurately locates the abnormal part of the package. For example, in one detection, it is found that the appearance feature of a certain B-level package from the 25th to the 28th does not match the original feature, generating an abnormality flag "B-V-25-28", indicating that the visual feature of the B-level package from the 25th to the 28th is abnormal.
[0088] According to the abnormality flag, the risk level of the package damage is determined, which is divided into three levels: low risk, medium risk and high risk. Low risk means that the package has a slight change but does not affect the safety of the contents; medium risk means that the package may be slightly damaged; high risk means that the package may have been severely damaged or tampered with. Based on the risk level, the subsequent detection time interval is adjusted: the original detection frequency is maintained under low risk; the detection frequency is doubled under medium risk; the detection frequency is increased fourfold under high risk and a warning notice is sent.
[0089] The adjusted detection strategy and the package feature identifier are submitted to the blockchain network together. The blockchain network adopts a consortium chain structure and is jointly maintained by logistics enterprises, customs departments and trade parties. The submitted data includes package feature identifier, detection strategy, timestamp and location information. After receiving the data, the blockchain network automatically generates a smart contract containing the following clauses: package feature identifier verification rules, detection time arrangement, abnormality handling process and responsibility division clauses.
[0090] After the smart contract is deployed to the blockchain network, it will automatically trigger a detection request at the preset detection time point. After receiving the request, the logistics node performs package feature collection and submits the results to the smart contract for verification. After verification, the smart contract automatically records the package state information; if the verification fails, the smart contract records the abnormal information and triggers the early warning mechanism.
[0091] For example, a batch of cross-border electronic products is monitored during transportation. The initial feature identification is "0101...1010" (96-bit complete encoding), and 8-hour detection is set. At the third detection, it is found that the 5-8 bits of the package weight distribution feature have changed, with a Hamming distance of 4, which is within the preset error range, and is determined to be a low-risk anomaly. Record the anomaly and maintain the original detection frequency. At the fifth detection, it is found that the package appearance feature and weight distribution have changed significantly, with a Hamming distance of 12, which exceeds the preset error range, and is determined to be a high-risk anomaly. The detection frequency is adjusted to 2 hours, and a warning notice is sent to the relevant parties. In this way, the risk of replacing the contents of the package during the logistics process is successfully prevented.
[0092] This method realizes the whole-process traceability, tamper resistance and anomaly warning of logistics packages, improves the security and reliability of cross-border logistics, and provides strong technical support for cross-border trade.
[0093] Further,
[0094] The package feature identification is segmented and encrypted to obtain a digital anti-counterfeit code. The package feature information is re-collected during the logistics transportation process and an authentication identification is generated. The authentication identification is compared with the decrypted feature identification of the digital anti-counterfeit code to generate an anti-counterfeit verification result, including:
[0095] The package feature identification is segmented, the appearance feature information is divided into color segments and texture segments, and the structure feature information is divided into center of gravity segments and quality segments. The correlation mapping between the segments is established through the feature index;
[0096] According to the segmented feature types, the color segments and the texture segments are reversibly encrypted, and the center of gravity segments and the quality segments are homomorphically encrypted. The encrypted segments are combined according to the correlation relationship of the feature index to obtain a digital anti-counterfeit code;
[0097] During the logistics transportation process, the package feature information is re-collected, and the collected package feature information is segmented according to the correlation mapping of the feature index to generate an authentication identification with the same segmented structure as the digital anti-counterfeit code;
[0098] The digital anti-counterfeit code is decrypted using the correlation mapping of the feature index, and the original feature identification obtained by decryption is matched with the authentication identification in segments to generate an anti-counterfeit verification result.
[0099] In this embodiment, the package feature identifier is first segmented, which includes appearance feature information and structural feature information. The appearance feature information is collected by a high-definition camera device with a resolution of no less than 4K level, and a multi-angle shooting method is adopted to ensure the capture of complete visual information of the package surface. The appearance feature information is divided into color segmentation and texture segmentation. The color segmentation adopts a color histogram technology to divide the package surface into 64 regions, and the main color values of the RGB three channels are extracted from each region to form a 192-bit color feature code. The texture segmentation adopts a local binary pattern technology to extract the texture features of the package surface to generate a 256-bit texture feature code. The structural feature information is obtained by a weight sensing array composed of 8x8 pressure sensors with an accuracy of ±0.1 grams. The structural feature information is divided into center of gravity segmentation and mass segmentation. The center of gravity segmentation records the coordinate values of the package center of gravity in three-dimensional space, represented by 64 bits; the mass segmentation records the mass distribution of the package at each measurement point, represented by 128 bits.
[0100] Feature indexing is a key technology for connecting each segment, and a hash table structure is used to realize the association mapping between segments. The feature index includes four key-value pairs, with the key being the segment type identifier (C for color, T for texture, G for center of gravity, and M for mass), and the value being the position and length information of the corresponding segment. For example, C:[0-191] indicates that the color segment is located at 0-191 bits of the feature identifier. Through the feature index, the position of each segment in the feature identifier can be accurately located, realizing efficient segment processing and feature matching.
[0101] According to the feature type of the segment, differential encryption processing is performed. The color segment and the texture segment are reversibly encrypted, using an improved AES encryption algorithm with a key length of 256 bits, and the encryption process is divided into 16 rounds of iteration, each round including byte substitution, row shifting, column mixing, and round key addition. The encrypted data retains the original length, ensuring that the original feature information can be completely restored after decryption. The center of gravity segment and the mass segment are homomorphically encrypted, using a lattice-based homomorphic encryption technology that allows specific mathematical operations to be performed in an encrypted state without decrypting the original data. Homomorphic encryption uses a 2048-bit key and supports additive homomorphism and finite multiplicative homomorphism operations, and the encrypted data length is expanded to twice the original length.
[0102] The encrypted segments are combined according to the association of the feature indexes to form a digital anti-counterfeit code. In the combination process, first, the anti-counterfeit code header is constructed, including version number, timestamp, feature index and other metadata, with a length of 64 bits; then the encrypted color segment, texture segment, barycenter segment and quality segment are added in turn to form a complete digital anti-counterfeit code. The total length of the anti-counterfeit code is 192+256+128+256+64=896 bits, represented in hexadecimal form for easy storage and transmission. The digital anti-counterfeit code is uploaded to the blockchain network together with the basic information of the package. The blockchain uses a consortium chain structure, which is maintained by logistics enterprises, regulatory agencies and trading parties, and uses the PBFT consensus mechanism. Each block can contain 100-200 transaction records, and the block generation time is controlled within 5 seconds.
[0103] At key nodes in the logistics transportation process, such as transfer centers and customs inspection points, the feature information of the package is re-collected. The collection device is consistent with the initial collection to ensure data comparability. The collected feature information is segmented according to the association of the feature indexes to generate a verification identifier with the same segmentation structure as the digital anti-counterfeit code. For example, color features and texture features are extracted from the collected images to form color segments and texture segments, respectively; the package is weighed and analyzed to extract the barycenter position and quality distribution to form barycenter segments and quality segments.
[0104] The digital anti-counterfeit code is decrypted using the association of the feature indexes. The digital anti-counterfeit code is obtained from the blockchain network, and each encrypted segment is separated according to the feature indexes. The color segment and the texture segment are decrypted using the AES decryption algorithm to restore the original color features and texture features; the barycenter segment and the quality segment use the homomorphic encryption feature to directly compare the features in the encrypted domain without full decryption. The original feature identifier obtained by decryption is matched with the verification identifier in segments to calculate the feature similarity. The color segment and the texture segment use the Euclidean distance to calculate the similarity, and the barycenter segment and the quality segment use the weighted Hamming distance to calculate the similarity.
[0105] The anti-counterfeit verification result is generated according to the feature matching result. The similarity threshold is set: the color segment threshold is 0.85, the texture segment threshold is 0.80, the barycenter segment threshold is 0.90, and the quality segment threshold is 0.85. When the similarity of each segment is higher than the corresponding threshold, it is determined to be verified; when the similarity of any segment is lower than the corresponding threshold but higher than the warning threshold (which is 90% of the corresponding threshold), it is determined to be suspicious; when the similarity of any segment is lower than the warning threshold, it is determined to be failed. The verification result includes the overall conclusion, the similarity value of each segment, the abnormal segment identifier and the abnormality degree evaluation.
[0106] The application realizes the security protection and efficient verification of the package features by using the segmented encryption processing and homomorphic encryption technology, solves the problems of easy leakage of feature information and complex verification process in traditional anti-counterfeiting technology, and builds a traceable and verifiable cross-border logistics anti-counterfeiting system combining the tamper-proof characteristics of the blockchain, improves the security and reliability of logistics transportation, and provides strong anti-counterfeiting protection for cross-border trade.
[0107] Further,
[0108] The in-transit environment data of the logistics package is collected, the environment monitoring threshold is determined according to the package feature identifier, the environment adjustment strategy is executed and the adjustment result is recorded when the in-transit environment data exceeds the environment monitoring threshold, and the environment monitoring threshold is updated based on the adjustment result, comprising:
[0109] The initial environment sensitive value is determined from the appearance feature information and the structure feature information in the package feature identifier, the environment sensitive value is accumulated and superimposed according to the logistics transportation time, and the superimposed environment sensitive value is converted into the environment monitoring threshold;
[0110] The in-transit environment data of the logistics package is collected, the real-time change and the cumulative change of the in-transit environment data are calculated, and the environment is determined to be abnormal when any change exceeds the environment monitoring threshold;
[0111] The parameter combination with the best adjustment effect is selected from the historical adjustment record to execute the environment adjustment strategy, and the change trend of the in-transit environment data in the strategy execution process is recorded to obtain the adjustment result;
[0112] The environment sensitive value is recalculated according to the change trend of the environment data in the adjustment result, the environment monitoring threshold is updated based on the new environment sensitive value, and the updated threshold and the adjustment effect are recorded in the historical adjustment record.
[0113] Exemplarily, the appearance feature information and the structure feature information are extracted from the package feature identifier, the appearance feature information includes parameters such as package surface material type, color stability and surface treatment process, which directly affect the sensitivity of the package to temperature, humidity and light. Image recognition technology is used to analyze the package surface material. In specific implementation, a convolutional neural network model is used for material identification, which includes 5 convolutional layers and 3 fully connected layers, with more than 100,000 pre-training samples of common packaging materials, and the recognition accuracy is more than 95%. The identification result is divided into categories such as plastic film, paper, fabric, metal and composite material, and different material categories correspond to different environment sensitive basic values. For example, the temperature sensitive basic value of paper packaging is 7, the humidity sensitive basic value is 9, and the light sensitive basic value is 5; the corresponding values of metal packaging are 3, 2 and 1 respectively.
[0114] The structural feature information is obtained through a weight sensing array, reflecting the weight distribution and structural characteristics of the items inside the package. The sensing array is composed of 10x10 pressure sensors with an accuracy of ±0.05 grams, which real-time collects the stress conditions of the package. By analyzing the pressure distribution data, the fragility and stability of the items inside the package can be determined, and the environmental sensitivity value is further corrected. For example, a package with uniform pressure distribution has high stability, and the sensitivity correction coefficient is 0.8; a package with uneven pressure distribution has low stability, and the sensitivity correction coefficient is 1.2. Through comprehensive evaluation of appearance features and structural features, the initial environmental sensitivity value of the package is obtained, including temperature sensitivity, humidity sensitivity, light sensitivity, and vibration sensitivity.
[0115] The environmental sensitivity value is accumulated and superimposed according to the length of the logistics transportation. The length of the logistics transportation is calculated from the time of package delivery, and the processing time of each node is recorded through the blockchain network. The accumulation and superposition adopts a non-linear growth model, with a growth rate of 5% / hour within the first 24 hours, 3% / hour within 24-72 hours, and 1% / hour after 72 hours. For example, the initial temperature sensitivity value of a certain paper package is 7, and the cumulative superimposed value after 48 hours of transportation is 7x(1+5%×24+3%×24)=11.76. The superimposed environmental sensitivity value is converted into environmental monitoring thresholds, and the conversion process considers the package type and transportation method. For ordinary packages, the temperature monitoring threshold is ±(sensitivity value x 0.5)℃, the humidity monitoring threshold is ±(sensitivity value x 2)%RH, the light monitoring threshold is sensitivity value x 100 lux, and the vibration monitoring threshold is sensitivity value x 0.3g. For special items such as medicines and precision instruments, stricter conversion coefficients can be set.
[0116] The in-transit environmental data collection of logistics packages is achieved through a sensor network built into the transportation container or vehicle. The sensor network includes temperature sensors (accuracy ±0.1℃), humidity sensors (accuracy ±1%RH), light sensors (accuracy ±10 lux), and vibration sensors (accuracy ±0.05g) with a sampling frequency of 1 time / minute. Sensor data is transmitted to edge computing nodes through a low-power wide-area network and uploaded to the blockchain network after preliminary processing. The real-time change and cumulative change of in-transit environmental data are calculated, with the real-time change being the difference between adjacent sampling data and the cumulative change being the standard deviation of data within a certain time window (usually 1 hour). When any change exceeds the environmental monitoring threshold, it is determined as an environmental anomaly. For example, the temperature monitoring threshold of a certain package is ±3.5℃, and when the temperature real-time change exceeds 3.5℃ or the temperature standard deviation within 1 hour exceeds 3.5℃, the environmental anomaly processing is triggered.
[0117] The environmental anomaly handling adopts the optimal parameter combination in the historical adjustment record to execute the environmental adjustment strategy. The historical adjustment record is stored in the blockchain network, containing information such as anomaly type, adjustment parameter combination, and execution effect score. The adjustment effect score is calculated based on the environmental parameter recovery speed, energy consumption, and stability, with a score range of 1-10. From the historical record, the parameter combination with the highest score under the same anomaly type is selected. If there is no historical record of the same type, the preset basic parameter combination is used. The environmental adjustment strategy includes temperature adjustment (cooling / heating), humidity adjustment (humidification / dehumidification), light adjustment (shading / light supplement), and vibration adjustment (damping / fixed), etc. During the execution of the strategy, the change trend of environmental data is recorded in real time, including the change rate, stability time, and fluctuation amplitude, forming the adjustment result data.
[0118] Taking temperature anomaly as an example, when detecting that the temperature is too high, the adjustment strategy may include starting the cooling device, adjusting the direction of the air vent, optimizing the space layout, etc. From the historical record, the best parameter combination under similar circumstances is selected, such as cooling device power 75%, air vent opening 60%, and running time 20 minutes, etc. After executing this parameter combination, the temperature change trend is monitored: temperature drop rate 0.2℃ / min, stable after 10 minutes, fluctuation amplitude ±0.3℃, energy consumption 0.4kWh. According to these data, the adjustment effect score is calculated and recorded in the historical adjustment record.
[0119] The environmental sensitivity value is recalculated according to the change trend of environmental data in the adjustment result. The change trend reflects the actual sensitivity of the package to environmental changes. The faster the change rate and the larger the fluctuation amplitude, the higher the environmental sensitivity of the package. The original environmental sensitivity value is corrected using the weighted average of the change rate and the fluctuation amplitude, with the weighting coefficients dynamically adjusted according to the anomaly type and degree. Generally, the change rate weight is 0.6 and the fluctuation amplitude weight is 0.4. Based on the new environmental sensitivity value, the environmental monitoring threshold is updated, and the updated threshold and adjustment effect are recorded in the historical adjustment record of the blockchain network. The blockchain uses a consortium chain structure, which is maintained by logistics enterprise nodes, regulatory agency nodes, and technical service nodes, and uses a practical Byzantine fault tolerance algorithm to ensure data consistency. Each block contains environmental data, adjustment record, and threshold update information.
[0120] In this embodiment, through real-time environmental monitoring and intelligent adjustment, the transportation safety of cross-border logistics packages is effectively guaranteed. Combined with the blockchain technology to record environmental data and adjustment process, full traceability and clear responsibility are achieved. The adaptive threshold updating mechanism makes the environmental monitoring more accurate, improves the anomaly recognition rate and processing efficiency, and reduces the risk of package damage, providing strong support for the cross-border transportation of high-value and environmentally sensitive goods.
[0121] Further,
[0122] The logistics risk level is determined according to the anti-counterfeiting verification result and the environmental regulation result, and the optimal logistics path is determined from the preset path library according to the logistics risk level, which comprises:
[0123] An anti-counterfeiting identification state in the anti-counterfeiting verification result is obtained, an identification integrity coefficient is calculated, a time attenuation coefficient is obtained based on a verification time interval, and the product of the integrity coefficient and the time attenuation coefficient is taken as an anti-counterfeiting risk score;
[0124] The environmental parameter data in the environmental regulation result is obtained, the anti-counterfeiting risk score is taken as a reference value, the reference value is adjusted according to the continuous change of the environmental parameter, and a comprehensive risk score is obtained;
[0125] The comprehensive risk score is compared with a preset risk interval to obtain a logistics risk level, the change direction of the logistics risk level is predicted based on a historical change sequence of the comprehensive risk score, and a logistics risk prediction result is obtained;
[0126] A candidate logistics path is extracted from the preset path library, a matching degree of the candidate logistics path is calculated according to the logistics risk prediction result, and the candidate logistics path with the highest matching degree is determined as the optimal logistics path.
[0127] Wherein, obtaining the anti-counterfeiting identification state in the anti-counterfeiting verification result is the premise of calculating the identification integrity coefficient. The anti-counterfeiting identification state contains feature point matching data, which is obtained by scanning the features of the package. The scanning device uses a high-precision image acquisition system with a resolution of not less than 32 million pixels, and is equipped with multi-angle light sources to ensure the capture of micro features on the surface of the package. The anti-counterfeiting identification contains 300-500 feature points, each feature point has a unique position coordinate and a feature value. The identification integrity coefficient is calculated by comparing the current feature points with the initial feature points, and the calculation method is to divide the number of effective feature points by the total number of initial feature points. Effective feature points refer to feature points with a feature value deviation within a preset threshold range, and the preset threshold is usually set to twice the standard deviation of the feature value. For example, if a package has 450 initial feature points and 420 effective feature points are detected by current scanning, the identification integrity coefficient is 420 / 450=0.933.
[0128] The time attenuation coefficient is obtained based on the verification time interval, which reflects the natural attenuation of the anti-counterfeiting identification over time. The verification time interval refers to the time difference from the generation of the initial anti-counterfeiting identification to the current verification, in hours. The time attenuation coefficient is calculated using an exponential decay model, and the baseline decay rate varies depending on the type of package: 0.0005 / hour for ordinary packages, 0.001 / hour for environmentally sensitive packages, and 0.0002 / hour for high-value packages. The anti-counterfeiting risk score ranges from 0 to 1, and the higher the value, the higher the integrity of the package anti-counterfeiting identification and the lower the risk.
[0129] The environmental parameter data in the environmental regulation result is the basis for adjusting the anti-counterfeiting risk score. The environmental parameter data includes temperature, humidity, light intensity, and vibration intensity, and the data is derived from the sensor network in the logistics transportation container. The sensor sampling frequency is once per minute, the data is transmitted to the edge computing node through the low-power wide-area network, and after preliminary processing, it is uploaded to the blockchain network. The environmental parameter data is stored in the form of a smart contract on the blockchain, ensuring data authenticity and tamper resistance. The anti-counterfeiting risk score is used as the baseline value, and the baseline value is adjusted according to the continuous change of the environmental parameters to obtain the comprehensive risk score. The continuous change refers to the change amplitude of the environmental parameters within a continuous monitoring period, and the calculation method is the maximum value minus the minimum value divided by the preset safety range. Different parameters have different weight coefficients: temperature weight is 0.4, humidity weight is 0.3, light weight is 0.1, and vibration weight is 0.2.
[0130] The calculation of the comprehensive risk score uses a weighted adjustment method. When the continuous change of the environmental parameters exceeds the threshold value, the baseline value is deducted according to the exceeding degree; when the change is within the threshold range, the baseline value remains unchanged. For example, the anti-counterfeiting risk score of a package is 0.899, and the temperature continuous change is 5°C (1.67 times the preset safety range of 3°C), so the temperature adjustment coefficient is 0.4 multiplied by (1.67-1), which is 0.268; other parameters are within the safety range, and the adjustment coefficient is 0. The comprehensive risk score is 0.899 minus 0.268, which equals 0.631. The comprehensive risk score range is 0-1, and the smaller the value, the higher the logistics risk.
[0131] The comprehensive risk score is compared with the preset risk interval to obtain the logistics risk level. The risk interval is divided into five levels: 0.9-1.0 is low risk (level 1), 0.7-0.9 is lower risk (level 2), 0.5-0.7 is medium risk (level 3), 0.3-0.5 is higher risk (level 4), and 0-0.3 is high risk (level 5). In the above example, the comprehensive risk score 0.631 corresponds to a logistics risk level of level 3, which is a medium risk. Based on the historical change sequence of the comprehensive risk score, the change direction of the logistics risk level is predicted to obtain the logistics risk prediction result. The prediction uses a long short-term memory (LSTM) model, which includes two LSTM layers and one fully connected layer, the input is the comprehensive risk score sequence of the past 24 hours, and the output is the risk level prediction of the next 6 hours.
[0132] Extracting candidate logistics paths from the preset path library is a key step for determining the optimal logistics path. The preset path library is stored in the blockchain network and contains information such as the connection relationship between logistics nodes, transportation time, transportation cost, and historical risk rating. The path library is updated regularly to maintain the timeliness of the data. When extracting candidate logistics paths, first, filter the feasible paths according to the starting point and the ending point, and then perform preliminary screening according to the current time window and transportation requirements. Usually, 5-10 candidate paths are selected for subsequent analysis. According to the logistics risk prediction result, the matching degree of the candidate logistics path is calculated, which considers the path risk adaptability, timeliness, and cost. The risk adaptability refers to whether the path can adapt to the predicted risk changes, and the calculation method is the degree of fit between the risk bearing capacity of each segment of the path and the predicted risk. The timeliness refers to whether the path can meet the delivery time requirement. The cost refers to the total transportation cost of the path. The weights of the three factors are 0.5, 0.3, and 0.2, respectively.
[0133] The specific process of matching degree calculation is as follows: for each candidate path, divide it into several segments, each corresponding to a different logistics node. Calculate the risk adaptability score of each segment by subtracting the absolute value of the predicted risk level from the risk bearing level of the segment, and then subtracting 5 from the absolute value. The risk bearing level of the segment comes from historical data statistics and represents the highest risk level that the segment can bear. Calculate the timeliness score by dividing the total path time by the required delivery time, and calculate the cost score by dividing the total path cost by the budget cost. The path matching degree is obtained by weighted average of the three scores, ranging from 0 to 5 points, and the higher the score, the better the matching degree. The candidate logistics path with the highest matching degree is determined as the optimal logistics path.
[0134] The present application realizes accurate assessment and prediction of logistics risk by fusing anti-counterfeiting verification and environmental monitoring data, intelligently selects the optimal logistics path based on the risk prediction result, and effectively improves the safety and reliability of cross-border logistics. Combined with the blockchain technology to record the risk assessment and path selection process, it realizes the whole process traceability and clear responsibility, provides strong technical support for cross-border trade, significantly reduces the risk of logistics loss, and improves the logistics efficiency and user satisfaction.
[0135] Further,
[0136] The comprehensive risk score is compared with the preset risk interval to obtain the logistics risk level. The change direction of the logistics risk level is predicted based on the historical change sequence of the comprehensive risk score, and the logistics risk prediction result includes:
[0137] The historical change sequence of the comprehensive risk score is obtained, the difference value of the comprehensive risk score at adjacent time points is calculated to obtain the fluctuation sequence, and the risk turning point is identified based on the fluctuation sequence to obtain the fluctuation characteristics of the comprehensive risk score;
[0138] The fluctuation characteristics are analyzed, the periodic change characteristics are calculated based on a frequency domain, the trend change characteristics are calculated based on a time domain, and the risk evolution characteristics are obtained by combining the periodic change characteristics and the trend change characteristics;
[0139] The distribution law of the comprehensive risk score is analyzed based on the risk evolution characteristics, the demarcation value of the preset risk interval is determined, and the comprehensive risk score is mapped to the logistics risk level according to the demarcation value;
[0140] The logistics risk level is analyzed, the stability characteristics are calculated by calculating the residence time of the logistics risk level, the conversion characteristics are calculated by calculating the conversion relationship between adjacent levels, and the risk prediction basis is obtained by combining the stability characteristics and the conversion characteristics;
[0141] The deviation degree of the comprehensive risk score and the demarcation value is compared with a preset deviation threshold, the change direction of the logistics risk level is determined based on the risk prediction basis when the early warning condition is met, and a logistics risk prediction result is obtained.
[0142] Obtaining a historical change sequence of a comprehensive risk score is the basis for identifying risk fluctuation characteristics. Risk score data at at least 96 time points is extracted from a blockchain network, with a time interval of 30 minutes. The score difference between adjacent time points is calculated to obtain a fluctuation sequence, with a positive value indicating a decrease in risk and a negative value indicating an increase in risk. The sliding window method is used to identify risk turning points, with a window size of 5 time points. When the sign of the fluctuation value in the window changes and the amplitude exceeds 0.02, it is determined as a turning point. By analyzing the distribution of turning points in historical data, the fluctuation characteristics of the comprehensive risk score are obtained, including three indicators of fluctuation frequency, fluctuation amplitude and fluctuation duration.
[0143] The fluctuation characteristics are analyzed, the periodic change characteristics are calculated based on a frequency domain. The periodic change characteristics reflect the regularity of the risk score change, and the fast Fourier transform algorithm is used for frequency spectrum analysis of the fluctuation sequence. After preprocessing the fluctuation sequence, the fast Fourier transform is applied to convert the time domain data into frequency domain data, and the main frequency components and their amplitudes are extracted. The trend change characteristics are calculated based on a time domain, and the long-term trend of the fluctuation sequence is extracted using a polynomial fitting method. The fitting uses a cubic polynomial, and the coefficients are determined by the least squares method. The slope of the fitting curve reflects the long-term trend of the risk change. The risk evolution characteristics are obtained by combining the periodic change characteristics and the trend change characteristics, and the combination method is to multiply the periodic characteristic value by the direction coefficient of the trend characteristic (1 for rising and -1 for falling), to obtain the risk evolution index.
[0144] The distribution rule of the comprehensive risk score is analyzed based on the risk evolution characteristics to determine the demarcation value of the preset risk interval. Optionally, the distribution rule analysis adopts a kernel density estimation method, which constructs a probability density function of the risk score according to historical data. A Gaussian kernel is selected as the kernel function, and an adaptive method is used to determine the bandwidth parameter. By analyzing the peak and valley of the probability density function, the clustering center and natural demarcation point of the risk score are determined. The demarcation value is set at the local minimum value of the probability density function, and the risk interval is usually divided into five levels: extremely low risk (0.9-1.0), low risk (0.75-0.9), medium risk (0.6-0.75), high risk (0.4-0.6), and extremely high risk (0-0.4). The stability feature is obtained by analyzing the logistics risk level and calculating the residence time of the logistics risk level. The residence time refers to the length of the continuous time period during which the risk level remains unchanged, and the calculation method is to calculate the average value and standard deviation of the duration of each risk level in the historical data. The stability feature is represented by the coefficient of variation of the residence time, and the smaller the value, the higher the stability. The conversion relationship between adjacent levels is calculated to obtain the conversion feature, and the conversion relationship includes the conversion probability and the conversion condition.
[0145] The conversion probability is calculated by counting the conversion frequency between adjacent levels in the historical data to form a conversion probability matrix. The conversion condition refers to the typical scenario and threshold condition that triggers the level conversion, which is extracted from the historical data by a decision tree algorithm. The risk prediction basis is obtained by combining the stability feature and the conversion feature, and the combination method is to construct a Bayesian network model, input the current risk level, residence time and environmental conditions, and output the probability distribution of the next stage risk level.
[0146] The deviation degree of the comprehensive risk score from the demarcation value is compared with the preset deviation threshold, and the change direction of the logistics risk level is determined when the early warning condition is met. The deviation degree is calculated by the difference between the score and the nearest demarcation value divided by the interval between adjacent demarcation values. For example, the score is 0.73, the nearest demarcation value is 0.75, and the interval between adjacent demarcation values is 0.15, then the deviation degree is (0.75-0.73) / 0.15=0.133. The preset deviation threshold is usually set to 0.2, and the early warning condition is triggered when the deviation degree exceeds the threshold.
[0147] The change direction of the logistics risk level is determined based on the risk prediction basis, and optionally, the current risk state is input into the Bayesian network model to calculate the conversion probability of each risk level, and the direction with the highest probability is selected as the prediction result. The prediction result and related basis are recorded to the blockchain network to form the logistics risk prediction result.
[0148] The application realizes accurate classification and prediction of logistics risk levels by in-depth analysis of the historical change sequence of the comprehensive risk score, providing a scientific basis for logistics path optimization. The method combines blockchain technology to record risk data and prediction results, ensuring data authenticity and non-tamperability, and achieving cross-border logistics risk visualization and early warning. By identifying risk evolution rules and turning points, the direction of risk change is predicted in advance, significantly improving the safety and reliability of logistics transportation, and providing strong support for cross-border transportation of high-value goods.
[0149] Further,
[0150] According to the optimal logistics path, the verification strategy of the logistics node is planned, and the node proof is generated. According to the node proof, the logistics track in the smart contract is updated, and the tracking verification of the package characteristic identifier includes:
[0151] Obtain the logistics node information in the optimal logistics path, determine the verification time interval based on the distance between adjacent logistics nodes, calculate the verification weight according to the risk level of the logistics node, and generate the verification strategy of the logistics node;
[0152] According to the verification weight, determine the collection dimension of the verification data, collect the verification data at the logistics node according to the verification time interval, and generate the logistics node data that meets the verification strategy;
[0153] The logistics node data is processed in layers, the data integrity features and verification judgment results are combined to generate a basic proof, the basic proof is added with device signature and timestamp to construct a logistics node proof;
[0154] The logistics node proof is submitted to the blockchain network, and the consensus node verifies the logistics node proof according to the verification strategy to generate a verification result;
[0155] The verification result is submitted to the smart contract, and when the verification is passed, the logistics node proof is written into the block. According to the time sequence of the logistics node proof, the logistics track in the smart contract is updated, and based on the updated logistics track, the tracking verification of the package characteristic identifier is carried out.
[0156] Exemplarily, the logistics node information in the optimal logistics path is acquired, and the logistics node information includes node type, geographic position coordinates, function attribute, and historical risk rating, etc. The node type is divided into starting node, transfer node, and terminal node; the function attribute includes storage, loading and unloading, customs clearance, and distribution, etc. The verification time interval is determined based on the distance between adjacent logistics nodes, and the calculation method is that the distance between two nodes is divided by the preset average transportation speed, and then the basic operation time is added. For example, the distance between two nodes is 300 kilometers, the average transportation speed is 60 kilometers / hour, and the basic operation time is 2 hours, then the verification time interval is 7 hours. The fluctuation range allowed by the verification time interval is related to the path risk level, the low-risk path allows ±15% fluctuation, the medium-risk path allows ±10% fluctuation, and the high-risk path allows ±5% fluctuation. The verification weight is calculated according to the risk level of the logistics node, and the risk level is obtained by historical data analysis, which is divided into five levels: extremely low risk (level 1), low risk (level 2), medium risk (level 3), high risk (level 4), and extremely high risk (level 5). The verification weight calculation method is that the risk level is multiplied by the basic coefficient 0.2, for example, the verification weight of the node with the risk level of level 4 is 0.8. The verification strategy of the logistics node is generated, including verification time interval, verification data dimension, data collection frequency, and verification passing standard, etc.
[0157] The collection dimension of the verification data is determined according to the verification weight, and the verification weight is positively correlated with the collection dimension. The collection dimension includes basic dimension (position, time), identification dimension (package characteristic code), environment dimension (temperature and humidity, illumination, vibration), and interaction dimension (operation record, handover voucher). The nodes with verification weight lower than 0.4 collect basic dimension and identification dimension; the nodes with verification weight of 0.4-0.6 increase environment dimension; the nodes with verification weight higher than 0.6 collect all four dimensions. The verification data is collected at the logistics node according to the verification time interval, and the collection equipment includes high-precision positioning module (accuracy ±3 meters), environment sensor group (temperature accuracy ±0.2℃, humidity accuracy ±2%RH), characteristic scanner (resolution not less than 12 million pixels), and electronic operation terminal. For high-risk nodes, monitoring camera equipment is added for video recording. The logistics node data meeting the verification strategy is generated, and the data format adopts JSON structure, including node identification, timestamp, position coordinates, package characteristic code, environment parameters, and operation record, etc.
[0158] The logistics node data is processed in layers, and the layered structure includes a data layer, an integrity layer, and a verification layer. The data layer stores raw collected data; the integrity layer calculates data integrity features through a hash algorithm, and generates a 32-byte hash value using the SHA-256 algorithm; the verification layer includes verification determination results, and the determination method is to compare the collected data with the verification policy requirements, check whether the time is within the verification interval, whether the collection dimension meets the requirements, and whether the data is within the valid range. The data integrity features and the verification determination results are combined to generate a basic proof, and the combination method is to concatenate the verification determination results (Boolean values) and the integrity hash values. A device signature and a timestamp are added to the basic proof, the device signature uses the Elliptic Curve Digital Signature Algorithm (ECDSA), and the built-in private key of the device is used to sign the basic proof to ensure the credibility of the data source; the timestamp is obtained from a time service server, and the precision is millisecond level. A logistics node proof is constructed, and the proof structure includes a proof header (version number, proof type), basic proof content, device signature, and timestamp.
[0159] The logistics node proof is submitted to the blockchain network in an asynchronous manner, and the transaction request is generated and then broadcast to the network. The blockchain network is a consortium chain structure, which is jointly maintained by logistics enterprises, regulatory agencies, and technology service providers, and the total number of nodes is 21. The consensus nodes verify the logistics node proof according to the verification policy, and the verification process includes signature verification, timestamp verification, and data rule verification. The signature verification checks whether the device signature is valid to confirm that the data has not been tampered with; the timestamp verification checks whether the proof generation time is within a reasonable range; and the data rule verification checks whether the node data meets the provisions of the verification policy. At least 14 nodes (2 / 3) need to pass the verification to generate a valid verification result.
[0160] The verification result is submitted to the smart contract, which is deployed on the blockchain network and uses a scalable design pattern to support subsequent function extension. When the verification is passed, the logistics node proof is written into the block, and the block structure includes the previous block hash, timestamp, transaction root, and node proof set. The logistics track in the smart contract is updated according to the time sequence of the logistics node proof, and the update method is to add new node records to the track array, and the records include node identification, timestamp, location coordinates, and proof hash. Based on the updated logistics track, the package feature identifier is tracked and verified, the tracking verification uses spatiotemporal consistency check to verify whether the time and space changes between adjacent nodes are reasonable, and triggers the early warning mechanism when an anomaly is found.
[0161] The application realizes trusted tracking and anti-fake verification of the whole logistics process by planning the verification strategy of the logistics node, collecting multi-dimensional verification data at the logistics node and generating node proof, and combining the tamper-proofing characteristics of the blockchain technology. The method dynamically adjusts the verification strength according to the node risk level, improves the verification efficiency and reliability, and solves the problem that the data authenticity is difficult to guarantee in the traditional logistics tracking. The logistics track is automatically updated through the smart contract, realizing real-time monitoring and abnormal early warning of cross-border logistics, effectively reducing the logistics risk, and improving the security and credibility of cross-border trade.
[0162] Embodiment two
[0163] As Figure 2 shown, Figure 2 is a structural schematic diagram of a blockchain-based cross-border logistics intelligent tracking and anti-fake system, the blockchain-based cross-border logistics intelligent tracking and anti-fake system comprises:
[0164] a feature acquisition module, configured to acquire feature information of a logistics package to obtain a package feature identifier, a fake-proof verification module, configured to perform segmented encryption processing on the package feature identifier to obtain a digital anti-fake code, reacquire the feature information of the package in the logistics transportation process and generate a verification identifier, compare the verification identifier with the feature identifier decrypted from the digital anti-fake code, and generate a fake-proof verification result;
[0165] an environment monitoring module, configured to acquire in-transit environment data of the logistics package, determine an environment monitoring threshold according to the package feature identifier, execute an environment adjustment strategy when the in-transit environment data exceeds the environment monitoring threshold, and record an adjustment result, and update the environment monitoring threshold based on the adjustment result;
[0166] a path planning module, configured to determine a logistics risk level according to the fake-proof verification result and the environment adjustment result, and determine an optimal logistics path from a preset path library according to the logistics risk level;
[0167] a track verification module, configured to plan a verification strategy of a logistics node according to the optimal logistics path, and generate a node proof, update a logistics track in a smart contract according to the node proof, and perform tracking verification on the package feature identifier.
[0168] Referring to Figure 3 , Figure 3 is a structural schematic diagram of an electronic device provided by an embodiment of the application, as Figure 3 shown, comprising a memory, a processor, and a computer program of a data management method stored in the memory and capable of running on the processor, wherein:
[0169] the processor is configured to call the computer program stored in the memory, and perform the following steps:
[0170] Collecting feature information of a logistics package to obtain a package feature identifier, submitting the package feature identifier to a blockchain network and generating a smart contract;
[0171] Segmented encryption processing is performed on the package feature identifier to obtain a digital anti-counterfeit code, feature information of the package is re-collected during logistics transportation and an authentication identifier is generated, the authentication identifier is compared with the feature identifier decrypted from the digital anti-counterfeit code to generate an anti-counterfeit verification result;
[0172] In-transit environmental data of the logistics package is collected, an environmental monitoring threshold is determined according to the package feature identifier, an environmental adjustment strategy is executed and an adjustment result is recorded when the in-transit environmental data exceeds the environmental monitoring threshold, and the environmental monitoring threshold is updated based on the adjustment result;
[0173] A logistics risk level is determined according to the anti-counterfeit verification result and the environmental adjustment result, and an optimal logistics path is determined from a preset path library according to the logistics risk level;
[0174] A verification strategy of a logistics node is planned according to the optimal logistics path, a node proof is generated, a logistics track in the smart contract is updated according to the node proof, and tracking verification is performed on the package feature identifier based on the logistics track.
[0175] The electronic device provided by the embodiment of the present application can realize each process of the method in the method embodiment, and can achieve the same beneficial effects. To avoid repetition, it will not be repeated here.
[0176] It should be noted that the skilled in the art can understand that the electronic device herein is a device that can automatically perform numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc. The electronic device can be a desktop computer, a notebook, a palm computer, and a cloud server, etc. The electronic device can perform human-computer interaction through a keyboard, a mouse, a remote controller, a touchpad, or a voice control device, etc.
[0177] The embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, the computer program is executed by a processor to realize each process of the method provided by the embodiment of the present application, and the same technical effects can be achieved. To avoid repetition, it will not be repeated here.
[0178] It should be noted that the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory can be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. In other embodiments, the memory can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Of course, the memory can also include both the internal storage unit and the external storage device of the electronic device. In the present embodiment, the memory is generally used to store an operating system and various application software installed on the electronic device, such as program codes of the blockchain-based cross-border logistics intelligent tracking and anti-counterfeiting method, etc. In addition, the memory can also be used to temporarily store various data that have been output or will be output.
[0179] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0180] The above-described specific embodiments are preferred embodiments of the present application, and are not intended to limit the specific implementation range of the present application. The scope of the present application includes, but is not limited to, the above-described specific embodiments. Any equivalent changes made in accordance with the shape and structure of the present application are within the scope of protection of the present application.
Claims
1. A blockchain-based intelligent tracking and anti-counterfeiting method for cross-border logistics, characterized in that, The method comprises the following steps: Collecting feature information of a logistics package to obtain a package feature identifier, submitting the package feature identifier to a blockchain network and generating a smart contract; Segmented encryption processing of the package feature identifier to obtain a digital anti-counterfeiting code, re-collecting package feature information during the logistics transportation process and generating a verification identifier, comparing the verification identifier with the feature identifier after decryption of the digital anti-counterfeiting code, and generating an anti-counterfeiting verification result; Collecting in-transit environmental data of the logistics package, determining an environmental monitoring threshold according to the package feature identifier, executing an environmental adjustment strategy when the in-transit environmental data exceeds the environmental monitoring threshold and recording the adjustment result, and updating the environmental monitoring threshold based on the adjustment result; Determining a logistics risk level according to the anti-counterfeiting verification result and the environmental adjustment result, and determining an optimal logistics path from a preset path library according to the logistics risk level; Planning a verification strategy for a logistics node according to the optimal logistics path, generating a node proof, updating a logistics track in the smart contract according to the node proof, and tracking and verifying the package feature identifier.
2. The method of claim 1, wherein, Collecting feature information of a logistics package to obtain a package feature identifier, submitting the package feature identifier to a blockchain network and generating a smart contract comprises: Collecting surface images of the logistics package to obtain appearance feature information, extracting weight distribution of the logistics package to obtain structural feature information, and segmentally encoding the appearance feature information and the structural feature information to obtain the package feature identifier; Dividing package levels based on the package feature identifier, determining a differentiated detection time interval according to the package levels, and re-collecting package features at each detection time point to generate detection feature identifiers; Comparing the detection feature identifiers with the original package feature identifier, confirming package integrity when the comparison result is within a preset error range, and triggering an abnormal marker when the comparison result exceeds the preset error range, the abnormal marker containing abnormal feature position information; Determining a package damage risk level according to the abnormal marker, adjusting a subsequent detection time interval based on the risk level, submitting the adjusted detection strategy together with the package feature identifier to the blockchain network, and the blockchain network generating a smart contract based on the package feature identifier and the detection strategy.
3. The method of claim 1, wherein, Segmented encryption processing of the package feature identifier to obtain a digital anti-counterfeiting code, re-collecting package feature information during the logistics transportation process and generating a verification identifier, comparing the verification identifier with the feature identifier after decryption of the digital anti-counterfeiting code, and generating an anti-counterfeiting verification result comprises: Segmenting the package feature identifier, dividing the appearance feature information into color segments and texture segments, and dividing the structural feature information into center of gravity segments and quality segments, and establishing an associated mapping between the segments through a feature index; Reversible encryption processing of the color segments and the texture segments according to the feature types of the segments, homomorphic encryption processing of the center of gravity segments and the quality segments, combination of the encrypted segments according to the associated relationship of the feature index to obtain the digital anti-counterfeiting code; Re-collecting package feature information during the logistics transportation process, segmenting the collected package feature information according to the associated mapping of the feature index to generate a verification identifier having the same segment structure as the digital anti-counterfeiting code; The digital anti-counterfeit code is decrypted by using the correlation mapping of the feature index, and the original feature identifier obtained by decryption is matched with the verification identifier in segments to generate an anti-counterfeit verification result.
4. The method of claim 1, wherein, The in-transit environmental data of the logistics package is collected, the environmental monitoring threshold is determined according to the package feature identifier, when the in-transit environmental data exceeds the environmental monitoring threshold, the environmental adjustment strategy is executed and the adjustment result is recorded, and the environmental monitoring threshold is updated based on the adjustment result, including: The initial environmental sensitive value is determined from the appearance feature information and the structure feature information in the package feature identifier, the environmental sensitive value is accumulated and superimposed according to the logistics transportation time length, and the superimposed environmental sensitive value is converted into the environmental monitoring threshold; The in-transit environmental data of the logistics package is collected, the real-time change and the cumulative change of the in-transit environmental data are calculated, and when any of the changes exceeds the environmental monitoring threshold, it is determined that the environment is abnormal; The parameter combination with the optimal adjustment effect is selected from the historical adjustment record to execute the environmental adjustment strategy, and the change trend of the in-transit environmental data in the strategy execution process is recorded to obtain the adjustment result; The environmental sensitive value is recalculated according to the change trend of the environmental data in the adjustment result, the environmental monitoring threshold is updated based on the new environmental sensitive value, and the updated threshold and the adjustment effect are recorded in the historical adjustment record.
5. The method of claim 1, wherein, The logistics risk level is determined according to the anti-counterfeit verification result and the environmental adjustment result, and the optimal logistics path is determined from the preset path library according to the logistics risk level, including: The anti-counterfeit identifier state in the anti-counterfeit verification result is obtained, the identifier integrity coefficient is calculated, the time decay coefficient is obtained based on the verification time interval, and the product of the integrity coefficient and the time decay coefficient is taken as the anti-counterfeit risk score; The environmental parameter data in the environmental adjustment result is obtained, the anti-counterfeit risk score is taken as the reference value, the reference value is adjusted according to the continuous change of the environmental parameter, and the comprehensive risk score is obtained; The comprehensive risk score is compared with the preset risk interval to obtain the logistics risk level, the change direction of the logistics risk level is predicted based on the historical change sequence of the comprehensive risk score, and the logistics risk prediction result is obtained; The candidate logistics path is extracted from the preset path library, the matching degree of the candidate logistics path is calculated according to the logistics risk prediction result, and the candidate logistics path with the highest matching degree is determined as the optimal logistics path.
6. The method of claim 5, wherein, The comprehensive risk score is compared with the preset risk interval to obtain the logistics risk level, and the change direction of the logistics risk level is predicted based on the historical change sequence of the comprehensive risk score, and the logistics risk prediction result is obtained, including: The historical change sequence of the comprehensive risk score is obtained, the comprehensive risk score difference of adjacent time points is calculated to obtain a fluctuation sequence, the risk turning point is identified based on the fluctuation sequence, and the fluctuation characteristics of the comprehensive risk score are obtained; The fluctuation characteristics are analyzed, the periodic change characteristics are obtained based on the frequency domain, the trend change characteristics are obtained based on the time domain, and the risk evolution characteristics are obtained by combining the periodic change characteristics and the trend change characteristics; The distribution law of the comprehensive risk score is analyzed based on the risk evolution characteristics, the demarcation value of the preset risk interval is determined, and the comprehensive risk score is mapped to the logistics risk level according to the demarcation value; analyzing the logistics risk grade, calculating a stability feature of a residence time length of the logistics risk grade, calculating a conversion feature of a conversion relationship between adjacent grades, and combining the stability feature and the conversion feature to obtain a risk prediction basis; comparing a deviation degree of the comprehensive risk score from the boundary value with a preset deviation threshold, determining a change direction of the logistics risk grade based on the risk prediction basis when a warning condition is met, and obtaining a logistics risk prediction result.
7. The method of claim 1, wherein, According to the optimal logistics path, the verification strategy of the logistics node is planned, and the node proof is generated. The logistics track in the smart contract is updated according to the node proof, and the tracking verification of the package feature identifier includes: Obtaining logistics node information in the optimal logistics path, determining a verification time interval based on the distance between adjacent logistics nodes, calculating a verification weight according to the risk level of the logistics node, and generating a verification strategy of the logistics node; According to the verification weight, the collection dimension of the verification data is determined, the verification data is collected at the logistics node according to the verification time interval, and the logistics node data meeting the verification strategy is generated; The logistics node data is processed in layers, the data integrity feature and the verification judgment result are combined to generate a basic proof, the device signature and the timestamp are added to the basic proof, and the logistics node proof is constructed; The logistics node proof is submitted to the block chain network, and the consensus node verifies the logistics node proof according to the verification strategy to generate a verification result; The verification result is submitted to the smart contract, and when the verification is passed, the logistics node proof is written into the block, the logistics track in the smart contract is updated according to the time sequence of the logistics node proof, and the tracking verification of the package feature identifier is based on the updated logistics track.
8. A blockchain-based intelligent tracking and anti-counterfeiting system for cross-border logistics, for implementing the method of any one of claims 1-7, characterized in that, The system comprises: A feature collection module is used to collect the feature information of the logistics package to obtain a package feature identifier, and the package feature identifier is submitted to a block chain network and a smart contract is generated; A forgery prevention verification module is used to perform segmented encryption processing on the package feature identifier to obtain a digital forgery prevention code, re-collect the package feature information during the logistics transportation process, and generate a verification identifier, compare the verification identifier with the feature identifier decrypted from the digital forgery prevention code, and generate a forgery prevention verification result; An environment monitoring module is used to collect in-transit environment data of the logistics package, determine an environment monitoring threshold according to the package feature identifier, execute an environment adjustment strategy when the in-transit environment data exceeds the environment monitoring threshold, and record the adjustment result, and update the environment monitoring threshold based on the adjustment result; A path planning module is used to determine a logistics risk grade according to the forgery prevention verification result and the environment adjustment result, and determine an optimal logistics path from a preset path library according to the logistics risk grade; A track verification module is used to plan a verification strategy of a logistics node according to an optimal logistics path, and generate a node proof, update a logistics track in a smart contract according to the node proof, and perform tracking verification on a package feature identifier.
9. An electronic device, comprising: It comprises: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the processor executes the computer program to realize the steps in the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Customs warranty logistics tracing system based on block chain
CN115424213A
Electronic equipment intelligent transfer container management system and method based on Internet of Things and AI
CN120198043A