A logistics traceability system and method based on blockchain technology
By constructing an event graph structure and a verification path mapping graph, the contradiction between data storage and verification throughout the logistics process is resolved, achieving efficient, reliable data traceability and low-cost storage, and ensuring the integrity and traceability of logistics event data.
Patent Information
- Application Number
- CN202510980470.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-16
AI Technical Summary
In the current logistics process, there are numerous nodes and frequent events. Directly writing all behavioral event data into the blockchain would result in excessive consumption of storage resources and high writing costs. On the other hand, writing only part of the data into the blockchain cannot effectively support the verification of the structural authenticity of the off-chain behavioral sequence, and there are problems such as missing evidence or on-chain and off-chain disconnect.
Construct an event graph structure, calculate the structural closure signature value and responsibility structure weight value of event nodes, determine whether data is written to the blockchain by jointly calculating path information entropy and transitivity, and construct a verification path mapping graph to verify the structural consistency of off-chain data.
It enables structured representation and verifiable modeling of logistics event data, accurately reconstructs logistics task paths, reduces on-chain storage costs, improves the integrity and traceability of the event chain, and ensures efficient verification and traceability of off-chain data.
Smart Images

Figure CN120525433B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of logistics traceability, and particularly relates to a logistics traceability system and method based on a blockchain technology. BACKGROUND
[0002] With the rapid development of the logistics industry in the direction of intelligence and data, the behavior events of each link in the logistics process are continuously collected in the form of data for process tracking, responsibility division and abnormal traceability. In order to improve the data credibility and traceability, the blockchain technology is introduced into the logistics information system to record the key node data on the chain, thereby realizing the traceability capability framework of "on-chain storage and off-chain backup".
[0003] However, due to the large number of nodes and frequent events involved in the whole logistics process, if all behavior event data is directly written into the blockchain, it will lead to a large consumption of storage resources and a significant increase in writing costs, which is difficult to adapt to the on-chain storage capacity in the conventional business scenario. At the same time, if only part of the data is written into the blockchain and the remaining data is retained in the off-chain system, it will not be able to effectively support the structured authenticity verification of the off-chain behavior sequence due to the lack of a structured verifiable mechanism, especially in the aspects of behavior path reconstruction, consistency analysis of the time sequence of the previous and subsequent events, and responsibility subject traceable positioning, there are problems of evidence missing or chain-on and chain-off rupture.
[0004] Therefore, there is an urgent need for a logistics traceability system and method based on a blockchain technology, which can balance the on-chain storage constraints and the structural verification requirements of off-chain data in the whole logistics process, thereby ensuring the traceability and structural consistency of the behavior event data. SUMMARY
[0005] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a logistics traceability method based on a blockchain technology.
[0006] To achieve the above-mentioned purpose, on the one hand, the present application provides a logistics traceability method based on a blockchain technology, comprising:
[0007] Collecting logistics behavior event data, constructing an event graph structure containing a plurality of behavior event nodes, and calculating a structural closure signature value for each behavior event node based on an event hash value of the corresponding event data of the behavior event node, a structural dependency signature value of a predecessor behavior event node, and a topological position index in the event graph structure, wherein the event data includes a timestamp field, an event type field and a responsibility subject field;
[0008] Based on the event graph structure, the total reachable path participated by each behavior event node is counted, the path information entropy value of each behavior event node is calculated, the transfer degree is constructed in combination with the out-degree and in-degree of the behavior event node, the responsibility structure weight value is calculated according to the path information entropy value and the transfer degree, and whether the original data of the behavior event node is written into the blockchain is determined according to the responsibility structure weight value.
[0009] Based on the structure closure signature value and the responsibility structure weight value, a verification path mapping graph is constructed, the structure closure signature value of each behavior event node is bound with the storage path of the off-chain data in the verification path mapping graph, and a structure mapping hash value is generated.
[0010] When receiving a traceability request, the verification path mapping graph is called, consistency verification is performed on the original data and the structure mapping hash value of the target behavior event node, and a traceability verification result is generated.
[0011] On the other hand, the application also provides a logistics traceability system based on blockchain technology, which is realized based on the above-mentioned logistics traceability method based on blockchain technology, and includes:
[0012] The acquisition module is used for collecting logistics behavior event data, constructing an event graph structure containing a plurality of behavior event nodes, and calculating a structure closure signature value based on the event hash value of the corresponding event data of each behavior event node, the structure dependence signature value of the predecessor behavior event node and the topological position index in the event graph structure, wherein the event data includes a timestamp field, an event type field and a responsibility subject field.
[0013] The analysis module is used for counting the total reachable path participated by each behavior event node based on the event graph structure, calculating the path information entropy value of each behavior event node, constructing the transfer degree in combination with the out-degree and in-degree of the behavior event node, calculating the responsibility structure weight value according to the path information entropy value and the transfer degree, and determining whether the original data of the behavior event node is written into the blockchain according to the responsibility structure weight value.
[0014] The association module is used for constructing a verification path mapping graph based on the structure closure signature value and the responsibility structure weight value, binding the structure closure signature value of each behavior event node with the storage path of the off-chain data in the verification path mapping graph, and generating a structure mapping hash value.
[0015] The traceability module is used for calling the verification path mapping graph when receiving a traceability request, performing consistency verification on the original data and the structure mapping hash value of the target behavior event node, and generating a traceability verification result.
[0016] Compared with the prior art, the application has the following beneficial effects:
[0017] The present invention realizes the structured expression and verifiable modeling of logistics event data by constructing a behavioral event graph structure and introducing a structural closure signature value, so that each event not only has a unique identifier, but also can reflect the evolutionary dependency relationship with the predecessor event at the structural level; compared with the existing practice of sorting only by time or number, the present invention can accurately restore the real flow path of logistics tasks and prevent illegal event connections, which significantly improves the integrity and traceability of the event chain.
[0018] Furthermore, the present invention constructs the responsibility structure weight value through path information entropy and transfer degree, which effectively solves the cost burden problem brought by all chain-up while ensuring data credibility; the system can automatically identify the key nodes in the structure that truly have communication value and influence, and only write these node data into the blockchain. The remaining nodes are bound and verified off-chain through structural signatures, thereby taking into account the representativeness of the chain data and the economy of on-chain storage, and improving the overall system operation efficiency and trusted computing capabilities.
[0019] In addition, the present invention constructs a verification path mapping graph and introduces a structural mapping hash mechanism, which establishes a strong binding relationship between off-chain data and the graph structure, and supports structural consistency verification of off-chain nodes at any time; even if some event data is not written to the blockchain, the traceability and data verification of the entire chain can still be completed through the verification path, which improves the security and practicality of the system in scenarios such as regulatory audits and compliance accountability, and realizes the unity of on-chain trust and off-chain efficiency.
[0020] In summary, the present invention effectively reduces on-chain storage costs while ensuring data credibility, achieving a technical balance between the fundamental contradiction of "high cost of uploading all data to the chain" and "lack of evidence if data is not uploaded to the chain." BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 Schematic diagram of the process of the present invention;
[0023] Figure 2 Schematic diagram of the structure of the system of the present invention. DETAILED DESCRIPTION
[0024] The technical solutions of the present application will be described clearly and completely below in connection with the embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0025] Please refer to Figure 1 The first aspect of the embodiments of the present application provides a logistics traceability method based on blockchain technology, comprising:
[0026] S101: Collecting logistics behavior event data, constructing an event graph structure containing a plurality of behavior event nodes, and calculating a structural closure signature value for each behavior event node based on the event hash value of its corresponding event data, the structural dependency signature value of the predecessor behavior event node, and the topological position index in the event graph structure, the event data including a timestamp field, an event type field and a responsible subject field;
[0027] In implementation, the construction of the event graph structure containing a plurality of behavior event nodes comprises:
[0028] Grouping all the logistics behavior event data according to the logistics tracking number field in the event data to obtain a plurality of event sets;
[0029] It should be noted that the "logistics tracking number field" is identification information used to uniquely identify a logistics task in the logistics system, such as the number of each package, order or waybill. This number is usually assigned by the logistics platform and has uniqueness and stability, such as "SF1234567890" or "JD00213456". When the system receives a large amount of logistics behavior event data, the data should be grouped according to this field, and all events with the same logistics tracking number are divided into an "event set". Each event set represents a plurality of events generated by the logistics task at different time points and in different operation links. The purpose of grouping is to organize events belonging to the same business process together for subsequent structural modeling and graph structure construction;
[0030] Performing standardized mapping on the timestamp field of each event data in each event set to generate a corresponding global integer time number, which is not repeated in all event sets;
[0031] Exemplarily, in order to ensure the time sequence of each event node in the graph structure to be uniform and controllable, the system will standardize the time of each event in the event set; specifically, the system will extract the timestamp field in each event data, and sort the event data in the entire event set according to time, and then according to the sorting result, assign a unique and increasing integer number to each event as the "global time number" of the event; for example, the time of three events is 10 o'clock in the morning, 2 o'clock in the afternoon and 4:30 in the afternoon, respectively, and they can be numbered as 1, 2 and 3, respectively; the time number constructed in this way can be used for subsequent graph edge establishment, topological relationship calculation and sequence dependence judgment, to ensure the consistency and operability of time logic;
[0032] Based on the event type field, a preset event evolution template graph is called, in which the directed connection relationship between event types is defined;
[0033] It should be understood that the event evolution template graph is usually uploaded and registered in the system by business experts or system administrators based on real logistics process modeling; in order to ensure that the template graph is always consistent with the actual business process, the system supports dynamic synchronization of business rule update mechanism through smart contract: when the logistics process changes or a new business process goes online, the related template graph will be registered and updated in the chain contract, and the system automatically loads the latest version of the template when building the event graph, so as to realize the synchronous maintenance of the legality of the graph structure and the consistency of the business; the template graph clearly specifies the acceptable evolution order of events of different types in the business process; for example, the event type "pick-up" can evolve into "sorting and warehousing", and "sorting and warehousing" can evolve into "outbound transportation"; each event type is represented as a node in the template graph, and the directed edges between different nodes represent the legal event order relationship. The purpose of introducing the template graph is to provide business legality constraints for graph structure construction, to prevent the system from incorrectly connecting event types that do not conform to the actual process, such as prohibiting "signing" from being connected to "pick-up" and the like;
[0034] In each event set, if the time numbers corresponding to any two event data satisfy the increasing relationship, and the event types have a directed connection relationship in the event evolution template graph, a directed edge is established between the corresponding nodes;
[0035] Exemplarily, in an event set, if the time number of event A is 2 and the type of event A is "pick up", the time number of event B is 3 and the type of event B is "delivery", and "pick up" to "delivery" is defined as a legal directed connection relationship in the template graph, then the system will establish a directed edge from A to B for the two nodes in the event graph structure. This edge indicates that event A precedes event B in time and business evolution, reflecting the sequential dependency between events; it should be emphasized that the system must meet two conditions when constructing the edge: one is that the event time numbers meet the sequential order, and the other is that there is a preset legal connection path between the event types in the evolution template graph;
[0036] All event nodes and directed edges between them are uniformly constructed into an event graph structure, which is a directed graph structure, each node in the graph structure represents a single behavior event, and each edge represents the type legality connection relationship and time number sequential dependency relationship between events;
[0037] It should be noted that after the system completes the extraction of nodes and edges, it will uniformly construct a complete event graph structure based on the multiple nodes generated by each event set and the directed connection relationship between them; in this graph structure, each node represents a specific behavior event, and each directed edge represents the dependency relationship between two events in terms of time sequence and business evolution; the event graph structure uses directed acyclic graph (DAG), supports chain, parallel, branching and confluence relationship between multiple nodes, and can accurately describe the whole process of a logistics task from the starting point to the end point; in the system implementation, this graph structure can support graph traversal, path finding, topological sorting and other operations, providing a foundation support for subsequent signature calculation and traceability verification;
[0038] In implementation, the computing structure closure signature value comprises:
[0039] Extract the timestamp field, event type field and responsible subject field in the event data corresponding to the current behavior event node, concatenate them into a target field string in a preset order, and call a set hash function to perform hash operation on the target field string to obtain an event hash value;
[0040] It should be appreciated that, in order to ensure that each behavior event node has a unique identifier in the system, the system generates an event hash value based on the core fields of the node; the core fields include the timestamp, event type and responsible subject fields of the event; the timestamp indicates the time of the event, the event type indicates the operation category of the event in the logistics business, such as “outbound transportation”, and the responsible subject indicates the organization or personnel executing the event, such as “Jingdong Logistics Guangzhou Sorting Center”; the three fields will be spliced in a fixed order into a unified data string as the complete data representation of the current event; then the system calls a cryptographic hash algorithm (such as SHA-256) to calculate the digest of the string and obtains a fixed-length event hash value; the hash value uniquely represents the event data content and is the basis for generating the subsequent structural closure signature value;
[0041] Obtain the predecessor behavior event nodes of the current behavior event node in the event graph structure, and extract the structural dependency signature values of each predecessor behavior event node to construct a structural dependency signature value set;
[0042] It should be noted that in the graph structure, an event node can have one or more predecessor nodes, that is, there is one or more directed edges pointing to the node; in order to represent the inheritance and dependency relationship in the structure, the system needs to read all the incoming edges of the node from the graph structure, and identify the source node of each edge, that is, all the predecessor behavior event nodes; the system will then obtain the structural dependency signature values of these predecessor nodes calculated in the previous stage, which is the structural representation result of itself and its dependency path; the structural dependency signature values of all predecessor nodes will be collected to form a set, providing a dependency basis for the generation of the structural closure signature value of the current node;
[0043] Specifically, the obtaining of the predecessor behavior event nodes of the current behavior event node in the event graph structure comprises:
[0044] Identify the topological position index of the current behavior event node in the event graph structure, and query the incoming edge set of the node based on the event graph structure;
[0045] It should be noted that the so-called “topological position index” refers to the unique position number of the current behavior event node in the entire event graph structure based on its time sequence and business evolution relationship, which is usually determined by processing all nodes in the event graph structure through a topological sorting algorithm (such as Kahn algorithm); the index can reflect the relative order of the current node in the structural path, which is conducive to stable identification of path dependency relationship and elimination of loops;
[0046] It should be appreciated that after obtaining the topological position index, the system needs to locate all the incoming edges of the current node as a "target node" based on the directed edge set of the event graph structure. The so-called "incoming edge set" refers to the set of all edges with the current node as the terminal point, indicating the predecessor connection "pointing" to the current node in structure;
[0047] For example, if the current node is "node 4 (in transit)", its topological index is 4, and there are the following edge relationships: edge 1: node 2 (picking completed) → node 4 (in transit), edge 2: node 3 (outbound) → node 4 (in transit); then the incoming edge set identified by the system should be edge 1 and edge 2, and the corresponding predecessor nodes are node 2 and node 3; this set constitutes the upstream event source on which the current behavior event node depends in structure, which will be used to extract the structural signatures of these predecessor nodes for the structural closure signature calculation of the current node;
[0048] For each incoming edge in the incoming edge set, the topological position index of the source node is extracted, and the corresponding predecessor behavior event node is located in the event graph structure accordingly;
[0049] It should be noted that in the event graph structure, each incoming edge is a directed connection from a certain upstream node (i.e. the source node) to the current behavior event node (i.e. the target node). The system can obtain the "source information" of these edges one by one by traversing the "incoming edge set" of the current node;
[0050] It should be appreciated that each incoming edge contains the structural information of its starting point (source node) and ending point (target node). Here, the system focuses on the "source node" because it is the direct predecessor event node of the current node;
[0051] For example, assume that the current node is "in transit", and its incoming edge set includes two edges: edge A: from "picking completed" to "in transit", and edge B: from "outbound" to "in transit"; then for edge A, the source node is "picking completed"; for edge B, the source node is "outbound";
[0052] Further, the system will extract the topological position index of the "source node" in each incoming edge. This index is usually pre-assigned during the graph initialization or structure construction phase through topological sorting, and is used to identify the sequential position of the node in the graph structure. The purpose of extracting the index is to enable the system to quickly and accurately locate the predecessor node in the graph structure without the need for comparing each edge by event content;
[0053] The exemplary operation is as follows: the topology index of the extracted edge A to the source node is index_2 (assuming that "pick-up completed" is the 2nd node in the graph structure); the topology index of the extracted edge B to the source node is index_3 (the "outbound" is the 3rd node in the graph structure); then the system will locate the corresponding node object in the node index table of the graph structure according to the index value.
[0054] The located predecessor behavior event nodes are structured into a set, arranged in ascending order of topology position index, and constitute a set of predecessor behavior event nodes of the current behavior event node, as the final output result of obtaining the predecessor behavior event nodes of the current behavior event node in the event graph structure.
[0055] Each structural dependency signature value in the set of structural dependency signature values is combined with its corresponding predecessor behavior event node topology position index to form a set of binary tuples, and the set of binary tuples is sorted in ascending order of topology position index, and the structural dependency signature value field is extracted from the sorting result to generate an ordered structural dependency signature sequence.
[0056] Exemplarily, in actual processing, the system will combine the structural dependency signature value of each predecessor node with the topology position index of the node in the event graph structure to form a paired element; for example, if two predecessor nodes are located at the 4th and 7th positions in the graph structure, their structural closure signature values can be identified as "A" and "B" respectively, and the set formed is (4, A) and (7, B); then, the system will sort these paired elements in ascending order of topology position index, and extract the structural dependency signature values from the sorted result to splice into an ordered signature sequence; the purpose of sorting and splicing is to eliminate the influence of different predecessor orders and ensure the stability and repeatability of signature generation;
[0057] The event hash value, the ordered structural dependency signature sequence, and the topology position index of the current behavior event node are sequentially spliced to form an input string, and a set hash function is called to perform hash operation on the input string to obtain the structural closure signature value.
[0058] It should be appreciated that the purpose of generating the structural closure signature value is to combine the ontology information of the current event node with its graph structure position, dependency path, to generate a unique and structure-sensitive identification. The system will splice the three parts of information in order: first, the event hash value of the current event node, which is used to identify the data content of the node itself; second, the sorted ordered structure dependency signature sequence, which is used to represent all the predecessor path information it depends on; third, the topological position index of the node in the graph structure, which is used to reflect its structure position; after splicing the three parts in a unified format, the system will call the hash algorithm for digest processing, and finally generate the structural closure signature value of the current node. This value can be used to represent the structural fingerprint of the node in the entire event graph, and will be used as a key field in subsequent data tracing and consistency checking.
[0059] S102: Based on the event graph structure, the total reachable path participated by each behavior event node is counted, and the path information entropy value of each behavior event node is calculated. The out-degree and in-degree of the behavior event node are combined to construct the transfer degree, and the responsibility structure weight value is calculated according to the path information entropy value and the transfer degree. According to the responsibility structure weight value, it is determined whether the original data of the behavior event node is written into the blockchain;
[0060] In implementation, the calculation of the path information entropy value of each behavior event node includes:
[0061] In the event graph structure, the current behavior event node is taken as the starting point, and the entire set of directed reachable paths with the node as the source point is generated by traversing downward. The reachable path set represents all the behavior transmission paths that can be triggered by the node in the structure;
[0062] It should be noted that the path information entropy is used to measure the structural complexity and distribution balance of the connected paths of an event node. Before calculation, the system needs to perform a series of depth-first or breadth-first graph traversal operations in the event graph structure, starting from the current behavior event node, to find all directed paths that do not pass through the same node. These path sets represent the entire subsequent behavior chain that can be affected by the node, and are an important structural basis for information propagation or responsibility diffusion;
[0063] For each path in the reachable path set, a structure weight distribution is constructed according to the path length and path frequency, and a path probability distribution vector corresponding to the node is generated accordingly;
[0064] It should be noted that: the path length refers to the number of behavior event nodes contained in a path, which is used to measure the "structural depth" or "information propagation chain extension" of the path; for example: if a path is: node A → node B → node C → node D, the length of the path is 4; the path frequency refers to the number of times the current path is observed or derived in historical or simulated evolution data; for example: if the path "picking → warehousing → transportation" in the system appears 27 times in the historical business records, then its frequency is 27;
[0065] The path probability distribution vector corresponding to the node is generated, including:
[0066] The standard probability distribution vector is calculated:
[0067] ;
[0068] The path probability distribution vector of the current behavior event node is generated:
[0069] ;
[0070] In the formula: , represents the structure weight, represents the path length of the i-th path, represents the path frequency of the i-th path, and are correction factors greater than zero, which are determined according to experimental data, for example (set to =0.6, =0.4), is the number of reachable paths connected to the current behavior event node, that is, the total number of paths contained in its reachable path set;
[0071] Based on the path probability distribution vector, a set information entropy formula is called to perform logarithmic weighted summation on each path distribution probability to obtain the path information entropy value corresponding to the behavior event node;
[0072] The information entropy formula is:
[0073] ;
[0074] In the formula: represents the logarithmic function, is the path information entropy value, is the total number of reachable paths;
[0075] It can be understood that the system records the above calculation results in the "path information entropy" attribute field of the corresponding node in the event graph structure as the formal evaluation index of the complexity of the node structure; this value will be used as a core reference in the subsequent responsibility structure weight calculation, reflecting the diversity of the behavior chain connected by the current node;
[0076] In implementation, the out-degree and in-degree of the behavior event node are combined to construct the transmission degree, including:
[0077] In the event graph structure, a set of all acyclic reachable paths starting from the current behavior event node is constructed, and the set of acyclic reachable paths represents all downstream event paths that can be transmitted by the current behavior event node through directed connection;
[0078] It should be noted that in order to measure the information transmission capability of a behavior event node in the graph structure, the system needs to identify all path sets in the event graph structure that start from the node and extend to other nodes in the graph structure; these paths are used to describe "which downstream nodes can be propagated from the node";
[0079] It should be understood that the so-called "acyclic reachable path" means that in the paths generated from the current node, each path is not allowed to pass through the same node repeatedly, that is, there is no backtracking to the node that has been passed through in the path. Such paths are referred to as "simple paths" or "non-loop paths" in the graph structure, and the purpose is to exclude logical conflicts such as forming a loop or self-connection in the path, thereby ensuring the clarity of the information transmission structure;
[0080] For example, assume that there is a structure relationship in the graph structure as follows: node A → node B → node C → node D; meanwhile, node B → node E, node E → node C; then the acyclic reachable paths starting from node A include: A → B → C → D, A → B → E → C → D, A → B → E → C, and the path such as A → B → C → B→ E does not belong to the acyclic path because node B is repeatedly accessed, forming a loop;
[0081] Further, the system records the node sequence, path length, and whether the end of the path is a node with "out-degree of zero" and other structural information for each path; the set of acyclic paths will be used as the basis data for subsequent calculation of indexes such as "path termination rate", "propagation depth", and "structure diffusion capability", for analyzing the influence range and structure propagation value of the current node;
[0082] For each path in the set of acyclic reachable paths, extract the path length value as the number of behavior event nodes contained in the current path, and calculate the proportion of behavior event nodes with out-degree of zero in the path, which is the terminal rate value of the path;
[0083] It should be noted that in order to further analyze the structural stability and propagation boundary of the paths connected to a certain node, the system will extract the structural characteristics of all its acyclic reachable paths one by one; each path represents a downstream propagation chain that can be reached from the node;
[0084] It should be understood that the number of behavior event nodes contained in each path is called "path length value"; that is, if the node sequence of a path is: node A -> node B -> node C -> node D, then the path length value is 4, indicating that the path contains 4 behavior event nodes;
[0085] Further, the system will determine how many nodes in the path have "out-degree of zero" in the current event graph; "out-degree of zero" means that the node has no edge pointing to the subsequent node in the graph structure, i.e. the node is a structural endpoint and cannot propagate or connect to the next event; common in "signing completion", "cancel order", "returned goods" and other end states in logistics processes;
[0086] For example, if node D in the path A -> B -> C -> D has no successor nodes (i.e. out-degree of zero), and the remaining nodes have connections to other nodes, then there is 1 node with out-degree of zero in the path, and the total number of nodes is 4, then the "terminal rate value" of the path is calculated as: R = number of nodes with out-degree of zero in the path / total number of nodes in the path = 1 / 4 = 0.25;
[0087] It should be emphasized that the terminal rate value R reflects the "closure degree" of the path in structure, the higher the value, the more likely the path will terminate and the more "short" the structure; the lower the value, the stronger the path extension and the more open the structure;
[0088] Based on the length value and terminal rate value of all paths, the total path contraction amount is constructed, and combined with the in-degree value of the current behavior event node, the following function is substituted:
[0089] ;
[0090] Wherein, is the length value of the i-th path, is the terminal rate value of the i-th path, is the in-degree value of the current behavior event node, is the transfer degree value of the current behavior event node;
[0091] write the passing degree value of the current behavior event node into the attribute field set of the current behavior event node in the event graph structure as the final processing result of constructing the passing degree combined with the out-degree and in-degree of the behavior event node;
[0092] Need to say, the passing degree value is used to measure the "behavior influence" of the current node in the graph structure, the larger the more downstream structure it connects, the longer the path. The system writes this value into the "passing degree" attribute field of the corresponding node in the event graph structure, providing input basis for the calculation of subsequent responsibility weight value;
[0093] In implementation, the responsibility structure weight value is calculated according to the path information entropy value and the passing degree, comprising:
[0094] Extract the path information entropy value and the passing degree value of the current behavior event node, the path information entropy value represents the distribution complexity of the connected path set of the current behavior event node, and the passing degree value represents the diffusion potential of the current behavior event node in the reachable path structure;
[0095] Build a directed path set of all starting nodes to terminal nodes in the current event graph structure, and identify all directed path subsets participated by the current behavior event node, and calculate the path length and termination rate of each path in turn;
[0096] Need to say, in order to comprehensively analyze the structural position and path contribution of the current behavior event node in the entire event graph structure, the system needs to build all possible directed path sets in the entire event graph from the perspective of the whole graph. These paths must start from "starting nodes" and eventually lead to "terminal nodes";
[0097] It should be understood that the so-called "starting node" refers to the node with zero in-degree in the graph structure, that is, the behavior event without predecessor node, which usually represents the starting event of a logistics process or information process, such as "order creation", "collection initiation" and so on; And "terminal node" refers to the node with zero out-degree, that is, the behavior event without subsequent connection, which usually represents the process termination event, such as "signing completion", "transportation exception", "return processing" and so on;
[0098] Exemplarily, the system will find all complete directed paths starting from a node with zero in-degree and finally reaching a node with zero out-degree by traversing the graph structure; these paths constitute the full path set of the entire graph, which is used to cover all behavior chains in the system;
[0099] Further, the system needs to filter out the path subset containing the "current behavior event node" from the above full path set; that is, the system will identify whether the current node appears in a path, if it appears, the path will be classified into the "current node participated path set";
[0100] It is emphasized that for each path in the set of participation paths, the system will extract two structural indicators: path length: the number of behavior event nodes contained in the path, used to measure the extension of the propagation chain; path termination rate: the proportion of nodes with out-degree of zero in the path (for example, a path in the graph structure contains 4 nodes, 2 of which have out-degree of zero, then the termination rate is 50%), used to measure whether the path tends to terminate;
[0101] For each path containing the current behavior event node, the structural interference factor is calculated according to the following function:
[0102] ;
[0103] In the formula: H is the path information entropy value, T is the transmission degree value, is the path length, is a positive constant, representing a jitter term to avoid division by zero error, is the structural interference factor, used to represent the attribution influence of the current behavior event node on each path;
[0104] The structural interference factors of the current behavior event node on all participation paths are accumulated as the responsibility structure weight value of the current behavior event node, and the responsibility structure weight value is written into the structure attribute field of the current behavior event node as the final processing result of calculating the responsibility structure weight value according to the path information entropy value and the transmission degree.
[0105] It should be noted that in the graph structure, a behavior event node may appear in multiple directed paths, and these paths constitute the "behavior participation path set" of the node, that is, all positions of the node in the entire event evolution structure;
[0106] It should be understood that in order to measure the structural role of the node in each path, the present application introduces a calculation method of "structural interference factor"; the factor reflects the importance of the current node to the structure of a path, and its calculation considers the path information entropy of the node itself, the structural transmission degree, and the length of the path;
[0107] For example, if a node appears in three paths, and the structural interference factors of the node to each path are respectively , , , then the system will sum these factors: , where W is the "responsibility structure weight value" of the current behavior event node;
[0108] It should be emphasized that the weight value is used to represent the size of the structural propagation responsibility that the node bears in the overall event graph structure. The larger the value, the higher the structural influence of the node in multiple paths, and it is a key node in the event chain. The value will be used to determine whether the original data corresponding to the node is chained;
[0109] In implementation, the determining whether the original data of the behavior event node is written into the blockchain includes:
[0110] The responsibility structure weight value of the current behavior event node is normalized and compared with a preset responsibility structure weight threshold value. If it is greater than or equal to the responsibility structure weight threshold value, it is determined to be a structural key node that needs to be chained; otherwise, it is determined to be an off-chain reserved node.
[0111] Specifically, the responsibility structure weight value is normalized by calculating the responsibility structure weight values of all behavior event nodes, and the formula is:
[0112]
[0113] In the formula: is the mean of the responsibility structure weight values of all behavior event nodes, is the standard deviation;
[0114] It should be understood that the system sets a predetermined weight threshold as a determination standard. When the responsibility structure weight value of a node is greater than or equal to the threshold, it indicates that it has strong structural influence in the graph structure and should be considered a "key node"; otherwise, it is a normal node. Only the original data of the key node is written into the blockchain to ensure the structural representativeness and storage efficiency of the data on the chain;
[0115] If it is determined to be a structural key node that needs to be chained, the original data of the behavior event node is written into the blockchain. If it is determined to be an off-chain reserved node, the original data is not written, only the structural closure signature value information is recorded and saved in the off-chain data system.
[0116] It can be understood that when a node is determined to be a key node, the system writes its original data into the blockchain system to ensure that the data is verifiable and tamper-proof. If the node is a non-key node, it will not be written into the blockchain, only its structural closure signature value and path information will be saved in the off-chain data system for subsequent auxiliary verification, reducing the redundancy of data on the chain.
[0117] S103: Based on the structural closure signature value and the responsibility structure weight value, a verification path mapping graph is constructed, in which the structural closure signature value of each behavior event node is bound to the storage path of the off-chain data, and a structural mapping hash value is generated;
[0118] In implementation, the construction verification path mapping map, comprising:
[0119] According to the direct predecessor signature value contained in the structural closure signature value, the directed connection edge between the nodes is constructed, and the structural closure signature value path subgraph is generated in the event graph, which is used to restore the path structure of the signature chain;
[0120] Need to say, in order to realize the structure verification and path restoration in the off-chain environment, the system needs to construct a verification graph structure with "structural closure signature value" as the core; The construction of this graph is based on the "predecessor signature value" contained in the node structural closure signature value, which has been determined according to the event structure dependency relationship in the foregoing steps and participated in the signature calculation;
[0121] It should be understood that each structural closure signature value not only represents the current node, but also contains the signature information of all predecessor nodes explicitly or implicitly through its construction process; Therefore, the system can reestablish a "structure restoration connection edge" between the nodes according to the direct predecessor signature value contained in the current node, which represents its dependency order in the original graph structure;
[0122] Exemplarily, if the structural closure signature value of node A contains the signature values of node B and node C, the system establishes the connection from B → A and C → A in the "verification path mapping map", forming a "structural closure signature value path subgraph" for path restoration;
[0123] According to the responsibility structure weight value, the nodes meeting the set weight threshold are selected as the main mapping nodes, the structural closure signature value of the main mapping node is bound with its off-chain data storage path, and the joint hash operation is performed on each binding pair to generate the structure mapping hash value;
[0124] It should be understood that in the complete event graph structure, only part of the nodes have a key influence on the structure (i.e. the responsibility structure weight value is higher), therefore the system introduces a preset weight threshold to screen "structural key nodes", that is, those nodes that need to establish a strong binding relationship off-chain;
[0125] Exemplarily, if the responsibility structure weight value of a node is greater than or equal to the preset weight threshold, it is determined as a "main mapping node"; The system binds the "structural closure signature value" of the node with its "original data storage path" in the off-chain system; The storage path is usually a file system path or an object storage address;
[0126] Specifically, the generation of the structure mapping hash value comprises:
[0127] extracting a structural closure signature value, an off-chain data storage path, and a topological position index of the node in the event graph structure in the current binding pair, the structural closure signature value being a structural dependency identifier of the node, the off-chain data storage path being file positioning information of original data corresponding to the node, and the topological position index being a topological position index of the node in the event graph;
[0128] sequentially connecting the structural closure signature value, the topological position index, and the off-chain data storage path in field order to construct a joint input string, the field connection being connected by a fixed delimiter to form a consistent hashable input sequence;
[0129] It should be understood that, in order to ensure the consistency and reproducibility of the hash calculation, the system splices the above three fields in a fixed order, and usually uses “|” as a delimiter; for example: SigA123XYZ|Pos_07| / storage / ... / Sig_A123XYZ.json;
[0130] calling a set one-way hash function to perform digest calculation on the joint input string, the hash function being a standard cryptographic hash algorithm that meets the requirements of collision resistance; and taking the obtained hash digest value as a structural mapping hash value;
[0131] It can be understood that; the system can call a standard irreversible cryptographic hash algorithm (such as SHA-256) to perform digest operation on the above spliced string; the obtained hash digest value is the structural mapping hash value, which is used for subsequent data consistency verification; the hash value has tamper resistance, and any change in a field (such as the signature value, the position index, or the path) will cause the overall hash value to change;
[0132] writing all main mapping nodes that meet the weight requirement and their structural mapping hash values as node units into a verification path mapping graph, and recording the connection relationship in the graph structure, to complete the structure construction of the verification path mapping graph;
[0133] It should be noted that after the structural mapping hash value is generated, the system writes all “main mapping nodes” as graph nodes into the “verification path mapping graph”, each node containing its structural closure signature value, data storage path, topological index, and mapping hash value;
[0134] At the same time, the system retains the structural dependency connection edges (from the predecessor signature relationship) between nodes, thereby completing the construction of the entire verification graph structure; the graph can be used as a signature restoration structure, and can also be used to verify whether the binding data of all nodes in the path is consistent and complete when receiving a traceability request.
[0135] S104: When receiving the traceability request, call the verification path map, perform consistency verification on the original data and structural mapping hash value of the target behavior event node, and generate a traceability verification result;
[0136] In implementation, the consistency verification includes:
[0137] According to the target behavior event node identifier provided in the traceability request, extract the structural mapping hash value and off-chain data storage path corresponding to the node from the verification path map; if the original data of the node is not on the chain, read the original data content of the node according to the off-chain data storage path;
[0138] It should be noted that in actual application, a user or a regulatory party may initiate a traceability request to verify whether a certain logistics behavior event is real and credible, and whether the data is tampered with; the request usually contains the identification information of the target behavior event node, such as event ID, signature value or business number;
[0139] It should be understood that the system first locates the node unit in the previously constructed verification path map based on the identifier, extracts the structural mapping hash value bound to the node and its off-chain storage path; the structural mapping hash value represents the encrypted fingerprint generated by the node when the map is initially constructed, and the off-chain path is the physical location of the original business data of the node;
[0140] For example, if the target node is not written into the blockchain (i.e. a non-critical node), its original data will be retained in the off-chain storage system; at this time, the system needs to read the complete original data content from the off-chain path for subsequent hash comparison operation;
[0141] The read original data content, the structural closure signature value of the node and its topological position index in the event graph are field spliced in a predetermined order to construct a hash input string; the same one-way hash algorithm as when generating the structural mapping hash value is called to perform digest operation on the hash input string to obtain the verification hash value of the current node;
[0142] Exemplarily, to ensure the accuracy of the consistency check, the system uses the same field splicing order and hash algorithm as in the S103 step to construct the verification string and generate the hash digest; the spliced fields include: the structural closure signature value of the current node (representing the structural dependency relationship); the topological position index of the node in the event graph structure (representing the structural position); the original data content or data path read from the off-chain (representing the business content); the three fields are connected in a fixed format (such as "Field 1 | Field 2 | Field 3") to form a hash input string; then, the system calls a set one-way hash function (such as SHA-256) to calculate the hash value of the string, which is the verification hash value of the current node; the value represents the digital signature of the binding of the structure, position and data content of the current node together, and is the core indicator for judging whether it is tampered with;
[0143] The verification hash value of the current node is compared with the structural mapping hash value recorded in the verification path mapping diagram; if they are consistent, it is recorded as "pass", otherwise it is recorded as "failure"; the comparison results of all verification nodes are summarized to form the traceability verification result containing the node number, verification state and failed node index;
[0144] It should be noted that after the verification hash value is calculated, the system compares the value with the structural mapping hash value stored in the verification path mapping diagram before; if they are completely consistent, it means that the node has not been tampered with in terms of structure, position and data content, and the verification state is marked as "pass"; if the hash values are inconsistent, it means that the node has the risk of being tampered with, and the verification state is marked as "failure";
[0145] It should be understood that the system can continuously verify multiple nodes, for example, all main mapping nodes in a complete path are verified node by node; finally, the system outputs the verification result in a structured report form, which includes the topological position index or node number of each node; the verification state (pass / failure); if it fails, it will be accompanied by a failure reason or field difference prompt (such as inconsistent signature value, data content change, etc.); the verification result can be used for subsequent data credibility audit, abnormal alarm, compliance supervision and other purposes, to ensure that the off-chain data and the structural mapping are consistent.
[0146] Please refer to Figure 2 , based on the same inventive concept, the second aspect of the present application provides a logistics traceability system based on blockchain technology, the contents of this embodiment are not described in detail, please refer to the description of the relevant part in embodiment 1, the system comprises:
[0147] The acquisition module 201 is configured to collect logistics behavior event data, construct an event graph structure containing a plurality of behavior event nodes, and calculate a structural closure signature value of each behavior event node based on an event hash value of corresponding event data of the behavior event node, a structural dependence signature value of a predecessor behavior event node, and a topological position index of the behavior event node in the event graph structure, wherein the event data includes a timestamp field, an event type field, and a responsible subject field;
[0148] The analysis module 202 is configured to count all reachable paths participated by each behavior event node based on the event graph structure, calculate a path information entropy value of each behavior event node, construct a transfer degree combining an out-degree and an in-degree of the behavior event node, calculate a responsibility structure weight value based on a combination of the path information entropy value and the transfer degree, and determine whether to write original data of the behavior event node into a blockchain based on a size of the responsibility structure weight value.
[0149] The correlation module 203 is configured to construct a verification path mapping graph based on the structural closure signature value and the responsibility structure weight value, bind the structural closure signature value of each behavior event node with a storage path of off-chain data in the verification path mapping graph, and generate a structural mapping hash value.
[0150] The traceability module 204 is configured to, when receiving a traceability request, call the verification path mapping graph, perform consistency verification on original data and the structural mapping hash value of a target behavior event node, and generate a traceability verification result.
[0151] The above embodiments can be realized by software, hardware, firmware or any combination thereof, in whole or in part. When realized by software, the above embodiments can be realized in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD) or a semiconductor medium. The semiconductor medium can be a solid-state disk.
[0152] In several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the above-described device embodiments is only a kind of, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other form.
[0153] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0154] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0155] Some data in the above formula is calculated by removing the dimension value, and the formula is obtained by software simulation of a large number of collected data to obtain a formula closest to the real situation; The preset parameters and the preset threshold in the formula are set by a person skilled in the art according to the actual situation or obtained by a large number of data simulation.
[0156] The above embodiments are only used to illustrate the technical method of the present application and are not limited. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical method of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present application.
Claims
1. A logistics traceability method based on blockchain technology, characterized in that: include: Collect logistics behavior event data, build an event graph structure containing multiple behavior event nodes, and calculate the structural closure signature value for each behavior event node based on the event hash value of its corresponding event data, the structural dependency signature value of the predecessor behavior event node, and the topological position index in the event graph structure. The event data includes a timestamp field, an event type field, and a responsible entity field. The calculation structure closure signature value includes: Extract the timestamp field, event type field, and responsible party field from the event data corresponding to the current behavior event node, concatenate them into a target field string in a preset order, and call the set hash function to perform a hash operation on the target field string to obtain the event hash value; Obtain the predecessor behavior event node of the current behavior event node in the event graph structure, extract the structure dependency signature value of each predecessor behavior event node, and construct a structure dependency signature value set; Each structure-dependency signature value in the structure-dependency signature value set and its corresponding predecessor behavior event node topological position index are combined into a two-tuple set, and the two-tuple set is sorted in ascending order of the topological position index, and the structure-dependency signature value field is extracted from the sorting result to generate an ordered structure-dependency signature sequence; The event hash value, the ordered structure dependency signature sequence, and the topological position index of the current behavior event node are sequentially concatenated to form an input string, and a set hash function is called to perform a hash operation on the input string to obtain a structure closure signature value; Based on the event graph structure, all reachable paths involved in each behavior event node are counted, and the path information entropy value of each behavior event node is calculated. The transitive degree is constructed by combining the out-degree and in-degree of the behavior event node. The responsibility structure weight value is jointly calculated based on the path information entropy value and the transitive degree. Based on the size of the responsibility structure weight value, it is determined whether the original data of the behavior event node is written into the blockchain; Based on the structure closure signature value and the responsibility structure weight value, a verification path mapping graph is constructed, in which the structure closure signature value of each behavior event node is bound to the storage path of the off-chain data, and a structure mapping hash value is generated; When a traceability request is received, the verification path map is called to perform consistency verification on the original data and structure mapping hash value of the target behavior event node to generate a traceability verification result.
2. A logistics traceability method based on blockchain technology according to claim 1, characterized in that: The step of obtaining the predecessor behavior event node of the current behavior event node in the event graph structure includes: Identify the topological position index of the current behavior event node in the event graph structure, and query the incoming edge set of the node based on the event graph structure; For each incoming edge in the incoming edge set, extract the topological position index of its source node, and locate the corresponding predecessor behavior event node in the event graph structure based on the topological position index; The located predecessor behavior event nodes are organized into a structured set and arranged in ascending order according to the topological position index to form a predecessor behavior event node set of the current behavior event node, which serves as the final output result of obtaining the predecessor behavior event node of the current behavior event node in the event graph structure.
3. A logistics traceability method based on blockchain technology according to claim 2, characterized in that: The calculation of the path information entropy value of each behavior event node includes: In the event graph structure, starting from the current behavior event node, traverse downward to generate a set of all directed reachable paths with the node as the source point. The reachable path set represents all behavior transfer paths that can be triggered by the node in the structure. For each path in the reachable path set, a structural weight distribution is constructed based on the path length and path frequency, and a path probability distribution vector corresponding to the node is generated accordingly; Generating the path probability distribution vector corresponding to the node includes: Compute the standard probability distribution vector: ; Generate the path probability distribution vector of the current behavior event node: ; Where: , represents the structural weight, represents the path length of the i-th path, represents the path frequency of the i-th path, and is a correction factor greater than zero, is the number of reachable paths connected to the current behavior event node; Based on the path probability distribution vector, the set information entropy formula is called to perform logarithmic weighted summation on the distribution probability of each path to obtain the path information entropy value corresponding to the behavior event node; Wherein, the information entropy formula is: ; Where: represents the logarithmic function with the natural constant e as the base, is the path information entropy value, is the total number of reachable paths.
4. A logistics traceability method based on blockchain technology according to claim 3, characterized in that: The step of constructing the transitive degree by combining the out-degree and in-degree of the behavior event node includes: In the event graph structure, starting from the current behavior event node, a set of all acyclic reachable paths from the current behavior event node is constructed. The acyclic reachable path set represents all downstream event paths that can be conducted by the current behavior event node through directed connections. For each path in the set of acyclic reachable paths, extract the path length value as the number of behavior event nodes contained in the current path, and calculate the proportion of behavior event nodes with zero out-degree in the path, and the proportion is the termination rate value of the path; Based on the length and termination rate of all paths, the total path contraction amount is constructed, and combined with the in-degree value of the current behavior event node, it is substituted into the following function: ; in, is the length of the i-th path, is the termination rate value of the i-th path, is the in-degree value of the current behavior event node, is the transfer degree value of the current behavior event node; The transfer degree value of the current behavior event node is written into the attribute field set of the current behavior event node in the event graph structure as the final processing result of constructing the transfer degree by combining the out-degree and in-degree of the behavior event node.
5. The logistics traceability method based on blockchain technology according to claim 4 is characterized in that: The calculation of the responsibility structure weight value based on the path information entropy value and the transfer degree includes: Extract the path information entropy value and transfer degree value of the current behavior event node. The path information entropy value represents the distribution complexity of the path set connected by the current behavior event node, and the transfer degree value represents the diffusion potential of the current behavior event node in the reachable path structure. Construct a set of directed paths from all starting nodes to terminal nodes in the current event graph structure, identify all directed path subsets involved by the current behavior event node, and calculate the path length and termination rate of each path in turn; For each path containing the current behavior event node, the structural interference factor is calculated according to the following function: ; Where: H is the path information entropy value, T is the transfer degree value, is the path length, is a positive constant, is the structural interference factor; The structural interference factors of the current behavior event node on all participating paths are accumulated as the responsibility structure weight value of the current behavior event node, and the responsibility structure weight value is written into the structural attribute field of the current behavior event node as the final processing result of the responsibility structure weight value calculated based on the path information entropy value and the transfer degree.
6. A logistics traceability method based on blockchain technology according to claim 5, characterized in that: The construction verification path mapping diagram includes: According to the direct predecessor signature value contained in the structure closure signature value, a directed connection edge is constructed between the nodes, and a structure closure signature value path subgraph is generated in the event graph. The subgraph is used to restore the path structure of the signature chain; Based on the responsibility structure weight value, select the nodes that meet the set weight threshold as the main mapping node, bind the structure closure signature value of the main mapping node to its off-chain data storage path, and perform a joint hash operation on each binding pair to generate a structure mapping hash value; All main mapping nodes that meet the weight requirements and their structure mapping hash values are written into the verification path mapping graph as node units, and the connection relationships in the graph are recorded to complete the structural construction of the verification path mapping graph.
7. A logistics traceability method based on blockchain technology according to claim 6, characterized in that: Generating a structure mapping hash value includes: Extract the structure closure signature value, off-chain data storage path, and topological position index of the node in the event graph structure from the current binding pair. The structure closure signature value is the structure dependency identifier of the node, the off-chain data storage path is the file location information of the original data corresponding to the node, and the topological position index is the topological position index of the node in the event graph. Concatenate the structure closure signature value, topological location index, and off-chain data storage path in order to construct a joint input string. The fields are concatenated with a fixed delimiter to form a hashable input sequence with consistent format. A set one-way hash function is called to perform digest calculation on the combined input string, where the hash function is a standard cryptographic hash algorithm that meets collision resistance requirements; and the obtained hash digest value is used as the structure mapping hash value.
8. The logistics traceability method based on blockchain technology according to claim 7 is characterized in that: The execution consistency verification includes: According to the target behavior event node identifier provided in the traceability request, the structure mapping hash value and off-chain data storage path corresponding to the node are extracted from the verification path map; if the original data of the node is not on-chain, the original data content of the node is read according to the off-chain data storage path; The read original data content, the structure closure signature value of the node, and its topological position index in the event graph are concatenated in a preset order to construct a hash input string; the same one-way hash algorithm used to generate the structure mapping hash value is called to perform a digest operation on the hash input string to obtain the verification hash value of the current node; The verification hash value of the current node is compared one by one with the structure mapping hash value recorded in the verification path mapping diagram; if the two are consistent, it is recorded as "passed", otherwise it is recorded as "failed"; the comparison results of all verification nodes are summarized to form a traceability verification result including the node number, verification status and failed node index.
9. A logistics traceability system based on blockchain technology, implemented based on a logistics traceability method based on blockchain technology according to any one of claims 1 to 8, characterized in that: include: An acquisition module is used to collect logistics behavior event data, construct an event graph structure containing multiple behavior event nodes, and calculate the structural closure signature value for each behavior event node based on the event hash value of its corresponding event data, the structural dependency signature value of the predecessor behavior event node, and the topological position index in the event graph structure. The event data includes a timestamp field, an event type field, and a responsible entity field; An analysis module is used to count all reachable paths involved in each behavior event node based on the event graph structure, calculate the path information entropy value of each behavior event node, construct the transitive degree based on the out-degree and in-degree of the behavior event node, jointly calculate the responsibility structure weight value based on the path information entropy value and the transitive degree, and determine whether the original data of the behavior event node is written into the blockchain based on the size of the responsibility structure weight value; An association module is configured to construct a verification path mapping graph based on the structure closure signature value and the responsibility structure weight value, bind the structure closure signature value of each behavior event node to the storage path of the off-chain data in the verification path mapping graph, and generate a structure mapping hash value; The traceability module is used to call the verification path mapping diagram when receiving a traceability request, perform consistency verification on the original data and structure mapping hash value of the target behavior event node, and generate a traceability verification result.
Citation Information
Patent Citations
Secure backup and recovery method and system for medical data
CN120256208A
Full-life-cycle achievement protection method, and device and medium
WO2025007611A1